From 711a478c055a0b69fac2a7c96b5af493d5e5d913 Mon Sep 17 00:00:00 2001 From: Damien Zammit Date: Tue, 12 Apr 2016 20:35:16 +1000 Subject: [PATCH] intelmetool: Fix detection logic of no MEI device Previously, on systems that are supposed to have ME but are librebooted, there was no message printed to tell the user that no MEI was detected. Fixed this bug. Change-Id: I59681c194ae5e76533dd777374e26d1aea727337 Signed-off-by: Damien Zammit Reviewed-on: https://review.coreboot.org/14334 Tested-by: build bot (Jenkins) Reviewed-by: Philipp Deppenwiese --- util/intelmetool/intelmetool.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/util/intelmetool/intelmetool.c b/util/intelmetool/intelmetool.c index bde32041ff..aec0715212 100644 --- a/util/intelmetool/intelmetool.c +++ b/util/intelmetool/intelmetool.c @@ -155,6 +155,7 @@ static struct pci_dev *pci_me_interface_scan(char **name) { struct pci_access *pacc; struct pci_dev *dev; char namebuf[1024]; + int me = 0; pacc = pci_alloc(); pacc->method = PCI_ACCESS_I386_TYPE1; @@ -168,12 +169,13 @@ static struct pci_dev *pci_me_interface_scan(char **name) { PCI_LOOKUP_DEVICE, dev->vendor_id, dev->device_id); if (dev->vendor_id == 0x8086) { if (PCI_DEV_HAS_SUPPORTED_ME(dev->device_id)) { + me = 1; break; } } } - if (!PCI_DEV_HAS_SUPPORTED_ME(dev->device_id)) { + if (!me) { rehide_me(); printf("MEI device not found\n");