12 #define MULTIBOOT_HEADER_MAGIC 0x1BADB002U
13 #define MULTIBOOT_BOOTLOADER_MAGIC 0x2BADB002U
15 #define MULTIBOOT_FLAG_MEM 0x00000001U
16 #define MULTIBOOT_FLAG_DEVICE 0x00000002U
17 #define MULTIBOOT_FLAG_CMDLINE 0x00000004U
18 #define MULTIBOOT_FLAG_MODS 0x00000008U
19 #define MULTIBOOT_FLAG_AOUT 0x00000010U
20 #define MULTIBOOT_FLAG_ELF 0x00000020U
21 #define MULTIBOOT_FLAG_MMAP 0x00000040U
22 #define MULTIBOOT_FLAG_DRIVE_INFO 0x00000080U
23 #define MULTIBOOT_FLAG_CONFIG_TABLE 0x00000100U
24 #define MULTIBOOT_FLAG_BOOT_LOADER_NAME 0x00000200U
25 #define MULTIBOOT_FLAG_APM_TABLE 0x00000400U
26 #define MULTIBOOT_FLAG_VBE_INFO 0x00000800U
27 #define MULTIBOOT_FLAG_FRAMEBUFFER_INFO 0x00001000U
29 #define MULTIBOOT_MEMORY_AVAILABLE 1
30 #define MULTIBOOT_MEMORY_RESERVED 2
struct multiboot_elf_section_header_table_t multiboot_elf_section_header_table_t
The section header table for ELF.
multiboot_memory_map_t * mmap_first_entry_of_type(multiboot_info_t *info, uint32_t type)
The first entry of the given type.
Definition: multiboot.c:27
void dump_multiboot(multiboot_info_t *mboot_ptr)
Prints as debugging output the info regarding the multiboot.
Definition: multiboot.c:90
struct multiboot_memory_map_t multiboot_memory_map_t
Stores information about memory mapping.
multiboot_module_t * next_module(multiboot_info_t *info, multiboot_module_t *mod)
Finds the next module after the one we provide.
Definition: multiboot.c:79
struct multiboot_info_t multiboot_info_t
Multiboot information structure.
multiboot_memory_map_t * mmap_next_entry_of_type(multiboot_info_t *info, multiboot_memory_map_t *entry, uint32_t type)
Returns the next mmap entry of the given type.
Definition: multiboot.c:47
char * mmap_type_name(multiboot_memory_map_t *entry)
Returns the type of the entry as string.
Definition: multiboot.c:57
multiboot_module_t * first_module(multiboot_info_t *info)
Finds the first module.
Definition: multiboot.c:68
struct multiboot_aout_symbol_table_t multiboot_aout_symbol_table_t
The symbol table for a.out.
multiboot_memory_map_t * mmap_next_entry(multiboot_info_t *info, multiboot_memory_map_t *entry)
Returns the next mmap entry.
Definition: multiboot.c:37
struct multiboot_module_t multiboot_module_t
Stores information about a module.
multiboot_memory_map_t * mmap_first_entry(multiboot_info_t *info)
Returns the first mmap entry.
Definition: multiboot.c:19
Standard integer data-types.
unsigned short uint16_t
Define the unsigned 16-bit integer.
Definition: stdint.h:24
unsigned int uint32_t
Define the unsigned 32-bit integer.
Definition: stdint.h:18
unsigned char uint8_t
Define the unsigned 8-bit integer.
Definition: stdint.h:30
The symbol table for a.out.
Definition: multiboot.h:77
uint32_t reserved
TODO: Comment.
Definition: multiboot.h:85
uint32_t strsize
TODO: Comment.
Definition: multiboot.h:81
uint32_t tabsize
TODO: Comment.
Definition: multiboot.h:79
uint32_t addr
TODO: Comment.
Definition: multiboot.h:83
Multiboot information structure.
Definition: multiboot.h:130
uint32_t vbe_mode
Current VBE mode.
Definition: multiboot.h:171
uint32_t framebuffer_addr
TODO: Comment.
Definition: multiboot.h:179
uint32_t mem_upper
Upper memory available from the BIOS.
Definition: multiboot.h:136
uint32_t mods_count
Amount of modules loaded.
Definition: multiboot.h:142
uint32_t cmdline
Pointer to the boot command line.
Definition: multiboot.h:140
uint8_t framebuffer_blue_field_position
TODO: Comment.
Definition: multiboot.h:210
multiboot_aout_symbol_table_t aout_sym
Symbol table for aout file.
Definition: multiboot.h:148
uint32_t vbe_control_info
Pointer to the VBE control info structure.
Definition: multiboot.h:167
uint32_t mods_addr
Address to the first module structure.
Definition: multiboot.h:144
multiboot_elf_section_header_table_t elf_sec
Elf section header table for elf file.
Definition: multiboot.h:150
uint8_t framebuffer_red_mask_size
TODO: Comment.
Definition: multiboot.h:204
uint32_t boot_loader_name
Boot Loader Name.
Definition: multiboot.h:163
uint32_t apm_table
APM table.
Definition: multiboot.h:165
uint8_t framebuffer_green_field_position
TODO: Comment.
Definition: multiboot.h:206
uint32_t framebuffer_type
TODO: Comment.
Definition: multiboot.h:189
uint32_t mmap_length
Memory map length.
Definition: multiboot.h:153
uint8_t framebuffer_green_mask_size
TODO: Comment.
Definition: multiboot.h:208
uint32_t vbe_mode_info
Pointer to the VBE mode info structure.
Definition: multiboot.h:169
uint32_t vbe_interface_off
VBE3.0 interface segment offset.
Definition: multiboot.h:175
uint32_t flags
Multiboot info version number.
Definition: multiboot.h:132
uint32_t framebuffer_palette_addr
TODO: Comment.
Definition: multiboot.h:195
uint32_t framebuffer_bpp
TODO: Comment.
Definition: multiboot.h:187
uint32_t drives_addr
Drive map address.
Definition: multiboot.h:159
uint32_t boot_device
Boot device ID.
Definition: multiboot.h:138
uint8_t framebuffer_blue_mask_size
TODO: Comment.
Definition: multiboot.h:212
uint32_t mem_lower
Lower memory available from the BIOS.
Definition: multiboot.h:134
uint16_t framebuffer_palette_num_colors
TODO: Comment.
Definition: multiboot.h:197
uint32_t framebuffer_pitch
TODO: Comment.
Definition: multiboot.h:181
uint32_t framebuffer_width
TODO: Comment.
Definition: multiboot.h:183
uint32_t drives_length
Drive map length.
Definition: multiboot.h:157
uint32_t framebuffer_height
TODO: Comment.
Definition: multiboot.h:185
struct multiboot_info_t::@8::@10 rgb_field
TODO: Comment.
union multiboot_info_t::@8 framebuffer_info
TODO: Comment.
union multiboot_info_t::@7 u
Contains data either of an aout or elf file.
uint8_t framebuffer_red_field_position
TODO: Comment.
Definition: multiboot.h:202
struct multiboot_info_t::@8::@9 palette_field
TODO: Comment.
uint32_t config_table
ROM configuration table.
Definition: multiboot.h:161
uint32_t mmap_addr
Memory map address.
Definition: multiboot.h:155
uint32_t vbe_interface_seg
VBE3.0 interface segment.
Definition: multiboot.h:173
uint32_t vbe_interface_len
VBE3.0 interface segment length.
Definition: multiboot.h:177
Stores information about memory mapping.
Definition: multiboot.h:114
uint32_t base_addr_high
Higher bytes of the base address.
Definition: multiboot.h:120
uint32_t length_high
Higher bytes of the length.
Definition: multiboot.h:124
uint32_t type
Memory type.
Definition: multiboot.h:126
uint32_t size
Size of this entry.
Definition: multiboot.h:116
uint32_t base_addr_low
Lower bytes of the base address.
Definition: multiboot.h:118
uint32_t length_low
Lower bytes of the length.
Definition: multiboot.h:122
Stores information about a module.
Definition: multiboot.h:101
uint32_t cmdline
Module command line.
Definition: multiboot.h:108
uint32_t pad
Padding to take it to 16 bytes (must be zero).
Definition: multiboot.h:110
uint32_t mod_end
The ending address of the modules.
Definition: multiboot.h:106
uint32_t mod_start
The starting address of the modules.
Definition: multiboot.h:104