]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/ResetVector/CommonMacros.inc
Add initial version of Open Virtual Machine Firmware (OVMF) platform.
[mirror_edk2.git] / OvmfPkg / ResetVector / CommonMacros.inc
1 ;------------------------------------------------------------------------------
2 ;
3 ; Copyright (c) 2008, Intel Corporation
4 ; All rights reserved. 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
8 ;
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.
11 ;
12 ; Module Name:
13 ;
14 ; CommonMacros.inc
15 ;
16 ; Abstract:
17 ;
18 ; Common macros used in the ResetVector VTF module.
19 ;
20 ;------------------------------------------------------------------------------
21
22 %define ADDR16_OF(x) (0x10000 - fourGigabytes + x)
23 %define ADDR_OF(x) (0x100000000 - fourGigabytes + x)
24
25 %macro callEdx 1
26 mov edx, ADDR_OF(%%returnLabel)
27 jmp %1
28 %%returnLabel:
29 %endmacro
30
31 %macro OneTimeCall 1
32 jmp %1
33 %1 %+ OneTimerCallReturn:
34 %endmacro
35
36 %macro OneTimeCallRet 1
37 jmp %1 %+ OneTimerCallReturn
38 %endmacro
39
40 StartOfResetVectorCode:
41
42 %define ADDR_OF_START_OF_RESET_CODE ADDR_OF(StartOfResetVectorCode)
43