#\r
# Following functions will be provided in PlatformSecLib\r
#\r
+ASM_GLOBAL ASM_PFX(AsmGetFspBaseAddress)\r
+ASM_GLOBAL ASM_PFX(AsmGetFspInfoHeader)\r
ASM_GLOBAL ASM_PFX(GetBootFirmwareVolumeOffset)\r
-ASM_GLOBAL ASM_PFX(Pei2LoaderSwitchStack)\r
+ASM_GLOBAL ASM_PFX(Loader2PeiSwitchStack)\r
\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
# Verify the calling condition\r
#\r
pushal\r
- pushl %eax\r
+ pushl 36(%esp) #push ApiParam [esp + 4 * 8 + 4]\r
+ pushl %eax #push ApiIdx\r
call ASM_PFX(FspApiCallingCheck)\r
- addl $0x04, %esp\r
+ addl $0x08, %esp\r
cmpl $0x00, %eax\r
jz FspApiCommonL1\r
movl %eax, 0x1C(%esp) # mov dword ptr [esp + 4 * 7], eax\r
jz FspApiCommonL2\r
cmpl $0x03, %eax # FspMemoryInit API\r
jz FspApiCommonL2\r
- jmp Pei2LoaderSwitchStack\r
+ call ASM_PFX(AsmGetFspInfoHeader)\r
+ jmp Loader2PeiSwitchStack\r
\r
FspApiCommonL2:\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
+ pushl %eax\r
+\r
+ #\r
+ # Update the FspInfoHeader pointer\r
#\r
- pushl $FspApiCommonExit\r
+ pushl %eax\r
+ call ASM_PFX(AsmGetFspInfoHeader)\r
+ movl %eax, 4(%esp)\r
+ popl %eax\r
\r
#\r
# Create a Task Frame in the stack for the Boot Loader\r
#\r
# Pass entry point of the PEI core\r
#\r
- call ASM_PFX(GetFspBaseAddress)\r
+ call ASM_PFX(AsmGetFspBaseAddress)\r
movl %eax, %edi\r
addl PcdGet32(PcdFspAreaSize), %edi\r
subl $0x20, %edi\r
# PcdFspAreaBaseAddress are the same. For FSP with mulitple FVs,\r
# they are different. The code below can handle both cases.\r
#\r
- call ASM_PFX(GetFspBaseAddress)\r
+ call ASM_PFX(AsmGetFspBaseAddress)\r
movl %eax, %edi\r
call ASM_PFX(GetBootFirmwareVolumeOffset)\r
addl %edi, %eax\r
# Pass Control into the PEI Core\r
#\r
call ASM_PFX(SecStartup)\r
-\r
+ addl $4, %esp\r
FspApiCommonExit:\r
ret\r
\r