]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFspWrapperPkg/Library/SecPeiFspPlatformSecLibSample/Ia32/SecEntry.asm
Do not deadloop if Microcode not found in FspTempRamInit.
[mirror_edk2.git] / IntelFspWrapperPkg / Library / SecPeiFspPlatformSecLibSample / Ia32 / SecEntry.asm
index 0e0c5c5883f706b2b27bc4b3978ddfc2e5ecafe0..3c2e43a89cdee06189c84d7586db97236909c3a1 100644 (file)
@@ -220,12 +220,22 @@ FspHeaderFound:
   jmp eax\r
 \r
 TempRamInitDone:\r
-  cmp eax, 0\r
+  cmp eax, 8000000Eh      ;Check if EFI_NOT_FOUND returned. Error code for Microcode Update not found.\r
+  je  CallSecFspInit      ;If microcode not found, don't hang, but continue.\r
+\r
+  cmp eax, 0              ;Check if EFI_SUCCESS retuned.\r
   jnz FspApiFailed\r
 \r
   ;   ECX: start of range\r
   ;   EDX: end of range\r
+CallSecFspInit:\r
+  xor     eax, eax\r
   mov     esp, edx\r
+\r
+  ; Align the stack at DWORD\r
+  add  esp,  3\r
+  and  esp, 0FFFFFFFCh\r
+\r
   push    edx\r
   push    ecx\r
   push    eax ; zero - no hob list yet\r