[denali] Add a stub client for denali

This commit is contained in:
Drew Galbraith 2023-06-19 22:57:08 -07:00
parent a202bf2371
commit 45cf2115da
5 changed files with 63 additions and 1 deletions

View file

@ -35,3 +35,11 @@ MappedMemoryRegion MappedMemoryRegion::Default(uint64_t size) {
return MappedMemoryRegion(vmmo_cap, 0, vaddr, size);
}
MappedMemoryRegion MappedMemoryRegion::FromCapability(z_cap_t vmmo_cap) {
uint64_t vaddr;
check(ZAddressSpaceMap(gSelfVmasCap, 0, vmmo_cap, &vaddr));
// FIXME: get the size here.
return MappedMemoryRegion(vmmo_cap, 0, vaddr, 0);
}