#include <stdint.h>
#include <gpxe/io.h>
Go to the source code of this file.
Defines | |
| #define | PCIAPI_PREFIX_direct __direct_ |
| #define | PCIDIRECT_CONFIG_ADDRESS 0xcf8 |
| #define | PCIDIRECT_CONFIG_DATA 0xcfc |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER) | |
| void | pcidirect_prepare (struct pci_device *pci, int where) |
| Prepare for Type 1 PCI configuration space access. | |
| static __always_inline int | PCIAPI_INLINE (direct, pci_max_bus)(void) |
| Determine maximum PCI bus number within system. | |
| static __always_inline int | PCIAPI_INLINE (direct, pci_read_config_byte)(struct pci_device *pci |
| Read byte from PCI configuration space via Type 1 access. | |
Variables | |
| static __always_inline int unsigned int | where |
Definition in file pcidirect.h.
| #define PCIAPI_PREFIX_direct __direct_ |
Definition at line 12 of file pcidirect.h.
| #define PCIDIRECT_CONFIG_ADDRESS 0xcf8 |
| #define PCIDIRECT_CONFIG_DATA 0xcfc |
Definition at line 22 of file pcidirect.h.
| FILE_LICENCE | ( | GPL2_OR_LATER | ) |
| void pcidirect_prepare | ( | struct pci_device * | pci, | |
| int | where | |||
| ) |
Prepare for Type 1 PCI configuration space access.
| pci | PCI device | |
| where | Location within PCI configuration space |
Definition at line 36 of file pcidirect.c.
References pci_device::bus, pci_device::devfn, outl, and PCIDIRECT_CONFIG_ADDRESS.
00036 { 00037 outl ( ( 0x80000000 | ( pci->bus << 16 ) | ( pci->devfn << 8 ) | 00038 ( where & ~3 ) ), PCIDIRECT_CONFIG_ADDRESS ); 00039 }
| static __always_inline int PCIAPI_INLINE | ( | direct | , | |
| pci_max_bus | ||||
| ) | [inline, static] |
Determine maximum PCI bus number within system.
| max_bus | Maximum bus number |
Definition at line 34 of file pcidirect.h.
| static __always_inline int PCIAPI_INLINE | ( | direct | , | |
| pci_read_config_byte | ||||
| ) | [inline, static] |
Read byte from PCI configuration space via Type 1 access.
| pci | PCI device | |
| where | Location within PCI configuration space | |
| value | Value read |
| rc | Return status code |
| __always_inline int unsigned int where |
Definition at line 49 of file pcidirect.h.
1.5.7.1