[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v3 0/2] acpi: Make TPM version configurable.


  • To: <jennifer.herbert@xxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jennifer Herbert <jennifer.herbert@xxxxxxxxxx>
  • Date: Tue, 25 Apr 2023 17:47:31 +0000
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Jennifer Herbert <jennifer.herbert@xxxxxxxxxx>
  • Delivery-date: Tue, 25 Apr 2023 17:48:20 +0000
  • Ironport-data: A9a23:cYzJeqozhWyZk8Eeeo/1uhoCcKxeBmIRZRIvgKrLsJaIsI4StFCzt garIBnVM/aKMWb0ed5wPoiy/ENVucDRyIBrSAtrqisyEi4RpZuZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYWYpA1c/Ek/NsDo788YhmIlknNOlNA2Ev NL2sqX3NUSsnjV5KQr40YrawP9UlKm06WJwUmAWP6gR5weCzSRNV/rzGInqR5fGatgMdgKFb 76rIIGRpgvx4xorA9W5pbf3GmVirmn6ZFXmZtJ+AsBOszAazsAA+v9T2Mk0MC+7vw6hjdFpo OihgLTrIesf0g8gr8xGO/VQO3kW0aSrY9YrK1Dn2SCY5xWun3cBX5yCpaz5VGEV0r8fPI1Ay RAXABcsZQqb2r3v+ZuYF8tp3+QfDuriJ5xK7xmMzRmBZRonaZXKQqGM7t5ExjYgwMtJGJ4yZ eJAN2ApNk6ZJUQSZBFOUslWcOSA3xETdxVapVSTpKQ6+S7TwRZ73aLxGNHUZsaLVYNemUPwS mfupjymWEtKb4bOodaD2l71r7H0tADAYZgtOqKh0MR6sAWXzXNGXXX6UnPk+KLk2yZSQel3K UES/CsgoLJ09EGxRNTnQzWzoWKerlgXXN84O/037kSBx7TZ5y6dB3MYVXhRZdo+rsg0SDc2k FiTkLvBBzZirbmUQnK17aqPoHW5Pi19EIMZTXZaF01fuYCl+dxtyEuVFb6PDZJZkPXSODrq2 23V9REXpOgxiJcr64eY9EvY1mfESofycuIl2unGdjv7vlkiNdP9OtzABUvztqgZctvAJrWVl D1dwpXFsrhTZX2YvHbVKNjhCo1F8Bps3Nf0pVd0V6cs+D22k5JIVdABuWouTKuF3yttRNMIX KMwkVkLjHOrFCH2BZKbmqroYyjQ8YDuFM7+StffZcdUb556eWevpX8+PxXOhjq9wRZwwMnT3 Kt3lu79ZUv29Iw9lGbmLwvj+eRDKt8CKZP7GsmgkkXPPUu2b3+JU7YVWGazghQCxPrc+m39q o8PX/ZmPj0DCIUSlAGLq99MRb3LRFBnba3LRzt/Lb/fc1E2SDFwUpc8A9oJIuRYokicrc+Ql lnVZ6OS4AOl7ZEbAW1mskxeVY4=
  • Ironport-hdrordr: A9a23:Hy8yRKm+1ZEhHe0r8Ay/Aaf40w7pDfIT3DAbv31ZSRFFG/FwWf re5cjztCWE8Ar5PUtLpTnuAtjkfZqxz+8W3WBVB8bAYOCEggqVxeNZnO/fKlTbckWUygce78 ddmsNFebrN5DZB/KDHCcqDf+rIAuPrzEllv4jjJr5WIz1XVw==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

This patch makes the TPM version, for which the ACPI library probes,
configurable.
Find following version 3 of this patche series.  Appoliges for it
taking so long, and my previous version missing some changes I intended to
share.

Have renamed the TPM_CRB constants to better match the TPM
specification.  (They where previously trying to stay consistent with the
TIS code)
Have moved some ACPI register locations to acpi2_0.h to such that both
TPM register offsets are defined together, so that their relation can be
better understood.  Have  also added additional comments to explain these
constants.

Changed the defaults, such that it will act exactly as is current,
(which is to attempt to probe for TPM 1.2) unless explicitly set to no
TPM or TPM 2, so not to regress anything.
Addressed veriouse style issues.
Moved tpm_version field up in acpi_config for better alignment.

Add a new xenstore key 'tpm_version', which xenopsd is setting to 2.  If
not set, it defaults to '1' probing for tpm 1.2 as before.

A note on the use of CRB:  QEMU implements both TIS and CRB interfaces
for TPM2. We use this CRB interface as defined by the TCG PTP
specification,
as it is thought to be the more modern interface and preferred for the
TPM2.0 only world.
TIS is PC specific, implemented with an ISA bus device in QEMU, whereas
I think CRB is more generic and would be suitable for
use on other platforms like ARM.  While I read here is some confusion
about the Mobile CRB specification regrading locality, I don't 
think this is a problem for our use case.  However, should someone
decide they need to use TIS with TPM2, I don't believe this patch series
would exclude the option for this to be added later, since struct
acpi_config does allow a TIS to be supplied instead of CRB for version
2.

Jennifer Herbert (2):
  acpi: Make TPM version configurable.
  acpi: Add TPM2 interface definition.

 docs/misc/xenstore-paths.pandoc |  10 +++
 tools/firmware/hvmloader/util.c |  28 +++++++--
 tools/libacpi/Makefile          |   3 +-
 tools/libacpi/acpi2_0.h         |  32 ++++++++++
 tools/libacpi/build.c           | 106 +++++++++++++++++++++++---------
 tools/libacpi/libacpi.h         |   4 +-
 tools/libacpi/ssdt_tpm2.asl     |  36 +++++++++++
 7 files changed, 183 insertions(+), 36 deletions(-)
 create mode 100644 tools/libacpi/ssdt_tpm2.asl

-- 
2.39.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.