Skip to content

[opentitantool] Add FPGA bkdr_loader TAP definition & initial commands#30474

Open
AlexJones0 wants to merge 3 commits into
lowRISC:masterfrom
AlexJones0:bkdr_loader_initial
Open

[opentitantool] Add FPGA bkdr_loader TAP definition & initial commands#30474
AlexJones0 wants to merge 3 commits into
lowRISC:masterfrom
AlexJones0:bkdr_loader_initial

Conversation

@AlexJones0

Copy link
Copy Markdown
Contributor

Add a new opentitantool bkdr command with some initial subcommands:

  • opentitantool bkdr enter - apply the TAP strapping and reset the chip to enter into the bkdr_loader's PRELOAD mode.
  • opentitantool bkdr exit - communicate to the bkdr_loader that we are finished loading memories and so it should enter MISSION mode - i.e. take the system out of reset and forward JTAG to regular downstream JTAG again. This is terminal until the next reset.
  • opentitantool bkdr info - query the bkdr_loader target information registers to determine what target memories are available via the bkdr_loader, and information about these targets.

To use these commands, a definition of the FPGA bkdr_loader TAP is added to opentitanlib. OpenOCD (and any relevant JTAG configuration options) are needed for all operations except entry to communicate with the DMI in the bkdr_loader, and so the JTAG parameters are included on the base bkdr command.

Note: Backdoor::Target returning a BackdoorTarget instead of BackdoorTargetInfo is somewhat redundant at this point, but is kept because it is intended to be used later on as a handle to add read/write commands, which will be added by future PRs.

See the commit messages for more information.

@AlexJones0 AlexJones0 requested a review from a team as a code owner June 19, 2026 12:59
@AlexJones0 AlexJones0 requested review from jwnrt and removed request for a team June 19, 2026 12:59
@AlexJones0 AlexJones0 force-pushed the bkdr_loader_initial branch from 3133a1e to 28acb1a Compare June 19, 2026 13:04
@AlexJones0 AlexJones0 requested review from engdoreis and pamaury June 19, 2026 13:04
@AlexJones0 AlexJones0 force-pushed the bkdr_loader_initial branch 3 times, most recently from 77ffa7a to 54a5a59 Compare June 19, 2026 13:35
Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
When we're doing lots of DMI operations, these become very noisy. They
make much more sense to exist at a "Debug" logging level.

Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
This commit implements the initial logic for integrating the FPGA
backdoor loader into OpenTitanLib & OpenTitanTool. It provides
interfaces for connecting to the bkdr_loader TAP via OpenOCD, entering
the backdoor loader (applying the TAP strapping and resetting), and for
enumerating/discovering the target information from the CSRs.

A new `opentitantool bkdr` command is implemented for using this
functionality, with 3 subcommands - `enter` to enter the backdoor
loader, `exit` to finish using it and take OT out of reset, and `info`
to list info about the available targets (or a specific target). As part
of this, there is some logic for looking up a target by its unique ID.

Note that we return handles for each of the different targets which
simply wrap the `BackdoorTargetInfo` - these will be extended in future
commits to allow operations on the various targets.

Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant