Page MenuHomeFreeBSD

plic: handling for interrupt-cells == 2
ClosedPublic

Authored by mhorne on Oct 15 2024, 7:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 25, 12:39 PM
Unknown Object (File)
Fri, Oct 24, 6:12 AM
Unknown Object (File)
Wed, Oct 8, 12:59 AM
Unknown Object (File)
Sep 27 2025, 3:33 PM
Unknown Object (File)
Sep 26 2025, 1:37 PM
Unknown Object (File)
Aug 29 2025, 4:16 PM
Unknown Object (File)
Aug 20 2025, 6:59 AM
Unknown Object (File)
Aug 15 2025, 11:04 PM
Subscribers

Details

Summary

Some device trees report interrupt info in two cells: the first value is
the IRQ number, the second value indicates the trigger type, such as
IRQ_TYPE_LEVEL_HIGH. The device tree for the Allwinner D1(s) is one such
case. Thus, extend the PLIC driver to accept this extra information when
available.

Apparently, some PLIC implementations using edge-triggered interrupts
will require some special handling. This is not required for the D1, and
therefore not implemented in this change. However, to prevent
misbehaviour a check is added to reject this case and a message will be
printed.

Similarly, emit messages for the error paths, e.g. ncells == 3. Drivers
will fail to attach all the same, but the message will aid in diagnosing
the issue more quickly.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable