PCI card firmware

From MCEWiki

UBC-produced firmware for the ARC-64 PCI card. MAS provides a linux kernel driver for this firmware.

Download

These S-record files should work with any reasonable EEPROM programmer:

The full source code is available in these archives (it will not compile unless you get the correct assembler and stuff):

The subversion tree can be obtained like this (you may not have access to this repository; contact UBC);

git clone https://github.com/multi-channel-electronics/arc_pci.git

It is laid out roughly as follows:

/trunk       main line of development
/releases    tagged versions of code 
/tools       debugging tools
/clash       stuff for making CLAS work with wine and linux
/docs        useful (though maybe not to you) notes

Firmware version notes

U0107 (recommended)

  • This firmware can operate in either of two modes:
    • U0106 compatibility mode: the firmware will work with classic MAS driver, just like U0106 (plus some bugfixes).
    • New Master-only mode: when activated, uses new set of protocols for communication with the MAS driver. These have proven to be much more stable on some systems. Also, bigphysarea is no longer needed.
  • Downloads:
  • Some additional notes specific to U0107: U0107 Series Firmware

U0106 (2011-11-21): Old stable version

  • Not recommended for new projects
  • Backward compatible with U0104 and U0105.
  • Fixes bug introduced in U0105 that prevented handling of some PCI bus errors.
  • Introduction of command to update PCI burst size.
  • Bugs:
    • Versions U0104-6 all suffer from the following issues:
      • Host interrupts use bit-test instructions, which are not interrupt safe; consequence is a race condition that can upset ongoing tasks such as FO downloads and PCI bursts. Patch for this issue, applicable to firmware versions U0104-6:
      • Multiple simultaneous PCI bus errors are not handled properly, leading to stale bits in the error register. This is an unlikely error vector, but should be fixed.

U0105 (2009-06-08)

  • Backward compatible with U0104.
  • Support for MCE STOP commands and commands-on-the-fly.
  • Accelerated MCE command code (along with Quiet-RP this increases commanding rate to ~6 kHz).
  • Quiet-RP simplifies the protocol for MCE reply handling.
  • Low-level improvements:
    • CON is done as PCI burst
    • Fibre-optic FIFO is emptied with timed read instead of polling.
    • Hand-shaking for interrupts instead of host command to clear INTA and HC3.
    • Non-interrupt context code disables interrupts when performing PCI transactions.
    • Host vector interrupts are otherwise enabled, so PC doesn't have to force with HNMI bit.
  • Bugs and fixes:

U0104: First version with non-realtime linux support

  • Implements quiet transfer mode! Remains backwards compatible with A1.4.
  • Fixes the 64k boundary crossing issue
  • Moves parameters that enter via interrupt out of registers and into variables
  • Version reporting tag-along to RDM command (sending 'VER' to RDM's vector address returns the code version).
  • Maximum burst length is reduced to 64 bytes, and is configurable.
  • Reset (RST) clears the fibre fifo
  • Bugs:

U0103: Oldest UBC release

  • Minor modifications of SCUBA2's A1.4 firmware, to improve PCI stability.
  • Not compatible with non-realtime systems.

Programming the ARC64 Flash memory

To program or upgrade the PCI card's firmware, it is necessary to remove the flash memory chip from the card and program it using a standard EEPROM programmer.

  1. Obviously you should turn off your computer and stuff first.
  2. The chip is a large DIP located at U5 on the PCI board. To remove the chip you may use one of the following (in increasing order of risk, and decreasing order of barbarism):
    1. telekinesis
    2. a chip removal tool
    3. needle-nose pliers
    4. a screw-driver
    5. thumb and finger
    6. fingers only
  3. The chip is a standard 256 Kbit electrically erasable Flash ROM. If you can't find the particular part in your EEPROM programmer software, try using one of these compatible parts:
    1. Fujitsu MBM28C256
    2. CSI (Catalyst) CAT28C256 L
    3. Anything else that has 28C256 in its name as long as it is a 28-pin DIP package and you are using the right socket for your programmer.
  4. Some programmers won't recognize this chip as erasable. You can just try programming the chip with the new firmware, or pseudo-erasing it first using a "scrubber" file (available for U0106 in the links above).
  5. The firmware we provide is compiled into a [ http://en.wikipedia.org/wiki/SREC_%28file_format%29 Motorola S-record format ] hex file. This is a standard format that your programmer software should be able to cope with.
  6. When placing the chip back in the board, the notch on the chip should be at the same end as the notch on the socket.

Other information