]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFspPkg/FspSecCore/Ia32/FspApiEntry.s
Add dual FSP binaries support.
[mirror_edk2.git] / IntelFspPkg / FspSecCore / Ia32 / FspApiEntry.s
index 1d8fe0bcd299e821f9c4e289ededd349bb14d22a..d0f5b20b96dcd9b40737e3a1ea5e5a8550878724 100644 (file)
@@ -215,8 +215,10 @@ ASM_GLOBAL    ASM_PFX(FspApiCallingCheck)
 #\r
 # Following functions will be provided in PlatformSecLib\r
 #\r
 #\r
 # Following functions will be provided in PlatformSecLib\r
 #\r
+ASM_GLOBAL    ASM_PFX(GetFspBaseAddress)\r
+ASM_GLOBAL    ASM_PFX(GetFspInfoHdr)\r
 ASM_GLOBAL    ASM_PFX(GetBootFirmwareVolumeOffset)\r
 ASM_GLOBAL    ASM_PFX(GetBootFirmwareVolumeOffset)\r
-ASM_GLOBAL    ASM_PFX(Pei2LoaderSwitchStack)\r
+ASM_GLOBAL    ASM_PFX(Loader2PeiSwitchStack)\r
 \r
 \r
 #\r
 \r
 \r
 #\r
@@ -561,8 +563,7 @@ ASM_PFX(TempRamInitApi):
   jz      NemInitExit\r
 \r
   #\r
   jz      NemInitExit\r
 \r
   #\r
-  # CPUID/DeviceID check\r
-  # and Sec Platform Init\r
+  # Sec Platform Init\r
   #\r
   movl    $TempRamInitApiL1, %esi            #CALL_MMX  SecPlatformInit\r
   movd    %esi, %mm7\r
   #\r
   movl    $TempRamInitApiL1, %esi            #CALL_MMX  SecPlatformInit\r
   movd    %esi, %mm7\r
@@ -717,7 +718,8 @@ FspApiCommonL1:
   jz      FspApiCommonL2\r
   cmpl    $0x03, %eax                        # FspMemoryInit API\r
   jz      FspApiCommonL2\r
   jz      FspApiCommonL2\r
   cmpl    $0x03, %eax                        # FspMemoryInit API\r
   jz      FspApiCommonL2\r
-  jmp     Pei2LoaderSwitchStack\r
+  call    ASM_PFX(GetFspInfoHdr)\r
+  jmp     Loader2PeiSwitchStack\r
 \r
 FspApiCommonL2:\r
   #\r
 \r
 FspApiCommonL2:\r
   #\r
@@ -725,9 +727,17 @@ FspApiCommonL2:
   #  \r
   \r
   #\r
   #  \r
   \r
   #\r
-  # Store the address in FSP which will return control to the BL\r
+  # Place holder to store the FspInfoHeader pointer\r
   #\r
   #\r
-  pushl   $FspApiCommonExit\r
+  pushl  %eax\r
+\r
+  #\r
+  # Update the FspInfoHeader pointer\r
+  #\r
+  pushl  %eax\r
+  call   ASM_PFX(GetFspInfoHdr)\r
+  movl   %eax, 4(%esp)\r
+  popl   %eax\r
 \r
   #\r
   # Create a Task Frame in the stack for the Boot Loader\r
 \r
   #\r
   # Create a Task Frame in the stack for the Boot Loader\r
@@ -796,7 +806,7 @@ FspApiCommonL2:
   # Pass Control into the PEI Core\r
   #\r
   call    ASM_PFX(SecStartup)\r
   # Pass Control into the PEI Core\r
   #\r
   call    ASM_PFX(SecStartup)\r
-\r
+  addl    $4, %esp\r
 FspApiCommonExit:\r
   ret\r
 \r
 FspApiCommonExit:\r
   ret\r
 \r