19#define STACK_POINTER_GUARD_PAGES 1
void stack_pointer_deinit_buffer(stack_pointer_t *stack)
Deinitializes a stack pointer structure that was initialized using stack_pointer_init_buffer().
uint64_t stack_pointer_init_buffer(stack_pointer_t *stack, void *buffer, uint64_t pages)
Initializes a stack pointer structure using a provided buffer, does not allocate or map any memory.
void stack_pointer_deinit(stack_pointer_t *stack, thread_t *thread)
Deinitializes a stack pointer structure and unmaps any mapped memory.
bool stack_pointer_overlaps_guard(stack_pointer_t *stack, uintptr_t addr, uint64_t length)
Check if an region overlaps the guard.
uint64_t stack_pointer_init(stack_pointer_t *stack, uintptr_t maxAddress, uint64_t maxPages)
Initializes a stack pointer structure, does not allocate or map any memory.
bool stack_pointer_is_in_stack(stack_pointer_t *stack, uintptr_t addr, uint64_t length)
Check if an region is within the stack.
EFI_PHYSICAL_ADDRESS buffer
__UINTPTR_TYPE__ uintptr_t
Structure to define a stack in memory.
uintptr_t top
The top of the stack, this address is not inclusive.
uintptr_t guardTop
The top of the guard page, this address is inclusive.
uintptr_t bottom
The bottom of the stack, this address is inclusive.
uintptr_t guardBottom
The bottom of the guard page, this address is inclusive.
uintptr_t lastPageFault
The last page that caused a page fault, used to prevent infinite loops.
Thread of execution structure.