Modifying generic Broadcom NICS to work on Alpha VMS
G.Rawolle, VSM Software Services, 15-Apr-2011

Overview
--------

Genuine HP single port DEGXA and dual port DEGX2 gigabit ethernet cards are expensive. 
A number of people have discovered that many generic Broadcom cards will work on True64 
and VMS alpha machines providing some identifiers are modified. They will not work 
without identify changes. This document shows how to do this.

Broadcom cards that may be suitable are the HP NC7771 and NC7782, and other Broadcom 
based Dell, IBM and Acer cards.
This kit is only concerned with modifying Broadcom 5703 based single port cards to 
a DEGXA and Broadcom 5704 based dual port cards to a DEGX2.

You will need a PC with a spare PCI slot and either a cdrom or floppy disk drive to 
perform this process.

WARNING: Although many people have successfully used this process, there are no 
guarantees given that it will work for you.

Getting kits and creating CDROM
-------------------------------

If you don't already have it, fetch and unpack the zip kit available at:
http://www.vsm.com.au/ftp/b57vms.zip

The zip file contains all the necessary files as well as a BOOT.ISO cdrom image, a 
BOOT.IMG floppy disk image, and a BOOT.EXE self extracting floppy image. The floppy 
image due to size constraints doesn't include the Broadcom pdf documentation.

The Broadcom engineering diagnostics tool (b57diag.exe) and user configuration 
tool (b57udiag.exe) will not run correctly under windows (or even a Windows DOS 
command shell). They must be run from a DOS environment without emm386.sys. To that 
end I have created bootable DOS based cdrom and floppy images. 

Create either a cdrom or floppy disk using your favourite software. On Windows I use 
WinImage for IMG floppy images and Nero for ISO cdrom images, but there is plenty of 
other software out there including the free cdrom burning windows software ImgBurn. 
On windows the BOOT.EXE file can simply be run to extract and write a bootable floppy disk.

Booting
-------

Install the Broadcom NIC into a PCI slot in an Intel/AMD PC. 
64 bit PCI-X cards will still work in a 32 bit PCI slot. 
If you are booting from a CDROM you will need a FAT16/32 formatted USB memory stick, 
floppy disk, or hard drive if you wish to be able to save system information and 
existing firmware. 
Boot the PC from the CDROM or floppy disk. You may need to modify the booting order 
of the PC via its BIOS.
After booting you will be presented with a DOS prompt.

Identify card
-------------

You obviously can't change a single port card into a dual port card, and there are 
different identifiers and firmware for each.
Broadcom 5703 based cards should use degxa.ssi for id changes and degxa235.bin 
for firmware. 
Broadcom 5704 based dual port cards should use degx2.ssi for id changes and 
degx2327.bin for firmware.

To identify and show information about each Broadcom card:
	b57diag -dids

The report for an IBM NetXtreme dual port (31P6409) card gave the following:

C Brd:Rv    Bus   PCI Spd Base Irq EEP     MAC          Fmw     Configuration
- ------- ------- --- --- ---- -- ---- ------------ ----------- --------------
0 5704PA3 02:01:0  32  33 FF9D 11 128k 0010180F7DA2 5704-v3.19  auto  
1 5704SA3 02:01:1  32  33 FF9F 11 128k 0010180F7DA3 5704-v3.19  auto  

C Brd:Rv  VID  DID  SVID SDID      MAC         Fmw     PXE PXESpd WOL ASF  MBA
- ------- ---- ---- ---- ---- ------------ ----------- --- ------ --- --- -----
0 5704PA3 14e4 1648 14e4 1648 0010180F7DA2 5704-v3.19  yes auto   yes no  pxe
1 5704SA3 14e4 1648 14e4 1648 0010180F7DA3 5704-v3.19  no  n/a    no  no  none

C Brd:Rv  VID  DID  SVID SDID  MBA  PXE PXESpd PXE VERSION BOND REV
- ------- ---- ---- ---- ---- ----- --- ------ ----------- --------
0 5704PA3 14e4 1648 14e4 1648 none  no  n/a    6.1.2       A3 / A3
1 5704SA3 14e4 1648 14e4 1648 none  no  n/a    6.1.2       A3 / A3

