blob: 01c7ddb1f63e609e2b091260a45e94a765d93bc2 [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);
Kevin O'Connor1ca05b02010-01-03 17:43:37 -050020void memmap_finalize(void);
Kevin O'Connor59a23bb2008-06-08 23:09:42 -040021
Kevin O'Connor415d4292009-08-30 19:19:31 -040022// A typical OS page size
23#define PAGE_SIZE 4096
24
Kevin O'Connord995b3d2008-11-08 13:05:27 -050025// e820 map storage (defined in system.c)
Kevin O'Connordf2c19a2009-01-17 20:07:09 -050026extern struct e820entry e820_list[];
Kevin O'Connord995b3d2008-11-08 13:05:27 -050027extern int e820_count;
28
Kevin O'Connordf2c19a2009-01-17 20:07:09 -050029// Space for exported bios tables (defined in misc.c)
Kevin O'Connordf2c19a2009-01-17 20:07:09 -050030extern char BiosTableSpace[];
Kevin O'Connor59a23bb2008-06-08 23:09:42 -040031
32#endif // e820map.h