]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFspPkg/FspSecCore/Ia32/FspApiEntry.s
Fix FSP GCC error on FspApiCallingCheck().
[mirror_edk2.git] / IntelFspPkg / FspSecCore / Ia32 / FspApiEntry.s
index d0f5b20b96dcd9b40737e3a1ea5e5a8550878724..8f4093ca1940a7adad50ba5b895950ec0ea51fb5 100644 (file)
@@ -215,8 +215,8 @@ ASM_GLOBAL    ASM_PFX(FspApiCallingCheck)
 #\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(AsmGetFspBaseAddress)\r
+ASM_GLOBAL    ASM_PFX(AsmGetFspInfoHeader)\r
 ASM_GLOBAL    ASM_PFX(GetBootFirmwareVolumeOffset)\r
 ASM_GLOBAL    ASM_PFX(Loader2PeiSwitchStack)\r
 \r
@@ -703,9 +703,10 @@ FspApiCommonL0:
   # 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
@@ -718,7 +719,7 @@ FspApiCommonL1:
   jz      FspApiCommonL2\r
   cmpl    $0x03, %eax                        # FspMemoryInit API\r
   jz      FspApiCommonL2\r
-  call    ASM_PFX(GetFspInfoHdr)\r
+  call    ASM_PFX(AsmGetFspInfoHeader)\r
   jmp     Loader2PeiSwitchStack\r
 \r
 FspApiCommonL2:\r
@@ -735,7 +736,7 @@ FspApiCommonL2:
   # Update the FspInfoHeader pointer\r
   #\r
   pushl  %eax\r
-  call   ASM_PFX(GetFspInfoHdr)\r
+  call   ASM_PFX(AsmGetFspInfoHeader)\r
   movl   %eax, 4(%esp)\r
   popl   %eax\r
 \r
@@ -773,7 +774,7 @@ FspApiCommonL2:
   #\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
@@ -787,7 +788,7 @@ FspApiCommonL2:
   # 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