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

Function dump_me_info

util/intelmetool/src/intelmetool.c:256–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254}
255
256static void dump_me_info(void)
257{
258 struct pci_dev *dev;
259 uint32_t stat, stat2;
260 char namebuf[1024];
261 const char *name = NULL;
262
263 if (pci_platform_scan())
264 return;
265
266 dev = pci_me_interface_scan(&name, namebuf, sizeof(namebuf));
267 if (!dev) {
268 if (debug)
269 printf("ME PCI device is hidden\n");
270
271 if (activate_me())
272 return;
273 dev = pci_me_interface_scan(&name, namebuf, sizeof(namebuf));
274 if (!dev) {
275 printf("Can't find ME PCI device\n");
276 return;
277 }
278 }
279
280 if (name == NULL)
281 name = "<unknown>";
282
283 printf("MEI found: [%x:%x] %s\n\n",
284 dev->vendor_id, dev->device_id, name);
285 stat = pci_read_long(dev, 0x40);
286 printf("ME Status : 0x%x\n", stat);
287 stat2 = pci_read_long(dev, 0x48);
288 printf("ME Status 2 : 0x%x\n\n", stat2);
289
290 intel_me_status(stat, stat2);
291 printf("\n");
292 intel_me_extend_valid(dev);
293 printf("\n");
294
295 if (stat & 0xf000)
296 printf("ME: has a broken implementation on your board with "
297 "this firmware\n");
298
299 if (intel_mei_setup(dev))
300 goto out;
301 usleep(ME_COMMAND_DELAY);
302 mei_reset();
303 usleep(ME_COMMAND_DELAY);
304 if (mkhi_get_fw_version(&ME_major_ver, &ME_minor_ver))
305 goto out;
306 usleep(ME_COMMAND_DELAY);
307 mei_reset();
308 usleep(ME_COMMAND_DELAY);
309 if (mkhi_get_fwcaps())
310 goto out;
311 usleep(ME_COMMAND_DELAY);
312
313out:

Callers 1

intelmetool.cFile · 0.85

Calls 12

pci_platform_scanFunction · 0.85
pci_me_interface_scanFunction · 0.85
printfFunction · 0.85
activate_meFunction · 0.85
pci_read_longFunction · 0.85
rehide_meFunction · 0.85
intel_me_statusFunction · 0.70
intel_me_extend_validFunction · 0.70
intel_mei_setupFunction · 0.70
mei_resetFunction · 0.70
mkhi_get_fw_versionFunction · 0.70
mkhi_get_fwcapsFunction · 0.70

Tested by

no test coverage detected