|
<< Click to Display Table of Contents >> Navigation: ASA-EMulatR Reference Guide > Introduction > Architecture Overview > Chapter 15 – Memory System Implementation Details > 15.12 Diagnostics and DMA Coherency |
GuestMemory provides classifyPhysicalAddress(pa) which returns a human-readable string identifying the subsystem and offset for any PA. The SparseMemoryBacking exposes allocatedBytes(), residentBytes(), pageCount(), and allocatedPageCount() for memory pressure monitoring. The WriteBufferManager provides getPendingWriteCount(cpuId) and hasPendingWrites(cpuId) for write buffer inspection. The MemoryBarrierCoordinator provides getBarrierStatus() for SMP debugging.
These hooks must not affect architectural behavior, must not introduce ordering, and are observational only.
GuestMemory provides notifyDMAWriteComplete(pa, size) as a coherency notification point. When a DMA transfer completes a write to physical memory, this method is called to allow cache invalidation and reservation breaking. The AccessKind enumeration distinguishes DMARead and DMAWrite from CPU-initiated accesses.
See Also: memoryLib/FirmwareDeviceManager.h (~540 lines) – Firmware device management and DMA coordination.