PatchworkOS  19e446b
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)
 
uint8_t percpu[CONFIG_PERCPU_SIZEALIGNED (PAGE_SIZE)
 Buffer used for per-CPU data.
 

Data Fields

cpu_tself
 
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
 

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 83 of file cpu.h.

Member Function Documentation

◆ ALIGNED() [1/5]

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

◆ ALIGNED() [2/5]

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

◆ ALIGNED() [3/5]

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

◆ ALIGNED() [4/5]

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

◆ ALIGNED() [5/5]

uint8_t percpu[CONFIG_PERCPU_SIZE] cpu_t::ALIGNED ( PAGE_SIZE  )

Buffer used for per-CPU data.

Field Documentation

◆ self

cpu_t* cpu_t::self

Definition at line 85 of file cpu.h.

◆ id

cpu_id_t cpu_t::id

Definition at line 86 of file cpu.h.

◆ syscallRsp

uint64_t cpu_t::syscallRsp

Definition at line 87 of file cpu.h.

◆ userRsp

uint64_t cpu_t::userRsp

Definition at line 88 of file cpu.h.

◆ inInterrupt

volatile bool cpu_t::inInterrupt

Definition at line 89 of file cpu.h.

◆ oldRflags

uint64_t cpu_t::oldRflags

The rflags value before disabling interrupts.

Definition at line 90 of file cpu.h.

◆ cli

uint16_t cpu_t::cli

The CLI depth counter used in cli_push() and cli_pop().

Definition at line 91 of file cpu.h.

◆ tss

tss_t cpu_t::tss

Definition at line 92 of file cpu.h.

◆ exceptionStack

stack_pointer_t cpu_t::exceptionStack

Definition at line 93 of file cpu.h.

◆ doubleFaultStack

stack_pointer_t cpu_t::doubleFaultStack

Definition at line 94 of file cpu.h.

◆ nmiStack

stack_pointer_t cpu_t::nmiStack

Definition at line 95 of file cpu.h.

◆ interruptStack

stack_pointer_t cpu_t::interruptStack

Definition at line 96 of file cpu.h.


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