mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
Now we get this map layout by call XENMEM_memory_map then save them into one global variable memory_map[]. It should include lowmem range, rdm range and highmem range. Note rdm range and highmem range may not exist in some cases. And here we need to check if any reserved memory conflicts with [RESERVED_MEMORY_DYNAMIC_START, RESERVED_MEMORY_DYNAMIC_END). This range is used to allocate memory in hvmloder level, and we would lead hvmloader failed in case of conflict since its another rare possibility in real world. CC: Keir Fraser <keir@xen.org> CC: Jan Beulich <jbeulich@suse.com> CC: Andrew Cooper <andrew.cooper3@citrix.com> CC: Ian Jackson <ian.jackson@eu.citrix.com> CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com> CC: Ian Campbell <ian.campbell@citrix.com> CC: Wei Liu <wei.liu2@citrix.com> Signed-off-by: Tiejun Chen <tiejun.chen@intel.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com>
36 lines
597 B
C
36 lines
597 B
C
#ifndef __HVMLOADER_E820_H__
|
|
#define __HVMLOADER_E820_H__
|
|
|
|
/*
|
|
* PC BIOS standard E820 types and structure.
|
|
*/
|
|
#define E820_RAM 1
|
|
#define E820_RESERVED 2
|
|
#define E820_ACPI 3
|
|
#define E820_NVS 4
|
|
|
|
struct e820entry {
|
|
uint64_t addr;
|
|
uint64_t size;
|
|
uint32_t type;
|
|
} __attribute__((packed));
|
|
|
|
#define E820MAX 128
|
|
|
|
struct e820map {
|
|
unsigned int nr_map;
|
|
struct e820entry map[E820MAX];
|
|
};
|
|
|
|
#endif /* __HVMLOADER_E820_H__ */
|
|
|
|
/*
|
|
* Local variables:
|
|
* mode: C
|
|
* c-file-style: "BSD"
|
|
* c-basic-offset: 4
|
|
* tab-width: 4
|
|
* indent-tabs-mode: nil
|
|
* End:
|
|
*/
|