Skip to content

Commit

Permalink
pci: 统一使用ecam root (DragonOS-Community#744)
Browse files Browse the repository at this point in the history
  • Loading branch information
fslongjin authored and BrahmaMantra committed Dec 9, 2024
1 parent 4100884 commit d410732
Show file tree
Hide file tree
Showing 5 changed files with 263 additions and 173 deletions.
2 changes: 1 addition & 1 deletion kernel/src/arch/riscv64/pci/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ impl TraitPciArch for RiscV64PciArch {
}

fn write_config(bus_device_function: &BusDeviceFunction, offset: u8, data: u32) {
unimplemented!("RiscV64PciArch::write_config")
unimplemented!("RiscV64pci_root_0().write_config")
}

fn address_pci_to_physical(pci_address: PciAddr) -> crate::mm::PhysAddr {
Expand Down
5 changes: 3 additions & 2 deletions kernel/src/arch/x86_64/pci/pci.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::arch::TraitPciArch;
use crate::driver::acpi::acpi_manager;
use crate::driver::pci::pci::{
BusDeviceFunction, PciAddr, PciError, PciRoot, SegmentGroupNumber, PORT_PCI_CONFIG_ADDRESS,
PORT_PCI_CONFIG_DATA,
BusDeviceFunction, PciAddr, PciCam, PciError, PciRoot, SegmentGroupNumber,
PORT_PCI_CONFIG_ADDRESS, PORT_PCI_CONFIG_DATA,
};
use crate::include::bindings::bindings::{io_in32, io_out32};
use crate::mm::PhysAddr;
Expand Down Expand Up @@ -57,6 +57,7 @@ impl TraitPciArch for X86_64PciArch {
segement_group_number: segement,
bus_begin: mcfg_entry.bus_number_start,
bus_end: mcfg_entry.bus_number_end,
cam: PciCam::Ecam,
});
}
}
Expand Down
Loading

0 comments on commit d410732

Please sign in to comment.