]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/Library/MpInitLib/Microcode.c
UefiCpuPkg/MpInitLib: Add missing point mark
[mirror_edk2.git] / UefiCpuPkg / Library / MpInitLib / Microcode.c
index 0fd8e8c51bc8d7553198a7d5dafb869ac7cd65d9..982995be7d02ddcd1715424ef206827700817ef7 100644 (file)
@@ -35,7 +35,7 @@ GetCurrentMicrocodeSignature (
 /**\r
   Detect whether specified processor can find matching microcode patch and load it.\r
 \r
-  @param[in] PeiCpuMpData        Pointer to PEI CPU MP Data\r
+  @param[in]  CpuMpData  The pointer to CPU MP Data structure.\r
 **/\r
 VOID\r
 MicrocodeDetect (\r
@@ -92,6 +92,7 @@ MicrocodeDetect (
   PlatformId = (UINT8) PlatformIdMsr.Bits.PlatformId;\r
 \r
   LatestRevision = 0;\r
+  MicrocodeData  = NULL;\r
   MicrocodeEnd = (UINTN) (MicrocodePatchAddress + MicrocodePatchRegionSize);\r
   MicrocodeEntryPoint = (CPU_MICROCODE_HEADER *) (UINTN) MicrocodePatchAddress;\r
   do {\r
@@ -198,6 +199,7 @@ MicrocodeDetect (
     // Revision. A processor with no loaded update is considered to have a\r
     // revision equal to zero.\r
     //\r
+    ASSERT (MicrocodeData != NULL);\r
     AsmWriteMsr64 (\r
         MSR_IA32_BIOS_UPDT_TRIG,\r
         (UINT64) (UINTN) MicrocodeData\r