riscv-openocd/tcl
Sean Anderson a84d1b5f5e tcl/target: Add helpers for booting Xilinx ZynqMP from JTAG
Add some helpers for booting ZynqMPs over JTAG. Normally, the CSU ROM
will load boot.bin from the boot medium. However, when booting from JTAG
we have to do this ourselves. There are generally two parts to this.
First, we need to load the PMU firmware. Xilinx's tools do this by
attaching to the PMU (a Microblaze CPU) over JTAG. However, the TAP is
undocumented and we don't have any microblaze support in-tree. So
instead we do it the same way FSBL does it:

- We ask the PMU to halt
- We load the firmware into the PMU RAM
- We ask the PMU to resume

The second thing we need to do is start one of the APU cores. When an
APU is released from reset, it starts executing at the value of its
RVBARADDR. While we could load the APU firmware over the AXI target,
it is faster to load it over the APU target. To do this, we put the APU
into an infinite loop before halting it. As an aside, I chose to use the
"APU" terminology as opposed to "core" to make it clear that these
commands operate on the A53 cores and not the R5F cores.

Typical usage of these commands could look something like

	targets uscale.axi
	boot_pmu /path/to/pmu-firmware.bin
	boot_apu /path/to/u-boot-spl.bin

But of course there is always the option to call lower-level commands
individually if your boot process is more unusual.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Change-Id: I816940c2022ccca0fabb489aa75d682edd0f6138
Reviewed-on: https://review.openocd.org/c/openocd/+/8133
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2024-05-04 08:36:23 +00:00
..
board ipdbg: split ipdbg command into multiple commands 2024-03-16 14:43:33 +00:00
chip tcl: add SPDX tag 2022-06-24 21:54:12 +00:00
cpld jtagspi/pld: add interface to get support from pld drivers 2023-09-23 14:33:37 +00:00
cpu tcl/arc: Fix ARC v2 registers r22/r23 2023-09-02 10:40:34 +00:00
fpga ipdbg/pld: ipdbg can get tap and hub/ir from pld driver. 2023-07-08 18:04:24 +00:00
interface tcl/interface/ftdi: Add documentation for HS2 2023-09-17 12:06:44 +00:00
target tcl/target: Add helpers for booting Xilinx ZynqMP from JTAG 2024-05-04 08:36:23 +00:00
test tcl: add SPDX tag 2022-06-24 21:54:12 +00:00
tools tcl/tools/test_cpu_speed: Fix register name 2023-03-18 21:59:47 +00:00
bitsbytes.tcl tcl: add SPDX tag 2022-06-24 21:54:12 +00:00
mem_helper.tcl tcl: add SPDX tag 2022-06-24 21:54:12 +00:00
memory.tcl tcl: add SPDX tag 2022-06-24 21:54:12 +00:00
mmr_helpers.tcl tcl: add SPDX tag 2022-06-24 21:54:12 +00:00