This commit is contained in:
user
2026-02-03 21:02:33 +01:00
parent 13e63b825d
commit e8818d2b23
4 changed files with 14 additions and 14 deletions

View File

@@ -4,7 +4,6 @@
; Pointer to Long Mode Global Descriptor Table (GDT, arch/gdt.cc)
[EXTERN gdt_long_mode_pointer]
[GLOBAL long_mode]
long_mode:
@@ -247,7 +246,6 @@ long_mode_start:
; Call high-level (C++) kernel initialization function
call kernel_init
; Print `STOP` to screen and stop
mov rax, 0x2f502f4f2f544f53
mov qword [0xb8000], rax

View File

@@ -8,7 +8,7 @@
#include "../compiler/libc.h"
#include "../debug/output.h"
#include "../interrupt/handlers.h"
#include "../memory/pageframealloc.h"
extern "C" [[noreturn]] void kernel_init() {
// Setup and load Interrupt Description Table (IDT)
initInterruptHandlers();
@@ -16,7 +16,9 @@ extern "C" [[noreturn]] void kernel_init() {
// Initialize PICs
PIC::initialize();
// Call global constructors
PageFrameAllocator::init();
// Call global constructors
CSU::initializer();
//Select 5th Segment in GDT. 5<<3 == 0x28