Rudimentary AER reading code for ddb(4)
Needs ReviewPublic

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
Lint Skipped
Unit Tests Skipped
Build Status
Buildable 5081
Build 5163: CI src buildJenkins
kib retitled this revision from to Rudimentary AER reading code for ddb(4).Sep 7 2016, 1:54 PM
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.