implements a physical memory manager... sort of, it gives an out of mem error, and variable are setting incorrectly

This commit is contained in:
2025-06-11 20:36:30 -04:00
parent 98f8a0dc88
commit 7669ea32a4
4 changed files with 155 additions and 14 deletions

View File

@ -34,9 +34,10 @@ 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);
// mmmt-> len is in bytes (according to multiboot specification0
// mmmt->len / 1024 == kib // block size == blocks
if (mmmt->addr == 0x100000) {
pmm_add_mem_block((uint32_t) mmmt->addr, (uint32_t) mmmt->len);
}
}
}
@ -57,6 +58,13 @@ void _main(multiboot_info_t* mbd, uint32_t magic)
serial_initialize();
#endif
pmm_init();
print_main_mem();
pmm_alloc_block();
print_main_mem();
//setup_paging();
init_kb();