filesys: reach motherboard and CPU-slot RAM through the GuestBus#245
Merged
Conversation
The services board's GuestBus is documented as all RAM the CPU can see -- DosPackets and I/O buffers live wherever exec allocated them -- but it only decoded chip, slow, and Zorro-board RAM. On an A3000/A4000 exec allocates its structures in the best RAM it has, which since the Ramsey motherboard RAM landed is the $04000000-$08000000 bank, so a big-box boot logged "romtags: 0 ROM scsi.device resident(s) culled" (the ResModules walk read zeros and stopped at the first slot, letting the ROM's scsi.device run its several-second IDE probe again) and "filesys: guest read/write outside RAM" for packet traffic whose buffers sat in motherboard RAM. Add the Memory::mb_ram and Memory::accel_ram banks to the GuestBus decode. The zorro_device dma_* helpers stay 24-bit on purpose: they model real Zorro II bus-masters (A2091, CDTV DMAC), which cannot reach the 32-bit local banks. The new regression test runs the actual cull through a GuestBus with the ResModules list in motherboard RAM, and round-trips an accelerator bank access. Verified end to end against the real KS 3.1 A4000 ROM with motherboard = "64M" and a filesys mount: 1 resident culled, the volume handler starts, no outside-RAM warnings.
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a regression on big-box machines (A3000/A4000) where the filesys “GuestBus” guest-memory view did not decode Ramsey motherboard RAM and CPU-slot (accelerator) RAM, causing romtag culling (e.g., scsi.device) and DosPacket buffer accesses to fail when Exec allocated structures/buffers in those 32-bit local banks.
Changes:
- Extend
GuestBusRAM decode to includeMemory::mb_ram(atmb_ram_base()) andMemory::accel_ram(atACCEL_RAM_BASE). - Add a unit test that exercises
romtags::cull_rom_devicethroughGuestBuswith the ResModules list placed in motherboard RAM, and validates read/write round-trips in accelerator RAM.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Contributor-reported regression on big-box machines since the Ramsey motherboard RAM landed (#242/#244): an A3000/A4000 boot logged
romtags: 0 ROM scsi.device resident(s) culledplusfilesys: guest read/write outside RAM at 0x04xxxxxx.Both symptoms are one gap. The services board's
GuestBus-- the guest-memory view used for DosPacket handling and the scsi.device romtag cull, documented as "all RAM the CPU can see" -- only decoded chip, slow, and Zorro-board RAM. On an A3000/A4000 exec allocates its structures in the best RAM it has, which is now the motherboard bank ($04000000-$08000000 with 64M fitted), so:The fix adds the
Memory::mb_ramandMemory::accel_rambanks to the GuestBus decode. Thezorro_devicedma_*helpers stay 24-bit on purpose: they model real Zorro II bus-masters (A2091, CDTV DMAC), which cannot reach the 32-bit local banks.Verification
filesys::tests::guest_bus_reaches_motherboard_and_cpu_slot_ramruns the actualcull_rom_devicethrough a GuestBus with the ResModules list in motherboard RAM (fails without the fix, culling 0), and round-trips an accelerator-bank access.motherboard = "64M"and a[[filesys]]mount: the boot now logsromtags: 1 ROM scsi.device resident(s) culled, the host volume handler starts, and the outside-RAM warnings are gone.cargo test(1717 unit tests),cargo clippy, andcargo fmt --checkare all clean.