actbl3.h revision 1.1.1.2 1 1.1 christos /******************************************************************************
2 1.1 christos *
3 1.1 christos * Name: actbl3.h - ACPI Table Definitions
4 1.1 christos *
5 1.1 christos *****************************************************************************/
6 1.1 christos
7 1.1 christos /*
8 1.1.1.2 christos * Copyright (C) 2000 - 2014, Intel Corp.
9 1.1 christos * All rights reserved.
10 1.1 christos *
11 1.1 christos * Redistribution and use in source and binary forms, with or without
12 1.1 christos * modification, are permitted provided that the following conditions
13 1.1 christos * are met:
14 1.1 christos * 1. Redistributions of source code must retain the above copyright
15 1.1 christos * notice, this list of conditions, and the following disclaimer,
16 1.1 christos * without modification.
17 1.1 christos * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 1.1 christos * substantially similar to the "NO WARRANTY" disclaimer below
19 1.1 christos * ("Disclaimer") and any redistribution must be conditioned upon
20 1.1 christos * including a substantially similar Disclaimer requirement for further
21 1.1 christos * binary redistribution.
22 1.1 christos * 3. Neither the names of the above-listed copyright holders nor the names
23 1.1 christos * of any contributors may be used to endorse or promote products derived
24 1.1 christos * from this software without specific prior written permission.
25 1.1 christos *
26 1.1 christos * Alternatively, this software may be distributed under the terms of the
27 1.1 christos * GNU General Public License ("GPL") version 2 as published by the Free
28 1.1 christos * Software Foundation.
29 1.1 christos *
30 1.1 christos * NO WARRANTY
31 1.1 christos * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 1.1 christos * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 1.1 christos * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 1.1 christos * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 1.1 christos * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 1.1 christos * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 1.1 christos * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 1.1 christos * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 1.1 christos * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 1.1 christos * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 1.1 christos * POSSIBILITY OF SUCH DAMAGES.
42 1.1 christos */
43 1.1 christos
44 1.1 christos #ifndef __ACTBL3_H__
45 1.1 christos #define __ACTBL3_H__
46 1.1 christos
47 1.1 christos
48 1.1 christos /*******************************************************************************
49 1.1 christos *
50 1.1 christos * Additional ACPI Tables (3)
51 1.1 christos *
52 1.1 christos * These tables are not consumed directly by the ACPICA subsystem, but are
53 1.1 christos * included here to support device drivers and the AML disassembler.
54 1.1 christos *
55 1.1 christos * The tables in this file are fully defined within the ACPI specification.
56 1.1 christos *
57 1.1 christos ******************************************************************************/
58 1.1 christos
59 1.1 christos
60 1.1 christos /*
61 1.1 christos * Values for description table header signatures for tables defined in this
62 1.1 christos * file. Useful because they make it more difficult to inadvertently type in
63 1.1 christos * the wrong signature.
64 1.1 christos */
65 1.1 christos #define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */
66 1.1 christos #define ACPI_SIG_DRTM "DRTM" /* Dynamic Root of Trust for Measurement table */
67 1.1 christos #define ACPI_SIG_FPDT "FPDT" /* Firmware Performance Data Table */
68 1.1 christos #define ACPI_SIG_GTDT "GTDT" /* Generic Timer Description Table */
69 1.1 christos #define ACPI_SIG_MPST "MPST" /* Memory Power State Table */
70 1.1 christos #define ACPI_SIG_PCCT "PCCT" /* Platform Communications Channel Table */
71 1.1 christos #define ACPI_SIG_PMTT "PMTT" /* Platform Memory Topology Table */
72 1.1 christos #define ACPI_SIG_RASF "RASF" /* RAS Feature table */
73 1.1 christos #define ACPI_SIG_TPM2 "TPM2" /* Trusted Platform Module 2.0 H/W interface table */
74 1.1 christos
75 1.1 christos #define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */
76 1.1 christos #define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */
77 1.1 christos
78 1.1 christos /* Reserved table signatures */
79 1.1 christos
80 1.1 christos #define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */
81 1.1 christos #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
82 1.1 christos #define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */
83 1.1 christos
84 1.1 christos /*
85 1.1 christos * All tables must be byte-packed to match the ACPI specification, since
86 1.1 christos * the tables are provided by the system BIOS.
87 1.1 christos */
88 1.1 christos #pragma pack(1)
89 1.1 christos
90 1.1 christos /*
91 1.1 christos * Note: C bitfields are not used for this reason:
92 1.1 christos *
93 1.1 christos * "Bitfields are great and easy to read, but unfortunately the C language
94 1.1 christos * does not specify the layout of bitfields in memory, which means they are
95 1.1 christos * essentially useless for dealing with packed data in on-disk formats or
96 1.1 christos * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
97 1.1 christos * this decision was a design error in C. Ritchie could have picked an order
98 1.1 christos * and stuck with it." Norman Ramsey.
99 1.1 christos * See http://stackoverflow.com/a/1053662/41661
100 1.1 christos */
101 1.1 christos
102 1.1 christos
103 1.1 christos /*******************************************************************************
104 1.1 christos *
105 1.1 christos * BGRT - Boot Graphics Resource Table (ACPI 5.0)
106 1.1 christos * Version 1
107 1.1 christos *
108 1.1 christos ******************************************************************************/
109 1.1 christos
110 1.1 christos typedef struct acpi_table_bgrt
111 1.1 christos {
112 1.1 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
113 1.1 christos UINT16 Version;
114 1.1 christos UINT8 Status;
115 1.1 christos UINT8 ImageType;
116 1.1 christos UINT64 ImageAddress;
117 1.1 christos UINT32 ImageOffsetX;
118 1.1 christos UINT32 ImageOffsetY;
119 1.1 christos
120 1.1 christos } ACPI_TABLE_BGRT;
121 1.1 christos
122 1.1 christos
123 1.1 christos /*******************************************************************************
124 1.1 christos *
125 1.1 christos * DRTM - Dynamic Root of Trust for Measurement table
126 1.1 christos *
127 1.1 christos ******************************************************************************/
128 1.1 christos
129 1.1 christos typedef struct acpi_table_drtm
130 1.1 christos {
131 1.1 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
132 1.1 christos UINT64 EntryBaseAddress;
133 1.1 christos UINT64 EntryLength;
134 1.1 christos UINT32 EntryAddress32;
135 1.1 christos UINT64 EntryAddress64;
136 1.1 christos UINT64 ExitAddress;
137 1.1 christos UINT64 LogAreaAddress;
138 1.1 christos UINT32 LogAreaLength;
139 1.1 christos UINT64 ArchDependentAddress;
140 1.1 christos UINT32 Flags;
141 1.1 christos
142 1.1 christos } ACPI_TABLE_DRTM;
143 1.1 christos
144 1.1 christos /* 1) Validated Tables List */
145 1.1 christos
146 1.1 christos typedef struct acpi_drtm_vtl_list
147 1.1 christos {
148 1.1 christos UINT32 ValidatedTableListCount;
149 1.1 christos
150 1.1 christos } ACPI_DRTM_VTL_LIST;
151 1.1 christos
152 1.1 christos /* 2) Resources List */
153 1.1 christos
154 1.1 christos typedef struct acpi_drtm_resource_list
155 1.1 christos {
156 1.1 christos UINT32 ResourceListCount;
157 1.1 christos
158 1.1 christos } ACPI_DRTM_RESOURCE_LIST;
159 1.1 christos
160 1.1 christos /* 3) Platform-specific Identifiers List */
161 1.1 christos
162 1.1 christos typedef struct acpi_drtm_id_list
163 1.1 christos {
164 1.1 christos UINT32 IdListCount;
165 1.1 christos
166 1.1 christos } ACPI_DRTM_ID_LIST;
167 1.1 christos
168 1.1 christos
169 1.1 christos /*******************************************************************************
170 1.1 christos *
171 1.1 christos * FPDT - Firmware Performance Data Table (ACPI 5.0)
172 1.1 christos * Version 1
173 1.1 christos *
174 1.1 christos ******************************************************************************/
175 1.1 christos
176 1.1 christos typedef struct acpi_table_fpdt
177 1.1 christos {
178 1.1 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
179 1.1 christos
180 1.1 christos } ACPI_TABLE_FPDT;
181 1.1 christos
182 1.1 christos
183 1.1 christos /* FPDT subtable header */
184 1.1 christos
185 1.1 christos typedef struct acpi_fpdt_header
186 1.1 christos {
187 1.1 christos UINT16 Type;
188 1.1 christos UINT8 Length;
189 1.1 christos UINT8 Revision;
190 1.1 christos
191 1.1 christos } ACPI_FPDT_HEADER;
192 1.1 christos
193 1.1 christos /* Values for Type field above */
194 1.1 christos
195 1.1 christos enum AcpiFpdtType
196 1.1 christos {
197 1.1 christos ACPI_FPDT_TYPE_BOOT = 0,
198 1.1 christos ACPI_FPDT_TYPE_S3PERF = 1
199 1.1 christos };
200 1.1 christos
201 1.1 christos
202 1.1 christos /*
203 1.1 christos * FPDT subtables
204 1.1 christos */
205 1.1 christos
206 1.1 christos /* 0: Firmware Basic Boot Performance Record */
207 1.1 christos
208 1.1 christos typedef struct acpi_fpdt_boot
209 1.1 christos {
210 1.1 christos ACPI_FPDT_HEADER Header;
211 1.1 christos UINT8 Reserved[4];
212 1.1 christos UINT64 ResetEnd;
213 1.1 christos UINT64 LoadStart;
214 1.1 christos UINT64 StartupStart;
215 1.1 christos UINT64 ExitServicesEntry;
216 1.1 christos UINT64 ExitServicesExit;
217 1.1 christos
218 1.1 christos } ACPI_FPDT_BOOT;
219 1.1 christos
220 1.1 christos
221 1.1 christos /* 1: S3 Performance Table Pointer Record */
222 1.1 christos
223 1.1 christos typedef struct acpi_fpdt_s3pt_ptr
224 1.1 christos {
225 1.1 christos ACPI_FPDT_HEADER Header;
226 1.1 christos UINT8 Reserved[4];
227 1.1 christos UINT64 Address;
228 1.1 christos
229 1.1 christos } ACPI_FPDT_S3PT_PTR;
230 1.1 christos
231 1.1 christos
232 1.1 christos /*
233 1.1 christos * S3PT - S3 Performance Table. This table is pointed to by the
234 1.1 christos * FPDT S3 Pointer Record above.
235 1.1 christos */
236 1.1 christos typedef struct acpi_table_s3pt
237 1.1 christos {
238 1.1 christos UINT8 Signature[4]; /* "S3PT" */
239 1.1 christos UINT32 Length;
240 1.1 christos
241 1.1 christos } ACPI_TABLE_S3PT;
242 1.1 christos
243 1.1 christos
244 1.1 christos /*
245 1.1 christos * S3PT Subtables
246 1.1 christos */
247 1.1 christos typedef struct acpi_s3pt_header
248 1.1 christos {
249 1.1 christos UINT16 Type;
250 1.1 christos UINT8 Length;
251 1.1 christos UINT8 Revision;
252 1.1 christos
253 1.1 christos } ACPI_S3PT_HEADER;
254 1.1 christos
255 1.1 christos /* Values for Type field above */
256 1.1 christos
257 1.1 christos enum AcpiS3ptType
258 1.1 christos {
259 1.1 christos ACPI_S3PT_TYPE_RESUME = 0,
260 1.1 christos ACPI_S3PT_TYPE_SUSPEND = 1
261 1.1 christos };
262 1.1 christos
263 1.1 christos typedef struct acpi_s3pt_resume
264 1.1 christos {
265 1.1 christos ACPI_S3PT_HEADER Header;
266 1.1 christos UINT32 ResumeCount;
267 1.1 christos UINT64 FullResume;
268 1.1 christos UINT64 AverageResume;
269 1.1 christos
270 1.1 christos } ACPI_S3PT_RESUME;
271 1.1 christos
272 1.1 christos typedef struct acpi_s3pt_suspend
273 1.1 christos {
274 1.1 christos ACPI_S3PT_HEADER Header;
275 1.1 christos UINT64 SuspendStart;
276 1.1 christos UINT64 SuspendEnd;
277 1.1 christos
278 1.1 christos } ACPI_S3PT_SUSPEND;
279 1.1 christos
280 1.1 christos
281 1.1 christos /*******************************************************************************
282 1.1 christos *
283 1.1.1.2 christos * GTDT - Generic Timer Description Table (ACPI 5.1)
284 1.1.1.2 christos * Version 2
285 1.1 christos *
286 1.1 christos ******************************************************************************/
287 1.1 christos
288 1.1 christos typedef struct acpi_table_gtdt
289 1.1 christos {
290 1.1 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
291 1.1.1.2 christos UINT64 CounterBlockAddresss;
292 1.1.1.2 christos UINT32 Reserved;
293 1.1.1.2 christos UINT32 SecureEl1Interrupt;
294 1.1.1.2 christos UINT32 SecureEl1Flags;
295 1.1.1.2 christos UINT32 NonSecureEl1Interrupt;
296 1.1.1.2 christos UINT32 NonSecureEl1Flags;
297 1.1 christos UINT32 VirtualTimerInterrupt;
298 1.1 christos UINT32 VirtualTimerFlags;
299 1.1.1.2 christos UINT32 NonSecureEl2Interrupt;
300 1.1.1.2 christos UINT32 NonSecureEl2Flags;
301 1.1.1.2 christos UINT64 CounterReadBlockAddress;
302 1.1.1.2 christos UINT32 PlatformTimerCount;
303 1.1.1.2 christos UINT32 PlatformTimerOffset;
304 1.1 christos
305 1.1 christos } ACPI_TABLE_GTDT;
306 1.1 christos
307 1.1.1.2 christos /* Flag Definitions: Timer Block Physical Timers and Virtual timers */
308 1.1.1.2 christos
309 1.1.1.2 christos #define ACPI_GTDT_INTERRUPT_MODE (1)
310 1.1.1.2 christos #define ACPI_GTDT_INTERRUPT_POLARITY (1<<1)
311 1.1.1.2 christos #define ACPI_GTDT_ALWAYS_ON (1<<2)
312 1.1.1.2 christos
313 1.1.1.2 christos
314 1.1.1.2 christos /* Common GTDT subtable header */
315 1.1.1.2 christos
316 1.1.1.2 christos typedef struct acpi_gtdt_header
317 1.1.1.2 christos {
318 1.1.1.2 christos UINT8 Type;
319 1.1.1.2 christos UINT16 Length;
320 1.1.1.2 christos
321 1.1.1.2 christos } ACPI_GTDT_HEADER;
322 1.1.1.2 christos
323 1.1.1.2 christos /* Values for GTDT subtable type above */
324 1.1 christos
325 1.1.1.2 christos enum AcpiGtdtType
326 1.1.1.2 christos {
327 1.1.1.2 christos ACPI_GTDT_TYPE_TIMER_BLOCK = 0,
328 1.1.1.2 christos ACPI_GTDT_TYPE_WATCHDOG = 1,
329 1.1.1.2 christos ACPI_GTDT_TYPE_RESERVED = 2 /* 2 and greater are reserved */
330 1.1.1.2 christos };
331 1.1.1.2 christos
332 1.1.1.2 christos
333 1.1.1.2 christos /* GTDT Subtables, correspond to Type in acpi_gtdt_header */
334 1.1.1.2 christos
335 1.1.1.2 christos /* 0: Generic Timer Block */
336 1.1.1.2 christos
337 1.1.1.2 christos typedef struct acpi_gtdt_timer_block
338 1.1.1.2 christos {
339 1.1.1.2 christos ACPI_GTDT_HEADER Header;
340 1.1.1.2 christos UINT8 Reserved;
341 1.1.1.2 christos UINT64 BlockAddress;
342 1.1.1.2 christos UINT32 TimerCount;
343 1.1.1.2 christos UINT32 TimerOffset;
344 1.1.1.2 christos
345 1.1.1.2 christos } ACPI_GTDT_TIMER_BLOCK;
346 1.1.1.2 christos
347 1.1.1.2 christos /* Timer Sub-Structure, one per timer */
348 1.1.1.2 christos
349 1.1.1.2 christos typedef struct acpi_gtdt_timer_entry
350 1.1.1.2 christos {
351 1.1.1.2 christos UINT8 FrameNumber;
352 1.1.1.2 christos UINT8 Reserved[3];
353 1.1.1.2 christos UINT64 BaseAddress;
354 1.1.1.2 christos UINT64 El0BaseAddress;
355 1.1.1.2 christos UINT32 TimerInterrupt;
356 1.1.1.2 christos UINT32 TimerFlags;
357 1.1.1.2 christos UINT32 VirtualTimerInterrupt;
358 1.1.1.2 christos UINT32 VirtualTimerFlags;
359 1.1.1.2 christos UINT32 CommonFlags;
360 1.1 christos
361 1.1.1.2 christos } ACPI_GTDT_TIMER_ENTRY;
362 1.1 christos
363 1.1.1.2 christos /* Flag Definitions: TimerFlags and VirtualTimerFlags above */
364 1.1.1.2 christos
365 1.1.1.2 christos #define ACPI_GTDT_GT_IRQ_MODE (1)
366 1.1.1.2 christos #define ACPI_GTDT_GT_IRQ_POLARITY (1<<1)
367 1.1.1.2 christos
368 1.1.1.2 christos /* Flag Definitions: CommonFlags above */
369 1.1.1.2 christos
370 1.1.1.2 christos #define ACPI_GTDT_GT_IS_SECURE_TIMER (1)
371 1.1.1.2 christos #define ACPI_GTDT_GT_ALWAYS_ON (1<<1)
372 1.1.1.2 christos
373 1.1.1.2 christos
374 1.1.1.2 christos /* 1: SBSA Generic Watchdog Structure */
375 1.1.1.2 christos
376 1.1.1.2 christos typedef struct acpi_gtdt_watchdog
377 1.1.1.2 christos {
378 1.1.1.2 christos ACPI_GTDT_HEADER Header;
379 1.1.1.2 christos UINT8 Reserved;
380 1.1.1.2 christos UINT64 RefreshFrameAddress;
381 1.1.1.2 christos UINT64 ControlFrameAddress;
382 1.1.1.2 christos UINT32 TimerInterrupt;
383 1.1.1.2 christos UINT32 TimerFlags;
384 1.1.1.2 christos
385 1.1.1.2 christos } ACPI_GTDT_WATCHDOG;
386 1.1.1.2 christos
387 1.1.1.2 christos /* Flag Definitions: TimerFlags above */
388 1.1.1.2 christos
389 1.1.1.2 christos #define ACPI_GTDT_WATCHDOG_IRQ_MODE (1)
390 1.1.1.2 christos #define ACPI_GTDT_WATCHDOG_IRQ_POLARITY (1<<1)
391 1.1.1.2 christos #define ACPI_GTDT_WATCHDOG_SECURE (1<<2)
392 1.1 christos
393 1.1 christos
394 1.1 christos /*******************************************************************************
395 1.1 christos *
396 1.1 christos * MPST - Memory Power State Table (ACPI 5.0)
397 1.1 christos * Version 1
398 1.1 christos *
399 1.1 christos ******************************************************************************/
400 1.1 christos
401 1.1 christos #define ACPI_MPST_CHANNEL_INFO \
402 1.1 christos UINT8 ChannelId; \
403 1.1 christos UINT8 Reserved1[3]; \
404 1.1 christos UINT16 PowerNodeCount; \
405 1.1 christos UINT16 Reserved2;
406 1.1 christos
407 1.1 christos /* Main table */
408 1.1 christos
409 1.1 christos typedef struct acpi_table_mpst
410 1.1 christos {
411 1.1 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
412 1.1 christos ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */
413 1.1 christos
414 1.1 christos } ACPI_TABLE_MPST;
415 1.1 christos
416 1.1 christos
417 1.1 christos /* Memory Platform Communication Channel Info */
418 1.1 christos
419 1.1 christos typedef struct acpi_mpst_channel
420 1.1 christos {
421 1.1 christos ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */
422 1.1 christos
423 1.1 christos } ACPI_MPST_CHANNEL;
424 1.1 christos
425 1.1 christos
426 1.1 christos /* Memory Power Node Structure */
427 1.1 christos
428 1.1 christos typedef struct acpi_mpst_power_node
429 1.1 christos {
430 1.1 christos UINT8 Flags;
431 1.1 christos UINT8 Reserved1;
432 1.1 christos UINT16 NodeId;
433 1.1 christos UINT32 Length;
434 1.1 christos UINT64 RangeAddress;
435 1.1 christos UINT64 RangeLength;
436 1.1 christos UINT32 NumPowerStates;
437 1.1 christos UINT32 NumPhysicalComponents;
438 1.1 christos
439 1.1 christos } ACPI_MPST_POWER_NODE;
440 1.1 christos
441 1.1 christos /* Values for Flags field above */
442 1.1 christos
443 1.1 christos #define ACPI_MPST_ENABLED 1
444 1.1 christos #define ACPI_MPST_POWER_MANAGED 2
445 1.1 christos #define ACPI_MPST_HOT_PLUG_CAPABLE 4
446 1.1 christos
447 1.1 christos
448 1.1 christos /* Memory Power State Structure (follows POWER_NODE above) */
449 1.1 christos
450 1.1 christos typedef struct acpi_mpst_power_state
451 1.1 christos {
452 1.1 christos UINT8 PowerState;
453 1.1 christos UINT8 InfoIndex;
454 1.1 christos
455 1.1 christos } ACPI_MPST_POWER_STATE;
456 1.1 christos
457 1.1 christos
458 1.1 christos /* Physical Component ID Structure (follows POWER_STATE above) */
459 1.1 christos
460 1.1 christos typedef struct acpi_mpst_component
461 1.1 christos {
462 1.1 christos UINT16 ComponentId;
463 1.1 christos
464 1.1 christos } ACPI_MPST_COMPONENT;
465 1.1 christos
466 1.1 christos
467 1.1 christos /* Memory Power State Characteristics Structure (follows all POWER_NODEs) */
468 1.1 christos
469 1.1 christos typedef struct acpi_mpst_data_hdr
470 1.1 christos {
471 1.1 christos UINT16 CharacteristicsCount;
472 1.1 christos UINT16 Reserved;
473 1.1 christos
474 1.1 christos } ACPI_MPST_DATA_HDR;
475 1.1 christos
476 1.1 christos typedef struct acpi_mpst_power_data
477 1.1 christos {
478 1.1 christos UINT8 StructureId;
479 1.1 christos UINT8 Flags;
480 1.1 christos UINT16 Reserved1;
481 1.1 christos UINT32 AveragePower;
482 1.1 christos UINT32 PowerSaving;
483 1.1 christos UINT64 ExitLatency;
484 1.1 christos UINT64 Reserved2;
485 1.1 christos
486 1.1 christos } ACPI_MPST_POWER_DATA;
487 1.1 christos
488 1.1 christos /* Values for Flags field above */
489 1.1 christos
490 1.1 christos #define ACPI_MPST_PRESERVE 1
491 1.1 christos #define ACPI_MPST_AUTOENTRY 2
492 1.1 christos #define ACPI_MPST_AUTOEXIT 4
493 1.1 christos
494 1.1 christos
495 1.1 christos /* Shared Memory Region (not part of an ACPI table) */
496 1.1 christos
497 1.1 christos typedef struct acpi_mpst_shared
498 1.1 christos {
499 1.1 christos UINT32 Signature;
500 1.1 christos UINT16 PccCommand;
501 1.1 christos UINT16 PccStatus;
502 1.1 christos UINT32 CommandRegister;
503 1.1 christos UINT32 StatusRegister;
504 1.1 christos UINT32 PowerStateId;
505 1.1 christos UINT32 PowerNodeId;
506 1.1 christos UINT64 EnergyConsumed;
507 1.1 christos UINT64 AveragePower;
508 1.1 christos
509 1.1 christos } ACPI_MPST_SHARED;
510 1.1 christos
511 1.1 christos
512 1.1 christos /*******************************************************************************
513 1.1 christos *
514 1.1 christos * PCCT - Platform Communications Channel Table (ACPI 5.0)
515 1.1 christos * Version 1
516 1.1 christos *
517 1.1 christos ******************************************************************************/
518 1.1 christos
519 1.1 christos typedef struct acpi_table_pcct
520 1.1 christos {
521 1.1 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
522 1.1 christos UINT32 Flags;
523 1.1 christos UINT64 Reserved;
524 1.1 christos
525 1.1 christos } ACPI_TABLE_PCCT;
526 1.1 christos
527 1.1 christos /* Values for Flags field above */
528 1.1 christos
529 1.1 christos #define ACPI_PCCT_DOORBELL 1
530 1.1 christos
531 1.1 christos /* Values for subtable type in ACPI_SUBTABLE_HEADER */
532 1.1 christos
533 1.1 christos enum AcpiPcctType
534 1.1 christos {
535 1.1 christos ACPI_PCCT_TYPE_GENERIC_SUBSPACE = 0,
536 1.1.1.2 christos ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE = 1,
537 1.1.1.2 christos ACPI_PCCT_TYPE_RESERVED = 2 /* 2 and greater are reserved */
538 1.1 christos };
539 1.1 christos
540 1.1 christos /*
541 1.1 christos * PCCT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER
542 1.1 christos */
543 1.1 christos
544 1.1 christos /* 0: Generic Communications Subspace */
545 1.1 christos
546 1.1 christos typedef struct acpi_pcct_subspace
547 1.1 christos {
548 1.1 christos ACPI_SUBTABLE_HEADER Header;
549 1.1 christos UINT8 Reserved[6];
550 1.1 christos UINT64 BaseAddress;
551 1.1 christos UINT64 Length;
552 1.1 christos ACPI_GENERIC_ADDRESS DoorbellRegister;
553 1.1 christos UINT64 PreserveMask;
554 1.1 christos UINT64 WriteMask;
555 1.1 christos UINT32 Latency;
556 1.1 christos UINT32 MaxAccessRate;
557 1.1 christos UINT16 MinTurnaroundTime;
558 1.1 christos
559 1.1 christos } ACPI_PCCT_SUBSPACE;
560 1.1 christos
561 1.1 christos
562 1.1.1.2 christos /* 1: HW-reduced Communications Subspace (ACPI 5.1) */
563 1.1.1.2 christos
564 1.1.1.2 christos typedef struct acpi_pcct_hw_reduced
565 1.1.1.2 christos {
566 1.1.1.2 christos ACPI_SUBTABLE_HEADER Header;
567 1.1.1.2 christos UINT32 DoorbellInterrupt;
568 1.1.1.2 christos UINT8 Flags;
569 1.1.1.2 christos UINT8 Reserved;
570 1.1.1.2 christos UINT64 BaseAddress;
571 1.1.1.2 christos UINT64 Length;
572 1.1.1.2 christos ACPI_GENERIC_ADDRESS DoorbellRegister;
573 1.1.1.2 christos UINT64 PreserveMask;
574 1.1.1.2 christos UINT64 WriteMask;
575 1.1.1.2 christos UINT32 Latency;
576 1.1.1.2 christos UINT32 MaxAccessRate;
577 1.1.1.2 christos UINT16 MinTurnaroundTime;
578 1.1.1.2 christos
579 1.1.1.2 christos } ACPI_PCCT_HW_REDUCED;
580 1.1.1.2 christos
581 1.1.1.2 christos /* Values for doorbell flags above */
582 1.1.1.2 christos
583 1.1.1.2 christos #define ACPI_PCCT_INTERRUPT_POLARITY (1)
584 1.1.1.2 christos #define ACPI_PCCT_INTERRUPT_MODE (1<<1)
585 1.1.1.2 christos
586 1.1.1.2 christos
587 1.1 christos /*
588 1.1 christos * PCC memory structures (not part of the ACPI table)
589 1.1 christos */
590 1.1 christos
591 1.1 christos /* Shared Memory Region */
592 1.1 christos
593 1.1 christos typedef struct acpi_pcct_shared_memory
594 1.1 christos {
595 1.1 christos UINT32 Signature;
596 1.1 christos UINT16 Command;
597 1.1 christos UINT16 Status;
598 1.1 christos
599 1.1 christos } ACPI_PCCT_SHARED_MEMORY;
600 1.1 christos
601 1.1 christos
602 1.1 christos /*******************************************************************************
603 1.1 christos *
604 1.1 christos * PMTT - Platform Memory Topology Table (ACPI 5.0)
605 1.1 christos * Version 1
606 1.1 christos *
607 1.1 christos ******************************************************************************/
608 1.1 christos
609 1.1 christos typedef struct acpi_table_pmtt
610 1.1 christos {
611 1.1 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
612 1.1 christos UINT32 Reserved;
613 1.1 christos
614 1.1 christos } ACPI_TABLE_PMTT;
615 1.1 christos
616 1.1 christos
617 1.1 christos /* Common header for PMTT subtables that follow main table */
618 1.1 christos
619 1.1 christos typedef struct acpi_pmtt_header
620 1.1 christos {
621 1.1 christos UINT8 Type;
622 1.1 christos UINT8 Reserved1;
623 1.1 christos UINT16 Length;
624 1.1 christos UINT16 Flags;
625 1.1 christos UINT16 Reserved2;
626 1.1 christos
627 1.1 christos } ACPI_PMTT_HEADER;
628 1.1 christos
629 1.1 christos /* Values for Type field above */
630 1.1 christos
631 1.1 christos #define ACPI_PMTT_TYPE_SOCKET 0
632 1.1 christos #define ACPI_PMTT_TYPE_CONTROLLER 1
633 1.1 christos #define ACPI_PMTT_TYPE_DIMM 2
634 1.1 christos #define ACPI_PMTT_TYPE_RESERVED 3 /* 0x03-0xFF are reserved */
635 1.1 christos
636 1.1 christos /* Values for Flags field above */
637 1.1 christos
638 1.1 christos #define ACPI_PMTT_TOP_LEVEL 0x0001
639 1.1 christos #define ACPI_PMTT_PHYSICAL 0x0002
640 1.1 christos #define ACPI_PMTT_MEMORY_TYPE 0x000C
641 1.1 christos
642 1.1 christos
643 1.1 christos /*
644 1.1 christos * PMTT subtables, correspond to Type in acpi_pmtt_header
645 1.1 christos */
646 1.1 christos
647 1.1 christos
648 1.1 christos /* 0: Socket Structure */
649 1.1 christos
650 1.1 christos typedef struct acpi_pmtt_socket
651 1.1 christos {
652 1.1 christos ACPI_PMTT_HEADER Header;
653 1.1 christos UINT16 SocketId;
654 1.1 christos UINT16 Reserved;
655 1.1 christos
656 1.1 christos } ACPI_PMTT_SOCKET;
657 1.1 christos
658 1.1 christos
659 1.1 christos /* 1: Memory Controller subtable */
660 1.1 christos
661 1.1 christos typedef struct acpi_pmtt_controller
662 1.1 christos {
663 1.1 christos ACPI_PMTT_HEADER Header;
664 1.1 christos UINT32 ReadLatency;
665 1.1 christos UINT32 WriteLatency;
666 1.1 christos UINT32 ReadBandwidth;
667 1.1 christos UINT32 WriteBandwidth;
668 1.1 christos UINT16 AccessWidth;
669 1.1 christos UINT16 Alignment;
670 1.1 christos UINT16 Reserved;
671 1.1 christos UINT16 DomainCount;
672 1.1 christos
673 1.1 christos } ACPI_PMTT_CONTROLLER;
674 1.1 christos
675 1.1 christos /* 1a: Proximity Domain substructure */
676 1.1 christos
677 1.1 christos typedef struct acpi_pmtt_domain
678 1.1 christos {
679 1.1 christos UINT32 ProximityDomain;
680 1.1 christos
681 1.1 christos } ACPI_PMTT_DOMAIN;
682 1.1 christos
683 1.1 christos
684 1.1 christos /* 2: Physical Component Identifier (DIMM) */
685 1.1 christos
686 1.1 christos typedef struct acpi_pmtt_physical_component
687 1.1 christos {
688 1.1 christos ACPI_PMTT_HEADER Header;
689 1.1 christos UINT16 ComponentId;
690 1.1 christos UINT16 Reserved;
691 1.1 christos UINT32 MemorySize;
692 1.1 christos UINT32 BiosHandle;
693 1.1 christos
694 1.1 christos } ACPI_PMTT_PHYSICAL_COMPONENT;
695 1.1 christos
696 1.1 christos
697 1.1 christos /*******************************************************************************
698 1.1 christos *
699 1.1 christos * RASF - RAS Feature Table (ACPI 5.0)
700 1.1 christos * Version 1
701 1.1 christos *
702 1.1 christos ******************************************************************************/
703 1.1 christos
704 1.1 christos typedef struct acpi_table_rasf
705 1.1 christos {
706 1.1 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
707 1.1 christos UINT8 ChannelId[12];
708 1.1 christos
709 1.1 christos } ACPI_TABLE_RASF;
710 1.1 christos
711 1.1 christos /* RASF Platform Communication Channel Shared Memory Region */
712 1.1 christos
713 1.1 christos typedef struct acpi_rasf_shared_memory
714 1.1 christos {
715 1.1 christos UINT32 Signature;
716 1.1 christos UINT16 Command;
717 1.1 christos UINT16 Status;
718 1.1 christos UINT16 Version;
719 1.1 christos UINT8 Capabilities[16];
720 1.1 christos UINT8 SetCapabilities[16];
721 1.1 christos UINT16 NumParameterBlocks;
722 1.1 christos UINT32 SetCapabilitiesStatus;
723 1.1 christos
724 1.1 christos } ACPI_RASF_SHARED_MEMORY;
725 1.1 christos
726 1.1 christos /* RASF Parameter Block Structure Header */
727 1.1 christos
728 1.1 christos typedef struct acpi_rasf_parameter_block
729 1.1 christos {
730 1.1 christos UINT16 Type;
731 1.1 christos UINT16 Version;
732 1.1 christos UINT16 Length;
733 1.1 christos
734 1.1 christos } ACPI_RASF_PARAMETER_BLOCK;
735 1.1 christos
736 1.1 christos /* RASF Parameter Block Structure for PATROL_SCRUB */
737 1.1 christos
738 1.1 christos typedef struct acpi_rasf_patrol_scrub_parameter
739 1.1 christos {
740 1.1 christos ACPI_RASF_PARAMETER_BLOCK Header;
741 1.1 christos UINT16 PatrolScrubCommand;
742 1.1 christos UINT64 RequestedAddressRange[2];
743 1.1 christos UINT64 ActualAddressRange[2];
744 1.1 christos UINT16 Flags;
745 1.1 christos UINT8 RequestedSpeed;
746 1.1 christos
747 1.1 christos } ACPI_RASF_PATROL_SCRUB_PARAMETER;
748 1.1 christos
749 1.1 christos /* Masks for Flags and Speed fields above */
750 1.1 christos
751 1.1 christos #define ACPI_RASF_SCRUBBER_RUNNING 1
752 1.1 christos #define ACPI_RASF_SPEED (7<<1)
753 1.1 christos #define ACPI_RASF_SPEED_SLOW (0<<1)
754 1.1 christos #define ACPI_RASF_SPEED_MEDIUM (4<<1)
755 1.1 christos #define ACPI_RASF_SPEED_FAST (7<<1)
756 1.1 christos
757 1.1 christos /* Channel Commands */
758 1.1 christos
759 1.1 christos enum AcpiRasfCommands
760 1.1 christos {
761 1.1 christos ACPI_RASF_EXECUTE_RASF_COMMAND = 1
762 1.1 christos };
763 1.1 christos
764 1.1 christos /* Platform RAS Capabilities */
765 1.1 christos
766 1.1 christos enum AcpiRasfCapabiliities
767 1.1 christos {
768 1.1 christos ACPI_HW_PATROL_SCRUB_SUPPORTED = 0,
769 1.1 christos ACPI_SW_PATROL_SCRUB_EXPOSED = 1
770 1.1 christos };
771 1.1 christos
772 1.1 christos /* Patrol Scrub Commands */
773 1.1 christos
774 1.1 christos enum AcpiRasfPatrolScrubCommands
775 1.1 christos {
776 1.1 christos ACPI_RASF_GET_PATROL_PARAMETERS = 1,
777 1.1 christos ACPI_RASF_START_PATROL_SCRUBBER = 2,
778 1.1 christos ACPI_RASF_STOP_PATROL_SCRUBBER = 3
779 1.1 christos };
780 1.1 christos
781 1.1 christos /* Channel Command flags */
782 1.1 christos
783 1.1 christos #define ACPI_RASF_GENERATE_SCI (1<<15)
784 1.1 christos
785 1.1 christos /* Status values */
786 1.1 christos
787 1.1 christos enum AcpiRasfStatus
788 1.1 christos {
789 1.1 christos ACPI_RASF_SUCCESS = 0,
790 1.1 christos ACPI_RASF_NOT_VALID = 1,
791 1.1 christos ACPI_RASF_NOT_SUPPORTED = 2,
792 1.1 christos ACPI_RASF_BUSY = 3,
793 1.1 christos ACPI_RASF_FAILED = 4,
794 1.1 christos ACPI_RASF_ABORTED = 5,
795 1.1 christos ACPI_RASF_INVALID_DATA = 6
796 1.1 christos };
797 1.1 christos
798 1.1 christos /* Status flags */
799 1.1 christos
800 1.1 christos #define ACPI_RASF_COMMAND_COMPLETE (1)
801 1.1 christos #define ACPI_RASF_SCI_DOORBELL (1<<1)
802 1.1 christos #define ACPI_RASF_ERROR (1<<2)
803 1.1 christos #define ACPI_RASF_STATUS (0x1F<<3)
804 1.1 christos
805 1.1 christos
806 1.1 christos /*******************************************************************************
807 1.1 christos *
808 1.1 christos * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
809 1.1 christos * Version 3
810 1.1 christos *
811 1.1 christos * Conforms to "TPM 2.0 Hardware Interface Table (TPM2)" 29 November 2011
812 1.1 christos *
813 1.1 christos ******************************************************************************/
814 1.1 christos
815 1.1 christos typedef struct acpi_table_tpm2
816 1.1 christos {
817 1.1 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
818 1.1 christos UINT32 Flags;
819 1.1 christos UINT64 ControlAddress;
820 1.1 christos UINT32 StartMethod;
821 1.1 christos
822 1.1 christos } ACPI_TABLE_TPM2;
823 1.1 christos
824 1.1 christos /* Control area structure (not part of table, pointed to by ControlAddress) */
825 1.1 christos
826 1.1 christos typedef struct acpi_tpm2_control
827 1.1 christos {
828 1.1 christos UINT32 Reserved;
829 1.1 christos UINT32 Error;
830 1.1 christos UINT32 Cancel;
831 1.1 christos UINT32 Start;
832 1.1 christos UINT64 InterruptControl;
833 1.1 christos UINT32 CommandSize;
834 1.1 christos UINT64 CommandAddress;
835 1.1 christos UINT32 ResponseSize;
836 1.1 christos UINT64 ResponseAddress;
837 1.1 christos
838 1.1 christos } ACPI_TPM2_CONTROL;
839 1.1 christos
840 1.1 christos
841 1.1 christos /* Reset to default packing */
842 1.1 christos
843 1.1 christos #pragma pack()
844 1.1 christos
845 1.1 christos #endif /* __ACTBL3_H__ */
846