From 8d0fe26cbf66739ba80f7d2fc6acb683cecbf68f Mon Sep 17 00:00:00 2001 From: oliviermartin Date: Tue, 1 Nov 2011 23:36:59 +0000 Subject: ArmPlatformPkg: Remove ArmPlatformBootRemapping() function from the ArmPlatformLib Memory map remapping is a platform specific feature only enabled by some platforms. Instead of keeping this function empty for most platforms, the function has been removed. This feature can easily fit in any other ArmPlatformLib function. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12632 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Library/ArmVExpressLibCTA9x4/CTA9x4.c | 34 +++++++--------------- .../Library/ArmVExpressLibRTSM/RTSM.c | 19 ++---------- 2 files changed, 13 insertions(+), 40 deletions(-) (limited to 'ArmPlatformPkg/ArmVExpressPkg/Library') diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4.c b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4.c index 67731ad4b..f88779600 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4.c +++ b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4.c @@ -125,29 +125,6 @@ ArmPlatformGetBootMode ( } } -/** - Remap the memory at 0x0 - - Some platform requires or gives the ability to remap the memory at the address 0x0. - This function can do nothing if this feature is not relevant to your platform. - -**/ -VOID -ArmPlatformBootRemapping ( - VOID - ) -{ - UINT32 Value; - - if (FeaturePcdGet(PcdNorFlashRemapping)) { - SerialPrint ("Secure ROM at 0x0\n\r"); - } else { - Value = MmioRead32(ARM_VE_SYS_CFGRW1_REG); //Scc - CFGRW1 - // Remap the DRAM to 0x0 - MmioWrite32(ARM_VE_SYS_CFGRW1_REG, (Value & 0x0FFFFFFF) | ARM_VE_CFGRW1_REMAP_DRAM); - } -} - /** Initialize controllers that must setup in the normal world @@ -181,6 +158,17 @@ ArmPlatformInitializeSystemMemory ( VOID ) { + UINT32 Value; + + // Memory Map remapping + if (FeaturePcdGet(PcdNorFlashRemapping)) { + SerialPrint ("Secure ROM at 0x0\n\r"); + } else { + Value = MmioRead32(ARM_VE_SYS_CFGRW1_REG); //Scc - CFGRW1 + // Remap the DRAM to 0x0 + MmioWrite32(ARM_VE_SYS_CFGRW1_REG, (Value & 0x0FFFFFFF) | ARM_VE_CFGRW1_REMAP_DRAM); + } + PL341DmcInit(ARM_VE_DMC_BASE, &DDRTimings); PL301AxiInit(ARM_VE_FAXI_BASE); } diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c index a8674acf7..8aeedda92 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c +++ b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c @@ -87,22 +87,6 @@ ArmPlatformGetBootMode ( return BOOT_WITH_FULL_CONFIGURATION; } -/** - Remap the memory at 0x0 - - Some platform requires or gives the ability to remap the memory at the address 0x0. - This function can do nothing if this feature is not relevant to your platform. - -**/ -VOID -ArmPlatformBootRemapping ( - VOID - ) -{ - // Disable memory remapping and return to normal mapping - MmioOr32 (SP810_CTRL_BASE, BIT8); -} - /** Initialize controllers that must setup in the normal world @@ -115,7 +99,8 @@ ArmPlatformNormalInitialize ( VOID ) { - // Nothing to do here + // Disable memory remapping and return to normal mapping + MmioOr32 (SP810_CTRL_BASE, BIT8); } /** -- cgit v1.2.3