[−][src]Module sunrise_bootstrap::bootstrap_stack
Bootstrap stack
A bootstrap stack is structured as follow :
j--------------------j < 0xaaaa0000 = BootstrapStack.stack_address | | | | | PAGE GUARD | | | | | j--------------------j | | | | | AAA | | ||| | | | j--------------------j | | | STACK | | | | j----------------j | | | poison value | | j-j----------------j-j < 0xaaaaffff No Page Guard
Since the stack is several pages long, we must ensure the stack respects some alignment in order to be able to find its bottom from any page.
Must be consistent with KernelStack, as kernel considers it's already running on a KernelStack.
Structs
BootstrapStack | A structure representing a kernel stack |
Constants
STACK_ALIGNMENT | The alignment of the stack. |
STACK_SIZE | The size of a kernel stack in pages, not accounting for the page guard |
STACK_SIZE_WITH_GUARD | The size of a kernel stack in pages, with the page guard. |
STACK_SIZE_WITH_GUARD_IN_BYTES | The size of the kernel stack, with the page guard, as a byte count instead of a page count. Used to calculate alignment. |