fix: same thing for alloc_frames
This commit is contained in:
@ -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 void add_frame_node(multiboot_memory_map_t *mmmt)
|
||||||
{
|
{
|
||||||
static uint32_t index;
|
static uint32_t index;
|
||||||
|
uint32_t *pd = &boot_page_directory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* # = kernel code
|
* # = 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);
|
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;
|
((uint32_t)frame_zones_page_table - VIRT_OFFSET) | INIT_FLAGS;
|
||||||
frame_zones_page_table[index] =
|
frame_zones_page_table[index] =
|
||||||
((uint32_t)start_addr & PAGE_MASK) | INIT_FLAGS;
|
((uint32_t)start_addr & PAGE_MASK) | INIT_FLAGS;
|
||||||
|
|||||||
Reference in New Issue
Block a user