Big code refactor, get rid of HAL entirely

This commit is contained in:
2025-11-11 21:26:27 +01:00
parent 7015bc9576
commit 566b35f4d5
84 changed files with 477 additions and 520 deletions

29
kernel/cpu/gdt.h Normal file
View File

@ -0,0 +1,29 @@
#ifndef CPU_GDT_H_
#define CPU_GDT_H_
#include <stdint.h>
#include "compiler/attr.h"
#define KCODE 0x08
#define KDATA 0x10
#define UCODE 0x18
#define UDATA 0x20
#define TSS 0x28
typedef struct {
uint32_t resv0;
uint64_t rsp0;
uint64_t rsp1;
uint64_t rsp2;
uint64_t resv1;
uint64_t ist[7];
uint64_t resv2;
uint16_t resv3;
uint16_t iopb_off;
} PACKED Tss;
ALIGNED(16) extern Tss tss;
void gdt_init(void);
#endif // CPU_GDT_H_