|
<< Click to Display Table of Contents >> Navigation: ASA-EMulatR Reference Guide > Introduction > Architecture Overview > Chapter 15 – Memory System Implementation Details > 15.7 MMIO Access Semantics |
MMIO accesses are strongly ordered. They are never buffered in the write buffer, execute synchronously, cannot be reordered relative to other MMIO operations, and are visible immediately to device handlers. This is intentional — devices expect program-order semantics even though Alpha allows weak ordering for RAM.
When GuestMemory routes a PA to RouteTarget::MMIOManager, it calls m_mmio->handleRead(pa, width, outValue) or m_mmio->handleWrite(pa, width, value) with the raw PA (not an offset). MMIO accesses bypass SafeMemory entirely. The WriteBufferEntry::mmio flag distinguishes MMIO writes in the write buffer for special handling by the CBox, and WriteBufferManager::hasPendingMMIO() checks whether a CPU has any pending MMIO stores.
Instruction fetch from MMIO regions is explicitly rejected: readRouted() checks for AccessKind::InstructionFetch combined with RouteTarget::MMIOManager and returns MEM_STATUS::AccessViolation.
Invariant: MMIO is strongly ordered, synchronous, and never buffered.
See Also: mmioLib/mmio_Manager.h – MMIOManager class; Chapter 10 – Devices and Memory-Mapped I/O (MMIO).