summaryrefslogtreecommitdiff
path: root/src/hardware/pci.h
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-08-01 16:57:04 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2017-08-01 16:57:04 +0200
commit81965b139d171744e1a0d7a8e9aeace74c8a6103 (patch)
treedde537bd122a4cf0d21e24c343584bfa1749f653 /src/hardware/pci.h
parentd86f301ecb8c773cde8afc646a8b7ae578b8a232 (diff)
downloadabaos-81965b139d171744e1a0d7a8e9aeace74c8a6103.tar.gz
abaos-81965b139d171744e1a0d7a8e9aeace74c8a6103.tar.bz2
added function pci_enable_bus_mastering to enable DMA transfers on the PCI bus
adapted interface of pci_device_get_driver to also take a pointer to the PCI controller the PCI descriptor of a device also contains bus, device and function now
Diffstat (limited to 'src/hardware/pci.h')
-rw-r--r--src/hardware/pci.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/hardware/pci.h b/src/hardware/pci.h
index 9bc29bb..ccfd20f 100644
--- a/src/hardware/pci.h
+++ b/src/hardware/pci.h
@@ -8,6 +8,9 @@
#include "driver.h"
typedef struct {
+ uint16_t bus;
+ uint16_t device;
+ uint16_t function;
uint16_t vendor_id;
uint16_t device_id;
uint8_t class_id;
@@ -45,6 +48,8 @@ void pci_device_descriptor_init( pci_device_descriptor_t *descriptor, pci_contro
void pci_base_address_register_init( pci_base_address_register_t *base_address_register, pci_controller_t *controller, uint16_t bus, uint16_t device, uint16_t function, uint16_t bar );
-driver_t *pci_device_get_driver( pci_device_descriptor_t *descriptor, interrupt_t *interrupt, void *context );
+driver_t *pci_device_get_driver( pci_controller_t *pci, pci_device_descriptor_t *descriptor, interrupt_t *interrupt, void *context );
+
+void pci_enable_bus_mastering( pci_controller_t *controller, pci_device_descriptor_t *descriptor );
#endif // PCI_H