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

[opentitantool] Several small fixes #26181

Merged
merged 3 commits into from
Feb 16, 2025
Merged

Conversation

jesultra
Copy link
Contributor

  • Removed leftover debug logging from opentitanlib/src/app/i2c.rs .
  • Reordered the proprietary GscReady for I2C transactions, to more accurately reflect what HyperDebug does.
  • Increased maximum TPM FIFO transfer burst size from 32 to 64 bytes.
  • Fixed bitbang pauses to allow 1% tolerance either way.

HyperDebug firmware has special code to pause during SPI or I2C TPM
transactions, waiting for a pulse on a Google-specific "ready" signal.

This change modifies the way the arguments must be passed to
`spi.run_transaction()` to invoke that feature, such that they more
closely match the sequence of events: Write, TpmPoll, Read, GscReady.

Change-Id: Ia38e142c97f311c27367c916cbcda51af45ad500
Signed-off-by: Jes B. Klinke <[email protected]>
Change-Id: I7a304af363e05083a78213c1697e3eded4aa665f
Signed-off-by: Jes B. Klinke <[email protected]>
If doing bitbanging and specifying a pause between segments of the
waveform, the delay may not be an exact multiple of the base bitbanging
sample frequency, as in this example:
```
opentitantool gpio bitbang --clock 115200Hz -s "0100001001 1ms 0100001001" CN9_6
```

The code was intended to round off to a whole number of samples, as long
as the actual time is within 1% of what was requested (115 sample times
in the case above).  However the original code had a bug meaning that it
would accept only 99%-100% of the requested period, rather than 99%-101%.

Change-Id: I79fd67926fedd7fb6dbae27d6314a28bc0b7f2e1
Signed-off-by: Jes B. Klinke <[email protected]>
@jesultra jesultra marked this pull request as ready for review February 14, 2025 18:41
@jesultra jesultra requested a review from a team as a code owner February 14, 2025 18:41
@jesultra jesultra merged commit b1906d4 into lowRISC:master Feb 16, 2025
42 checks passed
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