From nobody Mon May 13 22:38:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+87742+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 16476083483164.857274720901955; Fri, 18 Mar 2022 05:59:08 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 6Ps2YY1788612xUg6Gd4uIyF; Fri, 18 Mar 2022 05:59:09 -0700 X-Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.62]) by mx.groups.io with SMTP id smtpd.web12.9180.1647608348068416420 for ; Fri, 18 Mar 2022 05:59:08 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B/H9fMMO1gqZv803N2mdqButm1TsAjHGGPRbiObbMYMXSSdKwHUrhq9J61S8AQzUPb899tTKISbzYHZI08xFKqzMNJf5f1eT9Uef9xkd5zDeGi8FKFpsMpEbea1HGcm9pnxIvY+ysBs8Cmm7VkPtd96ZqcJrDhmmul4H+Q0YrOe3NeSuXk0bBNh/SJKHJcnQmNBUmCZhaM8eNXjhSrfDUTiw1T8XFh2LGjuBpY3rkJdvPnmttuzox3EiaofGc3aiMc/gos2fQjINubztd7IZZbHaT0Q9NwbpMFcUdN2/Dz0zaXcLP2a7n9lgHbcm8ICJlpEyfVVmWRSTjXE/zDBzGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Fs19HKYWFA/x6lb2/WYdj2arT3M6hvbydhBgyQ2UeT8=; b=bEhMA5zGeT0kbQuqJWUHHFvtU1I6vu11wyQW2Sbrgb9vbApn3GLjLo8abR+crNvxaQhwihtSY0lNeG7sCSSRtSqi8Wy3v1a24iTl8WvsudfvQIws8CVk01X8oM8UAW3o1xA9EkCfbAcDHJY/gxFvZmqRblnT8uHlZ90vGLZZgFav7aEduVDRMf+rdt3h/e6K8UmarwfgNR8i6EnONaTeusDTKpBS1A56301w4qZ3zMay3OqdXstEw+4jb4a9GVfhUs/3TRXlR/Fd6BoYBIcvJcsMRLbyGGCbQ+lV97UdRSU2qlqvn+LkK+fe7dz0T9aiJBJJ3o2C0gG63pD1V/lCFg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none X-Received: from BN6PR1101CA0002.namprd11.prod.outlook.com (2603:10b6:405:4a::12) by DM6PR12MB4578.namprd12.prod.outlook.com (2603:10b6:5:2a9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5081.14; Fri, 18 Mar 2022 12:59:05 +0000 X-Received: from BN8NAM11FT068.eop-nam11.prod.protection.outlook.com (2603:10b6:405:4a:cafe::fa) by BN6PR1101CA0002.outlook.office365.com (2603:10b6:405:4a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5081.18 via Frontend Transport; Fri, 18 Mar 2022 12:59:05 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+87742+1787277+3901457@groups.io; helo=mail02.groups.io; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; X-Received: from SATLEXMB03.amd.com (165.204.84.17) by BN8NAM11FT068.mail.protection.outlook.com (10.13.177.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5081.14 via Frontend Transport; Fri, 18 Mar 2022 12:59:05 +0000 X-Received: from SATLEXMB06.amd.com (10.181.40.147) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 18 Mar 2022 07:59:04 -0500 X-Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB06.amd.com (10.181.40.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 18 Mar 2022 07:59:04 -0500 X-Received: from BLR-LAB-SFW01.amd.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2375.24 via Frontend Transport; Fri, 18 Mar 2022 07:59:02 -0500 From: "Abdul Lateef Attar via groups.io" To: CC: Ray Ni , Zhichao Gao , "Sami Mujawar" Subject: [edk2-devel] [PATCH v6 1/2] ShellPkg/AcpiView: Adds ACPI_PARSER bitfield parser Date: Fri, 18 Mar 2022 18:28:59 +0530 Message-ID: <20220318125900.23456-2-abdattar@amd.com> In-Reply-To: <20220318125900.23456-1-abdattar@amd.com> References: <20220318125900.23456-1-abdattar@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 756e6e2f-1ffe-474f-f77f-08da08df151c X-MS-TrafficTypeDiagnostic: DM6PR12MB4578:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: 7LPI0eXRkgMn5DlS44QAiYIpDMYEj3Gkh51YAjyCMtQg+ERcbkb/T4DjsCa9eWsHVax2gN995H/XdKlj+m4hNhYAjGoPpSok7Hs6lYTD4KPeMyNMag6aMv+R36+wuBRlqsWpak2hP/z3MqjyodAfwSLEMWgPaC35XoZrU2noOePNE+QH8C127cIpdOsn6P3WhzcnPtb4CXcn4lBJrPKBI+05lzy4yt745KRPL34X74af6e+X+NbdjEECbvJ73ixEU1JenFPGll/Tyz3PS9K1o3vl2PhHfk9wHHd6VJkVAW0GwhDbSZ9qaVmXiyP/WdG4zDPw3LXQqwn58ve5eMwKGRStonahsym5K4vmUxO6NxyuWyClJh1YaJUCykGqGZVgLvQJ31NcTmzUwP8lP/JTl5t+JboWsRlYtZmLTHo+sOZ3XnwhThCQnigf8WzZ8CiIEwxzNMbrrpqX98/gzqfxgR7mdqEih+mhNQEZg9EZEE18YmQnO0zIYBk1tq4IFwq3pgao64BUIIxIgGHRX13zT4/TVHz0NMiwdznrp4Z/ePA4fGsxb+qjkd3vme7JD6wzX3tNCMLjb54M4cbPLU/4GyOUvmtpSoCVHOnX8c9gCNf+CZZhzqYyxOJLn4HANG31B/mwrCrJhASW+gt0W7EJU7Yn0koeDNOfUzDDQWk9I5Sk/vofd4RHFbg7capsUXvBNf7sGT02OGJLvAkLFqGAQ9w3VhM4wdcSXBV3wzq6IdeZltokcZ7fUTNjfSTLiHBAP6IIXQxqcbwo4AgtRiOYSv72APzc4yi+pKFsNyFg4yA= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Mar 2022 12:59:05.0670 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 756e6e2f-1ffe-474f-f77f-08da08df151c X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT068.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4578 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,abdattar@amd.com X-Gm-Message-State: eCBSR24Erjl3SUQUAZVNfFxsx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1647608349; bh=isSOlBHfy2Dcl8EniL+uts4PNo1bEN1ur5QuT65LDvU=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=EMWT7cuy7SqpVRGkAzdQCBxflX3J8xSzdZAJzD0d4B5P4xBtEupoF4UCNBplqwpl7rM 1XpfiGgQ1GWLH6nkPxAEomrnw2pmb9DXWaQxU79oOXdWtEPnqHk+wQNX5mlkAsL1ccoRc Dd0MEA7P/ajb2vu+HaynHMt93LHMv5mjIpU= X-ZohoMail-DKIM: fail (Signature date is -1 seconds in the future.) X-ZM-MESSAGEID: 1647608378372100001 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3839 Adds ParseAcpiBitFields() which is based on ParseAcpi() and capable of parsing the bit fields. Supports parsing of UINT8, UINT16, UINT32 and UINT64 byte data. Cc: Ray Ni Cc: Zhichao Gao Cc: Sami Mujawar Signed-off-by: Abdul Lateef Attar --- ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h | 48 +++++ ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c | 188 ++++++++++= ++++++++++ 2 files changed, 236 insertions(+) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h b/Sh= ellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h index 5c916a4720b8..db8c88f6dfa4 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h @@ -2,6 +2,7 @@ Header file for ACPI parser =20 Copyright (c) 2016 - 2020, Arm Limited. All rights reserved. + Copyright (c) 2022, AMD Incorporated. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent **/ =20 @@ -251,6 +252,11 @@ typedef VOID (EFIAPI *FNPTR_FIELD_VALIDATOR)(UINT8 *Pt= r, VOID *Context); the field data. If the field is more complex and requires additional processing for formatting and representation a print formatter function can be specified in 'PrintFormatter'. + + ParseAcpiBitFields() uses AcpiParser structure to parse the bit fields. + It considers Length as a number of bits that need to be parsed. + Also, the Offset field will be considered as starting offset of the bitf= ield. + The PrintFormatter function may choose to use the format string specified by 'Format' or use its own internal format string. =20 @@ -264,10 +270,12 @@ typedef struct AcpiParser { =20 /// The length of the field. /// (Byte Length column from ACPI table spec) + /// Length(in bits) of the bitfield if used with ParseAcpiBitFields(). UINT32 Length; =20 /// The offset of the field from the start of the table. /// (Byte Offset column from ACPI table spec) + /// The Bit offset of the field if used with ParseAcpiBitFields(). UINT32 Offset; =20 /// Optional Print() style format string for tracing the data. If not @@ -285,6 +293,7 @@ typedef struct AcpiParser { /// a pointer to the field data. This value is set after the FieldValida= tor /// has been called and therefore should not be used by the FieldValidat= or. /// If unused this must be set to NULL. + /// ItemPtr is not supported with ParseAcpiBitFields(). VOID **ItemPtr; =20 /// Optional pointer to a field validator function. @@ -364,6 +373,45 @@ ParseAcpi ( IN UINT32 ParserItems ); =20 +/** + This function is used to parse an ACPI table bitfield buffer. + + 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 th= e ACPI table bitfields. + + This function can optionally be used to parse ACPI tables and fetch spec= ific + field values. The ItemPtr member of the ACPI_PARSER structure (where use= d) + is updated by this parser function to point to the selected field data + (e.g. useful for variable length nested fields). + + ItemPtr member of ACPI_PARSER is not supported with this function. + + @param [in] Trace Trace the ACPI fields TRUE else only parse the + table. + @param [in] Indent Number of spaces to indent the output. + @param [in] AsciiName Optional pointer to an ASCII string that descri= bes + the table being parsed. + @param [in] Ptr Pointer to the start of the buffer. + @param [in] Length Length of the buffer pointed by Ptr. + @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. + + @retval Number of bits parsed. +**/ +UINT32 +EFIAPI +ParseAcpiBitFields ( + 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 + ); + /** This is a helper macro to pass parameters to the Parser functions. =20 diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c b/Sh= ellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c index cb193a5ea449..fcc56c189d65 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c @@ -2,12 +2,14 @@ ACPI parser =20 Copyright (c) 2016 - 2021, Arm Limited. All rights reserved. + Copyright (c) 2022, AMD Incorporated. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent **/ =20 #include #include #include +#include #include "AcpiParser.h" #include "AcpiView.h" #include "AcpiViewConfig.h" @@ -752,3 +754,189 @@ ParseAcpiHeader ( =20 return BytesParsed; } + +/** + This function is used to parse an ACPI table bitfield buffer. + + 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 th= e ACPI table bitfields. + + This function can optionally be used to parse ACPI tables and fetch spec= ific + field values. The ItemPtr member of the ACPI_PARSER structure (where use= d) + is updated by this parser function to point to the selected field data + (e.g. useful for variable length nested fields). + + ItemPtr member of ACPI_PARSER is not supported with this function. + + @param [in] Trace Trace the ACPI fields TRUE else only parse the + table. + @param [in] Indent Number of spaces to indent the output. + @param [in] AsciiName Optional pointer to an ASCII string that descri= bes + the table being parsed. + @param [in] Ptr Pointer to the start of the buffer. + @param [in] Length Length in bytes of the buffer pointed by Ptr. + @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. + + @retval Number of bits parsed. +**/ +UINT32 +EFIAPI +ParseAcpiBitFields ( + 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 + ) +{ + UINT32 Index; + UINT32 Offset; + BOOLEAN HighLight; + UINTN OriginalAttribute; + + UINT64 Data; + UINT64 BitsData; + + if ((Length =3D=3D 0) || (Length > 8)) { + IncrementErrorCount (); + Print ( + L"\nERROR: Bitfield Length(%d) is zero or exceeding the 64 bit limit= .\n", + Length + ); + return 0; + } + + // + // set local variables to suppress incorrect compiler/analyzer warnings + // + OriginalAttribute =3D 0; + Offset =3D 0; + + // Increment the Indent + gIndent +=3D Indent; + + CopyMem ((VOID *)&BitsData, (VOID *)Ptr, Length); + if (Trace && (AsciiName !=3D NULL)) { + HighLight =3D GetColourHighlighting (); + + if (HighLight) { + OriginalAttribute =3D gST->ConOut->Mode->Attribute; + gST->ConOut->SetAttribute ( + gST->ConOut, + EFI_TEXT_ATTR ( + EFI_YELLOW, + ((OriginalAttribute&(BIT4|BIT5|BIT6))>>4) + ) + ); + } + + Print ( + L"%*a%-*a :\n", + gIndent, + "", + (OUTPUT_FIELD_COLUMN_WIDTH - gIndent), + AsciiName + ); + if (HighLight) { + gST->ConOut->SetAttribute (gST->ConOut, OriginalAttribute); + } + } + + for (Index =3D 0; Index < ParserItems; Index++) { + if ((Offset + Parser[Index].Length) > (Length * 8)) { + // For fields outside the buffer length provided, reset any pointers + // which were supposed to be updated by this function call + if (Parser[Index].ItemPtr !=3D NULL) { + *Parser[Index].ItemPtr =3D NULL; + } + + // We don't parse past the end of the max length specified + continue; + } + + if (Parser[Index].Length =3D=3D 0) { + IncrementErrorCount (); + // don't parse the bitfield whose length is zero + Print ( + L"\nERROR: %a: Cannot parse this field, Field Length =3D %d\n", + Parser[Index].Length + ); + continue; + } + + if (GetConsistencyChecking () && + (Offset !=3D Parser[Index].Offset)) + { + IncrementErrorCount (); + Print ( + L"\nERROR: %a: Offset Mismatch for %s\n" + L"CurrentOffset =3D %d FieldOffset =3D %d\n", + AsciiName, + Parser[Index].NameStr, + Offset, + Parser[Index].Offset + ); + } + + // extract Bitfield data for the current item + Data =3D (BitsData >> Parser[Index].Offset) & ~(~0ULL << Parser[Index]= .Length); + + if (Trace) { + // if there is a Formatter function let the function handle + // the printing else if a Format is specified in the table use + // the Format for printing + PrintFieldName (2, Parser[Index].NameStr); + if (Parser[Index].PrintFormatter !=3D NULL) { + Parser[Index].PrintFormatter (Parser[Index].Format, (UINT8 *)&Data= ); + } else if (Parser[Index].Format !=3D NULL) { + // convert bit length to byte length + switch ((Parser[Index].Length + 7) >> 3) { + // print the data depends on byte size + case 1: + DumpUint8 (Parser[Index].Format, (UINT8 *)&Data); + break; + case 2: + DumpUint16 (Parser[Index].Format, (UINT8 *)&Data); + break; + case 3: + case 4: + DumpUint32 (Parser[Index].Format, (UINT8 *)&Data); + break; + case 5: + case 6: + case 7: + case 8: + DumpUint64 (Parser[Index].Format, (UINT8 *)&Data); + break; + default: + Print ( + L"\nERROR: %a: CANNOT PARSE THIS FIELD, Field Length =3D %d\= n", + AsciiName, + Parser[Index].Length + ); + } // switch + } + + // Validating only makes sense if we are tracing + // the parsed table entries, to report by table name. + if (GetConsistencyChecking () && + (Parser[Index].FieldValidator !=3D NULL)) + { + Parser[Index].FieldValidator ((UINT8 *)&Data, Parser[Index].Contex= t); + } + + Print (L"\n"); + } // if (Trace) + + Offset +=3D Parser[Index].Length; + } // for + + // Decrement the Indent + gIndent -=3D Indent; + return Offset; +} --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#87742): https://edk2.groups.io/g/devel/message/87742 Mute This Topic: https://groups.io/mt/89867227/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon May 13 22:38:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+87743+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1647608351016519.9132614716407; Fri, 18 Mar 2022 05:59:11 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id n1XMYY1788612xoU2JZjMLQO; Fri, 18 Mar 2022 05:59:10 -0700 X-Received: from NAM04-DM6-obe.outbound.protection.outlook.com (NAM04-DM6-obe.outbound.protection.outlook.com [40.107.102.72]) by mx.groups.io with SMTP id smtpd.web12.9181.1647608349633560544 for ; Fri, 18 Mar 2022 05:59:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TFXaKqajzUBnvo7mK6ii8X+pp4+C5jU+hKe9Ep5Ex2ln0nj4Z6+pJ0nZbGcfekhrW2Pv7aRB0OxVxVbJu688v74vvPrOKfNqer09fGsjymwuLsOFf2oQg8DFdey9oKdknD4Pw9cwwCh2tr3HSphnbY32vvF6VYAERsQUu6MNjBGbRjnqWbl+SZrkJ5wYGQNa8Q3hmsbuRVrja90HUDopFzV75eLlrLnUZgrplxqbFqk7wgnzBoKXqyCIli+S9Z0dLlock7xDTXZ5wJbtdAkUFvmCi7G1uiBxEx/rVpFYTafIucspNemcvwcIXWUduc3wwSNhGdh8KFzRllOLNhKEWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ozHu4dcQkHXJ4dWz+AuI4RTgmQx2RpttNtTFEqo9yYA=; b=ABsbnB+0siuBzcPUc0jwRjKwBKe0jbmKfhTv4FHydAXn6o2yh914zAKVnKwQFStqa48oY/WX/osKpj992rpqEO3z/DSNhdYaFwgN5i409VGvNMDHBCMjWrp/S3uBSKnWjUNUkvej6FPVkGeVAkQEKKIspaZpWecqOegrCx1tLh0gRTwGneU0eJfDo5rWck2F7u0+mnQYin/S6qoMqDtfF3Aqx2NsSGoF/3ZJXCIoFtZ6ZPbcSNcHRZq8HiqPtZ1oje9SUKO8Ka1EotOV2zhCj1ooP4uD/xEh1M8e7MRAymo97uisQbEQ1naLVuR/CvTDiVtvqh3bTA1ahKGvmMUm/g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none X-Received: from BN6PR1101CA0009.namprd11.prod.outlook.com (2603:10b6:405:4a::19) by BYAPR12MB3176.namprd12.prod.outlook.com (2603:10b6:a03:134::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5081.17; Fri, 18 Mar 2022 12:59:07 +0000 X-Received: from BN8NAM11FT068.eop-nam11.prod.protection.outlook.com (2603:10b6:405:4a:cafe::ce) by BN6PR1101CA0009.outlook.office365.com (2603:10b6:405:4a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5081.14 via Frontend Transport; Fri, 18 Mar 2022 12:59:07 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+87743+1787277+3901457@groups.io; helo=mail02.groups.io; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; X-Received: from SATLEXMB03.amd.com (165.204.84.17) by BN8NAM11FT068.mail.protection.outlook.com (10.13.177.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5081.14 via Frontend Transport; Fri, 18 Mar 2022 12:59:06 +0000 X-Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 18 Mar 2022 07:59:06 -0500 X-Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 18 Mar 2022 07:59:06 -0500 X-Received: from BLR-LAB-SFW01.amd.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2375.24 via Frontend Transport; Fri, 18 Mar 2022 07:59:04 -0500 From: "Abdul Lateef Attar via groups.io" To: CC: Ray Ni , Zhichao Gao , "Sami Mujawar" Subject: [edk2-devel] [PATCH v6 2/2] ShellPkg/AcpiView: PrintFormatter for FADT Flags field Date: Fri, 18 Mar 2022 18:29:00 +0530 Message-ID: <20220318125900.23456-3-abdattar@amd.com> In-Reply-To: <20220318125900.23456-1-abdattar@amd.com> References: <20220318125900.23456-1-abdattar@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 496f1772-9da6-4e36-e8c9-08da08df1614 X-MS-TrafficTypeDiagnostic: BYAPR12MB3176:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: U4vCnkJO9DYtgD6AhI+vv6+QnOLgFrj+n62+vFHm2/VFTi6G3U0cE6beI1kZCasLr7F49f2rdH7CVA2zNyGPxge6ZMNGUp4ct//NTO3lgiFkNz83t2GPJA4tYfwR7Jd9uSnytT7n0KkA3JVnlRgbxOF9xsm7UyQIsEyPqSYROwaS6uCeeWbgINtVQlSZTi4LuaPQGAUlcQeYNWQjyRmWYSvqCiWiu43yXO55xU83OlT6v2Uq1SYq3JXbjz4gGc8XzgjkMTHUSNSkGhQi2DrGA2pjI524xnVp392Ll4fKcEKnBIaUG3QxNB6EIv6BT6HOTAqf9MqwGpwS4dMdhCjSbhtm+pDcWEWqupZN6e94Whe8UhewBairtTh9xuIii5d9zrI08Yje+MLrLXYTxUsrlfKQuStrck4T1Hd/MXQpLzdIXI0X2+uZRah2fT3/XmEm5kRoc3drjdk10JBmud7ob2xlVViwx2rPSGttaLoZyLr0THfRTA2Rrp/FNSMEjIZORGKNNk9nT6IcqwAs/LnlAmJPb0TWDz4YGGel4fSGJYqqSY4alg+OPLpLnfOS9x24cPqdHBQPvwhSYV8Rt42oSbMXm+5PK+vfX4MgzZE5GtwLS2H8htRorvagCROsZiN0Ju8C8i7RL00RmkH5rSDzaej+F8hvtmktzyn4aK1QIbUo0mXoQg9guY9d2WlsGs7PVuXaCrrT+CE64YJM9Mdwfg3Q9dX4zjj7uO8wZZ/wsV/gfN+UBYdNb9BF/86/D1+VRs42zssk1GN629cUO2aHnj6Zv68rrJyTOb492PdAv2o= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Mar 2022 12:59:06.6763 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 496f1772-9da6-4e36-e8c9-08da08df1614 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT068.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB3176 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,abdattar@amd.com X-Gm-Message-State: EK1BvQlAt7f8CEtUF5b7oqitx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1647608350; bh=uqh1VoM3wtaSBg7IuuL5imZ3f0OAl3L8PIH3U4TNvts=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=KD/I1qOvnnWbu2x6kGT1FCzEUociv/gDtgeeDAMZLG4C9JDwJmb59uUoodrTW3oGatk y03sfMvtJPrijnaJXHc4etS/DjKJP9NC/ilxl2HmN+u/FWgxIXkb+LgTenbkdvMzqV7Oa 6txGG2ID3GtERS/gEqB0tfq7KH58KTPZTrY= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1647608353423100005 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3839 Adds PrintFormatter function to the FADT flags field. Prints indivisual flag name along with flag value. Cc: Ray Ni Cc: Zhichao Gao Cc: Sami Mujawar Signed-off-by: Abdul Lateef Attar --- ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c | = 2 +- ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Fadt/FadtParser.c | 1= 67 +++++++++++++------- 2 files changed, 113 insertions(+), 56 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c b/Sh= ellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c index fcc56c189d65..eac928617609 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c @@ -884,7 +884,7 @@ ParseAcpiBitFields ( } =20 // extract Bitfield data for the current item - Data =3D (BitsData >> Parser[Index].Offset) & ~(~0ULL << Parser[Index]= .Length); + Data =3D RShiftU64 (BitsData, Parser[Index].Offset) & ~(LShiftU64 (~0U= LL, Parser[Index].Length)); =20 if (Trace) { // if there is a Formatter function let the function handle diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Fadt/Fadt= Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Fadt/FadtPa= rser.c index f8fbb4bcb8e9..abc58d65520e 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Fadt/FadtParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Fadt/FadtParser.c @@ -2,6 +2,7 @@ FADT table parser =20 Copyright (c) 2016 - 2020, ARM Limited. All rights reserved. + Copyright (c) 2022, AMD Incorporated. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent =20 @par Reference(s): @@ -130,69 +131,125 @@ ValidateFlags ( #endif } =20 +STATIC CONST ACPI_PARSER FadtFlagParser[] =3D { + { L"WBINVD", 1, 0, L"%d", NULL, NULL, NU= LL, NULL }, + { L"WBINVD_FLUSH", 1, 1, L"%d", NULL, NULL, NU= LL, NULL }, + { L"PROC_C1", 1, 2, L"%d", NULL, NULL, NU= LL, NULL }, + { L"P_LVL2_UP", 1, 3, L"%d", NULL, NULL, NU= LL, NULL }, + { L"PWR_BUTTON", 1, 4, L"%d", NULL, NULL, NU= LL, NULL }, + { L"SLP_BUTTON", 1, 5, L"%d", NULL, NULL, NU= LL, NULL }, + { L"FIX_RTC", 1, 6, L"%d", NULL, NULL, NU= LL, NULL }, + { L"RTC_S4", 1, 7, L"%d", NULL, NULL, NU= LL, NULL }, + { L"TMR_VAL_EXT", 1, 8, L"%d", NULL, NULL, NU= LL, NULL }, + { L"DCK_CAP", 1, 9, L"%d", NULL, NULL, NU= LL, NULL }, + { L"RESET_REG_SUP", 1, 10, L"%d", NULL, NULL, NU= LL, NULL }, + { L"SEALED_CASE", 1, 11, L"%d", NULL, NULL, NU= LL, NULL }, + { L"HEADLESS", 1, 12, L"%d", NULL, NULL, NU= LL, NULL }, + { L"CPU_SW_SLP", 1, 13, L"%d", NULL, NULL, NU= LL, NULL }, + { L"PCI_EXP_WAK", 1, 14, L"%d", NULL, NULL, NU= LL, NULL }, + { L"USE_PLATFORM_CLOCK", 1, 15, L"%d", NULL, NULL, NU= LL, NULL }, + { L"S4_RTC_STS_VALID", 1, 16, L"%d", NULL, NULL, NU= LL, NULL }, + { L"REMOTE_POWER_ON_CAPABLE", 1, 17, L"%d", NULL, NULL, NU= LL, NULL }, + { L"FORCE_APIC_CLUSTER_MODEL", 1, 18, L"%d", NULL, NULL, NU= LL, NULL }, + { L"FORCE_APIC_PHYSICAL_DESTINATION_MODE", 1, 19, L"%d", NULL, NULL, NU= LL, NULL }, + { L"HW_REDUCED_ACPI", 1, 20, L"%d", NULL, NULL, NU= LL, NULL }, + { L"LOW_POWER_S0_IDLE_CAPABLE", 1, 21, L"%d", NULL, NULL, NU= LL, NULL }, + { L"Reserved", 10, 22, L"%d", NULL, NULL, NU= LL, NULL } +}; + +/** + This function traces FADT Flags fields. + If no format string is specified the Format must be NULL. + + @param [in] Format Optional format string for tracing the data. + @param [in] Ptr Pointer to the start of the buffer. +**/ +VOID +EFIAPI +DumpFadtFlags ( + IN CONST CHAR16 *Format OPTIONAL, + IN UINT8 *Ptr + ) +{ + if (Format !=3D NULL) { + Print (Format, *(UINT32 *)Ptr); + return; + } + + Print (L"0x%X\n", *(UINT32 *)Ptr); + ParseAcpiBitFields ( + TRUE, + 2, + NULL, + Ptr, + 4, + PARSER_PARAMS (FadtFlagParser) + ); +} + /** 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, (VOID **)&= FirmwareCtrl, + { L"FIRMWARE_CTRL", 4, 36, L"0x%x", NULL, (VOI= D **)&FirmwareCtrl, ValidateFirmwareCtrl, NULL }, - { L"DSDT", 4, 40, L"0x%x", NULL, (VOID **)&= DsdtAddress, NULL, NULL }, - { L"Reserved", 1, 44, L"%x", NULL, NULL, = NULL, NULL }, - { L"Preferred_PM_Profile", 1, 45, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"SCI_INT", 2, 46, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"SMI_CMD", 4, 48, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"ACPI_ENABLE", 1, 52, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"ACPI_DISABLE", 1, 53, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"S4BIOS_REQ", 1, 54, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"PSTATE_CNT", 1, 55, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"PM1a_EVT_BLK", 4, 56, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"PM1b_EVT_BLK", 4, 60, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"PM1a_CNT_BLK", 4, 64, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"PM1b_CNT_BLK", 4, 68, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"PM2_CNT_BLK", 4, 72, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"PM_TMR_BLK", 4, 76, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"GPE0_BLK", 4, 80, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"GPE1_BLK", 4, 84, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"PM1_EVT_LEN", 1, 88, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"PM1_CNT_LEN", 1, 89, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"PM2_CNT_LEN", 1, 90, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"PM_TMR_LEN", 1, 91, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"GPE0_BLK_LEN", 1, 92, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"GPE1_BLK_LEN", 1, 93, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"GPE1_BASE", 1, 94, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"CST_CNT", 1, 95, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"P_LVL2_LAT", 2, 96, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"P_LVL3_LAT", 2, 98, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"FLUSH_SIZE", 2, 100, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"FLUSH_STRIDE", 2, 102, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"DUTY_OFFSET", 1, 104, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"DUTY_WIDTH", 1, 105, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"DAY_ALRM", 1, 106, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"MON_ALRM", 1, 107, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"CENTURY", 1, 108, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"IAPC_BOOT_ARCH", 2, 109, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"Reserved", 1, 111, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"Flags", 4, 112, L"0x%x", NULL, (VOID **)&= Flags, ValidateFlags, NULL }, - { L"RESET_REG", 12, 116, NULL, DumpGas, NULL, = NULL, NULL }, - { L"RESET_VALUE", 1, 128, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"ARM_BOOT_ARCH", 2, 129, L"0x%x", NULL, NULL, = NULL, NULL }, - { L"FADT Minor Version", 1, 131, L"0x%x", NULL, (VOID **)&= FadtMinorRevision, + { L"DSDT", 4, 40, L"0x%x", NULL, (VOI= D **)&DsdtAddress, NULL, NULL }, + { L"Reserved", 1, 44, L"%x", NULL, NULL= , NULL, NULL }, + { L"Preferred_PM_Profile", 1, 45, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"SCI_INT", 2, 46, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"SMI_CMD", 4, 48, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"ACPI_ENABLE", 1, 52, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"ACPI_DISABLE", 1, 53, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"S4BIOS_REQ", 1, 54, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"PSTATE_CNT", 1, 55, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"PM1a_EVT_BLK", 4, 56, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"PM1b_EVT_BLK", 4, 60, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"PM1a_CNT_BLK", 4, 64, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"PM1b_CNT_BLK", 4, 68, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"PM2_CNT_BLK", 4, 72, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"PM_TMR_BLK", 4, 76, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"GPE0_BLK", 4, 80, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"GPE1_BLK", 4, 84, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"PM1_EVT_LEN", 1, 88, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"PM1_CNT_LEN", 1, 89, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"PM2_CNT_LEN", 1, 90, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"PM_TMR_LEN", 1, 91, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"GPE0_BLK_LEN", 1, 92, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"GPE1_BLK_LEN", 1, 93, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"GPE1_BASE", 1, 94, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"CST_CNT", 1, 95, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"P_LVL2_LAT", 2, 96, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"P_LVL3_LAT", 2, 98, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"FLUSH_SIZE", 2, 100, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"FLUSH_STRIDE", 2, 102, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"DUTY_OFFSET", 1, 104, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"DUTY_WIDTH", 1, 105, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"DAY_ALRM", 1, 106, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"MON_ALRM", 1, 107, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"CENTURY", 1, 108, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"IAPC_BOOT_ARCH", 2, 109, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"Reserved", 1, 111, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"Flags", 4, 112, NULL, DumpFadtFlags, (VOI= D **)&Flags, ValidateFlags, NULL }, + { L"RESET_REG", 12, 116, NULL, DumpGas, NULL= , NULL, NULL }, + { L"RESET_VALUE", 1, 128, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"ARM_BOOT_ARCH", 2, 129, L"0x%x", NULL, NULL= , NULL, NULL }, + { L"FADT Minor Version", 1, 131, L"0x%x", NULL, (VOI= D **)&FadtMinorRevision, NULL, NULL }, - { L"X_FIRMWARE_CTRL", 8, 132, L"0x%lx", NULL, (VOID **)&= X_FirmwareCtrl, + { L"X_FIRMWARE_CTRL", 8, 132, L"0x%lx", NULL, (VOI= D **)&X_FirmwareCtrl, ValidateXFirmwareCtrl, NULL }, - { L"X_DSDT", 8, 140, L"0x%lx", NULL, (VOID **)&= X_DsdtAddress, NULL, NULL }, - { L"X_PM1a_EVT_BLK", 12, 148, NULL, DumpGas, NULL, = NULL, NULL }, - { L"X_PM1b_EVT_BLK", 12, 160, NULL, DumpGas, NULL, = NULL, NULL }, - { L"X_PM1a_CNT_BLK", 12, 172, NULL, DumpGas, NULL, = NULL, NULL }, - { L"X_PM1b_CNT_BLK", 12, 184, NULL, DumpGas, NULL, = NULL, NULL }, - { L"X_PM2_CNT_BLK", 12, 196, NULL, DumpGas, NULL, = NULL, NULL }, - { L"X_PM_TMR_BLK", 12, 208, NULL, DumpGas, NULL, = NULL, NULL }, - { L"X_GPE0_BLK", 12, 220, NULL, DumpGas, NULL, = NULL, NULL }, - { L"X_GPE1_BLK", 12, 232, NULL, DumpGas, NULL, = NULL, NULL }, - { 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 } + { L"X_DSDT", 8, 140, L"0x%lx", NULL, (VOI= D **)&X_DsdtAddress, NULL, NULL }, + { L"X_PM1a_EVT_BLK", 12, 148, NULL, DumpGas, NULL= , NULL, NULL }, + { L"X_PM1b_EVT_BLK", 12, 160, NULL, DumpGas, NULL= , NULL, NULL }, + { L"X_PM1a_CNT_BLK", 12, 172, NULL, DumpGas, NULL= , NULL, NULL }, + { L"X_PM1b_CNT_BLK", 12, 184, NULL, DumpGas, NULL= , NULL, NULL }, + { L"X_PM2_CNT_BLK", 12, 196, NULL, DumpGas, NULL= , NULL, NULL }, + { L"X_PM_TMR_BLK", 12, 208, NULL, DumpGas, NULL= , NULL, NULL }, + { L"X_GPE0_BLK", 12, 220, NULL, DumpGas, NULL= , NULL, NULL }, + { L"X_GPE1_BLK", 12, 232, NULL, DumpGas, NULL= , NULL, NULL }, + { 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 /** --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#87743): https://edk2.groups.io/g/devel/message/87743 Mute This Topic: https://groups.io/mt/89867228/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-