Revision: 18678
          http://sourceforge.net/p/edk2/code/18678
Author:   jyao1
Date:     2015-10-27 04:00:08 +0000 (Tue, 27 Oct 2015)
Log Message:
-----------
Do not deadloop if Microcode not found in FspTempRamInit.

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" <[email protected]>
Reviewed-by: "Ma, Maurice" <[email protected]>
Reviewed-by: "Rangarajan, Ravi P" <[email protected]>

Modified Paths:
--------------
    
trunk/edk2/IntelFspWrapperPkg/Library/SecPeiFspPlatformSecLibSample/Ia32/SecEntry.S
    
trunk/edk2/IntelFspWrapperPkg/Library/SecPeiFspPlatformSecLibSample/Ia32/SecEntry.asm

Modified: 
trunk/edk2/IntelFspWrapperPkg/Library/SecPeiFspPlatformSecLibSample/Ia32/SecEntry.S
===================================================================
--- 
trunk/edk2/IntelFspWrapperPkg/Library/SecPeiFspPlatformSecLibSample/Ia32/SecEntry.S
 2015-10-27 03:54:08 UTC (rev 18677)
+++ 
trunk/edk2/IntelFspWrapperPkg/Library/SecPeiFspPlatformSecLibSample/Ia32/SecEntry.S
 2015-10-27 04:00:08 UTC (rev 18678)
@@ -210,12 +210,22 @@
   jmp  *%eax
 
 TempRamInitDone:
+  cmp  $0x8000000E, %eax   #Check if EFI_NOT_FOUND returned. Error code for 
Microcode Update not found.
+  je   CallSecFspInit      #If microcode not found, don't hang, but continue.
+
   cmp  $0x0, %eax
   jnz  FspApiFailed
 
   #   ECX: start of range
   #   EDX: end of range
+CallSecFspInit:
+  xorl    %eax, %eax
   movl    %edx, %esp
+
+  # Align the stack at DWORD
+  addl  $3, %esp
+  andl  $0xFFFFFFFC, %esp
+
   pushl   %edx
   pushl   %ecx
   pushl   %eax # zero - no hob list yet

Modified: 
trunk/edk2/IntelFspWrapperPkg/Library/SecPeiFspPlatformSecLibSample/Ia32/SecEntry.asm
===================================================================
--- 
trunk/edk2/IntelFspWrapperPkg/Library/SecPeiFspPlatformSecLibSample/Ia32/SecEntry.asm
       2015-10-27 03:54:08 UTC (rev 18677)
+++ 
trunk/edk2/IntelFspWrapperPkg/Library/SecPeiFspPlatformSecLibSample/Ia32/SecEntry.asm
       2015-10-27 04:00:08 UTC (rev 18678)
@@ -220,12 +220,22 @@
   jmp eax
 
 TempRamInitDone:
-  cmp eax, 0
+  cmp eax, 8000000Eh      ;Check if EFI_NOT_FOUND returned. Error code for 
Microcode Update not found.
+  je  CallSecFspInit      ;If microcode not found, don't hang, but continue.
+
+  cmp eax, 0              ;Check if EFI_SUCCESS retuned.
   jnz FspApiFailed
 
   ;   ECX: start of range
   ;   EDX: end of range
+CallSecFspInit:
+  xor     eax, eax
   mov     esp, edx
+
+  ; Align the stack at DWORD
+  add  esp,  3
+  and  esp, 0FFFFFFFCh
+
   push    edx
   push    ecx
   push    eax ; zero - no hob list yet


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to