GM 1.6.4-supernova -- Myrinet for SGI IRIX 6.5
================================================

Author:  Rutger Bevaart (supernova)
Date:    May 2026
License: Same as original Myricom GM 1.6.4


Overview
--------

This is a patched version of Myricom's GM (Global Messaging) 1.6.4
driver suite that builds and runs on SGI IRIX 6.5.x systems.  The
original 1.6.4 source had four bugs in its IRIX build system that
prevented the userspace library and tools from compiling.  This
distribution fixes those bugs and adds experimental PCI revision 4
detection for newer Myrinet-2000 cards.

The build produces:
  - Kernel driver (myrigm.o) -- loadable IRIX kernel module
  - Userspace library (libgm) -- GM API for applications
  - Tools (gm_board_info, gm_allsize, gm_counters, etc.)
  - Mapper daemon -- discovers Myrinet network topology


Supported Hardware
------------------

VERIFIED WORKING:
  Myrinet M3F-PCI64C   (LANai 9, PCI rev 2)
  Myrinet M3F-PCI64D   (LANai 9.3, PCI rev 3)

NOT SUPPORTED:
  Myrinet M3F-PCIXD-2  (LANai XP, PCI rev 4)
  Myrinet M3F-PCIXE-2  (LANai 2XP, PCI rev 5)

The PCI-X cards (M3F-PCIXD-2 and later) use the LANai XP processor,
which requires a different initialization sequence and EEPROM layout
than the LANai 9 series.  GM 1.6.4 predates LANai XP support entirely.
While the driver will load and detect PCI-X cards (the supernova patch
extends revision checks to accept rev 4), the board will not initialize
correctly -- the EEPROM reads as all zeros and no data transfer is
possible.  Full LANai XP support would require backporting code from
GM 2.x, which was never ported to IRIX.

Stick with M3F-PCI64C or M3F-PCI64D cards for a working setup.


Supported Platforms
-------------------

Any SGI system running IRIX 6.5.x with a PCI or PCI-X slot:

  IP19  Challenge / Onyx
  IP20  Indigo R4000
  IP21  Power Challenge
  IP22  Indigo2 / Indy
  IP25  Power Challenge R10000
  IP26  Indigo2 R8000
  IP27  Origin 2000 / Onyx2
  IP28  Indigo2 R10000
  IP30  Octane / Octane2
  IP32  O2
  IP35  Origin 350 / Origin 3000

Tested on:
  - SGI Origin 350 (IP35), IRIX 6.5.30, MIPSpro 7.4.4m
  - SGI Octane2 (IP30), IRIX 6.5.30, MIPSpro 7.4.4m

Note: The kernel driver is platform-specific.  A build from an
Origin 350 (IP35) will NOT work on an Octane (IP30) or vice versa.
You must build from source on each target platform, or cross-compile
with the correct platform flag.


Prerequisites
-------------

  - SGI IRIX 6.5.x (6.5.22 or later recommended)
  - MIPSpro C compiler (cc) -- required
  - MIPSpro C++ compiler (CC) -- needed for mapper only
  - GNU make (gmake) -- SGI's make will not work
  - Root access for installation
  - Myrinet M3F-PCI64C or M3F-PCI64D card


Quick Start
-----------

1. Extract the source:

     gzcat gm-1.6.4-supernova-src.tar.gz | tar xf -
     cd gm-1.6.4-supernova

2. Build:

     sh supernova-build.sh

   The build script auto-detects your platform, runs configure,
   generates the platform-specific makefile, creates all required
   directories, and runs gmake.

   Options:
     sh supernova-build.sh IP30       Override platform detection
     sh supernova-build.sh IP30 nfs   NFS mount workarounds

3. Install (as root):

     sh supernova-install.sh

   This installs the kernel driver, userspace tools, library,
   and mapper to the standard locations (/var/sysgen/boot,
   /usr/myricom, etc.) and loads the driver.

   Options:
     sh supernova-install.sh userspace   Tools and library only
     sh supernova-install.sh kernel      Kernel driver only

4. Verify:

     /usr/myricom/bin/gm_board_info

   You should see your Myrinet card's LANai version, MAC address,
   SRAM size, and serial number.

5. Start the mapper (for network topology discovery):

     /usr/myricom/sbin/mapper


