summaryrefslogtreecommitdiff
path: root/drivers/pci.h
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2023-10-24 19:22:27 +0200
committerAnton Kling <anton@kling.gg>2023-10-30 21:49:48 +0100
commit730e065e0bba1394750b3172bb7e2f1c0fd42c73 (patch)
treea37d4745fccb530948eb795a3eca7200c24d63b9 /drivers/pci.h
parentba1952bf4c08b7783854d501ba30815a2aa2574c (diff)
Kernel: Add basic PCI and very basic rtl8139 support
Diffstat (limited to 'drivers/pci.h')
-rw-r--r--drivers/pci.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/pci.h b/drivers/pci.h
new file mode 100644
index 0000000..6a8bc1c
--- /dev/null
+++ b/drivers/pci.h
@@ -0,0 +1,14 @@
+#include <stdint.h>
+
+struct PCI_DEVICE {
+ uint16_t vendor;
+ uint16_t device;
+ uint8_t bus;
+ uint8_t slot;
+};
+
+uint32_t pci_config_read32(const struct PCI_DEVICE *device, uint8_t func,
+ uint8_t offset);
+
+int pci_populate_device_struct(uint16_t vendor, uint16_t device,
+ struct PCI_DEVICE *pci_device);