[denali] Get all caps from the init port.
This allows us to remove the bootstrap capabilities for good woo hoo!
This commit is contained in:
parent
6e86ce67f0
commit
7dcbbd671e
11 changed files with 62 additions and 28 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#include <zinit.h>
|
||||
|
||||
#include "mammoth/debug.h"
|
||||
#include "mammoth/init.h"
|
||||
|
||||
MappedMemoryRegion MappedMemoryRegion::DirectPhysical(uint64_t paddr,
|
||||
uint64_t size) {
|
||||
|
|
@ -11,7 +12,7 @@ MappedMemoryRegion MappedMemoryRegion::DirectPhysical(uint64_t paddr,
|
|||
check(ZMemoryObjectCreatePhysical(paddr, size, &vmmo_cap));
|
||||
|
||||
uint64_t vaddr;
|
||||
check(ZAddressSpaceMap(Z_INIT_VMAS_SELF, 0, vmmo_cap, &vaddr));
|
||||
check(ZAddressSpaceMap(gSelfVmasCap, 0, vmmo_cap, &vaddr));
|
||||
|
||||
return MappedMemoryRegion(vmmo_cap, paddr, vaddr, size);
|
||||
}
|
||||
|
|
@ -21,7 +22,7 @@ MappedMemoryRegion MappedMemoryRegion::ContiguousPhysical(uint64_t size) {
|
|||
check(ZMemoryObjectCreateContiguous(size, &vmmo_cap, &paddr));
|
||||
|
||||
uint64_t vaddr;
|
||||
check(ZAddressSpaceMap(Z_INIT_VMAS_SELF, 0, vmmo_cap, &vaddr));
|
||||
check(ZAddressSpaceMap(gSelfVmasCap, 0, vmmo_cap, &vaddr));
|
||||
|
||||
return MappedMemoryRegion(vmmo_cap, paddr, vaddr, size);
|
||||
}
|
||||
|
|
@ -31,7 +32,7 @@ MappedMemoryRegion MappedMemoryRegion::Default(uint64_t size) {
|
|||
check(ZMemoryObjectCreate(size, &vmmo_cap));
|
||||
|
||||
uint64_t vaddr;
|
||||
check(ZAddressSpaceMap(Z_INIT_VMAS_SELF, 0, vmmo_cap, &vaddr));
|
||||
check(ZAddressSpaceMap(gSelfVmasCap, 0, vmmo_cap, &vaddr));
|
||||
|
||||
return MappedMemoryRegion(vmmo_cap, 0, vaddr, size);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue