blob: 5103d0b2c46ced797cea56b8c37fd9421ead11f6 [file] [log] [blame]
Rusty Russellee8e7cf2007-10-22 10:56:19 +10001#ifndef __ASM_E820_H
2#define __ASM_E820_H
3#define E820MAP 0x2d0 /* our map */
4#define E820MAX 128 /* number of entries in E820MAP */
5#define E820NR 0x1e8 /* # entries in E820MAP */
6
7#define E820_RAM 1
8#define E820_RESERVED 2
9#define E820_ACPI 3
10#define E820_NVS 4
11
12#ifndef __ASSEMBLY__
13struct e820entry {
14 __u64 addr; /* start of memory segment */
15 __u64 size; /* size of memory segment */
16 __u32 type; /* type of memory segment */
17} __attribute__((packed));
18
19struct e820map {
20 __u32 nr_map;
21 struct e820entry map[E820MAX];
22};
23#endif /* __ASSEMBLY__ */
24
Ingo Molnar306c1422008-01-30 13:33:08 +010025#define ISA_START_ADDRESS 0xa0000
26#define ISA_END_ADDRESS 0x100000
Andreas Herrmannbcc643d2008-06-20 21:58:46 +020027#define is_ISA_range(s, e) ((s) >= ISA_START_ADDRESS && (e) < ISA_END_ADDRESS)
Ingo Molnar306c1422008-01-30 13:33:08 +010028
Thomas Gleixner950f9d92008-01-30 13:34:06 +010029#define BIOS_BEGIN 0x000a0000
30#define BIOS_END 0x00100000
31
Rusty Russellee8e7cf2007-10-22 10:56:19 +100032#ifdef __KERNEL__
Thomas Gleixner96a388d2007-10-11 11:20:03 +020033#ifdef CONFIG_X86_32
34# include "e820_32.h"
35#else
36# include "e820_64.h"
37#endif
Rusty Russellee8e7cf2007-10-22 10:56:19 +100038#endif /* __KERNEL__ */
39
40#endif /* __ASM_E820_H */