]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg/BdsLib: Replace ARM magic value by a proper defined value.
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Sun, 14 Apr 2013 09:30:46 +0000 (09:30 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Sun, 14 Apr 2013 09:30:46 +0000 (09:30 +0000)
"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

ArmPkg/Include/IndustryStandard/ArmTrustZoneSmc.h
ArmPkg/Library/BdsLib/BdsLinuxFdt.c

index 62f8f61a7ed71d0c6b7db6a4b97bc2af2aaea6b4..71b4327ebfecb2856d2c58c66a61f9940c0051f2 100644 (file)
@@ -18,6 +18,8 @@
 #define ARM_TRUSTZONE_UID_4LETTERID   0x1\r
 #define ARM_TRUSTZONE_UID_MD5         0x2\r
 \r
+#define ARM_TRUSTZONE_ARM_UID         0x40524d48 // "ARMH"\r
+\r
 #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))\r
 \r
 #define IS_ARM_TRUSTZONE_DEPRECIATED_SMC(Rx)            ((UINTN)(Rx) <= (UINTN)ARM_TRUSTZONE_DEPRECIATED_SMC_ID_END)\r
index b5dd2371363fa1659e9158a3a17d55716952f2ea..7bfb2cd6289b33d0fceff54c7d5855edd8434697 100644 (file)
@@ -260,8 +260,7 @@ PrepareFdt (
       if (Rx == ARM_TRUSTZONE_UID_4LETTERID) {\r
         Rx   = ARM_SMC_ID_UID + 1;\r
         ArmCallSmc (&Rx);\r
-        //TODO: Replace ARM magic number\r
-        if (Rx == 0x40524d48) {\r
+        if (Rx == ARM_TRUSTZONE_ARM_UID) {\r
           PsciSmcSupported = TRUE;\r
         }\r
       }\r