HomeFreeBSD

riscv: Convert local interrupt controller to a newbus PIC

Description

riscv: Convert local interrupt controller to a newbus PIC

Currently the local interrupt controller implementation is based on
pre-INTRNG arm/arm64 code, using hand-rolled event code rather than
INTRNG. This then interacts weirdly with the PLIC, and other future
interrupt controllers like the APLIC and IMSICs in the upcoming AIA
specification, since they become the root PIC despite not being the
logical root. Instead, use a real newbus device for it and register
it as the root PIC.

This also adapts the IPI code to make use of the newly-added INTRNG
generic IPI handling framework, adding a new sbi_ipi as the PIC. In
future there will be alternative devices for sending IPIs that will
register with higher priorities, such as the proposed AIA IMSIC and
ACLINT SSWI.

Reviewed by: mhorne
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D35901

Details

Provenance
jrtc27Authored on Jan 24 2024, 11:49 PM
Reviewer
mhorne
Differential Revision
D35901: riscv: Convert local interrupt controller to a newbus PIC
Parents
rGc55272fdf857: riscv: Create a newbus device for the SBI driver
Branches
Unknown
Tags
Unknown