doc: board: ti: j784s4_evm: Automate BAR address lookup for PCIe Boot
PATCH 1/1 doc: board: ti: j784s4_evm: Automate BAR address lookup for PCIe Boot
When the J784S4-EVM is configured for PCIe Boot, the Bootloaders are to be written to the address specified by particular BARs. The existing documentation hard-codes the address corresponding to the BAR under the assumption that the Root-Complex transferring the Bootloaders is also a J784S4-EVM. The Root-Complex assigns addresses to the BARs depending on the currently available set of free system addresses. Since the free system addresses vary with the Root-Complex being used, instead of hard-coding the BARs, automate the process of identifying the appropriate BAR in the form of a command to be run by the user on the Root-Complex.
---
This patch is based on commite2fa3e570f8 Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
of the master branch of U-Boot.
Patch has been tested by running the following command to build the documentation:
make htmldocs
followed by verifying that the update is reflected in the generated documentation with proper formatting.
Regards,
Siddharth.
doc/board/ti/j784s4_evm.rst | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
doc/board/ti/j784s4_evm.rst +9 -7
@@ -456,12 +456,12 @@ The following steps describe the process of booting J784S4-EVM over PCIe: 0000:01:00.1 Non-VGA unclassified device: Texas Instruments Device 0100 0000:01:00.2 Non-VGA unclassified device: Texas Instruments Device 0100 -4. Copy ``tiboot3.bin`` to the endpoint. Use ``lspci -vv`` to identify the BAR - address: +4. Copy ``tiboot3.bin`` to BAR1 of Physical Function Zero of the endpoint: .. prompt:: bash - sudo ./pcie_boot_util 0x4007100000 tiboot3.bin + tiboot3_bar_address="0x$(lspci -D -nnvv | awk '/^[0-9a-fA-F]{4}:/ {bdf=$1; ram=($0 ~ /RAM memory/ || $0 ~ /Memory controller/)} ram && /Region [1]+:/ {print bdf, $0}' | cut -d ' ' -f 6)" + sudo ./pcie_boot_util ${tiboot3_bar_address} tiboot3.bin The sample program automatically writes the image start address to ``0x41CF3FE0`` and the magic word ``0xB17CEAD9`` to ``0x41CF3FE4``.
@@ -491,11 +491,12 @@ The following steps describe the process of booting J784S4-EVM over PCIe: (with appropriate DOMAIN:BUS:DEVICE.FUNCTION corresponding to the Endpoint) to enable the BAR. -6. Copy ``tispl.bin`` to the new BAR address (use ``lspci -vv`` to find): +6. Copy ``tispl.bin`` to BAR0 of Physical Function Zero of the endpoint: .. prompt:: bash - sudo ./pcie_boot_util 0x4000400000 tispl.bin + tispl_bar_address="0x$(lspci -D -nnvv | awk '/^[0-9a-fA-F]{4}:/ {bdf=$1; ram=($0 ~ /RAM memory/ || $0 ~ /Memory controller/)} ram && /Region [0]+:/ {print bdf, $0}' | head -n1 | cut -d ' ' -f 6)" + sudo ./pcie_boot_util ${tispl_bar_address} tispl.bin 7. After ``tispl.bin`` is processed, the PCIe link will go down again. Remove and rescan the PCIe device:
@@ -505,11 +506,12 @@ The following steps describe the process of booting J784S4-EVM over PCIe: echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/remove echo 1 > /sys/bus/pci/devices/0000\:00\:00.0/rescan -8. Copy ``u-boot.img``: +8. Copy ``u-boot.img`` to BAR0 of Physical Function Zero of the endpoint: .. prompt:: bash - sudo ./pcie_boot_util 0x4000400000 u-boot.img + uboot_bar_address="0x$(lspci -D -nnvv | awk '/^[0-9a-fA-F]{4}:/ {bdf=$1; ram=($0 ~ /RAM memory/ || $0 ~ /Memory controller/)} ram && /Region [0]+:/ {print bdf, $0}' | head -n1 | cut -d ' ' -f 6)" + sudo ./pcie_boot_util ${uboot_bar_address} u-boot.img 9. After ``u-boot.img`` is successfully loaded, the boot process is complete and endpoint should boot till U-Boot prompt.
Signature · 1 line
2.51.1