iPXE
ecam.h
Go to the documentation of this file.
1#ifndef _IPXE_ECAM_H
2#define _IPXE_ECAM_H
3
4/** @file
5 *
6 * PCI I/O API for Enhanced Configuration Access Mechanism (ECAM)
7 *
8 */
9
10FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11
12#include <ipxe/acpi.h>
13#include <ipxe/pci.h>
14
15/** Enhanced Configuration Access Mechanism per-device size */
16#define ECAM_SIZE 4096
17
18/** Enhanced Configuration Access Mechanism table signature */
19#define ECAM_SIGNATURE ACPI_SIGNATURE ( 'M', 'C', 'F', 'G' )
20
21/** An Enhanced Configuration Access Mechanism allocation */
23 /** Base address */
25 /** PCI segment number */
27 /** Start PCI bus number */
29 /** End PCI bus number */
31 /** Reserved */
33} __attribute__ (( packed ));
34
35/** An Enhanced Configuration Access Mechanism table */
36struct ecam_table {
37 /** ACPI header */
39 /** Reserved */
41 /** Allocation structures */
43} __attribute__ (( packed ));
44
45/** A mapped Enhanced Configuration Access Mechanism allocation */
47 /** Allocation */
49 /** PCI bus:dev.fn address range */
51 /** MMIO base address */
52 void *regs;
53 /** Mapping result */
54 int rc;
55};
56
57#endif /* _IPXE_ECAM_H */
unsigned short uint16_t
Definition stdint.h:11
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
ACPI data structures.
PCI bus.
An ACPI description header.
Definition acpi.h:180
An Enhanced Configuration Access Mechanism allocation.
Definition ecam.h:22
uint8_t end
End PCI bus number.
Definition ecam.h:30
uint8_t start
Start PCI bus number.
Definition ecam.h:28
uint8_t reserved[4]
Reserved.
Definition ecam.h:32
uint64_t base
Base address.
Definition ecam.h:24
uint16_t segment
PCI segment number.
Definition ecam.h:26
A mapped Enhanced Configuration Access Mechanism allocation.
Definition ecam.h:46
int rc
Mapping result.
Definition ecam.h:54
struct pci_range range
PCI bus:dev.fn address range.
Definition ecam.h:50
void * regs
MMIO base address.
Definition ecam.h:52
struct ecam_allocation alloc
Allocation.
Definition ecam.h:48
An Enhanced Configuration Access Mechanism table.
Definition ecam.h:36
struct acpi_header acpi
ACPI header.
Definition ecam.h:38
uint8_t reserved[8]
Reserved.
Definition ecam.h:40
struct ecam_allocation alloc[0]
Allocation structures.
Definition ecam.h:42
A PCI bus:dev.fn address range.
Definition pci_io.h:23