diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2007-10-21 20:56:19 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2007-10-23 01:49:47 -0400 |
commit | ee8e7cfe9d330d6f1ce0b9b1620d6df5d9cf6b70 (patch) | |
tree | a9534bac7060e546c0c3e6ea34d0469d8903bf0e /include/asm-x86/e820.h | |
parent | 9525ca0286afd54a5cd69d9ded741b4df8d0c554 (diff) |
Make asm-x86/bootparam.h includable from userspace.
To actually write a bootloader (or, say, the lguest launcher)
currently requires duplication of these structures. Making them
includable from userspace is much nicer.
We merge the common userspace-required definitions of e820_32/64.h
into e820.h for export.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/asm-x86/e820.h')
-rw-r--r-- | include/asm-x86/e820.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/asm-x86/e820.h b/include/asm-x86/e820.h index 5d4d2183e5db..3e214f39fad3 100644 --- a/include/asm-x86/e820.h +++ b/include/asm-x86/e820.h | |||
@@ -1,5 +1,33 @@ | |||
1 | #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__ | ||
13 | struct 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 | |||
19 | struct e820map { | ||
20 | __u32 nr_map; | ||
21 | struct e820entry map[E820MAX]; | ||
22 | }; | ||
23 | #endif /* __ASSEMBLY__ */ | ||
24 | |||
25 | #ifdef __KERNEL__ | ||
1 | #ifdef CONFIG_X86_32 | 26 | #ifdef CONFIG_X86_32 |
2 | # include "e820_32.h" | 27 | # include "e820_32.h" |
3 | #else | 28 | #else |
4 | # include "e820_64.h" | 29 | # include "e820_64.h" |
5 | #endif | 30 | #endif |
31 | #endif /* __KERNEL__ */ | ||
32 | |||
33 | #endif /* __ASM_E820_H */ | ||