feat(cpu): add GDT and TSS for ring 0 and ring 3 segments

This commit is contained in:
dualfroz committed 2026-08-24 16:24:42 +02:00
1 parent 7b52e9d3f9
commit 4843406bf3
4 files changed
+117

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
#ifndef FROSTBYTE_GDT_H
#define FROSTBYTE_GDT_H
#include "types.h"
#define kernelCodeSelector 0x08
#define kernelDataSelector 0x10
#define userCodeSelector 0x18
#define userDataSelector 0x20
#define tssSelector 0x28
void gdtInit(void);
void gdtInstallTss(uint64 base, uint32 limit);
#endif
+9
View File
@@ -0,0 +1,9 @@
#ifndef FROSTBYTE_TSS_H
#define FROSTBYTE_TSS_H
#include "types.h"
void tssInit(uint64 rsp0);
void tssSetRsp0(uint64 rsp0);
#endif