Flashing MMSC Firmware

Note: the MMSC is also known by its older name, "FFSC". Similarly, the MSC was also once known as the "ELSC".

The firmware for the Origin2000 MMSC (Multi-Module System Controller) resides in non-volatile storage on the MMSC itself. There are times when it is necessary to replace the existing firmware with a new (or at least different) firmware image. There are a couple of ways to accomplish this, depending on the circumstances of the installation and the available equipment. This document describes these different procedures and explains when each is necessary.


Basics

The MMSC has six serial ports, each capable of running at speeds of up to 115200 Baud. The ports are not interchangable; each has a specific function, as follows:

Port Function
COM1 Terminal device (the "tty1" port on a lego rack system is actually connected to this port).
COM2 Connection to the MSC (Module System Controller) in the upper bay of the rack.
COM3 Connection to the MSC in the lower bay of the rack.
COM4 Connection to the master IO6 board.
COM5 Remote service modem (not a general purpose modem port). Also used for direct firmware downloads in emergencies.
COM6 MMSC debugging port (not used in customer systems).

Each serial port has a standard female 8-pin mini-din jack that should be labelled with its port number. The COM1 and COM5 ports can be attached to an Indy (etc.) using a normal 8-pin mini-din to 8-pin mini-din null modem cable. The COM2, COM3 and COM4 ports are attached to their respective hardware components with cables that should be provided with each system. They are, however, fairly standard 9-pin serial to 8-pin mini-din null-modem cables and in a pinch can be constructed by hooking together the appropriate off-the-shelf adapters and cables.

On a multi-rack system, the COM1 and COM4 ports are typically used on only one rack in the system (the one with the master IO6). The COM2 and COM3 ports are generally used on every MMSC.

The system console (tty1) on lego rack systems is attached to the IO6 through the MMSC. This allows the MMSC to intercept certain command strings, and also makes it possible for the MMSC to obtain data (such as new firmware images) from either a running unix system or the system console itself.

The tool used to flash MMSC firmware runs under IRIX and is called flashmmsc. It ships as part of IRIX 6.4, and can also be obtained from:

homegrown.engr:/usr/dist/mmsc/flashmmsc A version that runs under IRIX 6.2 can be obtained from: homegrown.engr:/usr/dist/mmsc/flashmmsc-6.2 The MMSC firmware image typically resides in a file named mmscfw.bin. The latest version can often be found in the same directory: homegrown.engr:/usr/dist/mmsc/mmscfw.bin


Using the Serial Downloader

After certain catastrophic failures (or when an MMSC first arrives from the vendor) the non-volatile storage that usually holds the MMSC firmware is erased. When an MMSC is powered on in this condition, it will often show a blank blue screen, or perhaps some PC-style BIOS configuration gibberish. Under these circumstances, it is necessary to flash the firmware image into non-volatile storage using the "Serial Downloader", a simple tool provided in the MMSC's BIOS.

This procedure requires a direct serial connection from either a PC or an IRIX system to the COM5 port on the afflicted MMSC. The serial connection should be set up for 19200/8/N/1 (only!). If using a PC, it must have a terminal emulator capable of performing xmodem or xmodem-1K file transfers. If using an IRIX system, it should have the flashmmsc program if possible, although an xmodem file-transfer program can be used if necessary.

Starting the Serial Downloader

There are two ways to start the serial downloader. If the MMSC has an attached display, then the serial downloader will be started if the bottom two buttons of the MMSC display ("down" and "enter") are held down while the MMSC is powered up. This is unfortunately a fairly awkward procedure and usually requires two people, one to stand at the front of the system and hold down the bottom two buttons of the display, and the other to go to the back of the system and unplug (then reconnect) the MMSC from its power supply. There is actually a short delay before the buttons need to be pressed; if you are desparate or just gymnastically inclined, it may be possible to power cycle the MMSC then run around to the front panel in time to hold down the buttons.

The display buttons should be held down until the serial downloader menu appears. It will look approximately like this:

SBC-FFSC Serial Downloader 1.0 (U)pload an application At this point, you can use either a terminal emulator or the flashmmsc program to transfer the firmware image.

The second approach to starting the serial downloader requires that the MMSC already have a working firmware image. In this case, the MMSC command downloader enable can be used to set the "serial downloader" flag on one or more MMSCs. If an MMSC's "serial downloader" flag is set, then it will automatically start the serial downloader the next time it is reinitialized.

Note that there is no way to reset the serial downloader flag after an MMSC has been reinitialized, except by flashing a new firmware image! Therefore, care should be exercised when using the downloader enable command.

If an MMSC does not have a working firmware image, then the only way to start its serial downloader is with the down+enter button technique. If such an MMSC does not have the display attached to it, then it will be necessary to unbolt it from its cabinet and move it next to the display so that the display can be temporarily attached.

Transferring the Firmware Image Using a Terminal Emulator

