E820.h is extracted from LinuxBzimage.h. The definition is generally useful in other cases as well so it deserves its own header.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wei Liu <wei.l...@citrix.com> --- OvmfPkg/Include/IndustryStandard/E820.h | 34 +++++++++++++++++++++++ OvmfPkg/Include/IndustryStandard/LinuxBzimage.h | 14 ++-------- 2 files changed, 36 insertions(+), 12 deletions(-) create mode 100644 OvmfPkg/Include/IndustryStandard/E820.h diff --git a/OvmfPkg/Include/IndustryStandard/E820.h b/OvmfPkg/Include/IndustryStandard/E820.h new file mode 100644 index 0000000..c42a108 --- /dev/null +++ b/OvmfPkg/Include/IndustryStandard/E820.h @@ -0,0 +1,34 @@ +/** @file + + Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved. + Copyright (c) 2013, Citrix Systems UK Ltd. + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#ifndef __E820_H__ +#define __E820_H__ + +#pragma pack(1) + +#define E820_RAM 1 +#define E820_RESERVED 2 +#define E820_ACPI 3 +#define E820_NVS 4 +#define E820_UNUSABLE 5 + +struct e820_entry { + UINT64 addr; /* start of memory segment */ + UINT64 size; /* size of memory segment */ + UINT32 type; /* type of memory segment */ +}; + +#pragma pack() + +#endif /* __E820_H__ */ diff --git a/OvmfPkg/Include/IndustryStandard/LinuxBzimage.h b/OvmfPkg/Include/IndustryStandard/LinuxBzimage.h index b83b791..f0c82fe 100644 --- a/OvmfPkg/Include/IndustryStandard/LinuxBzimage.h +++ b/OvmfPkg/Include/IndustryStandard/LinuxBzimage.h @@ -14,15 +14,11 @@ #ifndef __LINUX_BZIMAGE_H__ #define __LINUX_BZIMAGE_H__ +#include <IndustryStandard/E820.h> + #define BOOTSIG 0x1FE #define SETUP_HDR 0x53726448 /* 0x53726448 == "HdrS" */ -#define E820_RAM 1 -#define E820_RESERVED 2 -#define E820_ACPI 3 -#define E820_NVS 4 -#define E820_UNUSABLE 5 - #pragma pack(1) struct setup_header { @@ -78,12 +74,6 @@ struct efi_info { UINT32 efi_memmap_hi; }; -struct e820_entry { - UINT64 addr; /* start of memory segment */ - UINT64 size; /* size of memory segment */ - UINT32 type; /* type of memory segment */ -}; - struct screen_info { UINT8 orig_x; /* 0x00 */ UINT8 orig_y; /* 0x01 */ -- 1.7.10.4 ------------------------------------------------------------------------------ DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel