ACK: [PATCH] acpi: tpm2: Add additional start method values
Alex Hung
alex.hung at canonical.com
Mon Jun 19 18:22:43 UTC 2017
On 2017-06-19 09:49 AM, Jeffrey Hugo wrote:
> 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.");
>
>
The spec I was able to find is available @
https://trustedcomputinggroup.org/wp-content/uploads/TCG_ACPIGeneralSpecification-Family-1.2-and-2.0-Ver1.2-Rev8_public-revie....pdf
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list