1 #------------------------------------------------------------------------------
3 # Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
4 # SPDX-License-Identifier: BSD-2-Clause-Patent
8 # Provide FSP helper function.
10 #------------------------------------------------------------------------------
13 # FspInfoHeaderRelativeOff is patched during build process and initialized to offset of the AsmGetFspBaseAddress
14 # from the FSP Info header.
16 ASM_GLOBAL ASM_PFX(FspInfoHeaderRelativeOff)
17 ASM_PFX(FspInfoHeaderRelativeOff):
19 # This value will be pached by the build script
24 # Returns FSP Base Address.
26 # This function gets the FSP Info Header using relative addressing and returns the FSP Base from the header structure
28 ASM_GLOBAL ASM_PFX(AsmGetFspBaseAddress)
29 ASM_PFX(AsmGetFspBaseAddress):
30 mov $AsmGetFspBaseAddress, %eax
31 sub FspInfoHeaderRelativeOff, %eax
37 # No stack counter part of AsmGetFspBaseAddress. Return address is in edi.
39 ASM_GLOBAL ASM_PFX(AsmGetFspBaseAddressNoStack)
40 ASM_PFX(AsmGetFspBaseAddressNoStack):
41 mov $AsmGetFspBaseAddress, %eax
42 sub FspInfoHeaderRelativeOff, %eax
48 # Returns FSP Info Header.
50 # This function gets the FSP Info Header using relative addressing and returns it
52 ASM_GLOBAL ASM_PFX(AsmGetFspInfoHeader)
53 ASM_PFX(AsmGetFspInfoHeader):
54 mov $AsmGetFspBaseAddress, %eax
55 sub FspInfoHeaderRelativeOff, %eax
59 # No stack counter part of AsmGetFspInfoHeader. Return address is in edi.
61 ASM_GLOBAL ASM_PFX(AsmGetFspInfoHeaderNoStack)
62 ASM_PFX(AsmGetFspInfoHeaderNoStack):
63 mov $AsmGetFspBaseAddress, %eax
64 sub FspInfoHeaderRelativeOff, %eax