From f5826164936359560ef5b88b97fc953065eb7794 Mon Sep 17 00:00:00 2001 From: Aleksa Vuckovic Date: Fri, 10 Mar 2023 23:17:33 +0100 Subject: pci_info: get_ vendor/class/subclass/progif _str --- kernel/include/pci.h | 27 --------------------------- kernel/include/pci_info.h | 11 +++++++++++ 2 files changed, 11 insertions(+), 27 deletions(-) create mode 100644 kernel/include/pci_info.h (limited to 'kernel/include') 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 + +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 -- cgit v1.2.3