diff options
| author | Aleksa Vuckovic <aleksa@vuckovic.cc> | 2023-03-10 23:17:33 +0100 |
|---|---|---|
| committer | Aleksa Vuckovic <aleksa@vuckovic.cc> | 2023-03-10 23:23:35 +0100 |
| commit | f5826164936359560ef5b88b97fc953065eb7794 (patch) | |
| tree | 812d0c5fa6b03a639fc3a7f46ccd86df9bef0d95 /kernel/include | |
| parent | eb3b263b11e90902841dc21c5a55c45e59128542 (diff) | |
pci_info: get_ vendor/class/subclass/progif _str
Diffstat (limited to 'kernel/include')
| -rw-r--r-- | kernel/include/pci.h | 27 | ||||
| -rw-r--r-- | kernel/include/pci_info.h | 11 |
2 files changed, 11 insertions, 27 deletions
diff --git a/kernel/include/pci.h b/kernel/include/pci.h index 01d97fc..779d75a 100644 --- a/kernel/include/pci.h +++ b/kernel/include/pci.h @@ -19,31 +19,4 @@ struct pci_dev { }; typedef struct pci_dev pci_dev; -const char *class_string[] = { - "Unclassified", - "Mass Storage Controller", - "Network Controller", - "Display Controller", - "Multimedia Controller", - "Memory Controller", - "Bridge", - "Simple Communication Controller", - "Base System Peripheral", - "Input Device Controller", - "Docking Station", - "Processor", - "Serial Bus Controller", - "Wireless Controller", - "Intelligent Controller", - "Satellite Communication Controller", - "Encryption Controller", - "Signal Processing Controller", - "Processing Accelerator", - "Non-Essential Instrumentation", -}; - -const char *subclass_string[] = { - -}; - #endif diff --git a/kernel/include/pci_info.h b/kernel/include/pci_info.h new file mode 100644 index 0000000..5f818da --- /dev/null +++ b/kernel/include/pci_info.h @@ -0,0 +1,11 @@ +#ifndef PCI_INFO_H +#define PCI_INFO_H + +#include <types.h> + +const char *get_vendor(uint64_t vendor_id); +const char *get_class(uint64_t class_code); +const char *get_subclass(uint64_t class_code, uint64_t subclass); +const char *get_progif(uint64_t class_code, uint64_t subclass, uint64_t progif); + +#endif |
