Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ hashes are given where a change is easiest to understand by reading the commit.
display. Runs IRIX 6.5.22 to the desktop with OpenGL through the rendering
engine, and NetBSD 11 to multi-user and X. Needs the O2 PROM image; not in
iris-gui yet.
- **Disks come from `[scsi.N]`.** The O2 reads the same SCSI tables as the
Indy and Indigo2, with `controller` naming the bus (0 internal, 1
external): changer lists, scratch volumes, CHD images, copy-on-write
overlays and the `--scsi1`/`--cdrom4` options now work on it, disc changes
reach its CD-ROMs, and an image that will not open stops the run as it
does elsewhere. `o2.disks` is deprecated and folded into `[scsi.N]` on
load. The monitor's `scsi` and `cow` commands (`scsi1`/`cow1` for the
external bus) work on the O2's Adaptec controllers: status, disc changes,
overlay commit and reset, and the chip's registers.
- **Scripting and inspection.** The O2's devices have monitor commands, and
`o2 <command>` (also on `[o2] control_port`) takes screen shots, types,
moves the mouse and reads memory ([debug.md](debug.md#sgi-o2-ip32)).
Expand All @@ -38,6 +47,20 @@ hashes are given where a change is easiest to understand by reading the commit.
page in six. IRIX on an R5000 O2 panicked with "init died" for the same
reason; it now boots to the desktop.

### SCSI configuration

- **One id on both controllers.** A `[scsi.N]` key is a slot: 1–7 on
controller 0, 16 + id on controller 1, so `[scsi.1]` and `[scsi.17]` put a
disk at id 1 on each of an Indigo2's or O2's controllers. `controller = 1`
in a low key still works, and two tables naming one target are refused.
Snapshot manifests record disks by slot, so an Indigo2 snapshot with a disk
on controller 1 taken before this change does not match its configuration.
- **One `scsi` command for every controller.** The monitor's `scsi` and `cow`
subcommands and the run-time disc changes are implemented once, in
`src/scsi_monitor.rs`, over a controller's target table; the WD33C93A and
the Adaptec 7880 lend theirs and keep only their own subcommands (`regs`,
and the WD's `wdt`, `defer`, `debug`). `scsi status` now lists disks too.

### Newport (REX3)

- **Conformance tests for RGBMODE and the command FIFO.** A 24-bit RGB fill
Expand Down
26 changes: 16 additions & 10 deletions FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,14 @@ the first `[section]`, because TOML tables continue until the next header.
| `scsi.<ID>.overlay` | `false` | Raw-image COW sidecar; CHD uses its own diff sidecar. |
| `scsi.<ID>.scratch` | `false` | Host-managed raw scratch volume; cannot be CD-ROM/overlay. |
| `scsi.<ID>.size_mb` | `64 when unset` | Size of a newly created scratch image; existing files are unchanged. |
| `scsi.<ID>.controller` | `0` | 0 or 1; controller 1 is accepted only on indigo2_ip22. |

IDs are 1–7. If `scsi` is entirely omitted, core defaults attach SCSI #1
as `scsi1.raw` and SCSI #4 as `cdrom4.iso`. An explicit map replaces that
default map; missing IDs are unattached. `kind = "daynaport"` needs no image.
| `scsi.<ID>.controller` | `0` | 0 or 1; controller 1 is accepted on indigo2_ip22 and o2_ip32 (on the O2 it is the external bus). A key of 16 + ID names controller 1 directly and does not need it. |

IDs are 1–7. The key is a slot: `[scsi.N]` with N 1–7 is id N on controller 0
(or on `controller`, when set), and N = 16 + id is that id on controller 1,
so both controllers can carry the same id; two tables naming one target are
rejected. If `scsi` is entirely omitted, core defaults attach SCSI #1 as
`scsi1.raw` and SCSI #4 as `cdrom4.iso`. An explicit map replaces that
default map; missing slots are unattached. `kind = "daynaport"` needs no image.
An explicit non-disk kind takes precedence over the legacy cdrom flag.

### [network]
Expand Down Expand Up @@ -292,17 +295,19 @@ Omit `[nfs]` to disable the share; the default forward list is empty.

### [o2]

Used with `machine.profile = "o2_ip32"`; the Indy/Indigo2 top-level `prom`,
`nvram`, `banks` and `[scsi.N]` keys do not apply. Paths are relative to where
iris runs. See [the O2 guide](docs/o2-ip32.md).
Used with `machine.profile = "o2_ip32"`. The O2's disks are the `[scsi.N]`
tables above, with `controller` as the bus (0 internal, 1 external); the
Indy/Indigo2 top-level `prom`, `nvram` and `banks` keys do not apply. Paths are
relative to where iris runs. See [the O2 guide](docs/o2-ip32.md). An older
config's `o2.disks` list is folded into `[scsi.N]` when the file is loaded and
reported as deprecated.

| Key | Default | Values and behavior |
|---|---|---|
| `o2.prom` | `ip32prom.rev4.18.bin` | The O2 PROM image (not embedded). |
| `o2.flash` | unset | File the PROM's flash (its environment) is loaded from and saved to. |
| `o2.ram_mb` | `256` | Memory in MB, fitted largest DIMM kits first (up to 1024). |
| `o2.dimms` | unset | Instead of `ram_mb`: the kit in each DIMM pair, in MB (32, 64, 128 or 256). |
| `o2.disks` | `[]` | SCSI devices: `{ id, path, cdrom = false, bus = 0, overlay = false }`; bus 0 internal, 1 external; `overlay` writes to `PATH.overlay` and keeps the image as it was (as `[scsi.N] overlay`). |
| `o2.serial_port` | unset | TCP port on 127.0.0.1 for the first serial port. |
| `o2.serial_log` | unset | File that copies the first serial port's output. |
| `o2.graphics` | `true` | PS/2 keyboard and the graphics console; `false` for a serial console. |
Expand All @@ -320,7 +325,8 @@ IP22/IP24 four-bank IRIX 6.5 behavior remains separate from IP28's verified
two-bank 1 GB layout. Extreme requires IP22. All non-Newport boards require
`heads=1` and `resolution="guest"`. IP28 IRIX needs IMPACT; its PROM has an
embedded fallback.
The config validator currently permits SCSI controller 1 only on IP22.
The config validator permits SCSI controller 1 only on IP22 and the O2, the
machines with two controllers.

Standalone CLI options update the loaded config where supplied; boolean enable
switches do not provide a general way to clear every saved true setting.
Expand Down
11 changes: 11 additions & 0 deletions HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,17 @@ reach the machine through one shared `MachineSlot` per machine, which the
machine's `Drop` nulls, so a holder that outlives the machine (the monitor,
after iris-gui's Stop) gets "machine is not running" instead of freed memory.

SCSI storage follows the same pattern one level down. `src/scsi.rs` is the
target (disk, CD-ROM, DaynaPort) any controller can hold, and
`src/scsi_monitor.rs` implements the monitor's `scsi` and `cow` subcommands and
the run-time disc changes once, over a controller's target table lent through
its `ScsiTargets` trait. The WD33C93A (Indy, Indigo2) and the Adaptec 7880 (O2)
lend theirs and keep only chip-specific subcommands (`regs`; the WD's `wdt`,
`defer`, `debug`), and `DiscChanger` is implemented once for every
`ScsiTargets`. Configuration is shared the same way: both machines attach
their devices from the `[scsi.N]` tables, where the key is a slot
(controller × 16 + id, see `config::scsi_slot`).

## 2. Data path and endianness

**Word-transparent architecture.** Host `u32`/`u64` values are bit
Expand Down
13 changes: 10 additions & 3 deletions HELP.md
Original file line number Diff line number Diff line change
Expand Up @@ -553,12 +553,15 @@ resolution = "guest" # or "1024x768", "1280x960", "1280x1024"

# ── SCSI ─────────────────────────────────────────────────────────────────────

# Valid IDs: 1–7. For a hard disk, set cdrom = false.
# Valid IDs: 1–7. For a hard disk, set cdrom = false. On a machine with two
# controllers (Indigo2, O2) [scsi.N] is id N on controller 0 and [scsi.16+N]
# is id N on controller 1, so one id can be used on both; `controller = 1`
# in a [scsi.N] table does the same for that one device.
[scsi.1]
path = "scsi1.raw" # raw or .chd image
cdrom = false
overlay = false # true = copy-on-write overlay in scsi1.raw.overlay
# controller = 0 # Indigo2 only: 0 or 1
# controller = 0 # Indigo2 and O2 have two: 0 or 1 (the O2's 1 is its external bus); or write [scsi.17]

# A CD-ROM. path may be empty to start with an empty tray.
[scsi.4]
Expand Down Expand Up @@ -650,7 +653,11 @@ kernel step on each other's block size setting.
| 6 | Additional disk or tape |
| 7 | Additional disk |

The controller itself is ID 0.
The controller itself is ID 0. On the Indigo2 and the O2, which have two
controllers, `[scsi.N]` keys 1–7 are ids on controller 0 and keys 17–23 are
ids 1–7 on controller 1 (16 slots per controller); `controller = 1` in a low
key's table is the older spelling and still works. The monitor's `scsi1`
addresses the second controller.

---

Expand Down
13 changes: 10 additions & 3 deletions debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,13 @@ interpreter), `--features jitv2_smc_check` (writes onto executing pages), and
| `scsi dayna` | DaynaPort MAC, addresses and counters |
| `scsi wdt [N]` / `scsi wdt file <path>` | WD33C93A transaction ring: last `N` / all to a file **[DEV]** |
| `scsi debug <on\|off>` | Per-command trace **[DEV]** |
| `scsi0 ...` / `scsi1 ...` | The same, for controller 0 / controller 1 (Indigo2) |
| `cow status` / `cow commit [id]` / `cow reset [id]` | Copy-on-write overlays |
| `scsi0 ...` / `scsi1 ...` | The same, for controller 0 / controller 1 (Indigo2 and O2) |
| `cow status` / `cow commit [id]` / `cow reset [id]` | Copy-on-write overlays (`cow1 ...` on the O2's second controller) |

On the O2 the controllers are Adaptec 7880s: `scsi regs` shows that chip's
interrupt status, queues and command totals, and `wdt`, `defer`, `debug` and
`dayna` are not there. Ids are per controller, as in the `[scsi.N]` tables
(`[scsi.17]` is id 1 on controller 1, so `scsi1 eject 1`).

Queue position `[0]` is the mounted disc, `[1]` the next on eject. A disc
change reaches IRIX as a Unit Attention ("medium changed") on its next
Expand Down Expand Up @@ -477,7 +482,9 @@ With `[ultra64] enabled = true`: `ultra status | send <hex> | reset | r

### SGI O2 (IP32)

The O2's devices register their own commands (see [the O2 guide](docs/o2-ip32.md)):
The O2's devices register their own commands (see [the O2 guide](docs/o2-ip32.md));
its SCSI controllers answer to `scsi`/`cow` and `scsi1`/`cow1` as described under
[SCSI, CD-ROM and disks](#scsi-cd-rom-and-disks):

| Command | Description |
|---|---|
Expand Down
7 changes: 4 additions & 3 deletions docs/indigo2-ip22.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ No separate build is required — the same `iris` / `iris-gui` binary supports I
(default `nveeprom.bin`, `--nveeprom`) and written back with the monitor's
`nveeprom save` or automatically on normal Stop. `[network] mac` is
injected into a blank slot before boot; an existing MAC is retained.
- **SCSI:** two WD33C93A controllers. Put a device on the second one with
`controller = 1` in its `[scsi.N]` section; `scsi0` / `scsi1` in the monitor
address each controller.
- **SCSI:** two WD33C93A controllers. A device goes on the second one as
`[scsi.16+N]` (so `[scsi.17]` is id 1 there, and id 1 can be on both), or
with `controller = 1` in its `[scsi.N]` section; `scsi0` / `scsi1` in the
monitor address each controller.
- **Interrupts:** INT2 and the fullhouse cascade are modelled; the IRIX kernel
never hooks GIO interrupt 2, so vertical retrace is delivered the way the
table below describes.
Expand Down
40 changes: 31 additions & 9 deletions docs/o2-ip32.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ The O2 does not run in iris-gui yet; start it from the `iris` command line.

## Configure the machine

The O2 has its own `[o2]` section; the Indy and Indigo2 top-level keys
(`prom`, `nvram`, `banks`, `[scsi.N]`) do not apply to it.
The O2 has its own `[o2]` section for what only it has. Its disks are the
same `[scsi.N]` tables as the other machines'; the Indy and Indigo2 top-level
keys `prom`, `nvram` and `banks` do not apply to it.

```toml
[machine]
Expand All @@ -30,8 +31,14 @@ ram_mb = 1024
serial_port = 2291
serial_log = "serial.log"
control_port = 2293
disks = [ { id = 1, path = "irix6522.raw" } ]
forwards = [ { proto = "tcp", host_port = 2292, guest_port = 22 } ]

[scsi.1]
path = "irix6522.raw"

[scsi.4]
path = "irix6522.iso"
cdrom = true
```

Paths are relative to the directory iris runs in. Every key is listed in
Expand All @@ -58,12 +65,27 @@ settings survive a restart. The PROM image itself is never written.

## Disks and CD-ROMs

`disks` lists SCSI devices on the two Adaptec 7880 controllers: `id`, `path`,
`cdrom = true` for a CD-ROM image, and `bus` 0 (internal, the default) or 1
(external). IRIX expects the system disk at id 1 on bus 0. Disk images are
written in place, as on the other machines, unless `overlay = true`: then the
image is never written and the changes go to `PATH.overlay` (delete it to
start over).
The `[scsi.N]` tables ([FEATURES.md](../FEATURES.md#scsiid)) list the devices
on the two Adaptec 7880 controllers. `N` 1–7 is the id on the internal bus
(controller 0); `N` = 16 + id is that id on the external bus (controller 1),
so `[scsi.17]` is id 1 outside and both buses can carry an id 1. `controller
= 1` in a low-numbered table means the same. IRIX expects the system disk at
id 1 on bus 0 and looks at ids 1 to 4 on the internal bus. In the monitor,
`scsi` and `cow` address controller 0 and `scsi1` and `cow1` controller 1
([debug.md](../debug.md#scsi-cd-rom-and-disks)). Everything the
tables offer elsewhere works here: raw and CHD images, `cdrom = true` with a
`discs` changer list (RCtrl+F12 in the window, `iris-ci cdrom-eject`),
`overlay = true` for copy-on-write to `PATH.overlay` (delete it to start
over), and a `scratch = true` volume for the CI socket's file injection
([STORAGE.md](../STORAGE.md)). The one exception is `kind = "daynaport"`: the
O2's Ethernet is built in. The `--scsi1`, `--cdrom4` and related command-line
options apply as well. An image that cannot be opened stops iris before the
PROM runs, as on the other machines.

Older configs listed the disks as `o2.disks = [ { id, path, cdrom, bus,
overlay } ]`. That key is deprecated: iris folds it into `[scsi.N]` (with
`controller = bus`) when it loads the file and says so; move the entries over
to silence the note.

## Snapshots

Expand Down
2 changes: 2 additions & 0 deletions iris.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ banks = [128, 128, 0, 0]
path = "scsi1.raw"
cdrom = false
#overlay = true
#controller = 0 # Indigo2 and O2 have a second controller (1); on the O2 it is the external bus.
# [scsi.17] is id 1 on controller 1 without this key, so an id can be on both.

# Internal hard disk
#[scsi.2]
Expand Down
Loading
Loading