diff options
author | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-04-26 18:27:15 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-04-26 18:27:15 +0000 |
commit | aa01abaa779cb30614c014a9314fe4f63bba0f88 (patch) | |
tree | 4e35e6edd7f629e6ffba168bf352e265d572ef16 /ArmPlatformPkg/ArmVExpressPkg/Library | |
parent | bf7d7a673b1d18829aa2d638be6f2ce84fb91ead (diff) | |
download | edk2-platforms-aa01abaa779cb30614c014a9314fe4f63bba0f88.tar.xz |
ArmPlatformPkg/ArmPlatformLib: Renamed ArmPlatformInitialize into ArmPlatformSecInitialize
Some platforms require some of their controllers to be initialized in Secure world.
This function make the difference between Secure and Normal world platform initialization.
ArmPlatformPkg/ArmPlatformLib: Introduce ArmPlatformNormalInitialize
Contain the code that initializes platform controllers that would be initialized in Normal World
by PlatformPei.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11591 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/ArmVExpressPkg/Library')
-rw-r--r-- | ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4.c | 41 |
1 files changed, 34 insertions, 7 deletions
diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4.c b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4.c index 490dda1a92..82b4ae14cb 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4.c +++ b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4.c @@ -63,8 +63,12 @@ struct pl341_dmc_config ddr_timings = { @return A non-zero value if Trustzone supported. **/ -UINTN ArmPlatformTrustzoneSupported(VOID) { - return (MmioRead32(ARM_VE_SYS_CFGRW1_REG) & ARM_VE_CFGRW1_TZASC_EN_BIT_MASK); +UINTN +ArmPlatformTrustzoneSupported ( + VOID + ) +{ + return (MmioRead32(ARM_VE_SYS_CFGRW1_REG) & ARM_VE_CFGRW1_TZASC_EN_BIT_MASK); } /** @@ -160,7 +164,11 @@ ArmPlatformGetBootMode ( This function can do nothing if this feature is not relevant to your platform. **/ -VOID ArmPlatformBootRemapping(VOID) { +VOID +ArmPlatformBootRemapping ( + VOID + ) +{ UINT32 val32 = MmioRead32(ARM_VE_SYS_CFGRW1_REG); //Scc - CFGRW1 // we remap the DRAM to 0x0 MmioWrite32(ARM_VE_SYS_CFGRW1_REG, (val32 & 0x0FFFFFFF) | ARM_VE_CFGRW1_REMAP_DRAM); @@ -174,7 +182,7 @@ VOID ArmPlatformBootRemapping(VOID) { **/ VOID -ArmPlatformInitialize ( +ArmPlatformSecInitialize ( VOID ) { // The L2x0 controller must be intialize in Secure World @@ -182,12 +190,31 @@ ArmPlatformInitialize ( } /** + Initialize controllers that must setup in the normal world + + This function is called by the ArmPlatformPkg/Pei or ArmPlatformPkg/Pei/PlatformPeim + in the PEI phase. + +**/ +VOID +ArmPlatformNormalInitialize ( + VOID + ) +{ + // Nothing to do here +} + +/** Initialize the system (or sometimes called permanent) memory This memory is generally represented by the DRAM. **/ -VOID ArmPlatformInitializeSystemMemory(VOID) { - PL341DmcInit(&ddr_timings); - PL301AxiInit(ARM_VE_FAXI_BASE); +VOID +ArmPlatformInitializeSystemMemory ( + VOID + ) +{ + PL341DmcInit(&ddr_timings); + PL301AxiInit(ARM_VE_FAXI_BASE); } |