summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2021-06-15 13:46:26 +0200
committerPaul Fagerburg <pfagerburg@chromium.org>2021-08-02 14:59:52 +0000
commit6672dff0887678fb2f36663d0175d9a88f3de72f (patch)
tree6e6f25c1c9722f17a8e43b1ad91c82308e5c28e1 /src/soc/intel
parent863efe45459a836bcb1115901e832d0a41e0b433 (diff)
soc/intel/broadwell: Drop helper functions
Done for consistency with Haswell in order to ease unification. Change-Id: I445f086cfcb65a6001ced3326fb9f25a4188b888 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55527 Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/broadwell/acpi.c10
-rw-r--r--src/soc/intel/broadwell/include/soc/systemagent.h3
-rw-r--r--src/soc/intel/broadwell/northbridge.c14
3 files changed, 8 insertions, 19 deletions
diff --git a/src/soc/intel/broadwell/acpi.c b/src/soc/intel/broadwell/acpi.c
index 5d3992c0a0..67b193e1f7 100644
--- a/src/soc/intel/broadwell/acpi.c
+++ b/src/soc/intel/broadwell/acpi.c
@@ -7,6 +7,7 @@
#include <cpu/intel/haswell/haswell.h>
#include <device/pci_ops.h>
#include <console/console.h>
+#include <device/device.h>
#include <types.h>
#include <cpu/x86/msr.h>
#include <cpu/intel/turbo.h>
@@ -69,8 +70,13 @@ static unsigned long acpi_fill_dmar(unsigned long current)
if (emit_igd) {
const unsigned long tmp = current;
- current += acpi_create_dmar_rmrr(current, 0,
- sa_get_gsm_base(), sa_get_tolud_base() - 1);
+ const struct device *sa_dev = pcidev_on_root(0, 0);
+
+ /* Bit 0 is lock bit, not part of address */
+ const u32 tolud = pci_read_config32(sa_dev, TOLUD) & ~1;
+ const u32 bgsm = pci_read_config32(sa_dev, BGSM) & ~1;
+
+ current += acpi_create_dmar_rmrr(current, 0, bgsm, tolud - 1);
current += acpi_create_dmar_ds_pci(current, 0, 2, 0);
acpi_dmar_rmrr_fixup(tmp, current);
}
diff --git a/src/soc/intel/broadwell/include/soc/systemagent.h b/src/soc/intel/broadwell/include/soc/systemagent.h
index 331bbc7ca3..0230f5f4e5 100644
--- a/src/soc/intel/broadwell/include/soc/systemagent.h
+++ b/src/soc/intel/broadwell/include/soc/systemagent.h
@@ -135,7 +135,4 @@
/* System Agent identification */
u8 systemagent_revision(void);
-uintptr_t sa_get_tolud_base(void);
-uintptr_t sa_get_gsm_base(void);
-
#endif
diff --git a/src/soc/intel/broadwell/northbridge.c b/src/soc/intel/broadwell/northbridge.c
index 838b41b953..623ab70887 100644
--- a/src/soc/intel/broadwell/northbridge.c
+++ b/src/soc/intel/broadwell/northbridge.c
@@ -21,20 +21,6 @@ u8 systemagent_revision(void)
return pci_read_config8(sa_dev, PCI_REVISION_ID);
}
-uintptr_t sa_get_tolud_base(void)
-{
- struct device *sa_dev = pcidev_path_on_root(SA_DEVFN_ROOT);
- /* Bit 0 is lock bit, not part of address */
- return pci_read_config32(sa_dev, TOLUD) & ~1;
-}
-
-uintptr_t sa_get_gsm_base(void)
-{
- struct device *sa_dev = pcidev_path_on_root(SA_DEVFN_ROOT);
- /* Bit 0 is lock bit, not part of address */
- return pci_read_config32(sa_dev, BGSM) & ~1;
-}
-
static int get_pcie_bar(struct device *dev, unsigned int index, u32 *base,
u32 *len)
{