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@zamaudio.com>
Reviewed-on: https://review.coreboot.org/14334
Tested-by: build bot (Jenkins)
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@googlemail.com>
This commit is contained in:
Damien Zammit 2016-04-12 20:35:16 +10:00 committed by Martin Roth
parent c6ee58c790
commit 711a478c05
1 changed files with 3 additions and 1 deletions

View File

@ -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");