PatchworkOS
Loading...
Searching...
No Matches
cpu_t Struct Reference

CPU structure. More...

#include <cpu.h>

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 interruptStackBuffer[CONFIG_INTERRUPT_STACK_PAGES *PAGE_SIZEALIGNED (PAGE_SIZE)
 

Data Fields

cpuid_t id
 
lapic_id_t lapicId
 
tss_t tss
 
vmm_cpu_ctx_t vmm
 
interrupt_ctx_t interrupt
 
statistics_cpu_ctx_t stat
 
timer_ctx_t timer
 
wait_cpu_ctx_t wait
 
sched_cpu_ctx_t sched
 
rand_cpu_ctx_t rand
 
stack_pointer_t exceptionStack
 
stack_pointer_t doubleFaultStack
 
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 41 of file cpu.h.

Member Function Documentation

◆ ALIGNED() [1/3]

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

◆ ALIGNED() [2/3]

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

◆ ALIGNED() [3/3]

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

Field Documentation

◆ doubleFaultStack

stack_pointer_t cpu_t::doubleFaultStack

Definition at line 54 of file cpu.h.

Referenced by cpu_init(), and cpu_stacks_overflow_check().

◆ exceptionStack

stack_pointer_t cpu_t::exceptionStack

Definition at line 53 of file cpu.h.

Referenced by cpu_init(), and cpu_stacks_overflow_check().

◆ id

◆ interrupt

interrupt_ctx_t cpu_t::interrupt

Definition at line 47 of file cpu.h.

Referenced by cpu_init(), interrupt_disable(), interrupt_enable(), and interrupt_handler().

◆ interruptStack

stack_pointer_t cpu_t::interruptStack

Definition at line 55 of file cpu.h.

Referenced by cpu_init(), and cpu_stacks_overflow_check().

◆ lapicId

lapic_id_t cpu_t::lapicId

Definition at line 44 of file cpu.h.

Referenced by cpu_init(), ioapic_set_redirect(), space_tlb_shootdown(), and timer_notify().

◆ rand

rand_cpu_ctx_t cpu_t::rand

Definition at line 52 of file cpu.h.

Referenced by rand_gen().

◆ sched

◆ stat

◆ timer

◆ tss

tss_t cpu_t::tss

Definition at line 45 of file cpu.h.

Referenced by cpu_init().

◆ vmm

vmm_cpu_ctx_t cpu_t::vmm

Definition at line 46 of file cpu.h.

Referenced by cpu_init(), space_load(), space_tlb_shootdown(), vmm_init(), and vmm_shootdown_handler().

◆ wait

wait_cpu_ctx_t cpu_t::wait

Definition at line 50 of file cpu.h.

Referenced by cpu_init(), wait_block_finalize(), and wait_timer_handler().


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