wip: alloc_femmes now uses multiboot memory mapping

This commit is contained in:
2024-11-13 13:32:14 +01:00
parent 1e35f3b710
commit 09ea386b21
4 changed files with 22 additions and 57 deletions

View File

@ -50,8 +50,8 @@ static void set_mem_size(multiboot_info_t *mbd, uint32_t magic)
i += sizeof(multiboot_memory_map_t)) {
multiboot_memory_map_t *mmmt =
(multiboot_memory_map_t *)(mbd->mmap_addr + i);
if (mmmt->type == MULTIBOOT_MEMORY_AVAILABLE)
mem_size += mmmt->len;
/* if (mmmt->type == MULTIBOOT_MEMORY_AVAILABLE) */
/* mem_size += mmmt->len; */
}
}
@ -66,6 +66,7 @@ void kernel_main(multiboot_info_t *mbd, uint32_t magic)
"I see no way to confuse an array of 256 seg:off pairs with a "
"complex 8*unknown quantity -byte descriptor table. -- Troy "
"Martin 03:50, 22 March 2009 (UTC)\n");
alloc_frames(1);
/* vmalloc(10); */
/* while (vmalloc(10)) */
/* ; */