From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by mx.groups.io with SMTP id smtpd.web11.3936.1588762632907307619 for ; Wed, 06 May 2020 03:57:13 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=VWptkYoD; spf=pass (domain: nuviainc.com, ip: 209.85.128.65, mailfrom: leif@nuviainc.com) Received: by mail-wm1-f65.google.com with SMTP id g12so2107627wmh.3 for ; Wed, 06 May 2020 03:57:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=g85ty2FjbzQvtfkOVpPFRRH1l4uxuZtLBHSNfR4DVZE=; b=VWptkYoDv/yGzwu/lMaj/j5NzEVD8pV1fOtRNnxGnxTDDclZyGvOpVVQYYwzu35Ecd 2Zq52RhSlLUBekF1xzL4On9FY4GBqMj5j7nwksibPrk+N8PLf0v8Pp0sdwG6yjIn3d2Z EwdasrH12nNGseo/039WVe3QKI+0C7y47Hjbgsyn69MS603zpHlWATiglDO2KCZeg2y6 Txe51Gn9Kl3tIeMf4WfPySKDfejILRkEqWxTFBuFGi7KJxqIut+ixPEKu06epnECEg5c uWvxdyNLobXKvTsZtD+l1FsX6kSNwUMhxjfrz4UY8K+SzT2s1etINjD8y1KIO0QJGmO6 AQ+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=g85ty2FjbzQvtfkOVpPFRRH1l4uxuZtLBHSNfR4DVZE=; b=JLyeMRIrQuBMOl5yELWwbxOvNn+bJIxaNzv1D8FlbcxpgUCm2bMYTlwo7WcLLEfUbQ F9GZySi9qui/JwjFsFN31iM25rsQ8USfJjUYGOXt1sMKDYTJQDdN9RWrqd4n+QmfFIvm ZCPFroCaSCNmWvXi9vBXUYzp1epZrC/oZGISPH/AgtjKlBUcDNfjLjYdrhkrY5E4ngj7 EvrI3FrR8zyLhVG4xIj2J1mpmn9T4pcU90c07yOcTDdkBY/jBVy1xy/J3qPTz57t32LB QEXBvSdaPdyMUAYfUeTGfoA357j0yGH+h/Dp0JmQ4wP4USbNCv9WhCm4UagcRbp+CAN1 I5rw== X-Gm-Message-State: AGi0PuaPT1HhOqxpd69u8PmjEfsKIHelYsJnNAuAycZuNJrutsv0e7uM stRcrx+3tVeMeweLCYnbpMyQjw== X-Google-Smtp-Source: APiQypKRaFyD6JASZjaKj/50gbUvZXprEwEz+4Em0EaWolTvTseyr7Qyhag2HOUAKp0UnrsEsI/Eyw== X-Received: by 2002:a05:600c:20c:: with SMTP id 12mr3649861wmi.158.1588762631216; Wed, 06 May 2020 03:57:11 -0700 (PDT) Return-Path: Received: from vanye ([2001:470:1f09:12f0:b26e:bfff:fea9:f1b8]) by smtp.gmail.com with ESMTPSA id g25sm2365035wmh.24.2020.05.06.03.57.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2020 03:57:10 -0700 (PDT) Date: Wed, 6 May 2020 11:57:08 +0100 From: "Leif Lindholm" To: Pankaj Bansal Cc: Meenakshi Aggarwal , Michael D Kinney , devel@edk2.groups.io, Varun Sethi , Samer El-Haj-Mahmoud , Jon Nettleton , Ard Biesheuvel Subject: Re: [PATCH edk2-platforms v4 24/24] Platform/NXP/LS1043aRdbPkg: Add PEI Phase Message-ID: <20200506105708.GP21486@vanye> References: <20200501054955.13025-1-pankaj.bansal@oss.nxp.com> <20200501054955.13025-25-pankaj.bansal@oss.nxp.com> MIME-Version: 1.0 In-Reply-To: <20200501054955.13025-25-pankaj.bansal@oss.nxp.com> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, May 01, 2020 at 11:19:55 +0530, Pankaj Bansal wrote: > From: Pankaj Bansal > > Add PEI phase to LS1043aRdb. This is needed because we need to have > dynamic PCDs support to be able to reserve memory before reporting > memory to UEFI firmware. > Using PEI phase we are now also dynamically setting the > PcdSystemMemoryBase and PcdSystemMemorySize depending upon the DRAM > regions detected. > This in turn would depend on the DDR DIMMs installed on board. > > Signed-off-by: Pankaj Bansal Reviewed-by: Leif Lindholm I think that leaves us with only 12/24 outstanding - could you send out a v5 of just that patch? / Leif > --- > > Notes: > V4: > - Use ArmPkg version of PeiServicesTablePointerLib instead of MdePkg. > This allows us to run PEI phase from memory mapped flash devices > > V3: > - Update commit description > > Silicon/NXP/NxpQoriqLs.dsc.inc | 63 +++++++++++++----- > Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc | 9 --- > Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.fdf | 18 ++++-- > Silicon/NXP/Library/MemoryInitPeiLib/MemoryInitPeiLib.inf | 3 +- > Silicon/NXP/Library/MemoryInitPeiLib/MemoryInitPeiLib.c | 67 +++++++++++--------- > 5 files changed, 99 insertions(+), 61 deletions(-) > > diff --git a/Silicon/NXP/NxpQoriqLs.dsc.inc b/Silicon/NXP/NxpQoriqLs.dsc.inc > index 3c8b11d9e04c..03759c7cee7c 100644 > --- a/Silicon/NXP/NxpQoriqLs.dsc.inc > +++ b/Silicon/NXP/NxpQoriqLs.dsc.inc > @@ -93,46 +93,53 @@ > CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf > NonDiscoverableDeviceRegistrationLib|MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/NonDiscoverableDeviceRegistrationLib.inf > ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf > + UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf > > I2cLib|Silicon/NXP/Library/I2cLib/I2cLib.inf > ResetSystemLib|ArmPkg/Library/ArmSmcPsciResetSystemLib/ArmSmcPsciResetSystemLib.inf > IoAccessLib|Silicon/NXP/Library/IoAccessLib/IoAccessLib.inf > > + PlatformPeiLib|ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf > MemoryInitPeiLib|Silicon/NXP/Library/MemoryInitPeiLib/MemoryInitPeiLib.inf > > [LibraryClasses.common.SEC] > PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf > - UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf > - ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf > - LzmaDecompressLib|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf > - PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf > - HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf > - PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf > - MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf > + DebugAgentLib|ArmPkg/Library/DebugAgentSymbolsBaseLib/DebugAgentSymbolsBaseLib.inf > + HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf > + PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf > + PeiServicesTablePointerLib|ArmPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf > + MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf > + > +[LibraryClasses.common.PEI_CORE] > + PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf > + HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf > + PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf > + MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf > + PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf > PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf > - PlatformPeiLib|ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf > + ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf > + ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf > + OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf > > - # 1/123 faster than Stm or Vstm version > - BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf > - > - # Uncomment to turn on GDB stub in SEC. > - #DebugAgentLib|EmbeddedPkg/Library/GdbDebugAgent/GdbDebugAgent.inf > + PeiServicesTablePointerLib|ArmPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf > > [LibraryClasses.common.PEIM] > PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf > PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf > PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf > - PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf > + PeiServicesTablePointerLib|ArmPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf > HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf > MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf > + PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf > + ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf > ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf > + OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf > > [LibraryClasses.common.DXE_CORE] > HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf > MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf > DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf > ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf > - UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf > DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf > PerformanceLib|MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf > > @@ -204,6 +211,9 @@ > gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|640 > gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480 > > + gArmTokenSpaceGuid.PcdSystemMemoryBase|0 > + gArmTokenSpaceGuid.PcdSystemMemorySize|0 > + > [PcdsDynamicHii.common.DEFAULT] > gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVariableGuid|0x0|10 > > @@ -224,6 +234,12 @@ > gEfiMdePkgTokenSpaceGuid.PcdPostCodePropertyMask|0 > gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|320 > > + ## Base of DRAM > + ## since TFA puts Fd at 0x2000000 offset from DRAM base, we can use this space > + ## for temporary ram > + gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase|0x80000000 > + gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x02000000 > + > !if $(TARGET) == RELEASE > gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x27 > gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x81000001 > @@ -281,13 +297,26 @@ > ################################################################################ > [Components.common] > # > - # SEC > + # PEI Phase modules > # > - ArmPlatformPkg/PrePi/PeiUniCore.inf > + ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf > + > + MdeModulePkg/Core/Pei/PeiMain.inf > MdeModulePkg/Universal/PCD/Pei/Pcd.inf { > > PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf > } > + MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf > + MdeModulePkg/Universal/Variable/Pei/VariablePei.inf > + > + ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf > + ArmPkg/Drivers/CpuPei/CpuPei.inf > + ArmPlatformPkg/PlatformPei/PlatformPeim.inf > + > + MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf { > + > + NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf > + } > > # > # DXE > diff --git a/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc b/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc > index d486c9b36fab..d45fd67c03b5 100644 > --- a/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc > +++ b/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc > @@ -30,15 +30,6 @@ > RealTimeClockLib|Silicon/Maxim/Library/Ds1307RtcLib/Ds1307RtcLib.inf > > [PcdsFixedAtBuild.common] > - > - # > - # LS1043a board Specific PCDs > - # XX (DRAM - Region 1 2GB) > - # (NOR - IFC Region 1 512MB) > - gArmTokenSpaceGuid.PcdSystemMemoryBase|0x80000000 > - gArmTokenSpaceGuid.PcdSystemMemorySize|0x7BE00000 > - gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x02000000 > - > # > # RTC Pcds > # > diff --git a/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.fdf b/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.fdf > index 99fbc87e1200..931d0bb14f9b 100644 > --- a/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.fdf > +++ b/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.fdf > @@ -24,10 +24,10 @@ > > [FD.LS1043ARDB_EFI] > BaseAddress = 0x82000000|gArmTokenSpaceGuid.PcdFdBaseAddress #The base address of the FLASH Device. > -Size = 0x000ED000|gArmTokenSpaceGuid.PcdFdSize #The size in bytes of the FLASH Device > +Size = 0x00140000|gArmTokenSpaceGuid.PcdFdSize #The size in bytes of the FLASH Device > ErasePolarity = 1 > -BlockSize = 0x1 > -NumBlocks = 0xED000 > +BlockSize = 0x40000 > +NumBlocks = 0x5 > > ################################################################################ > # > @@ -44,7 +44,7 @@ NumBlocks = 0xED000 > # RegionType > # > ################################################################################ > -0x00000000|0x000ED000 > +0x00000000|0x00140000 > gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize > FV = FVMAIN_COMPACT > > @@ -159,7 +159,15 @@ READ_STATUS = TRUE > READ_LOCK_CAP = TRUE > READ_LOCK_STATUS = TRUE > > - INF ArmPlatformPkg/PrePi/PeiUniCore.inf > + INF ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf > + INF MdeModulePkg/Core/Pei/PeiMain.inf > + INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf > + INF MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf > + INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf > + INF ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf > + INF ArmPkg/Drivers/CpuPei/CpuPei.inf > + INF ArmPlatformPkg/PlatformPei/PlatformPeim.inf > + INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf > > FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 { > SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE { > diff --git a/Silicon/NXP/Library/MemoryInitPeiLib/MemoryInitPeiLib.inf b/Silicon/NXP/Library/MemoryInitPeiLib/MemoryInitPeiLib.inf > index ad2371115b17..a33f8cd3f743 100644 > --- a/Silicon/NXP/Library/MemoryInitPeiLib/MemoryInitPeiLib.inf > +++ b/Silicon/NXP/Library/MemoryInitPeiLib/MemoryInitPeiLib.inf > @@ -13,7 +13,8 @@ > FILE_GUID = 55ddb6e0-70b5-11e0-b33e-0002a5d5c51b > MODULE_TYPE = BASE > VERSION_STRING = 1.0 > - LIBRARY_CLASS = MemoryInitPeiLib|SEC PEIM DXE_DRIVER > + LIBRARY_CLASS = MemoryInitPeiLib|PEIM > + CONSTRUCTOR = MemoryInitPeiLibConstructor > > [Sources] > MemoryInitPeiLib.c > diff --git a/Silicon/NXP/Library/MemoryInitPeiLib/MemoryInitPeiLib.c b/Silicon/NXP/Library/MemoryInitPeiLib/MemoryInitPeiLib.c > index 905d326893e5..5599239ede4a 100644 > --- a/Silicon/NXP/Library/MemoryInitPeiLib/MemoryInitPeiLib.c > +++ b/Silicon/NXP/Library/MemoryInitPeiLib/MemoryInitPeiLib.c > @@ -120,22 +120,17 @@ GetDramRegionsInfo ( > > /** > Get the installed RAM information. > - Initialize MMU and Memory HOBs (Resource Descriptor HOBs) > + Initialize Memory HOBs (Resource Descriptor HOBs) > + Set the PcdSystemMemoryBase and PcdSystemMemorySize. > > - @param[in] UefiMemoryBase Base address of region used by UEFI in > - permanent memory > - @param[in] UefiMemorySize Size of the region used by UEFI in permanent memory > - > - @return EFI_SUCCESS Successfuly Initialize MMU and Memory HOBs. > + @return EFI_SUCCESS Successfuly retrieved the system memory information > **/ > EFI_STATUS > EFIAPI > -MemoryPeim ( > - IN EFI_PHYSICAL_ADDRESS UefiMemoryBase, > - IN UINT64 UefiMemorySize > +MemoryInitPeiLibConstructor ( > + VOID > ) > { > - ARM_MEMORY_REGION_DESCRIPTOR *MemoryTable; > INT32 Index; > UINTN BaseAddress; > UINTN Size; > @@ -147,18 +142,6 @@ MemoryPeim ( > BOOLEAN FoundSystemMem; > EFI_STATUS Status; > > - // Get Virtual Memory Map from the Platform Library > - ArmPlatformGetVirtualMemoryMap (&MemoryTable); > - > - // > - // Ensure MemoryTable[0].Length which is size of DRAM has been set > - // by ArmPlatformGetVirtualMemoryMap () > - // > - ASSERT (MemoryTable[0].Length != 0); > - > - // > - // Now, the permanent memory has been installed, we can call AllocatePages() > - // > ResourceAttributes = ( > EFI_RESOURCE_ATTRIBUTE_PRESENT | > EFI_RESOURCE_ATTRIBUTE_INITIALIZED | > @@ -174,8 +157,8 @@ MemoryPeim ( > Status = GetDramRegionsInfo (DramRegions, ARRAY_SIZE (DramRegions)); > ASSERT_EFI_ERROR (Status); > > - FdBase = (UINTN)FixedPcdGet64 (PcdFdBaseAddress); > - FdTop = FdBase + (UINTN)FixedPcdGet32 (PcdFdSize); > + FdBase = (UINTN)PcdGet64 (PcdFdBaseAddress); > + FdTop = FdBase + (UINTN)PcdGet32 (PcdFdSize); > > // Declare memory regions to system > // The DRAM region info is sorted based on the RAM address is SOC memory map. > @@ -228,8 +211,8 @@ MemoryPeim ( > ); > }; > // Mark the memory covering the Firmware Device as boot services data > - BuildMemoryAllocationHob (FixedPcdGet64 (PcdFdBaseAddress), > - FixedPcdGet32 (PcdFdSize), > + BuildMemoryAllocationHob (PcdGet64 (PcdFdBaseAddress), > + PcdGet32 (PcdFdSize), > EfiBootServicesData); > } else { > BuildResourceDescriptorHob ( > @@ -247,17 +230,43 @@ MemoryPeim ( > Size = DramRegions[Index].Size; > > if (FdBase >= BaseAddress && FdTop <= Top) { > - Size -= (UINTN)FixedPcdGet32 (PcdFdSize); > + Size -= (UINTN)PcdGet32 (PcdFdSize); > } > > - if ((UefiMemoryBase >= BaseAddress) && (Size >= UefiMemorySize)) { > + if (Size >= FixedPcdGet32 (PcdSystemMemoryUefiRegionSize)) { > FoundSystemMem = TRUE; > + PcdSet64S (PcdSystemMemoryBase, BaseAddress); > + PcdSet64S (PcdSystemMemorySize, Size); > } > } > > ASSERT (FoundSystemMem == TRUE); > > - // Build Memory Allocation Hob > + return EFI_SUCCESS; > +} > + > +/** > + Initialize MMU > + > + @param[in] UefiMemoryBase Base address of region used by UEFI in > + permanent memory > + @param[in] UefiMemorySize Size of the region used by UEFI in permanent memory > + > + @return EFI_SUCCESS Successfuly Initialize MMU > +**/ > +EFI_STATUS > +EFIAPI > +MemoryPeim ( > + IN EFI_PHYSICAL_ADDRESS UefiMemoryBase, > + IN UINT64 UefiMemorySize > + ) > +{ > + ARM_MEMORY_REGION_DESCRIPTOR *MemoryTable; > + > + // Get Virtual Memory Map from the Platform Library > + ArmPlatformGetVirtualMemoryMap (&MemoryTable); > + > + // Initialize Mmu > InitMmu (MemoryTable); > > if (FeaturePcdGet (PcdPrePiProduceMemoryTypeInformationHob)) { > -- > 2.17.1 >