/** @file\r
\r
- Copyright (c) 2016 - 2019, ARM Limited. All rights reserved.\r
+ Copyright (c) 2016 - 2020, ARM Limited. All rights reserved.\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
**/\r
\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
{L"-h", TypeFlag},\r
{L"-l", TypeFlag},\r
{L"-s", TypeValue},\r
+ {L"-r", TypeValue},\r
{NULL, TypeMax}\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
LIST_ENTRY* Package;\r
CHAR16* ProblemParam;\r
SHELL_FILE_HANDLE TmpDumpFileHandle;\r
+ CONST CHAR16* MandatoryTableSpecStr;\r
\r
// Set Defaults\r
mReportType = ReportAll;\r
mSelectedAcpiTableName = NULL;\r
mSelectedAcpiTableFound = FALSE;\r
mConsistencyCheck = TRUE;\r
+ mMandatoryTableValidate = FALSE;\r
+ mMandatoryTableSpec = 0;\r
\r
ShellStatus = SHELL_SUCCESS;\r
Package = NULL;\r
L"-s"\r
);\r
ShellStatus = SHELL_INVALID_PARAMETER;\r
+ } else if (ShellCommandLineGetFlag (Package, L"-r") &&\r
+ ShellCommandLineGetValue (Package, L"-r") == NULL) {\r
+ ShellPrintHiiEx (\r
+ -1,\r
+ -1,\r
+ NULL,\r
+ STRING_TOKEN (STR_GEN_NO_VALUE),\r
+ gShellAcpiViewHiiHandle,\r
+ L"acpiview",\r
+ L"-r"\r
+ );\r
+ ShellStatus = SHELL_INVALID_PARAMETER;\r
} else if ((ShellCommandLineGetFlag (Package, L"-s") &&\r
ShellCommandLineGetFlag (Package, L"-l"))) {\r
ShellPrintHiiEx (\r
// Surpress consistency checking if requested\r
SetConsistencyChecking (!ShellCommandLineGetFlag (Package, L"-q"));\r
\r
+ // Evaluate the parameters for mandatory ACPI table presence checks\r
+ SetMandatoryTableValidate (ShellCommandLineGetFlag (Package, L"-r"));\r
+ MandatoryTableSpecStr = ShellCommandLineGetValue (Package, L"-r");\r
+\r
+ if (MandatoryTableSpecStr != NULL) {\r
+ SetMandatoryTableSpec (ShellHexStrToUintn (MandatoryTableSpecStr));\r
+ }\r
+\r
if (ShellCommandLineGetFlag (Package, L"-l")) {\r
mReportType = ReportTableList;\r
} else {\r
/** @file\r
Header file for AcpiView\r
\r
- Copyright (c) 2016 - 2019, ARM Limited. All rights reserved.\r
+ Copyright (c) 2016 - 2020, ARM Limited. All rights reserved.\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
**/\r
\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
// /**\r
//\r
-// Copyright (c) 2016 - 2019, ARM Limited. All rights reserved.<BR>\r
+// Copyright (c) 2016 - 2020, ARM Limited. All rights reserved.<BR>\r
// SPDX-License-Identifier: BSD-2-Clause-Patent\r
//\r
// Module Name:\r
"Display ACPI Table information.\r\n"\r
".SH SYNOPSIS\r\n"\r
" \r\n"\r
-"ACPIVIEW [[-?] | [[-l] | [-s AcpiTable [-d]]] [-q] [-h]]\r\n"\r
+"ACPIVIEW [[-?] | [[[[-l] | [-s AcpiTable [-d]]] [-q] [-h]] [-r Spec]]]\r\n"\r
" \r\n"\r
".SH OPTIONS\r\n"\r
" \r\n"\r
" -d - Generate a binary file dump of the specified AcpiTable.\r\n"\r
" -q - Quiet. Suppress errors and warnings. Disables consistency checks.\r\n"\r
" -h - Enable colour highlighting.\r\n"\r
+" -r - Validate that all required ACPI tables are installed\r\n"\r
+" Spec : Specification to validate against.\r\n"\r
+" For Arm, the possible values are:\r\n"\r
+" 0 - Server Base Boot Requirements v1.0\r\n"\r
+" 1 - Server Base Boot Requirements v1.1\r\n"\r
+" 2 - Server Base Boot Requirements v1.2\r\n"\r
" -? - Show help.\r\n"\r
" \r\n"\r
".SH DESCRIPTION\r\n"\r
" * To display contents of all ACPI tables:\r\n"\r
" fs0:\> acpiview\r\n"\r
" \r\n"\r
+" * To check if all Server Base Boot Requirements (SBBR) v1.2 mandatory\r\n"\r
+" ACPI tables are installed (Arm only):\r\n"\r
+" fs0:\> acpiview -r 2\r\n"\r
+" \r\n"\r
".SH RETURNVALUES\r\n"\r
" \r\n"\r
"RETURN VALUES:\r\n"\r