Werner Zeh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30989
Change subject: intelblocks/systemagent: Add ACPI table generation hook ......................................................................
intelblocks/systemagent: Add ACPI table generation hook
In preparation of generating DMAR tables provide the hook in SoC-scope for the systemagent to write ACPI tables. The complete functionality is SoC-specific. Therefore event the entry hook is defined as a weak-function which can be overridden by SoC-code. If the SoC does not have support for generating DMAR tables this hook will make no harm.
Change-Id: I1333ae2b79f1a855e6f3bb39bf534da170ddc9e1 Signed-off-by: Werner Zeh werner.zeh@siemens.com --- M src/soc/intel/common/block/include/intelblocks/acpi.h M src/soc/intel/common/block/systemagent/systemagent.c 2 files changed, 21 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/30989/1
diff --git a/src/soc/intel/common/block/include/intelblocks/acpi.h b/src/soc/intel/common/block/include/intelblocks/acpi.h index 6b1b9bd..671aabb 100644 --- a/src/soc/intel/common/block/include/intelblocks/acpi.h +++ b/src/soc/intel/common/block/include/intelblocks/acpi.h @@ -2,7 +2,7 @@ * This file is part of the coreboot project. * * Copyright (C) 2017 Intel Corp. - * Copyright (C) 2017 Siemens AG + * Copyright (C) 2018 Siemens AG * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -75,6 +75,11 @@ /* Chipset specific settings for filling up fadt table */ void soc_fill_fadt(acpi_fadt_t *fadt);
+/* Chipset specific settings for filling up dmar table */ +unsigned long sa_write_acpi_tables(struct device *const dev, + unsigned long current, + struct acpi_rsdp *const rsdp); + /* Return the polarity flag for SCI IRQ */ int soc_madt_sci_irq_polarity(int sci);
diff --git a/src/soc/intel/common/block/systemagent/systemagent.c b/src/soc/intel/common/block/systemagent/systemagent.c index 9608359..7552afe 100644 --- a/src/soc/intel/common/block/systemagent/systemagent.c +++ b/src/soc/intel/common/block/systemagent/systemagent.c @@ -2,6 +2,7 @@ * This file is part of the coreboot project. * * Copyright (C) 2017-2018 Intel Corporation. + * Copyright (C) 2018 Siemens AG * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,9 +20,9 @@ #include <device/pci.h> #include <device/pci_ids.h> #include <intelblocks/systemagent.h> +#include <intelblocks/acpi.h> #include <soc/iomap.h> #include <soc/pci_devs.h> -#include <soc/systemagent.h> #include "systemagent_def.h"
/* SoC override function */ @@ -48,6 +49,13 @@ return 0; }
+__weak unsigned long sa_write_acpi_tables(struct device *const dev, + unsigned long current, + struct acpi_rsdp *const rsdp) +{ + return current; +} + /* * Add all known fixed MMIO ranges that hang off the host bridge/memory * controller device. @@ -278,11 +286,12 @@ }
static struct device_operations systemagent_ops = { - .read_resources = &systemagent_read_resources, - .set_resources = &pci_dev_set_resources, - .enable_resources = &pci_dev_enable_resources, - .init = soc_systemagent_init, - .ops_pci = &pci_dev_ops_pci, + .read_resources = &systemagent_read_resources, + .set_resources = &pci_dev_set_resources, + .enable_resources = &pci_dev_enable_resources, + .init = soc_systemagent_init, + .ops_pci = &pci_dev_ops_pci, + .write_acpi_tables = sa_write_acpi_tables, };
static const unsigned short systemagent_ids[] = {