Skip to content

OpenSBI RISC-V AIA Support

Anup Patel opensbi 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest13 patches 0 repliesNew
  2. v113 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- Removed redundant CSR checks to detect AIA in PATCH2
- Typo fix in commit description of PATCH5
- Added more details about nascent_init() in comments of PATCH6

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13include: sbi: Add AIA related CSR definesinclude/sbi/riscv_encoding.h+76 -01 reply
2/13lib: sbi: Detect AIA CSRs at boot-timeinclude/sbi/sbi_hart.h lib/sbi/sbi_hart.c+14 -12 replies
3/13lib: sbi: Use AIA CSRs for local interrupts when availablelib/sbi/sbi_trap.c+46 -112 replies
4/13lib: sbi: Add sbi_trap_set_external_irqfn() APIinclude/sbi/sbi_trap.h lib/sbi/sbi_trap.c+31 -01 reply
5/13lib: utils/irqchip: Allow multiple FDT irqchip driverslib/utils/irqchip/fdt_irqchip.c+30 -71 reply
6/13include: sbi: Introduce nascent_init() platform callbackinclude/sbi/sbi_platform.h lib/sbi/sbi_init.c+28 -01 reply
7/13lib: sbi: Enable mie.MEIE bit for IPIs based on external interrupts.lib/sbi/sbi_hsm.c lib/sbi/sbi_init.c+8 -52 replies
8/13lib: utils/irqchip: Add IMSIC libraryinclude/sbi_utils/irqchip/imsic.h lib/utils/irqchip/imsic.c lib/utils/irqchip/objects.mk+338 -02 replies
9/13lib: utils/irqchip: Add FDT based driver for IMSICinclude/sbi_utils/fdt/fdt_helper.h lib/utils/fdt/fdt_helper.c lib/utils/irqchip/fdt_irqchip.c +3 more+230 -03 replies
10/13lib: utils: Disable appropriate IMSIC DT nodes in fdt_fixups()include/sbi_utils/fdt/fdt_fixup.h lib/utils/fdt/fdt_fixup.c+45 -41 reply
11/13lib: utils/irqchip: Add APLIC initialization libraryinclude/sbi_utils/irqchip/aplic.h lib/utils/irqchip/aplic.c lib/utils/irqchip/objects.mk+327 -02 replies
12/13lib: utils/irqchip: Add FDT based driver for APLICinclude/sbi_utils/fdt/fdt_helper.h lib/utils/fdt/fdt_helper.c lib/utils/irqchip/fdt_irqchip.c +2 more+222 -03 replies
13/13lib: utils: Disable appropriate APLIC DT nodes in fdt_fixups()include/sbi_utils/fdt/fdt_fixup.h lib/utils/fdt/fdt_fixup.c+26 -31 reply

Reviews trailers per patch

All 13 patches have a Reviewed-by or Acked-by.

PatchAtish Patra
1/13R-b
2/13R-b
3/13R-b
4/13R-b
5/13R-b
6/13R-b
7/13R-b
8/13R-b
9/13R-b
10/13R-b
11/13R-b
12/13R-b
13/13R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/13] OpenSBI RISC-V AIA Support

The advanced interrupt architecture (AIA) extends the per-HART local interrupt support. Along with this, it also adds IMSIC (MSI contrllor) and Advanced PLIC (wired interrupt controller).

The latest AIA draft specification can be found here:
https://github.com/riscv/riscv-aia/releases/download/0.2-draft.28/riscv-interrupts-028.pdf

To test series, we require Linux from riscv_aia_v1 branch of
https://github.com/avpatel/linux.git

This series can be found riscv_aia_v2 branch at:
https://github.com/avpatel/opensbi.git

Changes since v1:
- Removed redundant CSR checks to detect AIA in PATCH2
- Typo fix in commit description of PATCH5
- Added more details about nascent_init() in comments of PATCH6

Anup Patel (13):
include: sbi: Add AIA related CSR defines
lib: sbi: Detect AIA CSRs at boot-time
lib: sbi: Use AIA CSRs for local interrupts when available
lib: sbi: Add sbi_trap_set_external_irqfn() API
lib: utils/irqchip: Allow multiple FDT irqchip drivers
include: sbi: Introduce nascent_init() platform callback
lib: sbi: Enable mie.MEIE bit for IPIs based on external interrupts.
lib: utils/irqchip: Add IMSIC library
lib: utils/irqchip: Add FDT based driver for IMSIC
lib: utils: Disable appropriate IMSIC DT nodes in fdt_fixups()
lib: utils/irqchip: Add APLIC initialization library
lib: utils/irqchip: Add FDT based driver for APLIC
lib: utils: Disable appropriate APLIC DT nodes in fdt_fixups()

 include/sbi/riscv_encoding.h          |  76 +++++++
 include/sbi/sbi_hart.h                |   4 +-
 include/sbi/sbi_platform.h            |  20 ++
 include/sbi/sbi_trap.h                |   2 +
 include/sbi_utils/fdt/fdt_fixup.h     |  29 ++-
 include/sbi_utils/fdt/fdt_helper.h    |  10 +
 include/sbi_utils/irqchip/aplic.h     |  47 +++++
 include/sbi_utils/irqchip/imsic.h     |  50 +++++
 lib/sbi/sbi_hart.c                    |  11 +
 lib/sbi/sbi_hsm.c                     |   4 +-
 lib/sbi/sbi_init.c                    |  17 +-
 lib/sbi/sbi_trap.c                    |  86 +++++++-
 lib/utils/fdt/fdt_fixup.c             |  43 +++-
 lib/utils/fdt/fdt_helper.c            | 262 +++++++++++++++++++++++
 lib/utils/irqchip/aplic.c             | 279 +++++++++++++++++++++++++
 lib/utils/irqchip/fdt_irqchip.c       |  41 +++-
 lib/utils/irqchip/fdt_irqchip_aplic.c |  56 +++++
 lib/utils/irqchip/fdt_irqchip_imsic.c | 106 ++++++++++
 lib/utils/irqchip/imsic.c             | 287 ++++++++++++++++++++++++++
 lib/utils/irqchip/objects.mk          |   4 +
 platform/generic/platform.c           |  12 ++
 21 files changed, 1418 insertions(+), 28 deletions(-)
 create mode 100644 include/sbi_utils/irqchip/aplic.h
 create mode 100644 include/sbi_utils/irqchip/imsic.h
 create mode 100644 lib/utils/irqchip/aplic.c
 create mode 100644 lib/utils/irqchip/fdt_irqchip_aplic.c
 create mode 100644 lib/utils/irqchip/fdt_irqchip_imsic.c
 create mode 100644 lib/utils/irqchip/imsic.c
Signature · 1 line
2.25.1