Cavium CN81xx documentation¶
The Cavium reference code is called BDK (board development kit) and is part of the Octeon-TX-SDK. Parts of the BDK have been integrated into coreoboot.
The SOC folder contains functions for:
- Secondary CPUs
All other hardware is initialized by the BDK code, which is invoked from ramstage.
Notes about the hardware¶
Cavium SoC do not have embedded SRAM. The BOOTROM setups the L2 cache and loads 192KiB of firmware starting from 0x20000 to a fixed location. It then jumps to the firmware.
For more details have a look at Cavium CN8XXX Bootflow.
For Cache-as-RAM we only need to lock the cachelines which are used by bootblock or romstage until DRAM has been set up. At the end of romstage the cachelines are unlocked and the contents are flushed to DRAM. Locked cachelines are never evicted.
The CAR setup is done in
bootblock_custom.S and thus doesn’t use the common
The PCI setup is done using the MMCONF mechanism. Besides configuring device visibility (secure/unsecure) the MSI-X interrupts needs to be configured.
The Linux devicetree needs to be patched, depending on the available hardware and their configuration. Some values depends on fuses, some on user selectable configuration.
The following SoC specific fixes are made:
- Fix SCLK
- Fix UUA refclock
- Remove unused PEM entries
- Remove unused QLM entries
- Set local MAC address
The CN81xx needs some quirks that are not documented or hidden in the code.
Violation of PCI spec¶
- The PCI device 01:01.0 is disabled, but a multifunction device.
- The PCI device 01:01.2 - 00:01.7 is enabled and can’t be found by the coreboot PCI allocator.
The PCI Bus 0 and 1 are scanned manually in SOC’s PCI code.
Crash accessing SLI memory¶
The SLI memory region decodes to attached PCIe devices. Accessing the memory region results in ‘Data Abort Exception’ if the link of the PCIe device never had been enabled.
Enable the PCIe link at least once. (You can disabling the link and the SLI memory reads as 0xffffffff.)
RNG Data Abort Exception¶
‘Data Abort Exception’ on accessing the enabled RNG.
Read the BDK_RNM_CTL_STATUS register at least once after writing it.