Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick to earlgrey_es_sival: [opentitantool] Introduce binary protocol for HyperDebug gpio monitoring #21251

Merged

Conversation

github-actions[bot]
Copy link

@github-actions github-actions bot commented Feb 7, 2024

This is an automatic cherry-pick of #20672 to branch earlgrey_es_sival.

The Ti50 team occasionally sees "communication error" from
opentitansession, most often during `transport init`, but that could be
just because there are dozens of GPIOs being manipulated in a short
time.

This PR aims to help a litle bit in diagnosing, by making each error
message unique.

Change-Id: I28e804429d153c1cd527ea467729364bc7c1ec15
Signed-off-by: Jes B. Klinke <[email protected]>
(cherry picked from commit d5413c8)
Current code assumes that any flavor of a HyperDebug debugger which
implements the CMSIS-DAP protocol, will also implement the Google
extensions for I2C host and device control.  Allthough this is the case
now, this CL introduces code to properly query for Google extensions.

Change-Id: I48a88d6917935d45d716fff6c743f9b2f0a52202
Signed-off-by: Jes B. Klinke <[email protected]>
(cherry picked from commit b4b96fb)
HyperDebug supports logic analyzer functionality, in which it will
record events on a given set of gpio pins, and `opentitantool` can later
be used to retrieve a transcript of every level change with microsecond
timestamp.

This has been used by the GSC team to verify the reaction time of
firmware under test.  Such testing involve typically a few handfuls of
events, which can easily be transmitted via the textual protocol.
However, We now plan on using the functionality for cases with 30000
events to be retrieved, which would take many tens of seconds to
inefficently transmit via the console (which runs slow enough that the
physical UART can keep up).

To improve performance, this CL introduces another Google-specific
extension to the binary CMSIS-DAP protocol, for GPIO operations, and
adds code to repliate the `gpio monitoring read`
functionality.  (Starting and stopping the monitoring can still only be
done through the textual protocol, those do not carry a large amount of
data.  Though there may be a 80-character limit on a single command,
which could impact the ability to monitor 5 or more signals at once, so
in the future we may want to allow starting monitoring also through the
binary protocol.)

Change-Id: I3c075f2960b4d4a38bff8cd7d8e270a3a1211a9b
Signed-off-by: Jes B. Klinke <[email protected]>
(cherry picked from commit 9bdc841)
Updated to new HyperDebug firmware with support for binary GPIO
monitoring protocol through "vendor extension" to CMSIS-DAP.

Change-Id: I29fb35c39e835e59763e0d0a935b087dd14ba2ae
Signed-off-by: Jes B. Klinke <[email protected]>
(cherry picked from commit 04ef809)
@timothytrippel timothytrippel merged commit 75eaf40 into earlgrey_es_sival Feb 8, 2024
28 checks passed
@timothytrippel timothytrippel deleted the backport-20672-to-earlgrey_es_sival branch February 8, 2024 06:45
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.

2 participants