aboutsummaryrefslogtreecommitdiff
path: root/include/kernel/multiboot.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/kernel/multiboot.h')
-rw-r--r--include/kernel/multiboot.h90
1 files changed, 90 insertions, 0 deletions
diff --git a/include/kernel/multiboot.h b/include/kernel/multiboot.h
new file mode 100644
index 0000000..e1f7cf0
--- /dev/null
+++ b/include/kernel/multiboot.h
@@ -0,0 +1,90 @@
+#include <stdint.h>
+
+struct multiboot_aout_symbol_table_t
+{
+ uint32_t tabsize;
+ uint32_t strsize;
+ uint32_t addr;
+ uint32_t reserved;
+} __attribute__((packed));
+
+struct multiboot_elf_section_header_table_t
+{
+ uint32_t num;
+ uint32_t size;
+ uint32_t addr;
+ uint32_t shndx;
+} __attribute__((packed));
+
+struct vbe_info_t {
+ uint16_t attributes;
+ uint8_t winA, winB;
+ uint16_t granularity;
+ uint16_t winsize;
+ uint16_t segmentA, segmentB;
+ uint32_t realFctPtr;
+ uint16_t pitch;
+ uint16_t Xres, Yres;
+ uint8_t Wchar, Ychar, planes, bpp, banks;
+ uint8_t memory_model, bank_size, image_pages;
+ uint8_t reserved0;
+ uint8_t red_mask, red_position;
+ uint8_t green_mask, green_position;
+ uint8_t blue_mask, blue_position;
+ uint8_t rsv_mask, rsv_position;
+ uint8_t directcolor_attributes;
+ uint32_t physbase;
+ uint32_t reserved1;
+ uint16_t reserved2;
+} __attribute__((packed));
+
+struct multiboot_info_t
+{
+ /* Multiboot info version number */
+ uint32_t flags;
+
+ /* Available memory from BIOS */
+ uint32_t mem_lower;
+ uint32_t mem_upper;
+
+ /* "root" partition */
+ uint32_t boot_device;
+
+ /* Kernel command line */
+ uint32_t cmdline;
+
+ /* Boot-Module list */
+ uint32_t mods_count;
+ uint32_t mods_addr;
+
+ union
+ {
+ struct multiboot_aout_symbol_table_t aout_sym;
+ struct multiboot_elf_section_header_table_t elf_sec;
+ } u;
+
+ /* Memory Mapping buffer */
+ uint32_t mmap_length;
+ uint32_t mmap_addr;
+
+ /* Drive Info buffer */
+ uint32_t drives_length;
+ uint32_t drives_addr;
+
+ /* ROM configuration table */
+ uint32_t config_table;
+
+ /* Boot Loader Name */
+ uint32_t boot_loader_name;
+
+ /* APM table */
+ uint32_t apm_table;
+
+ /* Video */
+ uint32_t vbe_control_info;
+ uint32_t vbe_mode_info;
+ uint16_t vbe_mode;
+ uint16_t vbe_interface_seg;
+ uint16_t vbe_interface_off;
+ uint16_t vbe_interface_len;
+} __attribute__((packed));