[Mammoth] Add an owned memory capability that cleans itself up.
This commit is contained in:
parent
7d48dd2b8b
commit
3e9923f227
5 changed files with 84 additions and 9 deletions
|
|
@ -18,9 +18,9 @@ uint64_t main(uint64_t init_port_cap) {
|
|||
Empty empty;
|
||||
AhciInfo ahci;
|
||||
RET_ERR(stub.GetAhciInfo(empty, ahci));
|
||||
MappedMemoryRegion ahci_region =
|
||||
MappedMemoryRegion::FromCapability(ahci.ahci_region());
|
||||
ASSIGN_OR_RETURN(auto driver, AhciDriver::Init(ahci_region));
|
||||
OwnedMemoryRegion ahci_region =
|
||||
OwnedMemoryRegion::FromCapability(ahci.ahci_region());
|
||||
ASSIGN_OR_RETURN(auto driver, AhciDriver::Init(glcr::Move(ahci_region)));
|
||||
|
||||
ASSIGN_OR_RETURN(glcr::UniquePtr<DenaliServer> server,
|
||||
DenaliServer::Create(*driver));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue