diff options
author | Dave Voutila <dv@cvs.openbsd.org> | 2021-10-23 16:39:04 +0000 |
---|---|---|
committer | Dave Voutila <dv@cvs.openbsd.org> | 2021-10-23 16:39:04 +0000 |
commit | a455ed6360fd3308339ab41685da5e6772452ec0 (patch) | |
tree | f87d7d910422331f03f6877a771d252935508f1e /sys/dev/acpi/acpireg.h | |
parent | db6bd7c89d8dd89231c0e393f289130c773c793a (diff) |
tpm(4): add support for tpm2 CRB interface
Some modern tpm2 devices require or prefer drivers communicate via
the CRB interface and not the TIS/fifo interface. This change adds
basic support for detecting CRB start mode and using CRB to issue
commands required for proper S4 hibernation. As a result, this also
defines a new struct definition for the TPM2 acpi table required
for start mode detection.
This fixes recent S4 regressions on the Surface Go 2 caused by a
change in firmware from Microsoft.
Other CRB start methods may need implementing in the future to
support additional hardware.
tested by deraadt@ and many others, ok kettenis@
Diffstat (limited to 'sys/dev/acpi/acpireg.h')
-rw-r--r-- | sys/dev/acpi/acpireg.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/acpi/acpireg.h b/sys/dev/acpi/acpireg.h index f2ff1f02564..67f2a42f73b 100644 --- a/sys/dev/acpi/acpireg.h +++ b/sys/dev/acpi/acpireg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: acpireg.h,v 1.55 2021/03/23 09:41:12 patrick Exp $ */ +/* $OpenBSD: acpireg.h,v 1.56 2021/10/23 16:39:03 dv Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Marco Peereboom <marco@openbsd.org> @@ -466,6 +466,14 @@ struct acpi_facs { uint8_t reserved[31]; } __packed; +struct acpi_tpm2 { + struct acpi_table_header hdr; +#define TPM2_SIG "TPM2" + uint32_t reserved; + uint64_t control_addr; + uint32_t start_method; +} __packed; + /* * Intel ACPI DMA Remapping Entries */ |