fix: remove imcomplete page

This commit is contained in:
Starnakin 2024-11-26 14:16:24 +01:00
parent da804296c6
commit 8203b36092

View File

@ -90,7 +90,8 @@ static void add_frame_node(multiboot_memory_map_t *mmmt)
*/ */
if (KERNEL_START <= start_addr && KERNEL_END > start_addr && if (KERNEL_START <= start_addr && KERNEL_END > start_addr &&
KERNEL_END <= end_addr) { KERNEL_END <= end_addr) {
len = len - (KERNEL_END - start_addr); len = ROUND_CEIL(len - (KERNEL_END - start_addr), PAGE_SIZE) -
PAGE_SIZE; // cringe but ROUND_FLOOR is un poquito crampte
start_addr = ROUND_CEIL(KERNEL_END, PAGE_SIZE); start_addr = ROUND_CEIL(KERNEL_END, PAGE_SIZE);
} }
end_addr = ROUND_CEIL(start_addr + len, PAGE_SIZE); end_addr = ROUND_CEIL(start_addr + len, PAGE_SIZE);