adds a utility to dump the gdt, adds serial printing for printf in testing

This commit is contained in:
2025-05-30 13:49:37 -04:00
parent 1a60e91745
commit 47056f7d9a
4 changed files with 25 additions and 9 deletions

View File

@ -8,15 +8,13 @@
#include <kernel/x86/idt.h>
#include <kernel/x86/pic.h>
uint64_t gdt[GDT_SIZE];
void kmain(void)
{
#ifdef __TESTING__ // important components should be declared first, but if we're testing we want to log all of that
terminal_initialize();
serial_initialize();
#endif
gdt_init(gdt);
gdt_init();
idt_init();
PIC_remap(0x20, 0x28);
@ -24,8 +22,4 @@ void kmain(void)
terminal_initialize();
serial_initialize();
#endif
printf("Integer: %1\n", gdt[1]);
printf("Hex Int: %x\n", 2);
}