Allow reading PCI ROM address and size

This commit is contained in:
Jeremy Soller
2025-12-18 12:15:23 -07:00
parent 5b4a664111
commit 0fee261866
2 changed files with 48 additions and 2 deletions
+10
View File
@@ -88,6 +88,13 @@ impl From<PciAddressDef> for PciAddress {
}
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize)]
pub struct PciRom {
pub addr: u32,
pub size: u32,
pub enabled: bool,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize)]
pub struct PciFunction {
/// Address of the PCI function.
@@ -97,6 +104,9 @@ pub struct PciFunction {
/// PCI Base Address Registers
pub bars: [PciBar; 6],
/// PCI Option ROM
pub rom: Option<PciRom>,
/// Legacy IRQ line: It's the responsibility of pcid to make sure that it be mapped in either
/// the I/O APIC or the 8259 PIC, so that the subdriver can map the interrupt vector directly.
/// The vector to map is always this field, plus 32.