The ConfigureMmu() function is unused - the only call to it is commented out, and the functionality has been moved to InitMmu() in MemoryInitPeiLib.c.
Signed-off-by: Roy Franz <roy.fr...@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.0 --- ArmPkg/Drivers/CpuPei/CpuPei.c | 68 ---------------------------------------- 1 file changed, 68 deletions(-) diff --git a/ArmPkg/Drivers/CpuPei/CpuPei.c b/ArmPkg/Drivers/CpuPei/CpuPei.c index f358cb8..7664741 100755 --- a/ArmPkg/Drivers/CpuPei/CpuPei.c +++ b/ArmPkg/Drivers/CpuPei/CpuPei.c @@ -74,73 +74,6 @@ FindMainMemory ( return EFI_NOT_FOUND; } -VOID -ConfigureMmu ( - VOID - ) -{ - EFI_STATUS Status; - UINTN Idx; - UINT32 CacheAttributes; - UINT32 SystemMemoryBase; - UINT32 SystemMemoryLength; - UINT32 SystemMemoryLastAddress; - ARM_MEMORY_REGION_DESCRIPTOR MemoryTable[4]; - VOID *TranslationTableBase; - UINTN TranslationTableSize; - - if (FeaturePcdGet(PcdCacheEnable) == TRUE) { - CacheAttributes = DDR_ATTRIBUTES_CACHED; - } else { - CacheAttributes = DDR_ATTRIBUTES_UNCACHED; - } - - Idx = 0; - - // Main Memory - Status = FindMainMemory (&SystemMemoryBase, &SystemMemoryLength); - ASSERT_EFI_ERROR (Status); - - SystemMemoryLastAddress = SystemMemoryBase + (SystemMemoryLength-1); - - // If system memory does not begin at 0 - if(SystemMemoryBase > 0) { - MemoryTable[Idx].PhysicalBase = 0; - MemoryTable[Idx].VirtualBase = 0; - MemoryTable[Idx].Length = SystemMemoryBase; - MemoryTable[Idx].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE; - Idx++; - } - - MemoryTable[Idx].PhysicalBase = SystemMemoryBase; - MemoryTable[Idx].VirtualBase = SystemMemoryBase; - MemoryTable[Idx].Length = SystemMemoryLength; - MemoryTable[Idx].Attributes = (ARM_MEMORY_REGION_ATTRIBUTES)CacheAttributes; - Idx++; - - // If system memory does not go to the last address (0xFFFFFFFF) - if( SystemMemoryLastAddress < MAX_ADDRESS ) { - MemoryTable[Idx].PhysicalBase = SystemMemoryLastAddress + 1; - MemoryTable[Idx].VirtualBase = MemoryTable[Idx].PhysicalBase; - MemoryTable[Idx].Length = MAX_ADDRESS - MemoryTable[Idx].PhysicalBase + 1; - MemoryTable[Idx].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE; - Idx++; - } - - // End of Table - MemoryTable[Idx].PhysicalBase = 0; - MemoryTable[Idx].VirtualBase = 0; - MemoryTable[Idx].Length = 0; - MemoryTable[Idx].Attributes = (ARM_MEMORY_REGION_ATTRIBUTES)0; - - DEBUG ((EFI_D_INFO, "Enabling MMU, setting 0x%08x + %d MB to %a\n", - SystemMemoryBase, SystemMemoryLength/1024/1024, - (CacheAttributes == DDR_ATTRIBUTES_CACHED) ? "cacheable" : "uncacheable")); - - ArmConfigureMmu (MemoryTable, &TranslationTableBase, &TranslationTableSize); - - BuildMemoryAllocationHob((EFI_PHYSICAL_ADDRESS)(UINTN)TranslationTableBase, TranslationTableSize, EfiBootServicesData); -} /*++ @@ -176,7 +109,6 @@ InitializeCpuPeim ( // Publish the CPU memory and io spaces sizes BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize)); - //ConfigureMmu(); // Only MP Core platform need to produce gArmMpCoreInfoPpiGuid Status = PeiServicesLocatePpi (&gArmMpCoreInfoPpiGuid, 0, NULL, (VOID**)&ArmMpCoreInfoPpi); -- 1.7.10.4 ------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel