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