1 #ifndef SYS_X86_MACHINE_MULTIBOOT_H
2 # define SYS_X86_MACHINE_MULTIBOOT_H 1
4 # define MULTIBOOT_HEADER_MAGIC 0x1BADB002
5 # define MULTIBOOT_BOOTLOADER_MAGIC 0x2BADB002
7 # define MULTIBOOT_MOD_ALIGN 1 << 12
8 # define MULTIBOOT_INFO_ALIGN 1 << 2
10 # define MULTIBOOT_HEADER_PAGE_ALIGN 1 << 0
11 # define MULTIBOOT_HEADER_MEM_INFO 1 << 1
12 # define MULTIBOOT_HEADER_VIDEO_MODE 1 << 2
14 # define MULTIBOOT_INFO_MEM 1 << 0
15 # define MULTIBOOT_INFO_BOOT_DEVICE 1 << 1
16 # define MULTIBOOT_INFO_CMDLINE 1 << 2
17 # define MULTIBOOT_INFO_MODS 1 << 3
18 # define MULTIBOOT_INFO_AOUT_SYMS 1 << 4
19 # define MULTIBOOT_INFO_AOUT_SHDR 1 << 5
20 # define MULTIBOOT_INFO_MMAP 1 << 6
21 # define MULTIBOOT_INFO_DRIVES 1 << 7
22 # define MULTIBOOT_INFO_CONFIG_TABLE 1 << 8
23 # define MULTIBOOT_INFO_BOOTLOADER_NAME 1 << 9
24 # define MULTIBOOT_INFO_APM_TABLE 1 << 10
25 # define MULTIBOOT_INFO_VBE 1 << 11
26 # define MULTIBOOT_INFO_FRAMEBUFFER 1 << 12
28 # define MULTIBOOT_DRIVE_CHS 0
29 # define MULTIBOOT_DRIVE_LBA 1
31 # ifndef __ASSEMBLER__
54 uint32_t drives_length;
57 uint32_t config_table;
59 uint32_t bootloader_name;
63 uint32_t vbe_control_info;
64 uint32_t vbe_mode_info;
65 uint32_t vbe_interface_seg;
66 uint32_t vbe_interface_off;
67 uint32_t vbe_interface_len;
69 uint64_t framebuffer_addr;
70 uint32_t framebuffer_pitch;
71 uint32_t framebuffer_width;
72 uint32_t framebuffer_height;
73 uint8_t framebuffer_bpp;
74 uint8_t framebuffer_type;
91 uint16_t drive_cylinders;
93 uint8_t drive_sectors;
96 int multiboot_entry(
Multiboot *boot_info);