cleans up a bit, adds a pmm panic

This commit is contained in:
2025-06-13 12:58:50 -04:00
parent af596cd43a
commit 99a842df7e
2 changed files with 14 additions and 6 deletions

View File

@ -36,7 +36,11 @@ void verify_memmap(multiboot_info_t* mbd, uint32_t magic)
printf("Start Addr: %4 | Length: %4 | Size: %2 | Type: %d\n",
mmmt->addr, mmmt->len, mmmt->size, mmmt->type);
// This is pretty flaky, we want to actually create a linked list,
// where each block of available memory gets its own mem_block
// not just this main one
// TODO
if (mmmt->addr == 0x100000) {
pmm_add_mem_block((uint32_t) mmmt->addr, (uint32_t) mmmt->len);
}
@ -68,6 +72,7 @@ void _main(multiboot_info_t* mbd, uint32_t magic)
print_main_mem();
pmm_free_block(a);
pmm_free_block(a);
print_main_mem();