MentOS  0.8.0
The Mentoring Operating System
Classes | Macros | Typedefs | Functions
multiboot.h File Reference

Data structures used for multiboot. More...

Go to the source code of this file.

Classes

struct  multiboot_aout_symbol_table_t
 The symbol table for a.out. More...
 
struct  multiboot_elf_section_header_table_t
 The section header table for ELF. More...
 
struct  multiboot_module_t
 Stores information about a module. More...
 
struct  multiboot_memory_map_t
 Stores information about memory mapping. More...
 
struct  multiboot_info_t
 Multiboot information structure. More...
 

Macros

#define MULTIBOOT_HEADER_MAGIC   0x1BADB002U
 The magic field should contain this.
 
#define MULTIBOOT_BOOTLOADER_MAGIC   0x2BADB002U
 This should be in eax.
 
#define MULTIBOOT_FLAG_MEM   0x00000001U
 Is there basic lower/upper memory information?
 
#define MULTIBOOT_FLAG_DEVICE   0x00000002U
 Is there a boot device set?
 
#define MULTIBOOT_FLAG_CMDLINE   0x00000004U
 Is the command-line defined?
 
#define MULTIBOOT_FLAG_MODS   0x00000008U
 Are there modules to do something with?
 
#define MULTIBOOT_FLAG_AOUT   0x00000010U
 Is there a symbol table loaded?
 
#define MULTIBOOT_FLAG_ELF   0x00000020U
 Is there an ELF section header table?
 
#define MULTIBOOT_FLAG_MMAP   0x00000040U
 Is there a full memory map?
 
#define MULTIBOOT_FLAG_DRIVE_INFO   0x00000080U
 Is there drive info?
 
#define MULTIBOOT_FLAG_CONFIG_TABLE   0x00000100U
 Is there a config table?
 
#define MULTIBOOT_FLAG_BOOT_LOADER_NAME   0x00000200U
 Is there a boot loader name?
 
#define MULTIBOOT_FLAG_APM_TABLE   0x00000400U
 Is there a APM table?
 
#define MULTIBOOT_FLAG_VBE_INFO   0x00000800U
 Is there video information?
 
#define MULTIBOOT_FLAG_FRAMEBUFFER_INFO   0x00001000U
 Is there a framebuffer table?
 
#define MULTIBOOT_MEMORY_AVAILABLE   1
 The memory is available.
 
#define MULTIBOOT_MEMORY_RESERVED   2
 The memory is reserved.
 

Typedefs

typedef struct multiboot_aout_symbol_table_t multiboot_aout_symbol_table_t
 The symbol table for a.out.
 
typedef struct multiboot_elf_section_header_table_t multiboot_elf_section_header_table_t
 The section header table for ELF.
 
typedef struct multiboot_module_t multiboot_module_t
 Stores information about a module.
 
typedef struct multiboot_memory_map_t multiboot_memory_map_t
 Stores information about memory mapping.
 
typedef struct multiboot_info_t multiboot_info_t
 Multiboot information structure.
 

Functions

multiboot_memory_map_tmmap_first_entry (multiboot_info_t *info)
 Returns the first mmap entry. More...
 
multiboot_memory_map_tmmap_first_entry_of_type (multiboot_info_t *info, uint32_t type)
 The first entry of the given type. More...
 
multiboot_memory_map_tmmap_next_entry (multiboot_info_t *info, multiboot_memory_map_t *entry)
 Returns the next mmap entry. More...
 
multiboot_memory_map_tmmap_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. More...
 
char * mmap_type_name (multiboot_memory_map_t *entry)
 Returns the type of the entry as string. More...
 
multiboot_module_tfirst_module (multiboot_info_t *info)
 Finds the first module. More...
 
multiboot_module_tnext_module (multiboot_info_t *info, multiboot_module_t *mod)
 Finds the next module after the one we provide. More...
 
void dump_multiboot (multiboot_info_t *mboot_ptr)
 Prints as debugging output the info regarding the multiboot. More...
 

Detailed Description

Data structures used for multiboot.

Function Documentation

◆ dump_multiboot()

void dump_multiboot ( multiboot_info_t mboot_ptr)

Prints as debugging output the info regarding the multiboot.

Parameters
mboot_ptrThe pointer to the multiboot information.

◆ first_module()

multiboot_module_t* first_module ( multiboot_info_t info)

Finds the first module.

Parameters
infoThe multiboot info from which we extract the information.
Returns
Pointer to the first module.

◆ mmap_first_entry()

multiboot_memory_map_t* mmap_first_entry ( multiboot_info_t info)

Returns the first mmap entry.

Parameters
infoThe multiboot info from which we extract the entry.
Returns
The first entry.

◆ mmap_first_entry_of_type()

multiboot_memory_map_t* mmap_first_entry_of_type ( multiboot_info_t info,
uint32_t  type 
)

The first entry of the given type.

Parameters
infoThe multiboot info from which we extract the entry.
typeThe type of entry we are looking for.
Returns
The first entry of the given type.

◆ mmap_next_entry()

multiboot_memory_map_t* mmap_next_entry ( multiboot_info_t info,
multiboot_memory_map_t entry 
)

Returns the next mmap entry.

Parameters
infoThe multiboot info from which we extract the entry.
entryThe current entry.
Returns
The next entry.

◆ mmap_next_entry_of_type()

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.

Parameters
infoThe multiboot info from which we extract the entry.
entryThe current entry.
typeThe type of entry we are looking for.
Returns
The next entry of the given type.

◆ mmap_type_name()

char* mmap_type_name ( multiboot_memory_map_t entry)

Returns the type of the entry as string.

Parameters
entryThe current entry.
Returns
String representing the type of entry.

◆ next_module()

multiboot_module_t* next_module ( multiboot_info_t info,
multiboot_module_t mod 
)

Finds the next module after the one we provide.

Parameters
infoThe multiboot info from which we extract the information.
modThe current module.
Returns
Pointer to the next module.