]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Do not deadloop if Microcode not found in FspTempRamInit.
authorYao, Jiewen <jiewen.yao@intel.com>
Tue, 27 Oct 2015 04:00:08 +0000 (04:00 +0000)
committerjyao1 <jyao1@Edk2>
Tue, 27 Oct 2015 04:00:08 +0000 (04:00 +0000)
We do not consider microcode not found as critical error, because Microcode might be applied later.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Ma, Maurice" <maurice.ma@intel.com>
Reviewed-by: "Rangarajan, Ravi P" <ravi.p.rangarajan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18678 6f19259b-4bc3-4df7-8a09-765794883524

IntelFspWrapperPkg/Library/SecPeiFspPlatformSecLibSample/Ia32/SecEntry.S
IntelFspWrapperPkg/Library/SecPeiFspPlatformSecLibSample/Ia32/SecEntry.asm

index 24bc36b9c449afccf7c21a467edeeecad4548c43..c0b84e075cac2dd398545064c3e27ea38c7c1961 100644 (file)
@@ -210,12 +210,22 @@ FspHeaderFound:
   jmp  *%eax\r
 \r
 TempRamInitDone:\r
+  cmp  $0x8000000E, %eax   #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  $0x0, %eax\r
   jnz  FspApiFailed\r
 \r
   #   ECX: start of range\r
   #   EDX: end of range\r
+CallSecFspInit:\r
+  xorl    %eax, %eax\r
   movl    %edx, %esp\r
+\r
+  # Align the stack at DWORD\r
+  addl  $3, %esp\r
+  andl  $0xFFFFFFFC, %esp\r
+\r
   pushl   %edx\r
   pushl   %ecx\r
   pushl   %eax # zero - no hob list yet\r
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