PatchworkOS  dbbdc99
A non-POSIX operating system.
Loading...
Searching...
No Matches
cpu.c File Reference
#include <errno.h>
#include <kernel/cpu/cpu.h>
#include <kernel/cpu/gdt.h>
#include <kernel/cpu/idt.h>
#include <kernel/cpu/interrupt.h>
#include <kernel/cpu/ipi.h>
#include <kernel/cpu/simd.h>
#include <kernel/cpu/syscall.h>
#include <kernel/cpu/tss.h>
#include <kernel/drivers/perf.h>
#include <kernel/log/log.h>
#include <kernel/log/panic.h>
#include <kernel/mem/vmm.h>
#include <kernel/sched/sched.h>
#include <kernel/sync/lock.h>
#include <kernel/sync/rwlock.h>
#include <kernel/utils/map.h>
#include <stdatomic.h>
#include <stdint.h>
#include <sys/list.h>
Include dependency graph for cpu.c:

Go to the source code of this file.

Functions

void cpu_init (cpu_t *cpu)
 Initializes a CPU structure.
 
void cpu_stacks_overflow_check (void)
 Checks the current CPU for stack overflows.
 
static void cpu_halt_ipi_handler (ipi_func_data_t *data)
 
uint64_t cpu_halt_others (void)
 Halts all other CPUs.
 
uintptr_t cpu_interrupt_stack_top (void)
 Gets the top of the interrupt stack for the current CPU.
 

Variables

cpu_t_cpus [CPU_MAX] = {0}
 Array of pointers to cpu_t structures for each CPU, indexed by CPU ID.
 
uint16_t _cpuAmount = 0
 The number of CPUs currently identified.
 

Function Documentation

◆ cpu_halt_ipi_handler()

static void cpu_halt_ipi_handler ( ipi_func_data_t data)
static

Definition at line 103 of file cpu.c.

Here is the caller graph for this function: