Amol N Sukerkar has uploaded this change for review.

View Change

src/arch/x86: Enabled support for dsdt.aml

This change enables vboot Stage Verification support for dsdt.aml
ACPI table.

BRANCH=none

TEST=Create a coreboot.rom image by enabling CONFIG_VBOOT_STAGE_VERIFICATION
and CONFIG_VBOOT. Verify that the image boots to authenticated payload
and graphics is displayed via HDMI and Display Port.

Change-Id: I971ed8ed28cdb6355d342793ae6bb3d754939c21
Signed-off-by: Sukerkar, Amol N <amol.n.sukerkar@intel.com>
---
M src/arch/x86/acpi.c
1 file changed, 33 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/58/32158/1
diff --git a/src/arch/x86/acpi.c b/src/arch/x86/acpi.c
index f08a401..d129261 100644
--- a/src/arch/x86/acpi.c
+++ b/src/arch/x86/acpi.c
@@ -9,6 +9,7 @@
* Copyright (C) 2015 Timothy Pearson <tpearson@raptorengineeringinc.com>,
* Raptor Engineering
* Copyright (C) 2016-2019 Siemens AG
+ * Copyright (C) 2019 Intel Corp.
*
* ACPI FADT, FACS, and DSDT table support added by
* Nick Barker <nick.barker9@btinternet.com>, and those portions
@@ -1110,6 +1111,34 @@
return 0;
}

+/* This is marked as weak so some verification mechanism can
+ * use it to verify after loading into DRAM. Primarily
+ * overriden by VBOOT mechanism.
+ */
+void __weak verify_stage_if_required(const struct region_device *rdev,
+ const char * name)
+{
+ /* no op */
+}
+
+/* This is wrapper for acpi table to be verified, if required */
+static void verify_acpi_table(const char *name)
+{
+ const struct region_device *rdev = NULL;
+ struct prog file = PROG_INIT(PROG_UNKNOWN, name);
+
+ if (prog_locate(&file)) {
+ printk (BIOS_ERR, "ERROR: Unable to locate %s\n", prog_name(&file));
+ return;
+ }
+
+ rdev = &file.rdev;
+
+ /* verify if required */
+ verify_stage_if_required(rdev, prog_name(&file));
+}
+
+
unsigned long write_acpi_tables(unsigned long start)
{
unsigned long current;
@@ -1228,6 +1257,10 @@
current = acpi_align_current(current);

acpi_create_fadt(fadt, facs, dsdt);
+
+ /* verify DSDT ACPI table */
+ verify_acpi_table(CONFIG_CBFS_PREFIX "/dsdt.aml");
+
acpi_add_table(rsdp, fadt);

if (slic_file) {

To view, visit change 32158. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I971ed8ed28cdb6355d342793ae6bb3d754939c21
Gerrit-Change-Number: 32158
Gerrit-PatchSet: 1
Gerrit-Owner: Amol N Sukerkar <amol.n.sukerkar@intel.com>
Gerrit-MessageType: newchange