7 B<swtpm_bios [OPTIONS]>
11 B<swtpm_bios> is a tool that can send the commands to the TPM (I<swtpm>
12 program) that typically are used by the BIOS to initialize the TPM.
13 The user can choose among several command line options to choose the
14 state the TPM should be set to.
16 This command requires the environment variable I<TCSD_USE_TCP_DEVICE>
17 to be set for communication via TCP. Otherwise it will use the device
18 set in the environment variable I<TPM_DEVICE> or fall back to use
19 I</dev/tpm0> to send the commands to. In TCP mode, the environment variable
20 I<TCSD_TCP_DEVICE_HOSTNAME> is used to indicate the host to send the commands
21 to. By default I<localhost> is assumed. The default TCP port is 6545 unless
22 the environment variable I<TCSD_TCP_DEVICE_PORT> indicates another port.
24 In case of success 0 will be returned. In case a TPM error was
25 encountered the return code will be 128. In case of communcation
26 failure 255 is returned. In case the TPM needs to be reset to become
27 activated, 129 will be returned.
29 This command will send the following sequence of commands to the TPM.
33 =item B<TPM_Startup(chosen mode)> -- startup TPM
35 =item B<TSC_PhysicalPresence(0x20)> -- PhysicalPresenceCMDEnable
37 =item B<TSC_PhysicalPresence(0x08)> -- turn on physical presence
39 =item B<TPM_GetCapability> -- get permanent flags
41 =item B<TPM_PhysicalEnable> -- enable the TPM
43 =item B<TPM_PhysicalSetDeactivated(0x0)> -- activate TPM
45 =item B<TPM_ContinueSelfTest> -- continue self test
47 =item B<TSC_PhysicalPresence(0x20)> -- PhysicalPresenceCMDEnable
49 =item B<TSC_PhysicalPresence(0x14)> -- turn off physical presence & lock it
53 The following options are supported:
57 =item B<--tpm-device E<lt>deviceE<gt>>
59 Use the given device rather than the default /dev/tpm0. This option overrides
60 the TPM_DEVICE environment variable.
62 =item B<--tcp E<lt>serverE<gt>:E<lt>portE<gt>>
64 Connect to the given server and port; if no server is given, 127.0.0.1 is used;
65 if port is not given, the default port 6545 is used.
67 =item B<--unixio E<lt>pathE<gt>>
69 Connect to the given UnixIO path.
73 The device is a TPM 2.
77 Send TPM_Startup(ST_CLEAR) (default). This instructs the TPM to start
82 Send TPM_Startup(ST_STATE). This instructs the TPM to start by restoring
83 previously saved state.
87 Send TPM_Startup(ST_DEACTIVATED). This instructs the TPM to start in
88 deactivated mode. This option has no effect on a TPM 2.
92 Don't send a TPM_Startup command.
96 Only send the startup command and nothing else.
100 Make sure that the TPM is activated; if the TPM requires a reset, the program
101 will exist and return a return code of 129.
105 Send a TPM_ContinueSelfTest command to a TPM 1.2 and a TPM2_IncrementalSelfTest
110 Give up physical presence on a TPM 1.2. In case of a TPM 2 set the platform
111 hierarchy to a random password.
115 Display version and exit.
119 Display the help screen and exit.
125 =head1 REPORTING BUGS
127 Report bugs to Stefan Berger <stefanb@linux.vnet.ibm.com>