move arch include dir

This commit is contained in:
Matheus
2023-04-08 19:28:58 -03:00
parent 320cc13d75
commit 1555becce5
8 changed files with 9 additions and 1 deletions
+24
View File
@@ -0,0 +1,24 @@
#ifndef _CPU_H
#define _CPU_H
#include <stddef.h>
#include <stdint.h>
#include <arch/msr.h>
#include <arch/ist.h>
typedef struct {
uint64_t gdt[7];
ist_t ist;
int lapicid;
} cpu_t;
static inline cpu_t *_cpu() {
return (cpu_t *)rdmsr(MSR_GSBASE);
}
static inline void cpu_set(cpu_t *ptr) {
wrmsr(MSR_GSBASE, (uint64_t)ptr);
}
#endif