Preparing an MVME172

Andrew Johnson

This document describes how to set up an MVME172 board for use at APS. Details on how to rebuild the bootrom code are given at the end.

Preparing a new MVME172 board

Motorola have built many different models of the MVME172 board. The LX models have 4 RJ-45 serial connectors on the front panel and 2 Industry-Pack slots, and are marked with a -2xx or -3xx suffix. The FX models have two serial ports connected via a transition module and 4 Industry-Pack slots, and are marked with a -4xx or -5xx suffix. Both models are used by the APS controls group. More recent models are marked MVME172Px and use a new Petra chip for much onboard funcationality, thus they have a different layout and jumper designations. There are both 2-slot and 4-slot versions of the MVME172Px boards, which vxWorks still identifes as being -LX or -FX models in its bootup logo screen.

These instructions were originally written for the LX series, however the APS versions of the vxWorks Board Support Package for the mv172 are compatible with all models, thus some details below may vary for the other models but the majority of the instructions should be the same.

The MVME172 has 1 or 2MB of soldered Flash EPROM, and another EPROM in a socket which holds the Motorola debug monitor used for programming the Flash EPROM. This document describes how to copy the vxWorks ROM boot image into the Flash and use this for booting. The socketted EPROM should never be removed as this will be used if it is ever necessary to reprogram the Flash again.

First set up the board jumpers. The only relevent jumpers are J1 = System controller, and J21.9-10 [or switch S4.5 for the Petra board models] = Boot EPROM selection. The MVME172 has an "automatic" system controller mode set as the factory default, which means that it's unlikely you'll ever need to touch J1 [on Petra models check that the J1 jumper connects pins 2 and 3, the factory setting on one board was wrong].

To program the vxWorks boot code into Flash EPROM you need to remove jumper J21.9-10, located between the socketted EPROM and the RAM mezzanine board - this causes the CPU to boot using the socketted EPROM chip. On Petra models change the setting of Switch S4.5 to OFF - S4 is an 8-way switch block just North of the 68060 chip (factory default appears to be OFF anyway if this is a new board).

Insert the board into the VME chassis, connect the Ethernet and console serial port cables, then power up the VME chassis. The wiring from the RJ-45 serial connector to a standard DB25 connector is as follows (Black Box part FA732):

    RJ-45    DB25
    -----    ----
    4 (grn)   2
    5 (red)   3
    6 (blk)   7

If the board has already been used at APS the console baud rate from the debug monitor may have been set to 4800 baud, evidenced by seeing text like

    f~~xff~ff`x`xxx`xxx`fffxffffx~`fxffx``f~xff`f`~`f~~~~`
    ffff~x~f~xxfffxf~~fxx`fff`fxffxf`~~``xx`fxx~

instead of the usual Debug boot-up message. The baud rate can usually be reset to 9600 baud by holding the Abort button in while pressing and releasing the Reset button, which reinitializes the battery-backed RAM on startup. These instructions use the Ethernet interface to fetch the bootrom image, which is much faster than the serial port method, so it is not necessary to reduce the port speed to guarantee data transfer integrity.

If you are using 'cu -l cua/a' on a Solaris workstation to connect to the board and find some characters don't appear when typed, you'll need to add the option '-b 8' as the Debug monitor is sensitive to the serial character width.

At the 172-Bug prompt, start the system clock using the set command. The format is: set MMDDYYhhmm where MM is month, DD is day of month, YY is year, hh is hour (24-hour clock), and mm is minutes. The clock has to be running for the subsequent network commands to work.

    172-Bug>set 0709991002

Using 'niot', the Client IP Address, Server IP Address, and Gateway IP Address must be set up for APS's specific environment. The server address given in the example below is for saturn, and even if the board will eventually be booted from another machine you need to use saturn here to get the boot file image to be programmed into Flash EPROM. If your network connection is not within the ASD controls area subnet you may need to provide a Gateway IP Address, but usually you'll be Ok leaving this set to 0.0.0.0. Note the '.' answer to the Boot File Name question - this causes the entry questions to finish, and you can give it to any question once you've finished answering those below.

    172-Bug>niot
    Controller LUN =00?
    Device LUN     =00?
    Node Control Memory Address =xxxxxxxx?
    Client IP Address      =0.0.0.0? 164.54.___.___
    Server IP Address      =0.0.0.0? 164.54.8.103
    Subnet IP Address Mask =255.255.255.0? 255.255.252.0
    Broadcast IP Address   =255.255.255.255? 164.54.11.255
    Gateway IP Address     =0.0.0.0? 
    Boot File Name ("NULL" for None)     =? .

    Update Non-Volatile RAM (Y/N)? y
    172-Bug>

You might get an error message

    ERROR: Invalid Network Auto Boot Configuration Parameters Pointer (NVRAM)
at this point, which is not a problem and can be ignored.

Now download the ROM image from saturn using the 'niop' command. The file name below is set to the location of the mv172 ROM image in saturn's TFTP area. The size and time reported may differ if/when a new version of the bootrom code is needed for a new version of vxWorks.

    172-Bug>niop
    Controller LUN =00?
    Device LUN     =00?
    Get/Put        =G?
    File Name      =? vxworks/bootrom.mv172
    Memory Address =0000E000? 10008
    Length         =00000000?
    Byte Offset    =00000000?

    Bytes Received =&115740, Bytes Loaded =&115740
    Bytes/Second   =&115740, Elapsed Time =1 Second(s)
    172-Bug>

For Motorola 680x0 CPUs it is necessary to make some manual additions to the boot image before programming, which are done with the following command:

    172-Bug>ms 10000 0010 0000 ff80 0008
    172-Bug>

Now that the boot image is ready, the 'pflash' command is used to put it into the Flash EPROM.

    172-Bug>pflash 10000:40000 ffa00000
    Source Starting/Ending Addresses      =00010000/0004FFFF
    Destination Starting/Ending Addresses =FFA00000/FFA3FFFF
    Number of Effective Bytes             =00040000 (&262144)

    Program FLASH Memory (Y/N)? y
 ...
    FLASH Memory Programming Complete                  
    172-Bug>

When this command is finished, power down the chassis and replace the jumper J21.9-10 to boot from the Flash EPROM. On Petra models, change the setting of Switch S4.5 to ON. Then power the board back up and you should see the vxWorks boot countdown. You'll need to stop this before it finishes to set the vxWorks boot parameters for the IOC.

Rebuilding the boot rom code

To do this you need to login as 'tornado5'. The following demonstrates the steps needed.

    cd /home/phoebus/TORNADO5/dev68k
    source ENV
    cd target/config/mv172
    make bootrom
    rm bootrom.mv172
    aoutToBin <bootrom >bootrom.mv172
    scp bootrom.mv172 saturn:/tftpboot/vxworks/bootrom.mv172

Reprogram the flash using the instructions above.