i think it works

This commit is contained in:
maksw committed 2026-04-30 23:52:46 +02:00
commit 0e1479b168
167 files changed
+27008

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
#pragma once
// ke_idt.h - IDT, GDT, and TSS setup
#include <stdint.h>
// 64-bit TSS - minimal; we only care about RSP0.
#pragma pack(push, 1)
typedef struct TSS64 {
uint32_t Reserved0;
uint64_t RSP0; // loaded into RSP on ring-0 entry
uint64_t RSP1;
uint64_t RSP2;
uint64_t Reserved1;
uint64_t IST[7];
uint64_t Reserved2;
uint16_t Reserved3;
uint16_t IoMapBase;
} TSS64;
#pragma pack(pop)
extern TSS64* gTss;
void KeInitializeGdt(void);
void KeInitializeIdt(void);
// Called from hal_timer.c after HPET/APIC timer fires.
void KeTimerInterrupt(void);
// Syscall entry - implemented in ke_syscall.asm.
extern void KeSyscallEntry(void);
// Fault stubs installed by KeInitializeIdt.
extern void KeFaultDE(void); // #DE divide error
extern void KeFaultGP(void); // #GP general protection
extern void KeFaultPF(void); // #PF page fault