Module stivale::header[][src]

Expand description

stivale2 header module for letting a stivale2 compliant bootloader find the kernel

Contains a stivale2 header struct and various tags allowed by stivale2

Examples

Basic header

static STACK: [u8; 4096] = [0; 4096];
 
#[link_section = ".stivale2hdr"]
#[used]
static STIVALE_HDR: StivaleHeader = StivaleHeader::new(STACK[0] as *const u8);

Header with a framebuffer tag

static STACK: [u8; 4096] = [0; 4096];
static FRAMEBUFFER_TAG: HeaderFramebufferTag = HeaderFramebufferTag::new().bpp(24);
 
#[link_section = ".stivale2hdr"]
#[used]
static STIVALE_HDR: StivaleHeader = StivaleHeader::new(STACK[0] as *const u8).tags((&FRAMEBUFFER_TAG as *const HeaderFramebufferTag).cast());

Re-exports

pub use framebuffer::*;
pub use paging::*;

Modules

Structs

A stivale2 header for the bootloader