- Main Page
- Data Structures
- Files
- Directories

- Search for |

- File List
- Globals

# pci.h File Reference

`#include <ubixos/types.h>`

Include dependency graph for pci.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
struct | confadd
struct | pciConfig
## Defines
#define | countof(a) (sizeof(a) / sizeof(a[0]))
## Functions
int | pci_init ()
bool | pciProbe (int bus, int dev, int func, struct pciConfig *cfg)
uInt32 | pciRead (int bus, int dev, int func, int reg, int bytes)
void | pciWrite (int bus, int dev, int func, int reg, uInt32 v, int bytes)

## Define Documentation

#define countof | ( | a |  | ) | (sizeof(a) / sizeof(a[0]))

Definition at line 77 of file pci.h.

Referenced by pci_init().

## Function Documentation

int pci_init | ( |  | ) |

Definition at line 292 of file pci.c.

References pciConfig::baseClass, confadd::bus, countof, confadd::dev, confadd::func, pciConfig::interface, pciConfig::irq, kprintf(), name, pciClasses, pciProbe(), pciConfig::subClass, and TRUE.

Here is the call graph for this function:

bool pciProbe | ( | int | bus,
|  | int | dev,
|  | int | func,
|  | struct pciConfig * | cfg |
| ) |  |  |

Definition at line 236 of file pci.c.

References pciConfig::base, pciConfig::baseClass, pciConfig::bist, pciConfig::bus, pciConfig::cacheLineSize, pciConfig::command, pciConfig::dev, pciConfig::deviceId, FALSE, pciConfig::func, pciConfig::headerType, pciConfig::interface, pciConfig::irq, kprintf(), pciConfig::latencyTimer, pciRead(), pciWrite(), pciConfig::size, pciConfig::status, pciConfig::subClass, pciConfig::subsys, pciConfig::subsysVendor, TRUE, pciConfig::vendorId, and x10.

Referenced by pci_init().

Here is the call graph for this function:

uInt32 pciRead | ( | int | bus,
|  | int | dev,
|  | int | func,
|  | int | reg,
|  | int | bytes |
| ) |  |  |

Definition at line 182 of file pci.c.

References inportByte(), inportDWord(), inportWord(), and outportDWord().

Referenced by pciProbe().

Here is the call graph for this function:

void pciWrite | ( | int | bus,
|  | int | dev,
|  | int | func,
|  | int | reg,
|  | uInt32 | v,
|  | int | bytes |
| ) |  |  |

Definition at line 210 of file pci.c.

References outportByte(), outportDWord(), and outportWord().

Referenced by pciProbe().

Here is the call graph for this function: