mirror of https://github.com/acidanthera/audk.git
ArmPlatformPkg: Use fixed PcdTrustzoneSupport to define if Trustzone is enabled for a firmware
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12634 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
d48e4b19ae
commit
d4bec9f955
|
@ -67,29 +67,29 @@ ArmPlatformTrustzoneInit (
|
|||
TZASC_REGION_SIZE_64MB, TZASC_REGION_SECURITY_NSRW);
|
||||
|
||||
// NOR Flash 1. The first half of the NOR Flash1 must be secure for the secure firmware (sec_uefi.bin)
|
||||
#if EDK2_ARMVE_SECURE_SYSTEM
|
||||
//Note: Your OS Kernel must be aware of the secure regions before to enable this region
|
||||
TZASCSetRegion(ARM_VE_TZASC_BASE,2,TZASC_REGION_ENABLED,
|
||||
ARM_VE_SMB_NOR1_BASE + SIZE_32MB,0,
|
||||
TZASC_REGION_SIZE_32MB, TZASC_REGION_SECURITY_NSRW);
|
||||
#else
|
||||
TZASCSetRegion(ARM_VE_TZASC_BASE,2,TZASC_REGION_ENABLED,
|
||||
ARM_VE_SMB_NOR1_BASE,0,
|
||||
TZASC_REGION_SIZE_64MB, TZASC_REGION_SECURITY_NSRW);
|
||||
#endif
|
||||
if (PcdGetBool (PcdTrustzoneSupport) == TRUE) {
|
||||
//Note: Your OS Kernel must be aware of the secure regions before to enable this region
|
||||
TZASCSetRegion(ARM_VE_TZASC_BASE,2,TZASC_REGION_ENABLED,
|
||||
ARM_VE_SMB_NOR1_BASE + SIZE_32MB,0,
|
||||
TZASC_REGION_SIZE_32MB, TZASC_REGION_SECURITY_NSRW);
|
||||
} else {
|
||||
TZASCSetRegion(ARM_VE_TZASC_BASE,2,TZASC_REGION_ENABLED,
|
||||
ARM_VE_SMB_NOR1_BASE,0,
|
||||
TZASC_REGION_SIZE_64MB, TZASC_REGION_SECURITY_NSRW);
|
||||
}
|
||||
|
||||
// Base of SRAM. Only half of SRAM in Non Secure world
|
||||
// First half non secure (16MB) + Second Half secure (16MB) = 32MB of SRAM
|
||||
#if EDK2_ARMVE_SECURE_SYSTEM
|
||||
//Note: Your OS Kernel must be aware of the secure regions before to enable this region
|
||||
TZASCSetRegion(ARM_VE_TZASC_BASE,3,TZASC_REGION_ENABLED,
|
||||
ARM_VE_SMB_SRAM_BASE,0,
|
||||
TZASC_REGION_SIZE_16MB, TZASC_REGION_SECURITY_NSRW);
|
||||
#else
|
||||
TZASCSetRegion(ARM_VE_TZASC_BASE,3,TZASC_REGION_ENABLED,
|
||||
ARM_VE_SMB_SRAM_BASE,0,
|
||||
TZASC_REGION_SIZE_32MB, TZASC_REGION_SECURITY_NSRW);
|
||||
#endif
|
||||
if (PcdGetBool (PcdTrustzoneSupport) == TRUE) {
|
||||
//Note: Your OS Kernel must be aware of the secure regions before to enable this region
|
||||
TZASCSetRegion(ARM_VE_TZASC_BASE,3,TZASC_REGION_ENABLED,
|
||||
ARM_VE_SMB_SRAM_BASE,0,
|
||||
TZASC_REGION_SIZE_16MB, TZASC_REGION_SECURITY_NSRW);
|
||||
} else {
|
||||
TZASCSetRegion(ARM_VE_TZASC_BASE,3,TZASC_REGION_ENABLED,
|
||||
ARM_VE_SMB_SRAM_BASE,0,
|
||||
TZASC_REGION_SIZE_32MB, TZASC_REGION_SECURITY_NSRW);
|
||||
}
|
||||
|
||||
// Memory Mapped Peripherals. All in non secure world
|
||||
TZASCSetRegion(ARM_VE_TZASC_BASE,4,TZASC_REGION_ENABLED,
|
||||
|
|
Loading…
Reference in New Issue