ladybird/Kernel/Bus/PCI
Liav A e606ff3751 Kernel/VirtIO: Determine VirtIO device class also with the PCI device ID
According to the VirtIO 1.0 specification:
"Non-transitional devices SHOULD have a PCI Device ID in the range
0x1040 to 0x107f. Non-transitional devices SHOULD have a PCI Revision ID
of 1 or higher. Non-transitional devices SHOULD have a PCI Subsystem
Device ID of 0x40 or higher."

It also says that:
"Transitional devices MUST have a PCI Revision ID of 0. Transitional
devices MUST have the PCI Subsystem Device ID matching the Virtio
Device ID, as indicated in section 5. Transitional devices MUST have the
Transitional PCI Device ID in the range 0x1000 to 0x103f."

So, for legacy devices, we know that revision ID in the PCI header won't
be 1, so we probe for PCI_SUBSYSTEM_ID value.
Instead of using the subsystem device ID, we can probe the DEVICE_ID
value directly in case it's not a legacy device.
This should cover all possibilities for identifying VirtIO devices, both
per the specification of 0.9.5, and future revisions from 1.0 onwards.
2021-09-04 20:53:26 +02:00
..
Access.cpp Kernel/SysFS: Don't compute exact size of PCI files 2021-08-15 23:30:52 +02:00
Access.h Kernel/SysFS: Don't compute exact size of PCI files 2021-08-15 23:30:52 +02:00
Definitions.h Kernel/PCI: Fix offset error of the PCI_SUBSYSTEM values 2021-08-31 16:51:13 +02:00
Device.cpp Kernel: Rename PCI::DeviceController => PCI::Device 2021-08-23 01:07:45 +02:00
Device.h Kernel: Rename PCI::DeviceController => PCI::Device 2021-08-23 01:07:45 +02:00
IDs.h Kernel/VirtIO: Determine VirtIO device class also with the PCI device ID 2021-09-04 20:53:26 +02:00
Initializer.cpp Kernel: Rename SysFS related classes in PCI code 2021-07-11 01:31:48 +02:00
Initializer.h Kernel/PCI: Move the PCI components as a subfolder to the Bus directory 2021-07-02 13:16:12 +02:00
IOAccess.cpp Kernel/PCI: Move the PCI components as a subfolder to the Bus directory 2021-07-02 13:16:12 +02:00
IOAccess.h Kernel: Remove unused PCI::Access::access_type() 2021-08-06 00:37:47 +02:00
MMIOAccess.cpp Kernel: Rename ScopedSpinlock => SpinlockLocker 2021-08-22 03:34:10 +02:00
MMIOAccess.h Kernel: Rename SpinLock => Spinlock 2021-08-22 03:34:10 +02:00
WindowedMMIOAccess.cpp Kernel: Add convenience values to the Memory::Region::Access enum 2021-08-06 22:25:00 +02:00
WindowedMMIOAccess.h Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00