[Qemu-devel] [PATCH v16 0/6] Add support for TPM Physical Presence interface

Marc-André Lureau posted 6 patches 5 years, 3 months ago
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test docker-quick@centos7 passed
Failed in applying to current master (apply log)
There is a newer version of this series
hw/tpm/tpm_ppi.h      |  46 +++++
include/hw/acpi/tpm.h |  21 ++
hw/acpi/tpm.c         | 459 ++++++++++++++++++++++++++++++++++++++++++
hw/core/machine.c     |   8 +
hw/i386/acpi-build.c  |  29 ++-
hw/tpm/tpm_crb.c      |  13 ++
hw/tpm/tpm_ppi.c      |  53 +++++
hw/tpm/tpm_tis.c      |  13 ++
stubs/tpm.c           |   5 +
docs/specs/tpm.txt    | 104 ++++++++++
hw/acpi/Makefile.objs |   1 +
hw/tpm/Makefile.objs  |   1 +
hw/tpm/trace-events   |   3 +
13 files changed, 754 insertions(+), 2 deletions(-)
create mode 100644 hw/tpm/tpm_ppi.h
create mode 100644 hw/acpi/tpm.c
create mode 100644 hw/tpm/tpm_ppi.c
[Qemu-devel] [PATCH v16 0/6] Add support for TPM Physical Presence interface
Posted by Marc-André Lureau 5 years, 3 months ago
Hi,

The following patches implement the TPM Physical Presence Interface
that allows a user to set a command via ACPI (sysfs entry in Linux)
that, upon the next reboot, the firmware looks for and acts upon by
sending sequences of commands to the TPM.

A dedicated memory region is added to the TPM CRB & TIS devices, at
address/size 0xFED45000/0x400. A new "etc/tpm/config" fw_cfg entry
holds the location for that PPI region and some version details, to
allow for future flexibility.

With the associated edk2/ovmf firmware, the Windows HLK "PPI 1.3" test
now runs successfully.

It is based on previous work from Stefan Berger ("[PATCH v2 0/4]
Implement Physical Presence interface for TPM 1.2 and 2")

The edk2 support is merged upstream.

v16:
- minor comments and stylistic changes
- add r-b & t-b tags

v15:
- fix crash on reset when PPI is disabled

v14:
- rebased, fixing conflicts after compat-props refactoring
- fix build regression from v13 with --disable-tpm

v13:
- removed needless error handling in tpm_ppi_init()
- splitted "add ACPI memory clear interface"
- moved acpi build function in dedicated hw/acpi/tpm.c
- added some function documentation in headers
- various code cleanups suggested by Philippe
- rebased

Marc-André Lureau (3):
  tpm: add a "ppi" boolean property
  acpi: add ACPI memory clear interface
  tpm: clear RAM when "memory overwrite" requested

Stefan Berger (3):
  tpm: allocate/map buffer for TPM Physical Presence interface
  acpi: expose TPM/PPI configuration parameters to firmware via fw_cfg
  acpi: build TPM Physical Presence interface

 hw/tpm/tpm_ppi.h      |  46 +++++
 include/hw/acpi/tpm.h |  21 ++
 hw/acpi/tpm.c         | 459 ++++++++++++++++++++++++++++++++++++++++++
 hw/core/machine.c     |   8 +
 hw/i386/acpi-build.c  |  29 ++-
 hw/tpm/tpm_crb.c      |  13 ++
 hw/tpm/tpm_ppi.c      |  53 +++++
 hw/tpm/tpm_tis.c      |  13 ++
 stubs/tpm.c           |   5 +
 docs/specs/tpm.txt    | 104 ++++++++++
 hw/acpi/Makefile.objs |   1 +
 hw/tpm/Makefile.objs  |   1 +
 hw/tpm/trace-events   |   3 +
 13 files changed, 754 insertions(+), 2 deletions(-)
 create mode 100644 hw/tpm/tpm_ppi.h
 create mode 100644 hw/acpi/tpm.c
 create mode 100644 hw/tpm/tpm_ppi.c

-- 
2.20.1.98.gecbdaf0899


Re: [Qemu-devel] [PATCH v16 0/6] Add support for TPM Physical Presence interface
Posted by no-reply@patchew.org 5 years, 3 months ago
Patchew URL: https://patchew.org/QEMU/20190109193115.20655-1-marcandre.lureau@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Message-id: 20190109193115.20655-1-marcandre.lureau@redhat.com
Type: series
Subject: [Qemu-devel] [PATCH v16 0/6] Add support for TPM Physical Presence interface

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback --color=always base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
16ddac1 tpm: clear RAM when "memory overwrite" requested
bc2cacd acpi: add ACPI memory clear interface
5e862c0 acpi: build TPM Physical Presence interface
e137a73 acpi: expose TPM/PPI configuration parameters to firmware via fw_cfg
c2780c9 tpm: allocate/map buffer for TPM Physical Presence interface
6edda68 tpm: add a "ppi" boolean property

=== OUTPUT BEGIN ===
Unknown option: color
Usage:

    checkpatch.pl [OPTION]... [FILE]...
    checkpatch.pl [OPTION]... [GIT-REV-LIST]

Version: 0.31

Options:
  -q, --quiet                quiet
  --no-tree                  run without a kernel tree
  --no-signoff               do not check for 'Signed-off-by' line
  --patch                    treat FILE as patchfile
  --branch                   treat args as GIT revision list
  --emacs                    emacs compile window format
  --terse                    one line per report
  -f, --file                 treat FILE as regular source file
  --strict                   fail if only warnings are found
  --root=PATH                PATH to the kernel tree root
  --no-summary               suppress the per-file summary
  --mailback                 only produce a report in case of warnings/errors
  --summary-file             include the filename in summary
  --debug KEY=[0|1]          turn on/off debugging of KEY, where KEY is one of
                             'values', 'possible', 'type', and 'attr' (default
                             is all off)
  --test-only=WORD           report only warnings/errors containing WORD
                             literally
  -h, --help, --version      display this help and exit

When FILE is - read standard input.
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20190109193115.20655-1-marcandre.lureau@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com