Kernel: Implement dummy IDT and GDT for i386

This commit is contained in:
Bananymous 2024-03-26 00:08:11 +02:00
parent 2dd0bfdece
commit 097d9a6479
3 changed files with 54 additions and 0 deletions

View File

@ -124,6 +124,8 @@ elseif("${BANAN_ARCH}" STREQUAL "i386")
set(KERNEL_SOURCES set(KERNEL_SOURCES
${KERNEL_SOURCES} ${KERNEL_SOURCES}
arch/i386/boot.S arch/i386/boot.S
arch/i386/GDT.cpp
arch/i386/IDT.cpp
arch/i386/PageTable.cpp arch/i386/PageTable.cpp
arch/i386/Signal.S arch/i386/Signal.S
arch/i386/Syscall.S arch/i386/Syscall.S

21
kernel/arch/i386/GDT.cpp Normal file
View File

@ -0,0 +1,21 @@
#include <kernel/GDT.h>
namespace Kernel
{
GDT* GDT::create()
{
ASSERT_NOT_REACHED();
}
void GDT::write_entry(uint8_t, uint32_t, uint32_t, uint8_t, uint8_t)
{
ASSERT_NOT_REACHED();
}
void GDT::write_tss()
{
ASSERT_NOT_REACHED();
}
}

31
kernel/arch/i386/IDT.cpp Normal file
View File

@ -0,0 +1,31 @@
#include <kernel/IDT.h>
namespace Kernel
{
IDT* IDT::create()
{
ASSERT_NOT_REACHED();
}
[[noreturn]] void IDT::force_triple_fault()
{
ASSERT_NOT_REACHED();
}
void IDT::register_irq_handler(uint8_t, Interruptable*)
{
ASSERT_NOT_REACHED();
}
void IDT::register_interrupt_handler(uint8_t, void (*)())
{
ASSERT_NOT_REACHED();
}
void IDT::register_syscall_handler(uint8_t, void (*)())
{
ASSERT_NOT_REACHED();
}
}