2 * QEMU BIOS e820 routines
4 * Copyright (c) 2003-2004 Fabrice Bellard
6 * SPDX-License-Identifier: MIT
9 #ifndef HW_I386_E820_MEMORY_LAYOUT_H
10 #define HW_I386_E820_MEMORY_LAYOUT_H
14 #define E820_RESERVED 2
17 #define E820_UNUSABLE 5
19 #define E820_NR_ENTRIES 16
25 } QEMU_PACKED
__attribute((__aligned__(4)));
29 struct e820_entry entry
[E820_NR_ENTRIES
];
30 } QEMU_PACKED
__attribute((__aligned__(4)));
32 extern struct e820_table e820_reserve
;
33 extern struct e820_entry
*e820_table
;
35 int e820_add_entry(uint64_t address
, uint64_t length
, uint32_t type
);
36 int e820_get_num_entries(void);
37 bool e820_get_entry(int index
, uint32_t type
,
38 uint64_t *address
, uint64_t *length
);