mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lv Zheng <lv.zheng@intel.com>
To: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Len Brown <len.brown@intel.com>
Cc: Lv Zheng <lv.zheng@intel.com>, Lv Zheng <zetalog@gmail.com>,
	<linux-kernel@vger.kernel.org>,
	linux-acpi@vger.kernel.org, Bob Moore <robert.moore@intel.com>
Subject: [PATCH v3 23/26] ACPICA: Update definitions for the TCPA and TPM2 ACPI tables.
Date: Wed,  1 Jul 2015 14:45:25 +0800	[thread overview]
Message-ID: <7669b04226824fc8c3a9ebaa38fcbbbacbd59e6d.1435731597.git.lv.zheng@intel.com> (raw)
In-Reply-To: <cover.1435731597.git.lv.zheng@intel.com>

From: Bob Moore <robert.moore@intel.com>

ACPICA commit 33140b4498666337dd33a00cf3c4797a53981a7b

Changes for a new version of the 3rd party spec for these tables,
the "TCG ACPI Specification", December 14, 2014. Also, moved the
definition of TPM2 to actbl2.h, next to TCPA, since both should
be together.

Update the table compiler/disassembler code for the tables.
However, the "Server" TCPA table is not supported at this time.

Link: https://github.com/acpica/acpica/commit/33140b44
Reported-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 include/acpi/actbl2.h |   86 +++++++++++++++++++++++++++++++++++++++++++++----
 include/acpi/actbl3.h |   34 ++-----------------
 2 files changed, 81 insertions(+), 39 deletions(-)

diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
index 370d69d..2a9dcc1 100644
--- a/include/acpi/actbl2.h
+++ b/include/acpi/actbl2.h
@@ -51,8 +51,8 @@
  * These tables are not consumed directly by the ACPICA subsystem, but are
  * included here to support device drivers and the AML disassembler.
  *
- * The tables in this file are defined by third-party specifications, and are
- * not defined directly by the ACPI specification itself.
+ * Generally, the tables in this file are defined by third-party specifications,
+ * and are not defined directly by the ACPI specification itself.
  *
  ******************************************************************************/
 
@@ -80,6 +80,7 @@
 #define ACPI_SIG_SPCR           "SPCR"	/* Serial Port Console Redirection table */
 #define ACPI_SIG_SPMI           "SPMI"	/* Server Platform Management Interface table */
 #define ACPI_SIG_TCPA           "TCPA"	/* Trusted Computing Platform Alliance table */
+#define ACPI_SIG_TPM2           "TPM2"	/* Trusted Platform Module 2.0 H/W interface table */
 #define ACPI_SIG_UEFI           "UEFI"	/* Uefi Boot Optimization Table */
 #define ACPI_SIG_VRTC           "VRTC"	/* Virtual Real Time Clock Table */
 #define ACPI_SIG_WAET           "WAET"	/* Windows ACPI Emulated devices Table */
