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:
Liav A 2021-07-03 10:24:28 +03:00 committed by Gunnar Beutner
commit 3fae7ca113
Notes: sideshowbarker 2024-07-18 11:03:45 +09:00
9 changed files with 25 additions and 21 deletions

View file

@ -6,19 +6,22 @@
#pragma once
namespace Kernel {
namespace Kernel::PCI {
enum class PCIVendorID {
enum VendorID {
VirtIO = 0x1af4,
Intel = 0x8086,
WCH = 0x1c00,
RedHat = 0x1b36,
Realtek = 0x10ec
Realtek = 0x10ec,
QEMUOld = 0x1234,
VirtualBox = 0x80ee
};
enum class PCIDeviceID {
enum DeviceID {
VirtIOConsole = 0x1003,
VirtIOEntropy = 0x1005,
VirtIOGPU = 0x1050,
};
}