diff --git a/ArmPkg/Include/IndustryStandard/ArmTrustZoneSmc.h b/ArmPkg/Include/IndustryStandard/ArmTrustZoneSmc.h index 62f8f61a7e..71b4327ebf 100644 --- a/ArmPkg/Include/IndustryStandard/ArmTrustZoneSmc.h +++ b/ArmPkg/Include/IndustryStandard/ArmTrustZoneSmc.h @@ -18,6 +18,8 @@ #define ARM_TRUSTZONE_UID_4LETTERID 0x1 #define ARM_TRUSTZONE_UID_MD5 0x2 +#define ARM_TRUSTZONE_ARM_UID 0x40524d48 // "ARMH" + #define IS_ARM_TRUSTZONE_SUPPORTED_SMC(Rx,Region) (((UINTN)(Rx) >= (UINTN)ARM_TRUSTZONE_##Region##_SMC_ID_START) && ((UINTN)(Rx) <= (UINTN)ARM_TRUSTZONE_##Region##_SMC_ID_END)) #define IS_ARM_TRUSTZONE_DEPRECIATED_SMC(Rx) ((UINTN)(Rx) <= (UINTN)ARM_TRUSTZONE_DEPRECIATED_SMC_ID_END) diff --git a/ArmPkg/Library/BdsLib/BdsLinuxFdt.c b/ArmPkg/Library/BdsLib/BdsLinuxFdt.c index b5dd237136..7bfb2cd628 100644 --- a/ArmPkg/Library/BdsLib/BdsLinuxFdt.c +++ b/ArmPkg/Library/BdsLib/BdsLinuxFdt.c @@ -260,8 +260,7 @@ PrepareFdt ( if (Rx == ARM_TRUSTZONE_UID_4LETTERID) { Rx = ARM_SMC_ID_UID + 1; ArmCallSmc (&Rx); - //TODO: Replace ARM magic number - if (Rx == 0x40524d48) { + if (Rx == ARM_TRUSTZONE_ARM_UID) { PsciSmcSupported = TRUE; } }