Skip to content
HUBrisOrigami project journal
Color Schemes
Color Scheme Browser
Desktop SchemesBase · gamma 1.7
Monitor gamma
Chrome type · pointer

/usr/lib/X11/schemes · x_eoe_6530m

IRIS InSight: HUBris Library

HUBris Library / Inside the Machines / SGI module system controller (Origin 200 and Origin 2000)page 32 of 97

NavigatorHUBris Library
Inside the Machinespage 32 of 97

Inside the Machines

SGI module system controller (Origin 200 and Origin 2000)

The module system controller (MSC, historically "ELSC") is a microcontroller on the Origin 200 midplane and, in a second build, the Origin 2000 and Onyx2 module controller, reached over the module's I2C bus. Guests use it for console input before any real serial driver is running, for reading the front-panel DIP switches, and as the console of last resort after a failed power-on diagnostic. QEMU models it as an I2C slave (hw/misc/sgi-elsc.c) on the same bus as each node's PCF8584 controller.

The module system controller (MSC, historically "ELSC") is a microcontroller on the Origin 200 midplane and, in a second build, the Origin 2000 and Onyx2 module controller, reached over the module's I2C bus. Guests use it for console input before any real serial driver is running, for reading the front-panel DIP switches, and as the console of last resort after a failed power-on diagnostic. QEMU models it as an I2C slave (hw/misc/sgi-elsc.c) on the same bus as each node's PCF8584 controller.

The same controller program, built a second way, is the module controller of an Origin 2000 module. The build property selects which: origin200 (the default) or origin2000, which the Origin 2000 module-management device sets on its own controller. The builds differ in the commands they answer and in their version token; this page names each difference where it applies.

This page describes the register-level contract the model implements.

ASCII command protocol

Every command is a short ASCII mnemonic carried in one combined write-then-read I2C transaction. The write half frames the request; switching the bus direction to read marks it complete and produces the response, framed the same way:

  • one length byte, counting only the text;

  • that many bytes of ASCII text;

  • one checksum byte, chosen so that the whole packet -- length through checksum inclusive -- sums to zero modulo 256.

The text length may not exceed the protocol maximum. The firmware's transfer-length tracking is unclamped, so a longer frame makes it read past its own buffer before any check runs; the model asserts the bound on everything it emits.

A success with no value is framed as the firmware sends it, the three bytes ok and a space; "a plain ok" below means that reply. IRIX reads ok followed by a space or the end of the text the same way.

A malformed packet -- short, long, or failing the checksum -- is answered err csum. The protocol names no separate framing error: a malformed packet fails the same sums-to-zero test a corrupted checksum does.

Request grammar

The controller parses every command the same way. It keeps the request's text and puts a carriage return where the checksum was, so each command ends in one.

  • The first four bytes are a three-letter lowercase mnemonic and a separator, which must be a space or the end of the text. Anything else, including an empty request or an uppercase mnemonic, is err cmd.

  • Most single-letter arguments come from a character reader: it skips spaces and takes the next character, and the end of the text or a line feed is no argument. pwr q and pwr q junk are both pwr q.

  • Numeric arguments come from a hex reader: up to four digits, either case, with no leading spaces skipped. A number shorter than four digits consumes the character that ends it, so a second number must follow exactly one space; a four-digit number consumes nothing, so the next number follows with no space at all and a fifth digit starts it. No digits at all is no value. hbt 1e 14 and hbt 025814 carry two values; hbt 1e 14 carries one.

  • Whatever a command does not read is discarded.

  • Hex values in replies are lowercase with no leading zero.

The firmware runs a recognised command whose checksum or length is bad and then answers the checksum error. The model answers err csum without running it, which is safer and differs from the firmware only for a corrupted request.

Command vocabulary

ver

Answered ok plus the build's eight-character version field: V 3.1S and two spaces for the Origin 200 build, VER 3.2 and one space for the Origin 2000 build. The firmware requires the ok but does not interpret the token; the first token including its terminator must fit in eight bytes.

rsw

The front-panel DIP switches, reported active-low, as ok <hex> with no leading zero. In the Origin 200 build bit 0x04 of that byte is the controller's role, set on a master and clear on a slave; the model takes the role from the topology, so the elsc-dip-switches value of that bit has no effect there.

get

The console-input poll. The response payload begins with a fixed six-byte acp <selector> `` header; the firmware checks only the first four bytes and copies the payload starting at byte six, so the shape must be exact. The fifth byte names the input selection mode, not the reader: the selected processor's digit, ``. for automatic selection and / with selection disabled. Like the firmware, the model hands queued input to whoever asks; the announcement, not the reply, follows the selection.

When the controller has a message for the Hubs, get returns that message's text instead, with no ok in front; see Controller messages.

acp <selector> <characters>

The console-output flush, at most 86 characters per transaction. Always answered in the ok <count> form with the count in hexadecimal: a bare ok parses as zero characters accepted and livelocks the firmware's output queue.

pas

