Skip to content
BCM5719 firmware reimplementation
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ape
cmake Clean up compiler paths slightly. May 12, 2019
include Add defines for ape entry in the code directory. May 12, 2019
ipxact Update register generation to use type identifieres for port0 - 3. May 11, 2019
libs Minor cleanup for lib/Network May 12, 2019
simulator Remove additional system includes May 11, 2019
stage1 Remove extra string.h include. May 12, 2019
tests Begin setting up buidl system to build fw, tests, and utils. May 18, 2018
utils Fix printout when unable to opne stage1/ape files. May 12, 2019
.clang-format Do a manual clang-format run Feb 10, 2019
.gitmodules Begin setting up buidl system to build fw, tests, and utils. May 18, 2018
.jenkins.groovy Check in jenkins configuration. Mar 27, 2019
CMakeLists.txt Clean up compiler paths slightly. May 12, 2019
LICENSE Initial commit May 7, 2018
README.md Update llvm steps to also build lld. May 11, 2019

README.md

BCM5719 Firmware Reimplementation

Introduction

This library contains a clean-room reimplementation of the BCM5719 firmware based on the Ortega specification.

The firmware has been tested on the Talos II by Raptor Computer Systems.

Note: This firmware is currently in development. Flashing the firmware to a network card can result in a bricked device when either an external programmer is required, or the external flash must be temporarily disabled during boot-up.

Requirements

This repository depends on a number of external tools

  • Customized LLVM/Clang compiler for MIPS firmware
  • CMake 3.5.1+
  • Linux (utilities)
  • Clang Format (optional)
  • Flexelint/PCLint+ (optional)
  • IPXact generator (optional)

Required Compiler

Due to limitations in the MIPS CPU, this firmware requires a custom compiler to function properly. The custom compuler can be built using the following steps:

git clone https://github.com/meklort/llvm-project.git -b meklort-7.0.1
cd llvm-project
mkdir build
cd build
cmake ../llvm -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/llvm-bcm5719 -DLLVM_ENABLE_PROJECTS="lld;clang"
ninja
ninja install

Status

  • Libraries:
    • MII Library: Done
    • NVRAM Library: Done
  • Stage1/Stage2
    • Implementation: Functional
    • Testing: Minimal, WIP
    • VPD: Started, not functional
    • WOL: Not started
  • APE
    • NCSI Handler: In Progress (functional for TX/RX passthrough)
      • Clear Initial State: Done
      • Select Package: Partial
      • Deselect Package: Partial
      • Enable Channel: Partial
      • Disable Channel: Partial
      • Reset Channel: Partial
      • Enable Channel TX: Partial
      • Disable Channel TX: Partial
      • AEN Enable: Partial
      • Set Link: Partial
      • Get Link Status: Stubbed
      • Set VLAN Filter: Not Implemented
      • Enable VLAN: Not Implemented
      • Disable VLAN: Stubbed
      • Set MAC Address: Initial implementation
      • Enable Broadcast Filter: Stubbed
      • Disable Bradcast Filter: Not Implemented
      • Enable Global Multicast Filtering: Not Implemented
      • Disable Global Multicast Filtering: Not Implemented
      • Set NCSI Flow Control: Not Implemented
      • Get Version ID: Not Implemented
      • Get Capabilities: Not Implemented
      • Get Parameters: Not Implemented
      • Get Controller Packet Stats: Not Implemented
      • Get NCSI Stats: Not Implemented
      • Get NCSI Passthrough Stats: Not Implemented
      • OEM Command: Not Implemented
    • BMC <-> Network Communication: Functional
      • TX Passthrough: Working
      • RX Passthrough: Working
  • Utilities
    • Firmware tool: Functional
    • Register tool: Functional
    • APE Tool: In progress

Compiling

To compile the firmware, the following command sequence can be used:

mkdir build
cd build
cmake .. -G Ninja
cmake --build .

Usage

Before proceeding, the Linux driver must be unloaded. On the Talos II, this can be done as root with the following:

echo 0004:01:00.0 > /sys/bus/pci/devices/0004:01:00.0/driver/unbind
echo 0004:01:00.1 > /sys/bus/pci/devices/0004:01:00.1/driver/unbind

Backup Firmware

Before proceeding, the original firmware should be backed up.

cd build
sudo ./utils/bcmflash/bcmflash -t hardware -b binary

This will result in a firmware image, firmware.fw, bing stored in the current directory.

Stage 1 - MIPS Firmware

After compilation, the MIPS firmware is ready to be uploaded to the NIC.

cd build
sudo ./utils/bcmflash/bcmflash -t hardware -1 stage1/stage1.bin

APE Firmware (BMC/NCSI communication)

The APE firmware can be tested by loading it into ram using the following sequence:

cd build
sudo ./utils/bcmregtool/bcmregtool --apeboot=ape/ape.bin
You can’t perform that action at this time.