From 730e065e0bba1394750b3172bb7e2f1c0fd42c73 Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Tue, 24 Oct 2023 19:22:27 +0200 Subject: Kernel: Add basic PCI and very basic rtl8139 support --- drivers/pci.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 drivers/pci.h (limited to 'drivers/pci.h') 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 + +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); -- cgit v1.2.3