Message ID | CAJ9HRaaq28Zo9YX+cE18gvEwTFTA-MeommcKsHc5BabposZi0w@mail.gmail.com |
---|---|
State | Accepted |
Headers | show |
On Tue, Jul 24, 2012 at 2:36 PM, Rony Nandy <rony.nandy@linaro.org> wrote: > Forward ported to the latest edk2 code to build with it and > work on the Origen Board. > Signed-off-by:rony.nandy@linaro.org > Signed-off-by:aditya.ps@samsung.com > > --- > .../OrigenBoardPkg/OrigenBoardPkg-Exynos.dsc | 9 ++++++--- > .../OrigenBoardPkg/OrigenBoardPkg-Exynos.fdf | 2 +- > .../SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoard.c | 10 ++++++++++ > .../Library/SmdkBoardLib/SmdkBoardHelper.S | 5 +++++ > .../Library/SmdkBoardLib/SmdkBoardLib.inf | 2 +- > .../Library/SmdkBoardLib/SmdkBoardSec.c | 15 +++++++++++++++ > .../Library/SmdkBoardLib/SmdkBoardSecLib.inf | 2 +- > 7 files changed, 39 insertions(+), 6 deletions(-) > > diff --git a/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.dsc > b/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.dsc > index 1a7be99..bfe690b 100644 > --- a/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.dsc > +++ b/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.dsc > @@ -37,6 +37,7 @@ > !endif > ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.inf > ArmPlatformLib|SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardLib.inf > + ArmPlatformSecLib|SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf\ added this inf multiple times > ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexA9Lib/ArmCortexA9Lib.inf > BaseLib|MdePkg/Library/BaseLib/BaseLib.inf > BaseMemoryLib|ArmPkg/Library/BaseMemoryLibStm/BaseMemoryLibStm.inf > @@ -47,6 +48,7 @@ > PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf > PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf > PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf > + CpuExceptionHandlerLib|MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.inf > > # > # Uncomment (and comment out the next line) For RealView Debugger. > The Standard IO window > @@ -98,10 +100,10 @@ > > [LibraryClasses.common.SEC] > ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7LibSec.inf > - ArmGicSecLib|ArmPkg/Drivers/PL390Gic/PL390GicSecLib.inf > - ArmGicLib|ArmPkg/Drivers/PL390Gic/PL390GicLib.inf > + ArmTrustedMonitorLib|ArmPlatformPkg/Library/ArmTrustedMonitorLibNull/ArmTrustedMonitorLibNull.inf > + ArmGicLib|ArmPkg/Drivers/PL390Gic/PL390GicSecLib.inf why SecLib.inf is considered for ArmGicLib. Ithink it should be ArmGicSecLib > ArmPlatformGlobalVariableLib|ArmPlatformPkg/Library/ArmPlatformGlobalVariableLib/Sec/SecArmPlatformGlobalVariableLib.inf > - ArmPlatformLib|SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf > + ArmPlatformSecLib|SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf this library is added in general lib class. remove from one place > BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf > PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf > # L2 Cache Driver > @@ -300,6 +302,7 @@ > gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x01000000 > # Stacks for MPCores in Secure World > gArmPlatformTokenSpaceGuid.PcdCPUCoresSecStackBase|0x4B000000 # Top > of SEC Stack for Secure World > + gArmPlatformTokenSpaceGuid.PcdSecGlobalVariableSize|0x100 > > # Stacks for MPCores in Monitor Mode > gArmPlatformTokenSpaceGuid.PcdCPUCoresSecMonStackBase|0x4A000000 # > Top of SEC Stack for Monitor World > diff --git a/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.fdf > b/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.fdf > index 37d5a48..7b8d05f 100644 > --- a/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.fdf > +++ b/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.fdf > @@ -50,7 +50,7 @@ NumBlocks = 0x20 > ################################################################################ > > 0x0000000|0x00010000 > -gArmTokenSpaceGuid.PcdSecureFvBaseAddress|gArmTokenSpaceGuid.PcdSecureFvBaseSize > +gArmTokenSpaceGuid.PcdSecureFvBaseAddress|gArmTokenSpaceGuid.PcdSecureFvSize > FV = FVMAIN_SEC > > 0x00010000|0x00100000 > diff --git a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoard.c > b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoard.c > index e036a6c..2f734f6 100644 > --- a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoard.c > +++ b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoard.c > @@ -149,6 +149,16 @@ ArmPlatformGetBootMode ( > VOID ArmPlatformInitializeSystemMemory(VOID) { > // We do not need to initialize the System Memory on RTSM > } > + > +RETURN_STATUS > +ArmPlatformInitialize ( > + IN UINTN MpId > + ) > +{ > +return RETURN_SUCCESS; > +} > + > + > VOID > ArmPlatformNormalInitialize ( > VOID > diff --git a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardHelper.S > b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardHelper.S > index b1af424..9dc7abd 100644 > --- a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardHelper.S > +++ b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardHelper.S > @@ -27,6 +27,7 @@ GCC_ASM_EXPORT(ArmPlatformIsClockInitialized) > GCC_ASM_EXPORT(ArmPlatformIsMemoryInitialized) > GCC_ASM_EXPORT(ArmPlatformInitializeBootMemory) > GCC_ASM_EXPORT(ArmPlatformSecBootAction) > +GCC_ASM_EXPORT(ArmPlatformSecBootMemoryInit) > > ASM_PFX(ArmPlatformTZPCInitialized): > ldr r0, =Exynos4210_TZPC0_BASE > @@ -343,6 +344,10 @@ cmu_11: > ASM_PFX(ArmPlatformSecBootAction): > bx lr > > + > +ASM_PFX(ArmPlatformSecBootMemoryInit): > + bx lr > + > /* > * Called at the early stage of the Boot phase to know if the memory has > * already been initialized. Running the code from the reset vector does > diff --git a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardLib.inf > b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardLib.inf > index 5845fa7..0ef5c88 100644 > --- a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardLib.inf > +++ b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardLib.inf > @@ -30,7 +30,7 @@ > [LibraryClasses] > IoLib > ArmLib > - MemoryAllocationLib > + > > [Sources.common] > SmdkBoard.c > diff --git a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSec.c > b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSec.c > index bc29531..93c6645 100644 > --- a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSec.c > +++ b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSec.c > @@ -40,3 +40,18 @@ ArmPlatformSecInitialize ( > FALSE); > > } > + > +/** > + Initialize the Secure peripherals and memory regions > + > + If Trustzone is supported by your platform then this function makes > the required initialization > + of the secure peripherals and memory regions. > + > +**/ > +VOID > +ArmPlatformSecTrustzoneInit ( > + IN UINTN MpId > + ) > +{ > + ASSERT(FALSE); > +} > diff --git a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf > b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf > index cf77657..f8f7228 100644 > --- a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf > +++ b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf > @@ -36,7 +36,7 @@ > SmdkBoard.c > SmdkBoardSec.c > SmdkBoardHelper.asm | RVCT > - SmdkBoardHelper.S | GCC | ARMGCC > + SmdkBoardHelper.S | GCC > > [Protocols] > > -- > 1.7.5.4 > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/edk2-devel
Thanks. pushed to OrigenPlatform-Next branch On 31 July 2012 14:08, Girish KS <girishks2000@gmail.com> wrote: > On Tue, Jul 24, 2012 at 2:36 PM, Rony Nandy <rony.nandy@linaro.org> wrote: >> Forward ported to the latest edk2 code to build with it and >> work on the Origen Board. >> Signed-off-by:rony.nandy@linaro.org >> Signed-off-by:aditya.ps@samsung.com >> >> --- >> .../OrigenBoardPkg/OrigenBoardPkg-Exynos.dsc | 9 ++++++--- >> .../OrigenBoardPkg/OrigenBoardPkg-Exynos.fdf | 2 +- >> .../SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoard.c | 10 ++++++++++ >> .../Library/SmdkBoardLib/SmdkBoardHelper.S | 5 +++++ >> .../Library/SmdkBoardLib/SmdkBoardLib.inf | 2 +- >> .../Library/SmdkBoardLib/SmdkBoardSec.c | 15 +++++++++++++++ >> .../Library/SmdkBoardLib/SmdkBoardSecLib.inf | 2 +- >> 7 files changed, 39 insertions(+), 6 deletions(-) >> >> diff --git a/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.dsc >> b/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.dsc >> index 1a7be99..bfe690b 100644 >> --- a/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.dsc >> +++ b/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.dsc >> @@ -37,6 +37,7 @@ >> !endif >> ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.inf >> ArmPlatformLib|SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardLib.inf >> + ArmPlatformSecLib|SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf\ > added this inf multiple times >> ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexA9Lib/ArmCortexA9Lib.inf >> BaseLib|MdePkg/Library/BaseLib/BaseLib.inf >> BaseMemoryLib|ArmPkg/Library/BaseMemoryLibStm/BaseMemoryLibStm.inf >> @@ -47,6 +48,7 @@ >> PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf >> PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf >> PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf >> + CpuExceptionHandlerLib|MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.inf >> >> # >> # Uncomment (and comment out the next line) For RealView Debugger. >> The Standard IO window >> @@ -98,10 +100,10 @@ >> >> [LibraryClasses.common.SEC] >> ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7LibSec.inf >> - ArmGicSecLib|ArmPkg/Drivers/PL390Gic/PL390GicSecLib.inf >> - ArmGicLib|ArmPkg/Drivers/PL390Gic/PL390GicLib.inf >> + ArmTrustedMonitorLib|ArmPlatformPkg/Library/ArmTrustedMonitorLibNull/ArmTrustedMonitorLibNull.inf >> + ArmGicLib|ArmPkg/Drivers/PL390Gic/PL390GicSecLib.inf > why SecLib.inf is considered for ArmGicLib. Ithink it should be ArmGicSecLib >> ArmPlatformGlobalVariableLib|ArmPlatformPkg/Library/ArmPlatformGlobalVariableLib/Sec/SecArmPlatformGlobalVariableLib.inf >> - ArmPlatformLib|SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf >> + ArmPlatformSecLib|SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf > this library is added in general lib class. remove from one place >> BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf >> PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf >> # L2 Cache Driver >> @@ -300,6 +302,7 @@ >> gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x01000000 >> # Stacks for MPCores in Secure World >> gArmPlatformTokenSpaceGuid.PcdCPUCoresSecStackBase|0x4B000000 # Top >> of SEC Stack for Secure World >> + gArmPlatformTokenSpaceGuid.PcdSecGlobalVariableSize|0x100 >> >> # Stacks for MPCores in Monitor Mode >> gArmPlatformTokenSpaceGuid.PcdCPUCoresSecMonStackBase|0x4A000000 # >> Top of SEC Stack for Monitor World >> diff --git a/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.fdf >> b/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.fdf >> index 37d5a48..7b8d05f 100644 >> --- a/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.fdf >> +++ b/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.fdf >> @@ -50,7 +50,7 @@ NumBlocks = 0x20 >> ################################################################################ >> >> 0x0000000|0x00010000 >> -gArmTokenSpaceGuid.PcdSecureFvBaseAddress|gArmTokenSpaceGuid.PcdSecureFvBaseSize >> +gArmTokenSpaceGuid.PcdSecureFvBaseAddress|gArmTokenSpaceGuid.PcdSecureFvSize >> FV = FVMAIN_SEC >> >> 0x00010000|0x00100000 >> diff --git a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoard.c >> b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoard.c >> index e036a6c..2f734f6 100644 >> --- a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoard.c >> +++ b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoard.c >> @@ -149,6 +149,16 @@ ArmPlatformGetBootMode ( >> VOID ArmPlatformInitializeSystemMemory(VOID) { >> // We do not need to initialize the System Memory on RTSM >> } >> + >> +RETURN_STATUS >> +ArmPlatformInitialize ( >> + IN UINTN MpId >> + ) >> +{ >> +return RETURN_SUCCESS; >> +} >> + >> + >> VOID >> ArmPlatformNormalInitialize ( >> VOID >> diff --git a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardHelper.S >> b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardHelper.S >> index b1af424..9dc7abd 100644 >> --- a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardHelper.S >> +++ b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardHelper.S >> @@ -27,6 +27,7 @@ GCC_ASM_EXPORT(ArmPlatformIsClockInitialized) >> GCC_ASM_EXPORT(ArmPlatformIsMemoryInitialized) >> GCC_ASM_EXPORT(ArmPlatformInitializeBootMemory) >> GCC_ASM_EXPORT(ArmPlatformSecBootAction) >> +GCC_ASM_EXPORT(ArmPlatformSecBootMemoryInit) >> >> ASM_PFX(ArmPlatformTZPCInitialized): >> ldr r0, =Exynos4210_TZPC0_BASE >> @@ -343,6 +344,10 @@ cmu_11: >> ASM_PFX(ArmPlatformSecBootAction): >> bx lr >> >> + >> +ASM_PFX(ArmPlatformSecBootMemoryInit): >> + bx lr >> + >> /* >> * Called at the early stage of the Boot phase to know if the memory has >> * already been initialized. Running the code from the reset vector does >> diff --git a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardLib.inf >> b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardLib.inf >> index 5845fa7..0ef5c88 100644 >> --- a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardLib.inf >> +++ b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardLib.inf >> @@ -30,7 +30,7 @@ >> [LibraryClasses] >> IoLib >> ArmLib >> - MemoryAllocationLib >> + >> >> [Sources.common] >> SmdkBoard.c >> diff --git a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSec.c >> b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSec.c >> index bc29531..93c6645 100644 >> --- a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSec.c >> +++ b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSec.c >> @@ -40,3 +40,18 @@ ArmPlatformSecInitialize ( >> FALSE); >> >> } >> + >> +/** >> + Initialize the Secure peripherals and memory regions >> + >> + If Trustzone is supported by your platform then this function makes >> the required initialization >> + of the secure peripherals and memory regions. >> + >> +**/ >> +VOID >> +ArmPlatformSecTrustzoneInit ( >> + IN UINTN MpId >> + ) >> +{ >> + ASSERT(FALSE); >> +} >> diff --git a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf >> b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf >> index cf77657..f8f7228 100644 >> --- a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf >> +++ b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf >> @@ -36,7 +36,7 @@ >> SmdkBoard.c >> SmdkBoardSec.c >> SmdkBoardHelper.asm | RVCT >> - SmdkBoardHelper.S | GCC | ARMGCC >> + SmdkBoardHelper.S | GCC >> >> [Protocols] >> >> -- >> 1.7.5.4 >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> edk2-devel mailing list >> edk2-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/edk2-devel
Thanks pushed to OrigenPlatfor-Next On Tue, Jul 31, 2012 at 2:08 PM, Girish KS <girishks2000@gmail.com> wrote: > On Tue, Jul 24, 2012 at 2:36 PM, Rony Nandy <rony.nandy@linaro.org> wrote: >> Forward ported to the latest edk2 code to build with it and >> work on the Origen Board. >> Signed-off-by:rony.nandy@linaro.org >> Signed-off-by:aditya.ps@samsung.com >> >> --- >> .../OrigenBoardPkg/OrigenBoardPkg-Exynos.dsc | 9 ++++++--- >> .../OrigenBoardPkg/OrigenBoardPkg-Exynos.fdf | 2 +- >> .../SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoard.c | 10 ++++++++++ >> .../Library/SmdkBoardLib/SmdkBoardHelper.S | 5 +++++ >> .../Library/SmdkBoardLib/SmdkBoardLib.inf | 2 +- >> .../Library/SmdkBoardLib/SmdkBoardSec.c | 15 +++++++++++++++ >> .../Library/SmdkBoardLib/SmdkBoardSecLib.inf | 2 +- >> 7 files changed, 39 insertions(+), 6 deletions(-) >> >> diff --git a/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.dsc >> b/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.dsc >> index 1a7be99..bfe690b 100644 >> --- a/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.dsc >> +++ b/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.dsc >> @@ -37,6 +37,7 @@ >> !endif >> ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.inf >> ArmPlatformLib|SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardLib.inf >> + ArmPlatformSecLib|SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf\ > added this inf multiple times >> ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexA9Lib/ArmCortexA9Lib.inf >> BaseLib|MdePkg/Library/BaseLib/BaseLib.inf >> BaseMemoryLib|ArmPkg/Library/BaseMemoryLibStm/BaseMemoryLibStm.inf >> @@ -47,6 +48,7 @@ >> PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf >> PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf >> PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf >> + CpuExceptionHandlerLib|MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.inf >> >> # >> # Uncomment (and comment out the next line) For RealView Debugger. >> The Standard IO window >> @@ -98,10 +100,10 @@ >> >> [LibraryClasses.common.SEC] >> ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7LibSec.inf >> - ArmGicSecLib|ArmPkg/Drivers/PL390Gic/PL390GicSecLib.inf >> - ArmGicLib|ArmPkg/Drivers/PL390Gic/PL390GicLib.inf >> + ArmTrustedMonitorLib|ArmPlatformPkg/Library/ArmTrustedMonitorLibNull/ArmTrustedMonitorLibNull.inf >> + ArmGicLib|ArmPkg/Drivers/PL390Gic/PL390GicSecLib.inf > why SecLib.inf is considered for ArmGicLib. Ithink it should be ArmGicSecLib >> ArmPlatformGlobalVariableLib|ArmPlatformPkg/Library/ArmPlatformGlobalVariableLib/Sec/SecArmPlatformGlobalVariableLib.inf >> - ArmPlatformLib|SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf >> + ArmPlatformSecLib|SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf > this library is added in general lib class. remove from one place >> BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf >> PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf >> # L2 Cache Driver >> @@ -300,6 +302,7 @@ >> gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x01000000 >> # Stacks for MPCores in Secure World >> gArmPlatformTokenSpaceGuid.PcdCPUCoresSecStackBase|0x4B000000 # Top >> of SEC Stack for Secure World >> + gArmPlatformTokenSpaceGuid.PcdSecGlobalVariableSize|0x100 >> >> # Stacks for MPCores in Monitor Mode >> gArmPlatformTokenSpaceGuid.PcdCPUCoresSecMonStackBase|0x4A000000 # >> Top of SEC Stack for Monitor World >> diff --git a/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.fdf >> b/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.fdf >> index 37d5a48..7b8d05f 100644 >> --- a/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.fdf >> +++ b/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.fdf >> @@ -50,7 +50,7 @@ NumBlocks = 0x20 >> ################################################################################ >> >> 0x0000000|0x00010000 >> -gArmTokenSpaceGuid.PcdSecureFvBaseAddress|gArmTokenSpaceGuid.PcdSecureFvBaseSize >> +gArmTokenSpaceGuid.PcdSecureFvBaseAddress|gArmTokenSpaceGuid.PcdSecureFvSize >> FV = FVMAIN_SEC >> >> 0x00010000|0x00100000 >> diff --git a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoard.c >> b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoard.c >> index e036a6c..2f734f6 100644 >> --- a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoard.c >> +++ b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoard.c >> @@ -149,6 +149,16 @@ ArmPlatformGetBootMode ( >> VOID ArmPlatformInitializeSystemMemory(VOID) { >> // We do not need to initialize the System Memory on RTSM >> } >> + >> +RETURN_STATUS >> +ArmPlatformInitialize ( >> + IN UINTN MpId >> + ) >> +{ >> +return RETURN_SUCCESS; >> +} >> + >> + >> VOID >> ArmPlatformNormalInitialize ( >> VOID >> diff --git a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardHelper.S >> b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardHelper.S >> index b1af424..9dc7abd 100644 >> --- a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardHelper.S >> +++ b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardHelper.S >> @@ -27,6 +27,7 @@ GCC_ASM_EXPORT(ArmPlatformIsClockInitialized) >> GCC_ASM_EXPORT(ArmPlatformIsMemoryInitialized) >> GCC_ASM_EXPORT(ArmPlatformInitializeBootMemory) >> GCC_ASM_EXPORT(ArmPlatformSecBootAction) >> +GCC_ASM_EXPORT(ArmPlatformSecBootMemoryInit) >> >> ASM_PFX(ArmPlatformTZPCInitialized): >> ldr r0, =Exynos4210_TZPC0_BASE >> @@ -343,6 +344,10 @@ cmu_11: >> ASM_PFX(ArmPlatformSecBootAction): >> bx lr >> >> + >> +ASM_PFX(ArmPlatformSecBootMemoryInit): >> + bx lr >> + >> /* >> * Called at the early stage of the Boot phase to know if the memory has >> * already been initialized. Running the code from the reset vector does >> diff --git a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardLib.inf >> b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardLib.inf >> index 5845fa7..0ef5c88 100644 >> --- a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardLib.inf >> +++ b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardLib.inf >> @@ -30,7 +30,7 @@ >> [LibraryClasses] >> IoLib >> ArmLib >> - MemoryAllocationLib >> + >> >> [Sources.common] >> SmdkBoard.c >> diff --git a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSec.c >> b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSec.c >> index bc29531..93c6645 100644 >> --- a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSec.c >> +++ b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSec.c >> @@ -40,3 +40,18 @@ ArmPlatformSecInitialize ( >> FALSE); >> >> } >> + >> +/** >> + Initialize the Secure peripherals and memory regions >> + >> + If Trustzone is supported by your platform then this function makes >> the required initialization >> + of the secure peripherals and memory regions. >> + >> +**/ >> +VOID >> +ArmPlatformSecTrustzoneInit ( >> + IN UINTN MpId >> + ) >> +{ >> + ASSERT(FALSE); >> +} >> diff --git a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf >> b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf >> index cf77657..f8f7228 100644 >> --- a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf >> +++ b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf >> @@ -36,7 +36,7 @@ >> SmdkBoard.c >> SmdkBoardSec.c >> SmdkBoardHelper.asm | RVCT >> - SmdkBoardHelper.S | GCC | ARMGCC >> + SmdkBoardHelper.S | GCC >> >> [Protocols] >> >> -- >> 1.7.5.4 >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> edk2-devel mailing list >> edk2-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/edk2-devel
diff --git a/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.dsc b/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.dsc index 1a7be99..bfe690b 100644 --- a/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.dsc +++ b/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.dsc @@ -37,6 +37,7 @@ !endif ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.inf ArmPlatformLib|SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardLib.inf + ArmPlatformSecLib|SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexA9Lib/ArmCortexA9Lib.inf BaseLib|MdePkg/Library/BaseLib/BaseLib.inf BaseMemoryLib|ArmPkg/Library/BaseMemoryLibStm/BaseMemoryLibStm.inf @@ -47,6 +48,7 @@ PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf + CpuExceptionHandlerLib|MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.inf # # Uncomment (and comment out the next line) For RealView Debugger. The Standard IO window @@ -98,10 +100,10 @@ [LibraryClasses.common.SEC] ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7LibSec.inf - ArmGicSecLib|ArmPkg/Drivers/PL390Gic/PL390GicSecLib.inf - ArmGicLib|ArmPkg/Drivers/PL390Gic/PL390GicLib.inf + ArmTrustedMonitorLib|ArmPlatformPkg/Library/ArmTrustedMonitorLibNull/ArmTrustedMonitorLibNull.inf + ArmGicLib|ArmPkg/Drivers/PL390Gic/PL390GicSecLib.inf ArmPlatformGlobalVariableLib|ArmPlatformPkg/Library/ArmPlatformGlobalVariableLib/Sec/SecArmPlatformGlobalVariableLib.inf - ArmPlatformLib|SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf + ArmPlatformSecLib|SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf # L2 Cache Driver @@ -300,6 +302,7 @@ gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x01000000 # Stacks for MPCores in Secure World gArmPlatformTokenSpaceGuid.PcdCPUCoresSecStackBase|0x4B000000 # Top of SEC Stack for Secure World + gArmPlatformTokenSpaceGuid.PcdSecGlobalVariableSize|0x100 # Stacks for MPCores in Monitor Mode gArmPlatformTokenSpaceGuid.PcdCPUCoresSecMonStackBase|0x4A000000 # Top of SEC Stack for Monitor World diff --git a/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.fdf b/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.fdf index 37d5a48..7b8d05f 100644 --- a/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.fdf +++ b/SamsungPlatformPkg/OrigenBoardPkg/OrigenBoardPkg-Exynos.fdf @@ -50,7 +50,7 @@ NumBlocks = 0x20 ################################################################################ 0x0000000|0x00010000 -gArmTokenSpaceGuid.PcdSecureFvBaseAddress|gArmTokenSpaceGuid.PcdSecureFvBaseSize +gArmTokenSpaceGuid.PcdSecureFvBaseAddress|gArmTokenSpaceGuid.PcdSecureFvSize FV = FVMAIN_SEC 0x00010000|0x00100000 diff --git a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoard.c b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoard.c index e036a6c..2f734f6 100644 --- a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoard.c +++ b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoard.c @@ -149,6 +149,16 @@ ArmPlatformGetBootMode ( VOID ArmPlatformInitializeSystemMemory(VOID) { // We do not need to initialize the System Memory on RTSM } + +RETURN_STATUS +ArmPlatformInitialize ( + IN UINTN MpId + ) +{ +return RETURN_SUCCESS; +} + + VOID ArmPlatformNormalInitialize ( VOID diff --git a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardHelper.S b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardHelper.S index b1af424..9dc7abd 100644 --- a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardHelper.S +++ b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardHelper.S @@ -27,6 +27,7 @@ GCC_ASM_EXPORT(ArmPlatformIsClockInitialized) GCC_ASM_EXPORT(ArmPlatformIsMemoryInitialized) GCC_ASM_EXPORT(ArmPlatformInitializeBootMemory) GCC_ASM_EXPORT(ArmPlatformSecBootAction) +GCC_ASM_EXPORT(ArmPlatformSecBootMemoryInit) ASM_PFX(ArmPlatformTZPCInitialized): ldr r0, =Exynos4210_TZPC0_BASE @@ -343,6 +344,10 @@ cmu_11: ASM_PFX(ArmPlatformSecBootAction): bx lr + +ASM_PFX(ArmPlatformSecBootMemoryInit): + bx lr + /* * Called at the early stage of the Boot phase to know if the memory has * already been initialized. Running the code from the reset vector does diff --git a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardLib.inf b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardLib.inf index 5845fa7..0ef5c88 100644 --- a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardLib.inf +++ b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardLib.inf @@ -30,7 +30,7 @@ [LibraryClasses] IoLib ArmLib - MemoryAllocationLib + [Sources.common] SmdkBoard.c diff --git a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSec.c b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSec.c index bc29531..93c6645 100644 --- a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSec.c +++ b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSec.c @@ -40,3 +40,18 @@ ArmPlatformSecInitialize ( FALSE); } + +/** + Initialize the Secure peripherals and memory regions + + If Trustzone is supported by your platform then this function makes the required initialization + of the secure peripherals and memory regions. + +**/ +VOID +ArmPlatformSecTrustzoneInit ( + IN UINTN MpId + ) +{ + ASSERT(FALSE); +} diff --git a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf index cf77657..f8f7228 100644 --- a/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf +++ b/SamsungPlatformPkg/SmdkBoardPkg/Library/SmdkBoardLib/SmdkBoardSecLib.inf @@ -36,7 +36,7 @@ SmdkBoard.c SmdkBoardSec.c SmdkBoardHelper.asm | RVCT - SmdkBoardHelper.S | GCC | ARMGCC + SmdkBoardHelper.S | GCC [Protocols]