[coreboot-gerrit] New patch to review for coreboot: intelmetool: Fix detection logic of no MEI device

Damien Zammit (damien@zamaudio.com) gerrit at coreboot.org
Tue Apr 12 12:39:13 CEST 2016


Damien Zammit (damien at zamaudio.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14334

-gerrit

commit 4b9f8bf0c0886b43a06476a415048a6d28ebd561
Author: Damien Zammit <damien at zamaudio.com>
Date:   Tue Apr 12 20:35:16 2016 +1000

    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 <damien at zamaudio.com>
---
 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 bde3204..aec0715 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");



More information about the coreboot-gerrit mailing list