Make the function comments follow EDK2 coding style.
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Evan Lloyd <evan.lloyd@arm.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
-/**\r
+/** @file\r
ACPI parser\r
\r
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
STATIC UINT32 mTableErrorCount;\r
STATIC UINT32 mTableWarningCount;\r
\r
-/** This function resets the ACPI table error counter to Zero.\r
-*/\r
+/**\r
+ This function resets the ACPI table error counter to Zero.\r
+**/\r
VOID\r
ResetErrorCount (\r
VOID\r
mTableErrorCount = 0;\r
}\r
\r
-/** This function returns the ACPI table error count.\r
+/**\r
+ This function returns the ACPI table error count.\r
\r
@retval Returns the count of errors detected in the ACPI tables.\r
-*/\r
+**/\r
UINT32\r
GetErrorCount (\r
VOID\r
return mTableErrorCount;\r
}\r
\r
-/** This function resets the ACPI table warning counter to Zero.\r
-*/\r
+/**\r
+ This function resets the ACPI table warning counter to Zero.\r
+**/\r
VOID\r
ResetWarningCount (\r
VOID\r
mTableWarningCount = 0;\r
}\r
\r
-/** This function returns the ACPI table warning count.\r
+/**\r
+ This function returns the ACPI table warning count.\r
\r
@retval Returns the count of warning detected in the ACPI tables.\r
-*/\r
+**/\r
UINT32\r
GetWarningCount (\r
VOID\r
return mTableWarningCount;\r
}\r
\r
-/** This function increments the ACPI table error counter.\r
-*/\r
+/**\r
+ This function increments the ACPI table error counter.\r
+**/\r
VOID\r
EFIAPI\r
IncrementErrorCount (\r
mTableErrorCount++;\r
}\r
\r
-/** This function increments the ACPI table warning counter.\r
-*/\r
+/**\r
+ This function increments the ACPI table warning counter.\r
+**/\r
VOID\r
EFIAPI\r
IncrementWarningCount (\r
mTableWarningCount++;\r
}\r
\r
-/** This function verifies the ACPI table checksum.\r
+/**\r
+ This function verifies the ACPI table checksum.\r
\r
This function verifies the checksum for the ACPI table and optionally\r
prints the status.\r
\r
@retval TRUE The checksum is OK.\r
@retval FALSE The checksum failed.\r
-*/\r
+**/\r
BOOLEAN\r
EFIAPI\r
VerifyChecksum (\r
return (Checksum == 0);\r
}\r
\r
-/** This function performs a raw data dump of the ACPI table.\r
+/**\r
+ This function performs a raw data dump of the ACPI table.\r
\r
@param [in] Ptr Pointer to the start of the table buffer.\r
@param [in] Length The length of the buffer.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
DumpRaw (\r
Print (L" %a", AsciiBuffer);\r
}\r
\r
-/** This function traces 1 byte of data as specified in the\r
- format string.\r
+/**\r
+ This function traces 1 byte of data as specified in the format string.\r
\r
@param [in] Format The format string for tracing the data.\r
@param [in] Ptr Pointer to the start of the buffer.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
DumpUint8 (\r
Print (Format, *Ptr);\r
}\r
\r
-/** This function traces 2 bytes of data as specified in the\r
- format string.\r
+/**\r
+ This function traces 2 bytes of data as specified in the format string.\r
\r
@param [in] Format The format string for tracing the data.\r
@param [in] Ptr Pointer to the start of the buffer.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
DumpUint16 (\r
Print (Format, *(UINT16*)Ptr);\r
}\r
\r
-/** This function traces 4 bytes of data as specified in the\r
- format string.\r
+/**\r
+ This function traces 4 bytes of data as specified in the format string.\r
\r
@param [in] Format The format string for tracing the data.\r
@param [in] Ptr Pointer to the start of the buffer.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
DumpUint32 (\r
Print (Format, *(UINT32*)Ptr);\r
}\r
\r
-/** This function traces 8 bytes of data as specified by the\r
- format string.\r
+/**\r
+ This function traces 8 bytes of data as specified by the format string.\r
\r
@param [in] Format The format string for tracing the data.\r
@param [in] Ptr Pointer to the start of the buffer.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
DumpUint64 (\r
Print (Format, Val);\r
}\r
\r
-/** This function traces 3 characters which can be optionally\r
- formated using the format string if specified.\r
+/**\r
+ This function traces 3 characters which can be optionally\r
+ formated using the format string if specified.\r
\r
If no format string is specified the Format must be NULL.\r
\r
@param [in] Format Optional format string for tracing the data.\r
@param [in] Ptr Pointer to the start of the buffer.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
Dump3Chars (\r
);\r
}\r
\r
-/** This function traces 4 characters which can be optionally\r
- formated using the format string if specified.\r
+/**\r
+ This function traces 4 characters which can be optionally\r
+ formated using the format string if specified.\r
\r
If no format string is specified the Format must be NULL.\r
\r
@param [in] Format Optional format string for tracing the data.\r
@param [in] Ptr Pointer to the start of the buffer.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
Dump4Chars (\r
);\r
}\r
\r
-/** This function traces 6 characters which can be optionally\r
- formated using the format string if specified.\r
+/**\r
+ This function traces 6 characters which can be optionally\r
+ formated using the format string if specified.\r
\r
If no format string is specified the Format must be NULL.\r
\r
@param [in] Format Optional format string for tracing the data.\r
@param [in] Ptr Pointer to the start of the buffer.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
Dump6Chars (\r
);\r
}\r
\r
-/** This function traces 8 characters which can be optionally\r
- formated using the format string if specified.\r
+/**\r
+ This function traces 8 characters which can be optionally\r
+ formated using the format string if specified.\r
\r
If no format string is specified the Format must be NULL.\r
\r
@param [in] Format Optional format string for tracing the data.\r
@param [in] Ptr Pointer to the start of the buffer.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
Dump8Chars (\r
);\r
}\r
\r
-/** This function indents and prints the ACPI table Field Name.\r
+/**\r
+ This function indents and prints the ACPI table Field Name.\r
\r
@param [in] Indent Number of spaces to add to the global table indent.\r
The global table indent is 0 by default; however\r
Therefore the total indent in the output is\r
dependent on from where this function is called.\r
@param [in] FieldName Pointer to the Field Name.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
PrintFieldName (\r
);\r
}\r
\r
-/** This function is used to parse an ACPI table buffer.\r
+/**\r
+ This function is used to parse an ACPI table buffer.\r
\r
The ACPI table buffer is parsed using the ACPI table parser information\r
specified by a pointer to an array of ACPI_PARSER elements. This parser\r
@param [in] ParserItems Number of items in the ACPI_PARSER array.\r
\r
@retval Number of bytes parsed.\r
-*/\r
+**/\r
UINT32\r
EFIAPI\r
ParseAcpi (\r
return Offset;\r
}\r
\r
-/** An array describing the ACPI Generic Address Structure.\r
+/**\r
+ An array describing the ACPI Generic Address Structure.\r
The GasParser array is used by the ParseAcpi function to parse and/or trace\r
the GAS structure.\r
-*/\r
+**/\r
STATIC CONST ACPI_PARSER GasParser[] = {\r
{L"Address Space ID", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},\r
{L"Register Bit Width", 1, 1, L"0x%x", NULL, NULL, NULL, NULL},\r
{L"Address", 8, 4, L"0x%lx", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** This function indents and traces the GAS structure as described\r
- by the GasParser.\r
+/**\r
+ This function indents and traces the GAS structure as described by the GasParser.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] Indent Number of spaces to indent the output.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
DumpGasStruct (\r
);\r
}\r
\r
-/** This function traces the GAS structure as described by the GasParser.\r
+/**\r
+ This function traces the GAS structure as described by the GasParser.\r
\r
@param [in] Format Optional format string for tracing the data.\r
@param [in] Ptr Pointer to the start of the buffer.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
DumpGas (\r
DumpGasStruct (Ptr, 2);\r
}\r
\r
-/** This function traces the ACPI header as described by the AcpiHeaderParser.\r
+/**\r
+ This function traces the ACPI header as described by the AcpiHeaderParser.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
\r
@retval Number of bytes parsed.\r
-*/\r
+**/\r
UINT32\r
EFIAPI\r
DumpAcpiHeader (\r
);\r
}\r
\r
-/** This function parses the ACPI header as described by the AcpiHeaderParser.\r
+/**\r
+ This function parses the ACPI header as described by the AcpiHeaderParser.\r
\r
This function optionally returns the signature, length and revision of the\r
ACPI table.\r
@param [out] Revision Gets location of the revision of the ACPI table.\r
\r
@retval Number of bytes parsed.\r
-*/\r
+**/\r
UINT32\r
EFIAPI\r
ParseAcpiHeader (\r
-/**\r
+/** @file\r
Header file for ACPI parser\r
\r
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
/// that allows us to process the log options.\r
#define RSDP_TABLE_INFO SIGNATURE_32('R', 'S', 'D', 'P')\r
\r
-/** This function increments the ACPI table error counter.\r
-*/\r
+/**\r
+ This function increments the ACPI table error counter.\r
+**/\r
VOID\r
EFIAPI\r
IncrementErrorCount (\r
VOID\r
);\r
\r
-/** This function increments the ACPI table warning counter.\r
-*/\r
+/**\r
+ This function increments the ACPI table warning counter.\r
+**/\r
VOID\r
EFIAPI\r
IncrementWarningCount (\r
VOID\r
);\r
\r
-/** This function verifies the ACPI table checksum.\r
+/**\r
+ This function verifies the ACPI table checksum.\r
\r
This function verifies the checksum for the ACPI table and optionally\r
prints the status.\r
\r
@retval TRUE The checksum is OK.\r
@retval FALSE The checksum failed.\r
-*/\r
+**/\r
BOOLEAN\r
EFIAPI\r
VerifyChecksum (\r
IN UINT32 Length\r
);\r
\r
-/** This function performs a raw data dump of the ACPI table.\r
+/**\r
+ This function performs a raw data dump of the ACPI table.\r
\r
@param [in] Ptr Pointer to the start of the table buffer.\r
@param [in] Length The length of the buffer.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
DumpRaw (\r
IN UINT32 Length\r
);\r
\r
-/** This function traces 1 byte of datum as specified in the\r
- format string.\r
+/**\r
+ This function traces 1 byte of datum as specified in the format string.\r
\r
@param [in] Format The format string for tracing the data.\r
@param [in] Ptr Pointer to the start of the buffer.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
DumpUint8 (\r
IN UINT8* Ptr\r
);\r
\r
-/** This function traces 2 bytes of data as specified in the\r
- format string.\r
+/**\r
+ This function traces 2 bytes of data as specified in the format string.\r
\r
@param [in] Format The format string for tracing the data.\r
@param [in] Ptr Pointer to the start of the buffer.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
DumpUint16 (\r
IN UINT8* Ptr\r
);\r
\r
-/** This function traces 4 bytes of data as specified in the\r
- format string.\r
+/**\r
+ This function traces 4 bytes of data as specified in the format string.\r
\r
@param [in] Format The format string for tracing the data.\r
@param [in] Ptr Pointer to the start of the buffer.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
DumpUint32 (\r
IN UINT8* Ptr\r
);\r
\r
-/** This function traces 8 bytes of data as specified by the\r
- format string.\r
+/**\r
+ This function traces 8 bytes of data as specified by the format string.\r
\r
@param [in] Format The format string for tracing the data.\r
@param [in] Ptr Pointer to the start of the buffer.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
DumpUint64 (\r
IN UINT8* Ptr\r
);\r
\r
-/** This function traces 3 characters which can be optionally\r
- formated using the format string if specified.\r
+/**\r
+ This function traces 3 characters which can be optionally\r
+ formated using the format string if specified.\r
\r
If no format string is specified the Format must be NULL.\r
\r
@param [in] Format Optional format string for tracing the data.\r
@param [in] Ptr Pointer to the start of the buffer.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
Dump3Chars (\r
IN UINT8* Ptr\r
);\r
\r
-/** This function traces 4 characters which can be optionally\r
- formated using the format string if specified.\r
+/**\r
+ This function traces 4 characters which can be optionally\r
+ formated using the format string if specified.\r
\r
If no format string is specified the Format must be NULL.\r
\r
@param [in] Format Optional format string for tracing the data.\r
@param [in] Ptr Pointer to the start of the buffer.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
Dump4Chars (\r
IN UINT8* Ptr\r
);\r
\r
-/** This function traces 6 characters which can be optionally\r
- formated using the format string if specified.\r
+/**\r
+ This function traces 6 characters which can be optionally\r
+ formated using the format string if specified.\r
\r
If no format string is specified the Format must be NULL.\r
\r
@param [in] Format Optional format string for tracing the data.\r
@param [in] Ptr Pointer to the start of the buffer.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
Dump6Chars (\r
IN UINT8* Ptr\r
);\r
\r
-/** This function traces 8 characters which can be optionally\r
- formated using the format string if specified.\r
+/**\r
+ This function traces 8 characters which can be optionally\r
+ formated using the format string if specified.\r
\r
If no format string is specified the Format must be NULL.\r
\r
@param [in] Format Optional format string for tracing the data.\r
@param [in] Ptr Pointer to the start of the buffer.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
Dump8Chars (\r
IN UINT8* Ptr\r
);\r
\r
-/** This function indents and prints the ACPI table Field Name.\r
+/**\r
+ This function indents and prints the ACPI table Field Name.\r
\r
@param [in] Indent Number of spaces to add to the global table\r
indent. The global table indent is 0 by default;\r
the total indent in the output is dependent on from\r
where this function is called.\r
@param [in] FieldName Pointer to the Field Name.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
PrintFieldName (\r
IN UINT32 Indent,\r
IN CONST CHAR16* FieldName\r
-);\r
+ );\r
\r
-/** This function pointer is the template for customizing the trace output\r
+/**\r
+ This function pointer is the template for customizing the trace output\r
\r
@param [in] Format Format string for tracing the data as specified by\r
the 'Format' member of ACPI_PARSER.\r
@param [in] Ptr Pointer to the start of the buffer.\r
-*/\r
+**/\r
typedef VOID (EFIAPI *FNPTR_PRINT_FORMATTER)(CONST CHAR16* Format, UINT8* Ptr);\r
\r
-/** This function pointer is the template for validating an ACPI table field.\r
+/**\r
+ This function pointer is the template for validating an ACPI table field.\r
\r
@param [in] Ptr Pointer to the start of the field data.\r
@param [in] Context Pointer to context specific information as specified by\r
the 'Context' member of the ACPI_PARSER.\r
e.g. this could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
typedef VOID (EFIAPI *FNPTR_FIELD_VALIDATOR)(UINT8* Ptr, VOID* Context);\r
\r
-/** The ACPI_PARSER structure describes the fields of an ACPI table and\r
- provides means for the parser to interpret and trace appropriately.\r
+/**\r
+ The ACPI_PARSER structure describes the fields of an ACPI table and\r
+ provides means for the parser to interpret and trace appropriately.\r
\r
The first three members are populated based on information present in\r
in the ACPI table specifications. The remaining members describe how\r
\r
The 'Format' and 'PrintFormatter' members allow flexibility for\r
representing the field data.\r
-*/\r
+**/\r
typedef struct AcpiParser {\r
\r
/// String describing the ACPI table field\r
VOID* Context;\r
} ACPI_PARSER;\r
\r
-/** A structure used to store the pointers to the members of the\r
- ACPI description header structure that was parsed.\r
-*/\r
+/**\r
+ A structure used to store the pointers to the members of the\r
+ ACPI description header structure that was parsed.\r
+**/\r
typedef struct AcpiDescriptionHeaderInfo {\r
/// ACPI table signature\r
UINT32* Signature;\r
UINT32* CreatorRevision;\r
} ACPI_DESCRIPTION_HEADER_INFO;\r
\r
-/** This function is used to parse an ACPI table buffer.\r
+/**\r
+ This function is used to parse an ACPI table buffer.\r
\r
The ACPI table buffer is parsed using the ACPI table parser information\r
specified by a pointer to an array of ACPI_PARSER elements. This parser\r
@param [in] ParserItems Number of items in the ACPI_PARSER array.\r
\r
@retval Number of bytes parsed.\r
-*/\r
+**/\r
UINT32\r
EFIAPI\r
ParseAcpi (\r
IN UINT32 Length,\r
IN CONST ACPI_PARSER* Parser,\r
IN UINT32 ParserItems\r
-);\r
+ );\r
\r
-/** This is a helper macro to pass parameters to the Parser functions.\r
+/**\r
+ This is a helper macro to pass parameters to the Parser functions.\r
\r
@param [in] Parser The name of the ACPI_PARSER array describing the\r
ACPI table fields.\r
-*/\r
+**/\r
#define PARSER_PARAMS(Parser) Parser, sizeof (Parser) / sizeof (Parser[0])\r
\r
-/** This is a helper macro for describing the ACPI header fields.\r
+/**\r
+ This is a helper macro for describing the ACPI header fields.\r
\r
@param [out] Info Pointer to retrieve the ACPI table header information.\r
-*/\r
+**/\r
#define PARSE_ACPI_HEADER(Info) \\r
{ L"Signature", 4, 0, NULL, Dump4Chars, \\r
(VOID**)&(Info)->Signature , NULL, NULL }, \\r
{ L"Creator Revision", 4, 32, L"0x%X", NULL, \\r
(VOID**)&(Info)->CreatorRevision, NULL, NULL }\r
\r
-/** Length of the ACPI GAS structure.\r
+/**\r
+ Length of the ACPI GAS structure.\r
\r
NOTE: This might normally be defined as\r
sizeof (EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE).\r
However, we deliberately minimise any reference to the EDK2 ACPI\r
headers in an attempt to provide cross checking.\r
-*/\r
+**/\r
#define GAS_LENGTH 12\r
\r
-/** Length of the ACPI Header structure.\r
+/**\r
+ Length of the ACPI Header structure.\r
\r
NOTE: This might normally be defined as\r
sizeof (EFI_ACPI_DESCRIPTION_HEADER).\r
However, we deliberately minimise any reference to the EDK2 ACPI\r
headers in an attempt to provide cross checking.\r
-*/\r
+**/\r
#define ACPI_DESCRIPTION_HEADER_LENGTH 36\r
\r
-/** This function indents and traces the GAS structure as described\r
- by the GasParser.\r
+/**\r
+ This function indents and traces the GAS structure as described by the GasParser.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] Indent Number of spaces to indent the output.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
DumpGasStruct (\r
IN UINT32 Indent\r
);\r
\r
-/** This function traces the GAS structure as described by the GasParser.\r
+/**\r
+ This function traces the GAS structure as described by the GasParser.\r
\r
@param [in] Format Optional format string for tracing the data.\r
@param [in] Ptr Pointer to the start of the buffer.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
DumpGas (\r
IN UINT8* Ptr\r
);\r
\r
-/** This function traces the ACPI header as described by the AcpiHeaderParser.\r
+/**\r
+ This function traces the ACPI header as described by the AcpiHeaderParser.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
\r
@retval Number of bytes parsed.\r
-*/\r
+**/\r
UINT32\r
EFIAPI\r
DumpAcpiHeader (\r
IN UINT8* Ptr\r
);\r
\r
-/** This function parses the ACPI header as described by the AcpiHeaderParser.\r
+/**\r
+ This function parses the ACPI header as described by the AcpiHeaderParser.\r
\r
This function optionally returns the Signature, Length and revision of the\r
ACPI table.\r
@param [out] Revision Gets location of the revision of the ACPI table.\r
\r
@retval Number of bytes parsed.\r
-*/\r
+**/\r
UINT32\r
EFIAPI\r
ParseAcpiHeader (\r
OUT CONST UINT8** Revision\r
);\r
\r
-/** This function parses the ACPI BGRT table.\r
+/**\r
+ This function parses the ACPI BGRT table.\r
When trace is enabled this function parses the BGRT table and\r
traces the ACPI table fields.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiBgrt (\r
IN UINT8 AcpiTableRevision\r
);\r
\r
-/** This function parses the ACPI DBG2 table.\r
+/**\r
+ This function parses the ACPI DBG2 table.\r
When trace is enabled this function parses the DBG2 table and\r
traces the ACPI table fields.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiDbg2 (\r
IN UINT8 AcpiTableRevision\r
);\r
\r
-/** This function parses the ACPI DSDT table.\r
+/**\r
+ This function parses the ACPI DSDT table.\r
When trace is enabled this function parses the DSDT table and\r
traces the ACPI table fields.\r
For the DSDT table only the ACPI header fields are parsed and\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiDsdt (\r
IN UINT8 AcpiTableRevision\r
);\r
\r
-/** This function parses the ACPI FADT table.\r
+/**\r
+ This function parses the ACPI FADT table.\r
This function parses the FADT table and optionally traces the ACPI\r
table fields.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiFadt (\r
IN UINT8 AcpiTableRevision\r
);\r
\r
-/** This function parses the ACPI GTDT table.\r
+/**\r
+ This function parses the ACPI GTDT table.\r
When trace is enabled this function parses the GTDT table and\r
traces the ACPI table fields.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiGtdt (\r
IN UINT8 AcpiTableRevision\r
);\r
\r
-/** This function parses the ACPI IORT table.\r
+/**\r
+ This function parses the ACPI IORT table.\r
When trace is enabled this function parses the IORT table and\r
traces the ACPI fields.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiIort (\r
IN UINT8 AcpiTableRevision\r
);\r
\r
-/** This function parses the ACPI MADT table.\r
+/**\r
+ This function parses the ACPI MADT table.\r
When trace is enabled this function parses the MADT table and\r
traces the ACPI table fields.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiMadt (\r
IN UINT8 AcpiTableRevision\r
);\r
\r
-/** This function parses the ACPI MCFG table.\r
+/**\r
+ This function parses the ACPI MCFG table.\r
When trace is enabled this function parses the MCFG table and\r
traces the ACPI table fields.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiMcfg (\r
IN UINT8 AcpiTableRevision\r
);\r
\r
-/** This function parses the ACPI RSDP table.\r
+/**\r
+ This function parses the ACPI RSDP table.\r
\r
This function invokes the parser for the XSDT table.\r
* Note - This function does not support parsing of RSDT table.\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiRsdp (\r
IN UINT8 AcpiTableRevision\r
);\r
\r
-/** This function parses the ACPI SLIT table.\r
+/**\r
+ This function parses the ACPI SLIT table.\r
When trace is enabled this function parses the SLIT table and\r
traces the ACPI table fields.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiSlit (\r
IN UINT8 AcpiTableRevision\r
);\r
\r
-/** This function parses the ACPI SPCR table.\r
+/**\r
+ This function parses the ACPI SPCR table.\r
When trace is enabled this function parses the SPCR table and\r
traces the ACPI table fields.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiSpcr (\r
IN UINT8 AcpiTableRevision\r
);\r
\r
-/** This function parses the ACPI SRAT table.\r
+/**\r
+ This function parses the ACPI SRAT table.\r
When trace is enabled this function parses the SRAT table and\r
traces the ACPI table fields.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiSrat (\r
IN UINT8 AcpiTableRevision\r
);\r
\r
-/** This function parses the ACPI SSDT table.\r
+/**\r
+ This function parses the ACPI SSDT table.\r
When trace is enabled this function parses the SSDT table and\r
traces the ACPI table fields.\r
For the SSDT table only the ACPI header fields are\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiSsdt (\r
IN UINT8 AcpiTableRevision\r
);\r
\r
-/** This function parses the ACPI XSDT table\r
+/**\r
+ This function parses the ACPI XSDT table\r
and optionally traces the ACPI table fields.\r
\r
This function also performs validation of the XSDT table.\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiXsdt (\r
-/**\r
+/** @file\r
ACPI table parser\r
\r
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
#include "AcpiTableParser.h"\r
#include "AcpiView.h"\r
\r
-/** A list of registered ACPI table parsers.\r
-*/\r
+/**\r
+ A list of registered ACPI table parsers.\r
+**/\r
STATIC ACPI_TABLE_PARSER mTableParserList[MAX_ACPI_TABLE_PARSERS];\r
\r
-/** Register the ACPI table Parser\r
+/**\r
+ Register the ACPI table Parser\r
\r
This function registers the ACPI table parser.\r
\r
was already registered.\r
@retval EFI_OUT_OF_RESOURCES No space to register the\r
parser.\r
-*/\r
+**/\r
EFI_STATUS\r
EFIAPI\r
RegisterParser (\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
-/** Deregister the ACPI table Parser\r
+/**\r
+ Deregister the ACPI table Parser\r
\r
This function deregisters the ACPI table parser.\r
\r
@retval EFI_SUCCESS The parser was deregistered.\r
@retval EFI_INVALID_PARAMETER A parameter is invalid.\r
@retval EFI_NOT_FOUND A registered parser was not found.\r
-*/\r
+**/\r
EFI_STATUS\r
EFIAPI\r
DeregisterParser (\r
return EFI_NOT_FOUND;\r
}\r
\r
-/** Get the ACPI table Parser\r
+/**\r
+ Get the ACPI table Parser\r
\r
This function returns the ACPI table parser proc from the list of\r
registered parsers.\r
@retval EFI_SUCCESS The parser was returned successfully.\r
@retval EFI_INVALID_PARAMETER A parameter is invalid.\r
@retval EFI_NOT_FOUND A registered parser was not found.\r
-*/\r
+**/\r
EFI_STATUS\r
EFIAPI\r
GetParser (\r
return EFI_NOT_FOUND;\r
}\r
\r
-/** This function processes the ACPI tables.\r
+/**\r
+ This function processes the ACPI tables.\r
This function calls ProcessTableReportOptions() to list the ACPI\r
tables, perform binary dump of the tables and determine if the\r
ACPI fields should be traced.\r
\r
@param [in] Ptr Pointer to the start of the ACPI\r
table data buffer.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ProcessAcpiTable (\r
-/**\r
+/** @file\r
Header file for ACPI table parser\r
\r
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
#ifndef ACPITABLEPARSER_H_\r
#define ACPITABLEPARSER_H_\r
\r
-/** The maximum number of ACPI table parsers.\r
+/**\r
+ The maximum number of ACPI table parsers.\r
*/\r
#define MAX_ACPI_TABLE_PARSERS 16\r
\r
*/\r
#define ACPI_PARSER_SIGNATURE_NULL 0\r
\r
-/** A function that parses the ACPI table.\r
+/**\r
+ A function that parses the ACPI table.\r
\r
@param [in] Trace If TRUE, trace the ACPI fields.\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
typedef\r
VOID\r
(EFIAPI * PARSE_ACPI_TABLE_PROC) (\r
IN UINT8 AcpiTableRevision\r
);\r
\r
-/** The ACPI table parser information\r
-*/\r
+/**\r
+ The ACPI table parser information\r
+**/\r
typedef struct AcpiTableParser {\r
/// ACPI table signature\r
UINT32 Signature;\r
PARSE_ACPI_TABLE_PROC Parser;\r
} ACPI_TABLE_PARSER;\r
\r
-/** Register the ACPI table Parser\r
+/**\r
+ Register the ACPI table Parser\r
\r
This function registers the ACPI table parser.\r
\r
was already registered.\r
@retval EFI_OUT_OF_RESOURCES No space to register the\r
parser.\r
-*/\r
+**/\r
EFI_STATUS\r
EFIAPI\r
RegisterParser (\r
IN UINT32 Signature,\r
IN PARSE_ACPI_TABLE_PROC ParserProc\r
-);\r
+ );\r
\r
-/** Deregister the ACPI table Parser\r
+/**\r
+ Deregister the ACPI table Parser\r
\r
This function deregisters the ACPI table parser.\r
\r
@retval EFI_SUCCESS The parser was deregistered.\r
@retval EFI_INVALID_PARAMETER A parameter is invalid.\r
@retval EFI_NOT_FOUND A registered parser was not found.\r
-*/\r
+**/\r
EFI_STATUS\r
EFIAPI\r
DeregisterParser (\r
IN UINT32 Signature\r
-);\r
+ );\r
\r
-/** This function processes the ACPI tables.\r
+/**\r
+ This function processes the ACPI tables.\r
This function calls ProcessTableReportOptions() to list the ACPI\r
tables, perform binary dump of the tables and determine if the\r
ACPI fields should be traced.\r
\r
@param [in] Ptr Pointer to the start of the ACPI\r
table data buffer.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ProcessAcpiTable (\r
IN UINT8* Ptr\r
);\r
\r
-/** Get the ACPI table Parser\r
+/**\r
+ Get the ACPI table Parser\r
\r
This function returns the ACPI table parser proc from the list of\r
registered parsers.\r
@retval EFI_SUCCESS The parser was returned successfully.\r
@retval EFI_INVALID_PARAMETER A parameter is invalid.\r
@retval EFI_NOT_FOUND A registered parser was not found.\r
-*/\r
+**/\r
EFI_STATUS\r
EFIAPI\r
GetParser (\r
-/**\r
+/** @file\r
\r
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
This program and the accompanying materials\r
STATIC BOOLEAN mConsistencyCheck;\r
STATIC BOOLEAN mColourHighlighting;\r
\r
-/** An array of acpiview command line parameters.\r
-*/\r
+/**\r
+ An array of acpiview command line parameters.\r
+**/\r
STATIC CONST SHELL_PARAM_ITEM ParamList[] = {\r
{L"/?", TypeFlag},\r
{L"-c", TypeFlag},\r
{NULL, TypeMax}\r
};\r
\r
-/** This function returns the colour highlighting status.\r
+/**\r
+ This function returns the colour highlighting status.\r
\r
@retval TRUE if colour highlighting is enabled.\r
-*/\r
+**/\r
BOOLEAN\r
GetColourHighlighting (\r
VOID\r
return mColourHighlighting;\r
}\r
\r
-/** This function sets the colour highlighting status.\r
+/**\r
+ This function sets the colour highlighting status.\r
\r
-*/\r
+ @param Highlight The Highlight status.\r
+\r
+**/\r
VOID\r
SetColourHighlighting (\r
BOOLEAN Highlight\r
mColourHighlighting = Highlight;\r
}\r
\r
-/** This function returns the report options.\r
+/**\r
+ This function returns the report options.\r
\r
@retval Returns the report option.\r
-*/\r
+**/\r
STATIC\r
EREPORT_OPTION\r
GetReportOption (\r
return mReportType;\r
}\r
\r
-/** This function returns the selected ACPI table.\r
+/**\r
+ This function returns the selected ACPI table.\r
\r
@retval Returns signature of the selected ACPI table.\r
-*/\r
+**/\r
STATIC\r
UINT32\r
GetSelectedAcpiTable (\r
return mSelectedAcpiTable;\r
}\r
\r
-/** This function dumps the ACPI table to a file.\r
+/**\r
+ This function dumps the ACPI table to a file.\r
+\r
@param [in] Ptr Pointer to the ACPI table data.\r
@param [in] Length The length of the ACPI table.\r
\r
@retval TRUE Success.\r
@retval FALSE Failure.\r
-*/\r
+**/\r
STATIC\r
BOOLEAN\r
DumpAcpiTableToFile (\r
return (Length == TransferBytes);\r
}\r
\r
-/** This function processes the table reporting options for the ACPI table.\r
+/**\r
+ This function processes the table reporting options for the ACPI table.\r
\r
@param [in] Signature The ACPI table Signature.\r
@param [in] TablePtr Pointer to the ACPI table data.\r
@param [in] Length The length fo the ACPI table.\r
\r
@retval Returns TRUE if the ACPI table should be traced.\r
-*/\r
+**/\r
BOOLEAN\r
ProcessTableReportOptions (\r
IN CONST UINT32 Signature,\r
return Log;\r
}\r
\r
-/** This function converts a string to ACPI table signature.\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
+**/\r
STATIC\r
UINT32\r
ConvertStrToAcpiSignature (\r
return *(UINT32*)Ptr;\r
}\r
\r
-/** This function iterates the configuration table entries in the\r
- system table, retrieves the RSDP pointer and starts parsing\r
- the ACPI tables.\r
+/**\r
+ This function iterates the configuration table entries in the\r
+ system table, retrieves the RSDP pointer and starts parsing the ACPI tables.\r
\r
@param [in] SystemTable Pointer to the EFI system table.\r
\r
@retval Returns EFI_NOT_FOUND if the RSDP pointer is not found.\r
Returns EFI_UNSUPPORTED if the RSDP version is less than 2.\r
Returns EFI_SUCCESS if successful.\r
-*/\r
+**/\r
STATIC\r
EFI_STATUS\r
EFIAPI\r
\r
@param[in] ImageHandle Handle to the Image (NULL if Internal).\r
@param[in] SystemTable Pointer to the System Table (NULL if Internal).\r
-*/\r
+**/\r
SHELL_STATUS\r
EFIAPI\r
ShellCommandRunAcpiView (\r
-/**\r
+/** @file\r
Header file for AcpiView\r
\r
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
#ifndef ACPIVIEW_H_\r
#define ACPIVIEW_H_\r
\r
-/** A macro to define the max file name length\r
-*/\r
+/**\r
+ A macro to define the max file name length\r
+**/\r
#define MAX_FILE_NAME_LEN 128\r
\r
-/** Offset to the RSDP revision from the start of the RSDP\r
-*/\r
+/**\r
+ Offset to the RSDP revision from the start of the RSDP\r
+**/\r
#define RSDP_REVISION_OFFSET 15\r
\r
-/** Offset to the RSDP length from the start of the RSDP\r
-*/\r
+/**\r
+ Offset to the RSDP length from the start of the RSDP\r
+**/\r
#define RSDP_LENGTH_OFFSET 20\r
\r
-/** The EREPORT_OPTION enum describes ACPI table Reporting options.\r
-*/\r
+/**\r
+ The EREPORT_OPTION enum describes ACPI table Reporting options.\r
+**/\r
typedef enum ReportOption {\r
EREPORT_ALL, ///< Report All tables.\r
EREPORT_SELECTED, ///< Report Selected table.\r
EREPORT_MAX\r
} EREPORT_OPTION;\r
\r
-/** This function resets the ACPI table error counter to Zero.\r
-*/\r
+/**\r
+ This function resets the ACPI table error counter to Zero.\r
+**/\r
VOID\r
ResetErrorCount (\r
VOID\r
);\r
\r
-/** This function returns the ACPI table error count.\r
+/**\r
+ This function returns the ACPI table error count.\r
\r
@retval Returns the count of errors detected in the ACPI tables.\r
-*/\r
+**/\r
UINT32\r
GetErrorCount (\r
VOID\r
);\r
\r
-/** This function resets the ACPI table warning counter to Zero.\r
-*/\r
+/**\r
+ This function resets the ACPI table warning counter to Zero.\r
+**/\r
VOID\r
ResetWarningCount (\r
VOID\r
);\r
\r
-/** This function returns the ACPI table warning count.\r
+/**\r
+ This function returns the ACPI table warning count.\r
\r
@retval Returns the count of warning detected in the ACPI tables.\r
-*/\r
+**/\r
UINT32\r
GetWarningCount (\r
VOID\r
);\r
\r
-/** This function returns the colour highlighting status.\r
+/**\r
+ This function returns the colour highlighting status.\r
\r
@retval TRUE if colour highlighting is enabled.\r
-*/\r
+**/\r
BOOLEAN\r
GetColourHighlighting (\r
VOID\r
);\r
\r
-/** This function sets the colour highlighting status.\r
+/**\r
+ This function sets the colour highlighting status.\r
+\r
+ @param Highlight The Highlight status.\r
\r
-*/\r
+**/\r
VOID\r
SetColourHighlighting (\r
BOOLEAN Highlight\r
);\r
\r
-/** This function processes the table reporting options for the ACPI table.\r
+/**\r
+ This function processes the table reporting options for the ACPI table.\r
\r
@param [in] Signature The ACPI table Signature.\r
@param [in] TablePtr Pointer to the ACPI table data.\r
@param [in] Length The length fo the ACPI table.\r
\r
@retval Returns TRUE if the ACPI table should be traced.\r
-*/\r
+**/\r
BOOLEAN\r
ProcessTableReportOptions (\r
IN CONST UINT32 Signature,\r
-/**\r
+/** @file\r
BGRT table parser\r
\r
Copyright (c) 2017 - 2018, ARM Limited. All rights reserved.\r
// Local variables\r
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;\r
\r
-/** An ACPI_PARSER array describing the ACPI BDRT Table.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the ACPI BDRT Table.\r
+**/\r
STATIC CONST ACPI_PARSER BgrtParser[] = {\r
PARSE_ACPI_HEADER (&AcpiHdrInfo),\r
{L"Version", 2, 36, L"0x%x", NULL, NULL, NULL, NULL},\r
{L"Image Offset Y", 4, 52, L"%d", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** This function parses the ACPI BGRT table.\r
+/**\r
+ This function parses the ACPI BGRT table.\r
When trace is enabled this function parses the BGRT table and\r
traces the ACPI table fields.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiBgrt (\r
-/**\r
+/** @file\r
DBG2 table parser\r
\r
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
STATIC CONST UINT16* AddrSizeOffset;\r
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;\r
\r
-/** This function Validates the NameSpace string length.\r
+/**\r
+ This function Validates the NameSpace string length.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] Context Pointer to context specific information e.g. this\r
could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
IN VOID* Context\r
);\r
\r
-/** This function parses the debug device information structure.\r
+/**\r
+ This function parses the debug device information structure.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [out] Length Pointer in which the length of the debug\r
device information is returned.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
(VOID**)&AddrSizeOffset, NULL, NULL}\r
};\r
\r
-/** This function validates the NameSpace string length.\r
+/**\r
+ This function validates the NameSpace string length.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] Context Pointer to context specific information e.g. this\r
could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
}\r
}\r
\r
-/** This function parses the debug device information structure.\r
+/**\r
+ This function parses the debug device information structure.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
- @param [out] Ptr Pointer in which the length of the debug\r
+ @param [out] Length Pointer in which the length of the debug\r
device information is returned.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
*Length = *DbgDevInfoLen;\r
}\r
\r
-/** This function parses the ACPI DBG2 table.\r
+/**\r
+ This function parses the ACPI DBG2 table.\r
When trace is enabled this function parses the DBG2 table and\r
traces the ACPI table fields.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiDbg2 (\r
-/**\r
+/** @file\r
DSDT table parser\r
\r
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
#include "AcpiParser.h"\r
#include "AcpiTableParser.h"\r
\r
-/** This function parses the ACPI DSDT table.\r
+/**\r
+ This function parses the ACPI DSDT table.\r
When trace is enabled this function parses the DSDT table and\r
traces the ACPI table fields.\r
For the DSDT table only the ACPI header fields are parsed and\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiDsdt (\r
-/**\r
+/** @file\r
FADT table parser\r
\r
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
STATIC CONST UINT8* FadtMinorRevision;\r
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;\r
\r
-/** A macro defining the Hardware reduced ACPI flag\r
-*/\r
+/**\r
+ A macro defining the Hardware reduced ACPI flag\r
+**/\r
#define HW_REDUCED_ACPI BIT20\r
\r
-// Forward declarations\r
+/**\r
+ Get the ACPI XSDT header info.\r
+**/\r
CONST ACPI_DESCRIPTION_HEADER_INFO* CONST\r
EFIAPI\r
GetAcpiXsdtHeaderInfo (\r
VOID\r
-);\r
+ );\r
\r
+/**\r
+ This function validates the Firmware Control Field.\r
+\r
+ @param [in] Ptr Pointer to the start of the field data.\r
+ @param [in] Context Pointer to context specific information e.g. this\r
+ could be a pointer to the ACPI table header.\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
ValidateFirmwareCtrl (\r
IN UINT8* Ptr,\r
IN VOID* Context\r
-);\r
+ );\r
+\r
+/**\r
+ This function validates the X_Firmware Control Field.\r
\r
+ @param [in] Ptr Pointer to the start of the field data.\r
+ @param [in] Context Pointer to context specific information e.g. this\r
+ could be a pointer to the ACPI table header.\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
ValidateXFirmwareCtrl (\r
IN UINT8* Ptr,\r
IN VOID* Context\r
-);\r
+ );\r
\r
+/**\r
+ This function validates the flags.\r
+\r
+ @param [in] Ptr Pointer to the start of the field data.\r
+ @param [in] Context Pointer to context specific information e.g. this\r
+ could be a pointer to the ACPI table header.\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
ValidateFlags (\r
IN UINT8* Ptr,\r
IN VOID* Context\r
-);\r
+ );\r
\r
-/** An ACPI_PARSER array describing the ACPI FADT Table.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the ACPI FADT Table.\r
+**/\r
STATIC CONST ACPI_PARSER FadtParser[] = {\r
PARSE_ACPI_HEADER (&AcpiHdrInfo),\r
{L"FIRMWARE_CTRL", 4, 36, L"0x%x", NULL, NULL, ValidateFirmwareCtrl, NULL},\r
{L"Hypervisor VendorIdentity", 8, 268, L"%lx", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** This function validates the Firmware Control Field.\r
+/**\r
+ This function validates the Firmware Control Field.\r
\r
@param [in] Ptr Pointer to the start of the field data.\r
@param [in] Context Pointer to context specific information e.g. this\r
could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
#endif\r
}\r
\r
-/** This function validates the X_Firmware Control Field.\r
+/**\r
+ This function validates the X_Firmware Control Field.\r
\r
@param [in] Ptr Pointer to the start of the field data.\r
@param [in] Context Pointer to context specific information e.g. this\r
could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
#endif\r
}\r
\r
-/** This function validates the flags.\r
+/**\r
+ This function validates the flags.\r
\r
@param [in] Ptr Pointer to the start of the field data.\r
@param [in] Context Pointer to context specific information e.g. this\r
could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
#endif\r
}\r
\r
-/** This function parses the ACPI FADT table.\r
- This function parses the FADT table and optionally traces the ACPI\r
- table fields.\r
+/**\r
+ This function parses the ACPI FADT table.\r
+ This function parses the FADT table and optionally traces the ACPI table fields.\r
\r
This function also performs validation of the ACPI table fields.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiFadt (\r
-/**\r
+/** @file\r
GTDT table parser\r
\r
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
STATIC CONST UINT16* GtBlockLength;\r
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;\r
\r
-/** This function validates the GT Block timer count.\r
+/**\r
+ This function validates the GT Block timer count.\r
\r
@param [in] Ptr Pointer to the start of the field data.\r
@param [in] Context Pointer to context specific information e.g. this\r
could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
IN VOID* Context\r
);\r
\r
-/** An ACPI_PARSER array describing the ACPI GTDT Table.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the ACPI GTDT Table.\r
+**/\r
STATIC CONST ACPI_PARSER GtdtParser[] = {\r
PARSE_ACPI_HEADER (&AcpiHdrInfo),\r
{L"CntControlBase Physical Address", 8, 36, L"0x%lx", NULL, NULL,\r
(VOID**)&GtdtPlatformTimerOffset, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the Platform timer header.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the Platform timer header.\r
+**/\r
STATIC CONST ACPI_PARSER GtPlatformTimerHeaderParser[] = {\r
{L"Type", 1, 0, NULL, NULL, (VOID**)&PlatformTimerType, NULL, NULL},\r
{L"Length", 2, 1, NULL, NULL, (VOID**)&PlatformTimerLength, NULL, NULL},\r
{L"Reserved", 1, 3, NULL, NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the Platform GT Block.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the Platform GT Block.\r
+**/\r
STATIC CONST ACPI_PARSER GtBlockParser[] = {\r
{L"Type", 1, 0, L"%d", NULL, NULL, NULL, NULL},\r
{L"Length", 2, 1, L"%d", NULL, (VOID**)&GtBlockLength, NULL, NULL},\r
NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the GT Block timer.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the GT Block timer.\r
+**/\r
STATIC CONST ACPI_PARSER GtBlockTimerParser[] = {\r
{L"Frame Number", 1, 0, L"%d", NULL, NULL, NULL, NULL},\r
{L"Reserved", 3, 1, L"%x %x %x", Dump3Chars, NULL, NULL, NULL},\r
{L"Common Flags", 4, 36, L"0x%x", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the Platform Watchdog.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the Platform Watchdog.\r
+**/\r
STATIC CONST ACPI_PARSER SBSAGenericWatchdogParser[] = {\r
{L"Type", 1, 0, L"%d", NULL, NULL, NULL, NULL},\r
{L"Length", 2, 1, L"%d", NULL, NULL, NULL, NULL},\r
{L"Watchdog Timer Flags", 4, 24, L"0x%x", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** This function validates the GT Block timer count.\r
+/**\r
+ This function validates the GT Block timer count.\r
\r
@param [in] Ptr Pointer to the start of the field data.\r
@param [in] Context Pointer to context specific information e.g. this\r
could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
}\r
}\r
\r
-/** This function parses the Platform GT Block.\r
+/**\r
+ This function parses the Platform GT Block.\r
\r
@param [in] Ptr Pointer to the start of the GT Block data.\r
@param [in] Length Length of the GT Block structure.\r
-*/\r
+**/\r
STATIC\r
VOID\r
DumpGTBlock (\r
}\r
}\r
\r
-/** This function parses the Platform Watchdog timer.\r
+/**\r
+ This function parses the Platform Watchdog timer.\r
\r
@param [in] Ptr Pointer to the start of the watchdog timer data.\r
@param [in] Length Length of the watchdog timer structure.\r
-*/\r
+**/\r
STATIC\r
VOID\r
DumpWatchdogTimer (\r
);\r
}\r
\r
-/** This function parses the ACPI GTDT table.\r
+/**\r
+ This function parses the ACPI GTDT table.\r
When trace is enabled this function parses the GTDT table and\r
traces the ACPI table fields.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiGtdt (\r
-/**\r
+/** @file\r
IORT table parser\r
\r
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
// Local variables\r
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;\r
\r
-/** The EIORT_NODE enum describes the IORT Node types.\r
-*/\r
+/**\r
+ The EIORT_NODE enum describes the IORT Node types.\r
+**/\r
typedef enum IortNode {\r
EIORT_NODE_ITS_GROUP, ///< ITS Group node\r
EIORT_NODE_NAMED_COMPONENT, ///< Named Component node\r
\r
STATIC CONST UINT32* ItsCount;\r
\r
-/** This function validates the ID Mapping array count for the ITS node.\r
+/**\r
+ This function validates the ID Mapping array count for the ITS node.\r
\r
@param [in] Ptr Pointer to the start of the field data.\r
@param [in] Context Pointer to context specific information e.g. this\r
could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
IN VOID* Context\r
);\r
\r
-/** This function validates the ID Mapping array offset for the ITS node.\r
+/**\r
+ This function validates the ID Mapping array offset for the ITS node.\r
\r
@param [in] Ptr Pointer to the start of the field data.\r
@param [in] Context Pointer to context specific information e.g. this\r
could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
IN VOID* Context\r
);\r
\r
-/** Helper Macro for populating the IORT Node header in the ACPI_PARSER\r
- array.\r
+/**\r
+ Helper Macro for populating the IORT Node header in the ACPI_PARSER array.\r
\r
@param [out] ValidateIdMappingCount Optional pointer to a function for\r
validating the ID Mapping count.\r
@param [out] ValidateIdArrayReference Optional pointer to a function for\r
validating the ID Array reference.\r
-*/\r
+**/\r
#define PARSE_IORT_NODE_HEADER(ValidateIdMappingCount, \\r
ValidateIdArrayReference) \\r
{ L"Type", 1, 0, L"%d", NULL, (VOID**)&IortNodeType, NULL, NULL }, \\r
{ L"Reference to ID Array", 4, 12, L"0x%x", NULL, \\r
(VOID**)&IortIdMappingOffset, ValidateIdArrayReference, NULL }\r
\r
-/** An ACPI_PARSER array describing the ACPI IORT Table\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the ACPI IORT Table\r
+**/\r
STATIC CONST ACPI_PARSER IortParser[] = {\r
PARSE_ACPI_HEADER (&AcpiHdrInfo),\r
{L"Number of IORT Nodes", 4, 36, L"%d", NULL,\r
{L"Reserved", 4, 44, L"0x%x", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the IORT node header structure.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the IORT node header structure.\r
+**/\r
STATIC CONST ACPI_PARSER IortNodeHeaderParser[] = {\r
PARSE_IORT_NODE_HEADER (NULL, NULL)\r
};\r
\r
-/** An ACPI_PARSER array describing the IORT SMMUv1/2 node.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the IORT SMMUv1/2 node.\r
+**/\r
STATIC CONST ACPI_PARSER IortNodeSmmuV1V2Parser[] = {\r
PARSE_IORT_NODE_HEADER (NULL, NULL),\r
{L"Base Address", 8, 16, L"0x%lx", NULL, NULL, NULL, NULL},\r
{L"SMMU_NSgCfgIrpt interrupt flags", 4, 72, L"0x%x", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the SMMUv1/2 Node Interrupt Array.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the SMMUv1/2 Node Interrupt Array.\r
+**/\r
STATIC CONST ACPI_PARSER InterruptArrayParser[] = {\r
{L" Interrupt GSIV", 4, 0, L"0x%x", NULL, NULL, NULL, NULL},\r
{L" Flags", 4, 4, L"0x%x", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the IORT ID Mapping.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the IORT ID Mapping.\r
+**/\r
STATIC CONST ACPI_PARSER IortNodeIdMappingParser[] = {\r
{L" Input base", 4, 0, L"0x%x", NULL, NULL, NULL, NULL},\r
{L" Number of IDs", 4, 4, L"0x%x", NULL, NULL, NULL, NULL},\r
{L" Flags", 4, 16, L"0x%x", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the IORT SMMUv3 node.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the IORT SMMUv3 node.\r
+**/\r
STATIC CONST ACPI_PARSER IortNodeSmmuV3Parser[] = {\r
PARSE_IORT_NODE_HEADER (NULL, NULL),\r
{L"Base Address", 8, 16, L"0x%lx", NULL, NULL, NULL, NULL},\r
{L"Sync", 4, 56, L"0x%x", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the IORT ITS node.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the IORT ITS node.\r
+**/\r
STATIC CONST ACPI_PARSER IortNodeItsParser[] = {\r
PARSE_IORT_NODE_HEADER (\r
ValidateItsIdMappingCount,\r
{L" Number of ITSs", 4, 16, L"%d", NULL, (VOID**)&ItsCount, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the ITS ID.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the ITS ID.\r
+**/\r
STATIC CONST ACPI_PARSER ItsIdParser[] = {\r
{ L" GIC ITS Identifier", 4, 0, L"%d", NULL, NULL, NULL }\r
};\r
\r
-/** An ACPI_PARSER array describing the IORT Names Component node.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the IORT Names Component node.\r
+**/\r
STATIC CONST ACPI_PARSER IortNodeNamedComponentParser[] = {\r
PARSE_IORT_NODE_HEADER (NULL, NULL),\r
{L"Node Flags", 4, 16, L"%d", NULL, NULL, NULL, NULL},\r
{L"Device memory address size limit", 1, 28, L"%d", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the IORT Root Complex node.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the IORT Root Complex node.\r
+**/\r
STATIC CONST ACPI_PARSER IortNodeRootComplexParser[] = {\r
PARSE_IORT_NODE_HEADER (NULL, NULL),\r
{L"Memory access properties", 8, 16, L"0x%lx", NULL, NULL, NULL, NULL},\r
{L"PCI Segment number", 4, 28, L"0x%x", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the IORT PMCG node.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the IORT PMCG node.\r
+**/\r
STATIC CONST ACPI_PARSER IortNodePmcgParser[] = {\r
PARSE_IORT_NODE_HEADER (NULL, NULL),\r
{L"Base Address", 8, 16, L"0x%lx", NULL, NULL, NULL, NULL},\r
{L"Node reference", 4, 28, L"0x%x", NULL, NULL, NULL, NULL},\r
};\r
\r
-/** This function validates the ID Mapping array count for the ITS node.\r
+/**\r
+ This function validates the ID Mapping array count for the ITS node.\r
\r
@param [in] Ptr Pointer to the start of the field data.\r
@param [in] Context Pointer to context specific information e.g. this\r
could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
ValidateItsIdMappingCount (\r
IN UINT8* Ptr,\r
- VOID* Context\r
+ IN VOID* Context\r
)\r
{\r
if (*(UINT32*)Ptr != 0) {\r
}\r
}\r
\r
-/** This function validates the ID Mapping array offset for the ITS node.\r
+/**\r
+ This function validates the ID Mapping array offset for the ITS node.\r
\r
@param [in] Ptr Pointer to the start of the field data.\r
@param [in] Context Pointer to context specific information e.g. this\r
could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
}\r
}\r
\r
-/** This function parses the IORT Node Id Mapping array.\r
+/**\r
+ This function parses the IORT Node Id Mapping array.\r
\r
@param [in] Ptr Pointer to the start of the IORT Table.\r
@param [in] MappingCount The ID Mapping count.\r
@param [in] MappingOffset The offset of the ID Mapping array\r
from the start of the IORT table.\r
-*/\r
+**/\r
STATIC\r
VOID\r
DumpIortNodeIdMappings (\r
}\r
}\r
\r
-/** This function parses the IORT SMMUv1/2 node.\r
+/**\r
+ This function parses the IORT SMMUv1/2 node.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] Length Length of the buffer.\r
@param [in] MappingCount The ID Mapping count.\r
@param [in] MappingOffset The offset of the ID Mapping array\r
from the start of the IORT table.\r
-*/\r
+**/\r
STATIC\r
VOID\r
DumpIortNodeSmmuV1V2 (\r
}\r
}\r
\r
-/** This function parses the IORT SMMUv3 node.\r
+/**\r
+ This function parses the IORT SMMUv3 node.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] Length Length of the buffer.\r
@param [in] MappingCount The ID Mapping count.\r
@param [in] MappingOffset The offset of the ID Mapping array\r
from the start of the IORT table.\r
-*/\r
+**/\r
STATIC\r
VOID\r
DumpIortNodeSmmuV3 (\r
}\r
}\r
\r
-/** This function parses the IORT ITS node.\r
+/**\r
+ This function parses the IORT ITS node.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] Length Length of the buffer.\r
-*/\r
+**/\r
STATIC\r
VOID\r
DumpIortNodeIts (\r
// Note: ITS does not have the ID Mappings Array\r
}\r
\r
-/** This function parses the IORT Named Component node.\r
+/**\r
+ This function parses the IORT Named Component node.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] Length Length of the buffer.\r
@param [in] MappingCount The ID Mapping count.\r
@param [in] MappingOffset The offset of the ID Mapping array\r
from the start of the IORT table.\r
-*/\r
+**/\r
STATIC\r
VOID\r
DumpIortNodeNamedComponent (\r
}\r
}\r
\r
-/** This function parses the IORT Root Complex node.\r
+/**\r
+ This function parses the IORT Root Complex node.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] Length Length of the buffer.\r
@param [in] MappingCount The ID Mapping count.\r
@param [in] MappingOffset The offset of the ID Mapping array\r
from the start of the IORT table.\r
-*/\r
+**/\r
STATIC\r
VOID\r
DumpIortNodeRootComplex (\r
}\r
}\r
\r
-/** This function parses the IORT PMCG node.\r
+/**\r
+ This function parses the IORT PMCG node.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] Length Length of the buffer.\r
@param [in] MappingCount The ID Mapping count.\r
@param [in] MappingOffset The offset of the ID Mapping array\r
from the start of the IORT table.\r
-*/\r
+**/\r
STATIC\r
VOID\r
DumpIortNodePmcg (\r
}\r
}\r
\r
-/** This function parses the ACPI IORT table.\r
- When trace is enabled this function parses the IORT table and\r
- traces the ACPI fields.\r
+/**\r
+ This function parses the ACPI IORT table.\r
+ When trace is enabled this function parses the IORT table and traces the ACPI fields.\r
\r
This function also parses the following nodes:\r
- ITS Group\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiIort (\r
-/**\r
+/** @file\r
MADT table parser\r
\r
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
STATIC CONST UINT8* MadtInterruptControllerLength;\r
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;\r
\r
-// Forward declarations\r
+/**\r
+ This function validates the System Vector Base in the GICD.\r
+\r
+ @param [in] Ptr Pointer to the start of the field data.\r
+ @param [in] Context Pointer to context specific information e.g. this\r
+ could be a pointer to the ACPI table header.\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
ValidateGICDSystemVectorBase (\r
IN UINT8* Ptr,\r
IN VOID* Context\r
-);\r
+ );\r
\r
-/** An ACPI_PARSER array describing the GICC Interrupt\r
- Controller Structure.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the GICC Interrupt Controller Structure.\r
+**/\r
STATIC CONST ACPI_PARSER GicCParser[] = {\r
{L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},\r
{L"Length", 1, 1, L"%d", NULL, NULL, NULL, NULL},\r
{L"Reserved", 3, 77, L"%x %x %x", Dump3Chars, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the GICD Interrupt\r
- Controller Structure.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the GICD Interrupt Controller Structure.\r
+**/\r
STATIC CONST ACPI_PARSER GicDParser[] = {\r
{L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},\r
{L"Length", 1, 1, L"%d", NULL, NULL, NULL, NULL},\r
{L"Reserved", 3, 21, L"%x %x %x", Dump3Chars, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the MSI Frame Interrupt\r
- Controller Structure.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the MSI Frame Interrupt Controller Structure.\r
+**/\r
STATIC CONST ACPI_PARSER GicMSIFrameParser[] = {\r
{L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},\r
{L"Length", 1, 1, L"%d", NULL, NULL, NULL, NULL},\r
{L"SPI Base", 2, 22, L"0x%x", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the GICR Interrupt\r
- Controller Structure.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the GICR Interrupt Controller Structure.\r
+**/\r
STATIC CONST ACPI_PARSER GicRParser[] = {\r
{L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},\r
{L"Length", 1, 1, L"%d", NULL, NULL, NULL, NULL},\r
{L"Discovery Range Length", 4, 12, L"0x%x", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the GIC ITS Interrupt\r
- Controller Structure.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the GIC ITS Interrupt Controller Structure.\r
+**/\r
STATIC CONST ACPI_PARSER GicITSParser[] = {\r
{L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},\r
{L"Length", 1, 1, L"%d", NULL, NULL, NULL, NULL},\r
{L"Reserved", 4, 16, L"0x%x", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the ACPI MADT Table.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the ACPI MADT Table.\r
+**/\r
STATIC CONST ACPI_PARSER MadtParser[] = {\r
PARSE_ACPI_HEADER (&AcpiHdrInfo),\r
{L"Local Interrupt Controller Address", 4, 36, L"0x%x", NULL, NULL, NULL,\r
{L"Flags", 4, 40, L"0x%x", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the MADT Interrupt\r
- Controller Structure Header Structure.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the MADT Interrupt Controller Structure Header Structure.\r
+**/\r
STATIC CONST ACPI_PARSER MadtInterruptControllerHeaderParser[] = {\r
{NULL, 1, 0, NULL, NULL, (VOID**)&MadtInterruptControllerType, NULL, NULL},\r
{L"Length", 1, 1, NULL, NULL, (VOID**)&MadtInterruptControllerLength, NULL,\r
{L"Reserved", 2, 2, NULL, NULL, NULL, NULL, NULL}\r
};\r
\r
-/** This function validates the System Vector Base in the GICD.\r
+/**\r
+ This function validates the System Vector Base in the GICD.\r
\r
@param [in] Ptr Pointer to the start of the field data.\r
@param [in] Context Pointer to context specific information e.g. this\r
could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
}\r
}\r
\r
-/** This function parses the ACPI MADT table.\r
+/**\r
+ This function parses the ACPI MADT table.\r
When trace is enabled this function parses the MADT table and\r
traces the ACPI table fields.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiMadt (\r
-/**\r
+/** @file\r
MCFG table parser\r
\r
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
// Local variables\r
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;\r
\r
-/** An ACPI_PARSER array describing the ACPI MCFG Table.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the ACPI MCFG Table.\r
+**/\r
STATIC CONST ACPI_PARSER McfgParser[] = {\r
PARSE_ACPI_HEADER (&AcpiHdrInfo),\r
{L"Reserved", 8, 36, L"0x%lx", NULL, NULL, NULL, NULL},\r
};\r
\r
-/** An ACPI_PARSER array describing the PCI configuration Space\r
- Base Address structure.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the PCI configuration Space Base Address structure.\r
+**/\r
STATIC CONST ACPI_PARSER PciCfgSpaceBaseAddrParser[] = {\r
{L"Base Address", 8, 0, L"0x%lx", NULL, NULL, NULL, NULL},\r
{L"PCI Segment Group No.", 2, 8, L"0x%x", NULL, NULL, NULL, NULL},\r
{L"Reserved", 4, 12, L"0x%x", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** This function parses the ACPI MCFG table.\r
+/**\r
+ This function parses the ACPI MCFG table.\r
When trace is enabled this function parses the MCFG table and\r
traces the ACPI table fields.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiMcfg (\r
-/**\r
+/** @file\r
RSDP table parser\r
\r
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
// Local Variables\r
STATIC CONST UINT64* XsdtAddress;\r
\r
-/** This function validates the RSDT Address.\r
+/**\r
+ This function validates the RSDT Address.\r
\r
@param [in] Ptr Pointer to the start of the field data.\r
@param [in] Context Pointer to context specific information e.g. this\r
could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
IN VOID* Context\r
);\r
\r
-/** This function validates the XSDT Address.\r
+/**\r
+ This function validates the XSDT Address.\r
\r
@param [in] Ptr Pointer to the start of the field data.\r
@param [in] Context Pointer to context specific information e.g. this\r
could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
IN VOID* Context\r
);\r
\r
-/** An array describing the ACPI RSDP Table.\r
-*/\r
+/**\r
+ An array describing the ACPI RSDP Table.\r
+**/\r
STATIC CONST ACPI_PARSER RsdpParser[] = {\r
{L"Signature", 8, 0, NULL, Dump8Chars, NULL, NULL, NULL},\r
{L"Checksum", 1, 8, L"0x%x", NULL, NULL, NULL, NULL},\r
{L"Reserved", 3, 33, L"%x %x %x", Dump3Chars, NULL, NULL, NULL}\r
};\r
\r
-/** This function validates the RSDT Address.\r
+/**\r
+ This function validates the RSDT Address.\r
\r
@param [in] Ptr Pointer to the start of the field data.\r
@param [in] Context Pointer to context specific information e.g. this\r
could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
#endif\r
}\r
\r
-/** This function validates the XSDT Address.\r
+/**\r
+ This function validates the XSDT Address.\r
\r
@param [in] Ptr Pointer to the start of the field data.\r
@param [in] Context Pointer to context specific information e.g. this\r
could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
#endif\r
}\r
\r
-/** This function parses the ACPI RSDP table.\r
+/**\r
+ This function parses the ACPI RSDP table.\r
\r
This function invokes the parser for the XSDT table.\r
* Note - This function does not support parsing of RSDT table.\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiRsdp (\r
-/**\r
+/** @file\r
SLIT table parser\r
\r
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
STATIC CONST UINT64* SlitSystemLocalityCount;\r
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;\r
\r
-/** An ACPI_PARSER array describing the ACPI SLIT table.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the ACPI SLIT table.\r
+**/\r
STATIC CONST ACPI_PARSER SlitParser[] = {\r
PARSE_ACPI_HEADER (&AcpiHdrInfo),\r
{L"Number of System Localities", 8, 36, L"0x%lx", NULL,\r
(VOID**)&SlitSystemLocalityCount, NULL, NULL}\r
};\r
\r
-/** Macro to get the value of a System Locality\r
-*/\r
+/**\r
+ Macro to get the value of a System Locality\r
+**/\r
#define SLIT_ELEMENT(Ptr, i, j) *(Ptr + (i * LocalityCount) + j)\r
\r
-/** This function parses the ACPI SLIT table.\r
+/**\r
+ This function parses the ACPI SLIT table.\r
When trace is enabled this function parses the SLIT table and\r
traces the ACPI table fields.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiSlit (\r
-/**\r
+/** @file\r
SPCR table parser\r
\r
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
// Local variables\r
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;\r
\r
-/** This function validates the Interrupt Type.\r
+/**\r
+ This function validates the Interrupt Type.\r
\r
@param [in] Ptr Pointer to the start of the field data.\r
@param [in] Context Pointer to context specific information e.g. this\r
could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
IN VOID* Context\r
);\r
\r
-/** This function validates the Irq.\r
+/**\r
+ This function validates the Irq.\r
\r
@param [in] Ptr Pointer to the start of the field data.\r
@param [in] Context Pointer to context specific information e.g. this\r
could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
IN VOID* Context\r
);\r
\r
-/** An ACPI_PARSER array describing the ACPI SPCR Table.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the ACPI SPCR Table.\r
+**/\r
STATIC CONST ACPI_PARSER SpcrParser[] = {\r
PARSE_ACPI_HEADER (&AcpiHdrInfo),\r
{L"Interface Type", 1, 36, L"%d", NULL, NULL, NULL, NULL},\r
{L"Reserved", 4, 76, L"%x", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** This function validates the Interrupt Type.\r
+/**\r
+ This function validates the Interrupt Type.\r
\r
@param [in] Ptr Pointer to the start of the field data.\r
@param [in] Context Pointer to context specific information e.g. this\r
could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
#endif\r
}\r
\r
-/** This function validates the Irq.\r
+/**\r
+ This function validates the Irq.\r
\r
@param [in] Ptr Pointer to the start of the field data.\r
@param [in] Context Pointer to context specific information e.g. this\r
could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
#endif\r
}\r
\r
-/** This function parses the ACPI SPCR table.\r
+/**\r
+ This function parses the ACPI SPCR table.\r
When trace is enabled this function parses the SPCR table and\r
traces the ACPI table fields.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiSpcr (\r
-/**\r
+/** @file\r
SRAT table parser\r
\r
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
STATIC CONST UINT8* SratRALength;\r
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;\r
\r
-/** This function validates the Reserved field in the SRAT table header.\r
+/**\r
+ This function validates the Reserved field in the SRAT table header.\r
\r
@param [in] Ptr Pointer to the start of the field data.\r
@param [in] Context Pointer to context specific information e.g. this\r
could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
IN VOID* Context\r
);\r
\r
-/** This function traces the APIC Proximity Domain field.\r
+/**\r
+ This function traces the APIC Proximity Domain field.\r
\r
@param [in] Format Format string for tracing the data.\r
@param [in] Ptr Pointer to the start of the buffer.\r
-*/\r
+**/\r
STATIC\r
VOID\r
DumpSratApicProximity (\r
IN UINT8* Ptr\r
);\r
\r
-/** An ACPI_PARSER array describing the SRAT Table.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the SRAT Table.\r
+**/\r
STATIC CONST ACPI_PARSER SratParser[] = {\r
PARSE_ACPI_HEADER (&AcpiHdrInfo),\r
{L"Reserved", 4, 36, L"0x%x", NULL, NULL, ValidateSratReserved, NULL},\r
{L"Reserved", 8, 40, L"0x%lx", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the Resource Allocation\r
- structure header.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the Resource Allocation structure header.\r
+**/\r
STATIC CONST ACPI_PARSER SratResourceAllocationParser[] = {\r
{L"Type", 1, 0, NULL, NULL, (VOID**)&SratRAType, NULL, NULL},\r
{L"Length", 1, 1, NULL, NULL, (VOID**)&SratRALength, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the GICC Affinity structure.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the GICC Affinity structure.\r
+**/\r
STATIC CONST ACPI_PARSER SratGicCAffinityParser[] = {\r
{L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},\r
{L"Length", 1, 1, L"0x%x", NULL, NULL, NULL, NULL},\r
{L"Clock Domain", 4, 14, L"0x%x", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the GIC ITS Affinity structure.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the GIC ITS Affinity structure.\r
+**/\r
STATIC CONST ACPI_PARSER SratGicITSAffinityParser[] = {\r
{L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},\r
{L"Length", 1, 1, L"0x%x", NULL, NULL, NULL, NULL},\r
{L"ITS Id", 4, 8, L"0x%x", NULL, NULL, NULL, NULL},\r
};\r
\r
-/** An ACPI_PARSER array describing the Memory Affinity structure.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the Memory Affinity structure.\r
+**/\r
STATIC CONST ACPI_PARSER SratMemAffinityParser[] = {\r
{L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},\r
{L"Length", 1, 1, L"0x%x", NULL, NULL, NULL, NULL},\r
{L"Reserved", 8, 32, L"0x%lx", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the APIC/SAPIC Affinity structure.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the APIC/SAPIC Affinity structure.\r
+**/\r
STATIC CONST ACPI_PARSER SratApciSapicAffinityParser[] = {\r
{L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},\r
{L"Length", 1, 1, L"0x%x", NULL, NULL, NULL, NULL},\r
{L"Clock Domain", 4, 12, L"0x%x", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the Processor Local x2APIC\r
- Affinity structure.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the Processor Local x2APIC Affinity structure.\r
+**/\r
STATIC CONST ACPI_PARSER SratX2ApciAffinityParser[] = {\r
{L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},\r
{L"Length", 1, 1, L"0x%x", NULL, NULL, NULL, NULL},\r
@param [in] Ptr Pointer to the start of the field data.\r
@param [in] Context Pointer to context specific information e.g. this\r
could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
}\r
}\r
\r
-/** This function traces the APIC Proximity Domain field.\r
+/**\r
+ This function traces the APIC Proximity Domain field.\r
\r
@param [in] Format Format string for tracing the data.\r
@param [in] Ptr Pointer to the start of the buffer.\r
-*/\r
+**/\r
STATIC\r
VOID\r
DumpSratApicProximity (\r
Print (Format, ProximityDomain);\r
}\r
\r
-/** This function parses the ACPI SRAT table.\r
+/**\r
+ This function parses the ACPI SRAT table.\r
When trace is enabled this function parses the SRAT table and\r
traces the ACPI table fields.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiSrat (\r
-/**\r
+/** @file\r
SSDT table parser\r
\r
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
#include "AcpiParser.h"\r
#include "AcpiTableParser.h"\r
\r
-/** This function parses the ACPI SSDT table.\r
+/**\r
+ This function parses the ACPI SSDT table.\r
When trace is enabled this function parses the SSDT table and\r
traces the ACPI table fields.\r
For the SSDT table only the ACPI header fields are\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiSsdt (\r
-/**\r
+/** @file\r
XSDT table parser\r
\r
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
PARSE_ACPI_HEADER (&AcpiHdrInfo)\r
};\r
\r
+/**\r
+ Get the ACPI XSDT header info.\r
+**/\r
CONST ACPI_DESCRIPTION_HEADER_INFO* CONST\r
EFIAPI\r
GetAcpiXsdtHeaderInfo (\r
return &AcpiHdrInfo;\r
}\r
\r
-/** This function parses the ACPI XSDT table\r
- and optionally traces the ACPI table fields.\r
+/**\r
+ This function parses the ACPI XSDT table and optionally traces the ACPI table fields.\r
\r
This function also performs validation of the XSDT table.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiXsdt (\r
-/**\r
+/** @file\r
Main file for 'acpiview' Shell command function.\r
\r
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.<BR>\r
{EFI_ACPI_6_2_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE, ParseAcpiXsdt}\r
};\r
\r
-/** This function registers all the available table parsers.\r
+/**\r
+ This function registers all the available table parsers.\r
\r
@retval EFI_SUCCESS The parser is registered.\r
@retval EFI_ALREADY_STARTED The parser for the ACPI Table\r
@retval EFI_INVALID_PARAMETER A parameter is invalid.\r
@retval EFI_OUT_OF_RESOURCES No space to register the\r
parser.\r
-*/\r
+**/\r
EFI_STATUS\r
RegisterAllParsers (\r
)\r
Return the file name of the help text file if not using HII.\r
\r
@return The string pointer to the file name.\r
-*/\r
+**/\r
CONST CHAR16*\r
EFIAPI\r
ShellCommandGetManFileNameAcpiView (\r
@retval EFI_SUCCESS The Shell command handlers were installed\r
successfully.\r
@retval EFI_DEVICE_ERROR Hii package failed to install.\r
-*/\r
+**/\r
EFI_STATUS\r
EFIAPI\r
UefiShellAcpiViewCommandLibConstructor (\r
\r
@param ImageHandle The image handle of the process.\r
@param SystemTable The EFI System Table pointer.\r
-*/\r
+**/\r
EFI_STATUS\r
EFIAPI\r
UefiShellAcpiViewCommandLibDestructor (\r
-/**\r
+/** @file\r
Header file for 'acpiview' Shell command functions.\r
\r
Copyright (c) 2016 - 2017, ARM Limited. All rights reserved.<BR>\r
\r
@param[in] ImageHandle Handle to the Image (NULL if Internal).\r
@param[in] SystemTable Pointer to the System Table (NULL if Internal).\r
-*/\r
+**/\r
SHELL_STATUS\r
EFIAPI\r
ShellCommandRunAcpiView (\r