fix: same thing for alloc_frames

This commit is contained in:
0x35c
2025-11-28 11:14:04 +01:00
parent 9b1a0f9f4f
commit 7819b4a02d

View File

@ -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;