]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Sec.c
ArmPlatformPkg: Replaced 'ArmPlatformTrustzoneSupported' by the fixed Pcd gArmTokenSp...
[mirror_edk2.git] / ArmPlatformPkg / ArmVExpressPkg / Library / ArmVExpressLibCTA9x4 / CTA9x4Sec.c
index 2ac64a0160b24f1eb30140747791baf78382ce4b..3641017e9c1a084086a26f9c3f17f9a29fb6aab3 100644 (file)
@@ -21,6 +21,8 @@
 
 #include <Drivers/PL310L2Cache.h>
 
+#include <ArmPlatform.h>
+
 /**
   Initialize the Secure peripherals and memory regions
 
@@ -37,6 +39,12 @@ ArmPlatformTrustzoneInit (
   // Setup TZ Protection Controller
   //
 
+  if (MmioRead32(ARM_VE_SYS_CFGRW1_REG) & ARM_VE_CFGRW1_TZASC_EN_BIT_MASK) {
+    ASSERT (PcdGetBool (PcdTrustzoneSupport) == TRUE);
+  } else {
+    ASSERT (PcdGetBool (PcdTrustzoneSupport) == FALSE);
+  }
+
   // Set Non Secure access for all devices
   TZPCSetDecProtBits(ARM_VE_TZPC_BASE, TZPC_DECPROT_0, 0xFFFFFFFF);
   TZPCSetDecProtBits(ARM_VE_TZPC_BASE, TZPC_DECPROT_1, 0xFFFFFFFF);