From 15063e8819f2f218033a3b43cbc73963634ff145 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Mon, 12 Aug 2019 09:41:42 +0200 Subject: nb/intel/gm45/acpi.c: Don't read PCI config to check presence Change-Id: I4cac29c1bf59df56df8cf0035ee1d5379bbde76e Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/34837 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Rudolph Reviewed-by: Paul Menzel Reviewed-by: Angel Pons --- src/northbridge/intel/gm45/acpi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/northbridge') 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); -- cgit v1.2.3