PatchworkOS  da8a090
A non-POSIX operating system.
Loading...
Searching...
No Matches
cpu_t Struct Reference

CPU structure. More...

#include <cpu.h>

Collaboration diagram for cpu_t:

Public Member Functions

uint8_t exceptionStackBuffer[CONFIG_INTERRUPT_STACK_PAGES *PAGE_SIZEALIGNED (PAGE_SIZE)
 
uint8_t doubleFaultStackBuffer[CONFIG_INTERRUPT_STACK_PAGES *PAGE_SIZEALIGNED (PAGE_SIZE)
 
uint8_t nmiStackBuffer[CONFIG_INTERRUPT_STACK_PAGES *PAGE_SIZEALIGNED (PAGE_SIZE)
 
uint8_t interruptStackBuffer[CONFIG_INTERRUPT_STACK_PAGES *PAGE_SIZEALIGNED (PAGE_SIZE)
 

Data Fields

cpuid_t id
 
atomic_bool needHandlersCheck
 
tss_t tss
 
vmm_cpu_ctx_t vmm
 
interrupt_ctx_t interrupt
 
perf_cpu_ctx_t perf
 
timer_cpu_ctx_t timer
 
wait_t wait
 
sched_t sched
 
rand_cpu_ctx_t rand
 
ipi_cpu_ctx_t ipi
 
stack_pointer_t exceptionStack
 
stack_pointer_t doubleFaultStack
 
stack_pointer_t nmiStack
 
stack_pointer_t interruptStack
 

Detailed Description

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.

Definition at line 121 of file cpu.h.

Member Function Documentation

◆ ALIGNED() [1/4]

uint8_t exceptionStackBuffer[CONFIG_INTERRUPT_STACK_PAGES *PAGE_SIZE] cpu_t::ALIGNED ( PAGE_SIZE  )

◆ ALIGNED() [2/4]

uint8_t doubleFaultStackBuffer[CONFIG_INTERRUPT_STACK_PAGES *PAGE_SIZE] cpu_t::ALIGNED ( PAGE_SIZE  )

◆ ALIGNED() [3/4]

uint8_t nmiStackBuffer[CONFIG_INTERRUPT_STACK_PAGES *PAGE_SIZE] cpu_t::ALIGNED ( PAGE_SIZE  )

◆ ALIGNED() [4/4]

uint8_t interruptStackBuffer[CONFIG_INTERRUPT_STACK_PAGES *PAGE_SIZE] cpu_t::ALIGNED ( PAGE_SIZE  )

Field Documentation

◆ id

cpuid_t cpu_t::id

Definition at line 123 of file cpu.h.

◆ needHandlersCheck

atomic_bool cpu_t::needHandlersCheck

If set, then since the last check, handlers have been registered or unregistered.

Definition at line 127 of file cpu.h.

◆ tss

tss_t cpu_t::tss

Definition at line 128 of file cpu.h.

◆ vmm

vmm_cpu_ctx_t cpu_t::vmm

Definition at line 129 of file cpu.h.

◆ interrupt

interrupt_ctx_t cpu_t::interrupt

Definition at line 130 of file cpu.h.

◆ perf

perf_cpu_ctx_t cpu_t::perf

Definition at line 131 of file cpu.h.

◆ timer

timer_cpu_ctx_t cpu_t::timer

Definition at line 132 of file cpu.h.

◆ wait

wait_t cpu_t::wait

Definition at line 133 of file cpu.h.

◆ sched

sched_t cpu_t::sched

Definition at line 134 of file cpu.h.

◆ rand

rand_cpu_ctx_t cpu_t::rand

Definition at line 135 of file cpu.h.

◆ ipi

ipi_cpu_ctx_t cpu_t::ipi

Definition at line 136 of file cpu.h.

◆ exceptionStack

stack_pointer_t cpu_t::exceptionStack

Definition at line 137 of file cpu.h.

◆ doubleFaultStack

stack_pointer_t cpu_t::doubleFaultStack

Definition at line 138 of file cpu.h.

◆ nmiStack

stack_pointer_t cpu_t::nmiStack

Definition at line 139 of file cpu.h.

◆ interruptStack

stack_pointer_t cpu_t::interruptStack

Definition at line 140 of file cpu.h.


The documentation for this struct was generated from the following file: