iPXE
pcibridge.h
Go to the documentation of this file.
1#ifndef _IPXE_PCIBRIDGE_H
2#define _IPXE_PCIBRIDGE_H
3
4/** @file
5 *
6 * PCI-to-PCI bridge
7 *
8 */
9
10FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11
12#include <stdint.h>
13#include <ipxe/list.h>
14#include <ipxe/pci.h>
15
16/** A PCI-to-PCI bridge */
17struct pci_bridge {
18 /** PCI device */
19 struct pci_device *pci;
20 /** Bridge numbers */
21 union {
22 /** Raw dword */
24 struct {
25 /** Primary bus */
27 /** Secondary bus */
29 /** Subordinate bus */
31 } __attribute__ (( packed ));
32 };
33 /** Memory base */
35 /** Memory limit */
37 /** Prefetchable memory base */
39 /** Prefetchable memory limit */
41 /** List of bridges */
43};
44
45extern struct pci_bridge * pcibridge_find ( struct pci_device *pci );
46
47#endif /* _IPXE_PCIBRIDGE_H */
unsigned int uint32_t
Definition stdint.h:12
unsigned long long uint64_t
Definition stdint.h:13
unsigned char uint8_t
Definition stdint.h:10
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define __attribute__(x)
Definition compiler.h:10
Linked lists.
PCI bus.
struct pci_bridge * pcibridge_find(struct pci_device *pci)
Find bridge attached to a PCI device.
Definition pcibridge.c:48
A doubly-linked list entry (or list head)
Definition list.h:19
A PCI-to-PCI bridge.
Definition pcibridge.h:17
uint8_t primary
Primary bus.
Definition pcibridge.h:26
uint64_t prefmembase
Prefetchable memory base.
Definition pcibridge.h:38
struct list_head list
List of bridges.
Definition pcibridge.h:42
uint8_t secondary
Secondary bus.
Definition pcibridge.h:28
uint8_t subordinate
Subordinate bus.
Definition pcibridge.h:30
uint64_t prefmemlimit
Prefetchable memory limit.
Definition pcibridge.h:40
struct pci_device * pci
PCI device.
Definition pcibridge.h:19
uint32_t memlimit
Memory limit.
Definition pcibridge.h:36
uint32_t membase
Memory base.
Definition pcibridge.h:34
uint32_t buses
Raw dword.
Definition pcibridge.h:23
A PCI device.
Definition pci.h:211