If the COM5 port of the MMSC is attached to a PC (or any other system capable of doing an XMODEM file transfer) you will flash the firmware by simply uploading it to the MMSC. The menu from the MMSC display should also have been echoed to the PC. If it was not, try hitting ENTER once or twice, check your connections/baud rate/etc. and make sure you are using a null modem cable (as opposed to one wired straight through) to connect the MMSC and PC.

Once you have gotten the serial downloader menu from the MMSC, simply type U, then instruct your terminal emulator to send the firmware image file, typically mmscfw.bin. The file transfer protocol should be either XMODEM-CRC or XMODEM-1K. The transfer will take approximately 10 minutes. The display will show a series of dots to indicate progress; a typical firmware image may take 10-12 lines of dots to complete.

Transferring the Firmware Image Using flashmmsc

If the COM5 port of the MMSC is attached to a serial port on a system running IRIX, you can flash the image using the flashmmsc program. The format of the command is:

flashmmsc -d -l /dev/ttydXX -f mmscfw.bin where /dev/ttydXX is the device name of the direct serial port you are using, and mmscfw.bin is the name of the file containing the firmware image you intend to load.

This program should be run once the display shows the serial downloader menu described above. It may take 10-20 seconds for the file transfer to begin, but once it does, a series of dots will be printed on both the MMSC display and the IRIX window. If these dots do not start after 30 seconds or so, check your connections as described earlier.


Upgrading MMSC Firmware From IRIX

If an MMSC is (more or less) operational and just needs to have its firmware upgraded to a new version, this can be accomplished from the IRIX system console using the flashmmsc command.

The flashmmsc command is assumed to be issued from a terminal that has access to one of the MMSC's associated with the system (such a terminal can access the MMSC itself by first typing the MMSC-escape character, typically CONTROL-T). The flashmmsc command is first issued using the -m option. Next, the MMSC flash command is issued to the desired MMSC by first typing the MMSC-escape character then the appropriate flash command.

For example, to flash a new firmware image onto rack 2 of a system that uses CONTROL-T for its MMSC-escape character, the sequence of events may look like this:

% flashmmsc -m Ready to transfer new image to full-feature system controller. To begin the transfer, type your MMSC escape character (normally CTRL-T) followed by the command: rack <rackid> flash where <rackid> is the identifier for the system controller you wish to upgrade. [User types CONTROL-T] mmsc> rack 2 flash Waiting for MMSC to initiate transfer... This will take the firmware image from the default location /usr/cpu/firmware/mmscfw.bin. To specify a different image location, use the -f option: flashmmsc -m -f my_special_firmware.bin

While this procedure is faster than using the serial downloader, it can still take 10 or more minutes to run, depending on the speed of the connection between the IO6 and the MMSC. As with the serial downloader, a series of dots will be printed to show progress.

Note: asynchronous messages to the console (e.g. from syslogd) will interfere with the file transfer. In environments where many messages are sent to the unix console, it may be helpful to run flashmmsc in single-user mode in order to avoid these messages. Alternatively, the serial downloader technique can be used instead. Because this approach does not use /dev/ttyd1, it is not affected by console messages.

Increasing the speed of the MMSC/IO6 connection

NOTE: This only applies to the speed of the MMSC/IO6 connection that is used when downloading an image from IRIX. There is no way to increase the speed of the connection used by the serial downloader.

The time it takes to download a new MMSC firmware image from IRIX can be improved by increasing the speed of the serial connection between the MMSC and the IO6. The maximum speed supported by the MMSC at this time is 57600 baud. Changing the serial line speed must be done in two steps:

  1. First, tell IRIX to change the speed of the IO6 serial port. This is generally done with the stty command. For example, this would change the speed of the serial port for the console on which it was entered to 57600 baud: stty 57600
  2. Next, tell the MMSC to change the speed of its serial port. This is done with the MMSC com command. To change the speed of the MMSC port used to talk to the IO6 to 57600 baud, you would first type the MMSC-escape character (usually Control-T), then enter the command: rack local com 4 speed 57600

It is important to do these two commands in order. If you change the MMSC serial port speed first, you won't be able to talk to IRIX in order to have it change its serial port speed. In that case, you would need to restore the MMSC serial port to its original speed (usually 9600 baud) and start over.

Once the speed of both serial ports has been changed, you should be able to issue commands to IRIX in the usual way. At that point, you can proceed with the flashmmsc command described above.

Note that under normal circumstances, the serial port speed of the MMSC will remain unchanged after a reset or power cycle. However, the IRIX serial port will return to its original setting (usually 9600 baud) as soon as you log out. Therefore, it is usually wisest to change the speed of both serial ports back to their original settings after the downloading has been completed. This can be done as follows:

from IRIX: stty 9600 type the MMSC-escape character, then: rack local com 4 speed 9600
Rob Bradshaw
Last modified: Thu Dec 19 10:33:12 PST