@@ -1179,18 +1180,89 @@ enum acpi_spmi_interface_types {
 /*******************************************************************************
  *
  * TCPA - Trusted Computing Platform Alliance table
- *        Version 1
+ *        Version 2
+ *
+ * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
+ * December 19, 2014
  *
- * Conforms to "TCG PC Specific Implementation Specification",
- * Version 1.1, August 18, 2003
+ * NOTE: There are two versions of the table with the same signature --
+ * the client version and the server version.
  *
  ******************************************************************************/
 
-struct acpi_table_tcpa {
+struct acpi_table_tcpa_client {
+	struct acpi_table_header header;	/* Common ACPI table header */
+	u16 platform_class;
+	u32 minimum_log_length;	/* Minimum length for the event log area */
+	u64 log_address;	/* Address of the event log area */
+};
+
+struct acpi_table_tcpa_server {
 	struct acpi_table_header header;	/* Common ACPI table header */
+	u16 platform_class;
 	u16 reserved;
-	u32 max_log_length;	/* Maximum length for the event log area */
+	u64 minimum_log_length;	/* Minimum length for the event log area */
 	u64 log_address;	/* Address of the event log area */
+	u16 spec_revision;
+	u8 device_flags;
+	u8 interrupt_flags;
+	u8 gpe_number;
+	u8 reserved2[3];
+	u32 global_interrupt;
+	struct acpi_generic_address address;
+	u32 reserved3;
+	struct acpi_generic_address config_address;
+	u8 group;
+	u8 bus;			/* PCI Bus/Segment/Function numbers */
+	u8 device;
+	u8 function;
+};
+
+/* Values for device_flags above */
+
+#define ACPI_TCPA_PCI_DEVICE            (1)
+#define ACPI_TCPA_BUS_PNP               (1<<1)
+#define ACPI_TCPA_ADDRESS_VALID         (1<<2)
+
+/* Values for interrupt_flags above */
+
+#define ACPI_TCPA_INTERRUPT_MODE        (1)
+#define ACPI_TCPA_INTERRUPT_POLARITY    (1<<1)
+#define ACPI_TCPA_SCI_VIA_GPE           (1<<2)
+#define ACPI_TCPA_GLOBAL_INTERRUPT      (1<<3)
+
+/*******************************************************************************
+ *
+ * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
+ *        Version 4
+ *
+ * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
+ * December 19, 2014
+ *
+ ******************************************************************************/
+
+struct acpi_table_tpm2 {
+	struct acpi_table_header header;	/* Common ACPI table header */
+	u16 platform_class;
+	u16 reserved;
+	u64 control_address;
+	u32 start_method;
+
+	/* Platform-specific data follows */
+};
+
+/* Control area structure (not part of table, pointed to by control_address) */
+
+struct acpi_tpm2_control {
+	u32 reserved;
+	u32 error;
+	u32 cancel;
+	u32 start;
+	u64 interrupt_control;
+	u32 command_size;
+	u64 command_address;
+	u32 response_size;
+	u64 response_address;
 };
 
 /*******************************************************************************
diff --git a/include/acpi/actbl3.h b/include/acpi/actbl3.h
index 4018986..1df8916 100644
--- a/include/acpi/actbl3.h
+++ b/include/acpi/actbl3.h
@@ -51,7 +51,8 @@
  * These tables are not consumed directly by the ACPICA subsystem, but are
  * included here to support device drivers and the AML disassembler.
  *
- * The tables in this file are fully defined within the ACPI specification.
+ * In general, the tables in this file are fully defined within the ACPI
+ * specification.
  *
  ******************************************************************************/
 
@@ -69,7 +70,6 @@
 #define ACPI_SIG_PMTT           "PMTT"	/* Platform Memory Topology Table */
 #define ACPI_SIG_RASF           "RASF"	/* RAS Feature table */
 #define ACPI_SIG_STAO           "STAO"	/* Status Override table */
-#define ACPI_SIG_TPM2           "TPM2"	/* Trusted Platform Module 2.0 H/W interface table */
 #define ACPI_SIG_WPBT           "WPBT"	/* Windows Platform Binary Table */
 #define ACPI_SIG_XENV           "XENV"	/* Xen Environment table */
 
@@ -722,36 +722,6 @@ struct acpi_table_stao {
 
 /*******************************************************************************
  *
- * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
- *        Version 3
- *
- * Conforms to "TPM 2.0 Hardware Interface Table (TPM2)" 29 November 2011
- *
- ******************************************************************************/
-
-struct acpi_table_tpm2 {
-	struct acpi_table_header header;	/* Common ACPI table header */
-	u32 flags;
-	u64 control_address;
-	u32 start_method;
-};
-
-/* Control area structure (not part of table, pointed to by control_address) */
-
-struct acpi_tpm2_control {
-	u32 reserved;
-	u32 error;
-	u32 cancel;
-	u32 start;
-	u64 interrupt_control;
-	u32 command_size;
-	u64 command_address;
-	u32 response_size;
-	u64 response_address;
-};
-
-/*******************************************************************************
- *
  * WPBT - Windows Platform Environment Table (ACPI 6.0)
  *        Version 1
  *
-- 
1.7.10


  parent reply	other threads:[~2015-07-01  6:45 UTC|newest]

Thread overview: 118+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-19  3:38 [PATCH 00/32] ACPICA: 20150619 Release Lv Zheng
2015-06-19  3:38 ` [PATCH 01/32] ACPICA: Linuxize: Reduce divergences for 20150616 release Lv Zheng
2015-06-19  3:38 ` [PATCH 02/32] ACPICA: Linuxize: Replace __FUNCTION__ with __func__ Lv Zheng
2015-06-19  3:38 ` [PATCH 03/32] ACPICA: Hardware: Enable 64-bit firmware waking vector for selected FACS Lv Zheng
2015-06-19 23:40   ` Rafael J. Wysocki
2015-06-19 23:46   ` Rafael J. Wysocki
2015-06-23 15:20   ` Rafael J. Wysocki
2015-06-24  0:13     ` Zheng, Lv
2015-06-24  0:30   ` Rafael J. Wysocki
2015-06-24  0:15     ` Zheng, Lv
2015-06-19  3:38 ` [PATCH 04/32] ACPI: sleep: Update acpi_set_firmware_waking_vector() invocations to favor 32-bit firmware waking vector Lv Zheng
2015-06-19  6:26   ` Ingo Molnar
2015-06-19 23:42     ` Rafael J. Wysocki
2015-06-19  3:38 ` [PATCH 06/32] ACPICA: Hardware: Enable firmware waking vector for both 32-bit and 64-bit FACS Lv Zheng
2015-06-19  3:38 ` [PATCH 07/32] ACPICA: Hardware: Cleanup the return values in acpi_set_waking_vector() Lv Zheng
2015-06-19  3:39 ` [PATCH 08/32] ACPICA: Tables: Fix an issue that FACS initialization is performed twice Lv Zheng
2015-06-19  3:39 ` [PATCH 09/32] ACPICA: Tables: Fix an issue that ACPI initialization is blocked due to no FACS Lv Zheng
2015-06-19  3:39 ` [PATCH 10/32] ACPICA: Remove a prototype for the reduced hardware case Lv Zheng
2015-06-19  3:39 ` [PATCH 11/32] ACPICA: Tables: Enable default 64-bit FADT addresses favor Lv Zheng
2015-06-19  3:39 ` [PATCH 12/32] ACPICA: MSVC6: Fix build issue for variable argument macros Lv Zheng
2015-06-19  3:39 ` [PATCH 13/32] ACPICA: EFI: Add EFI interface definitions to eliminate dependency of GNU EFI Lv Zheng
2015-06-19  3:39 ` [PATCH 14/32] ACPICA: Add dragon_fly support to unix file mapping file Lv Zheng
2015-06-19  3:39 ` [PATCH 15/32] ACPICA: Utilities: Add _CLS processing Lv Zheng
2015-06-19  3:40 ` [PATCH 16/32] ACPICA: ACPI 6.0: Add values for MADT GIC version field Lv Zheng
2015-06-19  3:40 ` [PATCH 17/32] ACPICA: Namespace: Add support to allow overriding objects Lv Zheng
2015-06-19  3:40 ` [PATCH 18/32] ACPICA: Namespace: Add support of OSDT table Lv Zheng
2015-06-19  3:40 ` [PATCH 19/32] ACPICA: Namespace: Change namespace override to avoid node deletion Lv Zheng
2015-06-19  3:40 ` [PATCH 20/32] ACPICA: Update for acpi_install_table memory types Lv Zheng
2015-06-19  3:40 ` [PATCH 21/32] ACPICA: Cleanup output for the ASL Debug object Lv Zheng
2015-06-19  3:40 ` [PATCH 22/32] ACPICA: acpidump: Allow customized tables to be dumped without accessing /dev/mem Lv Zheng
2015-06-19  3:40 ` [PATCH 23/32] ACPICA: acpidump: Convert the default behavior to dump from /sys/firmware/acpi/tables Lv Zheng
2015-06-19  3:40 ` [PATCH 24/32] ACPI / acpidump: Update acpidump manual Lv Zheng
2015-06-19  3:41 ` [PATCH 25/32] ACPICA: De-macroize calls to standard C library functions Lv Zheng
2015-06-19  3:41 ` [PATCH 26/32] ACPICA: Clib: Correct memset() declarations Lv Zheng
2015-06-19  3:41 ` [PATCH 27/32] ACPICA: Finish C library name transition Lv Zheng
2015-06-19  3:41 ` [PATCH 28/32] ACPICA: Split C library prototypes to new header Lv Zheng
2015-06-19  3:41 ` [PATCH 29/32] ACPICA: Update definitions for the TCPA and TPM2 ACPI tables Lv Zheng
2015-06-19  3:41 ` [PATCH 30/32] ACPICA: Update TPM2 ACPI table Lv Zheng
2015-06-19  3:41 ` [PATCH 31/32] ACPICA: Comment update, no functional change Lv Zheng
2015-06-19  3:41 ` [PATCH 32/32] ACPICA: Update version to 20150619 Lv Zheng
2015-06-19  3:43 ` [PATCH 05/32] ACPICA: Tables: Enable both 32-bit and 64-bit FACS Lv Zheng
2015-06-24  0:31   ` Rafael J. Wysocki
2015-06-24  0:17     ` Zheng, Lv
2015-06-24  3:01 ` [PATCH v2 00/28] ACPICA: 20150619 Release Lv Zheng
2015-06-24  3:01   ` [PATCH v2 01/28] ACPICA: Linuxize: Reduce divergences for 20150619 release Lv Zheng
2015-06-24  3:02   ` [PATCH v2 02/28] ACPICA: Linuxize: Replace __FUNCTION__ with __func__ Lv Zheng
2015-06-24 12:55     ` Christoph Hellwig
2015-06-25  0:24       ` Zheng, Lv
2015-06-24  3:02   ` [PATCH v2 03/28] ACPICA: Hardware: Enable 64-bit firmware waking vector for selected FACS Lv Zheng
2015-06-24 14:05     ` Rafael J. Wysocki
2015-06-24 23:24       ` Rafael J. Wysocki
2015-06-25  0:29         ` Zheng, Lv
2015-06-26  1:20           ` Rafael J. Wysocki
2015-06-26  1:39             ` Zheng, Lv
2015-06-25  1:09       ` Zheng, Lv
2015-06-24  3:02   ` [PATCH v2 04/28] ACPICA: Tables: Enable both 32-bit and 64-bit FACS Lv Zheng
2015-06-24  3:02   ` [PATCH v2 05/28] ACPICA: Hardware: Enable firmware waking vector for " Lv Zheng
2015-06-24 23:57     ` Rafael J. Wysocki
2015-06-25  0:43       ` Zheng, Lv
2015-06-26  0:44         ` Rafael J. Wysocki
2015-06-26  0:51           ` Zheng, Lv
2015-06-26  1:41             ` Rafael J. Wysocki
2015-06-26  1:41               ` Zheng, Lv
2015-06-24  3:03   ` [PATCH v2 06/28] ACPICA: Hardware: Cleanup the return values in acpi_set_waking_vector() Lv Zheng
2015-06-24  3:03   ` [PATCH v2 07/28] ACPICA: Tables: Fix an issue that FACS initialization is performed twice Lv Zheng
2015-06-24  3:03   ` [PATCH v2 08/28] ACPICA: Tables: Fix an issue that ACPI initialization is blocked due to no FACS Lv Zheng
2015-06-24  3:03   ` [PATCH v2 09/28] ACPICA: Tables: Enable default 64-bit FADT addresses favor Lv Zheng
2015-06-24  3:03   ` [PATCH v2 10/28] ACPICA: MSVC6: Fix build issue for variable argument macros Lv Zheng
2015-06-24  3:03   ` [PATCH v2 11/28] ACPICA: EFI: Add EFI interface definitions to eliminate dependency of GNU EFI Lv Zheng
2015-06-24  3:04   ` [PATCH v2 12/28] ACPICA: Add dragon_fly support to unix file mapping file Lv Zheng
2015-06-24  3:04   ` [PATCH v2 13/28] ACPICA: Utilities: Add _CLS processing Lv Zheng
2015-06-24  3:04   ` [PATCH v2 14/28] ACPICA: ACPI 6.0: Add values for MADT GIC version field Lv Zheng
2015-06-24  3:04   ` [PATCH v2 15/28] ACPICA: Namespace: Add support to allow overriding objects Lv Zheng
2015-06-24  3:04   ` [PATCH v2 16/28] ACPICA: Namespace: Add support of OSDT table Lv Zheng
2015-06-24 19:08     ` Al Stone
2015-06-24 20:02       ` Moore, Robert
2015-06-24  3:04   ` [PATCH v2 17/28] ACPICA: Namespace: Change namespace override to avoid node deletion Lv Zheng
2015-06-24  3:04   ` [PATCH v2 18/28] ACPICA: Update for acpi_install_table memory types Lv Zheng
2015-06-24  3:04   ` [PATCH v2 19/28] ACPICA: Cleanup output for the ASL Debug object Lv Zheng
2015-06-24  3:05   ` [PATCH v2 20/28] ACPICA: acpidump: Allow customized tables to be dumped without accessing /dev/mem Lv Zheng
2015-06-24  3:05   ` [PATCH v2 21/28] ACPICA: acpidump: Convert the default behavior to dump from /sys/firmware/acpi/tables Lv Zheng
2015-06-24  3:05   ` [PATCH v2 22/28] ACPI / acpidump: Update acpidump manual Lv Zheng
2015-06-24  3:05   ` [PATCH v2 23/28] ACPICA: De-macroize calls to standard C library functions Lv Zheng
2015-06-24  3:05   ` [PATCH v2 24/28] ACPICA: Split C library prototypes to new header Lv Zheng
2015-06-24  3:05   ` [PATCH v2 25/28] ACPICA: Update definitions for the TCPA and TPM2 ACPI tables Lv Zheng
2015-06-24  3:05   ` [PATCH v2 26/28] ACPICA: Update TPM2 ACPI table Lv Zheng
2015-06-24  3:05   ` [PATCH v2 27/28] ACPICA: Comment update, no functional change Lv Zheng
2015-06-24  3:05   ` [PATCH v2 28/28] ACPICA: Update version to 20150619 Lv Zheng
2015-07-01  6:42 ` [PATCH v3 00/26] ACPICA: 20150619 Release Lv Zheng
2015-07-01  6:42   ` [PATCH v3 01/26] ACPICA: Linuxize: Reduce divergences for 20150619 release Lv Zheng
2015-07-01  6:42   ` [PATCH v3 02/26] ACPICA: Linuxize: Replace __FUNCTION__ with __func__ Lv Zheng
2015-07-01  6:43   ` [PATCH v3 03/26] ACPICA: Hardware: Enable 64-bit firmware waking vector for selected FACS Lv Zheng
2015-07-01  6:43   ` [PATCH v3 04/26] ACPICA: Tables: Enable both 32-bit and 64-bit FACS Lv Zheng
2015-07-01  6:43   ` [PATCH v3 05/26] ACPICA: Hardware: Enable firmware waking vector for " Lv Zheng
2015-07-01  6:43   ` [PATCH v3 06/26] ACPICA: Tables: Fix an issue that FACS initialization is performed twice Lv Zheng
2015-07-01  6:43   ` [PATCH v3 07/26] ACPICA: Tables: Enable default 64-bit FADT addresses favor Lv Zheng
2015-07-01  6:43   ` [PATCH v3 08/26] ACPICA: MSVC6: Fix build issue for variable argument macros Lv Zheng
2015-07-01  6:43   ` [PATCH v3 09/26] ACPICA: EFI: Add EFI interface definitions to eliminate dependency of GNU EFI Lv Zheng
2015-07-01  6:43   ` [PATCH v3 10/26] ACPICA: Add dragon_fly support to unix file mapping file Lv Zheng
2015-07-01  6:44   ` [PATCH v3 11/26] ACPICA: Utilities: Add _CLS processing Lv Zheng
2015-07-01  6:44   ` [PATCH v3 12/26] ACPICA: ACPI 6.0: Add values for MADT GIC version field Lv Zheng
2015-07-01  6:44   ` [PATCH v3 13/26] ACPICA: Namespace: Add support to allow overriding objects Lv Zheng
2015-07-01  6:44   ` [PATCH v3 14/26] ACPICA: Namespace: Add support of OSDT table Lv Zheng
2015-07-01  6:44   ` [PATCH v3 15/26] ACPICA: Namespace: Change namespace override to avoid node deletion Lv Zheng
2015-07-01  6:44   ` [PATCH v3 16/26] ACPICA: Update for acpi_install_table memory types Lv Zheng
2015-07-01  6:44   ` [PATCH v3 17/26] ACPICA: Cleanup output for the ASL Debug object Lv Zheng
2015-07-01  6:44   ` [PATCH v3 18/26] ACPICA: acpidump: Allow customized tables to be dumped without accessing /dev/mem Lv Zheng
2015-07-01  6:44   ` [PATCH v3 19/26] ACPICA: acpidump: Convert the default behavior to dump from /sys/firmware/acpi/tables Lv Zheng
2015-07-01  6:45   ` [PATCH v3 20/26] ACPI / acpidump: Update acpidump manual Lv Zheng
2015-07-01  6:45   ` [PATCH v3 21/26] ACPICA: De-macroize calls to standard C library functions Lv Zheng
2015-07-01  6:45   ` [PATCH v3 22/26] ACPICA: Split C library prototypes to new header Lv Zheng
2015-07-01  6:45   ` Lv Zheng [this message]
2015-07-01  6:45   ` [PATCH v3 24/26] ACPICA: Update TPM2 ACPI table Lv Zheng
2015-07-01  6:45   ` [PATCH v3 25/26] ACPICA: Comment update, no functional change Lv Zheng
2015-07-01  6:45   ` [PATCH v3 26/26] ACPICA: Update version to 20150619 Lv Zheng
2015-07-01 23:14   ` [PATCH v3 00/26] ACPICA: 20150619 Release Rafael J. Wysocki
2015-07-02  6:10     ` Zheng, Lv
2015-07-02 20:00       ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7669b04226824fc8c3a9ebaa38fcbbbacbd59e6d.1435731597.git.lv.zheng@intel.com \
    --to=lv.zheng@intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=robert.moore@intel.com \
    --cc=zetalog@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®