Initial commit
This commit is contained in:
commit
cbc51f523e
125 changed files with 34817 additions and 0 deletions
23
src/hal/smp.h
Normal file
23
src/hal/smp.h
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include "../scheduler/sched.h"
|
||||
|
||||
#pragma once
|
||||
|
||||
#define GSBASE 0xC0000101
|
||||
#define KERNELGSBASE 0xC0000102
|
||||
|
||||
typedef struct cpu_state {
|
||||
uint32_t lapic_id;
|
||||
uint64_t lapic_timer_ticks;
|
||||
proc process_list[PROC_MAX];
|
||||
proc *current_process;
|
||||
uint16_t process_count;
|
||||
context scheduler_context;
|
||||
}__attribute((packed))cpu_state;
|
||||
|
||||
void smp_init();
|
||||
cpu_state *get_cpu_struct();
|
||||
uint64_t get_cpu_count();
|
||||
bool get_cpu_struct_initialized();
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue