1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:07:36 +00:00

Kernel: Add VirtIOGPU graphics device

This commit is contained in:
Sahan Fernando 2021-06-12 23:07:44 +10:00 committed by Andreas Kling
parent b569b2df35
commit b9ad6058aa
21 changed files with 1050 additions and 13 deletions

View file

@ -20,6 +20,7 @@ UNMAP_AFTER_INIT void VirtIO::detect()
PCI::enumerate([&](const PCI::Address& address, PCI::ID id) {
if (address.is_null() || id.is_null())
return;
// TODO: We should also be checking that the device_id is in between 0x1000 - 0x107F inclusive
if (id.vendor_id != (u16)PCIVendorID::VirtIO)
return;
switch (id.device_id) {
@ -31,6 +32,10 @@ UNMAP_AFTER_INIT void VirtIO::detect()
[[maybe_unused]] auto& unused = adopt_ref(*new VirtIORNG(address)).leak_ref();
break;
}
case (u16)PCIDeviceID::VirtIOGPU: {
// This should have been initialized by the graphics subsystem
break;
}
default:
dbgln_if(VIRTIO_DEBUG, "VirtIO: Unknown VirtIO device with ID: {}", id.device_id);
break;