2 ; Provide FSP API entry points.
4 ; Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
5 ; This program and the accompanying materials
6 ; are licensed and made available under the terms and conditions of the BSD License
7 ; which accompanies this distribution. The full text of the license may be found at
8 ; http://opensource.org/licenses/bsd-license.php.
10 ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 ; Following functions will be provided in C
19 extern ASM_PFX(Loader2PeiSwitchStack)
20 extern ASM_PFX(FspApiCallingCheck)
23 ; Following functions will be provided in ASM
25 extern ASM_PFX(FspApiCommonContinue)
26 extern ASM_PFX(AsmGetFspInfoHeader)
28 ;----------------------------------------------------------------------------
31 ; This is the FSP API common entry point to resume the FSP execution
33 ;----------------------------------------------------------------------------
34 global ASM_PFX(FspApiCommon)
35 ASM_PFX(FspApiCommon):
37 ; EAX holds the API index
45 cmp eax, dword [esp - 4]
52 ; Verify the calling condition
55 push DWORD [esp + (4 * 8 + 4)] ; push ApiParam
56 push eax ; push ApiIdx
57 call ASM_PFX(FspApiCallingCheck)
61 mov dword [esp + (4 * 7)], eax
68 cmp eax, 3 ; FspMemoryInit API
71 call ASM_PFX(AsmGetFspInfoHeader)
72 jmp ASM_PFX(Loader2PeiSwitchStack)
75 jmp ASM_PFX(FspApiCommonContinue)