This PR is the second part of #1212 and focuses on more changes within the PCI subsystem. The following changes were done:
The ISABus device driver was removed in favor of an ISADeviceService
Added PCIField.All to include all fields in the enum at once
Added a BusType property in Device, which is set to the DeviceDriverRegistryEntry's BusType by default
In PCIDevice:
The PCI controller field was made public
Properties like VendorID and DeviceID are now retrieved once
DeviceDriverRegistryEntry.Factory is now checked for nullability, and same for the BaseDeviceDriver instantiated by it
Added the DeviceService.GetAllDevices(DeviceBusType) method as a way to get all devices by a specific bus type, e.g. ISA or PCI. This unifies the process, instead of having to check for ISABus or PCIDevice respectively
In PCIDeviceService:
The service no longer relies on events to initialize PCI devices. Instead, the code was moved in the Initialize() method, where it finds for the first initialized IPCIController
In case no matched driver entry is found, a fallback bus type is set in the Device. This allows for retrieving unknown PCI devices using the newly added DeviceService.GetAllDevices(DeviceBusType) method, instead of getting all devices that inherit from PCIDevice
This PR is the second part of #1212 and focuses on more changes within the PCI subsystem. The following changes were done:
ISABus
device driver was removed in favor of anISADeviceService
PCIField.All
to include all fields in the enum at onceBusType
property inDevice
, which is set to theDeviceDriverRegistryEntry
'sBusType
by defaultPCIDevice
:VendorID
andDeviceID
are now retrieved onceDeviceDriverRegistryEntry.Factory
is now checked for nullability, and same for theBaseDeviceDriver
instantiated by itDeviceService.GetAllDevices(DeviceBusType)
method as a way to get all devices by a specific bus type, e.g. ISA or PCI. This unifies the process, instead of having to check forISABus
orPCIDevice
respectivelyPCIDeviceService
:Initialize()
method, where it finds for the first initializedIPCIController
Device
. This allows for retrieving unknown PCI devices using the newly addedDeviceService.GetAllDevices(DeviceBusType)
method, instead of getting all devices that inherit fromPCIDevice