1 | /** @file
|
---|
2 |
|
---|
3 | Defines the X64 Namespace Object.
|
---|
4 |
|
---|
5 | Copyright (C) 2024 - 2025 Advanced Micro Devices, Inc. All rights reserved.
|
---|
6 |
|
---|
7 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
8 |
|
---|
9 | @par Glossary:
|
---|
10 | - Cm or CM - Configuration Manager
|
---|
11 | - Obj or OBJ - Object
|
---|
12 | - X64 or x64 - X64 Architecture
|
---|
13 | **/
|
---|
14 |
|
---|
15 | #ifndef X64_NAMESPACE_OBJECTS_H_
|
---|
16 | #define X64_NAMESPACE_OBJECTS_H_
|
---|
17 |
|
---|
18 | #include <AcpiObjects.h>
|
---|
19 | #include <StandardNameSpaceObjects.h>
|
---|
20 |
|
---|
21 | #pragma pack(1)
|
---|
22 |
|
---|
23 | /** The LOCAL_APIC_MODE enum describes the Local APIC
|
---|
24 | mode in the X64 Namespace
|
---|
25 | */
|
---|
26 | typedef enum {
|
---|
27 | LocalApicModeInvalid = 0,
|
---|
28 | LocalApicModeXApic,
|
---|
29 | LocalApicModeX2Apic
|
---|
30 | } LOCAL_APIC_MODE;
|
---|
31 |
|
---|
32 | /** The EX64_OBJECT_ID enum describes the Object IDs
|
---|
33 | in the X64 Namespace
|
---|
34 | */
|
---|
35 | typedef enum X64ObjectID {
|
---|
36 | EX64ObjReserved, ///< 0 - Reserved
|
---|
37 | EX64ObjFadtSciInterrupt, ///< 1 - FADT SCI Interrupt information
|
---|
38 | EX64ObjFadtSciCmdInfo, ///< 2 - FADT SCI CMD information
|
---|
39 | EX64ObjFadtPmBlockInfo, ///< 3 - FADT Power management block info
|
---|
40 | EX64ObjFadtGpeBlockInfo, ///< 4 - FADT GPE block info
|
---|
41 | EX64ObjFadtXpmBlockInfo, ///< 5 - FADT 64-bit Power Management block info
|
---|
42 | EX64ObjFadtXgpeBlockInfo, ///< 6 - FADT 64-bit GPE block info
|
---|
43 | EX64ObjFadtSleepBlockInfo, ///< 7 - FADT Sleep block info
|
---|
44 | EX64ObjFadtResetBlockInfo, ///< 8 - FADT Reset block info
|
---|
45 | EX64ObjFadtMiscInfo, ///< 9 - FADT Legacy fields info
|
---|
46 | EX64ObjWsmtFlagsInfo, ///< 10 - WSMT protection flags info
|
---|
47 | EX64ObjHpetInfo, ///< 11 - HPET device info
|
---|
48 | EX64ObjMadtInfo, ///< 12 - MADT info
|
---|
49 | EX64ObjLocalApicX2ApicInfo, ///< 13 - Local APIC and X2APIC info
|
---|
50 | EX64ObjIoApicInfo, ///< 14 - IO APIC info
|
---|
51 | EX64ObjIntrSourceOverrideInfo, ///< 15 - Interrupt Source Override info
|
---|
52 | EX64ObjLocalApicX2ApicNmiInfo, ///< 16 - Local APIC and X2APIC NMI info
|
---|
53 | EX64ObjFacsInfo, ///< 17 - FACS info
|
---|
54 | EX64ObjLocalApicX2ApicAffinityInfo, ///< 18 - Local APIC and X2APIC Affinity info
|
---|
55 | EX64ObjMax ///< 19 - Maximum Object ID
|
---|
56 | } EX64_OBJECT_ID;
|
---|
57 |
|
---|
58 | /** A structure that describes the
|
---|
59 | SCI interrupt Information for the Platform.
|
---|
60 |
|
---|
61 | ID: EX64ObjFadtSciInterrupt
|
---|
62 | */
|
---|
63 | typedef struct CmX64FadtSciInterrupt {
|
---|
64 | /** This is the SCI interrupt field of the FADT Table
|
---|
65 | described in the ACPI Specification
|
---|
66 | */
|
---|
67 | UINT16 SciInterrupt;
|
---|
68 | } CM_X64_FADT_SCI_INTERRUPT;
|
---|
69 |
|
---|
70 | /** A structure that describes the
|
---|
71 | SCI CMD Information for the Platform.
|
---|
72 |
|
---|
73 | ID: EX64ObjFadtSciCmdInfo
|
---|
74 | */
|
---|
75 | typedef struct CmX64FadtSciCmdInfo {
|
---|
76 | /** This is the System control interrupt command information of the FADT Table
|
---|
77 | described in the ACPI Specification
|
---|
78 | */
|
---|
79 | UINT32 SciCmd;
|
---|
80 | UINT8 AcpiEnable;
|
---|
81 | UINT8 AcpiDisable;
|
---|
82 | UINT8 S4BiosReq;
|
---|
83 | UINT8 PstateCnt;
|
---|
84 | UINT8 CstCnt;
|
---|
85 | } CM_X64_FADT_SCI_CMD_INFO;
|
---|
86 |
|
---|
87 | /** A structure that describes the
|
---|
88 | power management block information.
|
---|
89 |
|
---|
90 | ID: EX64ObjFadtPmBlockInfo
|
---|
91 | */
|
---|
92 | typedef struct CmX64FadtPmBlockInfo {
|
---|
93 | /** This is the PM event block information of the FADT Table
|
---|
94 | described in the ACPI Specification
|
---|
95 | */
|
---|
96 | UINT32 Pm1aEvtBlk;
|
---|
97 | UINT32 Pm1bEvtBlk;
|
---|
98 | UINT32 Pm1aCntBlk;
|
---|
99 | UINT32 Pm1bCntBlk;
|
---|
100 | UINT32 Pm2CntBlk;
|
---|
101 | UINT32 PmTmrBlk;
|
---|
102 | UINT8 Pm1EvtLen;
|
---|
103 | UINT8 Pm1CntLen;
|
---|
104 | UINT8 Pm2CntLen;
|
---|
105 | UINT8 PmTmrLen;
|
---|
106 | } CM_X64_FADT_PM_BLOCK_INFO;
|
---|
107 |
|
---|
108 | /** A structure that describes the
|
---|
109 | GPE block information.
|
---|
110 |
|
---|
111 | ID: EX64ObjFadtGpeBlockInfo
|
---|
112 | */
|
---|
113 | typedef struct CmX64FadtGpeBlockInfo {
|
---|
114 | /** This is the GPE Block information of the FADT Table
|
---|
115 | described in the ACPI Specification
|
---|
116 | */
|
---|
117 | UINT32 Gpe0Blk;
|
---|
118 | UINT32 Gpe1Blk;
|
---|
119 | UINT8 Gpe0BlkLen;
|
---|
120 | UINT8 Gpe1BlkLen;
|
---|
121 | UINT8 Gpe1Base;
|
---|
122 | } CM_X64_FADT_GPE_BLOCK_INFO;
|
---|
123 |
|
---|
124 | /** A structure that describes the
|
---|
125 | 64bit power management block information.
|
---|
126 |
|
---|
127 | ID: EX64ObjFadtXpmBlockInfo
|
---|
128 | */
|
---|
129 | typedef struct CmX64FadtXpmBlockInfo {
|
---|
130 | /** This is the System control interrupt command information of the FADT Table
|
---|
131 | described in the ACPI Specification
|
---|
132 | */
|
---|
133 | EFI_ACPI_6_5_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk;
|
---|
134 | EFI_ACPI_6_5_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk;
|
---|
135 | EFI_ACPI_6_5_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk;
|
---|
136 | EFI_ACPI_6_5_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk;
|
---|
137 | EFI_ACPI_6_5_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk;
|
---|
138 | EFI_ACPI_6_5_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk;
|
---|
139 | } CM_X64_FADT_X_PM_BLOCK_INFO;
|
---|
140 |
|
---|
141 | /** A structure that describes the
|
---|
142 | 64-bit GPE block information.
|
---|
143 |
|
---|
144 | ID: EX64ObjFadtXgpeBlockInfo
|
---|
145 | */
|
---|
146 | typedef struct CmX64FadtXgpeBlockInfo {
|
---|
147 | /** This is the GPE Block information of the FADT Table
|
---|
148 | described in the ACPI Specification
|
---|
149 | */
|
---|
150 | EFI_ACPI_6_5_GENERIC_ADDRESS_STRUCTURE XGpe0Blk;
|
---|
151 | EFI_ACPI_6_5_GENERIC_ADDRESS_STRUCTURE XGpe1Blk;
|
---|
152 | } CM_X64_FADT_X_GPE_BLOCK_INFO;
|
---|
153 |
|
---|
154 | /** A structure that describes the
|
---|
155 | sleep control block information.
|
---|
156 |
|
---|
157 | ID: EX64ObjFadtSleepBlockInfo
|
---|
158 | */
|
---|
159 | typedef struct CmX64FadtSleepBlockInfo {
|
---|
160 | EFI_ACPI_6_5_GENERIC_ADDRESS_STRUCTURE SleepControlReg;
|
---|
161 | EFI_ACPI_6_5_GENERIC_ADDRESS_STRUCTURE SleepStatusReg;
|
---|
162 | } CM_X64_FADT_SLEEP_BLOCK_INFO;
|
---|
163 |
|
---|
164 | /** A structure that describes the
|
---|
165 | Reset control block information.
|
---|
166 |
|
---|
167 | ID: EX64ObjFadtResetBlockInfo
|
---|
168 | */
|
---|
169 | typedef struct CmX64FadtResetBlockInfo {
|
---|
170 | EFI_ACPI_6_5_GENERIC_ADDRESS_STRUCTURE ResetReg;
|
---|
171 | UINT8 ResetValue;
|
---|
172 | } CM_X64_FADT_RESET_BLOCK_INFO;
|
---|
173 |
|
---|
174 | /** A structure that describes the
|
---|
175 | miscellaneous FADT fields information.
|
---|
176 |
|
---|
177 | ID: EX64ObjFadtMiscInfo
|
---|
178 | */
|
---|
179 | typedef struct CmX64FadtFadtMiscInfo {
|
---|
180 | UINT16 PLvl2Lat;
|
---|
181 | UINT16 PLvl3Lat;
|
---|
182 | UINT16 FlushSize;
|
---|
183 | UINT16 FlushStride;
|
---|
184 | UINT8 DutyOffset;
|
---|
185 | UINT8 DutyWidth;
|
---|
186 | UINT8 DayAlrm;
|
---|
187 | UINT8 MonAlrm;
|
---|
188 | UINT8 Century;
|
---|
189 | } CM_X64_FADT_MISC_INFO;
|
---|
190 |
|
---|
191 | /**
|
---|
192 | A structure that describes the WSMT protection flags information.
|
---|
193 |
|
---|
194 | ID: EX64ObjWsmtFlagsInfo
|
---|
195 | */
|
---|
196 | typedef struct CmX64WsmtFlagsInfo {
|
---|
197 | UINT32 ProtectionFlags;
|
---|
198 | } CM_X64_WSMT_FLAGS_INFO;
|
---|
199 |
|
---|
200 | /**
|
---|
201 | A structure that describes the HPET device information.
|
---|
202 |
|
---|
203 | ID: EX64ObjHpetInfo
|
---|
204 | */
|
---|
205 | typedef struct CmX64HpetInfo {
|
---|
206 | UINT32 BaseAddressLower32Bit;
|
---|
207 | UINT16 MainCounterMinimumClockTickInPeriodicMode;
|
---|
208 | UINT8 PageProtectionAndOemAttribute;
|
---|
209 | } CM_X64_HPET_INFO;
|
---|
210 |
|
---|
211 | /**
|
---|
212 | A structure that describes the MADT information.
|
---|
213 |
|
---|
214 | ID: EX64ObjMadtInfo
|
---|
215 | */
|
---|
216 | typedef struct CmX64MadtInfo {
|
---|
217 | UINT32 LocalApicAddress;
|
---|
218 | UINT32 Flags;
|
---|
219 | LOCAL_APIC_MODE ApicMode;
|
---|
220 | } CM_X64_MADT_INFO;
|
---|
221 |
|
---|
222 | /**
|
---|
223 | A structure that describes the Local APIC and X2APIC information.
|
---|
224 | This structure includes fields from the ACPI_6_5_LOCAL_APIC_STRUCTURE
|
---|
225 | and ACPI_6_5_LOCAL_X2APIC_STRUCTURE from the ACPI specifications.
|
---|
226 | Additional fields are included to support CPU SSDT topology generation.
|
---|
227 |
|
---|
228 | ID: EX64ObjLocalApicX2ApicInfo
|
---|
229 | */
|
---|
230 | typedef struct CmX64LocalApicX2ApicInfo {
|
---|
231 | UINT32 ApicId;
|
---|
232 | UINT32 Flags;
|
---|
233 | UINT32 AcpiProcessorUid;
|
---|
234 | } CM_X64_LOCAL_APIC_X2APIC_INFO;
|
---|
235 |
|
---|
236 | /**
|
---|
237 | A structure that describes the IO APIC information.
|
---|
238 |
|
---|
239 | ID: EX64ObjIoApicInfo
|
---|
240 | */
|
---|
241 | typedef struct CmX64IoApicInfo {
|
---|
242 | UINT8 IoApicId;
|
---|
243 | UINT32 IoApicAddress;
|
---|
244 | UINT32 GlobalSystemInterruptBase;
|
---|
245 | } CM_X64_IO_APIC_INFO;
|
---|
246 |
|
---|
247 | /**
|
---|
248 | A structure that describes the Interrupt Source Override information.
|
---|
249 |
|
---|
250 | ID: EX64ObjIntrSourceOverrideInfo
|
---|
251 | */
|
---|
252 | typedef struct CmX64IntrSourceOverrideInfo {
|
---|
253 | UINT8 Bus;
|
---|
254 | UINT8 Source;
|
---|
255 | UINT32 GlobalSystemInterrupt;
|
---|
256 | UINT16 Flags;
|
---|
257 | } CM_X64_INTR_SOURCE_OVERRIDE_INFO;
|
---|
258 |
|
---|
259 | /**
|
---|
260 | A structure that describes the Local APIC NMI information.
|
---|
261 |
|
---|
262 | ID: EX64ObjLocalApicX2ApicNmiInfo
|
---|
263 | */
|
---|
264 | typedef struct CmX64LocalApicX2ApicNmiInfo {
|
---|
265 | UINT16 Flags;
|
---|
266 | UINT32 AcpiProcessorUid;
|
---|
267 | UINT8 LocalApicLint;
|
---|
268 | } CM_X64_LOCAL_APIC_X2APIC_NMI_INFO;
|
---|
269 |
|
---|
270 | /**
|
---|
271 | A structure that describes the FACS information.
|
---|
272 |
|
---|
273 | ID: EX64ObjFacsInfo
|
---|
274 | */
|
---|
275 | typedef struct CmX64FacsInfo {
|
---|
276 | UINT32 FirmwareWakingVector;
|
---|
277 | UINT32 Flags;
|
---|
278 | UINT64 XFirmwareWakingVector;
|
---|
279 | UINT32 OspmFlags;
|
---|
280 | } CM_X64_FACS_INFO;
|
---|
281 |
|
---|
282 | /**
|
---|
283 | A structure that describes the Local APIC and X2APIC Affinity information.
|
---|
284 |
|
---|
285 | ID: EX64ObjLocalApicX2ApicAffinityInfo
|
---|
286 | */
|
---|
287 | typedef struct CmX64LocalApicX2ApicAffinityInfo {
|
---|
288 | LOCAL_APIC_MODE ApicMode;
|
---|
289 | UINT32 ApicId;
|
---|
290 | UINT32 ProximityDomain;
|
---|
291 | UINT32 Flags;
|
---|
292 | UINT32 ClockDomain;
|
---|
293 | } CM_X64_LOCAL_APIC_X2APIC_AFFINITY_INFO;
|
---|
294 |
|
---|
295 | #pragma pack()
|
---|
296 | #endif // X64_NAMESPACE_OBJECTS_H_
|
---|