]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/ResetVector/CommonMacros.inc
Add initial version of Open Virtual Machine Firmware (OVMF) platform.
[mirror_edk2.git] / OvmfPkg / ResetVector / CommonMacros.inc
CommitLineData
49ba9447 1;------------------------------------------------------------------------------\r
2;\r
3; Copyright (c) 2008, Intel Corporation\r
4; All rights reserved. This program and the accompanying materials\r
5; are licensed and made available under the terms and conditions of the BSD License\r
6; which accompanies this distribution. The full text of the license may be found at\r
7; http://opensource.org/licenses/bsd-license.php\r
8;\r
9; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11;\r
12; Module Name:\r
13;\r
14; CommonMacros.inc\r
15;\r
16; Abstract:\r
17;\r
18; Common macros used in the ResetVector VTF module.\r
19;\r
20;------------------------------------------------------------------------------\r
21\r
22%define ADDR16_OF(x) (0x10000 - fourGigabytes + x)\r
23%define ADDR_OF(x) (0x100000000 - fourGigabytes + x)\r
24\r
25%macro callEdx 1\r
26 mov edx, ADDR_OF(%%returnLabel)\r
27 jmp %1\r
28%%returnLabel:\r
29%endmacro\r
30\r
31%macro OneTimeCall 1\r
32 jmp %1\r
33%1 %+ OneTimerCallReturn:\r
34%endmacro\r
35\r
36%macro OneTimeCallRet 1\r
37 jmp %1 %+ OneTimerCallReturn\r
38%endmacro\r
39\r
40StartOfResetVectorCode:\r
41\r
42%define ADDR_OF_START_OF_RESET_CODE ADDR_OF(StartOfResetVectorCode)\r
43\r