]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFspPkg/FspSecCore/Ia32/FspHelper.asm
655481c14f9b2d1aec59ac75429083753c8e74a7
[mirror_edk2.git] / IntelFspPkg / FspSecCore / Ia32 / FspHelper.asm
1 ;; @file
2 ; Provide FSP helper function.
3 ;
4 ; Copyright (c) 2015, 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.
9 ;
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.
12 ;;
13
14 .586p
15 .model flat,C
16 .code
17
18 FspInfoHeaderRelativeOff PROC NEAR PUBLIC
19 ;
20 ; This value will be pached by the build script
21 ;
22 DD 012345678h
23 FspInfoHeaderRelativeOff ENDP
24
25 GetFspBaseAddress PROC NEAR PUBLIC
26 mov eax, GetFspBaseAddress
27 sub eax, dword ptr [FspInfoHeaderRelativeOff]
28 add eax, 01Ch
29 mov eax, dword ptr [eax]
30 ret
31 GetFspBaseAddress ENDP
32
33 GetFspInfoHdr PROC NEAR PUBLIC
34 mov eax, GetFspBaseAddress
35 sub eax, dword ptr [FspInfoHeaderRelativeOff]
36 ret
37 GetFspInfoHdr ENDP
38
39 END