tpm2_startup.1 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. .\" Automatically generated by Pandoc 1.19.2.4
  2. .\"
  3. .TH "tpm2_startup" "1" "" "tpm2\-tools" "General Commands Manual"
  4. .hy
  5. .SH NAME
  6. .PP
  7. \f[B]tpm2_startup\f[](1) \- Send a startup command to the TPM.
  8. .SH SYNOPSIS
  9. .PP
  10. \f[B]tpm2_startup\f[] [\f[I]OPTIONS\f[]]
  11. .SH DESCRIPTION
  12. .PP
  13. \f[B]tpm2_startup\f[](1) \- Send a \f[B]TPM2_Startup\f[] command with
  14. either \f[B]TPM_SU_CLEAR\f[] or \f[B]TPM_SU_STATE\f[].
  15. .SH OPTIONS
  16. .IP \[bu] 2
  17. \f[B]\-c\f[], \f[B]\-\-clear\f[]:
  18. .RS 2
  19. .PP
  20. Startup type sent will be \f[B]TPM_SU_CLEAR\f[] instead of
  21. \f[B]TPM2_SU_STATE\f[].
  22. .RE
  23. .SS References
  24. .SH COMMON OPTIONS
  25. .PP
  26. This collection of options are common to many programs and provide
  27. information that many users may expect.
  28. .IP \[bu] 2
  29. \f[B]\-h\f[], \f[B]\-\-help=[man|no\-man]\f[]: Display the tools
  30. manpage.
  31. By default, it attempts to invoke the manpager for the tool, however, on
  32. failure will output a short tool summary.
  33. This is the same behavior if the "man" option argument is specified,
  34. however if explicit "man" is requested, the tool will provide errors
  35. from man on stderr.
  36. If the "no\-man" option if specified, or the manpager fails, the short
  37. options will be output to stdout.
  38. .RS 2
  39. .PP
  40. To successfully use the manpages feature requires the manpages to be
  41. installed or on \f[I]MANPATH\f[], See man(1) for more details.
  42. .RE
  43. .IP \[bu] 2
  44. \f[B]\-v\f[], \f[B]\-\-version\f[]: Display version information for this
  45. tool, supported tctis and exit.
  46. .IP \[bu] 2
  47. \f[B]\-V\f[], \f[B]\-\-verbose\f[]: Increase the information that the
  48. tool prints to the console during its execution.
  49. When using this option the file and line number are printed.
  50. .IP \[bu] 2
  51. \f[B]\-Q\f[], \f[B]\-\-quiet\f[]: Silence normal tool output to stdout.
  52. .IP \[bu] 2
  53. \f[B]\-Z\f[], \f[B]\-\-enable\-errata\f[]: Enable the application of
  54. errata fixups.
  55. Useful if an errata fixup needs to be applied to commands sent to the
  56. TPM.
  57. Defining the environment TPM2TOOLS_ENABLE_ERRATA is equivalent.
  58. information many users may expect.
  59. .SH TCTI Configuration
  60. .PP
  61. The TCTI or "Transmission Interface" is the communication mechanism with
  62. the TPM.
  63. TCTIs can be changed for communication with TPMs across different
  64. mediums.
  65. .PP
  66. To control the TCTI, the tools respect:
  67. .IP "1." 3
  68. The command line option \f[B]\-T\f[] or \f[B]\-\-tcti\f[]
  69. .IP "2." 3
  70. The environment variable: \f[I]TPM2TOOLS_TCTI\f[].
  71. .PP
  72. \f[B]Note:\f[] The command line option always overrides the environment
  73. variable.
  74. .PP
  75. The current known TCTIs are:
  76. .IP \[bu] 2
  77. tabrmd \- The resource manager, called
  78. tabrmd (https://github.com/tpm2-software/tpm2-abrmd).
  79. Note that tabrmd and abrmd as a tcti name are synonymous.
  80. .IP \[bu] 2
  81. mssim \- Typically used for communicating to the TPM software simulator.
  82. .IP \[bu] 2
  83. device \- Used when talking directly to a TPM device file.
  84. .IP \[bu] 2
  85. none \- Do not initalize a connection with the TPM.
  86. Some tools allow for off\-tpm options and thus support not using a TCTI.
  87. Tools that do not support it will error when attempted to be used
  88. without a TCTI connection.
  89. Does not support \f[I]ANY\f[] options and \f[I]MUST BE\f[] presented as
  90. the exact text of "none".
  91. .PP
  92. The arguments to either the command line option or the environment
  93. variable are in the form:
  94. .PP
  95. \f[C]<tcti\-name>:<tcti\-option\-config>\f[]
  96. .PP
  97. Specifying an empty string for either the \f[C]<tcti\-name>\f[] or
  98. \f[C]<tcti\-option\-config>\f[] results in the default being used for
  99. that portion respectively.
  100. .SS TCTI Defaults
  101. .PP
  102. When a TCTI is not specified, the default TCTI is searched for using
  103. \f[I]dlopen(3)\f[] semantics.
  104. The tools will search for \f[I]tabrmd\f[], \f[I]device\f[] and
  105. \f[I]mssim\f[] TCTIs \f[B]IN THAT ORDER\f[] and \f[B]USE THE FIRST ONE
  106. FOUND\f[].
  107. You can query what TCTI will be chosen as the default by using the
  108. \f[B]\-v\f[] option to print the version information.
  109. The "default\-tcti" key\-value pair will indicate which of the
  110. aforementioned TCTIs is the default.
  111. .SS Custom TCTIs
  112. .PP
  113. Any TCTI that implements the dynamic TCTI interface can be loaded.
  114. The tools internally use \f[I]dlopen(3)\f[], and the raw
  115. \f[I]tcti\-name\f[] value is used for the lookup.
  116. Thus, this could be a path to the shared library, or a library name as
  117. understood by \f[I]dlopen(3)\f[] semantics.
  118. .SH TCTI OPTIONS
  119. .PP
  120. This collection of options are used to configure the various known TCTI
  121. modules available:
  122. .IP \[bu] 2
  123. \f[B]device\f[]: For the device TCTI, the TPM character device file for
  124. use by the device TCTI can be specified.
  125. The default is \f[I]/dev/tpm0\f[].
  126. .RS 2
  127. .PP
  128. Example: \f[B]\-T device:/dev/tpm0\f[] or \f[B]export
  129. \f[I]TPM2TOOLS_TCTI\f[]="device:/dev/tpm0"\f[]
  130. .RE
  131. .IP \[bu] 2
  132. \f[B]mssim\f[]: For the mssim TCTI, the domain name or IP address and
  133. port number used by the simulator can be specified.
  134. The default are 127.0.0.1 and 2321.
  135. .RS 2
  136. .PP
  137. Example: \f[B]\-T mssim:host=localhost,port=2321\f[] or \f[B]export
  138. \f[I]TPM2TOOLS_TCTI\f[]="mssim:host=localhost,port=2321"\f[]
  139. .RE
  140. .IP \[bu] 2
  141. \f[B]abrmd\f[]: For the abrmd TCTI, the configuration string format is a
  142. series of simple key value pairs separated by a \[aq],\[aq] character.
  143. Each key and value string are separated by a \[aq]=\[aq] character.
  144. .RS 2
  145. .IP \[bu] 2
  146. TCTI abrmd supports two keys:
  147. .RS 2
  148. .IP "1." 3
  149. \[aq]bus_name\[aq] : The name of the tabrmd service on the bus (a
  150. string).
  151. .IP "2." 3
  152. \[aq]bus_type\[aq] : The type of the dbus instance (a string) limited to
  153. \[aq]session\[aq] and \[aq]system\[aq].
  154. .RE
  155. .PP
  156. Specify the tabrmd tcti name and a config string of
  157. \f[C]bus_name=com.example.FooBar\f[]:
  158. .PP
  159. \f[C]\\\-\-tcti=tabrmd:bus_name=com.example.FooBar\f[]
  160. .PP
  161. Specify the default (abrmd) tcti and a config string of
  162. \f[C]bus_type=session\f[]:
  163. .PP
  164. \f[C]\\\-\-tcti:bus_type=session\f[]
  165. .PP
  166. \f[B]NOTE\f[]: abrmd and tabrmd are synonymous.
  167. the various known TCTI modules.
  168. .RE
  169. .SH EXAMPLES
  170. .SS Send a TPM Startup Command with flags TPM2_SU_STATE
  171. .IP
  172. .nf
  173. \f[C]
  174. tpm2_startup
  175. \f[]
  176. .fi
  177. .SS Send a TPM Startup Command with flags TPM2_SU_CLEAR
  178. .IP
  179. .nf
  180. \f[C]
  181. tpm2_startup\ \-c
  182. \f[]
  183. .fi
  184. .SH NOTES
  185. .PP
  186. Typically a Resource Manager (like
  187. tpm2\-abrmd (https://github.com/tpm2-software/tpm2-abrmd)) or
  188. low\-level/boot software will have already sent this command.
  189. .SH Returns
  190. .PP
  191. Tools can return any of the following codes:
  192. .IP \[bu] 2
  193. 0 \- Success.
  194. .IP \[bu] 2
  195. 1 \- General non\-specific error.
  196. .IP \[bu] 2
  197. 2 \- Options handling error.
  198. .IP \[bu] 2
  199. 3 \- Authentication error.
  200. .IP \[bu] 2
  201. 4 \- TCTI related error.
  202. .IP \[bu] 2
  203. 5 \- Non supported scheme.
  204. Applicable to tpm2_testparams.
  205. .SH BUGS
  206. .PP
  207. Github Issues (https://github.com/tpm2-software/tpm2-tools/issues)
  208. .SH HELP
  209. .PP
  210. See the Mailing List (https://lists.01.org/mailman/listinfo/tpm2)