Not a command on this channel: answered err cmd, as are the other serial-only commands. The controller's supervisor mode, entered with pas and a password, belongs to the operator's serial line (see The operator's command line) and gates nothing that arrives over I2C; IRIX sends pwr d and rst without ever sending pas.

dsp <message>

Origin 2000 build only; the Origin 200 build answers err cmd. Writes a message onto the alphanumeric display: up to eight printable characters, spaces included, overwriting from the first position and leaving the rest unaltered. The message stops at the first unprintable character and anything past eight is dropped. An empty message is err arg; otherwise a plain ok.

dsc <position> <character>

Origin 2000 build only; the Origin 200 build answers err cmd. Writes one display character. Spaces before each argument are skipped, so the position is the digit 1 to 8, for display positions 0 to 7, and the character is printable and never a space. Anything else is err arg; otherwise a plain ok.

pwr q

The power-on query, which the PROM issues once at power-on to detect a cold start. Answered ok 1 on the first read in a power cycle and ok 0 afterwards. The model latches a cold power-on and clears the latch on read, so only the first caller after power-on sees the 1; the latch is set when the controller starts and at every power-up of its module, and no reset of the module re-arms it. The controller datasheet records this clear-on-read behaviour as 6.5.7-derived and unconfirmed for the 6.5.30 firmware; one measured exchange would settle it. The latch is per-controller: on the single-module Origin 200 that is the whole machine, and a multi-module machine has one controller per module (each genuinely cold-powered), with the boot master reading its own module's latch once and propagating the result. Whether a multi-module cold-power latch is per-module or machine-wide is not settled by the datasheet.

pwr / pwr u

pwr with no letter reports the module's power, ok u or ok d. pwr u answers ok and, on an unpowered module, starts the power-up sequence once the caller has read the ok, cutting short any power-cycle countdown. The sequence enables the supplies, frees the tas byte, discards queued serial input and holds the module's reset for 4 seconds (Origin 200 build) or 4.4 (Origin 2000 build); then the module runs again and the cold-power latch is set. A powered module ignores pwr u. The firmware does not answer other commands during the sequence; the model's supplies are healthy, the checks always pass, and it keeps answering. See Module power.

pwr d <sec> / pwr c [<sec>]

The remaining power control, none boot-driven. pwr d <sec> schedules a delayed power-down and pwr c power-cycles, both answered a bare ok; both are destructive and, like rst, need no supervisor mode over I2C. Exactly one character after the d is skipped and the delay comes from the hex reader. 1 to 0x258 (re)loads a countdown measured from that request, so a repeated request moves the deadline either way; IRIX sends pwr d 1 at halt and repeats pwr d 8 while extending a shutdown. 0 powers down at once, as does a request with no delay while a countdown is pending; a request with no delay otherwise starts a three-second countdown. A delay above 0x258 is err arg and changes nothing. On an unpowered module every pwr d answers a bare ok and does nothing, with no range check. A timed or soft request also queues pd remote for the Hubs (see Controller messages). pwr c takes an optional off interval, read the same way, from 5 to 0x258 seconds; anything outside that is err arg. pwr r, the redundant-supply query, belongs to controller firmware 3.3S and later; neither 6.5.7-era build has it, so it is err arg like any unknown letter. The IRIX kernel and IO6 PROM query it and skip the supply report on an error.

An immediate pwr d and pwr c act, like rst, once the caller has read the ok. pwr d removes module power, and pwr c queues pd cycle for the Hubs, removes module power and starts the power-up countdown, which a clr leaves running; after the interval the power-up sequence runs as for pwr u. On a module already off, pwr c only restarts the countdown. A pwr d countdown removes power when it expires, on the virtual clock, and survives a rst, which the controller runs through. What module power means for the machine is in Module power. Two approximations remain. The countdown is the nominal number of seconds, although the controller's 16-bit millisecond count is inferred to wrap above 0x41. And the roughly 100 ms the firmware takes to remove power is not modelled: power goes as the action fires.

hbt [<interval> [<delay>]]

The heartbeat watchdog. Both values come from the hex reader. hbt 0 stops it. An interval of 5 to 0x258 seconds arms it: the stage goes back to waiting, its timer starts at the interval, and the delay from its NMI to its power cycle is the second value, zero allowed, or 30 seconds without one. Any other interval is err arg and changes nothing. With no readable value the request is a heartbeat, which only reloads the timer with the interval. When the timer runs out the watchdog moves on a stage: from waiting to a five-second warning; from the warning to an NMI pulsed at once, as for nmi but with no one-second wait, and then the delay; from the delay to a power cycle, after which it is idle with its interval still set. A heartbeat never returns it to an earlier stage, so one in the warning postpones the NMI by an interval and one after the NMI postpones the power cycle; a delay of zero never power-cycles. clr and hbt 0 stop it; rst, nmi and power-off do not, and an armed watchdog brings back a module pwr d turned off. The power cycle is pwr c's with a five-second interval, and its power-up sets the cold-power latch. The timer is the nominal number of seconds, with the same caveat as the pwr d countdown above 0x41 seconds. IRIX 6.5.30 sends hbt 30 20 only when its heartbeat tunable is set, which it is not by default, and formats the numbers in decimal, so the controller reads 0x30 and 0x20 seconds. The Origin 2000 build shows its heartbeat-timeout status message at the warning. An Origin 200 master that has heard from its slave forwards the NMI to it (see Master and slave).

rst

The module reset, reached by a panic reboot or fatal-error recovery, never a normal boot. An unpowered module answers err cmd. Otherwise it answers ok, queues rst for the Hubs and resets the module one second later; another rst inside that second starts the wait again. The firmware starts the second when it builds the ok; the model starts it once the caller has read the ok, as it does for every destructive action, so an unread ok never resets anything. Processors run through the second, as they do on hardware. The firmware then holds reset for 100 ms; an Origin 2000 module drives that pulse itself, and on an Origin 200 QEMU's reset is instantaneous. A caller treats ok as proof the reset happened and does not fall back to its own hardware reset, so the reset is performed rather than logged. The reset is the module's: the machine cold-starts the module whose controller took the command (Module power) and no other, as the datasheet specifies. Whether the hardware reset reaches the module's Routers, Crossbows and XIO boards is unknown, so the model resets them with the rest of the module.

A power cycle's restart re-arms only the initiating controller's cold-power latch: the other module of a two-chassis machine is not restarted, and its pwr q is neither set nor cleared by it.

tas [<ch>]

The test-and-set lock cell: one byte, 0 when free. The argument is the next non-space character, a literal byte rather than a hex value, so tas A is tas A and a space is never an owner. tas 0 frees the cell; any other byte, NUL included, takes it only when it is free and otherwise leaves the holder in place; no argument only reports. Every reply is ok and the byte the cell held before the request, so a caller polls until it reads 0 or its own byte. The reply is framed with an explicit length so a NUL owner round-trips. This is a service carried over the bus, not the bus arbitration below. No IRIX 6.5.30 binary is known to send it.

nmi

An unpowered module answers err cmd. Otherwise ok, and one second later the module's processors get a 100 ms NMI pulse; another nmi inside that second starts the wait again. After the pulse the controller frees the tas byte and reinitialises its bus interface. No message goes to the Hubs, and module power, countdowns and console selection are untouched. With no module owner (the Origin 200) the controller drives its own nmi output, which the machine wires to the NMI input of every processor on the node; an Origin 2000 module's controller has its module-management device pulse the module's NMI output, which the machine wires to every processor in the module, and the lock is freed as that pulse starts rather than as it ends. What sits between the midplane line and a processor's NMI pin is not modelled. The firmware starts the second when it answers, and so does the model: unlike a reset, the pulse disturbs nothing an unread ok would protect. The Origin 2000 build shows its NMI status message. An Origin 200 master forwards the NMI to its slave (see Master and slave).

sel [<name>|all|none|auto] / see [<name>|all|none]

The console input selection and output filter. Each takes two characters from the character reader, folded to uppercase. A processor name is a slot digit 1 to 4 and a or b, for processor numbers 0 to 7 (1a is 0, 4b is 7). With no argument sel reports ok auto, ok none or ok and a name, and see reports ok all or ok and a name. sel with a name selects that processor for console input; all and none (only the first two letters count) disable input selection, and auto makes it follow console output. see with a name copies only that processor's acp output to the serial port -- other output is still accepted and counted -- and also selects it for input; all and none copy everything. Anything else is err arg and changes nothing; a successful setting answers ok. Every input selection, even of the processor already selected, discards queued input not yet fetched; see all touches neither the input selection nor the queue. Queued input is announced with signal 2 to the selected processor, to the processor that most recently sent console output under automatic selection, and to nobody with selection disabled. The controller starts on auto and all with no previous output sender, so queued input is announced to nobody until a processor sends output. The sender of an acp is its selector character less the code of 0, with no range check, whichever processor carried the request; it is recorded as the request is parsed, so a frame with a bad checksum still records it, and a selector outside 0 to 7 leaves automatic selection announcing to nobody. see with a name compares that sender with the named processor. Neither clr, rst, nmi nor a bus reinitialisation changes the selection or the sender.

nic <p> <s> <d>

One-wire identity passthrough, an interactive-monitor command, not boot-driven. Its wire contract takes three hex arguments (pulse, sample, delay) that bit-bang the midplane one-wire line, and it answers ok <hex> with the sampled bit, over which a one-wire ROM read is layered by repeated calls. On an Origin 2000 module the line reaches the module's MODULEID and midplane parts (Module serial and midplane parts). On an Origin 200 no one-wire device is modelled on it, so the open-drain line idles high and every sample reads 1 -- a modelling choice, not a datasheet value. The three values come from the hex reader, and any of them missing is err arg.

aut [1|0]

Origin 200 build only. The automatic power-on bit, 0x02 of the configuration byte at offset 7 of the controller's NVRAM page (address 0x57). The query answers ok 1 or ok 0; aut 1 and aut 0 read, modify and write the byte and answer ok; anything else is err arg. The bit lives in the modelled NVRAM, so it survives a reset, and it would only matter when the controller next starts, which the model does not separate from the machine's start. The controller reaches the NVRAM as another master on the bus the request still holds, so the model drives the part's own I2C interface directly rather than nest a second transfer. A fresh store starts as the controller's first power-up leaves it (see hw/nvram/sgi-elsc-nvram.c), with 0x02 set, so a fresh machine answers ok 1.

clr

Answers ok with the module on or off. It cancels a pending power-down countdown, the heartbeat watchdog and the fan-high request, and on the Origin 2000 build blanks the display. It leaves the tas byte, the margins, the fsc and tst flags and the NVRAM alone. It also turns serial echo back on and ends serial supervisor mode, whichever channel it comes from.

fan [h|n]

fan h and fan n set and clear the fan-high request and answer ok; any other letter, uppercase included, is err arg. The query answers ok h while the request stands and ok n otherwise. The model has no temperature inputs and no fan monitor, so the request alone decides, and the firmware's failed-fan reply never arises. Over I2C neither form writes the NVRAM.

fsc [1|0]

Declares a multimodule controller present or absent and answers ok. The query form loses its answer over I2C, as the firmware's does, and answers a bare ok; any other argument is that query too and leaves the flag alone. In the Origin 2000 build the flag stops the controller powering the module up on its own when the key moves, which the model's key never does, and it mirrors host display text to the serial line (see The operator's command line).

tst <c>

The factory's short timeouts: 1 sets them and any other character clears them, answering ok; no character is err arg. They shorten the power-up supply check and fan-check delays, which in a model whose supplies and fans never fail change nothing a host can see, so the flag is only stored.

tmp

ok n: the model has no temperature inputs. A master controller that has heard sla 0x07 from a slave appends a space and the slave's last temperature letter.

key

Origin 2000 build only. ok on: the model's key switch is on.

vlm <supply> [h|l|n]

Origin 2000 build only. The supply is 3, 5 or v; with no second character the reply is that supply's margin, ok h, ok l or ok n, and a second character sets it. vlm 5h and vlm 5 h are the same request. Anything else is err arg. The margins are stored; nothing electrical follows.

sla <c>

The report a slave controller sends its master. The Origin 2000 build answers ok and does nothing. In the Origin 200 build a master takes n, h and o as its slave's temperature and 0x07 as the slave announcing itself, and a slave stores the character. A slave does not send its own reports in the model, so a master hears one only from a test or a host that sends it, and it logs rather than carries out the shutdowns and fan reports that o, 0x04, 0x05 and 0x06 start.

Anything else is answered err cmd. That reply is load-bearing: the firmware's console-selection routine issues a DIP-switch read before it ever probes the controller as a console, and it tolerates a negative reply but not a stalled bus.

The serial-only commands (cfg, dbg, ech, fre, mod, nvm, pas) and any mnemonic a build lacks answer err cmd with no other effect. Every other command either build answers over I2C is modelled.

Deliberate gaps

Two parts of the controller are left out on purpose:

  • The slave's side of the controller-to-controller link: a slave controller does not send its sla reports to its master, and a master logs rather than carries out the shutdowns and fan reports sla o, 0x04, 0x05 and 0x06 would start. The master's side, its forwards to the slave, is modelled (Master and slave).

  • The temperature, fan, supply and key-switch fault inputs. The model's module is healthy, cool, its fans and supplies never fail and its key is on, so none of the shutdowns, messages or replies those inputs drive arises.

Module power

The controller decides whether its module is powered: the Origin 200 controller holds that itself, and an Origin 2000 module's controller drives its module-management device's power output. Either way a power event, and the module reset rst asks for, reaches the controller's own module and no other: the Origin 200 controller drives power and reset outputs of its own that the machine acts on for that module alone, and the Origin 2000 module-management device does the same through its outputs. While a module is unpowered the controller keeps running and answering: pwr gives ok d, rst and nmi give err cmd, an nmi or heartbeat pulse already under way reaches no processor, and an Origin 2000 module stops publishing grants while an Origin 200 controller keeps publishing them. Serial commands still run on both.

Removing power stops the processors of that module at once: each is reset, which loses its state as a powered-down part does, and halted with its Hub's processor enable clear, while the virtual clock and the rest of the machine run on. After the reset Status.ERL masks every interrupt, so an interrupt the Hub still raises cannot end the halt, and the controller sends no NMI to an unpowered module. The machine's resets keep the processors stopped while the module stays unpowered. When power returns the machine cold-starts that module and no other: its processors are reset and its parts cold-reset, and the processors start from the reset vector (SGI Scalable Node family machine, "Module power and reset"). The power-up sets the controller's cold-power latch before the module starts.

The state that holds them is the controller's power state, the Hub's processor enables and the processors' own state, all migrated, and the timers that end the hold are on the virtual clock, so a migration or a record and replay reproduces the off interval. A controller whose module is off says so again after a load, which holds the module's processors again in case their reset was still queued when the source stopped. A module start owed when the source stopped is part of the machine's migrated state and is made when the destination starts running, not during the load, where it could run before later sections load over it.

When a module loses power and every module of the machine is then off with no power-up to come -- no power-cycle countdown and no heartbeat watchdog that will cycle a module -- the machine powers down, which is what IRIX's shutdown -p relies on; a migration taken after that point makes the destination power down too. The machine decides this as a module loses power, and again when a power-up that was to come is cancelled on an unpowered module (hbt 0 or clr stopping the watchdog): with nothing left to bring any module back, the machine ends rather than idle with every module off, which the datasheet's rule asks for. A module off while others run stays stopped. A two-module Origin 200's slave powers off alone when its own countdown or a command sent to it removes its power; its master's power-off takes it along (Master and slave).

Every pending event in the datasheet's rule keeps the machine alive: a power-cycle interval or power-up sequence, a watchdog stage that leads to a cycle, the controller's start-up power-up not yet run, and a master's power-up or power-down forward not yet delivered to its slave or dropped. The start-up power-up with a delay is the machine's module-start-delay (Start-up power-up); without one an Origin 2000 module is powered in the controller's own start, before any processor runs.

Master and slave

On a two-module Origin 200 the master controller tells the slave what it does to its module, over the link the two controllers have, and the slave takes each as an ordinary command:

  • pwr d 0 whenever the master removes its own module's power: by pwr d with or without a delay (the countdown's expiry included), by pwr c and by the heartbeat watchdog's power cycle;

  • pwr u whenever the master has powered its own module up, which for pwr c is after its own off interval and power-up sequence, so the slave stays off behind the master's local power-up timer;

  • nmi for every nmi it accepts, and for the heartbeat's NMI only once the slave has announced itself (sla 0x07);

  • fan h and fan n while that link is up.

rst is never forwarded. A slave's own countdown, or a pwr c sent to it directly, acts on the slave alone and forwards nothing.

Only one forward can be pending: a later one replaces an earlier one not yet sent. A forward goes out at the master's next turn on the bus and is tried at most five times, then dropped; the master has done its own part either way. The model carries a forward as a call from one controller to the other, the way the machine already joins the master's grant ring to the slave's adapter, and takes a turn as one revolution of that ring, five milliseconds. An attempt fails only when the slave answers nothing, which is while it waits out its power-up sequence; the datasheet does not say what else could fail an attempt, so failures of the bus grant itself are not modelled. A pending power-up or power-down forward keeps the machine from ending, and the machine asks again when it is delivered or dropped. The pending forward migrates in a subsection that is present only while one is waiting.

IRIX's power-off sends pwr d 1 to the lowest-numbered module's controller on a two-module Origin 200. The datasheet infers, and does not establish, that this is the master. The model gives the master the first node and the lowest module number, so the countdown expires on the master, the master forwards pwr d 0, both towers go off and the emulator ends. Were the lowest-numbered module the slave, only the slave would go off and the master's processors would wait in the kernel's power-off loop.

Start-up power-up

On hardware an Origin 2000 controller powers its module up about six seconds after it starts, and an Origin 200 master does if its NVRAM says automatic power-on (aut); an Origin 200 slave waits for its master's forward. An Origin 2000 module starts unpowered and its controller powers it up at its own start, through the same power-up that ends a power cycle: the cold-power latch is set and the module's power output rises, which is what starts it. The display keeps the version string it shows at start; whether a start-up power-up replaces it with a power-up message is not known. By default the model runs that at once, with none of the wait, inside the controller's reset (the machine's own reset, which stands for the cabinet's AC cycle), not on a timer, so power is on before any processor runs its first instruction. Every guest and test starts its processors at time zero, which a wait there would change. An Origin 200 module starts powered by default.

The machine property module-start-delay (milliseconds) models the wait instead: every module starts off, the controller counts the delay on the virtual clock, then runs the whole power-up sequence, supply hold included, and the machine does not end while that is pending. The key switch, over-temperature and a multimodule controller, which the datasheet says cancel the Origin 2000 power-up, are not modelled (the key is on, the module is cool and no multimodule controller is present).

Controller state across resets

The controller is powered from the cabinet, not the module, so it is in none of the module's resets and power changes: rst, power-off and power-up never name it. The Origin 200 controller sits on its Hub's I2C adapter bus, which the module's cold start resets with the adapter, so there it rides through that reset; the Origin 2000 controller's bus is its module-management device's, which the module's start does not touch. Through them it reinitialises its bus interface and its queues, frees the tas byte and drops any message it had queued for the Hubs, and keeps everything else: module power and its power-up countdown, a power-down countdown (which a power-off ends), the waits of an accepted rst or nmi, the heartbeat watchdog, the console selection and output sender, the fan request, the fsc and tst flags and the margins. The Origin 2000 build's display keeps what was last shown there, though the controller's own status messages replace whatever a host wrote (see Alphanumeric display). Any other QEMU reset, such as system_reset from the monitor, stands for an AC cycle: it is the controller's own start and clears all of it, the other module's controller included on a two-module Origin 200, and the start powers the module up (Start-up power-up).

Controller messages

Some commands make the controller queue a message for the Hubs: a timed or soft pwr d queues pd remote, pwr c queues pd cycle and rst queues rst. A message is announced with signal 2 in every processor code's slot, and get from a processor returns its text, with no ok, and stops announcing it to that processor. The announcement lapses about a second after the message is queued, and a later message replaces an earlier one. On an Origin 2000 module the module's grant scheduler announces it. The IRIX 6.5.30 kernel starts its controller-initiated shutdown when it reads pd remote; it sends pwr d only while shutting down or powering off, so a normal boot never sees one. pwr c and rst queue their message once the caller has read the ok, and the restart that follows clears it, so no Hub reads pd cycle; real Hubs lose power before they could either. The model has no thermal, fan, supply or key events, so the controller's other messages never arise. The firmware also has an interrupt line to the Hub, which the model does not drive.

Deferred destructive actions

rst, pwr d and pwr c do not act when they answer ok. Each arms a deferred action that the model carries out only once the caller has read the whole ok, through a two-phase state machine:

ARMED

The command was accepted and its ok framed, but the ack has not been fully delivered. A later request on the bus supersedes the pending response and cancels the armed action -- a caller that walks away without reading its ok gets nothing.

COMMITTED

The guest has read the ack to its end. The action is past the point of no return: it survives a superseding request and a live migration, and it fires.

The transition is the fetch of the response's last byte -- the read that hands the guest everything through the last text byte of the ack -- not a bus STOP or NACK. Committing there is what keeps the action when a master NACKs the last text byte and then issues a same-address repeated START with no STOP: neither terminal event sees the whole ack delivered, yet the guest has it. The committed action then fires, releasing the I2C bus -- so the controller is not left matched and misrouting the next transaction -- before requesting the reset, power-cycle or shutdown.

Firing is scheduled at the transaction's next boundary -- a NACK, a STOP, or the next request's START -- rather than at the commit, so the reset never runs while the guest is still reading the frame. One path therefore never schedules at all: a guest that reads through the last text byte and then abandons the bus -- taking no checksum, sending no STOP and no repeated START -- commits the action but reaches no boundary, so it never fires. The IRIX driver cannot leave a transaction that way: every ELSC exchange ends with a STOP, after the datasheet's closing invalid-address resync step, so a committed action always reaches a boundary. A stream migrated in this window is handled the same way -- a committed action is re-armed on load only if its firing was already scheduled at a boundary (deferred_scheduled); one still waiting for its boundary waits for the destination's.

Firing queues the action on the requesting processor's own work, at the processor's next translation-block boundary, rather than a main-loop bottom half: round-robin execution reaches queued work before any peer is scheduled again, so a bottom half's real defect -- every other processor free to keep executing until the main loop next runs the reset, a different number of instructions on every run -- does not arise. A rst only starts its one-second wait there, on the virtual clock, so its reset lands at a fixed point of virtual time and the processors run until then. An immediate power-cycle or power-down removes the module's power in that work, which queues a stop on each of the module's processors (SGI Scalable Node family machine, "Module power and reset"); the requester's own stop runs at its next block boundary. Multi-threaded execution cannot promise a peer stops before its own next instruction -- it runs on its own host thread -- so there only the resulting power-cycle or shutdown itself is guaranteed, not a bound on what a peer executed first. With no processor to queue the work on -- the bottom half re-armed after a migration, or a qtest access with no processor running guest code -- firing still uses a bottom half, which does not stop any processor; nothing here has settled what real hardware does with a peer processor's execution in that window, only that this model must not leave it to host scheduling.

Where an Origin 2000 module complex owns this controller, the module decides what a reset or a power-off actually reaches, and it is asked before the command is answered rather than after. A command the module cannot carry out is answered err cmd. The ok is the caller's proof that the action happened -- it will not fall back to its own hardware reset afterwards -- so acknowledging an action that will not happen is a lie with nothing in the protocol to expose it. With no module owner, which is the Origin 200, the controller is the whole module and answers for itself.

A destructive command that arrives while another is already committed cannot change it: the committed action wins and fires. The new command still answers ok, deliberately -- refusing would make the IRIX caller fall back to its own hardware reset and race the committed action, which is worse than a stale ok. But that ok then describes a command the machine will not perform. The action carried out is always the committed one; the sixteen combinations resolve as:

committed vs requested

rst (reset)

pwr c (cycle)

pwr d (shutdown)

pwr u (power-up)

reset

exact

restarts; name only

restart, not off

ignored: module on

power-cycle

restarts; name only

exact

restart, not off

ignored while on; else on after the interval

shutdown

off, not restart

off, not restart

exact

ignored: module on; ends off

power-up

refused: err cmd

on with no off interval

on, not off

exact

On the diagonal the ok is exact. Between reset and power-cycle the machine restarts either way, so the ok names the wrong action but not the wrong outcome. In the four cells where a committed shutdown meets a requested restart, or a committed restart meets a requested shutdown, the outcome itself differs -- the machine ends up off when the caller asked it to come back, or the reverse. Every absorbed command is logged (LOG_GUEST_ERROR) naming the committed action and the new command, so the mismatch is never silent. pwr u and the commands against a committed power-up follow from the module's power instead: a committed reset, cycle or shutdown leaves the module on until it fires, so pwr u is the powered module's no-op ok and nothing is logged, and a committed power-up leaves it off, so rst is refused and pwr d gives the unpowered module's bare ok, again unlogged; the module then comes on although the caller asked for it off. Only a pwr c meeting a committed power-up, or a pwr u meeting a cycle committed on an unpowered module, is absorbed and logged.

This table is model behaviour that no hardware capture has confirmed. The window in which the collision arises is host-scheduling latency between the fetch-seam commit and the bottom half -- not a sub-instruction gap -- and no firmware this project runs issues two destructive commands back to back, so no guest reaches it. What would settle whether real hardware resolves the collision the same way is a bus trace of two destructive commands issued back to back, which nobody is likely to take. It is recorded as what the model does, held distinct from what the hardware is known to do.

Alphanumeric display

An Origin 2000 module controller drives the module's front-panel eight-character alphanumeric display. The IRIX 6.5.30 IP27 PROM writes each node's boot progress there as two hex digits, at positions 2s-1 and 2s for slot s, and the IO6 PROM and the kernel write short messages with dsp. They send the same commands on an Origin 200, whose controller build has no display and answers err cmd; every sender ignores the reply and none retries, so the refusal costs nothing. The controller starts with its version string, VER 3.2 and a space, on the display.

The controller also writes its own eight-character status messages there, which replace whatever a host wrote: a remote power-down message for a timed or soft pwr d, a reset message for rst, an NMI message for nmi, a heartbeat-timeout message when the watchdog starts its warning, and messages as module power goes and returns. The texts of these messages are not known, so the model does not invent characters for them: info elsc shows the last text a host wrote and, when a status message has replaced it, names that message. A later dsp or dsc replaces the message in turn, and clr blanks the display.

Bus arbitration

The controller and every node's Hub share one I2C bus with no real multi-master mechanism. The controller arbitrates by broadcasting a rotation of per-processor signal bytes; a processor polls its PCF8584's data register for its own signal before starting a transaction.

The signal pair for a processor code c is 0xE0 + c (signal 1, "your slot, nothing waiting") and 0xE0 + c + 8 (signal 2, "your slot, something waiting for you"). The code must fit in three bits: signal 2 is signal 1 with bit 3 set, so a code of eight or more would collide with another processor's signal 1. Eight codes is also exactly the protocol's addressable space -- four node slots of two processors each. The Origin 200 controller's ring is narrower. The datasheet states it for the two-module machine: processor codes 0 to 3, then the slave-controller position. The model uses the same five-position ring on a single module too. That is an inference, not an established fact: the datasheet describes one controller counter covering those five positions, and nothing found describes a different count without a second module. The model publishes the fifth position as code 4's signal byte, which no processor waits for.

Two properties of the rotation are contracts, not conveniences:

  • A processor's own grant must be absent before it trusts a later appearance of it. The other positions' grants supply that absence; there is no separate gap broadcast.

  • Signal 2 is presented only while something waits for the slot's processor: console input, for the console processor, or a pending response, for its requester. The console case is what tells the driver a get will find something -- the driver never issues get without having seen it -- and it is the special case of the general rule, observed from the 6.5.30 firmware's slave bring-up, which parks a launching processor on its own signal 2 until the controller announces the response it has yet to read.

A response belongs to its requester -- the processor whose request the direction switch completed -- and it outlives the transaction that produced it: a requester may end its transaction with the response unread, poll for its own signal 2, and fetch the frame with a read-only transaction. The response stays pending, and its owner's slot keeps presenting signal 2, until it is read to its end or a new request replaces it. A request from a context that carries no processor -- a monitor or qtest access -- is attributed to the console processor.

The controller attempts one address-only grant on each one-millisecond periodic tick, so every position stands for one tick and a ring of n positions turns in n milliseconds. A grant stays readable in every PCF8584 data register until the next one replaces it, which covers the firmware's hold check of 250 converted Hub counter units (250 microseconds at the model's counter rate). Each publication recomputes the signal 2 half. Each tick re-arms the next one tick from when it actually ran, so a tick the host runs late stretches that position rather than shortening the next one below the hold check. The model publishes code 0 at reset and advances after each publication, where the controller firmware advances before each eligible attempt; the resulting difference of about one tick in the ring's starting phase after reset is a model choice. A tick that finds either module's bus busy publishes nothing and does not advance, and the controller waits for its next tick rather than publishing as the bus frees, so a STOP never triggers a grant. The datasheet takes this pacing from the controller firmware and forbids lengthening a position or inserting a gap to compensate for emulator scheduling; the model does neither. The rotation is purely timer-driven: no bus traffic ends a position early, and no acknowledgement consumes a grant. Busy ticks are detected from the I2C core's bus state rather than through its pending-master queue, because the PCF8584 model drives transactions directly and never calls i2c_bus_release().

