]>
Commit | Line | Data |
---|---|---|
cf1d4549 JY |
1 | ;; @file\r |
2 | ; Provide FSP helper function.\r | |
3 | ;\r | |
4 | ; Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r | |
5 | ; This program and the accompanying materials\r | |
6 | ; are licensed and made available under the terms and conditions of the BSD License\r | |
7 | ; which accompanies this distribution. The full text of the license may be found at\r | |
8 | ; http://opensource.org/licenses/bsd-license.php.\r | |
9 | ;\r | |
10 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | ;;\r | |
13 | \r | |
14 | SECTION .text\r | |
15 | \r | |
16 | global ASM_PFX(FspInfoHeaderRelativeOff)\r | |
90fadfc0 YS |
17 | ASM_PFX(FspInfoHeaderRelativeOff):\r |
18 | DD 0x12345678 ; This value must be patched by the build script\r | |
cf1d4549 JY |
19 | \r |
20 | global ASM_PFX(AsmGetFspBaseAddress)\r | |
21 | ASM_PFX(AsmGetFspBaseAddress):\r | |
8265373e | 22 | call ASM_PFX(AsmGetFspInfoHeader)\r |
cf1d4549 JY |
23 | add eax, 0x1C\r |
24 | mov eax, dword [eax]\r | |
25 | ret\r | |
26 | \r | |
27 | global ASM_PFX(AsmGetFspInfoHeader)\r | |
28 | ASM_PFX(AsmGetFspInfoHeader):\r | |
8265373e YS |
29 | call ASM_PFX(NextInstruction)\r |
30 | ASM_PFX(NextInstruction):\r | |
31 | pop eax\r | |
32 | sub eax, ASM_PFX(NextInstruction)\r | |
33 | add eax, ASM_PFX(AsmGetFspInfoHeader)\r | |
08354c34 | 34 | sub eax, dword [eax - ASM_PFX(AsmGetFspInfoHeader) + ASM_PFX(FspInfoHeaderRelativeOff)]\r |
cf1d4549 | 35 | ret\r |
90fadfc0 YS |
36 | \r |
37 | global ASM_PFX(AsmGetFspInfoHeaderNoStack)\r | |
38 | ASM_PFX(AsmGetFspInfoHeaderNoStack):\r | |
39 | mov eax, ASM_PFX(AsmGetFspInfoHeader)\r | |
40 | sub eax, dword [ASM_PFX(FspInfoHeaderRelativeOff)]\r | |
41 | jmp edi\r |