|
PatchworkOS
19e446b
A non-POSIX operating system.
|
CPU structure. More...
#include <cpu.h>
Public Member Functions | |
| uint8_t exceptionStackBuffer[CONFIG_INTERRUPT_STACK_PAGES *PAGE_SIZE] | ALIGNED (PAGE_SIZE) |
| uint8_t doubleFaultStackBuffer[CONFIG_INTERRUPT_STACK_PAGES *PAGE_SIZE] | ALIGNED (PAGE_SIZE) |
| uint8_t nmiStackBuffer[CONFIG_INTERRUPT_STACK_PAGES *PAGE_SIZE] | ALIGNED (PAGE_SIZE) |
| uint8_t interruptStackBuffer[CONFIG_INTERRUPT_STACK_PAGES *PAGE_SIZE] | ALIGNED (PAGE_SIZE) |
| uint8_t percpu[CONFIG_PERCPU_SIZE] | ALIGNED (PAGE_SIZE) |
| Buffer used for per-CPU data. | |
Data Fields | |
| cpu_t * | self |
| cpu_id_t | id |
| uint64_t | syscallRsp |
| uint64_t | userRsp |
| volatile bool | inInterrupt |
| uint64_t | oldRflags |
| The rflags value before disabling interrupts. | |
| uint16_t | cli |
The CLI depth counter used in cli_push() and cli_pop(). | |
| tss_t | tss |
| stack_pointer_t | exceptionStack |
| stack_pointer_t | doubleFaultStack |
| stack_pointer_t | nmiStack |
| stack_pointer_t | interruptStack |
CPU structure.
We allocate the stack buffers inside the cpu_t structure to avoid memory allocation during early boot.
Must be stored aligned to a page boundary.
| uint8_t exceptionStackBuffer[CONFIG_INTERRUPT_STACK_PAGES *PAGE_SIZE] cpu_t::ALIGNED | ( | PAGE_SIZE | ) |
| uint8_t doubleFaultStackBuffer[CONFIG_INTERRUPT_STACK_PAGES *PAGE_SIZE] cpu_t::ALIGNED | ( | PAGE_SIZE | ) |
| uint8_t nmiStackBuffer[CONFIG_INTERRUPT_STACK_PAGES *PAGE_SIZE] cpu_t::ALIGNED | ( | PAGE_SIZE | ) |
| uint8_t interruptStackBuffer[CONFIG_INTERRUPT_STACK_PAGES *PAGE_SIZE] cpu_t::ALIGNED | ( | PAGE_SIZE | ) |
| uint8_t percpu[CONFIG_PERCPU_SIZE] cpu_t::ALIGNED | ( | PAGE_SIZE | ) |
Buffer used for per-CPU data.
| uint64_t cpu_t::oldRflags |
| uint16_t cpu_t::cli |
The CLI depth counter used in cli_push() and cli_pop().
| stack_pointer_t cpu_t::exceptionStack |
| stack_pointer_t cpu_t::doubleFaultStack |
| stack_pointer_t cpu_t::nmiStack |
| stack_pointer_t cpu_t::interruptStack |