C userspace programs

This commit is contained in:
2025-09-04 23:20:30 +02:00
parent afa4d383e0
commit 90266f044b
51 changed files with 259 additions and 174 deletions

View File

@ -13,24 +13,13 @@
#define HAL_CPU_STAR 0xC0000081
#define HAL_CPU_LSTAR 0xC0000082
#define HAL_CPU_CSTAR 0xC0000083
#define HAL_CPU_SFMASK 0xC0000084
#define HAL_CPU_FMASK 0xC0000084
#define HAL_CPU_FSBASE 0xC0000100
#define HAL_CPU_GSBASE 0xC0000101
#define HAL_CPU_KGSBASE 0xC0000102
typedef struct {
uint64_t *syscall_kstack;
uint64_t *syscall_ustack;
PgTable *kcr3;
PgTable *pcr3;
IntrStackFrame *frame;
} PACKED LocalCpuData;
uint64_t hal_cpu_rdmsr(uint32_t id);
uint64_t hal_cpu_wrmsr(uint32_t id, uint64_t val);
void hal_cpu_init(uint32_t cpu);
extern LocalCpuData HAL_CPUS[HAL_CPUS_MAX];
#endif // HAL_CPU_H_