Move Ahci Port Controller to hold raw references.
This commit is contained in:
parent
0024e38412
commit
04effd44f8
2 changed files with 50 additions and 63 deletions
|
|
@ -152,3 +152,10 @@ where
|
|||
write!(f, "{:?}", self.read())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn map_physical_and_leak(size: u64) -> (u64, u64) {
|
||||
let (mem_cap, paddr) = syscall::memory_object_contiguous_physical(size).unwrap();
|
||||
let vaddr = syscall::address_space_map(&mem_cap).unwrap();
|
||||
mem_cap.release();
|
||||
(vaddr, paddr)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue