]> git.proxmox.com Git - mirror_edk2.git/blob - ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.h
ShellPkg: acpiview: Add -r parameter for table requirements validation
[mirror_edk2.git] / ShellPkg / Library / UefiShellAcpiViewCommandLib / AcpiView.h
1 /** @file
2 Header file for AcpiView
3
4 Copyright (c) 2016 - 2020, ARM Limited. All rights reserved.
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6 **/
7
8 #ifndef ACPIVIEW_H_
9 #define ACPIVIEW_H_
10
11 /**
12 A macro to define the max file name length
13 **/
14 #define MAX_FILE_NAME_LEN 128
15
16 /**
17 Offset to the RSDP revision from the start of the RSDP
18 **/
19 #define RSDP_REVISION_OFFSET 15
20
21 /**
22 Offset to the RSDP length from the start of the RSDP
23 **/
24 #define RSDP_LENGTH_OFFSET 20
25
26 /**
27 The EREPORT_OPTION enum describes ACPI table Reporting options.
28 **/
29 typedef enum ReportOption {
30 ReportAll, ///< Report All tables.
31 ReportSelected, ///< Report Selected table.
32 ReportTableList, ///< Report List of tables.
33 ReportDumpBinFile, ///< Dump selected table to a file.
34 ReportMax,
35 } EREPORT_OPTION;
36
37 /**
38 This function resets the ACPI table error counter to Zero.
39 **/
40 VOID
41 ResetErrorCount (
42 VOID
43 );
44
45 /**
46 This function returns the ACPI table error count.
47
48 @retval Returns the count of errors detected in the ACPI tables.
49 **/
50 UINT32
51 GetErrorCount (
52 VOID
53 );
54
55 /**
56 This function resets the ACPI table warning counter to Zero.
57 **/
58 VOID
59 ResetWarningCount (
60 VOID
61 );
62
63 /**
64 This function returns the ACPI table warning count.
65
66 @retval Returns the count of warning detected in the ACPI tables.
67 **/
68 UINT32
69 GetWarningCount (
70 VOID
71 );
72
73 /**
74 This function returns the colour highlighting status.
75
76 @retval TRUE if colour highlighting is enabled.
77 **/
78 BOOLEAN
79 GetColourHighlighting (
80 VOID
81 );
82
83 /**
84 This function sets the colour highlighting status.
85
86 @param Highlight The Highlight status.
87
88 **/
89 VOID
90 SetColourHighlighting (
91 BOOLEAN Highlight
92 );
93
94 /**
95 This function returns the consistency checking status.
96
97 @retval TRUE if consistency checking is enabled.
98 **/
99 BOOLEAN
100 GetConsistencyChecking (
101 VOID
102 );
103
104 /**
105 This function sets the consistency checking status.
106
107 @param ConsistencyChecking The consistency checking status.
108
109 **/
110 VOID
111 SetConsistencyChecking (
112 BOOLEAN ConsistencyChecking
113 );
114
115 /**
116 This function returns the ACPI table requirements validation flag.
117
118 @retval TRUE if check for mandatory table presence should be performed.
119 **/
120 BOOLEAN
121 GetMandatoryTableValidate (
122 VOID
123 );
124
125 /**
126 This function sets the ACPI table requirements validation flag.
127
128 @param Validate Enable/Disable ACPI table requirements validation.
129 **/
130 VOID
131 SetMandatoryTableValidate (
132 BOOLEAN Validate
133 );
134
135 /**
136 This function returns the identifier of specification to validate ACPI table
137 requirements against.
138
139 @return ID of specification listing mandatory tables.
140 **/
141 UINTN
142 GetMandatoryTableSpec (
143 VOID
144 );
145
146 /**
147 This function sets the identifier of specification to validate ACPI table
148 requirements against.
149
150 @param Spec ID of specification listing mandatory tables.
151 **/
152 VOID
153 SetMandatoryTableSpec (
154 UINTN Spec
155 );
156
157 /**
158 This function processes the table reporting options for the ACPI table.
159
160 @param [in] Signature The ACPI table Signature.
161 @param [in] TablePtr Pointer to the ACPI table data.
162 @param [in] Length The length fo the ACPI table.
163
164 @retval Returns TRUE if the ACPI table should be traced.
165 **/
166 BOOLEAN
167 ProcessTableReportOptions (
168 IN CONST UINT32 Signature,
169 IN CONST UINT8* TablePtr,
170 IN CONST UINT32 Length
171 );
172
173 #endif // ACPIVIEW_H_