From bb061d2a0ae157d71ac29a20f980f5f3cdd1c266 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Thu, 18 Apr 2024 13:33:15 +0300 Subject: [PATCH] Kernel: Make 32bit not use large pages during boot There is no guarantee that they are supported --- kernel/arch/i686/boot.S | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/kernel/arch/i686/boot.S b/kernel/arch/i686/boot.S index 7e35c728c1..45bd6b0e75 100644 --- a/kernel/arch/i686/boot.S +++ b/kernel/arch/i686/boot.S @@ -82,9 +82,18 @@ boot_pdpt: boot_pd: .set i, 0 .rept 512 - .long i + (PG_PAGE_SIZE | PG_READ_WRITE | PG_PRESENT) + .long V2P(boot_pts) + i + (PG_READ_WRITE | PG_PRESENT) .long 0 - .set i, i + 0x200000 + .set i, i + 0x1000 + .endr +boot_pts: + .set i, 0 + .rept 512 + .rept 512 + .long i + (PG_READ_WRITE | PG_PRESENT) + .long 0 + .set i, i + 0x1000 + .endr .endr boot_gdt: