Expand description
Software state banks, runtime knobs, and diagnostic triggers for in-situ driver experimentation.
StateBank implements MmioBackend and ResourceBackend over a
32-bit word-addressed virtual bank of 4-byte aligned offsets. A driver can
register:
- Observable state slots (
StateBank::define_state_slot): lock-freeAtomicU32slots readable by the host (viaread32,poll32, orsnapshot) and updated by the driver viaStateSlotHandle. - Runtime knobs (
StateBank::define_knob): writableAtomicU32slots (included inwritable_registers) for fault/race-window injection or runtime fix-toggle experiments. - Read probes (
StateBank::define_read_probe): synchronous callbacks evaluated on demand when the host reads the offset. - Diagnostic triggers (
StateBank::define_trigger): writable offsets backed by a bounded callbackFn(u32) -> Result<u32, BackendError>whose returned status word is stored for readback and subsequent polling.
Structs§
- State
Bank - Word-addressed software state bank exposing observable driver state slots, policy-gated runtime knobs, read probes, and diagnostic triggers.
- State
Slot Handle - Lock-free handle to a 32-bit state slot or runtime knob shared between an
instrumented driver and a
StateBank.
Enums§
- State
Entry - Entry bound to a 4-byte aligned offset inside a
StateBank.
Type Aliases§
- Read
Probe Fn - Callback type for on-demand 32-bit state read probes.
- Trigger
Fn - Callback type for write-triggered diagnostic actions.