MCPcopy Create free account
hub / github.com/LibertyOS-Development/kernel / physaddr

Function physaddr

src/allocator/mod.rs:257–263  ·  view source on GitHub ↗

Physical address

(ptr: &u8)

Source from the content-addressed store, hash-verified

255
256// Physical address
257pub fn physaddr(ptr: &u8) -> u64
258{
259 let rxptr = ptr as *const u8;
260 let virtaddr = VirtAddr::new(rxptr as u64);
261 let physaddr = crate::mem::vtop(virtaddr).unwrap();
262 physaddr.as_u64()
263}

Callers 2

addressMethod · 0.85
fromMethod · 0.85

Calls 1

vtopFunction · 0.85

Tested by

no test coverage detected