swtpm_bios(8)
π swtpm_bios(8) β the BIOS-simulator bestie π
Okay so picture this: it's swtpm_bios, the manual page, and she's here to explain the tool that does the BIOS's little TPM warm-up routine. Iykyk.
β¨ NAME β¨
swtpm_bios β a BIOS simulation tool for swtpm, fr fr πΈ
π SYNOPSIS π
swtpm_bios [OPTIONS]
π¦ DESCRIPTION π¦
So swtpm_bios is that girl π
β she sends the exact commands to the TPM (that's the swtpm program) that the BIOS typically uses to initialize the TPM. And you get options, bestie β several command line options β to pick which state you want the TPM set to. Choose your fighter. β¨
Heads up, queen π: this command requires the environment variable TCSD_USE_TCP_DEVICE to be set if you're communicating via TCP. No variable, no TCP. Periodt.
If you're not doing TCP, it'll use the device set in the environment variable TPM_DEVICE, or fall back to /dev/tpm0 for sending the commands. Slight "we'll figure it out" energy, but okay.
In TCP mode, the environment variable TCSD_TCP_DEVICE_HOSTNAME tells it which host to send the commands to. Default assumption is localhost. And the default TCP port is 6545 β unless the environment variable TCSD_TCP_DEVICE_PORT says otherwise. π«
π Return codes (vibe check) π
0β success, we ate π128β a TPM error was encountered π255β communication failure π129β the TPM needs to be reset to become activated π
πΈ The command sequence it sends πΈ
This command will send the following sequence of commands to the TPM:
TPM_Startup(chosen mode) -- startup TPM
TSC_PhysicalPresence(0x20) -- PhysicalPresenceCMDEnable
TSC_PhysicalPresence(0x08) -- turn on physical presence
TPM_GetCapability -- get permanent flags
TPM_PhysicalEnable -- enable the TPM
TPM_PhysicalSetDeactivated(0x0) -- activate TPM
TPM_ContinueSelfTest -- continue self test
TSC_PhysicalPresence(0x20) -- PhysicalPresenceCMDEnable
TSC_PhysicalPresence(0x14) -- turn off physical presence & lock it
Lowkey iconic lineup. π₯
π OPTIONS π
The following options are supported:
--tpm-device <device>β use the given device instead of the default/dev/tpm0. This one overrides theTPM_DEVICEenvironment variable, so she's got main character energy over that env var. π--tcp <server>:<port>β connect to the given server and port. No server given? Then127.0.0.1is used. No port given? Then the default port6545is used. Flexible queen. β¨--unix <path>β connect to the given UnixIO path. π¦-tpm2β the device is a TPM 2. Noted, bestie.-cβ sendTPM_Startup(ST_CLEAR)(default). This instructs the TPM to start with clear state. Fresh start, clean slate, we love it. πΈ-sβ sendTPM_Startup(ST_STATE). This instructs the TPM to start by restoring previously saved state. Nostalgic era. π«-dβ sendTPM_Startup(ST_DEACTIVATED). This instructs the TPM to start in deactivated mode. β οΈ This option has no effect on a TPM 2 β so don't come for her if nothing happens.-nβ don't send aTPM_Startupcommand. Skipping it, respectfully. π-oβ only send the startup command and nothing else. Minimalist icon. π-eaβ make sure that the TPM is activated; if the TPM requires a reset, the program will exist and return a return code of129. π (That's exactly how the original words it β "the program will exist" β so yes, you read that right.)-csβ send aTPM_ContinueSelfTestcommand to a TPM 1.2 and aTPM2_IncrementalSelfTestcommand to a TPM 2. Knows both dialects, bilingual legend. π-uβ give up physical presence on a TPM 1.2. In case of a TPM 2, set the platform hierarchy to a random password. Random password era πβ¨-vβ display version and exit. Bye bestie π-hβ display the help screen and exit. π«Ά
π SEE ALSO π
(Yeahβ¦ the original leaves this one empty. Nothing to see here. Moving on. π)
π REPORTING BUGS π
Report bugs to Stefan Berger <stefanb@linux.vnet.ibm.com> β be nice, be specific, include the deets. π«Ά
Mwah π that's the whole page! This lil swtpm_bios(8) situation comes from the swtpm source, dated 2026-08-23 β go forth and initialize those TPMs, bestie. β¨ππ¦
π¦ where this page comes from
- opensuse-leap 16.0: swtpm 0.10.2-160000.1.1 Β· BSD-3-Clause
- opensuse-leap 16.0: swtpm 0.10.2-160000.1.1 Β· BSD-3-Clause
- opensuse-leap 16.0: swtpm 0.10.2-160000.1.1 Β· BSD-3-Clause
- opensuse-leap 16.0: swtpm 0.10.2-160000.1.1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms