Skip to content

Commit c1a5945

Browse files
committed
Further cleanups
1 parent d729de9 commit c1a5945

1 file changed

Lines changed: 12 additions & 22 deletions

File tree

docs/SWTPM.md

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@ The software TPM transport is a socket connection by default, but we also suppor
1212

1313
This implementation only uses the TPM command interface typically on port 2321. It does not support the Platform interface typically on port 2322.
1414

15-
Some software TPM implementations require sending power up and startup commands on the platform interface before the command interface is enabled. You can use these commands to issue the required power up and startup:
16-
17-
```sh
18-
echo -ne "\x00\x00\x00\x01" | nc 127.0.0.1 2322
19-
echo -ne "\x00\x00\x00\x0B" | nc 127.0.0.1 2322
20-
```
21-
2215
## wolfTPM SWTPM support
2316

2417
To enable the socket transport for SWTPM use `--enable-swtpm`. By default all software TPM simulators use TCP port 2321.
@@ -36,9 +29,17 @@ Build Options:
3629
* `TPM2_SWTPM_HOST`: The socket host (default is localhost)
3730
* `TPM2_SWTPM_PORT`: The socket port (default is 2321)
3831

39-
4032
## Using a SWTPM
4133

34+
### SWTPM Power Up and Startup
35+
36+
The TCG TPM and Microsoft ms-tpm-20-ref implementations require sending power up and startup commands on the platform interface before the command interface is enabled. You can use these commands to issue the required power up and startup:
37+
38+
```sh
39+
echo -ne "\x00\x00\x00\x01" | nc 127.0.0.1 2322
40+
echo -ne "\x00\x00\x00\x0B" | nc 127.0.0.1 2322
41+
```
42+
4243
### TCG TPM
4344

4445
```sh
@@ -52,13 +53,7 @@ make
5253

5354
Run with: `./Simulator/src/tpm2-simulator`
5455

55-
To use the TPM on port 2321 you must first connect to the platform server on port 2322 and send the power on and startup commands. An easy way to do this is using:
56-
57-
```sh
58-
echo -ne "\x00\x00\x00\x01" | nc 127.0.0.1 2322
59-
echo -ne "\x00\x00\x00\x0B" | nc 127.0.0.1 2322
60-
```
61-
56+
Run power on and self test. See [SWTPM Power Up and Startup](#swtpm-power-up-and-startup).
6257

6358
### ibmswtpm2
6459

@@ -71,7 +66,7 @@ make
7166

7267
Run with: `./tpm_server`
7368

74-
Note: You can use the `-rm` switch to remove the cache file NVChip. Alternately you can delete the NVChip file (`rm NVChip`)
69+
Note: You can use the `-rm` switch to remove the cache file NVChip. Alternatively you can delete the NVChip file (`rm NVChip`)
7570

7671

7772
### ms-tpm-20-ref
@@ -86,12 +81,7 @@ make
8681

8782
Run with: `./Simulator/src/tpm2-simulator`
8883

89-
To use the TPM on port 2321 you must first connect to the platform server on port 2322 and send the power on and startup commands. An easy way to do this is using:
90-
91-
```sh
92-
echo -ne "\x00\x00\x00\x01" | nc 127.0.0.1 2322
93-
echo -ne "\x00\x00\x00\x0B" | nc 127.0.0.1 2322
94-
```
84+
Run power on and self test. See [SWTPM Power Up and Startup](#swtpm-power-up-and-startup).
9585

9686

9787
### swtpm

0 commit comments

Comments
 (0)