]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm
Add IntelFsp2Pkg and IntelFsp2WrapperPkg.
[mirror_edk2.git] / IntelFsp2Pkg / FspSecCore / Ia32 / FspHelper.nasm
1 ;; @file
2 ; Provide FSP helper function.
3 ;
4 ; Copyright (c) 2015 - 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.
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 SECTION .text
15
16 global ASM_PFX(FspInfoHeaderRelativeOff)
17 ASM_PFX(FspInfoHeaderRelativeOff):
18 ;
19 ; This value will be pached by the build script
20 ;
21 DD 0x12345678
22
23 global ASM_PFX(AsmGetFspBaseAddress)
24 ASM_PFX(AsmGetFspBaseAddress):
25 mov eax, ASM_PFX(AsmGetFspInfoHeader)
26 sub eax, dword [ASM_PFX(FspInfoHeaderRelativeOff)]
27 add eax, 0x1C
28 mov eax, dword [eax]
29 ret
30
31 global ASM_PFX(AsmGetFspInfoHeader)
32 ASM_PFX(AsmGetFspInfoHeader):
33 mov eax, ASM_PFX(AsmGetFspInfoHeader)
34 sub eax, dword [ASM_PFX(FspInfoHeaderRelativeOff)]
35 ret