summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/ecam.h
diff options
context:
space:
mode:
authorSimon Rettberg2022-10-21 17:22:09 +0200
committerSimon Rettberg2022-10-21 17:22:09 +0200
commit80109b804a700384799d54134ceebf4f40a8b7a3 (patch)
treebbdf311ed02dd2c5c1f0a8d1997519ed2c24d93e /src/include/ipxe/ecam.h
parentMerge branch 'master' into openslx (diff)
parent[tls] Add support for Ephemeral Diffie-Hellman key exchange (diff)
downloadipxe-80109b804a700384799d54134ceebf4f40a8b7a3.tar.gz
ipxe-80109b804a700384799d54134ceebf4f40a8b7a3.tar.xz
ipxe-80109b804a700384799d54134ceebf4f40a8b7a3.zip
Merge branch 'master' into openslx
Diffstat (limited to 'src/include/ipxe/ecam.h')
-rw-r--r--src/include/ipxe/ecam.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/include/ipxe/ecam.h b/src/include/ipxe/ecam.h
new file mode 100644
index 000000000..683d613a0
--- /dev/null
+++ b/src/include/ipxe/ecam.h
@@ -0,0 +1,57 @@
+#ifndef _IPXE_ECAM_H
+#define _IPXE_ECAM_H
+
+/** @file
+ *
+ * PCI I/O API for Enhanced Configuration Access Mechanism (ECAM)
+ *
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#include <ipxe/acpi.h>
+#include <ipxe/pci.h>
+
+/** Enhanced Configuration Access Mechanism per-device size */
+#define ECAM_SIZE 4096
+
+/** Enhanced Configuration Access Mechanism table signature */
+#define ECAM_SIGNATURE ACPI_SIGNATURE ( 'M', 'C', 'F', 'G' )
+
+/** An Enhanced Configuration Access Mechanism allocation */
+struct ecam_allocation {
+ /** Base address */
+ uint64_t base;
+ /** PCI segment number */
+ uint16_t segment;
+ /** Start PCI bus number */
+ uint8_t start;
+ /** End PCI bus number */
+ uint8_t end;
+ /** Reserved */
+ uint8_t reserved[4];
+} __attribute__ (( packed ));
+
+/** An Enhanced Configuration Access Mechanism table */
+struct ecam_table {
+ /** ACPI header */
+ struct acpi_header acpi;
+ /** Reserved */
+ uint8_t reserved[8];
+ /** Allocation structures */
+ struct ecam_allocation alloc[0];
+} __attribute__ (( packed ));
+
+/** A mapped Enhanced Configuration Access Mechanism allocation */
+struct ecam_mapping {
+ /** Allocation */
+ struct ecam_allocation alloc;
+ /** PCI bus:dev.fn address range */
+ struct pci_range range;
+ /** MMIO base address */
+ void *regs;
+};
+
+extern struct pci_api ecam_api;
+
+#endif /* _IPXE_ECAM_H */