refactor: add architecture

This commit is contained in:
2026-10-02 13:32:40 +02:00
parent c4fb939e48
commit 387db2dcf7
11 changed files with 283 additions and 53 deletions
+18
View File
@@ -0,0 +1,18 @@
#include "./gdt.hpp"
#include "types.hpp"
namespace x86_64 {
struct gdt_descriptor {
u16 size;
const void* offset;
} PACKED;
void load_gdt(const gdt_entry* entries, u32 size) {
gdt_descriptor gdtr{ static_cast<u16>((size - 1) & 0xFFFF), entries };
asm volatile("lgdt %0" : : "m"(gdtr));
}
} // namespace x86_64