ShellPkg/AcpiView: Refactor configuration

A new file and header (AcpiViewConfig.[ch]) is created
that houses the user configuration. This declutters the
core code and improves modularity of the design.

The module level symbols for verbosity, table selection, and
highlighting are refactored into the new file.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Signed-off-by: Tomas Pilar <tomas.pilar@arm.com>
This commit is contained in:
Tomas Pilar
2020-06-19 12:59:54 +01:00
committed by mergify[bot]
parent cae974bea2
commit e18ac66d84
12 changed files with 479 additions and 315 deletions

View File

@ -23,17 +23,6 @@
**/
#define RSDP_LENGTH_OFFSET 20
/**
The EREPORT_OPTION enum describes ACPI table Reporting options.
**/
typedef enum ReportOption {
ReportAll, ///< Report All tables.
ReportSelected, ///< Report Selected table.
ReportTableList, ///< Report List of tables.
ReportDumpBinFile, ///< Dump selected table to a file.
ReportMax,
} EREPORT_OPTION;
/**
This function resets the ACPI table error counter to Zero.
**/
@ -70,90 +59,6 @@ GetWarningCount (
VOID
);
/**
This function returns the colour highlighting status.
@retval TRUE if colour highlighting is enabled.
**/
BOOLEAN
GetColourHighlighting (
VOID
);
/**
This function sets the colour highlighting status.
@param Highlight The Highlight status.
**/
VOID
SetColourHighlighting (
BOOLEAN Highlight
);
/**
This function returns the consistency checking status.
@retval TRUE if consistency checking is enabled.
**/
BOOLEAN
GetConsistencyChecking (
VOID
);
/**
This function sets the consistency checking status.
@param ConsistencyChecking The consistency checking status.
**/
VOID
SetConsistencyChecking (
BOOLEAN ConsistencyChecking
);
/**
This function returns the ACPI table requirements validation flag.
@retval TRUE if check for mandatory table presence should be performed.
**/
BOOLEAN
GetMandatoryTableValidate (
VOID
);
/**
This function sets the ACPI table requirements validation flag.
@param Validate Enable/Disable ACPI table requirements validation.
**/
VOID
SetMandatoryTableValidate (
BOOLEAN Validate
);
/**
This function returns the identifier of specification to validate ACPI table
requirements against.
@return ID of specification listing mandatory tables.
**/
UINTN
GetMandatoryTableSpec (
VOID
);
/**
This function sets the identifier of specification to validate ACPI table
requirements against.
@param Spec ID of specification listing mandatory tables.
**/
VOID
SetMandatoryTableSpec (
UINTN Spec
);
/**
This function processes the table reporting options for the ACPI table.