From nobody Mon Dec 9 16:41:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1528289438057985.3742369341248; Wed, 6 Jun 2018 05:50:38 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id D6994211AEA53; Wed, 6 Jun 2018 05:50:36 -0700 (PDT) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A82772118DC4D for ; Wed, 6 Jun 2018 05:50:35 -0700 (PDT) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jun 2018 05:50:35 -0700 Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by orsmga004.jf.intel.com with ESMTP; 06 Jun 2018 05:50:32 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=dandan.bi@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,483,1520924400"; d="scan'208";a="205791664" From: Dandan Bi To: edk2-devel@lists.01.org Date: Wed, 6 Jun 2018 20:49:51 +0800 Message-Id: <20180606124952.77236-2-dandan.bi@intel.com> X-Mailer: git-send-email 2.14.3.windows.1 In-Reply-To: <20180606124952.77236-1-dandan.bi@intel.com> References: <20180606124952.77236-1-dandan.bi@intel.com> Subject: [edk2] [patch V2 1/2] ShellPkg/UefiShellAcpiViewCommandLib: Fix ECC issues X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexei.Fedorov@arm.com, Jaben Carsey , Ruiyu Ni MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Make the function comments follow EDK2 coding style. Cc: Sami Mujawar Cc: Evan Lloyd Cc: Jaben Carsey Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi --- .../UefiShellAcpiViewCommandLib/AcpiParser.c | 130 ++++++------ .../UefiShellAcpiViewCommandLib/AcpiParser.h | 223 ++++++++++++-----= ---- .../UefiShellAcpiViewCommandLib/AcpiTableParser.c | 27 ++- .../UefiShellAcpiViewCommandLib/AcpiTableParser.h | 39 ++-- .../Library/UefiShellAcpiViewCommandLib/AcpiView.c | 55 +++-- .../Library/UefiShellAcpiViewCommandLib/AcpiView.h | 59 +++--- .../Parsers/Bgrt/BgrtParser.c | 12 +- .../Parsers/Dbg2/Dbg2Parser.c | 29 +-- .../Parsers/Dsdt/DsdtParser.c | 7 +- .../Parsers/Fadt/FadtParser.c | 68 +++++-- .../Parsers/Gtdt/GtdtParser.c | 52 +++-- .../Parsers/Iort/IortParser.c | 133 +++++++----- .../Parsers/Madt/MadtParser.c | 63 +++--- .../Parsers/Mcfg/McfgParser.c | 18 +- .../Parsers/Rsdp/RsdpParser.c | 32 +-- .../Parsers/Slit/SlitParser.c | 17 +- .../Parsers/Spcr/SpcrParser.c | 32 +-- .../Parsers/Srat/SratParser.c | 61 +++--- .../Parsers/Ssdt/SsdtParser.c | 7 +- .../Parsers/Xsdt/XsdtParser.c | 11 +- .../UefiShellAcpiViewCommandLib.c | 13 +- .../UefiShellAcpiViewCommandLib.h | 4 +- 22 files changed, 645 insertions(+), 447 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c b/Sh= ellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c index 318f386fda1..088575d0144 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c @@ -1,6 +1,6 @@ -/** +/** @file ACPI parser =20 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -19,88 +19,95 @@ =20 STATIC UINT32 gIndent; STATIC UINT32 mTableErrorCount; STATIC UINT32 mTableWarningCount; =20 -/** This function resets the ACPI table error counter to Zero. -*/ +/** + This function resets the ACPI table error counter to Zero. +**/ VOID ResetErrorCount ( VOID ) { mTableErrorCount =3D 0; } =20 -/** This function returns the ACPI table error count. +/** + This function returns the ACPI table error count. =20 @retval Returns the count of errors detected in the ACPI tables. -*/ +**/ UINT32 GetErrorCount ( VOID ) { return mTableErrorCount; } =20 -/** This function resets the ACPI table warning counter to Zero. -*/ +/** + This function resets the ACPI table warning counter to Zero. +**/ VOID ResetWarningCount ( VOID ) { mTableWarningCount =3D 0; } =20 -/** This function returns the ACPI table warning count. +/** + This function returns the ACPI table warning count. =20 @retval Returns the count of warning detected in the ACPI tables. -*/ +**/ UINT32 GetWarningCount ( VOID ) { return mTableWarningCount; } =20 -/** This function increments the ACPI table error counter. -*/ +/** + This function increments the ACPI table error counter. +**/ VOID EFIAPI IncrementErrorCount ( VOID ) { mTableErrorCount++; } =20 -/** This function increments the ACPI table warning counter. -*/ +/** + This function increments the ACPI table warning counter. +**/ VOID EFIAPI IncrementWarningCount ( VOID ) { mTableWarningCount++; } =20 -/** This function verifies the ACPI table checksum. +/** + This function verifies the ACPI table checksum. =20 This function verifies the checksum for the ACPI table and optionally prints the status. =20 @param [in] Log If TRUE log the status of the checksum. @param [in] Ptr Pointer to the start of the table buffer. @param [in] Length The length of the buffer. =20 @retval TRUE The checksum is OK. @retval FALSE The checksum failed. -*/ +**/ BOOLEAN EFIAPI VerifyChecksum ( IN BOOLEAN Log, IN UINT8* Ptr, @@ -144,15 +151,16 @@ VerifyChecksum ( } =20 return (Checksum =3D=3D 0); } =20 -/** This function performs a raw data dump of the ACPI table. +/** + This function performs a raw data dump of the ACPI table. =20 @param [in] Ptr Pointer to the start of the table buffer. @param [in] Length The length of the buffer. -*/ +**/ VOID EFIAPI DumpRaw ( IN UINT8* Ptr, IN UINT32 Length @@ -203,64 +211,64 @@ DumpRaw ( // Print ASCII data for the final line. AsciiBuffer[AsciiBufferIndex] =3D '\0'; Print (L" %a", AsciiBuffer); } =20 -/** This function traces 1 byte of data as specified in the - format string. +/** + This function traces 1 byte of data as specified in the format string. =20 @param [in] Format The format string for tracing the data. @param [in] Ptr Pointer to the start of the buffer. -*/ +**/ VOID EFIAPI DumpUint8 ( IN CONST CHAR16* Format, IN UINT8* Ptr ) { Print (Format, *Ptr); } =20 -/** This function traces 2 bytes of data as specified in the - format string. +/** + This function traces 2 bytes of data as specified in the format string. =20 @param [in] Format The format string for tracing the data. @param [in] Ptr Pointer to the start of the buffer. -*/ +**/ VOID EFIAPI DumpUint16 ( IN CONST CHAR16* Format, IN UINT8* Ptr ) { Print (Format, *(UINT16*)Ptr); } =20 -/** This function traces 4 bytes of data as specified in the - format string. +/** + This function traces 4 bytes of data as specified in the format string. =20 @param [in] Format The format string for tracing the data. @param [in] Ptr Pointer to the start of the buffer. -*/ +**/ VOID EFIAPI DumpUint32 ( IN CONST CHAR16* Format, IN UINT8* Ptr ) { Print (Format, *(UINT32*)Ptr); } =20 -/** This function traces 8 bytes of data as specified by the - format string. +/** + This function traces 8 bytes of data as specified by the format string. =20 @param [in] Format The format string for tracing the data. @param [in] Ptr Pointer to the start of the buffer. -*/ +**/ VOID EFIAPI DumpUint64 ( IN CONST CHAR16* Format, IN UINT8* Ptr @@ -274,18 +282,19 @@ DumpUint64 ( Val |=3D *(UINT32*)Ptr; =20 Print (Format, Val); } =20 -/** This function traces 3 characters which can be optionally - formated using the format string if specified. +/** + This function traces 3 characters which can be optionally + formated using the format string if specified. =20 If no format string is specified the Format must be NULL. =20 @param [in] Format Optional format string for tracing the data. @param [in] Ptr Pointer to the start of the buffer. -*/ +**/ VOID EFIAPI Dump3Chars ( IN CONST CHAR16* Format OPTIONAL, IN UINT8* Ptr @@ -297,18 +306,19 @@ Dump3Chars ( Ptr[1], Ptr[2] ); } =20 -/** This function traces 4 characters which can be optionally - formated using the format string if specified. +/** + This function traces 4 characters which can be optionally + formated using the format string if specified. =20 If no format string is specified the Format must be NULL. =20 @param [in] Format Optional format string for tracing the data. @param [in] Ptr Pointer to the start of the buffer. -*/ +**/ VOID EFIAPI Dump4Chars ( IN CONST CHAR16* Format OPTIONAL, IN UINT8* Ptr @@ -321,18 +331,19 @@ Dump4Chars ( Ptr[2], Ptr[3] ); } =20 -/** This function traces 6 characters which can be optionally - formated using the format string if specified. +/** + This function traces 6 characters which can be optionally + formated using the format string if specified. =20 If no format string is specified the Format must be NULL. =20 @param [in] Format Optional format string for tracing the data. @param [in] Ptr Pointer to the start of the buffer. -*/ +**/ VOID EFIAPI Dump6Chars ( IN CONST CHAR16* Format OPTIONAL, IN UINT8* Ptr @@ -347,18 +358,19 @@ Dump6Chars ( Ptr[4], Ptr[5] ); } =20 -/** This function traces 8 characters which can be optionally - formated using the format string if specified. +/** + This function traces 8 characters which can be optionally + formated using the format string if specified. =20 If no format string is specified the Format must be NULL. =20 @param [in] Format Optional format string for tracing the data. @param [in] Ptr Pointer to the start of the buffer. -*/ +**/ VOID EFIAPI Dump8Chars ( IN CONST CHAR16* Format OPTIONAL, IN UINT8* Ptr @@ -375,21 +387,22 @@ Dump8Chars ( Ptr[6], Ptr[7] ); } =20 -/** This function indents and prints the ACPI table Field Name. +/** + This function indents and prints the ACPI table Field Name. =20 @param [in] Indent Number of spaces to add to the global table inde= nt. The global table indent is 0 by default; however this value is updated on entry to the ParseAcpi() by adding the indent value provided to ParseAcpi= () and restored back on exit. Therefore the total indent in the output is dependent on from where this function is called. @param [in] FieldName Pointer to the Field Name. -*/ +**/ VOID EFIAPI PrintFieldName ( IN UINT32 Indent, IN CONST CHAR16* FieldName @@ -402,11 +415,12 @@ PrintFieldName ( (OUTPUT_FIELD_COLUMN_WIDTH - gIndent - Indent), FieldName ); } =20 -/** This function is used to parse an ACPI table buffer. +/** + This function is used to parse an ACPI table buffer. =20 The ACPI table buffer is parsed using the ACPI table parser information specified by a pointer to an array of ACPI_PARSER elements. This parser function iterates through each item on the ACPI_PARSER array and logs the ACPI table fields. @@ -426,11 +440,11 @@ PrintFieldName ( @param [in] Parser Pointer to an array of ACPI_PARSER structure th= at describes the table being parsed. @param [in] ParserItems Number of items in the ACPI_PARSER array. =20 @retval Number of bytes parsed. -*/ +**/ UINT32 EFIAPI ParseAcpi ( IN BOOLEAN Trace, IN UINT32 Indent, @@ -538,28 +552,29 @@ ParseAcpi ( // Decrement the Indent gIndent -=3D Indent; return Offset; } =20 -/** An array describing the ACPI Generic Address Structure. +/** + An array describing the ACPI Generic Address Structure. The GasParser array is used by the ParseAcpi function to parse and/or tr= ace the GAS structure. -*/ +**/ STATIC CONST ACPI_PARSER GasParser[] =3D { {L"Address Space ID", 1, 0, L"0x%x", NULL, NULL, NULL, NULL}, {L"Register Bit Width", 1, 1, L"0x%x", NULL, NULL, NULL, NULL}, {L"Register Bit Offset", 1, 2, L"0x%x", NULL, NULL, NULL, NULL}, {L"Address Size", 1, 3, L"0x%x", NULL, NULL, NULL, NULL}, {L"Address", 8, 4, L"0x%lx", NULL, NULL, NULL, NULL} }; =20 -/** This function indents and traces the GAS structure as described - by the GasParser. +/** + This function indents and traces the GAS structure as described by the G= asParser. =20 @param [in] Ptr Pointer to the start of the buffer. @param [in] Indent Number of spaces to indent the output. -*/ +**/ VOID EFIAPI DumpGasStruct ( IN UINT8* Ptr, IN UINT32 Indent @@ -574,31 +589,33 @@ DumpGasStruct ( GAS_LENGTH, PARSER_PARAMS (GasParser) ); } =20 -/** This function traces the GAS structure as described by the GasParser. +/** + This function traces the GAS structure as described by the GasParser. =20 @param [in] Format Optional format string for tracing the data. @param [in] Ptr Pointer to the start of the buffer. -*/ +**/ VOID EFIAPI DumpGas ( IN CONST CHAR16* Format OPTIONAL, IN UINT8* Ptr ) { DumpGasStruct (Ptr, 2); } =20 -/** This function traces the ACPI header as described by the AcpiHeaderPar= ser. +/** + This function traces the ACPI header as described by the AcpiHeaderParse= r. =20 @param [in] Ptr Pointer to the start of the buffer. =20 @retval Number of bytes parsed. -*/ +**/ UINT32 EFIAPI DumpAcpiHeader ( IN UINT8* Ptr ) @@ -616,22 +633,23 @@ DumpAcpiHeader ( ACPI_DESCRIPTION_HEADER_LENGTH, PARSER_PARAMS (AcpiHeaderParser) ); } =20 -/** This function parses the ACPI header as described by the AcpiHeaderPar= ser. +/** + This function parses the ACPI header as described by the AcpiHeaderParse= r. =20 This function optionally returns the signature, length and revision of t= he ACPI table. =20 @param [in] Ptr Pointer to the start of the buffer. @param [out] Signature Gets location of the ACPI table signature. @param [out] Length Gets location of the length of the ACPI table. @param [out] Revision Gets location of the revision of the ACPI table. =20 @retval Number of bytes parsed. -*/ +**/ UINT32 EFIAPI ParseAcpiHeader ( IN UINT8* Ptr, OUT CONST UINT32** Signature, diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h b/Sh= ellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h index 4dadd4d1042..ecf7dae9038 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h @@ -1,6 +1,6 @@ -/** +/** @file Header file for ACPI parser =20 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -20,207 +20,219 @@ /// However The signature for ACPI tables is 4 bytes. /// To work around this oddity define a signature type /// that allows us to process the log options. #define RSDP_TABLE_INFO SIGNATURE_32('R', 'S', 'D', 'P') =20 -/** This function increments the ACPI table error counter. -*/ +/** + This function increments the ACPI table error counter. +**/ VOID EFIAPI IncrementErrorCount ( VOID ); =20 -/** This function increments the ACPI table warning counter. -*/ +/** + This function increments the ACPI table warning counter. +**/ VOID EFIAPI IncrementWarningCount ( VOID ); =20 -/** This function verifies the ACPI table checksum. +/** + This function verifies the ACPI table checksum. =20 This function verifies the checksum for the ACPI table and optionally prints the status. =20 @param [in] Log If TRUE log the status of the checksum. @param [in] Ptr Pointer to the start of the table buffer. @param [in] Length The length of the buffer. =20 @retval TRUE The checksum is OK. @retval FALSE The checksum failed. -*/ +**/ BOOLEAN EFIAPI VerifyChecksum ( IN BOOLEAN Log, IN UINT8* Ptr, IN UINT32 Length ); =20 -/** This function performs a raw data dump of the ACPI table. +/** + This function performs a raw data dump of the ACPI table. =20 @param [in] Ptr Pointer to the start of the table buffer. @param [in] Length The length of the buffer. -*/ +**/ VOID EFIAPI DumpRaw ( IN UINT8* Ptr, IN UINT32 Length ); =20 -/** This function traces 1 byte of datum as specified in the - format string. +/** + This function traces 1 byte of datum as specified in the format string. =20 @param [in] Format The format string for tracing the data. @param [in] Ptr Pointer to the start of the buffer. -*/ +**/ VOID EFIAPI DumpUint8 ( IN CONST CHAR16* Format, IN UINT8* Ptr ); =20 -/** This function traces 2 bytes of data as specified in the - format string. +/** + This function traces 2 bytes of data as specified in the format string. =20 @param [in] Format The format string for tracing the data. @param [in] Ptr Pointer to the start of the buffer. -*/ +**/ VOID EFIAPI DumpUint16 ( IN CONST CHAR16* Format, IN UINT8* Ptr ); =20 -/** This function traces 4 bytes of data as specified in the - format string. +/** + This function traces 4 bytes of data as specified in the format string. =20 @param [in] Format The format string for tracing the data. @param [in] Ptr Pointer to the start of the buffer. -*/ +**/ VOID EFIAPI DumpUint32 ( IN CONST CHAR16* Format, IN UINT8* Ptr ); =20 -/** This function traces 8 bytes of data as specified by the - format string. +/** + This function traces 8 bytes of data as specified by the format string. =20 @param [in] Format The format string for tracing the data. @param [in] Ptr Pointer to the start of the buffer. -*/ +**/ VOID EFIAPI DumpUint64 ( IN CONST CHAR16* Format, IN UINT8* Ptr ); =20 -/** This function traces 3 characters which can be optionally - formated using the format string if specified. +/** + This function traces 3 characters which can be optionally + formated using the format string if specified. =20 If no format string is specified the Format must be NULL. =20 @param [in] Format Optional format string for tracing the data. @param [in] Ptr Pointer to the start of the buffer. -*/ +**/ VOID EFIAPI Dump3Chars ( IN CONST CHAR16* Format OPTIONAL, IN UINT8* Ptr ); =20 -/** This function traces 4 characters which can be optionally - formated using the format string if specified. +/** + This function traces 4 characters which can be optionally + formated using the format string if specified. =20 If no format string is specified the Format must be NULL. =20 @param [in] Format Optional format string for tracing the data. @param [in] Ptr Pointer to the start of the buffer. -*/ +**/ VOID EFIAPI Dump4Chars ( IN CONST CHAR16* Format OPTIONAL, IN UINT8* Ptr ); =20 -/** This function traces 6 characters which can be optionally - formated using the format string if specified. +/** + This function traces 6 characters which can be optionally + formated using the format string if specified. =20 If no format string is specified the Format must be NULL. =20 @param [in] Format Optional format string for tracing the data. @param [in] Ptr Pointer to the start of the buffer. -*/ +**/ VOID EFIAPI Dump6Chars ( IN CONST CHAR16* Format OPTIONAL, IN UINT8* Ptr ); =20 -/** This function traces 8 characters which can be optionally - formated using the format string if specified. +/** + This function traces 8 characters which can be optionally + formated using the format string if specified. =20 If no format string is specified the Format must be NULL. =20 @param [in] Format Optional format string for tracing the data. @param [in] Ptr Pointer to the start of the buffer. -*/ +**/ VOID EFIAPI Dump8Chars ( IN CONST CHAR16* Format OPTIONAL, IN UINT8* Ptr ); =20 -/** This function indents and prints the ACPI table Field Name. +/** + This function indents and prints the ACPI table Field Name. =20 @param [in] Indent Number of spaces to add to the global table indent. The global table indent is 0 by default; however this value is updated on entry to the ParseAcpi() by adding the indent value provided = to ParseAcpi() and restored back on exit. Therefore the total indent in the output is dependent on f= rom where this function is called. @param [in] FieldName Pointer to the Field Name. -*/ +**/ VOID EFIAPI PrintFieldName ( IN UINT32 Indent, IN CONST CHAR16* FieldName -); + ); =20 -/** This function pointer is the template for customizing the trace output +/** + This function pointer is the template for customizing the trace output =20 @param [in] Format Format string for tracing the data as specified by the 'Format' member of ACPI_PARSER. @param [in] Ptr Pointer to the start of the buffer. -*/ +**/ typedef VOID (EFIAPI *FNPTR_PRINT_FORMATTER)(CONST CHAR16* Format, UINT8* = Ptr); =20 -/** This function pointer is the template for validating an ACPI table fie= ld. +/** + This function pointer is the template for validating an ACPI table field. =20 @param [in] Ptr Pointer to the start of the field data. @param [in] Context Pointer to context specific information as specified= by the 'Context' member of the ACPI_PARSER. e.g. this could be a pointer to the ACPI table heade= r. -*/ +**/ typedef VOID (EFIAPI *FNPTR_FIELD_VALIDATOR)(UINT8* Ptr, VOID* Context); =20 -/** The ACPI_PARSER structure describes the fields of an ACPI table and - provides means for the parser to interpret and trace appropriately. +/** + The ACPI_PARSER structure describes the fields of an ACPI table and + provides means for the parser to interpret and trace appropriately. =20 The first three members are populated based on information present in in the ACPI table specifications. The remaining members describe how the parser should report the field information, validate the field data and/or update an external pointer to the field (ItemPtr). @@ -232,11 +244,11 @@ typedef VOID (EFIAPI *FNPTR_FIELD_VALIDATOR)(UINT8* P= tr, VOID* Context); The PrintFormatter function may choose to use the format string specified by 'Format' or use its own internal format string. =20 The 'Format' and 'PrintFormatter' members allow flexibility for representing the field data. -*/ +**/ typedef struct AcpiParser { =20 /// String describing the ACPI table field /// (Field column from ACPI table spec) CONST CHAR16* NameStr; @@ -276,13 +288,14 @@ typedef struct AcpiParser { /// decisions about the field being validated. /// e.g. this could be a pointer to the ACPI table header VOID* Context; } ACPI_PARSER; =20 -/** A structure used to store the pointers to the members of the - ACPI description header structure that was parsed. -*/ +/** + A structure used to store the pointers to the members of the + ACPI description header structure that was parsed. +**/ typedef struct AcpiDescriptionHeaderInfo { /// ACPI table signature UINT32* Signature; /// Length of the ACPI table UINT32* Length; @@ -300,11 +313,12 @@ typedef struct AcpiDescriptionHeaderInfo { UINT32* CreatorId; /// Creator revision UINT32* CreatorRevision; } ACPI_DESCRIPTION_HEADER_INFO; =20 -/** This function is used to parse an ACPI table buffer. +/** + This function is used to parse an ACPI table buffer. =20 The ACPI table buffer is parsed using the ACPI table parser information specified by a pointer to an array of ACPI_PARSER elements. This parser function iterates through each item on the ACPI_PARSER array and logs the ACPI table fields. @@ -324,34 +338,36 @@ typedef struct AcpiDescriptionHeaderInfo { @param [in] Parser Pointer to an array of ACPI_PARSER structure th= at describes the table being parsed. @param [in] ParserItems Number of items in the ACPI_PARSER array. =20 @retval Number of bytes parsed. -*/ +**/ UINT32 EFIAPI ParseAcpi ( IN BOOLEAN Trace, IN UINT32 Indent, IN CONST CHAR8* AsciiName OPTIONAL, IN UINT8* Ptr, IN UINT32 Length, IN CONST ACPI_PARSER* Parser, IN UINT32 ParserItems -); + ); =20 -/** This is a helper macro to pass parameters to the Parser functions. +/** + This is a helper macro to pass parameters to the Parser functions. =20 @param [in] Parser The name of the ACPI_PARSER array describing the ACPI table fields. -*/ +**/ #define PARSER_PARAMS(Parser) Parser, sizeof (Parser) / sizeof (Parser[0]) =20 -/** This is a helper macro for describing the ACPI header fields. +/** + This is a helper macro for describing the ACPI header fields. =20 @param [out] Info Pointer to retrieve the ACPI table header information. -*/ +**/ #define PARSE_ACPI_HEADER(Info) \ { L"Signature", 4, 0, NULL, Dump4Chars, \ (VOID**)&(Info)->Signature , NULL, NULL }, \ { L"Length", 4, 4, L"%d", NULL, \ (VOID**)&(Info)->Length, NULL, NULL }, \ @@ -368,167 +384,177 @@ ParseAcpi ( { L"Creator ID", 4, 28, NULL, Dump4Chars, \ (VOID**)&(Info)->CreatorId, NULL, NULL }, \ { L"Creator Revision", 4, 32, L"0x%X", NULL, \ (VOID**)&(Info)->CreatorRevision, NULL, NULL } =20 -/** Length of the ACPI GAS structure. +/** + Length of the ACPI GAS structure. =20 NOTE: This might normally be defined as sizeof (EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE). However, we deliberately minimise any reference to the EDK2 ACPI headers in an attempt to provide cross checking. -*/ +**/ #define GAS_LENGTH 12 =20 -/** Length of the ACPI Header structure. +/** + Length of the ACPI Header structure. =20 NOTE: This might normally be defined as sizeof (EFI_ACPI_DESCRIPTION_HEADER). However, we deliberately minimise any reference to the EDK2 ACPI headers in an attempt to provide cross checking. -*/ +**/ #define ACPI_DESCRIPTION_HEADER_LENGTH 36 =20 -/** This function indents and traces the GAS structure as described - by the GasParser. +/** + This function indents and traces the GAS structure as described by the G= asParser. =20 @param [in] Ptr Pointer to the start of the buffer. @param [in] Indent Number of spaces to indent the output. -*/ +**/ VOID EFIAPI DumpGasStruct ( IN UINT8* Ptr, IN UINT32 Indent ); =20 -/** This function traces the GAS structure as described by the GasParser. +/** + This function traces the GAS structure as described by the GasParser. =20 @param [in] Format Optional format string for tracing the data. @param [in] Ptr Pointer to the start of the buffer. -*/ +**/ VOID EFIAPI DumpGas ( IN CONST CHAR16* Format OPTIONAL, IN UINT8* Ptr ); =20 -/** This function traces the ACPI header as described by the AcpiHeaderPar= ser. +/** + This function traces the ACPI header as described by the AcpiHeaderParse= r. =20 @param [in] Ptr Pointer to the start of the buffer. =20 @retval Number of bytes parsed. -*/ +**/ UINT32 EFIAPI DumpAcpiHeader ( IN UINT8* Ptr ); =20 -/** This function parses the ACPI header as described by the AcpiHeaderPar= ser. +/** + This function parses the ACPI header as described by the AcpiHeaderParse= r. =20 This function optionally returns the Signature, Length and revision of t= he ACPI table. =20 @param [in] Ptr Pointer to the start of the buffer. @param [out] Signature Gets location of the ACPI table signature. @param [out] Length Gets location of the length of the ACPI table. @param [out] Revision Gets location of the revision of the ACPI table. =20 @retval Number of bytes parsed. -*/ +**/ UINT32 EFIAPI ParseAcpiHeader ( IN UINT8* Ptr, OUT CONST UINT32** Signature, OUT CONST UINT32** Length, OUT CONST UINT8** Revision ); =20 -/** This function parses the ACPI BGRT table. +/** + This function parses the ACPI BGRT table. When trace is enabled this function parses the BGRT table and traces the ACPI table fields. =20 This function also performs validation of the ACPI table fields. =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiBgrt ( IN BOOLEAN Trace, IN UINT8* Ptr, IN UINT32 AcpiTableLength, IN UINT8 AcpiTableRevision ); =20 -/** This function parses the ACPI DBG2 table. +/** + This function parses the ACPI DBG2 table. When trace is enabled this function parses the DBG2 table and traces the ACPI table fields. =20 This function also performs validation of the ACPI table fields. =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiDbg2 ( IN BOOLEAN Trace, IN UINT8* Ptr, IN UINT32 AcpiTableLength, IN UINT8 AcpiTableRevision ); =20 -/** This function parses the ACPI DSDT table. +/** + This function parses the ACPI DSDT table. When trace is enabled this function parses the DSDT table and traces the ACPI table fields. For the DSDT table only the ACPI header fields are parsed and traced. =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiDsdt ( IN BOOLEAN Trace, IN UINT8* Ptr, IN UINT32 AcpiTableLength, IN UINT8 AcpiTableRevision ); =20 -/** This function parses the ACPI FADT table. +/** + This function parses the ACPI FADT table. This function parses the FADT table and optionally traces the ACPI table fields. =20 This function also performs validation of the ACPI table fields. =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiFadt ( IN BOOLEAN Trace, IN UINT8* Ptr, IN UINT32 AcpiTableLength, IN UINT8 AcpiTableRevision ); =20 -/** This function parses the ACPI GTDT table. +/** + This function parses the ACPI GTDT table. When trace is enabled this function parses the GTDT table and traces the ACPI table fields. =20 This function also parses the following platform timer structures: - GT Block timer @@ -538,21 +564,22 @@ ParseAcpiFadt ( =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiGtdt ( IN BOOLEAN Trace, IN UINT8* Ptr, IN UINT32 AcpiTableLength, IN UINT8 AcpiTableRevision ); =20 -/** This function parses the ACPI IORT table. +/** + This function parses the ACPI IORT table. When trace is enabled this function parses the IORT table and traces the ACPI fields. =20 This function also parses the following nodes: - ITS Group @@ -566,21 +593,22 @@ ParseAcpiGtdt ( =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiIort ( IN BOOLEAN Trace, IN UINT8* Ptr, IN UINT32 AcpiTableLength, IN UINT8 AcpiTableRevision ); =20 -/** This function parses the ACPI MADT table. +/** + This function parses the ACPI MADT table. When trace is enabled this function parses the MADT table and traces the ACPI table fields. =20 This function currently parses the following Interrupt Controller Structures: @@ -594,41 +622,43 @@ ParseAcpiIort ( =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiMadt ( IN BOOLEAN Trace, IN UINT8* Ptr, IN UINT32 AcpiTableLength, IN UINT8 AcpiTableRevision ); =20 -/** This function parses the ACPI MCFG table. +/** + This function parses the ACPI MCFG table. When trace is enabled this function parses the MCFG table and traces the ACPI table fields. =20 This function also performs validation of the ACPI table fields. =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiMcfg ( IN BOOLEAN Trace, IN UINT8* Ptr, IN UINT32 AcpiTableLength, IN UINT8 AcpiTableRevision ); =20 -/** This function parses the ACPI RSDP table. +/** + This function parses the ACPI RSDP table. =20 This function invokes the parser for the XSDT table. * Note - This function does not support parsing of RSDT table. =20 This function also performs a RAW dump of the ACPI table and @@ -636,21 +666,22 @@ ParseAcpiMcfg ( =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiRsdp ( IN BOOLEAN Trace, IN UINT8* Ptr, IN UINT32 AcpiTableLength, IN UINT8 AcpiTableRevision ); =20 -/** This function parses the ACPI SLIT table. +/** + This function parses the ACPI SLIT table. When trace is enabled this function parses the SLIT table and traces the ACPI table fields. =20 This function also validates System Localities for the following: - Diagonal elements have a normalized value of 10 @@ -659,41 +690,43 @@ ParseAcpiRsdp ( =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiSlit ( IN BOOLEAN Trace, IN UINT8* Ptr, IN UINT32 AcpiTableLength, IN UINT8 AcpiTableRevision ); =20 -/** This function parses the ACPI SPCR table. +/** + This function parses the ACPI SPCR table. When trace is enabled this function parses the SPCR table and traces the ACPI table fields. =20 This function also performs validations of the ACPI table fields. =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiSpcr ( IN BOOLEAN Trace, IN UINT8* Ptr, IN UINT32 AcpiTableLength, IN UINT8 AcpiTableRevision ); =20 -/** This function parses the ACPI SRAT table. +/** + This function parses the ACPI SRAT table. When trace is enabled this function parses the SRAT table and traces the ACPI table fields. =20 This function parses the following Resource Allocation Structures: - Processor Local APIC/SAPIC Affinity Structure @@ -705,50 +738,52 @@ ParseAcpiSpcr ( =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiSrat ( IN BOOLEAN Trace, IN UINT8* Ptr, IN UINT32 AcpiTableLength, IN UINT8 AcpiTableRevision ); =20 -/** This function parses the ACPI SSDT table. +/** + This function parses the ACPI SSDT table. When trace is enabled this function parses the SSDT table and traces the ACPI table fields. For the SSDT table only the ACPI header fields are parsed and traced. =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiSsdt ( IN BOOLEAN Trace, IN UINT8* Ptr, IN UINT32 AcpiTableLength, IN UINT8 AcpiTableRevision ); =20 -/** This function parses the ACPI XSDT table +/** + This function parses the ACPI XSDT table and optionally traces the ACPI table fields. =20 This function also performs validation of the XSDT table. =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiXsdt ( IN BOOLEAN Trace, IN UINT8* Ptr, diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c= b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c index 14a8b144114..7b1a02cad3e 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c @@ -1,6 +1,6 @@ -/** +/** @file ACPI table parser =20 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -16,15 +16,17 @@ #include #include "AcpiParser.h" #include "AcpiTableParser.h" #include "AcpiView.h" =20 -/** A list of registered ACPI table parsers. -*/ +/** + A list of registered ACPI table parsers. +**/ STATIC ACPI_TABLE_PARSER mTableParserList[MAX_ACPI_TABLE_PARSERS]; =20 -/** Register the ACPI table Parser +/** + Register the ACPI table Parser =20 This function registers the ACPI table parser. =20 @param [in] Signature The ACPI table signature. @param [in] ParserProc The ACPI table parser. @@ -33,11 +35,11 @@ STATIC ACPI_TABLE_PARSER mTableParserList[MAX_ACPI_TABL= E_PARSERS]; @retval EFI_INVALID_PARAMETER A parameter is invalid. @retval EFI_ALREADY_STARTED The parser for the Table was already registered. @retval EFI_OUT_OF_RESOURCES No space to register the parser. -*/ +**/ EFI_STATUS EFIAPI RegisterParser ( IN UINT32 Signature, IN PARSE_ACPI_TABLE_PROC ParserProc @@ -75,20 +77,21 @@ RegisterParser ( =20 // No free slot found return EFI_OUT_OF_RESOURCES; } =20 -/** Deregister the ACPI table Parser +/** + Deregister the ACPI table Parser =20 This function deregisters the ACPI table parser. =20 @param [in] Signature The ACPI table signature. =20 @retval EFI_SUCCESS The parser was deregistered. @retval EFI_INVALID_PARAMETER A parameter is invalid. @retval EFI_NOT_FOUND A registered parser was not found. -*/ +**/ EFI_STATUS EFIAPI DeregisterParser ( IN UINT32 Signature ) @@ -112,22 +115,23 @@ DeregisterParser ( =20 // No matching registered parser found. return EFI_NOT_FOUND; } =20 -/** Get the ACPI table Parser +/** + Get the ACPI table Parser =20 This function returns the ACPI table parser proc from the list of registered parsers. =20 @param [in] Signature The ACPI table signature. @param [out] ParserProc Pointer to a ACPI table parser proc. =20 @retval EFI_SUCCESS The parser was returned successfully. @retval EFI_INVALID_PARAMETER A parameter is invalid. @retval EFI_NOT_FOUND A registered parser was not found. -*/ +**/ EFI_STATUS EFIAPI GetParser ( IN UINT32 Signature, OUT PARSE_ACPI_TABLE_PROC * ParserProc @@ -151,11 +155,12 @@ GetParser ( =20 // No matching registered parser found. return EFI_NOT_FOUND; } =20 -/** This function processes the ACPI tables. +/** + This function processes the ACPI tables. This function calls ProcessTableReportOptions() to list the ACPI tables, perform binary dump of the tables and determine if the ACPI fields should be traced. =20 This function also invokes the parser for the ACPI tables. @@ -163,11 +168,11 @@ GetParser ( This function also performs a RAW dump of the ACPI table including the unknown/unparsed ACPI tables and validates the checksum. =20 @param [in] Ptr Pointer to the start of the ACPI table data buffer. -*/ +**/ VOID EFIAPI ProcessAcpiTable ( IN UINT8* Ptr ) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.h= b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.h index a69d56da6cf..ca33b935760 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.h +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.h @@ -1,6 +1,6 @@ -/** +/** @file Header file for ACPI table parser =20 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -12,45 +12,49 @@ **/ =20 #ifndef ACPITABLEPARSER_H_ #define ACPITABLEPARSER_H_ =20 -/** The maximum number of ACPI table parsers. +/** + The maximum number of ACPI table parsers. */ #define MAX_ACPI_TABLE_PARSERS 16 =20 /** An invalid/NULL signature value. */ #define ACPI_PARSER_SIGNATURE_NULL 0 =20 -/** A function that parses the ACPI table. +/** + A function that parses the ACPI table. =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ typedef VOID (EFIAPI * PARSE_ACPI_TABLE_PROC) ( IN BOOLEAN Trace, IN UINT8* Ptr, IN UINT32 AcpiTableLength, IN UINT8 AcpiTableRevision ); =20 -/** The ACPI table parser information -*/ +/** + The ACPI table parser information +**/ typedef struct AcpiTableParser { /// ACPI table signature UINT32 Signature; =20 /// The ACPI table parser function. PARSE_ACPI_TABLE_PROC Parser; } ACPI_TABLE_PARSER; =20 -/** Register the ACPI table Parser +/** + Register the ACPI table Parser =20 This function registers the ACPI table parser. =20 @param [in] Signature The ACPI table signature. @param [in] ParserProc The ACPI table parser. @@ -59,35 +63,37 @@ typedef struct AcpiTableParser { @retval EFI_INVALID_PARAMETER A parameter is invalid. @retval EFI_ALREADY_STARTED The parser for the Table was already registered. @retval EFI_OUT_OF_RESOURCES No space to register the parser. -*/ +**/ EFI_STATUS EFIAPI RegisterParser ( IN UINT32 Signature, IN PARSE_ACPI_TABLE_PROC ParserProc -); + ); =20 -/** Deregister the ACPI table Parser +/** + Deregister the ACPI table Parser =20 This function deregisters the ACPI table parser. =20 @param [in] Signature The ACPI table signature. =20 @retval EFI_SUCCESS The parser was deregistered. @retval EFI_INVALID_PARAMETER A parameter is invalid. @retval EFI_NOT_FOUND A registered parser was not found. -*/ +**/ EFI_STATUS EFIAPI DeregisterParser ( IN UINT32 Signature -); + ); =20 -/** This function processes the ACPI tables. +/** + This function processes the ACPI tables. This function calls ProcessTableReportOptions() to list the ACPI tables, perform binary dump of the tables and determine if the ACPI fields should be traced. =20 This function also invokes the parser for the ACPI tables. @@ -95,29 +101,30 @@ DeregisterParser ( This function also performs a RAW dump of the ACPI table including the unknown/unparsed ACPI tables and validates the checksum. =20 @param [in] Ptr Pointer to the start of the ACPI table data buffer. -*/ +**/ VOID EFIAPI ProcessAcpiTable ( IN UINT8* Ptr ); =20 -/** Get the ACPI table Parser +/** + Get the ACPI table Parser =20 This function returns the ACPI table parser proc from the list of registered parsers. =20 @param [in] Signature The ACPI table signature. @param [out] ParserProc Pointer to a ACPI table parser proc. =20 @retval EFI_SUCCESS The parser was returned successfully. @retval EFI_INVALID_PARAMETER A parameter is invalid. @retval EFI_NOT_FOUND A registered parser was not found. -*/ +**/ EFI_STATUS EFIAPI GetParser ( IN UINT32 Signature, OUT PARSE_ACPI_TABLE_PROC * ParserProc diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c b/Shel= lPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c index 3bb142538c0..f5602e94291 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c @@ -1,6 +1,6 @@ -/** +/** @file =20 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License which accompanies this distribution. The full text of the license may b= e found at @@ -33,12 +33,13 @@ STATIC UINT32 mTableCount; STATIC UINT32 mBinTableCount; STATIC BOOLEAN mVerbose; STATIC BOOLEAN mConsistencyCheck; STATIC BOOLEAN mColourHighlighting; =20 -/** An array of acpiview command line parameters. -*/ +/** + An array of acpiview command line parameters. +**/ STATIC CONST SHELL_PARAM_ITEM ParamList[] =3D { {L"/?", TypeFlag}, {L"-c", TypeFlag}, {L"-d", TypeFlag}, {L"-h", TypeValue}, @@ -46,66 +47,74 @@ STATIC CONST SHELL_PARAM_ITEM ParamList[] =3D { {L"-s", TypeValue}, {L"-v", TypeFlag}, {NULL, TypeMax} }; =20 -/** This function returns the colour highlighting status. +/** + This function returns the colour highlighting status. =20 @retval TRUE if colour highlighting is enabled. -*/ +**/ BOOLEAN GetColourHighlighting ( VOID ) { return mColourHighlighting; } =20 -/** This function sets the colour highlighting status. +/** + This function sets the colour highlighting status. =20 -*/ + @param Highlight The Highlight status. + +**/ VOID SetColourHighlighting ( BOOLEAN Highlight ) { mColourHighlighting =3D Highlight; } =20 -/** This function returns the report options. +/** + This function returns the report options. =20 @retval Returns the report option. -*/ +**/ STATIC EREPORT_OPTION GetReportOption ( VOID ) { return mReportType; } =20 -/** This function returns the selected ACPI table. +/** + This function returns the selected ACPI table. =20 @retval Returns signature of the selected ACPI table. -*/ +**/ STATIC UINT32 GetSelectedAcpiTable ( VOID ) { return mSelectedAcpiTable; } =20 -/** This function dumps the ACPI table to a file. +/** + This function dumps the ACPI table to a file. + @param [in] Ptr Pointer to the ACPI table data. @param [in] Length The length of the ACPI table. =20 @retval TRUE Success. @retval FALSE Failure. -*/ +**/ STATIC BOOLEAN DumpAcpiTableToFile ( IN CONST UINT8* Ptr, IN CONST UINTN Length @@ -158,18 +167,19 @@ DumpAcpiTableToFile ( =20 ShellCloseFile (&DumpFileHandle); return (Length =3D=3D TransferBytes); } =20 -/** This function processes the table reporting options for the ACPI table. +/** + This function processes the table reporting options for the ACPI table. =20 @param [in] Signature The ACPI table Signature. @param [in] TablePtr Pointer to the ACPI table data. @param [in] Length The length fo the ACPI table. =20 @retval Returns TRUE if the ACPI table should be traced. -*/ +**/ BOOLEAN ProcessTableReportOptions ( IN CONST UINT32 Signature, IN CONST UINT8* TablePtr, IN CONST UINT32 Length @@ -247,17 +257,18 @@ ProcessTableReportOptions ( } =20 return Log; } =20 -/** This function converts a string to ACPI table signature. +/** + This function converts a string to ACPI table signature. =20 @param [in] Str Pointer to the string to be converted to the ACPI table signature. =20 @retval The ACPI table signature. -*/ +**/ STATIC UINT32 ConvertStrToAcpiSignature ( IN CONST CHAR16* Str ) @@ -275,20 +286,20 @@ ConvertStrToAcpiSignature ( Index++; } return *(UINT32*)Ptr; } =20 -/** This function iterates the configuration table entries in the - system table, retrieves the RSDP pointer and starts parsing - the ACPI tables. +/** + This function iterates the configuration table entries in the + system table, retrieves the RSDP pointer and starts parsing the ACPI tab= les. =20 @param [in] SystemTable Pointer to the EFI system table. =20 @retval Returns EFI_NOT_FOUND if the RSDP pointer is not found. Returns EFI_UNSUPPORTED if the RSDP version is less than 2. Returns EFI_SUCCESS if successful. -*/ +**/ STATIC EFI_STATUS EFIAPI AcpiView ( IN EFI_SYSTEM_TABLE* SystemTable @@ -404,11 +415,11 @@ AcpiView ( /** Function for 'acpiview' command. =20 @param[in] ImageHandle Handle to the Image (NULL if Internal). @param[in] SystemTable Pointer to the System Table (NULL if Internal). -*/ +**/ SHELL_STATUS EFIAPI ShellCommandRunAcpiView ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE* SystemTable diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.h b/Shel= lPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.h index 03561ea8168..b035395a721 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.h +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.h @@ -1,6 +1,6 @@ -/** +/** @file Header file for AcpiView =20 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -12,89 +12,102 @@ **/ =20 #ifndef ACPIVIEW_H_ #define ACPIVIEW_H_ =20 -/** A macro to define the max file name length -*/ +/** + A macro to define the max file name length +**/ #define MAX_FILE_NAME_LEN 128 =20 -/** Offset to the RSDP revision from the start of the RSDP -*/ +/** + Offset to the RSDP revision from the start of the RSDP +**/ #define RSDP_REVISION_OFFSET 15 =20 -/** Offset to the RSDP length from the start of the RSDP -*/ +/** + Offset to the RSDP length from the start of the RSDP +**/ #define RSDP_LENGTH_OFFSET 20 =20 -/** The EREPORT_OPTION enum describes ACPI table Reporting options. -*/ +/** + The EREPORT_OPTION enum describes ACPI table Reporting options. +**/ typedef enum ReportOption { EREPORT_ALL, ///< Report All tables. EREPORT_SELECTED, ///< Report Selected table. EREPORT_TABLE_LIST, ///< Report List of tables. EREPORT_DUMP_BIN_FILE, ///< Dump selected table to a file. EREPORT_MAX } EREPORT_OPTION; =20 -/** This function resets the ACPI table error counter to Zero. -*/ +/** + This function resets the ACPI table error counter to Zero. +**/ VOID ResetErrorCount ( VOID ); =20 -/** This function returns the ACPI table error count. +/** + This function returns the ACPI table error count. =20 @retval Returns the count of errors detected in the ACPI tables. -*/ +**/ UINT32 GetErrorCount ( VOID ); =20 -/** This function resets the ACPI table warning counter to Zero. -*/ +/** + This function resets the ACPI table warning counter to Zero. +**/ VOID ResetWarningCount ( VOID ); =20 -/** This function returns the ACPI table warning count. +/** + This function returns the ACPI table warning count. =20 @retval Returns the count of warning detected in the ACPI tables. -*/ +**/ UINT32 GetWarningCount ( VOID ); =20 -/** This function returns the colour highlighting status. +/** + This function returns the colour highlighting status. =20 @retval TRUE if colour highlighting is enabled. -*/ +**/ BOOLEAN GetColourHighlighting ( VOID ); =20 -/** This function sets the colour highlighting status. +/** + This function sets the colour highlighting status. + + @param Highlight The Highlight status. =20 -*/ +**/ VOID SetColourHighlighting ( BOOLEAN Highlight ); =20 -/** This function processes the table reporting options for the ACPI table. +/** + This function processes the table reporting options for the ACPI table. =20 @param [in] Signature The ACPI table Signature. @param [in] TablePtr Pointer to the ACPI table data. @param [in] Length The length fo the ACPI table. =20 @retval Returns TRUE if the ACPI table should be traced. -*/ +**/ BOOLEAN ProcessTableReportOptions ( IN CONST UINT32 Signature, IN CONST UINT8* TablePtr, IN CONST UINT32 Length diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Bgrt/Bgrt= Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Bgrt/BgrtPa= rser.c index 0b3f9a79012..c7249d7eef6 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Bgrt/BgrtParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Bgrt/BgrtParser.c @@ -1,6 +1,6 @@ -/** +/** @file BGRT table parser =20 Copyright (c) 2017 - 2018, ARM Limited. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -20,33 +20,35 @@ #include "AcpiTableParser.h" =20 // Local variables STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo; =20 -/** An ACPI_PARSER array describing the ACPI BDRT Table. -*/ +/** + An ACPI_PARSER array describing the ACPI BDRT Table. +**/ STATIC CONST ACPI_PARSER BgrtParser[] =3D { PARSE_ACPI_HEADER (&AcpiHdrInfo), {L"Version", 2, 36, L"0x%x", NULL, NULL, NULL, NULL}, {L"Status", 1, 38, L"0x%x", NULL, NULL, NULL, NULL}, {L"Image Type", 1, 39, L"0x%x", NULL, NULL, NULL, NULL}, {L"Image Address", 8, 40, L"0x%lx", NULL, NULL, NULL, NULL}, {L"Image Offset X", 4, 48, L"%d", NULL, NULL, NULL, NULL}, {L"Image Offset Y", 4, 52, L"%d", NULL, NULL, NULL, NULL} }; =20 -/** This function parses the ACPI BGRT table. +/** + This function parses the ACPI BGRT table. When trace is enabled this function parses the BGRT table and traces the ACPI table fields. =20 This function also performs validation of the ACPI table fields. =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiBgrt ( IN BOOLEAN Trace, IN UINT8* Ptr, diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2= Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Pa= rser.c index f70a1328cc9..7f66bce074e 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parser.c @@ -1,6 +1,6 @@ -/** +/** @file DBG2 table parser =20 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -30,30 +30,32 @@ STATIC CONST UINT16* OEMDataLength; STATIC CONST UINT16* OEMDataOffset; STATIC CONST UINT16* BaseAddrRegOffset; STATIC CONST UINT16* AddrSizeOffset; STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo; =20 -/** This function Validates the NameSpace string length. +/** + This function Validates the NameSpace string length. =20 @param [in] Ptr Pointer to the start of the buffer. @param [in] Context Pointer to context specific information e.g. this could be a pointer to the ACPI table header. -*/ +**/ STATIC VOID EFIAPI ValidateNameSpaceStrLen ( IN UINT8* Ptr, IN VOID* Context ); =20 -/** This function parses the debug device information structure. +/** + This function parses the debug device information structure. =20 @param [in] Ptr Pointer to the start of the buffer. @param [out] Length Pointer in which the length of the debug device information is returned. -*/ +**/ STATIC VOID EFIAPI DumpDbgDeviceInfo ( IN UINT8* Ptr, @@ -93,16 +95,17 @@ STATIC CONST ACPI_PARSER DbgDevInfoParser[] =3D { (VOID**)&BaseAddrRegOffset, NULL, NULL}, {L"Address Size Offset", 2, 20, L"0x%x", NULL, (VOID**)&AddrSizeOffset, NULL, NULL} }; =20 -/** This function validates the NameSpace string length. +/** + This function validates the NameSpace string length. =20 @param [in] Ptr Pointer to the start of the buffer. @param [in] Context Pointer to context specific information e.g. this could be a pointer to the ACPI table header. -*/ +**/ STATIC VOID EFIAPI ValidateNameSpaceStrLen ( IN UINT8* Ptr, @@ -118,16 +121,17 @@ ValidateNameSpaceStrLen ( NameSpaceStrLen ); } } =20 -/** This function parses the debug device information structure. +/** + This function parses the debug device information structure. =20 @param [in] Ptr Pointer to the start of the buffer. - @param [out] Ptr Pointer in which the length of the debug + @param [out] Length Pointer in which the length of the debug device information is returned. -*/ +**/ STATIC VOID EFIAPI DumpDbgDeviceInfo ( IN UINT8* Ptr, @@ -191,21 +195,22 @@ DumpDbgDeviceInfo ( } =20 *Length =3D *DbgDevInfoLen; } =20 -/** This function parses the ACPI DBG2 table. +/** + This function parses the ACPI DBG2 table. When trace is enabled this function parses the DBG2 table and traces the ACPI table fields. =20 This function also performs validation of the ACPI table fields. =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiDbg2 ( IN BOOLEAN Trace, IN UINT8* Ptr, diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dsdt/Dsdt= Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dsdt/DsdtPa= rser.c index ef459a12099..f1935f714c8 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dsdt/DsdtParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dsdt/DsdtParser.c @@ -1,6 +1,6 @@ -/** +/** @file DSDT table parser =20 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -17,21 +17,22 @@ #include #include #include "AcpiParser.h" #include "AcpiTableParser.h" =20 -/** This function parses the ACPI DSDT table. +/** + This function parses the ACPI DSDT table. When trace is enabled this function parses the DSDT table and traces the ACPI table fields. For the DSDT table only the ACPI header fields are parsed and traced. =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiDsdt ( IN BOOLEAN Trace, IN UINT8* Ptr, diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Fadt/Fadt= Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Fadt/FadtPa= rser.c index fdccb2ac3bd..cca25fcce90 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Fadt/FadtParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Fadt/FadtParser.c @@ -1,6 +1,6 @@ -/** +/** @file FADT table parser =20 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -23,47 +23,72 @@ STATIC CONST UINT32* DsdtAddress; STATIC CONST UINT64* X_DsdtAddress; STATIC CONST UINT8* FadtMinorRevision; STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo; =20 -/** A macro defining the Hardware reduced ACPI flag -*/ +/** + A macro defining the Hardware reduced ACPI flag +**/ #define HW_REDUCED_ACPI BIT20 =20 -// Forward declarations +/** + Get the ACPI XSDT header info. +**/ CONST ACPI_DESCRIPTION_HEADER_INFO* CONST EFIAPI GetAcpiXsdtHeaderInfo ( VOID -); + ); =20 +/** + This function validates the Firmware Control Field. + + @param [in] Ptr Pointer to the start of the field data. + @param [in] Context Pointer to context specific information e.g. this + could be a pointer to the ACPI table header. +**/ STATIC VOID EFIAPI ValidateFirmwareCtrl ( IN UINT8* Ptr, IN VOID* Context -); + ); + +/** + This function validates the X_Firmware Control Field. =20 + @param [in] Ptr Pointer to the start of the field data. + @param [in] Context Pointer to context specific information e.g. this + could be a pointer to the ACPI table header. +**/ STATIC VOID EFIAPI ValidateXFirmwareCtrl ( IN UINT8* Ptr, IN VOID* Context -); + ); =20 +/** + This function validates the flags. + + @param [in] Ptr Pointer to the start of the field data. + @param [in] Context Pointer to context specific information e.g. this + could be a pointer to the ACPI table header. +**/ STATIC VOID EFIAPI ValidateFlags ( IN UINT8* Ptr, IN VOID* Context -); + ); =20 -/** An ACPI_PARSER array describing the ACPI FADT Table. -*/ +/** + An ACPI_PARSER array describing the ACPI FADT Table. +**/ STATIC CONST ACPI_PARSER FadtParser[] =3D { PARSE_ACPI_HEADER (&AcpiHdrInfo), {L"FIRMWARE_CTRL", 4, 36, L"0x%x", NULL, NULL, ValidateFirmwareCtrl, NUL= L}, {L"DSDT", 4, 40, L"0x%x", NULL, (VOID**)&DsdtAddress, NULL, NULL}, {L"Reserved", 1, 44, L"%x", NULL, NULL, NULL, NULL}, @@ -121,16 +146,17 @@ STATIC CONST ACPI_PARSER FadtParser[] =3D { {L"SLEEP_CONTROL_REG", 12, 244, NULL, DumpGas, NULL, NULL, NULL}, {L"SLEEP_STATUS_REG", 12, 256, NULL, DumpGas, NULL, NULL, NULL}, {L"Hypervisor VendorIdentity", 8, 268, L"%lx", NULL, NULL, NULL, NULL} }; =20 -/** This function validates the Firmware Control Field. +/** + This function validates the Firmware Control Field. =20 @param [in] Ptr Pointer to the start of the field data. @param [in] Context Pointer to context specific information e.g. this could be a pointer to the ACPI table header. -*/ +**/ STATIC VOID EFIAPI ValidateFirmwareCtrl ( IN UINT8* Ptr, @@ -145,16 +171,17 @@ ValidateFirmwareCtrl ( ); } #endif } =20 -/** This function validates the X_Firmware Control Field. +/** + This function validates the X_Firmware Control Field. =20 @param [in] Ptr Pointer to the start of the field data. @param [in] Context Pointer to context specific information e.g. this could be a pointer to the ACPI table header. -*/ +**/ STATIC VOID EFIAPI ValidateXFirmwareCtrl ( IN UINT8* Ptr, @@ -169,16 +196,17 @@ ValidateXFirmwareCtrl ( ); } #endif } =20 -/** This function validates the flags. +/** + This function validates the flags. =20 @param [in] Ptr Pointer to the start of the field data. @param [in] Context Pointer to context specific information e.g. this could be a pointer to the ACPI table header. -*/ +**/ STATIC VOID EFIAPI ValidateFlags ( IN UINT8* Ptr, @@ -193,21 +221,21 @@ ValidateFlags ( ); } #endif } =20 -/** This function parses the ACPI FADT table. - This function parses the FADT table and optionally traces the ACPI - table fields. +/** + This function parses the ACPI FADT table. + This function parses the FADT table and optionally traces the ACPI table= fields. =20 This function also performs validation of the ACPI table fields. =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiFadt ( IN BOOLEAN Trace, IN UINT8* Ptr, diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/Gtdt= Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtPa= rser.c index ce96604ee6f..30cf3e14f7e 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParser.c @@ -1,6 +1,6 @@ -/** +/** @file GTDT table parser =20 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -27,26 +27,28 @@ STATIC CONST UINT16* PlatformTimerLength; STATIC CONST UINT32* GtBlockTimerCount; STATIC CONST UINT32* GtBlockTimerOffset; STATIC CONST UINT16* GtBlockLength; STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo; =20 -/** This function validates the GT Block timer count. +/** + This function validates the GT Block timer count. =20 @param [in] Ptr Pointer to the start of the field data. @param [in] Context Pointer to context specific information e.g. this could be a pointer to the ACPI table header. -*/ +**/ STATIC VOID EFIAPI ValidateGtBlockTimerCount ( IN UINT8* Ptr, IN VOID* Context ); =20 -/** An ACPI_PARSER array describing the ACPI GTDT Table. -*/ +/** + An ACPI_PARSER array describing the ACPI GTDT Table. +**/ STATIC CONST ACPI_PARSER GtdtParser[] =3D { PARSE_ACPI_HEADER (&AcpiHdrInfo), {L"CntControlBase Physical Address", 8, 36, L"0x%lx", NULL, NULL, NULL, NULL}, {L"Reserved", 4, 44, L"0x%x", NULL, NULL, NULL, NULL}, @@ -67,20 +69,22 @@ STATIC CONST ACPI_PARSER GtdtParser[] =3D { (VOID**)&GtdtPlatformTimerCount, NULL, NULL}, {L"Platform Timer Offset", 4, 92, L"0x%x", NULL, (VOID**)&GtdtPlatformTimerOffset, NULL, NULL} }; =20 -/** An ACPI_PARSER array describing the Platform timer header. -*/ +/** + An ACPI_PARSER array describing the Platform timer header. +**/ STATIC CONST ACPI_PARSER GtPlatformTimerHeaderParser[] =3D { {L"Type", 1, 0, NULL, NULL, (VOID**)&PlatformTimerType, NULL, NULL}, {L"Length", 2, 1, NULL, NULL, (VOID**)&PlatformTimerLength, NULL, NULL}, {L"Reserved", 1, 3, NULL, NULL, NULL, NULL, NULL} }; =20 -/** An ACPI_PARSER array describing the Platform GT Block. -*/ +/** + An ACPI_PARSER array describing the Platform GT Block. +**/ STATIC CONST ACPI_PARSER GtBlockParser[] =3D { {L"Type", 1, 0, L"%d", NULL, NULL, NULL, NULL}, {L"Length", 2, 1, L"%d", NULL, (VOID**)&GtBlockLength, NULL, NULL}, {L"Reserved", 1, 3, L"%x", NULL, NULL, NULL, NULL}, {L"Physical address (CntCtlBase)", 8, 4, L"0x%lx", NULL, NULL, NULL, NUL= L}, @@ -88,12 +92,13 @@ STATIC CONST ACPI_PARSER GtBlockParser[] =3D { ValidateGtBlockTimerCount, NULL}, {L"Timer Offset", 4, 16, L"%d", NULL, (VOID**)&GtBlockTimerOffset, NULL, NULL} }; =20 -/** An ACPI_PARSER array describing the GT Block timer. -*/ +/** + An ACPI_PARSER array describing the GT Block timer. +**/ STATIC CONST ACPI_PARSER GtBlockTimerParser[] =3D { {L"Frame Number", 1, 0, L"%d", NULL, NULL, NULL, NULL}, {L"Reserved", 3, 1, L"%x %x %x", Dump3Chars, NULL, NULL, NULL}, {L"Physical address (CntBaseX)", 8, 4, L"0x%lx", NULL, NULL, NULL, NULL}, {L"Physical address (CntEL0BaseX)", 8, 12, L"0x%lx", NULL, NULL, NULL, @@ -103,28 +108,30 @@ STATIC CONST ACPI_PARSER GtBlockTimerParser[] =3D { {L"Virtual Timer GSIV", 4, 28, L"0x%x", NULL, NULL, NULL, NULL}, {L"Virtual Timer Flags", 4, 32, L"0x%x", NULL, NULL, NULL, NULL}, {L"Common Flags", 4, 36, L"0x%x", NULL, NULL, NULL, NULL} }; =20 -/** An ACPI_PARSER array describing the Platform Watchdog. -*/ +/** + An ACPI_PARSER array describing the Platform Watchdog. +**/ STATIC CONST ACPI_PARSER SBSAGenericWatchdogParser[] =3D { {L"Type", 1, 0, L"%d", NULL, NULL, NULL, NULL}, {L"Length", 2, 1, L"%d", NULL, NULL, NULL, NULL}, {L"Reserved", 1, 3, L"%x", NULL, NULL, NULL, NULL}, {L"RefreshFrame Physical address", 8, 4, L"0x%lx", NULL, NULL, NULL, NUL= L}, {L"ControlFrame Physical address", 8, 12, L"0x%lx", NULL, NULL, NULL, NU= LL}, {L"Watchdog Timer GSIV", 4, 20, L"0x%x", NULL, NULL, NULL, NULL}, {L"Watchdog Timer Flags", 4, 24, L"0x%x", NULL, NULL, NULL, NULL} }; =20 -/** This function validates the GT Block timer count. +/** + This function validates the GT Block timer count. =20 @param [in] Ptr Pointer to the start of the field data. @param [in] Context Pointer to context specific information e.g. this could be a pointer to the ACPI table header. -*/ +**/ STATIC VOID EFIAPI ValidateGtBlockTimerCount ( IN UINT8* Ptr, @@ -139,15 +146,16 @@ ValidateGtBlockTimerCount ( BlockTimerCount ); } } =20 -/** This function parses the Platform GT Block. +/** + This function parses the Platform GT Block. =20 @param [in] Ptr Pointer to the start of the GT Block data. @param [in] Length Length of the GT Block structure. -*/ +**/ STATIC VOID DumpGTBlock ( IN UINT8* Ptr, IN UINT16 Length @@ -194,15 +202,16 @@ DumpGTBlock ( ); } } } =20 -/** This function parses the Platform Watchdog timer. +/** + This function parses the Platform Watchdog timer. =20 @param [in] Ptr Pointer to the start of the watchdog timer data. @param [in] Length Length of the watchdog timer structure. -*/ +**/ STATIC VOID DumpWatchdogTimer ( IN UINT8* Ptr, IN UINT16 Length @@ -216,11 +225,12 @@ DumpWatchdogTimer ( Length, PARSER_PARAMS (SBSAGenericWatchdogParser) ); } =20 -/** This function parses the ACPI GTDT table. +/** + This function parses the ACPI GTDT table. When trace is enabled this function parses the GTDT table and traces the ACPI table fields. =20 This function also parses the following platform timer structures: - GT Block timer @@ -230,11 +240,11 @@ DumpWatchdogTimer ( =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiGtdt ( IN BOOLEAN Trace, IN UINT8* Ptr, diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/Iort= Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortPa= rser.c index 503a745718d..704dfc407cc 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c @@ -1,6 +1,6 @@ -/** +/** @file IORT table parser =20 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -21,12 +21,13 @@ #include "AcpiTableParser.h" =20 // Local variables STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo; =20 -/** The EIORT_NODE enum describes the IORT Node types. -*/ +/** + The EIORT_NODE enum describes the IORT Node types. +**/ typedef enum IortNode { EIORT_NODE_ITS_GROUP, ///< ITS Group node EIORT_NODE_NAMED_COMPONENT, ///< Named Component node EIORT_NODE_ROOT_COMPLEX, ///< Root Complex node EIORT_NODE_SMMUV1_V2, ///< SMMU v1/v2 node @@ -49,46 +50,48 @@ STATIC CONST UINT32* InterruptContextOffset; STATIC CONST UINT32* PmuInterruptCount; STATIC CONST UINT32* PmuInterruptOffset; =20 STATIC CONST UINT32* ItsCount; =20 -/** This function validates the ID Mapping array count for the ITS node. +/** + This function validates the ID Mapping array count for the ITS node. =20 @param [in] Ptr Pointer to the start of the field data. @param [in] Context Pointer to context specific information e.g. this could be a pointer to the ACPI table header. -*/ +**/ STATIC VOID EFIAPI ValidateItsIdMappingCount ( IN UINT8* Ptr, IN VOID* Context ); =20 -/** This function validates the ID Mapping array offset for the ITS node. +/** + This function validates the ID Mapping array offset for the ITS node. =20 @param [in] Ptr Pointer to the start of the field data. @param [in] Context Pointer to context specific information e.g. this could be a pointer to the ACPI table header. -*/ +**/ STATIC VOID EFIAPI ValidateItsIdArrayReference ( IN UINT8* Ptr, IN VOID* Context ); =20 -/** Helper Macro for populating the IORT Node header in the ACPI_PARSER - array. +/** + Helper Macro for populating the IORT Node header in the ACPI_PARSER arra= y. =20 @param [out] ValidateIdMappingCount Optional pointer to a function for validating the ID Mapping count. @param [out] ValidateIdArrayReference Optional pointer to a function for validating the ID Array reference. -*/ +**/ #define PARSE_IORT_NODE_HEADER(ValidateIdMappingCount, \ ValidateIdArrayReference) \ { L"Type", 1, 0, L"%d", NULL, (VOID**)&IortNodeType, NULL, NULL }, \ { L"Length", 2, 1, L"%d", NULL, (VOID**)&IortNodeLength, NULL, NULL }, \ { L"Revision", 1, 3, L"%d", NULL, NULL, NULL, NULL }, \ @@ -96,29 +99,32 @@ ValidateItsIdArrayReference ( { L"Number of ID mappings", 4, 8, L"%d", NULL, \ (VOID**)&IortIdMappingCount, ValidateIdMappingCount, NULL }, \ { L"Reference to ID Array", 4, 12, L"0x%x", NULL, \ (VOID**)&IortIdMappingOffset, ValidateIdArrayReference, NULL } =20 -/** An ACPI_PARSER array describing the ACPI IORT Table -*/ +/** + An ACPI_PARSER array describing the ACPI IORT Table +**/ STATIC CONST ACPI_PARSER IortParser[] =3D { PARSE_ACPI_HEADER (&AcpiHdrInfo), {L"Number of IORT Nodes", 4, 36, L"%d", NULL, (VOID**)&IortNodeCount, NULL, NULL}, {L"Offset to Array of IORT Nodes", 4, 40, L"0x%x", NULL, (VOID**)&IortNodeOffset, NULL, NULL}, {L"Reserved", 4, 44, L"0x%x", NULL, NULL, NULL, NULL} }; =20 -/** An ACPI_PARSER array describing the IORT node header structure. -*/ +/** + An ACPI_PARSER array describing the IORT node header structure. +**/ STATIC CONST ACPI_PARSER IortNodeHeaderParser[] =3D { PARSE_IORT_NODE_HEADER (NULL, NULL) }; =20 -/** An ACPI_PARSER array describing the IORT SMMUv1/2 node. -*/ +/** + An ACPI_PARSER array describing the IORT SMMUv1/2 node. +**/ STATIC CONST ACPI_PARSER IortNodeSmmuV1V2Parser[] =3D { PARSE_IORT_NODE_HEADER (NULL, NULL), {L"Base Address", 8, 16, L"0x%lx", NULL, NULL, NULL, NULL}, {L"Span", 8, 24, L"0x%lx", NULL, NULL, NULL, NULL}, {L"Model", 4, 32, L"%d", NULL, NULL, NULL, NULL}, @@ -139,29 +145,32 @@ STATIC CONST ACPI_PARSER IortNodeSmmuV1V2Parser[] =3D= { {L"SMMU_NSgIrpt interrupt flags", 4, 64, L"0x%x", NULL, NULL, NULL, NULL= }, {L"SMMU_NSgCfgIrpt", 4, 68, L"0x%x", NULL, NULL, NULL, NULL}, {L"SMMU_NSgCfgIrpt interrupt flags", 4, 72, L"0x%x", NULL, NULL, NULL, N= ULL} }; =20 -/** An ACPI_PARSER array describing the SMMUv1/2 Node Interrupt Array. -*/ +/** + An ACPI_PARSER array describing the SMMUv1/2 Node Interrupt Array. +**/ STATIC CONST ACPI_PARSER InterruptArrayParser[] =3D { {L" Interrupt GSIV", 4, 0, L"0x%x", NULL, NULL, NULL, NULL}, {L" Flags", 4, 4, L"0x%x", NULL, NULL, NULL, NULL} }; =20 -/** An ACPI_PARSER array describing the IORT ID Mapping. -*/ +/** + An ACPI_PARSER array describing the IORT ID Mapping. +**/ STATIC CONST ACPI_PARSER IortNodeIdMappingParser[] =3D { {L" Input base", 4, 0, L"0x%x", NULL, NULL, NULL, NULL}, {L" Number of IDs", 4, 4, L"0x%x", NULL, NULL, NULL, NULL}, {L" Output base", 4, 8, L"0x%x", NULL, NULL, NULL, NULL}, {L" Output reference", 4, 12, L"0x%x", NULL, NULL, NULL, NULL}, {L" Flags", 4, 16, L"0x%x", NULL, NULL, NULL, NULL} }; =20 -/** An ACPI_PARSER array describing the IORT SMMUv3 node. -*/ +/** + An ACPI_PARSER array describing the IORT SMMUv3 node. +**/ STATIC CONST ACPI_PARSER IortNodeSmmuV3Parser[] =3D { PARSE_IORT_NODE_HEADER (NULL, NULL), {L"Base Address", 8, 16, L"0x%lx", NULL, NULL, NULL, NULL}, {L"Flags", 4, 24, L"0x%x", NULL, NULL, NULL, NULL}, {L"Reserved", 4, 28, L"0x%x", NULL, NULL, NULL, NULL}, @@ -171,79 +180,86 @@ STATIC CONST ACPI_PARSER IortNodeSmmuV3Parser[] =3D { {L"PRI", 4, 48, L"0x%x", NULL, NULL, NULL, NULL}, {L"GERR", 4, 52, L"0x%x", NULL, NULL, NULL, NULL}, {L"Sync", 4, 56, L"0x%x", NULL, NULL, NULL, NULL} }; =20 -/** An ACPI_PARSER array describing the IORT ITS node. -*/ +/** + An ACPI_PARSER array describing the IORT ITS node. +**/ STATIC CONST ACPI_PARSER IortNodeItsParser[] =3D { PARSE_IORT_NODE_HEADER ( ValidateItsIdMappingCount, ValidateItsIdArrayReference ), {L" Number of ITSs", 4, 16, L"%d", NULL, (VOID**)&ItsCount, NULL} }; =20 -/** An ACPI_PARSER array describing the ITS ID. -*/ +/** + An ACPI_PARSER array describing the ITS ID. +**/ STATIC CONST ACPI_PARSER ItsIdParser[] =3D { { L" GIC ITS Identifier", 4, 0, L"%d", NULL, NULL, NULL } }; =20 -/** An ACPI_PARSER array describing the IORT Names Component node. -*/ +/** + An ACPI_PARSER array describing the IORT Names Component node. +**/ STATIC CONST ACPI_PARSER IortNodeNamedComponentParser[] =3D { PARSE_IORT_NODE_HEADER (NULL, NULL), {L"Node Flags", 4, 16, L"%d", NULL, NULL, NULL, NULL}, {L"Memory access properties", 8, 20, L"0x%lx", NULL, NULL, NULL, NULL}, {L"Device memory address size limit", 1, 28, L"%d", NULL, NULL, NULL, NU= LL} }; =20 -/** An ACPI_PARSER array describing the IORT Root Complex node. -*/ +/** + An ACPI_PARSER array describing the IORT Root Complex node. +**/ STATIC CONST ACPI_PARSER IortNodeRootComplexParser[] =3D { PARSE_IORT_NODE_HEADER (NULL, NULL), {L"Memory access properties", 8, 16, L"0x%lx", NULL, NULL, NULL, NULL}, {L"ATS Attribute", 4, 24, L"0x%x", NULL, NULL, NULL, NULL}, {L"PCI Segment number", 4, 28, L"0x%x", NULL, NULL, NULL, NULL} }; =20 -/** An ACPI_PARSER array describing the IORT PMCG node. -*/ +/** + An ACPI_PARSER array describing the IORT PMCG node. +**/ STATIC CONST ACPI_PARSER IortNodePmcgParser[] =3D { PARSE_IORT_NODE_HEADER (NULL, NULL), {L"Base Address", 8, 16, L"0x%lx", NULL, NULL, NULL, NULL}, {L"Overflow interrupt GSIV", 4, 24, L"0x%x", NULL, NULL, NULL, NULL}, {L"Node reference", 4, 28, L"0x%x", NULL, NULL, NULL, NULL}, }; =20 -/** This function validates the ID Mapping array count for the ITS node. +/** + This function validates the ID Mapping array count for the ITS node. =20 @param [in] Ptr Pointer to the start of the field data. @param [in] Context Pointer to context specific information e.g. this could be a pointer to the ACPI table header. -*/ +**/ STATIC VOID EFIAPI ValidateItsIdMappingCount ( IN UINT8* Ptr, - VOID* Context + IN VOID* Context ) { if (*(UINT32*)Ptr !=3D 0) { IncrementErrorCount (); Print (L"\nERROR: IORT ID Mapping count must be zero."); } } =20 -/** This function validates the ID Mapping array offset for the ITS node. +/** + This function validates the ID Mapping array offset for the ITS node. =20 @param [in] Ptr Pointer to the start of the field data. @param [in] Context Pointer to context specific information e.g. this could be a pointer to the ACPI table header. -*/ +**/ STATIC VOID EFIAPI ValidateItsIdArrayReference ( IN UINT8* Ptr, @@ -254,17 +270,18 @@ ValidateItsIdArrayReference ( IncrementErrorCount (); Print (L"\nERROR: IORT ID Mapping offset must be zero."); } } =20 -/** This function parses the IORT Node Id Mapping array. +/** + This function parses the IORT Node Id Mapping array. =20 @param [in] Ptr Pointer to the start of the IORT Table. @param [in] MappingCount The ID Mapping count. @param [in] MappingOffset The offset of the ID Mapping array from the start of the IORT table. -*/ +**/ STATIC VOID DumpIortNodeIdMappings ( IN UINT8* Ptr, IN UINT32 MappingCount, @@ -296,18 +313,19 @@ DumpIortNodeIdMappings ( IdMappingPtr +=3D Offset; Index++; } } =20 -/** This function parses the IORT SMMUv1/2 node. +/** + This function parses the IORT SMMUv1/2 node. =20 @param [in] Ptr Pointer to the start of the buffer. @param [in] Length Length of the buffer. @param [in] MappingCount The ID Mapping count. @param [in] MappingOffset The offset of the ID Mapping array from the start of the IORT table. -*/ +**/ STATIC VOID DumpIortNodeSmmuV1V2 ( IN UINT8* Ptr, IN UINT16 Length, @@ -375,18 +393,19 @@ DumpIortNodeSmmuV1V2 ( if (*IortIdMappingCount !=3D 0) { DumpIortNodeIdMappings (Ptr, MappingCount, MappingOffset); } } =20 -/** This function parses the IORT SMMUv3 node. +/** + This function parses the IORT SMMUv3 node. =20 @param [in] Ptr Pointer to the start of the buffer. @param [in] Length Length of the buffer. @param [in] MappingCount The ID Mapping count. @param [in] MappingOffset The offset of the ID Mapping array from the start of the IORT table. -*/ +**/ STATIC VOID DumpIortNodeSmmuV3 ( IN UINT8* Ptr, IN UINT16 Length, @@ -406,15 +425,16 @@ DumpIortNodeSmmuV3 ( if (*IortIdMappingCount !=3D 0) { DumpIortNodeIdMappings (Ptr, MappingCount, MappingOffset); } } =20 -/** This function parses the IORT ITS node. +/** + This function parses the IORT ITS node. =20 @param [in] Ptr Pointer to the start of the buffer. @param [in] Length Length of the buffer. -*/ +**/ STATIC VOID DumpIortNodeIts ( IN UINT8* Ptr, IN UINT16 Length @@ -456,18 +476,19 @@ DumpIortNodeIts ( } =20 // Note: ITS does not have the ID Mappings Array } =20 -/** This function parses the IORT Named Component node. +/** + This function parses the IORT Named Component node. =20 @param [in] Ptr Pointer to the start of the buffer. @param [in] Length Length of the buffer. @param [in] MappingCount The ID Mapping count. @param [in] MappingOffset The offset of the ID Mapping array from the start of the IORT table. -*/ +**/ STATIC VOID DumpIortNodeNamedComponent ( IN UINT8* Ptr, IN UINT16 Length, @@ -502,18 +523,19 @@ DumpIortNodeNamedComponent ( if (*IortIdMappingCount !=3D 0) { DumpIortNodeIdMappings (Ptr, MappingCount, MappingOffset); } } =20 -/** This function parses the IORT Root Complex node. +/** + This function parses the IORT Root Complex node. =20 @param [in] Ptr Pointer to the start of the buffer. @param [in] Length Length of the buffer. @param [in] MappingCount The ID Mapping count. @param [in] MappingOffset The offset of the ID Mapping array from the start of the IORT table. -*/ +**/ STATIC VOID DumpIortNodeRootComplex ( IN UINT8* Ptr, IN UINT16 Length, @@ -533,18 +555,19 @@ DumpIortNodeRootComplex ( if (*IortIdMappingCount !=3D 0) { DumpIortNodeIdMappings (Ptr, MappingCount, MappingOffset); } } =20 -/** This function parses the IORT PMCG node. +/** + This function parses the IORT PMCG node. =20 @param [in] Ptr Pointer to the start of the buffer. @param [in] Length Length of the buffer. @param [in] MappingCount The ID Mapping count. @param [in] MappingOffset The offset of the ID Mapping array from the start of the IORT table. -*/ +**/ STATIC VOID DumpIortNodePmcg ( IN UINT8* Ptr, IN UINT16 Length, @@ -572,13 +595,13 @@ DumpIortNodePmcg ( *IortIdMappingCount ); } } =20 -/** This function parses the ACPI IORT table. - When trace is enabled this function parses the IORT table and - traces the ACPI fields. +/** + This function parses the ACPI IORT table. + When trace is enabled this function parses the IORT table and traces the= ACPI fields. =20 This function also parses the following nodes: - ITS Group - Named Component - Root Complex @@ -590,11 +613,11 @@ DumpIortNodePmcg ( =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiIort ( IN BOOLEAN Trace, IN UINT8* Ptr, diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/Madt= Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtPa= rser.c index 2ccbb7b80ed..3ac27086a6b 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c @@ -1,6 +1,6 @@ -/** +/** @file MADT table parser =20 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -22,22 +22,28 @@ // Local Variables STATIC CONST UINT8* MadtInterruptControllerType; STATIC CONST UINT8* MadtInterruptControllerLength; STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo; =20 -// Forward declarations +/** + This function validates the System Vector Base in the GICD. + + @param [in] Ptr Pointer to the start of the field data. + @param [in] Context Pointer to context specific information e.g. this + could be a pointer to the ACPI table header. +**/ STATIC VOID EFIAPI ValidateGICDSystemVectorBase ( IN UINT8* Ptr, IN VOID* Context -); + ); =20 -/** An ACPI_PARSER array describing the GICC Interrupt - Controller Structure. -*/ +/** + An ACPI_PARSER array describing the GICC Interrupt Controller Structure. +**/ STATIC CONST ACPI_PARSER GicCParser[] =3D { {L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL}, {L"Length", 1, 1, L"%d", NULL, NULL, NULL, NULL}, {L"Reserved", 2, 2, L"0x%x", NULL, NULL, NULL, NULL}, =20 @@ -57,13 +63,13 @@ STATIC CONST ACPI_PARSER GicCParser[] =3D { {L"Processor Power Efficiency Class", 1, 76, L"0x%x", NULL, NULL, NULL, NULL}, {L"Reserved", 3, 77, L"%x %x %x", Dump3Chars, NULL, NULL, NULL} }; =20 -/** An ACPI_PARSER array describing the GICD Interrupt - Controller Structure. -*/ +/** + An ACPI_PARSER array describing the GICD Interrupt Controller Structure. +**/ STATIC CONST ACPI_PARSER GicDParser[] =3D { {L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL}, {L"Length", 1, 1, L"%d", NULL, NULL, NULL, NULL}, {L"Reserved", 2, 2, L"0x%x", NULL, NULL, NULL, NULL}, =20 @@ -73,13 +79,13 @@ STATIC CONST ACPI_PARSER GicDParser[] =3D { ValidateGICDSystemVectorBase, NULL}, {L"GIC Version", 1, 20, L"%d", NULL, NULL, NULL, NULL}, {L"Reserved", 3, 21, L"%x %x %x", Dump3Chars, NULL, NULL, NULL} }; =20 -/** An ACPI_PARSER array describing the MSI Frame Interrupt - Controller Structure. -*/ +/** + An ACPI_PARSER array describing the MSI Frame Interrupt Controller Struc= ture. +**/ STATIC CONST ACPI_PARSER GicMSIFrameParser[] =3D { {L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL}, {L"Length", 1, 1, L"%d", NULL, NULL, NULL, NULL}, {L"Reserved", 2, 2, L"0x%x", NULL, NULL, NULL, NULL}, =20 @@ -89,61 +95,63 @@ STATIC CONST ACPI_PARSER GicMSIFrameParser[] =3D { =20 {L"SPI Count", 2, 20, L"%d", NULL, NULL, NULL, NULL}, {L"SPI Base", 2, 22, L"0x%x", NULL, NULL, NULL, NULL} }; =20 -/** An ACPI_PARSER array describing the GICR Interrupt - Controller Structure. -*/ +/** + An ACPI_PARSER array describing the GICR Interrupt Controller Structure. +**/ STATIC CONST ACPI_PARSER GicRParser[] =3D { {L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL}, {L"Length", 1, 1, L"%d", NULL, NULL, NULL, NULL}, {L"Reserved", 2, 2, L"0x%x", NULL, NULL, NULL, NULL}, =20 {L"Discovery Range Base Address", 8, 4, L"0x%lx", NULL, NULL, NULL, NULL}, {L"Discovery Range Length", 4, 12, L"0x%x", NULL, NULL, NULL, NULL} }; =20 -/** An ACPI_PARSER array describing the GIC ITS Interrupt - Controller Structure. -*/ +/** + An ACPI_PARSER array describing the GIC ITS Interrupt Controller Structu= re. +**/ STATIC CONST ACPI_PARSER GicITSParser[] =3D { {L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL}, {L"Length", 1, 1, L"%d", NULL, NULL, NULL, NULL}, {L"Reserved", 2, 2, L"0x%x", NULL, NULL, NULL, NULL}, =20 {L"GIC ITS ID", 4, 4, L"0x%x", NULL, NULL, NULL, NULL}, {L"Physical Base Address", 8, 8, L"0x%lx", NULL, NULL, NULL, NULL}, {L"Reserved", 4, 16, L"0x%x", NULL, NULL, NULL, NULL} }; =20 -/** An ACPI_PARSER array describing the ACPI MADT Table. -*/ +/** + An ACPI_PARSER array describing the ACPI MADT Table. +**/ STATIC CONST ACPI_PARSER MadtParser[] =3D { PARSE_ACPI_HEADER (&AcpiHdrInfo), {L"Local Interrupt Controller Address", 4, 36, L"0x%x", NULL, NULL, NULL, NULL}, {L"Flags", 4, 40, L"0x%x", NULL, NULL, NULL, NULL} }; =20 -/** An ACPI_PARSER array describing the MADT Interrupt - Controller Structure Header Structure. -*/ +/** + An ACPI_PARSER array describing the MADT Interrupt Controller Structure = Header Structure. +**/ STATIC CONST ACPI_PARSER MadtInterruptControllerHeaderParser[] =3D { {NULL, 1, 0, NULL, NULL, (VOID**)&MadtInterruptControllerType, NULL, NUL= L}, {L"Length", 1, 1, NULL, NULL, (VOID**)&MadtInterruptControllerLength, NU= LL, NULL}, {L"Reserved", 2, 2, NULL, NULL, NULL, NULL, NULL} }; =20 -/** This function validates the System Vector Base in the GICD. +/** + This function validates the System Vector Base in the GICD. =20 @param [in] Ptr Pointer to the start of the field data. @param [in] Context Pointer to context specific information e.g. this could be a pointer to the ACPI table header. -*/ +**/ STATIC VOID EFIAPI ValidateGICDSystemVectorBase ( IN UINT8* Ptr, @@ -156,11 +164,12 @@ ValidateGICDSystemVectorBase ( L"\nERROR: System Vector Base must be zero." ); } } =20 -/** This function parses the ACPI MADT table. +/** + This function parses the ACPI MADT table. When trace is enabled this function parses the MADT table and traces the ACPI table fields. =20 This function currently parses the following Interrupt Controller Structures: @@ -174,11 +183,11 @@ ValidateGICDSystemVectorBase ( =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiMadt ( IN BOOLEAN Trace, IN UINT8* Ptr, diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Mcfg/Mcfg= Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Mcfg/McfgPa= rser.c index a21b30dc0d5..29fc28f7fb0 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Mcfg/McfgParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Mcfg/McfgParser.c @@ -1,6 +1,6 @@ -/** +/** @file MCFG table parser =20 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -20,39 +20,41 @@ #include "AcpiTableParser.h" =20 // Local variables STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo; =20 -/** An ACPI_PARSER array describing the ACPI MCFG Table. -*/ +/** + An ACPI_PARSER array describing the ACPI MCFG Table. +**/ STATIC CONST ACPI_PARSER McfgParser[] =3D { PARSE_ACPI_HEADER (&AcpiHdrInfo), {L"Reserved", 8, 36, L"0x%lx", NULL, NULL, NULL, NULL}, }; =20 -/** An ACPI_PARSER array describing the PCI configuration Space - Base Address structure. -*/ +/** + An ACPI_PARSER array describing the PCI configuration Space Base Address= structure. +**/ STATIC CONST ACPI_PARSER PciCfgSpaceBaseAddrParser[] =3D { {L"Base Address", 8, 0, L"0x%lx", NULL, NULL, NULL, NULL}, {L"PCI Segment Group No.", 2, 8, L"0x%x", NULL, NULL, NULL, NULL}, {L"Start Bus No.", 1, 10, L"0x%x", NULL, NULL, NULL, NULL}, {L"End Bus No.", 1, 11, L"0x%x", NULL, NULL, NULL, NULL}, {L"Reserved", 4, 12, L"0x%x", NULL, NULL, NULL, NULL} }; =20 -/** This function parses the ACPI MCFG table. +/** + This function parses the ACPI MCFG table. When trace is enabled this function parses the MCFG table and traces the ACPI table fields. =20 This function also performs validation of the ACPI table fields. =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiMcfg ( IN BOOLEAN Trace, IN UINT8* Ptr, diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rsdp/Rsdp= Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rsdp/RsdpPa= rser.c index c7acdceb947..c33bb1e9234 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rsdp/RsdpParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rsdp/RsdpParser.c @@ -1,6 +1,6 @@ -/** +/** @file RSDP table parser =20 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -19,40 +19,43 @@ #include "AcpiTableParser.h" =20 // Local Variables STATIC CONST UINT64* XsdtAddress; =20 -/** This function validates the RSDT Address. +/** + This function validates the RSDT Address. =20 @param [in] Ptr Pointer to the start of the field data. @param [in] Context Pointer to context specific information e.g. this could be a pointer to the ACPI table header. -*/ +**/ STATIC VOID EFIAPI ValidateRsdtAddress ( IN UINT8* Ptr, IN VOID* Context ); =20 -/** This function validates the XSDT Address. +/** + This function validates the XSDT Address. =20 @param [in] Ptr Pointer to the start of the field data. @param [in] Context Pointer to context specific information e.g. this could be a pointer to the ACPI table header. -*/ +**/ STATIC VOID EFIAPI ValidateXsdtAddress ( IN UINT8* Ptr, IN VOID* Context ); =20 -/** An array describing the ACPI RSDP Table. -*/ +/** + An array describing the ACPI RSDP Table. +**/ STATIC CONST ACPI_PARSER RsdpParser[] =3D { {L"Signature", 8, 0, NULL, Dump8Chars, NULL, NULL, NULL}, {L"Checksum", 1, 8, L"0x%x", NULL, NULL, NULL, NULL}, {L"Oem ID", 6, 9, NULL, Dump6Chars, NULL, NULL, NULL}, {L"Revision", 1, 15, L"%d", NULL, NULL, NULL, NULL}, @@ -62,16 +65,17 @@ STATIC CONST ACPI_PARSER RsdpParser[] =3D { ValidateXsdtAddress, NULL}, {L"Extended Checksum", 1, 32, L"0x%x", NULL, NULL, NULL, NULL}, {L"Reserved", 3, 33, L"%x %x %x", Dump3Chars, NULL, NULL, NULL} }; =20 -/** This function validates the RSDT Address. +/** + This function validates the RSDT Address. =20 @param [in] Ptr Pointer to the start of the field data. @param [in] Context Pointer to context specific information e.g. this could be a pointer to the ACPI table header. -*/ +**/ STATIC VOID EFIAPI ValidateRsdtAddress ( IN UINT8* Ptr, @@ -93,16 +97,17 @@ ValidateRsdtAddress ( ); } #endif } =20 -/** This function validates the XSDT Address. +/** + This function validates the XSDT Address. =20 @param [in] Ptr Pointer to the start of the field data. @param [in] Context Pointer to context specific information e.g. this could be a pointer to the ACPI table header. -*/ +**/ STATIC VOID EFIAPI ValidateXsdtAddress ( IN UINT8* Ptr, @@ -124,11 +129,12 @@ ValidateXsdtAddress ( ); } #endif } =20 -/** This function parses the ACPI RSDP table. +/** + This function parses the ACPI RSDP table. =20 This function invokes the parser for the XSDT table. * Note - This function does not support parsing of RSDT table. =20 This function also performs a RAW dump of the ACPI table and @@ -136,11 +142,11 @@ ValidateXsdtAddress ( =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiRsdp ( IN BOOLEAN Trace, IN UINT8* Ptr, diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/Slit= Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitPa= rser.c index 5f99fd46a03..a028ae541ca 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c @@ -1,6 +1,6 @@ -/** +/** @file SLIT table parser =20 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -22,23 +22,26 @@ =20 // Local Variables STATIC CONST UINT64* SlitSystemLocalityCount; STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo; =20 -/** An ACPI_PARSER array describing the ACPI SLIT table. -*/ +/** + An ACPI_PARSER array describing the ACPI SLIT table. +**/ STATIC CONST ACPI_PARSER SlitParser[] =3D { PARSE_ACPI_HEADER (&AcpiHdrInfo), {L"Number of System Localities", 8, 36, L"0x%lx", NULL, (VOID**)&SlitSystemLocalityCount, NULL, NULL} }; =20 -/** Macro to get the value of a System Locality -*/ +/** + Macro to get the value of a System Locality +**/ #define SLIT_ELEMENT(Ptr, i, j) *(Ptr + (i * LocalityCount) + j) =20 -/** This function parses the ACPI SLIT table. +/** + This function parses the ACPI SLIT table. When trace is enabled this function parses the SLIT table and traces the ACPI table fields. =20 This function also validates System Localities for the following: - Diagonal elements have a normalized value of 10 @@ -47,11 +50,11 @@ STATIC CONST ACPI_PARSER SlitParser[] =3D { =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiSlit ( IN BOOLEAN Trace, IN UINT8* Ptr, diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Spcr/Spcr= Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Spcr/SpcrPa= rser.c index 841a27ffdfa..64340886fe5 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Spcr/SpcrParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Spcr/SpcrParser.c @@ -1,6 +1,6 @@ -/** +/** @file SPCR table parser =20 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -22,40 +22,43 @@ #include "AcpiTableParser.h" =20 // Local variables STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo; =20 -/** This function validates the Interrupt Type. +/** + This function validates the Interrupt Type. =20 @param [in] Ptr Pointer to the start of the field data. @param [in] Context Pointer to context specific information e.g. this could be a pointer to the ACPI table header. -*/ +**/ STATIC VOID EFIAPI ValidateInterruptType ( IN UINT8* Ptr, IN VOID* Context ); =20 -/** This function validates the Irq. +/** + This function validates the Irq. =20 @param [in] Ptr Pointer to the start of the field data. @param [in] Context Pointer to context specific information e.g. this could be a pointer to the ACPI table header. -*/ +**/ STATIC VOID EFIAPI ValidateIrq ( IN UINT8* Ptr, IN VOID* Context ); =20 -/** An ACPI_PARSER array describing the ACPI SPCR Table. -*/ +/** + An ACPI_PARSER array describing the ACPI SPCR Table. +**/ STATIC CONST ACPI_PARSER SpcrParser[] =3D { PARSE_ACPI_HEADER (&AcpiHdrInfo), {L"Interface Type", 1, 36, L"%d", NULL, NULL, NULL, NULL}, {L"Reserved", 3, 37, L"%x %x %x", Dump3Chars, NULL, NULL, NULL}, {L"Base Address", 12, 40, NULL, DumpGas, NULL, NULL, NULL}, @@ -77,16 +80,17 @@ STATIC CONST ACPI_PARSER SpcrParser[] =3D { {L"PCI Flags", 4, 71, L"0x%x", NULL, NULL, NULL, NULL}, {L"PCI Segment", 1, 75, L"0x%x", NULL, NULL, NULL, NULL}, {L"Reserved", 4, 76, L"%x", NULL, NULL, NULL, NULL} }; =20 -/** This function validates the Interrupt Type. +/** + This function validates the Interrupt Type. =20 @param [in] Ptr Pointer to the start of the field data. @param [in] Context Pointer to context specific information e.g. this could be a pointer to the ACPI table header. -*/ +**/ STATIC VOID EFIAPI ValidateInterruptType ( IN UINT8* Ptr, @@ -104,16 +108,17 @@ ValidateInterruptType ( ); } #endif } =20 -/** This function validates the Irq. +/** + This function validates the Irq. =20 @param [in] Ptr Pointer to the start of the field data. @param [in] Context Pointer to context specific information e.g. this could be a pointer to the ACPI table header. -*/ +**/ STATIC VOID EFIAPI ValidateIrq ( IN UINT8* Ptr, @@ -130,21 +135,22 @@ ValidateIrq ( ); } #endif } =20 -/** This function parses the ACPI SPCR table. +/** + This function parses the ACPI SPCR table. When trace is enabled this function parses the SPCR table and traces the ACPI table fields. =20 This function also performs validations of the ACPI table fields. =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiSpcr ( IN BOOLEAN Trace, IN UINT8* Ptr, diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/Srat= Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratPa= rser.c index 86da55935c8..fbe943d898a 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c @@ -1,6 +1,6 @@ -/** +/** @file SRAT table parser =20 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -23,77 +23,83 @@ // Local Variables STATIC CONST UINT8* SratRAType; STATIC CONST UINT8* SratRALength; STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo; =20 -/** This function validates the Reserved field in the SRAT table header. +/** + This function validates the Reserved field in the SRAT table header. =20 @param [in] Ptr Pointer to the start of the field data. @param [in] Context Pointer to context specific information e.g. this could be a pointer to the ACPI table header. -*/ +**/ STATIC VOID EFIAPI ValidateSratReserved ( IN UINT8* Ptr, IN VOID* Context ); =20 -/** This function traces the APIC Proximity Domain field. +/** + This function traces the APIC Proximity Domain field. =20 @param [in] Format Format string for tracing the data. @param [in] Ptr Pointer to the start of the buffer. -*/ +**/ STATIC VOID DumpSratApicProximity ( IN CONST CHAR16* Format, IN UINT8* Ptr ); =20 -/** An ACPI_PARSER array describing the SRAT Table. -*/ +/** + An ACPI_PARSER array describing the SRAT Table. +**/ STATIC CONST ACPI_PARSER SratParser[] =3D { PARSE_ACPI_HEADER (&AcpiHdrInfo), {L"Reserved", 4, 36, L"0x%x", NULL, NULL, ValidateSratReserved, NULL}, {L"Reserved", 8, 40, L"0x%lx", NULL, NULL, NULL, NULL} }; =20 -/** An ACPI_PARSER array describing the Resource Allocation - structure header. -*/ +/** + An ACPI_PARSER array describing the Resource Allocation structure header. +**/ STATIC CONST ACPI_PARSER SratResourceAllocationParser[] =3D { {L"Type", 1, 0, NULL, NULL, (VOID**)&SratRAType, NULL, NULL}, {L"Length", 1, 1, NULL, NULL, (VOID**)&SratRALength, NULL, NULL} }; =20 -/** An ACPI_PARSER array describing the GICC Affinity structure. -*/ +/** + An ACPI_PARSER array describing the GICC Affinity structure. +**/ STATIC CONST ACPI_PARSER SratGicCAffinityParser[] =3D { {L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL}, {L"Length", 1, 1, L"0x%x", NULL, NULL, NULL, NULL}, =20 {L"Proximity Domain", 4, 2, L"0x%x", NULL, NULL, NULL, NULL}, {L"ACPI Processor UID", 4, 6, L"0x%x", NULL, NULL, NULL, NULL}, {L"Flags", 4, 10, L"0x%x", NULL, NULL, NULL, NULL}, {L"Clock Domain", 4, 14, L"0x%x", NULL, NULL, NULL, NULL} }; =20 -/** An ACPI_PARSER array describing the GIC ITS Affinity structure. -*/ +/** + An ACPI_PARSER array describing the GIC ITS Affinity structure. +**/ STATIC CONST ACPI_PARSER SratGicITSAffinityParser[] =3D { {L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL}, {L"Length", 1, 1, L"0x%x", NULL, NULL, NULL, NULL}, =20 {L"Proximity Domain", 4, 2, L"0x%x", NULL, NULL, NULL, NULL}, {L"Reserved", 2, 6, L"0x%x", NULL, NULL, NULL, NULL}, {L"ITS Id", 4, 8, L"0x%x", NULL, NULL, NULL, NULL}, }; =20 -/** An ACPI_PARSER array describing the Memory Affinity structure. -*/ +/** + An ACPI_PARSER array describing the Memory Affinity structure. +**/ STATIC CONST ACPI_PARSER SratMemAffinityParser[] =3D { {L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL}, {L"Length", 1, 1, L"0x%x", NULL, NULL, NULL, NULL}, =20 {L"Proximity Domain", 4, 2, L"0x%x", NULL, NULL, NULL, NULL}, @@ -105,12 +111,13 @@ STATIC CONST ACPI_PARSER SratMemAffinityParser[] =3D { {L"Reserved", 4, 24, L"0x%x", NULL, NULL, NULL, NULL}, {L"Flags", 4, 28, L"0x%x", NULL, NULL, NULL, NULL}, {L"Reserved", 8, 32, L"0x%lx", NULL, NULL, NULL, NULL} }; =20 -/** An ACPI_PARSER array describing the APIC/SAPIC Affinity structure. -*/ +/** + An ACPI_PARSER array describing the APIC/SAPIC Affinity structure. +**/ STATIC CONST ACPI_PARSER SratApciSapicAffinityParser[] =3D { {L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL}, {L"Length", 1, 1, L"0x%x", NULL, NULL, NULL, NULL}, =20 {L"Proximity Domain [7:0]", 1, 2, L"0x%x", NULL, NULL, NULL, NULL}, @@ -120,13 +127,13 @@ STATIC CONST ACPI_PARSER SratApciSapicAffinityParser[= ] =3D { {L"Proximity Domain [31:8]", 3, 9, L"0x%x", DumpSratApicProximity, NULL, NULL, NULL}, {L"Clock Domain", 4, 12, L"0x%x", NULL, NULL, NULL, NULL} }; =20 -/** An ACPI_PARSER array describing the Processor Local x2APIC - Affinity structure. -*/ +/** + An ACPI_PARSER array describing the Processor Local x2APIC Affinity stru= cture. +**/ STATIC CONST ACPI_PARSER SratX2ApciAffinityParser[] =3D { {L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL}, {L"Length", 1, 1, L"0x%x", NULL, NULL, NULL, NULL}, =20 {L"Reserved", 2, 2, L"0x%x", NULL, NULL, NULL, NULL}, @@ -140,11 +147,11 @@ STATIC CONST ACPI_PARSER SratX2ApciAffinityParser[] = =3D { /** This function validates the Reserved field in the SRAT table header. =20 @param [in] Ptr Pointer to the start of the field data. @param [in] Context Pointer to context specific information e.g. this could be a pointer to the ACPI table header. -*/ +**/ STATIC VOID EFIAPI ValidateSratReserved ( IN UINT8* Ptr, @@ -155,15 +162,16 @@ ValidateSratReserved ( IncrementErrorCount (); Print (L"\nERROR: Reserved should be 1 for backward compatibility.\n"); } } =20 -/** This function traces the APIC Proximity Domain field. +/** + This function traces the APIC Proximity Domain field. =20 @param [in] Format Format string for tracing the data. @param [in] Ptr Pointer to the start of the buffer. -*/ +**/ STATIC VOID DumpSratApicProximity ( IN CONST CHAR16* Format, IN UINT8* Ptr @@ -171,11 +179,12 @@ DumpSratApicProximity ( { UINT32 ProximityDomain =3D Ptr[0] | (Ptr[1] << 8) | (Ptr[2] << 16); Print (Format, ProximityDomain); } =20 -/** This function parses the ACPI SRAT table. +/** + This function parses the ACPI SRAT table. When trace is enabled this function parses the SRAT table and traces the ACPI table fields. =20 This function parses the following Resource Allocation Structures: - Processor Local APIC/SAPIC Affinity Structure @@ -187,11 +196,11 @@ DumpSratApicProximity ( =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiSrat ( IN BOOLEAN Trace, IN UINT8* Ptr, diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Ssdt/Ssdt= Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Ssdt/SsdtPa= rser.c index a77ccbe0606..69792140035 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Ssdt/SsdtParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Ssdt/SsdtParser.c @@ -1,6 +1,6 @@ -/** +/** @file SSDT table parser =20 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -17,21 +17,22 @@ #include #include #include "AcpiParser.h" #include "AcpiTableParser.h" =20 -/** This function parses the ACPI SSDT table. +/** + This function parses the ACPI SSDT table. When trace is enabled this function parses the SSDT table and traces the ACPI table fields. For the SSDT table only the ACPI header fields are parsed and traced. =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiSsdt ( IN BOOLEAN Trace, IN UINT8* Ptr, diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/Xsdt= Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtPa= rser.c index 0ed65d2e72c..99521cd67a7 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtParser.c @@ -1,6 +1,6 @@ -/** +/** @file XSDT table parser =20 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -27,29 +27,32 @@ STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo; */ STATIC CONST ACPI_PARSER XsdtParser[] =3D { PARSE_ACPI_HEADER (&AcpiHdrInfo) }; =20 +/** + Get the ACPI XSDT header info. +**/ CONST ACPI_DESCRIPTION_HEADER_INFO* CONST EFIAPI GetAcpiXsdtHeaderInfo ( VOID ) { return &AcpiHdrInfo; } =20 -/** This function parses the ACPI XSDT table - and optionally traces the ACPI table fields. +/** + This function parses the ACPI XSDT table and optionally traces the ACPI = table fields. =20 This function also performs validation of the XSDT table. =20 @param [in] Trace If TRUE, trace the ACPI fields. @param [in] Ptr Pointer to the start of the buffer. @param [in] AcpiTableLength Length of the ACPI table. @param [in] AcpiTableRevision Revision of the ACPI table. -*/ +**/ VOID EFIAPI ParseAcpiXsdt ( IN BOOLEAN Trace, IN UINT8* Ptr, diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiView= CommandLib.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiVi= ewCommandLib.c index 7de28691be2..8479bfbc9be 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommand= Lib.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommand= Lib.c @@ -1,6 +1,6 @@ -/** +/** @file Main file for 'acpiview' Shell command function. =20 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -47,19 +47,20 @@ ACPI_TABLE_PARSER ParserList[] =3D { {EFI_ACPI_6_2_SYSTEM_RESOURCE_AFFINITY_TABLE_SIGNATURE, ParseAcpiSrat}, {EFI_ACPI_6_2_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE, ParseAcpiSsd= t}, {EFI_ACPI_6_2_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE, ParseAcpiXsdt} }; =20 -/** This function registers all the available table parsers. +/** + This function registers all the available table parsers. =20 @retval EFI_SUCCESS The parser is registered. @retval EFI_ALREADY_STARTED The parser for the ACPI Table was already registered. @retval EFI_INVALID_PARAMETER A parameter is invalid. @retval EFI_OUT_OF_RESOURCES No space to register the parser. -*/ +**/ EFI_STATUS RegisterAllParsers ( ) { EFI_STATUS Status; @@ -78,11 +79,11 @@ RegisterAllParsers ( =20 /** Return the file name of the help text file if not using HII. =20 @return The string pointer to the file name. -*/ +**/ CONST CHAR16* EFIAPI ShellCommandGetManFileNameAcpiView ( VOID ) @@ -99,11 +100,11 @@ ShellCommandGetManFileNameAcpiView ( @param SystemTable The EFI System Table pointer. =20 @retval EFI_SUCCESS The Shell command handlers were installed successfully. @retval EFI_DEVICE_ERROR Hii package failed to install. -*/ +**/ EFI_STATUS EFIAPI UefiShellAcpiViewCommandLibConstructor ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable @@ -150,11 +151,11 @@ UefiShellAcpiViewCommandLibConstructor ( /** Destructor for the library. free any resources. =20 @param ImageHandle The image handle of the process. @param SystemTable The EFI System Table pointer. -*/ +**/ EFI_STATUS EFIAPI UefiShellAcpiViewCommandLibDestructor ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiView= CommandLib.h b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiVi= ewCommandLib.h index 59c8e21544d..f547569cf37 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommand= Lib.h +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommand= Lib.h @@ -1,6 +1,6 @@ -/** +/** @file Header file for 'acpiview' Shell command functions. =20 Copyright (c) 2016 - 2017, ARM Limited. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -19,11 +19,11 @@ extern EFI_HII_HANDLE gShellAcpiViewHiiHandle; /** Function for 'acpiview' command. =20 @param[in] ImageHandle Handle to the Image (NULL if Internal). @param[in] SystemTable Pointer to the System Table (NULL if Internal). -*/ +**/ SHELL_STATUS EFIAPI ShellCommandRunAcpiView ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable --=20 2.14.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel