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] Advanced TPM primitives in transport #25259

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Nov 19, 2024

  1. [opentitantool] Enhance SPI and I2C traits

    Add a `set_pins()` method to the I2C trait.  This allows instructing the
    debugger to set up its pinmux, if it has such support, in the same way
    as the existing method on the SPI trait.
    
    Also, add a new pin to both SPI and I2C called `gsc_ready`.  This one
    will not be used by normal I2C or SPI communication, but the debugger
    can be instructed to wait for a falling edge on that pin, before
    continuing the transaction, typically the sequence given to
    `run_transcation()` would look somewhat like `[Write(...), GscReady,
    Read(...)]` which would have the effect that the debugger would send a
    number of bytes, and then wait for falling edge before resuming clocking
    to retrieve the response.  This is useful when communicating with Google
    Security Chips.
    
    Finally, the SPI trait is enhanced with a `TpmPoll` instruction, which
    is to be used like `[Write(...), TpmPoll, Read/Write(...)]` when
    communicating with standards-compliant TPM devices.  It has the effect
    that the debugger will first send the request (must be 4 bytes), then it
    will repeatedly poll by reading a single byte at a time, until the
    device responds with 0x01, before the debugger reads or writes the main
    data part.
    
    Signed-off-by: Jes B. Klinke <[email protected]>
    
    Change-Id: Ied56bac014a6d5bfe501a6bd3f34c7b21b69265d
    jesultra committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    f65590c View commit details
    Browse the repository at this point in the history
  2. [opentitantool] HyperDebug support for advanced TPM primitives

    Add support in the HyperDebug transport driver for `TpmPoll` and
    `GscReady`.
    
    Signed-off-by: Jes B. Klinke <[email protected]>
    
    Change-Id: I154229794bcb88cc7845329c03621eec5c4da4a5
    jesultra committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    9fcfe3e View commit details
    Browse the repository at this point in the history
  3. [opentitantool] Make TPM driver take advantage of new primitives

    Adapt TPM driver layer to use advanced transport features, if available.
    
    This change speeds up TPM communication between 2x and 4x when
    HyperDebug is used to communicate with GSC chips.
    
    (This CL also removes unused code which tried to deal with SPI TPM
    transactions on debuggers which do not support bidirectional SPI
    transfers.)
    
    Signed-off-by: Jes B. Klinke <[email protected]>
    
    Change-Id: I16c56d367478c1394825b1be56a3622452af207a
    jesultra committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    2d71bed View commit details
    Browse the repository at this point in the history