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_32.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_32.h')
-rw-r--r-- | include/asm-x86/e820_32.h | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/include/asm-x86/e820_32.h b/include/asm-x86/e820_32.h index cf67dbb1db79..03f60c690c8a 100644 --- a/include/asm-x86/e820_32.h +++ b/include/asm-x86/e820_32.h | |||
@@ -12,30 +12,10 @@ | |||
12 | #ifndef __E820_HEADER | 12 | #ifndef __E820_HEADER |
13 | #define __E820_HEADER | 13 | #define __E820_HEADER |
14 | 14 | ||
15 | #define E820MAP 0x2d0 /* our map */ | ||
16 | #define E820MAX 128 /* number of entries in E820MAP */ | ||
17 | #define E820NR 0x1e8 /* # entries in E820MAP */ | ||
18 | |||
19 | #define E820_RAM 1 | ||
20 | #define E820_RESERVED 2 | ||
21 | #define E820_ACPI 3 | ||
22 | #define E820_NVS 4 | ||
23 | |||
24 | #define HIGH_MEMORY (1024*1024) | 15 | #define HIGH_MEMORY (1024*1024) |
25 | 16 | ||
26 | #ifndef __ASSEMBLY__ | 17 | #ifndef __ASSEMBLY__ |
27 | 18 | ||
28 | struct e820entry { | ||
29 | u64 addr; /* start of memory segment */ | ||
30 | u64 size; /* size of memory segment */ | ||
31 | u32 type; /* type of memory segment */ | ||
32 | } __attribute__((packed)); | ||
33 | |||
34 | struct e820map { | ||
35 | u32 nr_map; | ||
36 | struct e820entry map[E820MAX]; | ||
37 | }; | ||
38 | |||
39 | extern struct e820map e820; | 19 | extern struct e820map e820; |
40 | 20 | ||
41 | extern int e820_all_mapped(unsigned long start, unsigned long end, | 21 | extern int e820_all_mapped(unsigned long start, unsigned long end, |
@@ -56,5 +36,4 @@ static inline void e820_mark_nosave_regions(void) | |||
56 | #endif | 36 | #endif |
57 | 37 | ||
58 | #endif/*!__ASSEMBLY__*/ | 38 | #endif/*!__ASSEMBLY__*/ |
59 | |||
60 | #endif/*__E820_HEADER*/ | 39 | #endif/*__E820_HEADER*/ |