Rework x86_64 paging and vmm
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
#include "bootinfo/bootinfo.h"
|
||||
#include "spinlock/spinlock.h"
|
||||
#include "util/util.h"
|
||||
#include "hal/hal.h"
|
||||
|
||||
PhysMem PHYS_MEM;
|
||||
|
||||
@ -13,7 +14,6 @@ void pmm_init(void) {
|
||||
spinlock_init(&PHYS_MEM.spinlock);
|
||||
|
||||
BitMap *bm = &PHYS_MEM.self;
|
||||
bm->init = false;
|
||||
|
||||
bm->nblocks = _DIV_ROUNDUP(BOOT_INFO.memmap_total, BITMAP_BLOCK_SIZE);
|
||||
bm->nbytes = _DIV_ROUNDUP(bm->nblocks, 8);
|
||||
@ -48,7 +48,6 @@ void pmm_init(void) {
|
||||
bm->alloc_blocks = 0;
|
||||
|
||||
LOG("pmm", "phys bitmap init 0x%lx, size = 0x%lx\n", physbegin, bm->nbytes);
|
||||
bm->init = true;
|
||||
}
|
||||
|
||||
void *pmm_alloc(size_t pages) {
|
||||
|
Reference in New Issue
Block a user