debuggers.hg

view xen/include/asm-x86/e820.h @ 22855:1d1eec7e1fb4

xl: Perform minimal validation of virtual disk file while parsing config file

This patch performs some very basic validation on the virtual disk
file passed through the config file. This validation ensures that we
don't go too far with the initialization like spawn qemu and more
while there could be some potentially fundamental issues.

[ Patch fixed up to work with PHYSTYPE_EMPTY 22808:6ec61438713a -iwj ]

Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Kamala Narasimhan <kamala.narasimhan@gmail.com>
date Tue Jan 25 18:09:49 2011 +0000 (2011-01-25)
parents 42fe00c6f8b4
children
line source
1 #ifndef __E820_HEADER
2 #define __E820_HEADER
4 /*
5 * PC BIOS standard E820 types and structure.
6 */
7 #define E820_RAM 1
8 #define E820_RESERVED 2
9 #define E820_ACPI 3
10 #define E820_NVS 4
11 #define E820_UNUSABLE 5
13 struct e820entry {
14 uint64_t addr;
15 uint64_t size;
16 uint32_t type;
17 } __attribute__((packed));
19 #define E820MAX 128
21 struct e820map {
22 int nr_map;
23 struct e820entry map[E820MAX];
24 };
26 extern int e820_all_mapped(u64 start, u64 end, unsigned type);
27 extern int reserve_e820_ram(struct e820map *e820, uint64_t s, uint64_t e);
28 extern int e820_change_range_type(
29 struct e820map *e820, uint64_t s, uint64_t e,
30 uint32_t orig_type, uint32_t new_type);
31 extern unsigned long init_e820(const char *, struct e820entry *, int *);
32 extern struct e820map e820;
34 /* These symbols live in the boot trampoline. */
35 extern struct e820entry e820map[];
36 extern int e820nr;
37 extern unsigned int lowmem_kb, highmem_kb;
39 #define e820_raw bootsym(e820map)
40 #define e820_raw_nr bootsym(e820nr)
42 #endif /*__E820_HEADER*/