[PATCH] doc: board: ti: j784s4_evm: Automate BAR address lookup for PCIe Boot
Siddharth Vadapalli
s-vadapalli at ti.com
Sun Apr 12 08:46:17 CEST 2026
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.
Signed-off-by: Siddharth Vadapalli <s-vadapalli at ti.com>
---
This patch is based on commit
e2fa3e570f8 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(-)
diff --git a/doc/board/ti/j784s4_evm.rst b/doc/board/ti/j784s4_evm.rst
index fb767bedbf6..f89def076c2 100644
--- a/doc/board/ti/j784s4_evm.rst
+++ b/doc/board/ti/j784s4_evm.rst
@@ -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.
--
2.51.1
More information about the U-Boot
mailing list