]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
StandaloneMmPkg: Use macros for SPM version check
[mirror_edk2.git] / StandaloneMmPkg / Library / StandaloneMmCoreEntryPoint / AArch64 / StandaloneMmCoreEntryPoint.c
index 3d78e8e9ae44d218fa1b39270ba7167e4c665d83..2643473e88973298b9df75b4740dfaa73bcecb52 100644 (file)
@@ -32,8 +32,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #define SPM_MINOR_VER_MASK        0x0000FFFF\r
 #define SPM_MAJOR_VER_SHIFT       16\r
 \r
-#define SPM_MAJOR_VER             0\r
-#define SPM_MINOR_VER             1\r
+STATIC CONST UINT32 mSpmMajorVer = SPM_MAJOR_VERSION;\r
+STATIC CONST UINT32 mSpmMinorVer = SPM_MINOR_VERSION;\r
 \r
 #define BOOT_PAYLOAD_VERSION      1\r
 \r
@@ -196,8 +196,8 @@ GetSpmVersion (VOID)
   // revision A must work in a compatible way with revision B.\r
   // However, it is possible for revision B to have a higher\r
   // function count than revision A.\r
-  if ((SpmMajorVersion == SPM_MAJOR_VER) &&\r
-      (SpmMinorVersion >= SPM_MINOR_VER))\r
+  if ((SpmMajorVersion == mSpmMajorVer) &&\r
+      (SpmMinorVersion >= mSpmMinorVer))\r
   {\r
     DEBUG ((DEBUG_INFO, "SPM Version: Major=0x%x, Minor=0x%x\n",\r
            SpmMajorVersion, SpmMinorVersion));\r
@@ -206,7 +206,7 @@ GetSpmVersion (VOID)
   else\r
   {\r
     DEBUG ((DEBUG_INFO, "Incompatible SPM Versions.\n Current Version: Major=0x%x, Minor=0x%x.\n Expected: Major=0x%x, Minor>=0x%x.\n",\r
-            SpmMajorVersion, SpmMinorVersion, SPM_MAJOR_VER, SPM_MINOR_VER));\r
+            SpmMajorVersion, SpmMinorVersion, mSpmMajorVer, mSpmMinorVer));\r
     Status = EFI_UNSUPPORTED;\r
   }\r
 \r