debug: Remove global variable rmDebugPrefix.

This global variable seemed to act like an escape hatch overriding the
flag passed to the debug function. As someone coming along and trying to
pick up this code I found it confusing when debug function refused to
print a prefix even though I had asked it to. Not hard to figure out but
global flags like this have the potential to cause unexpected behavior.
IMHO it's better to simplify the code and remove this.

To compensate for the loss of the rmDebugPrefix flag in the
DebugPrintBuffer function I've added another parameter for callers to pass
a printf_type flag to obtain the same behavior as when the rmDebugPrefix
flag was set.

Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
9 files changed
tree: 9f72387d3599c00c865a6718fb39e9bbf29b3745
  1. common/
  2. include/
  3. resourcemgr/
  4. sysapi/
  5. tcti/
  6. test/
  7. .gitattributes
  8. .gitignore
  9. arch.md
  10. archandlayout.md
  11. bootstrap
  12. buildwindows.md
  13. ChangeLog
  14. configure.ac
  15. INSTALL
  16. layout.md
  17. LICENSE
  18. Makefile.am
  19. README.md
  20. run.md
  21. simulator.md
  22. TSS block diagram.png
  23. TSS layout.png
  24. tss.sln
  25. 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.