|
1 | 1 | # TPM Firmware Update Support |
2 | 2 |
|
3 | | -Currently wolfTPM supports firmware update capability for the Infineon SLB9672 (SPI) and SLB9673 (I2C) TPM 2.0 modules. Infineon has open sourced their firmware update. |
| 3 | +Currently wolfTPM supports firmware update capability for: |
| 4 | +- Infineon SLB9672 (SPI) and SLB9673 (I2C) TPM 2.0 modules. Infineon has open sourced their firmware update. |
| 5 | +- STMicroelectronics ST33KTPM TPM 2.0 modules. Support includes both Generation 1 firmware versions (< 512, without LMS signature) and Generation 2 firmware versions (>= 512, with LMS signature requirement). |
4 | 6 |
|
5 | 7 | ## Infineon Firmware |
6 | 8 |
|
@@ -102,3 +104,98 @@ Mfg IFX (1), Vendor SLB9673, Fw 26.13 (0x456a) |
102 | 104 | Operational mode: Normal TPM operational mode (0x0) |
103 | 105 | KeyGroupId 0x7, FwCounter 1253 (254 same) |
104 | 106 | ``` |
| 107 | + |
| 108 | +## ST33 Firmware Update |
| 109 | + |
| 110 | +### Firmware Format Auto-Detection |
| 111 | + |
| 112 | +ST33KTPM firmware update automatically detects the required format based on TPM firmware version: |
| 113 | + |
| 114 | +- **Legacy firmware (< 512, e.g., 9.257)**: Non-LMS format |
| 115 | + - Manifest size: 177 bytes |
| 116 | + - Generation 1 firmware (ECC-only) |
| 117 | + |
| 118 | +- **Modern firmware (>= 512, e.g., 9.512)**: LMS format |
| 119 | + - Manifest size: 2697 bytes (includes embedded LMS signature) |
| 120 | + - Generation 2 firmware (LMS mandatory) |
| 121 | + |
| 122 | +The firmware version is automatically detected from `fwVerMinor` in TPM capabilities. The correct manifest size is determined automatically - no manual format selection is needed. |
| 123 | + |
| 124 | +### Updating the firmware |
| 125 | + |
| 126 | +The `st33_fw_update` tool automatically detects the firmware format. |
| 127 | + |
| 128 | +```sh |
| 129 | +# Help |
| 130 | +./st33_fw_update --help |
| 131 | +ST33 Firmware Update Usage: |
| 132 | + ./st33_fw_update (get info) |
| 133 | + ./st33_fw_update --abandon (cancel) |
| 134 | + ./st33_fw_update <firmware.fi> |
| 135 | + |
| 136 | +Firmware format is auto-detected from TPM firmware version: |
| 137 | + - Firmware < 512: Non-LMS format (177 byte manifest) |
| 138 | + - Firmware >= 512: LMS format (2697 byte manifest with embedded signature) |
| 139 | + |
| 140 | +# Run without arguments to display the current firmware information |
| 141 | +./st33_fw_update |
| 142 | +ST33 Firmware Update Tool |
| 143 | +TPM2: Caps 0x30000415, Did 0x0003, Vid 0x104a, Rid 0x 1 |
| 144 | +TPM2_Startup pass |
| 145 | +Mfg STM (2), Vendor ST33KTPM2X, Fw 9.257 (0x0) |
| 146 | +Firmware version details: Major=9, Minor=257, Vendor=0x0 |
| 147 | +Hardware: ST33K (legacy firmware, Generation 1) |
| 148 | +Firmware update: Non-LMS format required |
| 149 | + |
| 150 | +# Run with firmware file (format auto-detected from TPM version) |
| 151 | +./st33_fw_update TPM_ST33KTPM2X_00090200_V1.fi |
| 152 | +ST33 Firmware Update Tool |
| 153 | + Firmware File: TPM_ST33KTPM2X_00090200_V1.fi |
| 154 | +TPM2: Caps 0x30000415, Did 0x0003, Vid 0x104a, Rid 0x 1 |
| 155 | +TPM2_Startup pass |
| 156 | +Mfg STM (2), Vendor ST33KTPM2X, Fw 9.257 (0x0) |
| 157 | +Firmware version details: Major=9, Minor=257, Vendor=0x0 |
| 158 | +Hardware: ST33K (legacy firmware, Generation 1) |
| 159 | +Firmware update: Non-LMS format required |
| 160 | + Format: Non-LMS (from TPM firmware version) |
| 161 | +Firmware Update: |
| 162 | + Total file size: 364290 bytes |
| 163 | + Manifest (blob0): 177 bytes |
| 164 | + Firmware data: 364113 bytes |
| 165 | +... |
| 166 | +Firmware update completed successfully. |
| 167 | +Please reset or power cycle the TPM. |
| 168 | + |
| 169 | +# Example with LMS firmware (Generation 2 TPM, firmware >= 512) |
| 170 | +./st33_fw_update ST33KTPM2X_FAC_00090200_V2.fi |
| 171 | +ST33 Firmware Update Tool |
| 172 | + Firmware File: ST33KTPM2X_FAC_00090200_V2.fi |
| 173 | +TPM2: Caps 0x30000415, Did 0x0003, Vid 0x104a, Rid 0x 3 |
| 174 | +TPM2_Startup pass |
| 175 | +Mfg STM (2), Vendor ST33KTPM2X, Fw 9.512 (0x0) |
| 176 | +Firmware version details: Major=9, Minor=512, Vendor=0x0 |
| 177 | +Hardware: ST33K (modern firmware, Generation 2) |
| 178 | +Firmware update: LMS format required |
| 179 | + Format: LMS (from TPM firmware version) |
| 180 | +Firmware Update: |
| 181 | + Total file size: 360092 bytes |
| 182 | + Manifest (blob0): 2697 bytes |
| 183 | + Firmware data: 357395 bytes |
| 184 | +... |
| 185 | +Firmware update completed successfully. |
| 186 | +Please reset or power cycle the TPM. |
| 187 | + |
| 188 | +# Cancel an ongoing firmware update |
| 189 | +./st33_fw_update --abandon |
| 190 | +ST33 Firmware Update Tool |
| 191 | +TPM2: Caps 0x30000415, Did 0x0003, Vid 0x104a, Rid 0x 1 |
| 192 | +TPM2_Startup pass |
| 193 | +Mfg STM (2), Vendor ST33KTPM2X, Fw 9.257 (0x0) |
| 194 | +Firmware version details: Major=9, Minor=257, Vendor=0x0 |
| 195 | +Hardware: ST33K (legacy firmware, Generation 1) |
| 196 | +Firmware update: Non-LMS format required |
| 197 | +Firmware Update Abandon: |
| 198 | +Success: Please reset or power cycle TPM |
| 199 | +``` |
| 200 | + |
| 201 | +**Note**: Firmware files cannot be made public and must be obtained separately from STMicroelectronics. |
0 commit comments