The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
video_modes.h File Reference

the video modes the firmware offers, as the bootloader reports them. More...

#include "common/stdint.h"

Go to the source code of this file.

Data Structures

struct  boot_video_mode_t

Macros

#define BOOT_VIDEO_MODES_MAX   64

Functions

uint32_t boot_video_modes (const boot_video_mode_t **modes)
 the list of modes.

Detailed Description

the video modes the firmware offers, as the bootloader reports them.

the limine boot code fills the list (from the framebuffer response, revision 1 and later); other boot paths leave it empty. the fb driver shows it to user space (FBIOGET_MODE).

Macro Definition Documentation

◆ BOOT_VIDEO_MODES_MAX

#define BOOT_VIDEO_MODES_MAX   64

Function Documentation

◆ boot_video_modes()

uint32_t boot_video_modes ( const boot_video_mode_t ** modes)

the list of modes.

the x86_64 boot: read the limine boot protocol responses into a boot_info_t, then call kernel_main.

Parameters
modesreceives a pointer to the first mode.
Returns
the number of modes (0 if the bootloader gave none).

the list of modes.

the kernel puts requests in its image (section .limine_requests, between a start and an end marker). limine finds them before it starts the kernel and writes a pointer to a response into each one it can answer. all pointers in the responses are HHDM addresses (physical + KERNEL_VIRT_BASE). the responses are in bootloader-reclaimable memory, which the PMM does not use, but the kernel copies what it needs anyway.

the request layout is from the limine protocol specification (PROTOCOL.md, base revision 6).