; Following functions will be provided in PlatformSecLib\r
;\r
EXTERN GetFspBaseAddress:PROC\r
+EXTERN GetFspInfoHdr:PROC\r
EXTERN GetBootFirmwareVolumeOffset:PROC\r
-EXTERN Pei2LoaderSwitchStack:PROC\r
+EXTERN Loader2PeiSwitchStack:PROC\r
EXTERN LoadMicrocode(LoadMicrocodeDefault):PROC\r
EXTERN SecPlatformInit(SecPlatformInitDefault):PROC\r
EXTERN SecCarInit:PROC\r
jz NemInitExit\r
\r
;\r
- ; CPUID/DeviceID check\r
- ; and Sec Platform Init\r
+ ; Sec Platform Init\r
;\r
CALL_MMX SecPlatformInit\r
cmp eax, 0\r
jz @F\r
cmp eax, 3 ; FspMemoryInit API\r
jz @F\r
- jmp Pei2LoaderSwitchStack\r
+\r
+ call GetFspInfoHdr\r
+ jmp Loader2PeiSwitchStack\r
\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
- push offset exit\r
+ push eax\r
+\r
+ ;\r
+ ; Update the FspInfoHeader pointer\r
+ ;\r
+ push eax\r
+ call GetFspInfoHdr\r
+ mov [esp + 4], eax\r
+ pop eax\r
\r
;\r
; Create a Task Frame in the stack for the Boot Loader\r
; Pass Control into the PEI Core\r
;\r
call SecStartup\r
-\r
+ add esp, 4\r
exit:\r
ret\r
\r