====== Replacing the bnx2 driver ====== The bnx2 driver is for Broadcom's NetXtreme II (1G, not 10G) series of NICs. ==== Information Sources ==== * Datasheet (([[http://www.broadcom.com/collateral/pg/NetXtremeII-PG203-R.pdf|NetXtreme II Programmer's Reference Guide]])) * Linux bnx2 driver (([[http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=tree;f=drivers/net/ethernet/broadcom;h=0e31af86c465969c8ebd3b631dfaa51c14c1370c;hb=HEAD|Linux bnx2 git repository]])) ==== Status ==== I have confirmed the following cards are working: * IBM 39Y6070 (BCM5708) * IBM 42C1782 (BCM5709) ((Only one of the physical ports can be used)) ((There is a warning about MII reset failing)) The git repository is at: https://git.ipxe.org/people/dewyatt/ipxe.git (([[https://git.ipxe.org/people/dewyatt/ipxe.git/shortlog/refs/heads/bnx2|iPXE bnx2 git repository webview]])) == Current goals == * Some kind of firmware-less solution == Completed == * 08/02/2012 5706 support, maybe * 08/01/2012 5709 support * 07/31/2012 Link-up at 10/100/1000 * 07/22/2012 Receive * 07/13/2012 Transmit & transmit completion * 06/08/2012 Link-up/link status * 06/01/2012 Load MIPS firmware * 05/22/2012 Load RV2P firmware, dump NVRAM * 05/16/2012 Perform a successful reset, MII read/write * 05/08/2012 Skeleton in place, able to read register from the card ==== Test Setup ==== My current test NIC is an [[gsoc/bnx2/39y6070|39y6070]]. My development machine is running Ubuntu and is connected to my test machine via a null modem cable. I use GtkTerm as a serial terminal. I found it very helpful to wire the power button of my test machine up to the top of my desk. I used some spare wire, a couple female jumper wires (connected to the header on the motherboard), and a pushbutton I desoldered from an old cell phone. This way, I can power cycle the test machine by pushing a button a couple inches from my mouse. ==== Firmware ==== The NetXtreme II series of cards require driver-loaded proprietary firmware to function. The current Linux bnx2 driver uses two separate firmware files (([[http://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git;a=tree;f=bnx2;h=78c16645553a90b365391312546ca4e256f271fb;hb=HEAD|bnx2 firmware git repository]])), one for the RV2P firmware and one for the MIPS firmware. The MIPS firmware file contains 5 different firmwares, each for a different CPU (there are 6 total 32-bit MIPS CPUs in a bnx2 NIC). You can use the [[gsoc/bnx2/fw_info]] tool to print information about the firmware files. Here's an example: [daniel@daniel-pc gsoc]$ ./fw_info bnx2_bnx2-mips-06-6.2.3.fw MIPS firmware COM (Completion Processor): start addr: 0x08000118 .text: addr : 0x08000000 len : 0x00004A68 offset: 0x000000C8 .data: addr : 0x00000000 len : 0x00000000 offset: 0x00000000 .rodata: addr : 0x08004A68 len : 0x00000014 offset: 0x00004B30 ... You can use the [[gsoc/bnx2/fw_elf]] tool to extract MIPS firmware into a standard ELF to ease disassembly.