20 #ifndef KERNEL_BOOTSTRAPINFO_H 21 #define KERNEL_BOOTSTRAPINFO_H 23 #include "pedigree/kernel/compiler.h" 24 #include "pedigree/kernel/processor/types.h" 31 #if defined(MULTIBOOT) 32 #define MULTIBOOT_FLAG_MEM 0x001 33 #define MULTIBOOT_FLAG_DEVICE 0x002 34 #define MULTIBOOT_FLAG_CMDLINE 0x004 35 #define MULTIBOOT_FLAG_MODS 0x008 36 #define MULTIBOOT_FLAG_AOUT 0x010 37 #define MULTIBOOT_FLAG_ELF 0x020 38 #define MULTIBOOT_FLAG_MMAP 0x040 39 #define MULTIBOOT_FLAG_CONFIG 0x080 40 #define MULTIBOOT_FLAG_LOADER 0x100 41 #define MULTIBOOT_FLAG_APM 0x200 42 #define MULTIBOOT_FLAG_VBE 0x400 50 extern "C" int main(
int argc,
char *argv[]);
55 friend int ::main(
int argc,
char *argv[]);
60 bool isInitrdLoaded()
const;
61 uint8_t *getInitrdAddress()
const;
62 size_t getInitrdSize()
const;
64 bool isDatabaseLoaded()
const;
65 uint8_t *getDatabaseAddress()
const;
66 size_t getDatabaseSize()
const;
68 char *getCommandLine()
const;
70 size_t getSectionHeaderCount()
const;
71 size_t getSectionHeaderEntrySize()
const;
72 size_t getSectionHeaderStringTableIndex()
const;
73 uintptr_t getSectionHeaders()
const;
75 void *getMemoryMap()
const;
76 uint64_t getMemoryMapEntryAddress(
void *opaque)
const;
77 uint64_t getMemoryMapEntryLength(
void *opaque)
const;
78 uint32_t getMemoryMapEntryType(
void *opaque)
const;
79 void *nextMemoryMapEntry(
void *opaque)
const;
81 size_t getModuleCount()
const;
82 void *getModuleBase()
const;
85 typedef uintptr_t bootstrap_uintptr_t;
87 typedef uint32_t bootstrap_uintptr_t;
92 bootstrap_uintptr_t base;
93 bootstrap_uintptr_t end;
94 bootstrap_uintptr_t name_ptr;
95 bootstrap_uintptr_t pad;
98 const Module *getModuleArray()
const 100 return reinterpret_cast<const Module *
>(getModuleBase());
111 uint32_t boot_device;
116 bootstrap_uintptr_t mods_addr;
121 bootstrap_uintptr_t addr;
124 uint32_t mmap_length;
127 uint32_t drives_length;
128 uint32_t drives_addr;
130 uint32_t config_table;
132 uint32_t boot_loader_name;
136 uint32_t vbe_control_info;
137 uint32_t vbe_mode_info;
139 uint32_t vbe_interface_seg;
140 uint32_t vbe_interface_off;
141 uint32_t vbe_interface_len;
148 int (*prom)(
struct anon *);
149 uint32_t initrd_start;
158 inline bool isInitrdLoaded()
const 162 inline uint8_t *getInitrdAddress()
const 164 return reinterpret_cast<uint8_t *
>(initrd_start);
166 inline size_t getInitrdSize()
const 168 return initrd_end - initrd_start;
171 char *getCommandLine()
const 173 static char buf[1] = {0};
Bootstrap structure passed to the kernel entry point.