Skip to content

Commit e9c9099

Browse files
authored
Merge pull request #484 from aidangarske/spdm-runner-caps-reset
Reset on SPDM runner test
2 parents 35629e9 + 7bf45b7 commit e9c9099

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/hw-spdm-test.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,15 @@ jobs:
141141
LDFLAGS="-L${{ steps.wolfssl.outputs.prefix }}/lib"
142142
make -j"$(nproc)"
143143
144+
- name: Reset TPM before detect (shared GPIO 4 reset line)
145+
if: steps.health.outcome == 'success'
146+
run: |
147+
# Mirror spdm_test.sh gpio_reset(): both vendors share this reset line.
148+
# Without this, caps sees a chip left in SPDM-locked state or stale TIS
149+
# from a prior run and returns all-zero vendor/device IDs.
150+
gpioset gpiochip0 4=0 2>/dev/null && sleep 0.1 && gpioset gpiochip0 4=1 2>/dev/null || true
151+
sleep 2
152+
144153
- name: Detect ${{ matrix.vendor }} TPM on SPI CS ${{ matrix.spi_cs }}
145154
id: detect
146155
if: steps.health.outcome == 'success'
@@ -175,7 +184,7 @@ jobs:
175184
done
176185
177186
- name: Post-job cleanup
178-
if: always() && steps.health.outcome == 'success' && steps.detect.outputs.present == 'true'
187+
if: always() && steps.health.outcome == 'success'
179188
env:
180189
LD_LIBRARY_PATH: ${{ steps.wolfssl.outputs.prefix }}/lib
181190
run: |
@@ -184,6 +193,7 @@ jobs:
184193
sleep 1
185194
gpioset gpiochip0 4=0 2>/dev/null && sleep 0.1 && gpioset gpiochip0 4=1 2>/dev/null || true
186195
sleep 2
196+
# unlock/flush only meaningful if the chip was detected; ignore errors otherwise
187197
./examples/spdm/spdm_ctrl --connect --unlock 2>/dev/null || true
188198
./examples/management/flush 2>/dev/null || true
189199
echo "[cleanup] done"

0 commit comments

Comments
 (0)