From 5591120deb3d27054406ad22bd6e0d3c6023efa8 Mon Sep 17 00:00:00 2001 From: Starnakin Date: Fri, 28 Nov 2025 16:20:31 +0100 Subject: [PATCH] core: setup recusive paging in boot.s --- src/boot.s | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/boot.s b/src/boot.s index 20c1bba..50fd166 100644 --- a/src/boot.s +++ b/src/boot.s @@ -93,6 +93,10 @@ _start: movl $(boot_page_table1 - 0xC0000000 + 0x003), boot_page_directory - 0xC0000000 + 0 movl $(boot_page_table1 - 0xC0000000 + 0x003), boot_page_directory - 0xC0000000 + 768 * 4 + # Map the recusive paging + movl $(boot_page_directory - 0xC0000000 + 0x003), boot_page_directory - 0xC0000000 + 1023 * 4 + + # Set cr3 to the address of the boot_page_directory. movl $(boot_page_directory - 0xC0000000), %ecx movl %ecx, %cr3