| 217 | } |
| 218 | |
| 219 | static struct pci_dev *pci_me_interface_scan(const char **name, char *namebuf, |
| 220 | int namebuf_size) |
| 221 | { |
| 222 | struct pci_access *pacc; |
| 223 | struct pci_dev *dev; |
| 224 | int me = 0; |
| 225 | |
| 226 | pacc = pci_alloc(); |
| 227 | pacc->method = PCI_ACCESS_I386_TYPE1; |
| 228 | |
| 229 | pci_init(pacc); |
| 230 | pci_scan_bus(pacc); |
| 231 | |
| 232 | for (dev=pacc->devices; dev; dev=dev->next) { |
| 233 | pci_fill_info(dev, PCI_FILL_IDENT | PCI_FILL_BASES | |
| 234 | PCI_FILL_SIZES | PCI_FILL_CLASS); |
| 235 | *name = pci_lookup_name(pacc, namebuf, namebuf_size, |
| 236 | PCI_LOOKUP_DEVICE, dev->vendor_id, dev->device_id); |
| 237 | if (dev->vendor_id != PCI_VENDOR_ID_INTEL) |
| 238 | continue; |
| 239 | |
| 240 | if (PCI_DEV_HAS_SUPPORTED_ME(dev->device_id)) { |
| 241 | me = 1; |
| 242 | break; |
| 243 | } |
| 244 | } |
| 245 | |
| 246 | if (!me) { |
| 247 | rehide_me(); |
| 248 | |
| 249 | pci_cleanup(pacc); |
| 250 | return NULL; |
| 251 | } |
| 252 | |
| 253 | return dev; |
| 254 | } |
| 255 | |
| 256 | static void dump_me_info(void) |
| 257 | { |
no test coverage detected