NFS Build Notes
---------------

If building on an NFS-mounted source tree (common when sharing code
between machines), scripts will fail to execute due to the noexec
mount option.  Use the "nfs" flag:

     sh supernova-build.sh IP30 nfs

This copies configure, libtool, and install-sh to /opt/dev/ on
local disk and creates symlinks back.  You may need to create
/opt/dev/ as root first:

     mkdir -p /opt/dev && chmod 777 /opt/dev


What Was Changed
----------------

1. VERSION
   String changed to "1.6.4-supernova" for identification.

2. drivers/irix/make-os.in (4 original Myricom bugs fixed)

   a) Added missing LIBGM definition.  Every other platform (Linux,
      Solaris, FreeBSD) defines LIBGM=$(libdir)/libgm.la in their
      make-os.in.  IRIX was the only platform that omitted it,
      causing the userspace library to never link into the tools.

   b) Fixed variable name: $(LIB_OBJS) changed to $(LIBGM_OBJS)
      in the libgm.la build rule.  $(LIB_OBJS) does not exist in
      the GM 1.6.4 Makefile namespace.

   c) Changed bare "libtool" to "$(LIBTOOL)" so the build uses the
      configured wrapper (./libtool) rather than searching PATH.

   d) Added GM_SYNC_LO assembly object integration.  The MIPS
      assembly file gm_sync.s (which implements the sync memory
      barrier instruction) was compiled for the kernel driver but
      not included in the userspace library.  GNU libtool silently
      drops raw .o files from archives, so a .lo symlink rule was
      added.

3. drivers/gm_instance.c (PCI revision 4 detection)
   Extended all ~20 PCI revision 2/3 check sites to also accept
   revision 4.  Diagnostic messages updated from "rev3" to "rev3/4".
   Note: this allows detection only -- full LANai XP support is not
   present (see "Supported Hardware" above).


Build Warnings
--------------

You will see MIPSpro warnings about conflicting flags:

  cc WARNING: -64 conflicts with -n32; using latter value (-n32)
  cc WARNING: -O3 conflicts with -O2; using latter value (-O2)
  cc WARNING: -n32 conflicts with -64; using latter value (-64)

These are harmless.  They come from Nekoware pkg-config flags
(-O3 -mips4 -n32) mixing with GM's own flags (-O2 -64).  MIPSpro
resolves conflicts by using the last flag on the command line,
which is always the correct one (-64 for 64-bit builds).

You may also see:

  #error CRC32 is enabled for L7 and up.
  #error Jumbo MTU (9000bytes) is enabled for IP-over-GM

These are intentional compile-time notices from Myricom's code,
not actual errors.  MIPSpro reports them as warnings.


Removing Old GM Installations
------------------------------

If you have an older GM package (e.g., 1.4.1pre10) installed via
the IRIX inst package manager:

     versions myrigm          # check what's installed
     inst
     > remove myrigm
     > go
     > quit

Or manually:

     rm -f /var/sysgen/boot/myrigm.o
     rm -f /var/sysgen/master.d/myrigm
     rm -f /var/sysgen/ioconfig/myrigm
     rm -f /var/sysgen/system/myrigm.sm
     rm -rf /usr/myricom
     rm -f /dev/gm* /dev/gmp*
     autoconfig
     reboot


Troubleshooting
---------------

"config.status: Permission denied" during build
  -> NFS mount issue.  Re-run with: sh supernova-build.sh IP30 nfs

"no rule to make target binary/README"
  -> supernova-build.sh handles this.  If building manually,
     create the file: cp README binary/README

"unresolved symbol gm_sync" when linking tools
  -> The LIBGM and GM_SYNC_LO patches in make-os.in were not
     applied.  Use the patched source from this distribution.

"Could not determine this node ID / mapper not yet run"
  -> Normal.  Run /usr/myricom/sbin/mapper to set node IDs.

Driver loads but gm_board_info shows zeros for EEPROM fields
  -> You have a PCI-X card (M3F-PCIXD-2 or later).  These cards
     are not supported.  Use an M3F-PCI64C or M3F-PCI64D instead.


Contact
-------

This is a community preservation effort for vintage SGI hardware.
There is no official support.  If you are one of the handful of
people on the planet still running Myrinet on IRIX, you probably
already know where to find the others.
