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 
10 FILE_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 */
17 struct 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  /** List of bridges */
38  struct list_head list;
39 };
40 
41 extern struct pci_bridge * pcibridge_find ( struct pci_device *pci );
42 
43 #endif /* _IPXE_PCIBRIDGE_H */
#define __attribute__(x)
Definition: compiler.h:10
uint8_t subordinate
Subordinate bus.
Definition: pcibridge.h:30
A doubly-linked list entry (or list head)
Definition: list.h:18
struct pci_device * pci
PCI device.
Definition: pcibridge.h:19
Linked lists.
A PCI-to-PCI bridge.
Definition: pcibridge.h:17
PCI bus.
A PCI device.
Definition: pci.h:206
uint8_t primary
Primary bus.
Definition: pcibridge.h:26
uint32_t memlimit
Memory limit.
Definition: pcibridge.h:36
unsigned char uint8_t
Definition: stdint.h:10
uint8_t secondary
Secondary bus.
Definition: pcibridge.h:28
struct pci_bridge * pcibridge_find(struct pci_device *pci)
Find bridge attached to a PCI device.
Definition: pcibridge.c:48
unsigned int uint32_t
Definition: stdint.h:12
struct list_head list
List of bridges.
Definition: pcibridge.h:38
uint32_t buses
Raw dword.
Definition: pcibridge.h:23
uint32_t membase
Memory base.
Definition: pcibridge.h:34
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)