The rotation is this model's synthesis of a mechanism the Origin 200 midplane provides some other way, so the arbitration property (on by default) switches it off. An Origin 2000 module needs that: its grants are real address-only bus traffic published by the module controller itself, onto a bus whose participants the I2C core identifies -- and the broadcast drives the core's anonymous transfer calls, which assert that no participant ids are configured. Left on, the rotation would abort such a machine rather than quietly do the wrong thing.

AUX serial port

The master controller is the far end of the Origin 200's external AUX serial port. The -serial lines remain node-major with a fixed stride of six: node n owns the block [6n, 6n+6), and its nominal AUX slot is the third line in that block. The external AUX backend attaches only to the master, node 0 at index 2. A backend provisioned at the slave's nominal index 8 remains unattached. Node 0's index 3 is the bring-up UART, which exists on node 0 only.

The operator's command line

Everything the operator types is console input for the processors except Ctrl+T (0x14), which starts a command line for the controller. Console input is queued for get, unchanged, and announced as the sel entry describes; a full queue keeps taking bytes and overwrites its oldest. The line has no flow control, so the controller always takes input and its output never stalls.

  • After Ctrl+T, with echo on, the controller prints a line end and MSC> with a space. Typed characters are stored and echoed; backspace or delete removes the last one and prints backspace, space, backspace. A carriage return, line feed or NUL ends the line (a return echoes as return and line feed) and the line waits to run. A second Ctrl+T abandons the line, erases the prompt and passes one Ctrl+T on as console input; what was typed stays and starts the next line. A line feed after the return arrives once the line has ended, so it goes to the processors.

  • Console output (acp) that arrives while a line is being typed is acknowledged over I2C and lost.

  • A waiting line runs once the bus is free, the controller's own I2C slave is idle and no Hub message is pending; an I2C command arriving at the same moment goes first. On an Origin 2000 module the grant scheduler gives that turn, unpowered or not, and publishes no grants until the line has run; an Origin 200 master stops its own grants while the line waits on anything but a Hub message.

  • The line is parsed as an I2C request, with the byte that ended it in place of the carriage return, so only a return separates a bare mnemonic. The reply is Ctrl+T, the reply text of the I2C contract but ok with no trailing space when it carries no value, and a return and line feed; no prompt follows. Errors include err perm. fsc with no setting prints ok1 or ok0. Ctrl+T and Enter alone print ok with echo on and err cmd with it off.

  • ech sets echo (1 on, 0 off, none toggles); echo governs the prompt, its erasure and the echo of typed characters. clr turns it back on.

  • Supervisor mode starts off. pas <word> with exactly four characters matching the password at offsets 1 to 4 of the controller's NVRAM page sets it, and anything else is err arg; pas alone clears it; pas s <word>, in supervisor mode, stores the first four characters of a word at least that long that follows exactly one space. clr from either channel clears it. Without it, clr, hbt, nmi, rst, pwr u/d/c, the setting forms of fan, aut, vlm, fre, mod and dbg and nvm writes print err perm; nmi and rst first print err cmd on an unpowered module.

  • acp and get print err cmd. fan h/fan n also set or clear bit 0x01 of the NVRAM configuration byte. The serial-only commands reach the controller's NVRAM page: mod the module number at offset 8, dbg the debug-switch bytes at 5 and 6, fre (Origin 2000 build) the clock-select byte at 11 -- its midplane clock chip is not modelled -- and nvm <addr> [<data>] any byte of the management NVRAM, the address's high byte choosing the device as the firmware forms it, so addresses above 7ff alias or reach other devices; a device that does not answer prints a bare err. cfg prints the NVRAM's raw bytes from offset 0 through the first zero byte, with no Ctrl+T and no ok. Every machine that builds the controller gives it its NVRAM. Without it these commands, pas and aut answer as they would with every byte zero and lose what they write, and the model logs the missing part as unimplemented.

  • A command's power or reset action runs once its reply is printed.

  • Unsolicited output: at its own start the controller prints Ctrl+T, MSC and a space, its version field and a line end. The Origin 200 build prints each Hub message as Ctrl+T, return, line feed, MSC:, a space, the message, Ctrl+T and a return. An Origin 2000 controller with a multimodule controller declared (fsc 1) copies each host dsp as Ctrl+T, dsp, a space, the text, the digit 4 and a line end; its own status messages would go out the same way with severity digits 1 to 3, but their texts are not known, so they are not sent.

  • An Origin 200 slave answers Ctrl+T with the prompt and Slave! when echo is on and takes no command; with echo off it takes the line silently and never runs it. The slave's line is not attached to a backend in this machine.

