diff options
author | Freya Murphy <freya@freyacat.org> | 2024-02-04 14:19:54 -0500 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2024-02-04 14:19:54 -0500 |
commit | 1b09896afcf562d199d4df8d671601bba2b1f081 (patch) | |
tree | b4ee4ae8e6e1ff5c5b27fe97509752b17fae330b /include/sys/pci.h | |
parent | fix acpi on uefi, kprint fixes (diff) | |
download | corn-1b09896afcf562d199d4df8d671601bba2b1f081.tar.gz corn-1b09896afcf562d199d4df8d671601bba2b1f081.tar.bz2 corn-1b09896afcf562d199d4df8d671601bba2b1f081.zip |
Diffstat (limited to 'include/sys/pci.h')
-rw-r--r-- | include/sys/pci.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/sys/pci.h b/include/sys/pci.h new file mode 100644 index 0000000..1451434 --- /dev/null +++ b/include/sys/pci.h @@ -0,0 +1,16 @@ +#pragma once + +#ifndef PCI_INTERNAL + #error "do not include <sys/pci.h>, only use <pci.h>" +#endif + +#include <stdint.h> +#include <pci.h> + +uint32_t pci_sys_rcfg_d(struct pci_device dev, uint8_t offset); +uint16_t pci_sys_rcfg_w(struct pci_device dev, uint8_t offset); +uint8_t pci_sys_rcfg_b(struct pci_device dev, uint8_t offset); + +void pci_sys_wcfg_d(struct pci_device dev, uint8_t offset, uint32_t dword); +void pci_sys_wcfg_w(struct pci_device dev, uint8_t offset, uint16_t word); +void pci_sys_wcfg_b(struct pci_device dev, uint8_t offset, uint8_t byte); |