MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / read_byte

Method read_byte

crates/virtual-machine/src/devices/clint.rs:51–53  ·  view source on GitHub ↗

Byte and halfword accesses are illegal -> fault.

(&mut self, addr: u64)

Source from the content-addressed store, hash-verified

49 Err(VmError::LoadAccessFault(addr))
50 }
51
52 fn read_word(&mut self, addr: u64) -> Result<u32, VmError> {
53 match addr {
54 a if a == MTIME_BASE => Ok(self.mtime as u32),
55 a if a == MTIME_BASE + 4 => Ok((self.mtime >> 32) as u32),
56 a if a == MTIMECMP_BASE => Ok(self.mtimecmp as u32),

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected