1 #------------------------------------------------------------------------------
3 # Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
4 # This program and the accompanying materials
5 # are licensed and made available under the terms and conditions of the BSD License
6 # which accompanies this distribution. The full text of the license may be found at
7 # http://opensource.org/licenses/bsd-license.php.
9 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 # Provide FSP helper function.
16 #------------------------------------------------------------------------------
19 # FspInfoHeaderRelativeOff is patched during build process and initialized to offset of the AsmGetFspBaseAddress
20 # from the FSP Info header.
22 ASM_GLOBAL ASM_PFX(FspInfoHeaderRelativeOff)
23 ASM_PFX(FspInfoHeaderRelativeOff):
25 # This value will be pached by the build script
30 # Returns FSP Base Address.
32 # This function gets the FSP Info Header using relative addressing and returns the FSP Base from the header structure
34 ASM_GLOBAL ASM_PFX(AsmGetFspBaseAddress)
35 ASM_PFX(AsmGetFspBaseAddress):
36 mov $AsmGetFspBaseAddress, %eax
37 sub FspInfoHeaderRelativeOff, %eax
43 # No stack counter part of AsmGetFspBaseAddress. Return address is in edi.
45 ASM_GLOBAL ASM_PFX(AsmGetFspBaseAddressNoStack)
46 ASM_PFX(AsmGetFspBaseAddressNoStack):
47 mov $AsmGetFspBaseAddress, %eax
48 sub FspInfoHeaderRelativeOff, %eax
54 # Returns FSP Info Header.
56 # This function gets the FSP Info Header using relative addressing and returns it
58 ASM_GLOBAL ASM_PFX(AsmGetFspInfoHeader)
59 ASM_PFX(AsmGetFspInfoHeader):
60 mov $AsmGetFspBaseAddress, %eax
61 sub FspInfoHeaderRelativeOff, %eax
65 # No stack counter part of AsmGetFspInfoHeader. Return address is in edi.
67 ASM_GLOBAL ASM_PFX(AsmGetFspInfoHeaderNoStack)
68 ASM_PFX(AsmGetFspInfoHeaderNoStack):
69 mov $AsmGetFspBaseAddress, %eax
70 sub FspInfoHeaderRelativeOff, %eax