From eb3b263b11e90902841dc21c5a55c45e59128542 Mon Sep 17 00:00:00 2001 From: Aleksa Vuckovic Date: Thu, 9 Mar 2023 01:22:07 +0100 Subject: pcie device enumeration --- kernel/include/pci.h | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 kernel/include/pci.h (limited to 'kernel/include/pci.h') diff --git a/kernel/include/pci.h b/kernel/include/pci.h new file mode 100644 index 0000000..01d97fc --- /dev/null +++ b/kernel/include/pci.h @@ -0,0 +1,49 @@ +#ifndef PCI_H +#define PCI_H + +#include + +struct pci_dev { + uint16_t vendor_id; + uint16_t device_id; + uint16_t command; + uint16_t status; + uint8_t revision_id; + uint8_t progif; + uint8_t subclass; + uint8_t class_; + uint8_t cache_line_size; + uint8_t latency_timer; + uint8_t header_type; + uint8_t bist; +}; +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 -- cgit v1.2.3