Change IDs
----------

To just change the subvendor and subdevice ids, leaving the existing 
firmware intact do the following.

To re-identify a generic 5704 card as a DEGX2	
        b57diag -c 0 -mfct degx2.ssi

To re-identify a generic 5703 card as a DEGXA	
        b57diag -c 0 -mfct degxa.ssi
If successful, the message "Completed!" should be displayed, and a 
"b57diag -dids" command should show the changed SVID and SDID.

Changing WOL and PXE boot
-------------------------

To save the configuration information to a file (either on a floppy on a USB memory 
card) the drive letter will vary - could be B: C: or some other letter:
	B57diag -l c:\config1.txt -dids

To turn off WOL (Wake on LAN) - note that we are now using the User Config tool 
b57udiag not b57diag:
	B57udiag -w 0

To turn off MBA and PXE:
	B57udiag -mba 0
Run b57diag -dids again to check that WOL, PXE and MBA are now "no".

Firmware Update
---------------

If the firmware version is fairly old it is probably worth updating the 
main boot code firmware on the card.
It is a very good idea to save the existing firmware to a file so that you can, 
if needed, revert the card to its original state.
To do this you need to run b57diag in engineering mode - this brings up 
a "0:>" prompt. Note that the drive letter could be different (it may not be C:\)
B57diag -b57eng
0:> sedump -f c:\fw8k.bin -l=8192
0:> sedump -f c:\fw128k.bin -l=131072
0:> quit
The first command creates a 8K file and saves it to the root of C: drive. 
It contains the cards main code. The 2nd command dumps the whole 128K of the 
EEPROM to a file. This will also contain PXE code etc.

To upgrade the main bootcode firmware for a 5703 based single port card:
	B57udiag -sil -firm degxa235.bin

To upgrade the main bootcode firmware for a 5704 based dual port card:
	B57udiag -sil -firm degx2327.bin

Run b57diag -dids again to check firmware is now version 2.35 or 3.27b and 
that the subdevice and subvendor IDs are correct.

If you wish you can save the new config info to another file for reference:
	B57diag -l c:\config2.txt -dids

Background
----------

The two images in the RefImages directory were what were used to create a 
number of the files used above.
The following outlines how these files were created.

I have used a binary/hex editor to edit the 7782327b.bin file changing the 
bytes starting at 0xA4 to the new subdevice and subvendor by replacing 
bytes 00 D0 0E 11 with 00 C9 0E 11 and saved the file as degx2327.bin.
Similarly for the 7771v235.bin file I have changed the bytes starting at 0xA4 
by replacing bytes 00 CA 0E 11 with 60 1B 0E 11 and saved the file as degxa235.bin. 

When changing the PCI Subsystem IDs on a Broadcom 5703/5704 (or similar) card, 
the new ID values are specified in a file with this format, where
"xxxx" and "yyyy" are hexadecimal values:
SUBSYSTEM_VENDOR_ID = xxxx
SUBSYSTEM_DEVICE_ID = yyyy

   For a DEGXA-TB:
      SUBSYSTEM_VENDOR_ID = 0E11
      SUBSYSTEM_DEVICE_ID = 601B

   For Compaq/HP NC7771:
      SUBSYSTEM_VENDOR_ID = 0E11
      SUBSYSTEM_DEVICE_ID = 00CA
   
   For a DEGX2:
      SUBSYSTEM_VENDOR_ID = 0E11
      SUBSYSTEM_DEVICE_ID = 00C9

   For Compaq/HP NC7782:
      SUBSYSTEM_VENDOR_ID = 0E11
      SUBSYSTEM_DEVICE_ID = 601B

   For IBM NetXtreme 31P6409:
      SUBSYSTEM_VENDOR_ID = 14E4
      SUBSYSTEM_DEVICE_ID = 1648

References
----------

http://www.tmk.com/blog/?p=6
http://moon.hanya-n.org/comp/alpha/hct/GbE.html
http://compgroups.net/comp.os.vms/Non-DEGXA-Broadcom-gigabit-Ethernet-cards-v-Tru64-and-VMS

