#include <Library/UefiBootServicesTableLib.h>\r
#include "AcpiParser.h"\r
#include "AcpiView.h"\r
+#include "AcpiViewConfig.h"\r
\r
STATIC UINT32 gIndent;\r
STATIC UINT32 mTableErrorCount;\r
#include "AcpiParser.h"\r
#include "AcpiTableParser.h"\r
#include "AcpiView.h"\r
+#include "AcpiViewConfig.h"\r
\r
#if defined(MDE_CPU_ARM) || defined (MDE_CPU_AARCH64)\r
#include "Arm/SbbrValidator.h"\r
#include "AcpiParser.h"\r
#include "AcpiTableParser.h"\r
#include "AcpiView.h"\r
+#include "AcpiViewConfig.h"\r
#include "UefiShellAcpiViewCommandLib.h"\r
\r
#if defined(MDE_CPU_ARM) || defined (MDE_CPU_AARCH64)\r
\r
EFI_HII_HANDLE gShellAcpiViewHiiHandle = NULL;\r
\r
-// Report variables\r
-STATIC UINT32 mSelectedAcpiTable;\r
-STATIC CONST CHAR16* mSelectedAcpiTableName;\r
-STATIC BOOLEAN mSelectedAcpiTableFound;\r
-STATIC EREPORT_OPTION mReportType;\r
STATIC UINT32 mTableCount;\r
STATIC UINT32 mBinTableCount;\r
-STATIC BOOLEAN mConsistencyCheck;\r
-STATIC BOOLEAN mColourHighlighting;\r
-STATIC BOOLEAN mMandatoryTableValidate;\r
-STATIC UINTN mMandatoryTableSpec;\r
\r
/**\r
An array of acpiview command line parameters.\r
{NULL, TypeMax}\r
};\r
\r
-/**\r
- This function returns the colour highlighting status.\r
-\r
- @retval TRUE if colour highlighting is enabled.\r
-**/\r
-BOOLEAN\r
-GetColourHighlighting (\r
- VOID\r
- )\r
-{\r
- return mColourHighlighting;\r
-}\r
-\r
-/**\r
- This function sets the colour highlighting status.\r
-\r
- @param Highlight The Highlight status.\r
-\r
-**/\r
-VOID\r
-SetColourHighlighting (\r
- BOOLEAN Highlight\r
- )\r
-{\r
- mColourHighlighting = Highlight;\r
-}\r
-\r
-/**\r
- This function returns the consistency checking status.\r
-\r
- @retval TRUE if consistency checking is enabled.\r
-**/\r
-BOOLEAN\r
-GetConsistencyChecking (\r
- VOID\r
- )\r
-{\r
- return mConsistencyCheck;\r
-}\r
-\r
-/**\r
- This function sets the consistency checking status.\r
-\r
- @param ConsistencyChecking The consistency checking status.\r
-\r
-**/\r
-VOID\r
-SetConsistencyChecking (\r
- BOOLEAN ConsistencyChecking\r
- )\r
-{\r
- mConsistencyCheck = ConsistencyChecking;\r
-}\r
-\r
-/**\r
- This function returns the ACPI table requirements validation flag.\r
-\r
- @retval TRUE if check for mandatory table presence should be performed.\r
-**/\r
-BOOLEAN\r
-GetMandatoryTableValidate (\r
- VOID\r
- )\r
-{\r
- return mMandatoryTableValidate;\r
-}\r
-\r
-/**\r
- This function sets the ACPI table requirements validation flag.\r
-\r
- @param Validate Enable/Disable ACPI table requirements validation.\r
-**/\r
-VOID\r
-SetMandatoryTableValidate (\r
- BOOLEAN Validate\r
- )\r
-{\r
- mMandatoryTableValidate = Validate;\r
-}\r
-\r
-/**\r
- This function returns the identifier of specification to validate ACPI table\r
- requirements against.\r
-\r
- @return ID of specification listing mandatory tables.\r
-**/\r
-UINTN\r
-GetMandatoryTableSpec (\r
- VOID\r
- )\r
-{\r
- return mMandatoryTableSpec;\r
-}\r
-\r
-/**\r
- This function sets the identifier of specification to validate ACPI table\r
- requirements against.\r
-\r
- @param Spec ID of specification listing mandatory tables.\r
-**/\r
-VOID\r
-SetMandatoryTableSpec (\r
- UINTN Spec\r
- )\r
-{\r
- mMandatoryTableSpec = Spec;\r
-}\r
-\r
-/**\r
- This function returns the report options.\r
-\r
- @retval Returns the report option.\r
-**/\r
-STATIC\r
-EREPORT_OPTION\r
-GetReportOption (\r
- VOID\r
- )\r
-{\r
- return mReportType;\r
-}\r
-\r
-/**\r
- This function returns the selected ACPI table.\r
-\r
- @retval Returns signature of the selected ACPI table.\r
-**/\r
-STATIC\r
-UINT32\r
-GetSelectedAcpiTable (\r
- VOID\r
- )\r
-{\r
- return mSelectedAcpiTable;\r
-}\r
-\r
/**\r
This function dumps the ACPI table to a file.\r
\r
IN CONST UINTN Length\r
)\r
{\r
- EFI_STATUS Status;\r
- CHAR16 FileNameBuffer[MAX_FILE_NAME_LEN];\r
- SHELL_FILE_HANDLE DumpFileHandle;\r
- UINTN TransferBytes;\r
+ EFI_STATUS Status;\r
+ CHAR16 FileNameBuffer[MAX_FILE_NAME_LEN];\r
+ SHELL_FILE_HANDLE DumpFileHandle;\r
+ UINTN TransferBytes;\r
+ SELECTED_ACPI_TABLE *SelectedTable;\r
\r
DumpFileHandle = NULL;\r
TransferBytes = Length;\r
+ GetSelectedAcpiTable (&SelectedTable);\r
\r
UnicodeSPrint (\r
FileNameBuffer,\r
sizeof (FileNameBuffer),\r
L".\\%s%04d.bin",\r
- mSelectedAcpiTableName,\r
+ SelectedTable->Name,\r
mBinTableCount++\r
);\r
\r
IN CONST UINT32 Length\r
)\r
{\r
- UINTN OriginalAttribute;\r
- UINT8* SignaturePtr;\r
- BOOLEAN Log;\r
- BOOLEAN HighLight;\r
+ UINTN OriginalAttribute;\r
+ UINT8 *SignaturePtr;\r
+ BOOLEAN Log;\r
+ BOOLEAN HighLight;\r
+ SELECTED_ACPI_TABLE *SelectedTable;\r
\r
//\r
// set local variables to suppress incorrect compiler/analyzer warnings\r
SignaturePtr = (UINT8*)(UINTN)&Signature;\r
Log = FALSE;\r
HighLight = GetColourHighlighting ();\r
+ GetSelectedAcpiTable (&SelectedTable);\r
\r
switch (GetReportOption ()) {\r
case ReportAll:\r
Log = TRUE;\r
break;\r
case ReportSelected:\r
- if (Signature == GetSelectedAcpiTable ()) {\r
+ if (Signature == SelectedTable->Type) {\r
Log = TRUE;\r
- mSelectedAcpiTableFound = TRUE;\r
+ SelectedTable->Found = TRUE;\r
}\r
break;\r
case ReportTableList:\r
);\r
break;\r
case ReportDumpBinFile:\r
- if (Signature == GetSelectedAcpiTable ()) {\r
- mSelectedAcpiTableFound = TRUE;\r
+ if (Signature == SelectedTable->Type) {\r
+ SelectedTable->Found = TRUE;\r
DumpAcpiTableToFile (TablePtr, Length);\r
}\r
break;\r
return Log;\r
}\r
\r
-/**\r
- This function converts a string to ACPI table signature.\r
-\r
- @param [in] Str Pointer to the string to be converted to the\r
- ACPI table signature.\r
\r
- @retval The ACPI table signature.\r
-**/\r
-STATIC\r
-UINT32\r
-ConvertStrToAcpiSignature (\r
- IN CONST CHAR16* Str\r
- )\r
-{\r
- UINT8 Index;\r
- CHAR8 Ptr[4];\r
-\r
- ZeroMem (Ptr, sizeof (Ptr));\r
- Index = 0;\r
-\r
- // Convert to Upper case and convert to ASCII\r
- while ((Index < 4) && (Str[Index] != 0)) {\r
- if (Str[Index] >= L'a' && Str[Index] <= L'z') {\r
- Ptr[Index] = (CHAR8)(Str[Index] - (L'a' - L'A'));\r
- } else {\r
- Ptr[Index] = (CHAR8)Str[Index];\r
- }\r
- Index++;\r
- }\r
- return *(UINT32*)Ptr;\r
-}\r
\r
/**\r
This function iterates the configuration table entries in the\r
UINT8 RsdpRevision;\r
PARSE_ACPI_TABLE_PROC RsdpParserProc;\r
BOOLEAN Trace;\r
+ SELECTED_ACPI_TABLE *SelectedTable;\r
\r
//\r
// set local variables to suppress incorrect compiler/analyzer warnings\r
ResetErrorCount ();\r
ResetWarningCount ();\r
\r
+ // Retrieve the user selection of ACPI table to process\r
+ GetSelectedAcpiTable (&SelectedTable);\r
+\r
// Search the table for an entry that matches the ACPI Table Guid\r
FoundAcpiTable = FALSE;\r
for (Index = 0; Index < SystemTable->NumberOfTableEntries; Index++) {\r
if (ReportTableList != ReportOption) {\r
if (((ReportSelected == ReportOption) ||\r
(ReportDumpBinFile == ReportOption)) &&\r
- (!mSelectedAcpiTableFound)) {\r
+ (!SelectedTable->Found)) {\r
Print (L"\nRequested ACPI Table not found.\n");\r
} else if (GetConsistencyChecking () &&\r
(ReportDumpBinFile != ReportOption)) {\r
CHAR16* ProblemParam;\r
SHELL_FILE_HANDLE TmpDumpFileHandle;\r
CONST CHAR16* MandatoryTableSpecStr;\r
+ CONST CHAR16 *SelectedTableName;\r
\r
// Set Defaults\r
- mReportType = ReportAll;\r
mTableCount = 0;\r
mBinTableCount = 0;\r
- mSelectedAcpiTable = 0;\r
- mSelectedAcpiTableName = NULL;\r
- mSelectedAcpiTableFound = FALSE;\r
- mConsistencyCheck = TRUE;\r
- mMandatoryTableValidate = FALSE;\r
- mMandatoryTableSpec = 0;\r
+ AcpiConfigSetDefaults ();\r
\r
ShellStatus = SHELL_SUCCESS;\r
Package = NULL;\r
}\r
\r
if (ShellCommandLineGetFlag (Package, L"-l")) {\r
- mReportType = ReportTableList;\r
+ SetReportOption (ReportTableList);\r
} else {\r
- mSelectedAcpiTableName = ShellCommandLineGetValue (Package, L"-s");\r
- if (mSelectedAcpiTableName != NULL) {\r
- mSelectedAcpiTable = (UINT32)ConvertStrToAcpiSignature (\r
- mSelectedAcpiTableName\r
- );\r
- mReportType = ReportSelected;\r
+ SelectedTableName = ShellCommandLineGetValue (Package, L"-s");\r
+ if (SelectedTableName != NULL) {\r
+ SelectAcpiTable (SelectedTableName);\r
+ SetReportOption (ReportSelected);\r
\r
if (ShellCommandLineGetFlag (Package, L"-d")) {\r
// Create a temporary file to check if the media is writable.\r
CHAR16 FileNameBuffer[MAX_FILE_NAME_LEN];\r
- mReportType = ReportDumpBinFile;\r
+ SetReportOption (ReportDumpBinFile);\r
\r
UnicodeSPrint (\r
FileNameBuffer,\r
sizeof (FileNameBuffer),\r
L".\\%s%04d.tmp",\r
- mSelectedAcpiTableName,\r
+ SelectedTableName,\r
mBinTableCount\r
);\r
\r
**/\r
#define RSDP_LENGTH_OFFSET 20\r
\r
-/**\r
- The EREPORT_OPTION enum describes ACPI table Reporting options.\r
-**/\r
-typedef enum ReportOption {\r
- ReportAll, ///< Report All tables.\r
- ReportSelected, ///< Report Selected table.\r
- ReportTableList, ///< Report List of tables.\r
- ReportDumpBinFile, ///< Dump selected table to a file.\r
- ReportMax,\r
-} EREPORT_OPTION;\r
-\r
/**\r
This function resets the ACPI table error counter to Zero.\r
**/\r
VOID\r
);\r
\r
-/**\r
- This function returns the colour highlighting status.\r
-\r
- @retval TRUE if colour highlighting is enabled.\r
-**/\r
-BOOLEAN\r
-GetColourHighlighting (\r
- VOID\r
- );\r
-\r
-/**\r
- This function sets the colour highlighting status.\r
-\r
- @param Highlight The Highlight status.\r
-\r
-**/\r
-VOID\r
-SetColourHighlighting (\r
- BOOLEAN Highlight\r
- );\r
-\r
-/**\r
- This function returns the consistency checking status.\r
-\r
- @retval TRUE if consistency checking is enabled.\r
-**/\r
-BOOLEAN\r
-GetConsistencyChecking (\r
- VOID\r
- );\r
-\r
-/**\r
- This function sets the consistency checking status.\r
-\r
- @param ConsistencyChecking The consistency checking status.\r
-\r
-**/\r
-VOID\r
-SetConsistencyChecking (\r
- BOOLEAN ConsistencyChecking\r
- );\r
-\r
-/**\r
- This function returns the ACPI table requirements validation flag.\r
-\r
- @retval TRUE if check for mandatory table presence should be performed.\r
-**/\r
-BOOLEAN\r
-GetMandatoryTableValidate (\r
- VOID\r
- );\r
-\r
-/**\r
- This function sets the ACPI table requirements validation flag.\r
-\r
- @param Validate Enable/Disable ACPI table requirements validation.\r
-**/\r
-VOID\r
-SetMandatoryTableValidate (\r
- BOOLEAN Validate\r
- );\r
-\r
-/**\r
- This function returns the identifier of specification to validate ACPI table\r
- requirements against.\r
-\r
- @return ID of specification listing mandatory tables.\r
-**/\r
-UINTN\r
-GetMandatoryTableSpec (\r
- VOID\r
- );\r
-\r
-/**\r
- This function sets the identifier of specification to validate ACPI table\r
- requirements against.\r
-\r
- @param Spec ID of specification listing mandatory tables.\r
-**/\r
-VOID\r
-SetMandatoryTableSpec (\r
- UINTN Spec\r
- );\r
-\r
/**\r
This function processes the table reporting options for the ACPI table.\r
\r
--- /dev/null
+/** @file\r
+ State and accessors for 'acpiview' configuration.\r
+\r
+ Copyright (c) 2016 - 2020, ARM Limited. All rights reserved.<BR>\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
+**/\r
+\r
+#include <Library/BaseMemoryLib.h>\r
+#include <Library/DebugLib.h>\r
+\r
+#include "AcpiViewConfig.h"\r
+\r
+// Report variables\r
+STATIC BOOLEAN mConsistencyCheck;\r
+STATIC BOOLEAN mColourHighlighting;\r
+STATIC EREPORT_OPTION mReportType;\r
+STATIC BOOLEAN mMandatoryTableValidate;\r
+STATIC UINTN mMandatoryTableSpec;\r
+\r
+// User selection of which ACPI table should be checked\r
+SELECTED_ACPI_TABLE mSelectedAcpiTable;\r
+\r
+/**\r
+ Reset the AcpiView user configuration to defaults\r
+**/\r
+VOID\r
+EFIAPI\r
+AcpiConfigSetDefaults (\r
+ VOID\r
+ )\r
+{\r
+ mReportType = ReportAll;\r
+ mSelectedAcpiTable.Type = 0;\r
+ mSelectedAcpiTable.Name = NULL;\r
+ mSelectedAcpiTable.Found = FALSE;\r
+ mConsistencyCheck = TRUE;\r
+ mMandatoryTableValidate = FALSE;\r
+ mMandatoryTableSpec = 0;\r
+}\r
+\r
+/**\r
+ This function converts a string to ACPI table signature.\r
+\r
+ @param [in] Str Pointer to the string to be converted to the\r
+ ACPI table signature.\r
+\r
+ @retval The ACPI table signature.\r
+**/\r
+STATIC\r
+UINT32\r
+ConvertStrToAcpiSignature (\r
+ IN CONST CHAR16 *Str\r
+ )\r
+{\r
+ UINT8 Index;\r
+ CHAR8 Ptr[4];\r
+\r
+ ZeroMem (Ptr, sizeof (Ptr));\r
+ Index = 0;\r
+\r
+ // Convert to Upper case and convert to ASCII\r
+ while ((Index < 4) && (Str[Index] != 0)) {\r
+ if (Str[Index] >= L'a' && Str[Index] <= L'z') {\r
+ Ptr[Index] = (CHAR8)(Str[Index] - (L'a' - L'A'));\r
+ } else {\r
+ Ptr[Index] = (CHAR8)Str[Index];\r
+ }\r
+ Index++;\r
+ }\r
+ return *(UINT32 *) Ptr;\r
+}\r
+\r
+/**\r
+ This function selects an ACPI table in current context.\r
+ The string name of the table is converted into UINT32\r
+ table signature.\r
+\r
+ @param [in] TableName The name of the ACPI table to select.\r
+**/\r
+VOID\r
+EFIAPI\r
+SelectAcpiTable (\r
+ IN CONST CHAR16 *TableName\r
+ )\r
+{\r
+ ASSERT (TableName != NULL);\r
+\r
+ mSelectedAcpiTable.Name = TableName;\r
+ mSelectedAcpiTable.Type = ConvertStrToAcpiSignature (mSelectedAcpiTable.Name);\r
+}\r
+\r
+/**\r
+ This function returns the selected ACPI table.\r
+\r
+ @param [out] SelectedAcpiTable Pointer that will contain the returned struct.\r
+**/\r
+VOID\r
+EFIAPI\r
+GetSelectedAcpiTable (\r
+ OUT SELECTED_ACPI_TABLE **SelectedAcpiTable\r
+ )\r
+{\r
+ *SelectedAcpiTable = &mSelectedAcpiTable;\r
+}\r
+\r
+/**\r
+ This function returns the colour highlighting status.\r
+\r
+ @retval TRUE Colour highlighting is enabled.\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+GetColourHighlighting (\r
+ VOID\r
+ )\r
+{\r
+ return mColourHighlighting;\r
+}\r
+\r
+/**\r
+ This function sets the colour highlighting status.\r
+\r
+ @param [in] Highlight The highlight status.\r
+**/\r
+VOID\r
+EFIAPI\r
+SetColourHighlighting (\r
+ BOOLEAN Highlight\r
+ )\r
+{\r
+ mColourHighlighting = Highlight;\r
+}\r
+\r
+/**\r
+ This function returns the consistency checking status.\r
+\r
+ @retval TRUE Consistency checking is enabled.\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+GetConsistencyChecking (\r
+ VOID\r
+ )\r
+{\r
+ return mConsistencyCheck;\r
+}\r
+\r
+/**\r
+ This function sets the consistency checking status.\r
+\r
+ @param [in] ConsistencyChecking The consistency checking status.\r
+**/\r
+VOID\r
+EFIAPI\r
+SetConsistencyChecking (\r
+ BOOLEAN ConsistencyChecking\r
+ )\r
+{\r
+ mConsistencyCheck = ConsistencyChecking;\r
+}\r
+\r
+/**\r
+ This function returns the report options.\r
+\r
+ @return The current report option.\r
+**/\r
+EREPORT_OPTION\r
+EFIAPI\r
+GetReportOption (\r
+ VOID\r
+ )\r
+{\r
+ return mReportType;\r
+}\r
+\r
+/**\r
+ This function sets the report options.\r
+\r
+ @param [in] ReportType The report option to set.\r
+**/\r
+VOID\r
+EFIAPI\r
+SetReportOption (\r
+ EREPORT_OPTION ReportType\r
+ )\r
+{\r
+ mReportType = ReportType;\r
+}\r
+\r
+/**\r
+ This function returns the ACPI table requirements validation flag.\r
+\r
+ @retval TRUE Check for mandatory table presence should be performed.\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+GetMandatoryTableValidate (\r
+ VOID\r
+ )\r
+{\r
+ return mMandatoryTableValidate;\r
+}\r
+\r
+/**\r
+ This function sets the ACPI table requirements validation flag.\r
+\r
+ @param [in] Validate Enable/Disable ACPI table requirements validation.\r
+**/\r
+VOID\r
+EFIAPI\r
+SetMandatoryTableValidate (\r
+ BOOLEAN Validate\r
+ )\r
+{\r
+ mMandatoryTableValidate = Validate;\r
+}\r
+\r
+/**\r
+ This function returns the identifier of specification to validate ACPI table\r
+ requirements against.\r
+\r
+ @return ID of specification listing mandatory tables.\r
+**/\r
+UINTN\r
+EFIAPI\r
+GetMandatoryTableSpec (\r
+ VOID\r
+ )\r
+{\r
+ return mMandatoryTableSpec;\r
+}\r
+\r
+/**\r
+ This function sets the identifier of specification to validate ACPI table\r
+ requirements against.\r
+\r
+ @param [in] Spec ID of specification listing mandatory tables.\r
+**/\r
+VOID\r
+EFIAPI\r
+SetMandatoryTableSpec (\r
+ UINTN Spec\r
+ )\r
+{\r
+ mMandatoryTableSpec = Spec;\r
+}\r
--- /dev/null
+/** @file\r
+ Header file for 'acpiview' configuration.\r
+\r
+ Copyright (c) 2016 - 2020, ARM Limited. All rights reserved.<BR>\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
+**/\r
+\r
+#ifndef ACPI_VIEW_CONFIG_H_\r
+#define ACPI_VIEW_CONFIG_H_\r
+\r
+/**\r
+ This function returns the colour highlighting status.\r
+\r
+ @retval TRUE Colour highlighting is enabled.\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+GetColourHighlighting (\r
+ VOID\r
+ );\r
+\r
+/**\r
+ This function sets the colour highlighting status.\r
+\r
+ @param [in] Highlight The highlight status.\r
+**/\r
+VOID\r
+EFIAPI\r
+SetColourHighlighting (\r
+ BOOLEAN Highlight\r
+ );\r
+\r
+/**\r
+ This function returns the consistency checking status.\r
+\r
+ @retval TRUE Consistency checking is enabled.\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+GetConsistencyChecking (\r
+ VOID\r
+ );\r
+\r
+/**\r
+ This function sets the consistency checking status.\r
+\r
+ @param [in] ConsistencyChecking The consistency checking status.\r
+**/\r
+VOID\r
+EFIAPI\r
+SetConsistencyChecking (\r
+ BOOLEAN ConsistencyChecking\r
+ );\r
+\r
+/**\r
+ This function returns the ACPI table requirements validation flag.\r
+\r
+ @retval TRUE Check for mandatory table presence should be performed.\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+GetMandatoryTableValidate (\r
+ VOID\r
+ );\r
+\r
+/**\r
+ This function sets the ACPI table requirements validation flag.\r
+\r
+ @param [in] Validate Enable/Disable ACPI table requirements validation.\r
+**/\r
+VOID\r
+EFIAPI\r
+SetMandatoryTableValidate (\r
+ BOOLEAN Validate\r
+ );\r
+\r
+/**\r
+ This function returns the identifier of specification to validate ACPI table\r
+ requirements against.\r
+\r
+ @return ID of specification listing mandatory tables.\r
+**/\r
+UINTN\r
+EFIAPI\r
+GetMandatoryTableSpec (\r
+ VOID\r
+ );\r
+\r
+/**\r
+ This function sets the identifier of specification to validate ACPI table\r
+ requirements against.\r
+\r
+ @param [in] Spec ID of specification listing mandatory tables.\r
+**/\r
+VOID\r
+EFIAPI\r
+SetMandatoryTableSpec (\r
+ UINTN Spec\r
+ );\r
+\r
+/**\r
+ The EREPORT_OPTION enum describes ACPI table Reporting options.\r
+**/\r
+typedef enum {\r
+ ReportAll, ///< Report All tables.\r
+ ReportSelected, ///< Report Selected table.\r
+ ReportTableList, ///< Report List of tables.\r
+ ReportDumpBinFile, ///< Dump selected table to a file.\r
+ ReportMax,\r
+} EREPORT_OPTION;\r
+\r
+/**\r
+ This function returns the report options.\r
+\r
+ @return The current report option.\r
+**/\r
+EREPORT_OPTION\r
+EFIAPI\r
+GetReportOption (\r
+ VOID\r
+ );\r
+\r
+/**\r
+ This function sets the report options.\r
+\r
+ @param [in] ReportType The report option to set.\r
+**/\r
+VOID\r
+EFIAPI\r
+SetReportOption (\r
+ EREPORT_OPTION ReportType\r
+ );\r
+\r
+/**\r
+ A structure holding the user selection detailing which\r
+ ACPI table is to be examined by the AcpiView code.\r
+**/\r
+typedef struct {\r
+ UINT32 Type; ///< 32bit signature of the selected ACPI table.\r
+ CONST CHAR16* Name; ///< User friendly name of the selected ACPI table.\r
+ BOOLEAN Found; ///< The selected table has been found in the system.\r
+} SELECTED_ACPI_TABLE;\r
+\r
+/**\r
+ This function returns the selected ACPI table.\r
+\r
+ @param [out] SelectedAcpiTable Pointer that will contain the returned struct.\r
+**/\r
+VOID\r
+EFIAPI\r
+GetSelectedAcpiTable (\r
+ OUT SELECTED_ACPI_TABLE** SelectedAcpiTable\r
+ );\r
+\r
+/**\r
+ This function selects an ACPI table in current context.\r
+ The string name of the table is converted into UINT32\r
+ table signature.\r
+\r
+ @param [in] TableName The name of the ACPI table to select.\r
+**/\r
+VOID\r
+EFIAPI\r
+SelectAcpiTable (\r
+ CONST CHAR16* TableName\r
+ );\r
+\r
+/**\r
+ Reset the AcpiView user configuration to defaults.\r
+**/\r
+VOID\r
+EFIAPI\r
+AcpiConfigSetDefaults (\r
+ VOID\r
+ );\r
+\r
+#endif // ACPI_VIEW_CONFIG_H_\r
#include <Library/UefiLib.h>\r
#include "AcpiParser.h"\r
#include "AcpiTableParser.h"\r
+#include "AcpiViewConfig.h"\r
\r
// "The number of GT Block Timers must be less than or equal to 8"\r
#define GT_BLOCK_TIMER_COUNT_MAX 8\r
#include <Library/UefiLib.h>\r
#include "AcpiParser.h"\r
#include "AcpiTableParser.h"\r
+#include "AcpiViewConfig.h"\r
\r
// Local variables\r
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;\r
#include <Library/UefiLib.h>\r
#include "AcpiParser.h"\r
#include "AcpiTableParser.h"\r
+#include "AcpiViewConfig.h"\r
#include "MadtParser.h"\r
\r
// Local Variables\r
#include <Library/UefiLib.h>\r
#include "AcpiParser.h"\r
#include "AcpiView.h"\r
+#include "AcpiViewConfig.h"\r
#include "PpttParser.h"\r
\r
// Local variables\r
#include <Library/UefiLib.h>\r
#include "AcpiParser.h"\r
#include "AcpiTableParser.h"\r
+#include "AcpiViewConfig.h"\r
\r
// Local Variables\r
STATIC CONST UINT8* SratRAType;\r
DESTRUCTOR = UefiShellAcpiViewCommandLibDestructor\r
\r
[Sources.common]\r
- UefiShellAcpiViewCommandLib.uni\r
- UefiShellAcpiViewCommandLib.c\r
- UefiShellAcpiViewCommandLib.h\r
- AcpiParser.h\r
- AcpiTableParser.h\r
- AcpiView.h\r
AcpiParser.c\r
+ AcpiParser.h\r
AcpiTableParser.c\r
+ AcpiTableParser.h\r
AcpiView.c\r
+ AcpiView.h\r
+ AcpiViewConfig.c\r
+ AcpiViewConfig.h\r
Parsers/Bgrt/BgrtParser.c\r
Parsers/Dbg2/Dbg2Parser.c\r
Parsers/Dsdt/DsdtParser.c\r
Parsers/Gtdt/GtdtParser.c\r
Parsers/Iort/IortParser.c\r
Parsers/Madt/MadtParser.c\r
+ Parsers/Madt/MadtParser.h\r
Parsers/Mcfg/McfgParser.c\r
Parsers/Pptt/PpttParser.c\r
+ Parsers/Pptt/PpttParser.h\r
Parsers/Rsdp/RsdpParser.c\r
Parsers/Slit/SlitParser.c\r
Parsers/Spcr/SpcrParser.c\r
Parsers/Srat/SratParser.c\r
Parsers/Ssdt/SsdtParser.c\r
Parsers/Xsdt/XsdtParser.c\r
- Parsers/Madt/MadtParser.h\r
- Parsers/Pptt/PpttParser.h\r
+ UefiShellAcpiViewCommandLib.c\r
+ UefiShellAcpiViewCommandLib.h\r
+ UefiShellAcpiViewCommandLib.uni\r
\r
[Sources.ARM, Sources.AARCH64]\r
Arm/SbbrValidator.h\r
Arm/SbbrValidator.c\r
\r
[Packages]\r
+ MdeModulePkg/MdeModulePkg.dec\r
MdePkg/MdePkg.dec\r
ShellPkg/ShellPkg.dec\r
- MdeModulePkg/MdeModulePkg.dec\r
\r
[LibraryClasses]\r
- MemoryAllocationLib\r
BaseLib\r
BaseMemoryLib\r
DebugLib\r
+ FileHandleLib\r
+ HiiLib\r
+ MemoryAllocationLib\r
+ PcdLib\r
+ PrintLib\r
ShellCommandLib\r
ShellLib\r
+ UefiBootServicesTableLib\r
UefiLib\r
UefiRuntimeServicesTableLib\r
- UefiBootServicesTableLib\r
- PcdLib\r
- HiiLib\r
- PrintLib\r
- FileHandleLib\r
\r
\r
[FixedPcd]\r