Skip to content

filesys: reach motherboard and CPU-slot RAM through the GuestBus#245

Merged
LinuxJedi merged 1 commit into
mainfrom
fix/filesys-guestbus-mb-ram
Jul 21, 2026
Merged

filesys: reach motherboard and CPU-slot RAM through the GuestBus#245
LinuxJedi merged 1 commit into
mainfrom
fix/filesys-guestbus-mb-ram

Conversation

@LinuxJedi

Copy link
Copy Markdown
Owner

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) culled plus filesys: 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 cull walks ExecBase's ResModules list through the GuestBus; the list lives in motherboard RAM, every read returned 0, and the walk stopped at the first slot -- the ROM's scsi.device ran again, bringing back the several-second A4000 IDE probe (and the A3000 SCSI hang).
  • The outside-RAM warnings were the same gap hit by packet traffic whose buffers sat in motherboard RAM.

The fix adds 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.

Verification

  • New regression test filesys::tests::guest_bus_reaches_motherboard_and_cpu_slot_ram runs the actual cull_rom_device through a GuestBus with the ResModules list in motherboard RAM (fails without the fix, culling 0), and round-trips an accelerator-bank access.
  • End to end against the real KS 3.1 A4000 ROM with motherboard = "64M" and a [[filesys]] mount: the boot now logs romtags: 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, and cargo fmt --check are all clean.

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.
Copilot AI review requested due to automatic review settings July 21, 2026 11:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 GuestBus RAM decode to include Memory::mb_ram (at mb_ram_base()) and Memory::accel_ram (at ACCEL_RAM_BASE).
  • Add a unit test that exercises romtags::cull_rom_device through GuestBus with 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.

@LinuxJedi
LinuxJedi merged commit 37bcee4 into main Jul 21, 2026
14 checks passed
@LinuxJedi
LinuxJedi deleted the fix/filesys-guestbus-mb-ram branch July 21, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants