PCI addresses

PCI address definitions.

Description:

See the PCI specification.

Definitions:

#define PCI_IS_IO (((address) & 1) &&1)

See PCI specification.

#define PCI_IS_MEM (!PCI_IS_IO(address))

See PCI specification.

#define PCI_IO_ADDR ((address) & ~0x3)

See PCI specification.

#define PCI_MEM_ADDR ((address) & ~0xf)

See PCI specification.

#define PCI_ROM_ADDR ((address) & ~1)

See PCI specification.

#define PCI_IS_MMAP20 ((address) & 0x2)

See PCI specification.

#define PCI_IS_MMAP32 (!((address) & 0x6))

See PCI specification.

#define PCI_IS_MMAP64 ((address) & 0x4)

See PCI specification.

#define PCI_IS_PREFETCH ((address) & 0x8)

See PCI specification.

#define PCI_IS_MULTIFUNC ((address) & 0x80)

See PCI specification.

#define PCI_DEVNO ((address) >> 3)

See PCI specification.

#define PCI_FUNCNO ((address) & 7)

See PCI specification.

#define PCI_DEVFUNC (((dev)<<3)|(func))

See PCI specification.