Use pci_types for reading BARs

This simplifies a lot of code and adds support for 64bit BARs.
This commit is contained in:
bjorn3
2024-01-22 15:54:18 +01:00
parent d1b6009e3d
commit a5d0c7c354
16 changed files with 129 additions and 222 deletions
+1 -3
View File
@@ -54,9 +54,6 @@ pub struct PciFunction {
/// PCI Base Address Registers
pub bars: [PciBar; 6],
/// BAR sizes
pub bar_sizes: [u32; 6],
/// 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.
@@ -282,6 +279,7 @@ impl PcidServerHandle {
}
}
// FIXME turn into struct with bool fields
pub fn fetch_all_features(&mut self) -> Result<Vec<(PciFeature, FeatureStatus)>> {
self.send(&PcidClientRequest::RequestFeatures)?;
match self.recv()? {