]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm
IntelFsp2Pkg: Improvement of supporting null UPD pointer in FSP-T
[mirror_edk2.git] / IntelFsp2Pkg / FspSecCore / Ia32 / FspApiEntryT.nasm
index 73821ad22a49cea81d607b56d0bedfbae8a30761..2cff8b3643246a45d01a83c13856f8e3052b12f2 100644 (file)
@@ -594,37 +594,38 @@ ASM_PFX(TempRamInitApi):
   SAVE_EAX\r
   SAVE_EDX\r
 \r
+  CALL_EBP  ASM_PFX(LoadUpdPointerToECX) ; ECX for UPD param\r
+  SAVE_ECX                               ; save UPD param to slot 3 in xmm6\r
+\r
   ;\r
   ; Sec Platform Init\r
   ;\r
-  CALL_EBP  ASM_PFX(LoadUpdPointerToECX) ; ECX for UPD param\r
   CALL_MMX  ASM_PFX(SecPlatformInit)\r
   cmp       eax, 0\r
   jnz       TempRamInitExit\r
 \r
   ; Load microcode\r
   LOAD_ESP\r
-  CALL_EBP  ASM_PFX(LoadUpdPointerToECX) ; ECX for UPD param\r
+  LOAD_ECX\r
   CALL_MMX  ASM_PFX(LoadMicrocodeDefault)\r
-  SXMMN     xmm6, 3, eax            ;Save microcode return status in ECX-SLOT 3 in xmm6.\r
+  SAVE_UCODE_STATUS                 ; Save microcode return status in slot 1 in xmm5.\r
   ;@note If return value eax is not 0, microcode did not load, but continue and attempt to boot.\r
 \r
   ; Call Sec CAR Init\r
   LOAD_ESP\r
-  CALL_EBP  ASM_PFX(LoadUpdPointerToECX) ; ECX for UPD param\r
+  LOAD_ECX\r
   CALL_MMX  ASM_PFX(SecCarInit)\r
   cmp       eax, 0\r
   jnz       TempRamInitExit\r
 \r
   LOAD_ESP\r
-  CALL_EBP  ASM_PFX(LoadUpdPointerToECX) ; ECX for UPD param\r
-  mov       edi, ecx                     ; Save UPD param to EDI for later code use\r
+  LOAD_ECX\r
+  mov       edi, ecx                ; Save UPD param to EDI for later code use\r
   CALL_MMX  ASM_PFX(EstablishStackFsp)\r
   cmp       eax, 0\r
   jnz       TempRamInitExit\r
 \r
-  LXMMN     xmm6, eax, 3  ;Restore microcode status if no CAR init error from ECX-SLOT 3 in xmm6.\r
-  SXMMN     xmm6, 3, edi  ;Save FSP-T UPD parameter pointer in ECX-SLOT 3 in xmm6.\r
+  LOAD_UCODE_STATUS                 ; Restore microcode status if no CAR init error from slot 1 in xmm5.\r
 \r
 TempRamInitExit:\r
   mov       bl, al                  ; save al data in bl\r