Skip to content

small fixes: iris-ci boot, --validate ports, CD-ROM controllers, GIO slot 0, DS1685 writer, Tezro console docs - #836

Merged
techomancer merged 6 commits into
techomancer:mainfrom
jamesbraid:pr/small-fixes-20261122
Nov 22, 2026
Merged

techomancer merged 6 commits into
techomancer:mainfrom
jamesbraid:pr/small-fixes-20261122

Conversation

@jamesbraid

Copy link
Copy Markdown
Collaborator

Six small, independent fixes found while booting IRIX across every machine. Each commit has its own test where there is code, and its message gives the details.

  • iris-ci: boot to any hostname's login prompt, menu or not. iris-ci boot waited for the literal "IRIS console login" after pressing 1 at "Option?". A disk with another hostname, or a PROM set to AutoLoad, timed out. It now polls the console, presses 1 if the menu appears, and stops at login: (or --prompt).
  • validate: check the board listeners for port clashes. --validate passed configs whose L1, Tezro serial C/D, O2 control, virtio-serial or TCP-forward ports clashed, and these then failed at startup.
  • workstation: route disc changes to every SCSI controller. CD-ROM load and eject reached only the first controller, so a drive on the Indigo2's second channel or the Octane's second bus could not be changed. The id is [scsi.N] (16 × controller + id), and ids below 16 mean what they did.
  • config: refuse --test-device next to the Ultra64 board or a second head. All three decode GIO slot 0. The pairing passed validation and then panicked in the constructor, leaving a shared-memory object behind.
  • ds1685: stop the writer thread keeping its part alive. The NVRAM writer held a strong reference while waiting, so a part dropped without stop never ran its Drop. No shipped machine hits this today.
  • docs: say Tezro IOC4 console needs the PROM's console setting. console = "ioc4_a" only picks the host connection. The PROM writes to the L1 until console ioc4 is set, which is stored in the flash.

Tested:

  • cargo check --all-targets passes.
  • cargo nextest gave 5837 of 5841 passing. The 4 that failed are sn::tests aborting with SIGBUS on a small /dev/shm on our build host. They pass when run alone and abort the same way on main.
  • Each new test fails before its fix.

`iris-ci boot` ran a fixed script: wait for "Option?", press 1, wait
for the literal text "IRIS console login". Both steps assumed too
much. The getty prompt carries the machine's hostname, and "IRIS" is
only the default of a fresh install, so a disk with any other hostname
(indy-6522 console login:, ip30-6530 console login:) never matched. And
a PROM with AutoLoad set boots without printing the menu, so the first
wait ran out the whole timeout. Neither case could boot, and the
failure was a bare timeout that gave no hint why.

Poll the serial console instead, as `boot-test` already does. Press 1
once if "Option?" appears, and finish when the prompt text appears,
whether or not the menu did. The prompt defaults to "login:" and
--prompt overrides it. This is client-side only, nothing on the
emulator's hot paths.

Two tests drive a fake CI socket: a menu followed by a non-IRIS login,
and an autoloading PROM that prints no menu. Both failed before.

Production lines: +22 -9
The test device, the Ultra64 dev board and the second Newport head all
decode GIO expansion slot 0. validate() already refuses virtio devices in
exp0 beside them, but not these pairings, so a config such as
--test-device with [ultra64] enabled passed validation and then aborted in
the machine constructor with a panic (exit 134), leaving the Ultra64
bridge shared-memory object behind in /dev/shm.

Reject both combinations in validate() on the Indy, Indigo2 and Indigo2
IMPACT, so the user gets a configuration error and nothing is created. The
constructor check stays as a backstop for in-process callers. The check
runs once at config time, so no hot path is touched.

Production lines: +9 -0
The NVRAM writer upgraded a Weak<Ds1685> and held the strong Arc for
its whole condvar wait. If the owner dropped the last reference to a
started part without calling stop, the count never reached zero, Drop
(which stops and flushes) never ran, and the thread waited forever with
any dirty image unwritten. The self-join guard in stop existed only
because of this shape.

No shipped machine hits it today: the IOC3 and the machine both stop
the part before dropping it. It is a trap for any new owner.

Move the job slot, condvar and running flag into an Arc<WriterSlot>
that the writer holds instead of the part. Dropping the part's last
reference now runs Drop, which stops and joins the writer, so the
Weak, new_cyclic and the self-join guard go away. Nothing on a hot
path changes; hand_over, which runs from the debounce timer, takes one
extra pointer hop.

The new test drops a started part with the writer parked and checks
the part is freed; it fails before this change and passes after.

Production lines: +29 -30
The Tezro console option reads as if it moves the guest console. It only
picks the host connection. The PROM defaults to the L1 and writes nothing
to the IOC4 ports, so choosing ioc4_a on a fresh flash leaves the port
and serial_log empty and looks like a model bug.

Running console ioc4 in the Command Monitor and resetting moves the PROM
console to IOC4 UART A (port B stays silent). The PROM stores that in the
flash, so it survives only with a flash file. Document both in the Tezro
page and the feature table.

Production lines: +0 -0
--validate only compared serial A/B, the monitor and the gdb port. A Fuel
whose L1 port equals serial A, or a Tezro whose serial C equals B, printed
"ok" and then exited at startup with "must be distinct". Other clashes (the
O2 control port, virtio-serial and TCP forwards against the monitor or a
console) started the machine but lost a listener with one line on stderr.

Add the L1 port, Tezro serial C/D, the O2 control port, virtio-serial TCP
ports and TCP port forwards to the same check, with the machines' defaults.
Runs only under --validate.

Production lines: +20 -0
Disc changes from the CI socket, the window's RCtrl+F12 and iris-gui
went through a changer that each machine built from its first SCSI
controller only. A CD-ROM on the Indigo2's second controller, the
Octane's second bus, the O2's external bus or an Origin's extra
controllers was visible to the guest but not listed, loaded or
ejected: "No device at SCSI ID 20".

Add DiscChangers, which holds every controller's changer and takes the
same id the config uses for the drive, `[scsi.N]` = 16 * controller +
id. A bare id below 16 still means controller 0, so existing commands
keep their meaning. Each machine now hands it all of its controllers.
It runs only when a disc change is requested, not on any guest path.

Production lines: +39 -7
@techomancer
techomancer merged commit 5196993 into techomancer:main Nov 22, 2026
9 checks passed
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