提交 7f061e0d 编写于 作者: S Simon Glass 提交者: Bin Meng

x86: acpi: Include the TPMv1 table only if needed

This table is not needed if a v2 TPM is in use. Add a condition to avoid
adding it when not needed.
Signed-off-by: NSimon Glass <sjg@chromium.org>
Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
上级 1da448bb
......@@ -646,14 +646,17 @@ ulong write_acpi_tables(ulong start_addr)
acpi_inc_align(ctx, madt->header.length);
acpi_add_table(ctx, madt);
debug("ACPI: * TCPA\n");
tcpa = (struct acpi_tcpa *)ctx->current;
ret = acpi_create_tcpa(tcpa);
if (ret) {
log_warning("Failed to create TCPA table (err=%d)\n", ret);
} else {
acpi_inc_align(ctx, tcpa->header.length);
acpi_add_table(ctx, tcpa);
if (IS_ENABLED(CONFIG_TPM_V1)) {
debug("ACPI: * TCPA\n");
tcpa = (struct acpi_tcpa *)ctx->current;
ret = acpi_create_tcpa(tcpa);
if (ret) {
log_warning("Failed to create TCPA table (err=%d)\n",
ret);
} else {
acpi_inc_align(ctx, tcpa->header.length);
acpi_add_table(ctx, tcpa);
}
}
debug("ACPI: * CSRT\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册