QEMU models the slave controller and its internal I2C command path. It is not a hardware claim, because the available Origin 200 evidence does not establish slave-local I2C or arbitration behavior.

The firmware redirects its console to this port after a failed power-on diagnostic. A guest flushing console output here with no character device attached is therefore losing diagnostic output; the model warns once and keeps serving the protocol.

The PCF8584 controller

Each node reaches this bus through a Philips PCF8584 embedded in its Hub (hw/i2c/pcf8584.c), which QEMU models against the Philips product specification. Two addresses, selected by the A0 pin, sit eight bytes apart the way the Hub wires them. Register selection is asymmetric: ESO chooses between the data register and the configuration registers, but ES2 keeps selecting either way -- with the serial interface enabled it still chooses between data and the interrupt vector, and only ES1 stops meaning anything. Reads of the data register advance the receive pipeline, and the firmware issues eight-byte accesses, so the register's implementation width is eight or the core would split one access into two side effects.

The model's interaction with QEMU's I2C core carries three contracts. The core rescans for a slave only when none is matched, so a repeated start to a different address (the protocol's closing invalid-address step) must end the old match first; ending it unconditionally would deliver a finish to a slave still mid-command. A refused same-address repeated start is left open by the core for the caller to end, and held open it keeps the bus busy forever against the arbitration broadcast. And a send over the core's empty matched list reports success, so a refused start is remembered rather than asked again -- the firmware's closing step, addressed to 0x7f with nothing there, must read back NAK.

Monitor access

info elsc prints each controller's console-input queue, the alphanumeric display content, any pending response and its owner, and the arbitration signal currently presented for the console processor, without requiring a trace backend or diagnostic sink.

Module controller configuration NVRAM

Each module system controller keeps a 2048-byte configuration NVRAM on its module's management I2C bus: the Origin 200 Hub's embedded ELSC, and the Origin 2000 or Onyx2 module controller, whose one store its four Hubs share. It holds the board inventory log from address 0 and, at 0x700, the controller's block: validity marker, password, debug-switch values, configuration byte, module number, self-test flags and partition, domain, cluster and cell numbers. hw/nvram/sgi-elsc-nvram.c models it as one device. Ratings follow SGI Octane and Octane2 (IP30).

Fact

Rating

Source

The store is addressed 0 to 2047 and addresses 1792 to 2047 are reserved for the system controller's use.

established

108-0170-001 scr and scw command text (PDF page 76, printed 4-22).

The module number (1 to 255, 0 unassigned) lives in this NVRAM and is backed up in each node's PROM log.

established

108-0170-001 section 1.5, printed page 1-4 (PDF 18).

Address A answers at I2C address 0x50 + (A >> 8) with the one-byte word address A & 0xff.

established

The Origami project's PCF8584 and ELSC datasheet, configuration NVRAM section. Which part, and how many packages, is unknown; one 24C16-class part fits the addressing.

The controller block's layout: 0x700 marker 0x37, 0x701 to 0x704 the password, 0x705 and 0x706 the debug-switch values, 0x707 the configuration byte, 0x708 the module number, 0x709 the self-test flags, 0x70a to 0x70d partition, domain, cluster and cell.

established

SGI's GPL SN code in Linux history (v2.5.0, arch/ia64/sn/io/l1_command.c), as the datasheet records it.

A store with no backing file starts as a master controller leaves it after its first power-up: zeroes, then at 0x700 the marker, none, zero switch values, the configuration byte (0x02, automatic power-up, on the Origin 200 build; 0 on the Origin 2000 build), the module number (0 on Origin 200; the module's selected number on Origin 2000), zero self-test flags and partition, and the clock-select byte at 0x70b: 0x78 on Origin 200, 0 on Origin 2000.

approximation

The controller's initialization, the Origin 200 build's 0x78 included, is established by the datasheet. The zero fill elsewhere is not, since factory contents are unknown and an erased EEPROM usually reads 0xff. The Origin 2000 controller writes 0x78 only on the full-clock midplane type, and this module being that type is inferred. Its PROMs read 0x70b as the domain, so the model keeps 0 there rather than change what a guest sees on an inference.

A two-module Origin 200's slave-module store starts like the master's.

approximation

The slave controller does not initialize its store, so its contents are unknown (an erased part usually reads 0xff), and which store the slave module's Hub reaches is unknown. In the model the slave node's processors reach that store through their own Hub, so its seed is guest-visible; keeping the master's seed leaves that behaviour unchanged.

A sequential read or write past a block's last byte wraps to that block's first byte. A write of any length is accepted. Writes complete at once and are never refused as busy. The part does not accept a general call.

approximation

Block-end behaviour, the write buffer and the write-cycle time are unknown on hardware, and a real 24C16 wraps a write within a 16-byte page; the firmware's longest write is 12 bytes from a block's start. The firmware's log writer does not retry, so a busy NAK would cut its records short.

Persistence: the store survives reset, migration between identical builds and, with a module<N>-nvram file bound, QEMU processes. A bound file's contents win over the product's seed.

established

Datasheet persistence paragraph; the file is an emulator feature.