Tss2_Sys_Initialize: Factor the initialization of data buffer pointers into a separate function (InitSysContextPtrs).

These pointers are only initialized once so it made a certain amount of
sense to just do this in the main context initialization function. But
when we start integrating unit tests for the marshalling functions it's
nice to have a function to call that short cuts all of the consistency
checks in Tss2_Sys_Initialize. With this simple function we can
initialize all of the pointers to the data regions where data is
marshalled and then just call the relevant marshalling functions without
having to do a pile of setup.

Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
3 files changed
tree: dc92e5d962d2ef2060cc590640d3f43b17aae4ef
  1. common/
  2. doc/
  3. include/
  4. lib/
  5. resourcemgr/
  6. sysapi/
  7. tcti/
  8. test/
  9. .gitattributes
  10. .gitignore
  11. bootstrap
  12. ChangeLog
  13. configure.ac
  14. INSTALL
  15. LICENSE
  16. Makefile.am
  17. README.md
  18. tss.sln
  19. tss.vcxproj
README.md

TPM (Trusted Platform Module) 2.0 Software Stack (TSS):

This stack consists of the following layers from top to bottom:

  • Feature API (FAPI), see specification 0.12, (published but still in progress and unimplemented)
  • Enhanced System API (ESAPI), (specification in progress and unimplemented)
  • System API (SAPI), see 1.0 specification, (public, 0.97 implementation complete). This layer implements the system layer API level of the TSS 2.0 specification. These functions can be used to access all TPM 2.0 functions as described in Part 3 of the TPM 2.0 specification. The usefulness of this code extends to all users of the TPM, even those not planning to use the upper layers of the TSS.
  • TPM Command Transmission Interface (TCTI), used by SAPI to communicate with next lower layer (either the TAB/RM or TPM 2.0 device driver), see SAPI specification
  • Trusted Access Broker/Resource Manager (TAB/RM), see 0.91 specification, (public, implementation complete). This layer sits between the system API library code and the TPM. It is a daemon that handles all multi-process coordination and manages the TPM's internal resources transparently to applications.

Since the FAPI and ESAPI haven't been implemented yet, this repository only contains the SAPI and layers below it, plus a test application for exercising the SAPI.

The test application, tpmclient, tests many of the commands against the TPM 2.0 simulator. The tpmclient application can be altered and used as a sandbox to test and develop any TPM 2.0 command sequences, and provides an excellent development and learning vehicle.

Build and Installation Instructions:

Run Instructions

Architecture/Block Diagram

Code Layout

Resources

TPM 2.0 specifications can be found at Trusted Computing Group.