[][src]Function stivale::load

pub unsafe fn load(address: usize) -> StivaleStructure

Load the stivale structure from an address

The structure pointer is passed in the EDI register

Examples

This example is not tested
let stivale_struct_ptr: u64;
unsafe { asm!("mov $2, %rax" : "=r"(stivale_struct_ptr)) };
let stivale_struct = unsafe { stivale::load(stivale_struct_ptr as usize) };
This example is not tested
fn kernel_main(stivale_struct_ptr: usize) {
    let stivale_struct = unsafe { stivale::load(stivale_struct_ptr) };
}