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

Function fetch

crates/virtual-machine/src/cpu/pipeline/fetch.rs:36–45  ·  view source on GitHub ↗

Backwards-compatible wrapper: old callers without PMP info should use this. Uses a throwaway TLB, so it never benefits from caching (test/diagnostic use).

(
    bus: &mut SystemBus,
    pc: u64,
    satp: u64,
    priv_mode: PrivilegeMode,
    mstatus: u64,
)

Source from the content-addressed store, hash-verified

34 mstatus: u64,
35) -> Result<u32, VmError> {
36 let mut tlb = mmu::Tlb::new();
37 let ctx = mmu::TranslationContext::without_pmp(satp, priv_mode, mstatus);
38 fetch_with_pmp(bus, pc, ctx, &mut tlb)
39}

Callers 5

sw.jsFile · 0.85
fetch_aligned_wordFunction · 0.85
fetch_misaligned_byteFunction · 0.85
fetch_out_of_boundsFunction · 0.85

Calls 1

fetch_with_pmpFunction · 0.85

Tested by 4

fetch_aligned_wordFunction · 0.68
fetch_misaligned_byteFunction · 0.68
fetch_out_of_boundsFunction · 0.68