1 #ifndef __E820_HEADER 2 #define __E820_HEADER 3 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 12 13 struct __packed e820entry { 14 uint64_t addr; 15 uint64_t size; 16 uint32_t type; 17 }; 18 19 #define E820MAX 1024 20 21 struct e820map { 22 unsigned int nr_map; 23 struct e820entry map[E820MAX]; 24 }; 25 26 extern int sanitize_e820_map(struct e820entry *biosmap, unsigned int *pnr_map); 27 extern int e820_all_mapped(u64 start, u64 end, unsigned type); 28 extern int reserve_e820_ram(struct e820map *e820, uint64_t s, uint64_t e); 29 extern int e820_change_range_type( 30 struct e820map *e820, uint64_t s, uint64_t e, 31 uint32_t orig_type, uint32_t new_type); 32 extern int e820_add_range( 33 struct e820map *, uint64_t s, uint64_t e, uint32_t type); 34 extern unsigned long init_e820(const char *, struct e820map *); 35 extern struct e820map e820; 36 extern struct e820map e820_raw; 37 38 /* These symbols live in the boot trampoline. */ 39 extern unsigned int lowmem_kb, highmem_kb; 40 unsigned int e820map_copy(struct e820entry *map, unsigned int limit); 41 42 #define copy_bios_e820 bootsym(e820map_copy) 43 44 #endif /*__E820_HEADER*/ 45