public inbox for opensbi@lists.infradead.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] Introduce INTC and VIRQ layer prototypes
@ 2026-01-27 15:23 Raymond Mao
  2026-01-27 15:23 ` [RFC PATCH 1/2] lib: sbi: introduce INTC abstraction for wired interrupts Raymond Mao
  2026-01-27 15:23 ` [RFC PATCH 2/2] lib: sbi: Add VIRQ layer Raymond Mao
  0 siblings, 2 replies; 5+ messages in thread
From: Raymond Mao @ 2026-01-27 15:23 UTC (permalink / raw)
  To: opensbi
  Cc: scott, dave.patel, raymond.mao, robin.randhawa, samuel.holland,
	anup.patel, anuppate, dhaval, peter.lin

From: Raymond Mao <raymond.mao@riscstar.com>

This RFC introduces INTC and VIRQ layers for APLIC wired interrupt
support in OpenSBI.

In the current OpenSBI implementation, APLIC support primarily focuses
on initialization and delegation, while external interrupt handling
for wired interrupts remains largely stubbed. As a result:
- There is no generic mechanism for OpenSBI drivers or platforms to
  register handlers for wired interrupt lines.
- Interrupt dispatch remains tightly coupled to specific irqchip
  implementations.

The goal is to introduce a small, extensible abstraction INTC
(Interrupt Controller) layer to hide the HW details and provide
abstract operations like interrupt provider registration,
claim/complete/mask/unmask operations with IRQ number mapping to avoid
exposure of hwirq.

VIRQ (Virtual IRQ) layer is on top of INTC, providing IRQ state
management via per-(domain,hart) IRQ pending queue, with courier
dispatching and interface to enqueue/pop/complete an IRQ.

Raymond Mao (2):
  lib: sbi: introduce INTC abstraction for wired interrupts
  lib: sbi: Add VIRQ layer

 sbi_intc.h | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 sbi_virq.h | 71 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 170 insertions(+)
 create mode 100644 sbi_intc.h
 create mode 100644 sbi_virq.h

-- 
2.25.1


-- 
opensbi mailing list
opensbi@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-01-30 15:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-27 15:23 [RFC PATCH 0/2] Introduce INTC and VIRQ layer prototypes Raymond Mao
2026-01-27 15:23 ` [RFC PATCH 1/2] lib: sbi: introduce INTC abstraction for wired interrupts Raymond Mao
2026-01-30  7:48   ` Anup Patel
2026-01-30 15:00     ` Raymond Mao
2026-01-27 15:23 ` [RFC PATCH 2/2] lib: sbi: Add VIRQ layer Raymond Mao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox