From ed68ef9fa08ac9652e32ffda268307e8aa7e41de Mon Sep 17 00:00:00 2001 From: TheOddGarlic Date: Mon, 8 Aug 2022 14:09:01 +0300 Subject: [PATCH] PCI: add INTEL_PIIX4_IDE device --- ableos/src/devices/pci/devices.rs | 10 +++++++++- ableos/src/devices/pci/support.rs | 8 +++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ableos/src/devices/pci/devices.rs b/ableos/src/devices/pci/devices.rs index a10f97f..7f4a7a5 100644 --- a/ableos/src/devices/pci/devices.rs +++ b/ableos/src/devices/pci/devices.rs @@ -5,16 +5,24 @@ */ use super::vendors::Vendor::{self, *}; + #[derive(PartialEq, Clone, Eq, Debug)] pub struct DeviceID { pub vendor: Vendor, pub id: u16, } + impl DeviceID { pub const fn new(vendor: Vendor, id: u16) -> Self { Self { vendor, id } } } -pub const VMWARE_SVGA2: DeviceID = DeviceID::new(VMware, 0x0405); +// FIXME: Unknown class pub const S3INC_TRIO64V2: DeviceID = DeviceID::new(S3Inc, 0x8900); + +// MassStorage_IDE (0x0101) +pub const INTEL_PIIX4_IDE: DeviceID = DeviceID::new(Intel, 0x7111); + +// Display_VGA (0x0300) +pub const VMWARE_SVGA2: DeviceID = DeviceID::new(VMware, 0x0405); diff --git a/ableos/src/devices/pci/support.rs b/ableos/src/devices/pci/support.rs index 793074f..f9c0df6 100644 --- a/ableos/src/devices/pci/support.rs +++ b/ableos/src/devices/pci/support.rs @@ -8,8 +8,14 @@ use super::devices::*; pub fn check_pci_support(device_id: DeviceID) -> bool { match device_id { - VMWARE_SVGA2 => true, + // FIXME: Unknown class S3INC_TRIO64V2 => true, + + // MassStorage_IDE (0x0101) + INTEL_PIIX4_IDE => true, + + // Display_VGA (0x0300) + VMWARE_SVGA2 => true, _ => false, } }