]> git.proxmox.com Git - mirror_edk2.git/blob - DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.h
DynamicTablesPkg: AcpiSsdtPcieLibArm: Remove link device generation
[mirror_edk2.git] / DynamicTablesPkg / Library / Acpi / Arm / AcpiSsdtPcieLibArm / SsdtPcieGenerator.h
1 /** @file
2 SSDT Pcie Table Generator.
3
4 Copyright (c) 2021, Arm Limited. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 @par Reference(s):
8 - PCI Firmware Specification - Revision 3.0
9 - ACPI 6.4 specification:
10 - s6.2.13 "_PRT (PCI Routing Table)"
11 - s6.1.1 "_ADR (Address)"
12 - linux kernel code
13 - Arm Base Boot Requirements v1.0
14 **/
15
16 #ifndef SSDT_PCIE_GENERATOR_H_
17 #define SSDT_PCIE_GENERATOR_H_
18
19 /** Pci address attributes.
20
21 This can also be denoted as space code, address space or ss.
22 */
23 #define PCI_SS_CONFIG 0
24 #define PCI_SS_IO 1
25 #define PCI_SS_M32 2
26 #define PCI_SS_M64 3
27
28 /** Maximum Pci root complexes supported by this generator.
29
30 Note: This is not a hard limitation and can be extended if needed.
31 Corresponding changes would be needed to support the Name and
32 UID fields describing the Pci root complexes.
33 */
34 #define MAX_PCI_ROOT_COMPLEXES_SUPPORTED 16
35
36 // _SB scope of the AML namespace.
37 #define SB_SCOPE "\\_SB_"
38
39 /** C array containing the compiled AML template.
40 This symbol is defined in the auto generated C file
41 containing the AML bytecode array.
42 */
43 extern CHAR8 ssdtpcieosctemplate_aml_code[];
44
45 #pragma pack(1)
46
47 /** Structure used to map integer to an index.
48 */
49 typedef struct MappingTable {
50 /// Mapping table.
51 /// Contains the Index <-> integer mapping
52 UINT32 *Table;
53
54 /// Last used index of the Table.
55 /// Bound by MaxIndex.
56 UINT32 LastIndex;
57
58 /// Number of entries in the Table.
59 UINT32 MaxIndex;
60 } MAPPING_TABLE;
61
62 /** A structure holding the Pcie generator and additional private data.
63 */
64 typedef struct AcpiPcieGenerator {
65 /// ACPI Table generator header
66 ACPI_TABLE_GENERATOR Header;
67
68 // Private fields are defined from here.
69
70 /// Table to map: Index <-> Pci device
71 MAPPING_TABLE DeviceTable;
72 } ACPI_PCI_GENERATOR;
73
74 #pragma pack()
75
76 #endif // SSDT_PCIE_GENERATOR_H_