pci_io.h
Go to the documentation of this file.00001 #ifndef _GPXE_PCI_IO_H
00002 #define _GPXE_PCI_IO_H
00003
00004
00005
00006
00007
00008
00009
00010 FILE_LICENCE ( GPL2_OR_LATER );
00011
00012 #include <stdint.h>
00013 #include <gpxe/api.h>
00014 #include <config/ioapi.h>
00015
00016
00017
00018
00019
00020
00021
00022
00023 #define PCIAPI_INLINE( _subsys, _api_func ) \
00024 SINGLE_API_INLINE ( PCIAPI_PREFIX_ ## _subsys, _api_func )
00025
00026
00027
00028
00029
00030
00031
00032
00033 #define PROVIDE_PCIAPI( _subsys, _api_func, _func ) \
00034 PROVIDE_SINGLE_API ( PCIAPI_PREFIX_ ## _subsys, _api_func, _func )
00035
00036
00037
00038
00039
00040
00041
00042 #define PROVIDE_PCIAPI_INLINE( _subsys, _api_func ) \
00043 PROVIDE_SINGLE_API_INLINE ( PCIAPI_PREFIX_ ## _subsys, _api_func )
00044
00045
00046 #include <gpxe/efi/efi_pci.h>
00047
00048
00049 #include <bits/pci_io.h>
00050
00051
00052
00053
00054
00055
00056 int pci_max_bus ( void );
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066 int pci_read_config_byte ( struct pci_device *pci, unsigned int where,
00067 uint8_t *value );
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077 int pci_read_config_word ( struct pci_device *pci, unsigned int where,
00078 uint16_t *value );
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088 int pci_read_config_dword ( struct pci_device *pci, unsigned int where,
00089 uint32_t *value );
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099 int pci_write_config_byte ( struct pci_device *pci, unsigned int where,
00100 uint8_t value );
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110 int pci_write_config_word ( struct pci_device *pci, unsigned int where,
00111 uint16_t value );
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121 int pci_write_config_dword ( struct pci_device *pci, unsigned int where,
00122 uint32_t value );
00123
00124 #endif