mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:58:12 +00:00
Kernel: Clarify and make it easy to not use raw numbers
Let's put the PCI IDs as enums in the PCI namespace so they're free to pollute that namespace, but it's also more easier to use them.
This commit is contained in:
parent
b4e230a7bb
commit
3fae7ca113
9 changed files with 25 additions and 21 deletions
|
@ -82,18 +82,18 @@ UNMAP_AFTER_INIT bool GraphicsManagement::determine_and_initialize_graphics_devi
|
|||
|
||||
RefPtr<GraphicsDevice> adapter;
|
||||
switch (id.vendor_id) {
|
||||
case 0x1234:
|
||||
case PCI::VendorID::QEMUOld:
|
||||
if (id.device_id == 0x1111)
|
||||
adapter = BochsGraphicsAdapter::initialize(address);
|
||||
break;
|
||||
case 0x80ee:
|
||||
case PCI::VendorID::VirtualBox:
|
||||
if (id.device_id == 0xbeef)
|
||||
adapter = BochsGraphicsAdapter::initialize(address);
|
||||
break;
|
||||
case 0x8086:
|
||||
case PCI::VendorID::Intel:
|
||||
adapter = IntelNativeGraphicsAdapter::initialize(address);
|
||||
break;
|
||||
case static_cast<u16>(PCIVendorID::VirtIO):
|
||||
case PCI::VendorID::VirtIO:
|
||||
dmesgln("Graphics: Using VirtIO console");
|
||||
adapter = Graphics::VirtIOGraphicsAdapter::initialize(address);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue