summaryrefslogtreecommitdiff
path: root/src/northbridge
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2019-08-12 09:41:42 +0200
committerArthur Heymans <arthur@aheymans.xyz>2019-08-13 10:50:27 +0000
commit15063e8819f2f218033a3b43cbc73963634ff145 (patch)
tree23aa24e42e3bdd83337777253b3d07374b7d3f69 /src/northbridge
parent302dddf0f48acce1c00ae04606b0bf56c7da3f9d (diff)
downloadcoreboot-15063e8819f2f218033a3b43cbc73963634ff145.tar.xz
nb/intel/gm45/acpi.c: Don't read PCI config to check presence
Change-Id: I4cac29c1bf59df56df8cf0035ee1d5379bbde76e Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34837 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/northbridge')
-rw-r--r--src/northbridge/intel/gm45/acpi.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/northbridge/intel/gm45/acpi.c b/src/northbridge/intel/gm45/acpi.c
index decf712302..69ebdd7b75 100644
--- a/src/northbridge/intel/gm45/acpi.c
+++ b/src/northbridge/intel/gm45/acpi.c
@@ -69,9 +69,11 @@ unsigned long acpi_fill_mcfg(unsigned long current)
static unsigned long acpi_fill_dmar(unsigned long current)
{
- int me_active = (pcidev_on_root(3, 0) != NULL) &&
- (pci_read_config8(pcidev_on_root(3, 0), PCI_CLASS_REVISION) !=
- 0xff);
+ const struct device *dev;
+
+ dev = pcidev_on_root(3, 0);
+ int me_active = dev && dev->enabled;
+
int stepping = pci_read_config8(pcidev_on_root(0, 0),
PCI_CLASS_REVISION);