From e214609c2f60e35254c243a806a82a0f1d4ec3ae Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Sun, 4 Oct 2026 18:42:36 -0400 Subject: greeneye: GMMU/FBIF observability, PTE decoder and oracle, MPU/libos simulator wave Simulator development wave (docs 42-44): GMMU page-table entry decode with its oracle/workflow harness, FBIF observability, and MPU/LIBOS device surfaces in the device model, plus refreshed boot/machine/profile data (tu104-570.144), the qemu-line results, and the new unit tests. Docs 00/06/35-41 updated to match; harness helpers and .gitignore included. --- debug/risc-v-gsp-rm-vm/sim/devices/base.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'debug/risc-v-gsp-rm-vm/sim/devices/base.py') diff --git a/debug/risc-v-gsp-rm-vm/sim/devices/base.py b/debug/risc-v-gsp-rm-vm/sim/devices/base.py index 877109c..7254334 100644 --- a/debug/risc-v-gsp-rm-vm/sim/devices/base.py +++ b/debug/risc-v-gsp-rm-vm/sim/devices/base.py @@ -44,6 +44,11 @@ class Device: name = "device" + #: Opt-in hook: when True the registry forwards the faulting PC to + #: ``read``/``write`` as ``pc=`` (observer windows record it; every other + #: device keeps the original two-/three-argument call unchanged). + wants_pc = False + def __init__(self, base: int = 0, size: int = 0): self.base = base self.size = size @@ -184,7 +189,10 @@ class DeviceRegistry: matched = False for win in self._candidates(addr, size): matched = True - value = win.device.read(addr - win.base, size) + if win.device.wants_pc: + value = win.device.read(addr - win.base, size, pc=pc) + else: + value = win.device.read(addr - win.base, size) if value is not None: self._record(addr, size, False, value, True, pc) return True, value @@ -202,7 +210,11 @@ class DeviceRegistry: matched = False for win in self._candidates(addr, size): matched = True - if win.device.write(addr - win.base, size, value): + if win.device.wants_pc: + handled = win.device.write(addr - win.base, size, value, pc=pc) + else: + handled = win.device.write(addr - win.base, size, value) + if handled: self._record(addr, size, True, value, True, pc) return True self.unhandled += 1 -- cgit v1.2.3