From cf8252ca7ca76fa47acf29b717bd52b738538c1e Mon Sep 17 00:00:00 2001 From: Jiandi An Date: Fri, 24 Mar 2017 04:55:44 -0500 Subject: ACPICA: Update TPM2 ACPI table TCG ACPI Specification Family "1.2" and "2.0" Version 1.2 Revision 8 introduces new start method for ARM SMC. - Add new start method (type 11) for ARM SMC - Add start method specific parameters offset for ARM SMC start method Signed-off-by: Jiandi An Tested-by: Shanker Donthineni Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen (on x86/PTT) Signed-off-by: Jarkko Sakkinen --- include/acpi/actbl2.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/acpi') diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 7aee9fb3bd1f..2b4af0769a28 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -1294,6 +1294,9 @@ struct acpi_table_tpm2 { #define ACPI_TPM2_MEMORY_MAPPED 6 #define ACPI_TPM2_COMMAND_BUFFER 7 #define ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD 8 +#define ACPI_TPM2_COMMAND_BUFFER_WITH_SMC 11 + +#define ACPI_TPM2_START_METHOD_PARAMETER_OFFSET 52 /******************************************************************************* * -- cgit v1.2.3-58-ga151 From 3b395d67d9d6c20d142f6a1618c44577d3d79347 Mon Sep 17 00:00:00 2001 From: Jarkko Sakkinen Date: Wed, 5 Apr 2017 14:07:24 +0300 Subject: tpm_crb: remove a cruft constant Remove a useless constant that slipped through me when I did the code review. This commit fixes the issue. Cc: Jiandi An Fixes: 69c558de63c7 ("tpm/tpm_crb: Enable TPM CRB interface for ARM64") Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm_crb.c | 3 +-- include/acpi/actbl2.h | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'include/acpi') diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c index 72b03c328198..b917b9d5f710 100644 --- a/drivers/char/tpm/tpm_crb.c +++ b/drivers/char/tpm/tpm_crb.c @@ -572,8 +572,7 @@ static int crb_acpi_add(struct acpi_device *device) ACPI_TPM2_COMMAND_BUFFER_WITH_SMC); return -EINVAL; } - crb_smc = ACPI_ADD_PTR(struct tpm2_crb_smc, buf, - ACPI_TPM2_START_METHOD_PARAMETER_OFFSET); + crb_smc = ACPI_ADD_PTR(struct tpm2_crb_smc, buf, sizeof(*buf)); priv->smc_func_id = crb_smc->smc_func_id; priv->flags |= CRB_FL_CRB_SMC_START; } diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 2b4af0769a28..0ff3c64ce924 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -1296,8 +1296,6 @@ struct acpi_table_tpm2 { #define ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD 8 #define ACPI_TPM2_COMMAND_BUFFER_WITH_SMC 11 -#define ACPI_TPM2_START_METHOD_PARAMETER_OFFSET 52 - /******************************************************************************* * * UEFI - UEFI Boot optimization Table -- cgit v1.2.3-58-ga151