VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h@ 89983

Last change on this file since 89983 was 89983, checked in by vboxsync, 4 years ago

Devices/EFI: Merge edk-stable202105 and openssl 1.1.1j and make it build, bugref:4643

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette