blob: 8338c430867e572d9bc1e290f07cc79ad69553dd [file] [log] [blame]
Kevin O'Connor59a23bb2008-06-08 23:09:42 -04001#ifndef __E820MAP_H
2#define __E820MAP_H
3
4#include "types.h" // u64
5
6#define E820_RAM 1
7#define E820_RESERVED 2
8#define E820_ACPI 3
9#define E820_NVS 4
10#define E820_UNUSABLE 5
Kevin O'Connorb8d7a472008-06-21 11:43:32 -040011#define E820_HOLE ((u32)-1) // Useful for removing entries
Kevin O'Connor59a23bb2008-06-08 23:09:42 -040012
13struct e820entry {
14 u64 start;
15 u64 size;
16 u32 type;
17};
18
19void add_e820(u64 start, u64 size, u32 type);
20void memmap_setup();
21void memmap_finalize();
22
Kevin O'Connord995b3d2008-11-08 13:05:27 -050023// e820 map storage (defined in system.c)
Kevin O'Connordf2c19a2009-01-17 20:07:09 -050024extern struct e820entry e820_list[];
Kevin O'Connord995b3d2008-11-08 13:05:27 -050025extern int e820_count;
26
Kevin O'Connordf2c19a2009-01-17 20:07:09 -050027// Space for exported bios tables (defined in misc.c)
Kevin O'Connor59a23bb2008-06-08 23:09:42 -040028extern u32 bios_table_cur_addr, bios_table_end_addr;
Kevin O'Connordf2c19a2009-01-17 20:07:09 -050029extern char BiosTableSpace[];
Kevin O'Connor59a23bb2008-06-08 23:09:42 -040030
31#endif // e820map.h