MCPcopy Create free account
hub / github.com/coreboot/coreboot / pci_me_interface_scan

Function pci_me_interface_scan

util/intelmetool/src/intelmetool.c:219–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217}
218
219static 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
256static void dump_me_info(void)
257{

Callers 2

dump_me_infoFunction · 0.85
dump_bootguard_infoFunction · 0.85

Calls 5

pci_allocFunction · 0.85
rehide_meFunction · 0.85
pci_cleanupFunction · 0.85
pci_initFunction · 0.50
pci_scan_busFunction · 0.50

Tested by

no test coverage detected