[PATCH] acpi: tpm2: Add additional start method values
Jeffrey Hugo
jhugo at codeaurora.org
Mon Jun 19 16:49:52 UTC 2017
The TCG ACPI Spec v1.2 defines start method 11 as ARM Secure Monitor Call.
9 and 10 are also defined as vendor specific. Start method 11 has required
parameters, so ensure the table is atleast long enough to contain those.
Signed-off-by: Jeffrey Hugo <jhugo at codeaurora.org>
---
src/acpi/tpm2/tpm2.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/acpi/tpm2/tpm2.c b/src/acpi/tpm2/tpm2.c
index aa58a39..2662646 100644
--- a/src/acpi/tpm2/tpm2.c
+++ b/src/acpi/tpm2/tpm2.c
@@ -70,11 +70,11 @@ static int tpm2_test1(fwts_framework *fw)
"0x%4.4" PRIx16 " instead", tpm2->reserved);
}
- if (tpm2->start_method < 1 || tpm2->start_method >= 9) {
+ if (tpm2->start_method < 1 || tpm2->start_method >= 12) {
passed = false;
fwts_failed(fw, LOG_LEVEL_HIGH,
"TPM2BadStartMethod",
- "TPM2's Start Method must be between one to eight, got 0x%" PRIx16,
+ "TPM2's Start Method must be between one to eleven, got 0x%" PRIx16,
tpm2->start_method);
}
@@ -87,6 +87,15 @@ static int tpm2_test1(fwts_framework *fw)
(uint32_t) table->length);
}
+ if (tpm2->start_method == 11 && table->length < sizeof(fwts_acpi_table_tpm2) + 12) {
+ passed = false;
+ fwts_failed(fw, LOG_LEVEL_HIGH,
+ "TPM2BadPlatformParameters",
+ "Table length must be atleast 0x%" PRIx32 " if Start method equals 11, got 0x%" PRIx32,
+ (uint32_t) sizeof(fwts_acpi_table_tpm2) + 12,
+ (uint32_t) table->length);
+ }
+
if (passed)
fwts_passed(fw, "No issues found in TPM2 table.");
--
Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
More information about the fwts-devel
mailing list