]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/CpuMpPei/Microcode.c
UefiCpuPkg/CpuMpPei: Skip microcode check/load if it has been loaded
[mirror_edk2.git] / UefiCpuPkg / CpuMpPei / Microcode.c
index 3fd3a8bb8185167a37f896a8cd89a448abc95a44..67280d334d33fd8774ee93b2d09574283d8a6bec 100644 (file)
@@ -53,6 +53,7 @@ MicrocodeDetect (
   UINTN                                   Index;\r
   UINT8                                   PlatformId;\r
   UINT32                                  RegEax;\r
+  UINT32                                  CurrentRevision;\r
   UINT32                                  LatestRevision;\r
   UINTN                                   TotalSize;\r
   UINT32                                  CheckSum32;\r
@@ -69,6 +70,14 @@ MicrocodeDetect (
     return;\r
   }\r
 \r
+  CurrentRevision = GetCurrentMicrocodeSignature ();\r
+  if (CurrentRevision != 0) {\r
+    //\r
+    // Skip loading microcode if it has been loaded successfully\r
+    //\r
+    return;\r
+  }\r
+\r
   ExtendedTableLength = 0;\r
   //\r
   // Here data of CPUID leafs have not been collected into context buffer, so\r