]> git.proxmox.com Git - mirror_edk2.git/blob - ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h
4dadd4d10423cb60ca17c1b1d285c55e2e58a0e0
[mirror_edk2.git] / ShellPkg / Library / UefiShellAcpiViewCommandLib / AcpiParser.h
1 /**
2 Header file for ACPI parser
3
4 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 **/
13
14 #ifndef ACPIPARSER_H_
15 #define ACPIPARSER_H_
16
17 #define OUTPUT_FIELD_COLUMN_WIDTH 36
18
19 /// The RSDP table signature is "RSD PTR " (8 bytes)
20 /// However The signature for ACPI tables is 4 bytes.
21 /// To work around this oddity define a signature type
22 /// that allows us to process the log options.
23 #define RSDP_TABLE_INFO SIGNATURE_32('R', 'S', 'D', 'P')
24
25 /** This function increments the ACPI table error counter.
26 */
27 VOID
28 EFIAPI
29 IncrementErrorCount (
30 VOID
31 );
32
33 /** This function increments the ACPI table warning counter.
34 */
35 VOID
36 EFIAPI
37 IncrementWarningCount (
38 VOID
39 );
40
41 /** This function verifies the ACPI table checksum.
42
43 This function verifies the checksum for the ACPI table and optionally
44 prints the status.
45
46 @param [in] Log If TRUE log the status of the checksum.
47 @param [in] Ptr Pointer to the start of the table buffer.
48 @param [in] Length The length of the buffer.
49
50 @retval TRUE The checksum is OK.
51 @retval FALSE The checksum failed.
52 */
53 BOOLEAN
54 EFIAPI
55 VerifyChecksum (
56 IN BOOLEAN Log,
57 IN UINT8* Ptr,
58 IN UINT32 Length
59 );
60
61 /** This function performs a raw data dump of the ACPI table.
62
63 @param [in] Ptr Pointer to the start of the table buffer.
64 @param [in] Length The length of the buffer.
65 */
66 VOID
67 EFIAPI
68 DumpRaw (
69 IN UINT8* Ptr,
70 IN UINT32 Length
71 );
72
73 /** This function traces 1 byte of datum as specified in the
74 format string.
75
76 @param [in] Format The format string for tracing the data.
77 @param [in] Ptr Pointer to the start of the buffer.
78 */
79 VOID
80 EFIAPI
81 DumpUint8 (
82 IN CONST CHAR16* Format,
83 IN UINT8* Ptr
84 );
85
86 /** This function traces 2 bytes of data as specified in the
87 format string.
88
89 @param [in] Format The format string for tracing the data.
90 @param [in] Ptr Pointer to the start of the buffer.
91 */
92 VOID
93 EFIAPI
94 DumpUint16 (
95 IN CONST CHAR16* Format,
96 IN UINT8* Ptr
97 );
98
99 /** This function traces 4 bytes of data as specified in the
100 format string.
101
102 @param [in] Format The format string for tracing the data.
103 @param [in] Ptr Pointer to the start of the buffer.
104 */
105 VOID
106 EFIAPI
107 DumpUint32 (
108 IN CONST CHAR16* Format,
109 IN UINT8* Ptr
110 );
111
112 /** This function traces 8 bytes of data as specified by the
113 format string.
114
115 @param [in] Format The format string for tracing the data.
116 @param [in] Ptr Pointer to the start of the buffer.
117 */
118 VOID
119 EFIAPI
120 DumpUint64 (
121 IN CONST CHAR16* Format,
122 IN UINT8* Ptr
123 );
124
125 /** This function traces 3 characters which can be optionally
126 formated using the format string if specified.
127
128 If no format string is specified the Format must be NULL.
129
130 @param [in] Format Optional format string for tracing the data.
131 @param [in] Ptr Pointer to the start of the buffer.
132 */
133 VOID
134 EFIAPI
135 Dump3Chars (
136 IN CONST CHAR16* Format OPTIONAL,
137 IN UINT8* Ptr
138 );
139
140 /** This function traces 4 characters which can be optionally
141 formated using the format string if specified.
142
143 If no format string is specified the Format must be NULL.
144
145 @param [in] Format Optional format string for tracing the data.
146 @param [in] Ptr Pointer to the start of the buffer.
147 */
148 VOID
149 EFIAPI
150 Dump4Chars (
151 IN CONST CHAR16* Format OPTIONAL,
152 IN UINT8* Ptr
153 );
154
155 /** This function traces 6 characters which can be optionally
156 formated using the format string if specified.
157
158 If no format string is specified the Format must be NULL.
159
160 @param [in] Format Optional format string for tracing the data.
161 @param [in] Ptr Pointer to the start of the buffer.
162 */
163 VOID
164 EFIAPI
165 Dump6Chars (
166 IN CONST CHAR16* Format OPTIONAL,
167 IN UINT8* Ptr
168 );
169
170 /** This function traces 8 characters which can be optionally
171 formated using the format string if specified.
172
173 If no format string is specified the Format must be NULL.
174
175 @param [in] Format Optional format string for tracing the data.
176 @param [in] Ptr Pointer to the start of the buffer.
177 */
178 VOID
179 EFIAPI
180 Dump8Chars (
181 IN CONST CHAR16* Format OPTIONAL,
182 IN UINT8* Ptr
183 );
184
185 /** This function indents and prints the ACPI table Field Name.
186
187 @param [in] Indent Number of spaces to add to the global table
188 indent. The global table indent is 0 by default;
189 however this value is updated on entry to the
190 ParseAcpi() by adding the indent value provided to
191 ParseAcpi() and restored back on exit. Therefore
192 the total indent in the output is dependent on from
193 where this function is called.
194 @param [in] FieldName Pointer to the Field Name.
195 */
196 VOID
197 EFIAPI
198 PrintFieldName (
199 IN UINT32 Indent,
200 IN CONST CHAR16* FieldName
201 );
202
203 /** This function pointer is the template for customizing the trace output
204
205 @param [in] Format Format string for tracing the data as specified by
206 the 'Format' member of ACPI_PARSER.
207 @param [in] Ptr Pointer to the start of the buffer.
208 */
209 typedef VOID (EFIAPI *FNPTR_PRINT_FORMATTER)(CONST CHAR16* Format, UINT8* Ptr);
210
211 /** This function pointer is the template for validating an ACPI table field.
212
213 @param [in] Ptr Pointer to the start of the field data.
214 @param [in] Context Pointer to context specific information as specified by
215 the 'Context' member of the ACPI_PARSER.
216 e.g. this could be a pointer to the ACPI table header.
217 */
218 typedef VOID (EFIAPI *FNPTR_FIELD_VALIDATOR)(UINT8* Ptr, VOID* Context);
219
220 /** The ACPI_PARSER structure describes the fields of an ACPI table and
221 provides means for the parser to interpret and trace appropriately.
222
223 The first three members are populated based on information present in
224 in the ACPI table specifications. The remaining members describe how
225 the parser should report the field information, validate the field data
226 and/or update an external pointer to the field (ItemPtr).
227
228 ParseAcpi() uses the format string specified by 'Format' for tracing
229 the field data. If the field is more complex and requires additional
230 processing for formatting and representation a print formatter function
231 can be specified in 'PrintFormatter'.
232 The PrintFormatter function may choose to use the format string
233 specified by 'Format' or use its own internal format string.
234
235 The 'Format' and 'PrintFormatter' members allow flexibility for
236 representing the field data.
237 */
238 typedef struct AcpiParser {
239
240 /// String describing the ACPI table field
241 /// (Field column from ACPI table spec)
242 CONST CHAR16* NameStr;
243
244 /// The length of the field.
245 /// (Byte Length column from ACPI table spec)
246 UINT32 Length;
247
248 /// The offset of the field from the start of the table.
249 /// (Byte Offset column from ACPI table spec)
250 UINT32 Offset;
251
252 /// Optional Print() style format string for tracing the data. If not
253 /// used this must be set to NULL.
254 CONST CHAR16* Format;
255
256 /// Optional pointer to a print formatter function which
257 /// is typically used to trace complex field information.
258 /// If not used this must be set to NULL.
259 /// The Format string is passed to the PrintFormatter function
260 /// but may be ignored by the implementation code.
261 FNPTR_PRINT_FORMATTER PrintFormatter;
262
263 /// Optional pointer which may be set to request the parser to update
264 /// a pointer to the field data. If unused this must be set to NULL.
265 VOID** ItemPtr;
266
267 /// Optional pointer to a field validator function.
268 /// The function should directly report any appropriate error or warning
269 /// and invoke the appropriate counter update function.
270 /// If not used this parameter must be set to NULL.
271 FNPTR_FIELD_VALIDATOR FieldValidator;
272
273 /// Optional pointer to context specific information,
274 /// which the Field Validator function can use to determine
275 /// additional information about the ACPI table and make
276 /// decisions about the field being validated.
277 /// e.g. this could be a pointer to the ACPI table header
278 VOID* Context;
279 } ACPI_PARSER;
280
281 /** A structure used to store the pointers to the members of the
282 ACPI description header structure that was parsed.
283 */
284 typedef struct AcpiDescriptionHeaderInfo {
285 /// ACPI table signature
286 UINT32* Signature;
287 /// Length of the ACPI table
288 UINT32* Length;
289 /// Revision
290 UINT8* Revision;
291 /// Checksum
292 UINT8* Checksum;
293 /// OEM Id - length is 6 bytes
294 UINT8* OemId;
295 /// OEM table Id
296 UINT64* OemTableId;
297 /// OEM revision Id
298 UINT32* OemRevision;
299 /// Creator Id
300 UINT32* CreatorId;
301 /// Creator revision
302 UINT32* CreatorRevision;
303 } ACPI_DESCRIPTION_HEADER_INFO;
304
305 /** This function is used to parse an ACPI table buffer.
306
307 The ACPI table buffer is parsed using the ACPI table parser information
308 specified by a pointer to an array of ACPI_PARSER elements. This parser
309 function iterates through each item on the ACPI_PARSER array and logs the
310 ACPI table fields.
311
312 This function can optionally be used to parse ACPI tables and fetch specific
313 field values. The ItemPtr member of the ACPI_PARSER structure (where used)
314 is updated by this parser function to point to the selected field data
315 (e.g. useful for variable length nested fields).
316
317 @param [in] Trace Trace the ACPI fields TRUE else only parse the
318 table.
319 @param [in] Indent Number of spaces to indent the output.
320 @param [in] AsciiName Optional pointer to an ASCII string that describes
321 the table being parsed.
322 @param [in] Ptr Pointer to the start of the buffer.
323 @param [in] Length Length of the buffer pointed by Ptr.
324 @param [in] Parser Pointer to an array of ACPI_PARSER structure that
325 describes the table being parsed.
326 @param [in] ParserItems Number of items in the ACPI_PARSER array.
327
328 @retval Number of bytes parsed.
329 */
330 UINT32
331 EFIAPI
332 ParseAcpi (
333 IN BOOLEAN Trace,
334 IN UINT32 Indent,
335 IN CONST CHAR8* AsciiName OPTIONAL,
336 IN UINT8* Ptr,
337 IN UINT32 Length,
338 IN CONST ACPI_PARSER* Parser,
339 IN UINT32 ParserItems
340 );
341
342 /** This is a helper macro to pass parameters to the Parser functions.
343
344 @param [in] Parser The name of the ACPI_PARSER array describing the
345 ACPI table fields.
346 */
347 #define PARSER_PARAMS(Parser) Parser, sizeof (Parser) / sizeof (Parser[0])
348
349 /** This is a helper macro for describing the ACPI header fields.
350
351 @param [out] Info Pointer to retrieve the ACPI table header information.
352 */
353 #define PARSE_ACPI_HEADER(Info) \
354 { L"Signature", 4, 0, NULL, Dump4Chars, \
355 (VOID**)&(Info)->Signature , NULL, NULL }, \
356 { L"Length", 4, 4, L"%d", NULL, \
357 (VOID**)&(Info)->Length, NULL, NULL }, \
358 { L"Revision", 1, 8, L"%d", NULL, \
359 (VOID**)&(Info)->Revision, NULL, NULL }, \
360 { L"Checksum", 1, 9, L"0x%X", NULL, \
361 (VOID**)&(Info)->Checksum, NULL, NULL }, \
362 { L"Oem ID", 6, 10, NULL, Dump6Chars, \
363 (VOID**)&(Info)->OemId, NULL, NULL }, \
364 { L"Oem Table ID", 8, 16, NULL, Dump8Chars, \
365 (VOID**)&(Info)->OemTableId, NULL, NULL }, \
366 { L"Oem Revision", 4, 24, L"0x%X", NULL, \
367 (VOID**)&(Info)->OemRevision, NULL, NULL }, \
368 { L"Creator ID", 4, 28, NULL, Dump4Chars, \
369 (VOID**)&(Info)->CreatorId, NULL, NULL }, \
370 { L"Creator Revision", 4, 32, L"0x%X", NULL, \
371 (VOID**)&(Info)->CreatorRevision, NULL, NULL }
372
373 /** Length of the ACPI GAS structure.
374
375 NOTE: This might normally be defined as
376 sizeof (EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE).
377 However, we deliberately minimise any reference to the EDK2 ACPI
378 headers in an attempt to provide cross checking.
379 */
380 #define GAS_LENGTH 12
381
382 /** Length of the ACPI Header structure.
383
384 NOTE: This might normally be defined as
385 sizeof (EFI_ACPI_DESCRIPTION_HEADER).
386 However, we deliberately minimise any reference to the EDK2 ACPI
387 headers in an attempt to provide cross checking.
388 */
389 #define ACPI_DESCRIPTION_HEADER_LENGTH 36
390
391 /** This function indents and traces the GAS structure as described
392 by the GasParser.
393
394 @param [in] Ptr Pointer to the start of the buffer.
395 @param [in] Indent Number of spaces to indent the output.
396 */
397 VOID
398 EFIAPI
399 DumpGasStruct (
400 IN UINT8* Ptr,
401 IN UINT32 Indent
402 );
403
404 /** This function traces the GAS structure as described by the GasParser.
405
406 @param [in] Format Optional format string for tracing the data.
407 @param [in] Ptr Pointer to the start of the buffer.
408 */
409 VOID
410 EFIAPI
411 DumpGas (
412 IN CONST CHAR16* Format OPTIONAL,
413 IN UINT8* Ptr
414 );
415
416 /** This function traces the ACPI header as described by the AcpiHeaderParser.
417
418 @param [in] Ptr Pointer to the start of the buffer.
419
420 @retval Number of bytes parsed.
421 */
422 UINT32
423 EFIAPI
424 DumpAcpiHeader (
425 IN UINT8* Ptr
426 );
427
428 /** This function parses the ACPI header as described by the AcpiHeaderParser.
429
430 This function optionally returns the Signature, Length and revision of the
431 ACPI table.
432
433 @param [in] Ptr Pointer to the start of the buffer.
434 @param [out] Signature Gets location of the ACPI table signature.
435 @param [out] Length Gets location of the length of the ACPI table.
436 @param [out] Revision Gets location of the revision of the ACPI table.
437
438 @retval Number of bytes parsed.
439 */
440 UINT32
441 EFIAPI
442 ParseAcpiHeader (
443 IN UINT8* Ptr,
444 OUT CONST UINT32** Signature,
445 OUT CONST UINT32** Length,
446 OUT CONST UINT8** Revision
447 );
448
449 /** This function parses the ACPI BGRT table.
450 When trace is enabled this function parses the BGRT table and
451 traces the ACPI table fields.
452
453 This function also performs validation of the ACPI table fields.
454
455 @param [in] Trace If TRUE, trace the ACPI fields.
456 @param [in] Ptr Pointer to the start of the buffer.
457 @param [in] AcpiTableLength Length of the ACPI table.
458 @param [in] AcpiTableRevision Revision of the ACPI table.
459 */
460 VOID
461 EFIAPI
462 ParseAcpiBgrt (
463 IN BOOLEAN Trace,
464 IN UINT8* Ptr,
465 IN UINT32 AcpiTableLength,
466 IN UINT8 AcpiTableRevision
467 );
468
469 /** This function parses the ACPI DBG2 table.
470 When trace is enabled this function parses the DBG2 table and
471 traces the ACPI table fields.
472
473 This function also performs validation of the ACPI table fields.
474
475 @param [in] Trace If TRUE, trace the ACPI fields.
476 @param [in] Ptr Pointer to the start of the buffer.
477 @param [in] AcpiTableLength Length of the ACPI table.
478 @param [in] AcpiTableRevision Revision of the ACPI table.
479 */
480 VOID
481 EFIAPI
482 ParseAcpiDbg2 (
483 IN BOOLEAN Trace,
484 IN UINT8* Ptr,
485 IN UINT32 AcpiTableLength,
486 IN UINT8 AcpiTableRevision
487 );
488
489 /** This function parses the ACPI DSDT table.
490 When trace is enabled this function parses the DSDT table and
491 traces the ACPI table fields.
492 For the DSDT table only the ACPI header fields are parsed and
493 traced.
494
495 @param [in] Trace If TRUE, trace the ACPI fields.
496 @param [in] Ptr Pointer to the start of the buffer.
497 @param [in] AcpiTableLength Length of the ACPI table.
498 @param [in] AcpiTableRevision Revision of the ACPI table.
499 */
500 VOID
501 EFIAPI
502 ParseAcpiDsdt (
503 IN BOOLEAN Trace,
504 IN UINT8* Ptr,
505 IN UINT32 AcpiTableLength,
506 IN UINT8 AcpiTableRevision
507 );
508
509 /** This function parses the ACPI FADT table.
510 This function parses the FADT table and optionally traces the ACPI
511 table fields.
512
513 This function also performs validation of the ACPI table fields.
514
515 @param [in] Trace If TRUE, trace the ACPI fields.
516 @param [in] Ptr Pointer to the start of the buffer.
517 @param [in] AcpiTableLength Length of the ACPI table.
518 @param [in] AcpiTableRevision Revision of the ACPI table.
519 */
520 VOID
521 EFIAPI
522 ParseAcpiFadt (
523 IN BOOLEAN Trace,
524 IN UINT8* Ptr,
525 IN UINT32 AcpiTableLength,
526 IN UINT8 AcpiTableRevision
527 );
528
529 /** This function parses the ACPI GTDT table.
530 When trace is enabled this function parses the GTDT table and
531 traces the ACPI table fields.
532
533 This function also parses the following platform timer structures:
534 - GT Block timer
535 - Watchdog timer
536
537 This function also performs validation of the ACPI table fields.
538
539 @param [in] Trace If TRUE, trace the ACPI fields.
540 @param [in] Ptr Pointer to the start of the buffer.
541 @param [in] AcpiTableLength Length of the ACPI table.
542 @param [in] AcpiTableRevision Revision of the ACPI table.
543 */
544 VOID
545 EFIAPI
546 ParseAcpiGtdt (
547 IN BOOLEAN Trace,
548 IN UINT8* Ptr,
549 IN UINT32 AcpiTableLength,
550 IN UINT8 AcpiTableRevision
551 );
552
553 /** This function parses the ACPI IORT table.
554 When trace is enabled this function parses the IORT table and
555 traces the ACPI fields.
556
557 This function also parses the following nodes:
558 - ITS Group
559 - Named Component
560 - Root Complex
561 - SMMUv1/2
562 - SMMUv3
563 - PMCG
564
565 This function also performs validation of the ACPI table fields.
566
567 @param [in] Trace If TRUE, trace the ACPI fields.
568 @param [in] Ptr Pointer to the start of the buffer.
569 @param [in] AcpiTableLength Length of the ACPI table.
570 @param [in] AcpiTableRevision Revision of the ACPI table.
571 */
572 VOID
573 EFIAPI
574 ParseAcpiIort (
575 IN BOOLEAN Trace,
576 IN UINT8* Ptr,
577 IN UINT32 AcpiTableLength,
578 IN UINT8 AcpiTableRevision
579 );
580
581 /** This function parses the ACPI MADT table.
582 When trace is enabled this function parses the MADT table and
583 traces the ACPI table fields.
584
585 This function currently parses the following Interrupt Controller
586 Structures:
587 - GICC
588 - GICD
589 - GIC MSI Frame
590 - GICR
591 - GIC ITS
592
593 This function also performs validation of the ACPI table fields.
594
595 @param [in] Trace If TRUE, trace the ACPI fields.
596 @param [in] Ptr Pointer to the start of the buffer.
597 @param [in] AcpiTableLength Length of the ACPI table.
598 @param [in] AcpiTableRevision Revision of the ACPI table.
599 */
600 VOID
601 EFIAPI
602 ParseAcpiMadt (
603 IN BOOLEAN Trace,
604 IN UINT8* Ptr,
605 IN UINT32 AcpiTableLength,
606 IN UINT8 AcpiTableRevision
607 );
608
609 /** This function parses the ACPI MCFG table.
610 When trace is enabled this function parses the MCFG table and
611 traces the ACPI table fields.
612
613 This function also performs validation of the ACPI table fields.
614
615 @param [in] Trace If TRUE, trace the ACPI fields.
616 @param [in] Ptr Pointer to the start of the buffer.
617 @param [in] AcpiTableLength Length of the ACPI table.
618 @param [in] AcpiTableRevision Revision of the ACPI table.
619 */
620 VOID
621 EFIAPI
622 ParseAcpiMcfg (
623 IN BOOLEAN Trace,
624 IN UINT8* Ptr,
625 IN UINT32 AcpiTableLength,
626 IN UINT8 AcpiTableRevision
627 );
628
629 /** This function parses the ACPI RSDP table.
630
631 This function invokes the parser for the XSDT table.
632 * Note - This function does not support parsing of RSDT table.
633
634 This function also performs a RAW dump of the ACPI table and
635 validates the checksum.
636
637 @param [in] Trace If TRUE, trace the ACPI fields.
638 @param [in] Ptr Pointer to the start of the buffer.
639 @param [in] AcpiTableLength Length of the ACPI table.
640 @param [in] AcpiTableRevision Revision of the ACPI table.
641 */
642 VOID
643 EFIAPI
644 ParseAcpiRsdp (
645 IN BOOLEAN Trace,
646 IN UINT8* Ptr,
647 IN UINT32 AcpiTableLength,
648 IN UINT8 AcpiTableRevision
649 );
650
651 /** This function parses the ACPI SLIT table.
652 When trace is enabled this function parses the SLIT table and
653 traces the ACPI table fields.
654
655 This function also validates System Localities for the following:
656 - Diagonal elements have a normalized value of 10
657 - Relative distance from System Locality at i*N+j is same as
658 j*N+i
659
660 @param [in] Trace If TRUE, trace the ACPI fields.
661 @param [in] Ptr Pointer to the start of the buffer.
662 @param [in] AcpiTableLength Length of the ACPI table.
663 @param [in] AcpiTableRevision Revision of the ACPI table.
664 */
665 VOID
666 EFIAPI
667 ParseAcpiSlit (
668 IN BOOLEAN Trace,
669 IN UINT8* Ptr,
670 IN UINT32 AcpiTableLength,
671 IN UINT8 AcpiTableRevision
672 );
673
674 /** This function parses the ACPI SPCR table.
675 When trace is enabled this function parses the SPCR table and
676 traces the ACPI table fields.
677
678 This function also performs validations of the ACPI table fields.
679
680 @param [in] Trace If TRUE, trace the ACPI fields.
681 @param [in] Ptr Pointer to the start of the buffer.
682 @param [in] AcpiTableLength Length of the ACPI table.
683 @param [in] AcpiTableRevision Revision of the ACPI table.
684 */
685 VOID
686 EFIAPI
687 ParseAcpiSpcr (
688 IN BOOLEAN Trace,
689 IN UINT8* Ptr,
690 IN UINT32 AcpiTableLength,
691 IN UINT8 AcpiTableRevision
692 );
693
694 /** This function parses the ACPI SRAT table.
695 When trace is enabled this function parses the SRAT table and
696 traces the ACPI table fields.
697
698 This function parses the following Resource Allocation Structures:
699 - Processor Local APIC/SAPIC Affinity Structure
700 - Memory Affinity Structure
701 - Processor Local x2APIC Affinity Structure
702 - GICC Affinity Structure
703
704 This function also performs validation of the ACPI table fields.
705
706 @param [in] Trace If TRUE, trace the ACPI fields.
707 @param [in] Ptr Pointer to the start of the buffer.
708 @param [in] AcpiTableLength Length of the ACPI table.
709 @param [in] AcpiTableRevision Revision of the ACPI table.
710 */
711 VOID
712 EFIAPI
713 ParseAcpiSrat (
714 IN BOOLEAN Trace,
715 IN UINT8* Ptr,
716 IN UINT32 AcpiTableLength,
717 IN UINT8 AcpiTableRevision
718 );
719
720 /** This function parses the ACPI SSDT table.
721 When trace is enabled this function parses the SSDT table and
722 traces the ACPI table fields.
723 For the SSDT table only the ACPI header fields are
724 parsed and traced.
725
726 @param [in] Trace If TRUE, trace the ACPI fields.
727 @param [in] Ptr Pointer to the start of the buffer.
728 @param [in] AcpiTableLength Length of the ACPI table.
729 @param [in] AcpiTableRevision Revision of the ACPI table.
730 */
731 VOID
732 EFIAPI
733 ParseAcpiSsdt (
734 IN BOOLEAN Trace,
735 IN UINT8* Ptr,
736 IN UINT32 AcpiTableLength,
737 IN UINT8 AcpiTableRevision
738 );
739
740 /** This function parses the ACPI XSDT table
741 and optionally traces the ACPI table fields.
742
743 This function also performs validation of the XSDT table.
744
745 @param [in] Trace If TRUE, trace the ACPI fields.
746 @param [in] Ptr Pointer to the start of the buffer.
747 @param [in] AcpiTableLength Length of the ACPI table.
748 @param [in] AcpiTableRevision Revision of the ACPI table.
749 */
750 VOID
751 EFIAPI
752 ParseAcpiXsdt (
753 IN BOOLEAN Trace,
754 IN UINT8* Ptr,
755 IN UINT32 AcpiTableLength,
756 IN UINT8 AcpiTableRevision
757 );
758
759 #endif // ACPIPARSER_H_