summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2013-04-14 09:30:46 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2013-04-14 09:30:46 +0000
commit1a7b6d9ea296102dc42baa3278bc3f17448ac957 (patch)
treedcef64abacc12157ec73b59bb76702f958acbf4a
parent16bb89c9801348cb3689b876442dd6bd81debd8a (diff)
downloadedk2-platforms-1a7b6d9ea296102dc42baa3278bc3f17448ac957.tar.xz
ArmPkg/BdsLib: Replace ARM magic value by a proper defined value.
"ARMH" is the Four-Letter unique identifier used by ARM in the context of the fast SMC identification interface. This patch properly defines this value in a header file instead of using the numeric value directly in the code. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14268 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--ArmPkg/Include/IndustryStandard/ArmTrustZoneSmc.h2
-rw-r--r--ArmPkg/Library/BdsLib/BdsLinuxFdt.c3
2 files changed, 3 insertions, 2 deletions
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;
}
}