MCPcopy Create free account
hub / github.com/IBM/ACE-RISCV / initialize

Method initialize

security-monitor/src/core/interrupt_controller/mod.rs:24–29  ·  view source on GitHub ↗

Constructs the global, unique interrupt controller instance.

()

Source from the content-addressed store, hash-verified

22impl<'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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected