acpi: Set TPM2 LAML to actual log area size
PATCH 1/1 acpi: Set TPM2 LAML to actual log area size
The LAML field should follow the TCG PFP specification:
The TCG ACPI specification uses the field name "Log Area Minimum Length", but the field value is the actual log area length reserved by Platform Firmware, not a lower bound.
--- tools/libacpi/build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libacpi/build.c +1 -1
@@ -473,7 +473,7 @@ static int construct_secondary_tables(struct acpi_ctxt *ctxt, tpm2->platform_class =TPM2_ACPI_CLASS_CLIENT ; tpm2->control_area_address =TPM_CRB_CTRL_REQ ; tpm2->start_method =TPM2_START_METHOD_CRB ; - tpm2->log_area_minimum_length =TPM_LOG_AREA_MINIMUM_SIZE ; + tpm2->log_area_minimum_length =TPM_LOG_SIZE ; tpm2->log_area_start_address =TPM_LOG_AREA_ADDRESS ; set_checksum(tpm2,
Signature · 10 lines
2.43.0 -- Ngoc Tu Dinh | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech
Quoted 16 lines · Tu Dinh
The LAML field should follow the TCG PFP specification:
The TCG ACPI specification uses the field name "Log Area Minimum Length", but the field value is the actual log area length reserved by Platform Firmware, not a lower bound.
Signed-off-by Tu Dinh <[email protected]>--- tools/libacpi/build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/libacpi/build.c +0
-0
tools/libacpi/build.c static int construct_secondary_tables(struct acpi_ctxt *ctxt, · line 476
Quoted 5 lines
tools/libacpi/build.c +1
-1@@ -473,7 +473,7 @@ static int construct_secondary_tables(struct acpi_ctxt *ctxt, tpm2->platform_class =TPM2_ACPI_CLASS_CLIENT ; tpm2->control_area_address =TPM_CRB_CTRL_REQ ; tpm2->start_method =TPM2_START_METHOD_CRB ; - tpm2->log_area_minimum_length =TPM_LOG_AREA_MINIMUM_SIZE ; + tpm2->log_area_minimum_length =TPM_LOG_SIZE ;
These happen to be the same number, but in making this change TPM_LOG_AREA_MINIMUM_SIZE becomes unused.
I suggest we delete the constant while at it. I don't think anything good can come from having two of them.
Also, as it's no functional change, this is content for 4.22 I presume?
~Andrew
Quoted 26 lines · Andrew Cooper
Quoted 16 lines · Tu Dinh
The LAML field should follow the TCG PFP specification:
The TCG ACPI specification uses the field name "Log Area Minimum Length", but the field value is the actual log area length reserved by Platform Firmware, not a lower bound.
Signed-off-by Tu Dinh <[email protected]>--- tools/libacpi/build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/libacpi/build.c +0
-0tools/libacpi/build.c static int construct_secondary_tables(struct acpi_ctxt *ctxt, · line 476
Quoted 5 lines
tools/libacpi/build.c +1
-1@@ -473,7 +473,7 @@ static int construct_secondary_tables(struct acpi_ctxt *ctxt, tpm2->platform_class =TPM2_ACPI_CLASS_CLIENT ; tpm2->control_area_address =TPM_CRB_CTRL_REQ ; tpm2->start_method =TPM2_START_METHOD_CRB ; - tpm2->log_area_minimum_length =TPM_LOG_AREA_MINIMUM_SIZE ; + tpm2->log_area_minimum_length =TPM_LOG_SIZE ;These happen to be the same number, but in making this change
TPM_LOG_AREA_MINIMUM_SIZEbecomes unused.
Quoted 2 lines
I suggest we delete the constant while at it. I don't think anything good can come from having two of them.
Agreed.
Quoted 2 lines
Also, as it's no functional change, this is content for 4.22 I presume?
Yes, it's for 4.22.
Quoted 3 lines
~Andrew
--
Ngoc Tu Dinh | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech