[opentitantool] Add FPGA bkdr_loader TAP definition & initial commands#30474
Open
AlexJones0 wants to merge 3 commits into
Open
[opentitantool] Add FPGA bkdr_loader TAP definition & initial commands#30474AlexJones0 wants to merge 3 commits into
AlexJones0 wants to merge 3 commits into
Conversation
3133a1e to
28acb1a
Compare
77ffa7a to
54a5a59
Compare
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>
54a5a59 to
beff27d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a new
opentitantool bkdrcommand with some initial subcommands:opentitantool bkdr enter- apply the TAP strapping and reset the chip to enter into the bkdr_loader'sPRELOADmode.opentitantool bkdr exit- communicate to the bkdr_loader that we are finished loading memories and so it should enterMISSIONmode - 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
bkdrcommand.Note:
Backdoor::Targetreturning aBackdoorTargetinstead ofBackdoorTargetInfois 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.