diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2019-08-12 09:41:42 +0200 |
---|---|---|
committer | Arthur Heymans <arthur@aheymans.xyz> | 2019-08-13 10:50:27 +0000 |
commit | 15063e8819f2f218033a3b43cbc73963634ff145 (patch) | |
tree | 23aa24e42e3bdd83337777253b3d07374b7d3f69 | |
parent | 302dddf0f48acce1c00ae04606b0bf56c7da3f9d (diff) | |
download | coreboot-15063e8819f2f218033a3b43cbc73963634ff145.tar.gz coreboot-15063e8819f2f218033a3b43cbc73963634ff145.tar.bz2 coreboot-15063e8819f2f218033a3b43cbc73963634ff145.zip |
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>
-rw-r--r-- | src/northbridge/intel/gm45/acpi.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/northbridge/intel/gm45/acpi.c b/src/northbridge/intel/gm45/acpi.c index decf712302b1..69ebdd7b7583 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); |