diff options
| author | Aleksa Vuckovic <aleksa@vuckovic.cc> | 2023-03-09 01:22:07 +0100 |
|---|---|---|
| committer | Aleksa Vuckovic <aleksa@vuckovic.cc> | 2023-03-09 01:22:07 +0100 |
| commit | eb3b263b11e90902841dc21c5a55c45e59128542 (patch) | |
| tree | aa06c0e5f04907c4f92ec51b3b94f07e98ebd4ee /kernel/include/pci.h | |
| parent | 48a4f607403c074252d3e77b2e0b3c1a8f3b86c7 (diff) | |
pcie device enumeration
Diffstat (limited to 'kernel/include/pci.h')
| -rw-r--r-- | kernel/include/pci.h | 49 |
1 files changed, 49 insertions, 0 deletions
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 <types.h> + +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 |
