Page MenuHomeFreeBSD

Rudimentary AER reading code for ddb(4)

Authored by kib on Sep 7 2016, 1:54 PM.



I found this chunk when I did today pull into my repo and got another conflict. This was written when I debugged ACPI_DMAR and got some NMIs. One of the theories was that a device reacted badly to DMA fault which resulted in transaction abort and reported that as NMI. It appeared to be false, and this code allowed to determine that.

This is very primitive thing, it only allows to inspect the PCI error state and AER error state, dump the log and clear errors, from ddb. You see that pci_print_faulted_dev() is extern, because it was automatically called from the NMI trap handler. This chunk depends on my fixes for ddb entrance on broadcast NMI and thus not included.

If this is something worth it as interim, please review. If not, I will revert this in my repo to avoid future conflict handling.

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

kib updated this revision to Diff 20140.Sep 7 2016, 1:54 PM
kib retitled this revision from to Rudimentary AER reading code for ddb(4).
kib updated this object.
kib edited the test plan for this revision. (Show Details)
kib added reviewers: jhb, imp, emaste.
kib set the repository for this revision to rS FreeBSD src repository.
kib added a project: PCI.
emaste added a comment.Dec 5 2017, 9:46 PM

I like the idea of having this support in ddb, but will defer to @jhb and @imp.

imp added a comment.Dec 5 2017, 10:15 PM

I've cleaned up this code somewhat, but not completely. I need to reconnect it to an interrupt and then test it in machines that generate these errors...

imp added a comment.Dec 5 2017, 10:16 PM

Errr, my cleanup is runtime, not ddb time, sorry for the confusion. I've not grabbed this code.

cem accepted this revision.Aug 2 2018, 2:17 AM
cem added a subscriber: cem.

Seems useful to me, especially as an interim solution for scanning for AER reports before we grow runtime support. Any objection @imp , @jhb ?

This revision is now accepted and ready to land.Aug 2 2018, 2:17 AM
imp accepted this revision.Aug 2 2018, 9:47 AM

This is fine.

This revision was automatically updated to reflect the committed changes.