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