ArvernOS
Loading...
Searching...
No Matches
multiboot.h File Reference
#include <boot.h>
#include <stdbool.h>
#include <stdint.h>
Include dependency graph for multiboot.h:
This graph shows which files directly or indirectly include this file:

Data Structures

struct  multiboot_tag_t
struct  multiboot_info_t
struct  multiboot_tag_string_t
struct  multiboot_tag_module_t
struct  multiboot_mmap_entry_t
struct  multiboot_tag_mmap_t
struct  multiboot_elf_sections_entry_t
struct  multiboot_tag_elf_sections_t
struct  multiboot_color_t
struct  multiboot_tag_framebuffer_common_t
struct  multiboot_tag_framebuffer_t

Functions

void multiboot_init (multiboot_info_t *mbi)
multiboot_tag_framebuffer_t * multiboot_get_framebuffer ()
void multiboot_get_boot_info (boot_info_t *info)
multiboot_info_t * multiboot_get_info ()
multiboot_tag_mmap_t * multiboot_get_mmap ()
void * multiboot_find (uint16_t type)

Detailed Description

See also
https://www.gnu.org/software/grub/manual/multiboot2/multiboot.html

This module manages the Multiboot 2 boot information, which is handed over by the bootloader (GRUB) when the kernel is loaded using the Multiboot 2 header (see asm/multiboot_header.asm).

Function Documentation

◆ multiboot_find()

void * multiboot_find ( uint16_t type)

Finds and returns a pointer to a specific "tag" in the multiboot information. multiboot_init() should be called first.

Parameters
typethe type of the tag to find
Returns
a pointer to a multiboot tag structure or 0

◆ multiboot_get_boot_info()

void multiboot_get_boot_info ( boot_info_t * info)

Fills the boot information from the multiboot information.

Parameters
infothe boot information to fill
Todo
Add support for more than one module. While most tags are unique in Multiboot2, this isn't the case for modules.

◆ multiboot_get_framebuffer()

multiboot_tag_framebuffer_t * multiboot_get_framebuffer ( )

Returns the linear framebuffer tag.

Returns
a pointer to the framebuffer tag or 0

◆ multiboot_get_info()

multiboot_info_t * multiboot_get_info ( )

Returns the multiboot information structure.

Returns
a pointer to the multiboot information structure or 0

◆ multiboot_get_mmap()

multiboot_tag_mmap_t * multiboot_get_mmap ( )

Returns the memory map tag.

Returns
a pointer to the memory map tag or 0

◆ multiboot_init()

void multiboot_init ( multiboot_info_t * mbi)

Initializes the multiboot module with the multiboot information structure.

Parameters
mbithe multiboot information structure