Jonathan Neuschäfer has posted comments on this change. ( https://review.coreboot.org/28676 )
Change subject: include/device/pnp.h: Don't use device_t
......................................................................
Patch Set 3: Code-Review+2
Looks good to me
--
To view, visit https://review.coreboot.org/28676
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I9364c9681dd89f09480368a997f6d1f04cde1488
Gerrit-Change-Number: 28676
Gerrit-PatchSet: 3
Gerrit-Owner: Elyes HAOUAS <ehaouas(a)noos.fr>
Gerrit-Reviewer: Jonathan Neuschäfer <j.neuschaefer(a)gmx.net>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Thu, 20 Sep 2018 14:03:12 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: Yes
Jonathan Neuschäfer has posted comments on this change. ( https://review.coreboot.org/28691 )
Change subject: arch/riscv/include/arch: Don't use device_t
......................................................................
Patch Set 2:
> Build Failed
>
> https://qa.coreboot.org/job/coreboot-gerrit/79580/ : FAILURE
>
> https://qa.coreboot.org/job/coreboot-checkpatch/33295/ : SUCCESS
> ERROR: Issue with creating launcher for agent terribleder. The agent is being disconnected
Jenkins seems to be broken at the moment
--
To view, visit https://review.coreboot.org/28691
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If52de0d87b02419090b29a7cf1952905d3f975f6
Gerrit-Change-Number: 28691
Gerrit-PatchSet: 2
Gerrit-Owner: Elyes HAOUAS <ehaouas(a)noos.fr>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Jonathan Neuschäfer <j.neuschaefer(a)gmx.net>
Gerrit-Comment-Date: Thu, 20 Sep 2018 13:30:58 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No
Philipp Deppenwiese has submitted this change and it was merged. ( https://review.coreboot.org/28672 )
Change subject: soc/intel/fsp_broadwell_de: Add fixed VT-d MMIO range to the resources
......................................................................
soc/intel/fsp_broadwell_de: Add fixed VT-d MMIO range to the resources
FSP initializes the VT-d feature on Broadwell-DE and assigns an address
space to the MMIO range. coreboot's resource allocator needs to be aware
of this fixed resource as otherwise the address can be assigned to a
different PCI device. In this case addresses are overlapped and the VT-d
range is not accessible any more.
To deal with it the right way add a fixed MMIO resource to the resources
list if VT-d BAR is enabled.
TEST=Booted into Linux and checked coreboot log for resource assignment.
Change-Id: I626ac17420eadc0b49031e850f0f40b3b221a098
Signed-off-by: Werner Zeh <werner.zeh(a)siemens.com>
Reviewed-on: https://review.coreboot.org/28672
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Nico Huber <nico.h(a)gmx.de>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com>
---
M src/soc/intel/fsp_broadwell_de/include/soc/broadwell_de.h
M src/soc/intel/fsp_broadwell_de/vtd.c
2 files changed, 17 insertions(+), 2 deletions(-)
Approvals:
build bot (Jenkins): Verified
Nico Huber: Looks good to me, approved
Philipp Deppenwiese: Looks good to me, approved
diff --git a/src/soc/intel/fsp_broadwell_de/include/soc/broadwell_de.h b/src/soc/intel/fsp_broadwell_de/include/soc/broadwell_de.h
index 50a4022..edfeafc 100644
--- a/src/soc/intel/fsp_broadwell_de/include/soc/broadwell_de.h
+++ b/src/soc/intel/fsp_broadwell_de/include/soc/broadwell_de.h
@@ -3,7 +3,7 @@
*
* Copyright (C) 2013 Google, Inc.
* Copyright (C) 2015-2016 Intel Corp.
- * Copyright (C) 2017 Siemens AG
+ * Copyright (C) 2017-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
@@ -21,6 +21,7 @@
#define VTBAR_OFFSET 0x180
#define VTBAR_MASK 0xffffe000
#define VTBAR_ENABLED 0x01
+#define VTBAR_SIZE 0x2000
#define SMM_FEATURE_CONTROL 0x58
#define SMM_CPU_SAVE_EN (1 << 1)
diff --git a/src/soc/intel/fsp_broadwell_de/vtd.c b/src/soc/intel/fsp_broadwell_de/vtd.c
index ad4a056..e584cfa 100644
--- a/src/soc/intel/fsp_broadwell_de/vtd.c
+++ b/src/soc/intel/fsp_broadwell_de/vtd.c
@@ -17,10 +17,24 @@
#include <device/pci_ids.h>
#include <soc/pci_devs.h>
#include <soc/acpi.h>
+#include <soc/broadwell_de.h>
+static void vtd_read_resources(struct device *dev)
+{
+ uint32_t vtbar;
+
+ /* Add fixed MMIO resource for VT-d which was set up by the FSP. */
+ vtbar = pci_read_config32(dev, VTBAR_OFFSET);
+ if (vtbar & VTBAR_ENABLED) {
+ mmio_resource(dev, VTBAR_OFFSET,
+ (vtbar & VTBAR_MASK) / KiB, VTBAR_SIZE / KiB);
+ }
+}
+
static struct device_operations vtd_ops = {
- .write_acpi_tables = vtd_write_acpi_tables,
+ .read_resources = vtd_read_resources,
+ .write_acpi_tables = vtd_write_acpi_tables,
};
static const struct pci_driver vtd_driver __pci_driver = {
--
To view, visit https://review.coreboot.org/28672
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I626ac17420eadc0b49031e850f0f40b3b221a098
Gerrit-Change-Number: 28672
Gerrit-PatchSet: 5
Gerrit-Owner: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Mario Scheithauer <mario.scheithauer(a)siemens.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com>
Gerrit-Reviewer: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Philipp Deppenwiese has posted comments on this change. ( https://review.coreboot.org/28672 )
Change subject: soc/intel/fsp_broadwell_de: Add fixed VT-d MMIO range to the resources
......................................................................
Patch Set 4: Code-Review+2
--
To view, visit https://review.coreboot.org/28672
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I626ac17420eadc0b49031e850f0f40b3b221a098
Gerrit-Change-Number: 28672
Gerrit-PatchSet: 4
Gerrit-Owner: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Mario Scheithauer <mario.scheithauer(a)siemens.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com>
Gerrit-Reviewer: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Thu, 20 Sep 2018 12:38:47 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: Yes
Philipp Deppenwiese has submitted this change and it was merged. ( https://review.coreboot.org/28671 )
Change subject: fsp_broadwell_de: Move DMAR table generation to corresponding VT-d device
......................................................................
fsp_broadwell_de: Move DMAR table generation to corresponding VT-d device
The DMAR table generation depends on the VT-d feature which is
implemented in its own PCI device located in PCI:00:05.0 for
Broadwell-DE. Add a new PCI driver for this device and move
DMAR table generation to this device driver.
Change-Id: I103257c73f5e745e996a441a2535b885270bc204
Signed-off-by: Werner Zeh <werner.zeh(a)siemens.com>
Reviewed-on: https://review.coreboot.org/28671
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Nico Huber <nico.h(a)gmx.de>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com>
---
M src/soc/intel/fsp_broadwell_de/Makefile.inc
M src/soc/intel/fsp_broadwell_de/acpi.c
M src/soc/intel/fsp_broadwell_de/include/soc/acpi.h
M src/soc/intel/fsp_broadwell_de/include/soc/broadwell_de.h
M src/soc/intel/fsp_broadwell_de/northcluster.c
A src/soc/intel/fsp_broadwell_de/vtd.c
6 files changed, 40 insertions(+), 10 deletions(-)
Approvals:
build bot (Jenkins): Verified
Nico Huber: Looks good to me, approved
Philipp Deppenwiese: Looks good to me, approved
diff --git a/src/soc/intel/fsp_broadwell_de/Makefile.inc b/src/soc/intel/fsp_broadwell_de/Makefile.inc
index 386adc1..9312663 100644
--- a/src/soc/intel/fsp_broadwell_de/Makefile.inc
+++ b/src/soc/intel/fsp_broadwell_de/Makefile.inc
@@ -34,6 +34,7 @@
ramstage-y += iou_complto.c
ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smmrelocate.c
ramstage-$(CONFIG_HAVE_SMI_HANDLER) += pmutil.c
+ramstage-y += vtd.c
smm-$(CONFIG_HAVE_SMI_HANDLER) += pmutil.c
smm-$(CONFIG_HAVE_SMI_HANDLER) += smihandler.c
smm-$(CONFIG_HAVE_SMI_HANDLER) += tsc_freq.c
diff --git a/src/soc/intel/fsp_broadwell_de/acpi.c b/src/soc/intel/fsp_broadwell_de/acpi.c
index 5d65477..9c3cae0 100644
--- a/src/soc/intel/fsp_broadwell_de/acpi.c
+++ b/src/soc/intel/fsp_broadwell_de/acpi.c
@@ -4,7 +4,7 @@
* Copyright (C) 2007-2009 coresystems GmbH
* Copyright (C) 2013 Google Inc.
* Copyright (C) 2015-2016 Intel Corp.
- * Copyright (C) 2016 Siemens AG
+ * Copyright (C) 2016-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
@@ -390,15 +390,14 @@
return current;
}
-unsigned long northcluster_write_acpi_tables(struct device *const dev,
+unsigned long vtd_write_acpi_tables(struct device *const dev,
unsigned long current,
struct acpi_rsdp *const rsdp)
{
acpi_dmar_t *const dmar = (acpi_dmar_t *)current;
- struct device *vtdev = dev_find_slot(0, PCI_DEVFN(5, 0));
/* Create DMAR table only if virtualization is enabled */
- if (!(pci_read_config32(vtdev, 0x180) & 0x01))
+ if (!(pci_read_config32(dev, VTBAR_OFFSET) & VTBAR_ENABLED))
return current;
printk(BIOS_DEBUG, "ACPI: * DMAR\n");
diff --git a/src/soc/intel/fsp_broadwell_de/include/soc/acpi.h b/src/soc/intel/fsp_broadwell_de/include/soc/acpi.h
index da552cc..da30252 100644
--- a/src/soc/intel/fsp_broadwell_de/include/soc/acpi.h
+++ b/src/soc/intel/fsp_broadwell_de/include/soc/acpi.h
@@ -3,7 +3,7 @@
*
* Copyright (C) 2013 Google, Inc.
* Copyright (C) 2015-2016 Intel Corp.
- * Copyright (C) 2016 Siemens AG
+ * Copyright (C) 2016-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
@@ -24,8 +24,8 @@
void acpi_fill_in_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt);
unsigned long acpi_madt_irq_overrides(unsigned long current);
uint16_t get_pmbase(void);
-unsigned long northcluster_write_acpi_tables(struct device *const dev,
- unsigned long current,
- struct acpi_rsdp *const rsdp);
+unsigned long vtd_write_acpi_tables(struct device *const dev,
+ unsigned long current,
+ struct acpi_rsdp *const rsdp);
#endif /* _SOC_ACPI_H_ */
diff --git a/src/soc/intel/fsp_broadwell_de/include/soc/broadwell_de.h b/src/soc/intel/fsp_broadwell_de/include/soc/broadwell_de.h
index dc1ec19..50a4022 100644
--- a/src/soc/intel/fsp_broadwell_de/include/soc/broadwell_de.h
+++ b/src/soc/intel/fsp_broadwell_de/include/soc/broadwell_de.h
@@ -20,6 +20,7 @@
#define VTBAR_OFFSET 0x180
#define VTBAR_MASK 0xffffe000
+#define VTBAR_ENABLED 0x01
#define SMM_FEATURE_CONTROL 0x58
#define SMM_CPU_SAVE_EN (1 << 1)
diff --git a/src/soc/intel/fsp_broadwell_de/northcluster.c b/src/soc/intel/fsp_broadwell_de/northcluster.c
index 7090370..2e27d37 100644
--- a/src/soc/intel/fsp_broadwell_de/northcluster.c
+++ b/src/soc/intel/fsp_broadwell_de/northcluster.c
@@ -3,7 +3,7 @@
*
* Copyright (C) 2013 Google Inc.
* Copyright (C) 2015-2016 Intel Corp.
- * Copyright (C) 2016 Siemens AG
+ * Copyright (C) 2016-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
@@ -137,7 +137,6 @@
static struct device_operations nc_ops = {
.read_resources = nc_read_resources,
.acpi_fill_ssdt_generator = generate_cpu_entries,
- .write_acpi_tables = northcluster_write_acpi_tables,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = NULL,
diff --git a/src/soc/intel/fsp_broadwell_de/vtd.c b/src/soc/intel/fsp_broadwell_de/vtd.c
new file mode 100644
index 0000000..ad4a056
--- /dev/null
+++ b/src/soc/intel/fsp_broadwell_de/vtd.c
@@ -0,0 +1,30 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * 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
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <device/pci.h>
+#include <device/pci_ids.h>
+#include <soc/pci_devs.h>
+#include <soc/acpi.h>
+
+
+static struct device_operations vtd_ops = {
+ .write_acpi_tables = vtd_write_acpi_tables,
+};
+
+static const struct pci_driver vtd_driver __pci_driver = {
+ .ops = &vtd_ops,
+ .vendor = PCI_VENDOR_ID_INTEL,
+ .device = VTD_DEVID,
+};
--
To view, visit https://review.coreboot.org/28671
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I103257c73f5e745e996a441a2535b885270bc204
Gerrit-Change-Number: 28671
Gerrit-PatchSet: 5
Gerrit-Owner: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Mario Scheithauer <mario.scheithauer(a)siemens.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com>
Gerrit-Reviewer: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>