From 7819b4a02d9afff1fd4bde3e66b3365655eb1c38 Mon Sep 17 00:00:00 2001 From: 0x35c <> Date: Fri, 28 Nov 2025 11:14:04 +0100 Subject: [PATCH] fix: same thing for alloc_frames --- src/memory/memory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/memory/memory.c b/src/memory/memory.c index e206d66..b5d4bd0 100644 --- a/src/memory/memory.c +++ b/src/memory/memory.c @@ -24,6 +24,7 @@ static void lst_add_back(struct frame_zone **root, struct frame_zone *element) static void add_frame_node(multiboot_memory_map_t *mmmt) { static uint32_t index; + uint32_t *pd = &boot_page_directory; /** * # = kernel code @@ -59,7 +60,7 @@ static void add_frame_node(multiboot_memory_map_t *mmmt) } end_addr = ROUND_CEIL(start_addr + len, PAGE_SIZE); - PD[PDE_FRAME_ZONES] = + pd[PDE_FRAME_ZONES] = ((uint32_t)frame_zones_page_table - VIRT_OFFSET) | INIT_FLAGS; frame_zones_page_table[index] = ((uint32_t)start_addr & PAGE_MASK) | INIT_FLAGS;