Constructs the global, unique interrupt controller instance.
()
| 22 | impl<'a> InterruptController { |
| 23 | /// Constructs the global, unique interrupt controller instance. |
| 24 | pub fn initialize() -> Result<(), Error> { |
| 25 | let interrupt_controller = Self::new()?; |
| 26 | ensure_not!(INTERRUPT_CONTROLLER.is_completed(), Error::Reinitialization())?; |
| 27 | INTERRUPT_CONTROLLER.call_once(|| RwLock::new(interrupt_controller)); |
| 28 | Ok(()) |
| 29 | } |
| 30 | |
| 31 | fn new() -> Result<Self, Error> { |
| 32 | // In future when we do not rely on OpenSBI, this function should parse the flatten device tree, detect type of the hardware |
nothing calls this directly
no outgoing calls
no test coverage detected