Skip to content

Add TPM support to SeaBIOS

Stefan Berger qemu-devel 7 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest9 patches 2 repliesIn review
  2. v69 patches 4 repliesSuperseded
  3. v59 patches 4 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v48 patches3 repliesSuperseded
v38 patches1 replySuperseded
v28 patches2 repliesSuperseded
v18 patches8 repliesSuperseded

Changes in v7 from the cover letter

- adapted patches to checkout of 83012de (Aug 31)
- fixed compilation error reported by Andreas Niederl

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9Add an implementation of a TPM TIS driversrc/tpm_drivers.c src/tpm_drivers.h+346 -00 replies
2/9Provide ACPI SSDT table for TPM device + S3 resume supportMakefile src/acpi-tpm-ssdt.dsl src/acpi-tpm-ssdt.hex +5 more+249 -30 replies
3/9Add public get_rsdp functionsrc/acpi.c src/acpi.h+11 -20 replies
4/9Implementation of the TCG BIOS extensionssrc/Kconfig src/boot.c src/config.h +4 more+824 -00 replies
5/9Support for BIOS interrupt handlerMakefile src/Kconfig src/clock.c +6 more+745 -22 replies
6/9Add measurement code to the BIOSsrc/boot.c src/cdrom.c src/optionroms.c +5 more+409 -00 replies
7/9Add a menu for TPM controlsrc/boot.c src/tcgbios.c src/tcgbios.h+514 -10 replies
8/9Support for Qemu-provided measurementssrc/boot.c src/paravirt.c src/paravirt.h +2 more+109 -00 replies
9/9Optional tests for the TIS interfaceMakefile src/Kconfig src/tcgbios.c +2 more+922 -90 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v7 yet.

Read the v7 thread

Cover letter [Qemu-devel] [PATCH V7 0/9] Add TPM support to SeaBIOS

The following set of patches add TPM and Trusted Computing support to SeaBIOS. In particular the patches add:

- a TPM driver for the Qemu's TPM TIS emulation (not yet in Qemu git)
- ACPI support for the TPM device (SSDT table)
- ACPI support for measurement logging (TCPA table)
- Support for initialzation of the TPM
- Support for the TCG BIOS extensions (1ah handler [ah = 0xbb]) (used by trusted grub; http://trousers.sourceforge.net/grub.html)
- Static Root of Trusted for Measurement (SRTM) support
- Support for S3 resume (sends command to TPM upon resume)
- TPM-specific menu for controlling aspects of the TPM
- [An optional test suite for the TIS interface]

All implementations necessarily follow specifications.

When all patches are applied the following services are available
- SSDT ACPI table for TPM support
- initialization of the TPM upon VM start and S3 resume
- Static root of trust for measurements (SRTM) that measures (some) data of SeaBIOS in TCPA ACPI table
- 1ah interrupt handler offering APIs for measuring and sending commands to the TPM (trusted grub uses them)
- User menu for controlling aspects of the state of the TPM

v7:
- adapted patches to checkout of 83012de (Aug 31)
- fixed compilation error reported by Andreas Niederl

v6:
- adapted patches to checkout of 8e30147 (Aug 9)
- use timeouts/durations for commands as reported by TPM
- following Andreas Niederl's suggestion regarding the ACPI SSDT

v5:
- adapted patches to checkout of 76b5e71 (June 21)
- bugfixes (see individual patches)
- added patch to support the transfer of Qemu-provided measurements via firmware interface

v4:
- if ! has_working_tpm() now returns error code everywhere
- tis_test.c now also under LGPLv3
- in inthandler, pulled set_cf() out of switch and then only call it in the default case where we need to indicate that a function is not implemented

v3:
- some nits here and there
- calling timer_setup now after S3 resume

v2:
- following Kevin's comment
- refactoring code so that every patch compiles

Regards,
Stefan