Struct stivale_boot::v2::StivaleSmpInfo [−][src]
#[repr(C, packed)]pub struct StivaleSmpInfo { pub acpi_processor_uid: u32, pub lapic_id: u32, pub target_stack: u64, pub goto_address: u64, pub extra: u64, }
Expand description
SMP imformation structure.
Fields
acpi_processor_uid: u32
ACPI Processor UID as specified by MADT.
lapic_id: u32
LAPIC ID as specified by MADT.
target_stack: u64
The stack that will be loaded in ESP/RSP once the goto_address field is loaded. This MUST point to a valid stack of at least 256 bytes in size, and 16-byte aligned. target_stack is an unused field for the struct describing the BSP.
goto_address: u64
This field is polled by the started APs until the kernel on another CPU performs an atomic write to this field. When that happens, bootloader code will load up ESP/RSP with the stack value as specified in target_stack. It will then proceed to load a pointer to this very structure into either register RDI for 64-bit or on the stack for 32-bit, then, goto_address is called (a bogus return address is pushed onto the stack) and execution is handed off. The CPU state will be the same as describedin “kernel entry machine state”, with the exception of ESP/RSP and RDI/stack arg being set up as above. goto_address is an unused field for the struct describing the BSP.
extra: u64
This field is polled by the started APs until the kernel on another CPU performs an atomic write to this field. When that happens, bootloader code will load up ESP/RSP with the stack value as specified in target_stack. It will then proceed to load a pointer to this very structure into either register RDI for 64-bit or on the stack for 32-bit, then, goto_address is called (a bogus return address is pushed onto the stack) and execution is handed off.
The CPU state will be the same as described in “kernel entry machine state”, with the exception of ESP/RSP and RDI/stack arg being set up as above. goto_address is an unused field for the struct describing the BSP.