Revision: 18809
          http://sourceforge.net/p/edk2/code/18809
Author:   vanjeff
Date:     2015-11-16 08:07:58 +0000 (Mon, 16 Nov 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.

(Sync patch r18678 from main trunk.)

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]>

Revision Links:
--------------
    http://sourceforge.net/p/edk2/code/18678

Modified Paths:
--------------
    
branches/UDK2015/IntelFspWrapperPkg/Library/SecPeiFspPlatformSecLibSample/Ia32/SecEntry.S
    
branches/UDK2015/IntelFspWrapperPkg/Library/SecPeiFspPlatformSecLibSample/Ia32/SecEntry.asm

Modified: 
branches/UDK2015/IntelFspWrapperPkg/Library/SecPeiFspPlatformSecLibSample/Ia32/SecEntry.S
===================================================================
--- 
branches/UDK2015/IntelFspWrapperPkg/Library/SecPeiFspPlatformSecLibSample/Ia32/SecEntry.S
   2015-11-16 08:06:55 UTC (rev 18808)
+++ 
branches/UDK2015/IntelFspWrapperPkg/Library/SecPeiFspPlatformSecLibSample/Ia32/SecEntry.S
   2015-11-16 08:07:58 UTC (rev 18809)
@@ -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: 
branches/UDK2015/IntelFspWrapperPkg/Library/SecPeiFspPlatformSecLibSample/Ia32/SecEntry.asm
===================================================================
--- 
branches/UDK2015/IntelFspWrapperPkg/Library/SecPeiFspPlatformSecLibSample/Ia32/SecEntry.asm
 2015-11-16 08:06:55 UTC (rev 18808)
+++ 
branches/UDK2015/IntelFspWrapperPkg/Library/SecPeiFspPlatformSecLibSample/Ia32/SecEntry.asm
 2015-11-16 08:07:58 UTC (rev 18809)
@@ -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


------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a 
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to