user: implement mlibc as the libc, finally.
It's finally done.. Signed-off-by: kaguya <vpshinomiya@protonmail.com>
This commit is contained in:
+10
-1
@@ -320,4 +320,13 @@ fail:
|
||||
spinlock_drop(&pagemap->lock);
|
||||
printf("Invalid Phys!\n");
|
||||
return INVALID_PHYS;
|
||||
}
|
||||
}
|
||||
|
||||
uintptr_t find_free_vaddr(struct pagemap *pm, size_t len) {
|
||||
// Very naive for now - start from a high address
|
||||
static uintptr_t next = 0x700050000000ULL;
|
||||
|
||||
uintptr_t addr = next;
|
||||
next += ALIGN_UP(len, 0x1000000ULL); // 16 MiB alignment for simplicity
|
||||
return addr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user