diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2006-12-07 11:22:26 +0000 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2006-12-07 11:22:26 +0000 |
commit | d3f023e9ade9d28b3af1e346c63f95e73ca345c0 (patch) | |
tree | d313a359cf8fd6e38c18744661d0d56837311f23 /xen/include/xen/multiboot.h | |
parent | 40574f04b42731e24cb00237b7c29bc8a5f45eab (diff) | |
download | xen-d3f023e9ade9d28b3af1e346c63f95e73ca345c0.tar.gz xen-d3f023e9ade9d28b3af1e346c63f95e73ca345c0.tar.bz2 xen-d3f023e9ade9d28b3af1e346c63f95e73ca345c0.zip |
[XEN] Make multiboot-related code more readable.
Tested on i386 and x86_64 with GRUB and PXELINUX bootmanagers.
From: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/include/xen/multiboot.h')
-rw-r--r-- | xen/include/xen/multiboot.h | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/xen/include/xen/multiboot.h b/xen/include/xen/multiboot.h index 9473404775..86b59db1fe 100644 --- a/xen/include/xen/multiboot.h +++ b/xen/include/xen/multiboot.h @@ -18,16 +18,30 @@ #ifndef __MULTIBOOT_H__ #define __MULTIBOOT_H__ + +/* + * Multiboot header structure. + */ +#define MULTIBOOT_HEADER_MAGIC 0x1BADB002 +#define MULTIBOOT_HEADER_MODS_ALIGNED 0x00000001 +#define MULTIBOOT_HEADER_WANT_MEMORY 0x00000002 +#define MULTIBOOT_HEADER_HAS_VBE 0x00000004 +#define MULTIBOOT_HEADER_HAS_ADDR 0x00010000 + /* The magic number passed by a Multiboot-compliant boot loader. */ -#define MULTIBOOT_BOOTLOADER_MAGIC 0x2BADB002 +#define MULTIBOOT_BOOTLOADER_MAGIC 0x2BADB002 #define MBI_MEMLIMITS (1<<0) #define MBI_DRIVES (1<<1) #define MBI_CMDLINE (1<<2) #define MBI_MODULES (1<<3) +#define MBI_AOUT_SYMS (1<<4) +#define MBI_ELF_SYMS (1<<5) #define MBI_MEMMAP (1<<6) #define MBI_LOADERNAME (1<<9) +#ifndef __ASSEMBLY__ + /* The symbol table for a.out. */ typedef struct { u32 tabsize; @@ -47,16 +61,28 @@ typedef struct { /* The Multiboot information. */ typedef struct { u32 flags; + + /* Valid if flags sets MBI_MEMLIMITS */ u32 mem_lower; u32 mem_upper; + + /* Valid if flags sets MBI_DRIVES */ u32 boot_device; + + /* Valid if flags sets MBI_CMDLINE */ u32 cmdline; + + /* Valid if flags sets MBI_MODULES */ u32 mods_count; u32 mods_addr; + + /* Valid if flags sets ... */ union { - aout_symbol_table_t aout_sym; - elf_section_header_table_t elf_sec; + aout_symbol_table_t aout_sym; /* ... MBI_AOUT_SYMS */ + elf_section_header_table_t elf_sec; /* ... MBI_ELF_SYMS */ } u; + + /* Valid if flags sets MBI_MEMMAP */ u32 mmap_length; u32 mmap_addr; } multiboot_info_t; @@ -80,4 +106,7 @@ typedef struct { u32 type; } memory_map_t; + +#endif /* __ASSEMBLY__ */ + #endif /* __MULTIBOOT_H__ */ |