rust-embedded/rust-raspberrypi-OS-tutorials · critical
No IRQ Manager registered yet
Error message
No IRQ Manager registered yet
What it means
The null IRQ manager is a placeholder implementing the InterruptController trait whose every method panics. Its purpose is to act as a stand-in so trait plumbing compiles before a real interrupt controller is installed; encountering this panic means driver code attempted to register or enable an IRQ while no real IRQ manager has been set as the system-wide controller.
Source
Thrown at 20_timer_callbacks/kernel/src/exception/asynchronous/null_irq_manager.rs:32
//--------------------------------------------------------------------------------------------------
// Global instances
//--------------------------------------------------------------------------------------------------
pub static NULL_IRQ_MANAGER: NullIRQManager = NullIRQManager {};
//--------------------------------------------------------------------------------------------------
// Public Code
//--------------------------------------------------------------------------------------------------
impl interface::IRQManager for NullIRQManager {
type IRQNumberType = super::IRQNumber;
fn register_handler(
&self,
_descriptor: IRQHandlerDescriptor<Self::IRQNumberType>,
) -> Result<(), &'static str> {
panic!("No IRQ Manager registered yet");
}
fn enable(&self, _irq_number: &Self::IRQNumberType) {
panic!("No IRQ Manager registered yet");
}
fn handle_pending_irqs<'irq_context>(&'irq_context self, _ic: &IRQContext<'irq_context>) {
panic!("No IRQ Manager registered yet");
}
}
View on GitHub (pinned to 644474cc09)
Solutions
- Register the real interrupt controller (e.g. GICv2/Bcm IRQ manager) as the system IRQ manager before initializing drivers.
- Reorder boot so that IRQ-manager setup happens prior to any init that registers IRQ handlers.
- Check that the interrupt-controller driver's own init succeeded; if it failed earlier, subsequent registration hits the null manager.
- For code that intentionally has no interrupt controller, remove IRQ registration paths instead of relying on the null manager.
Example fix
// before
unsafe { driver_manager().init_drivers_and_irqs() };
// real IRQ manager never registered -> drivers hit NullIRQManager
// after
let gic = &gicv2::GICv2::new(gicd_base, gicc_base);
gic.register_kernel_irq_manager(); // install real controller first
unsafe { driver_manager().init_drivers_and_irqs() }; Defensive patterns
Strategy: validation
Validate before calling
// check a real controller is installed before any IRQ registration:
if !irq_manager_registered() {
return Err("IRQ manager not registered: cannot register handler");
} Type guard
fn is_null_manager(m: &dyn InterruptController<IRQNumberType = IRQNumber>) -> bool {
// null manager is a zero-sized placeholder; track installation with a flag
!IRQ_MANAGER_INSTALLED.load(Ordering::Acquire)
} Try / catch
// panics cannot be caught in no_std kernel; fail early instead: assert!(irq_manager_registered(), "call register_kernel_irq_manager() before driver init");
Prevention
- Always call register_kernel_irq_manager() (or equivalent) as the first step of interrupt bring-up.
- Enforce boot ordering with a state machine that refuses driver init before the controller is set.
- Never ship code paths that intentionally call the null manager; treat it as compile/plumbing scaffolding only.
When it happens
Trigger: A driver calls register_handler() (or enable()) on the null IRQ manager — i.e. the global IRQ manager reference still points to NullIRQManager because no real controller was registered before driver IRQ setup ran.
Common situations: Calling init_drivers_and_irqs() (or drivers doing IRQ setup in post_init) before the kernel sets the real interrupt controller; forgetting the 'register IRQ manager' step in the board bring-up sequence; running on a target whose interrupt-controller init was skipped or failed silently.
Related errors
- Attempt to enable IRQ {} for device {}, but driver does not
- Error during driver interrupt handler registration: {}: {}
- Error initializing driver: {}: {}
- Error during driver post-init callback: {}: {}
- Invalid KERNEL_STATE
AI-assisted analysis of rust-embedded/rust-raspberrypi-OS-tutorials@644474cc09 (2026-09-06).
Data as JSON: /api/errors/de230c4c1ec48c80.
Report an issue: GitHub.