-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Rusty Russell
committed
Oct 23, 2007
1 parent
9525ca0
commit ee8e7cf
Showing
13 changed files
with
229 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,33 @@ | ||
#ifndef __ASM_E820_H | ||
#define __ASM_E820_H | ||
#define E820MAP 0x2d0 /* our map */ | ||
#define E820MAX 128 /* number of entries in E820MAP */ | ||
#define E820NR 0x1e8 /* # entries in E820MAP */ | ||
|
||
#define E820_RAM 1 | ||
#define E820_RESERVED 2 | ||
#define E820_ACPI 3 | ||
#define E820_NVS 4 | ||
|
||
#ifndef __ASSEMBLY__ | ||
struct e820entry { | ||
__u64 addr; /* start of memory segment */ | ||
__u64 size; /* size of memory segment */ | ||
__u32 type; /* type of memory segment */ | ||
} __attribute__((packed)); | ||
|
||
struct e820map { | ||
__u32 nr_map; | ||
struct e820entry map[E820MAX]; | ||
}; | ||
#endif /* __ASSEMBLY__ */ | ||
|
||
#ifdef __KERNEL__ | ||
#ifdef CONFIG_X86_32 | ||
# include "e820_32.h" | ||
#else | ||
# include "e820_64.h" | ||
#endif | ||
#endif /* __KERNEL__ */ | ||
|
||
#endif /* __ASM_E820_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.