get_plic_config_from_fdt

Function get_plic_config_from_fdt 

Source
fn get_plic_config_from_fdt(
    device_name: &str,
) -> Option<(InterruptId, Vec<usize>)>
Expand description

Extract PLIC configuration from FDT

Parses the riscv,ndev property for max interrupt count and interrupts-extended property to determine S-mode context IDs per hart.

§Arguments

  • device_name - The name of the PLIC device node (e.g., “plic@c000000”)

§Returns

  • Some((max_interrupts, s_mode_contexts)) on success
  • None if FDT is not available or properties cannot be read