From nobody Tue Feb 10 07:42:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+44107+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1563781845139119.00810255946294; Mon, 22 Jul 2019 00:50:45 -0700 (PDT) Return-Path: X-Received: from EUR02-HE1-obe.outbound.protection.outlook.com (EUR02-HE1-obe.outbound.protection.outlook.com [40.107.1.77]) by groups.io with SMTP; Mon, 22 Jul 2019 00:50:43 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Lm+cN0YzS9eawyC2ZO5BTp2aE3LeAxuUTejSc0rD7AvvtsOX7nWFtAlEw+PlrZCPo+ENoVoE8rFn90+kS4Rt+w63qmTMukPhbldYOQx5yP31Xjj7HoapTgBfd5IHJ/Kdh6JGsRr4d6e1rxAe/hyM86UiFyizO/6fdLEzb4gpC3UJwAnlI8y3LISBALzhmPQFUjRIRlUUDlXalT94jECurmvVKXv309vJb1+vua+m/fZnuLo6nMJk3pmCqqmsd8omBjDyZy0VOytsAVICG5NTA/c1+H3W+rrYm0jzNgdE3htDkP+Y8twwcsT29X/igpM2eb2YSjqZnR8PkfcAq/9CDQ== 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-SenderADCheck; bh=ns2I0PA7Uwg13DOfaLj1Ve4iscBni/oqc8auQASW5Ak=; b=dcwaZeciRzl40/E6+wCbDQKwz29TseGhQKGw9/uNQLGhSiG7SF1H21HmvM00e58VVoUREYeFXd7KClLQvee4lrnySs39b88dmtkaIA6Wfp6drsn+1uf2hLxzqM8X2Tb6rj/E7QgT8RkGL9QYpSk4UkgUPv7di5Obeinyl3vJbNDdl8Gus2EZcnXNHOlHng3VLHU5hIlRr4HCeRI8C2ft8GDQ8zikW+9EmDMkapxifJ8Zx9Ph8X9l2Gv/xlsDL2QuQZ0p5TE9ovGyT3/aHG5W+JSYd/mBmLmCK+hxh6Hh5iBm/JMNMpwv/9xfvngX5p39tm/lBPC6c6OPIcPJAwopFQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=temperror (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com;dmarc=temperror action=none header.from=arm.com;dkim=none (message not signed);arc=none X-Received: from AM4PR08CA0068.eurprd08.prod.outlook.com (2603:10a6:205:2::39) by DB8PR08MB4953.eurprd08.prod.outlook.com (2603:10a6:10:ef::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2094.17; Mon, 22 Jul 2019 07:50:38 +0000 X-Received: from AM5EUR03FT020.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::208) by AM4PR08CA0068.outlook.office365.com (2603:10a6:205:2::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2094.14 via Frontend Transport; Mon, 22 Jul 2019 07:50:38 +0000 Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+44107+1787277+3901457@groups.io; helo=web01.groups.io; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) X-Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT020.mail.protection.outlook.com (10.152.16.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2052.18 via Frontend Transport; Mon, 22 Jul 2019 07:50:37 +0000 X-Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1415.2; Mon, 22 Jul 2019 07:50:36 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1415.2; Mon, 22 Jul 2019 07:50:36 +0000 X-Received: from E119924.Arm.com (10.1.199.124) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Mon, 22 Jul 2019 07:50:35 +0000 From: "Krzysztof Koch" To: CC: , , , , , Subject: [edk2-devel] [PATCH v2 2/6] ShellPkg: acpiview: XSDT: Remove redundant ParseAcpi() call Date: Mon, 22 Jul 2019 08:50:22 +0100 Message-ID: <20190722075026.20244-3-krzysztof.koch@arm.com> In-Reply-To: <20190722075026.20244-1-krzysztof.koch@arm.com> References: <20190722075026.20244-1-krzysztof.koch@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 98b4e73c-1e23-45a1-8eca-08d70e794907 X-MS-TrafficTypeDiagnostic: DB8PR08MB4953: X-Microsoft-Antispam-PRVS: NoDisclaimer: True X-MS-Oob-TLC-OOBClassifiers: OLM:4941; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: GGVMXdLUAIkrb/gbbRAF5lh8pYs5GTN1RrtKiQtmihzcsxXlefB8tQWtZnqV6oNFzO4Ect8GekVZR82vXfg4pZsdm4GIR7BvG4I76oA29CIQsbHouEB79yCJWIHoVC3QHpxiJg88KO0iUoQrxq85HO2D1NUhv+Uvp51ne6GPE6rOWAluYUPWVI9OZ5gveew+cn4Abu0smGvxxg+HYM5KitUGEJvPnJEl8cgWTmMZoWeOHGx2xw7+/hKBjUeN/WCSunx7Sz+J8eTi8BtZtBF8aLb1bOz1yeGF2OXLPVGiUnIhDhNP5UDCrjW+xLtBrfNFb0x49t73RE+aZCtCqGATpV2u3itgpZZxxSAaGQ5VRc5/SQt0eQWZgnYT5Gc07EEazeUVXhhB49DuhdlZVWWqww9Z7din8lq8HeE3l2HNeVY= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jul 2019 07:50:37.4147 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 98b4e73c-1e23-45a1-8eca-08d70e794907 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[40.67.248.234];Helo=[nebula.arm.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB4953 Precedence: Bulk List-Unsubscribe: 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,krzysztof.koch@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1563781844; bh=bhB/e3CPLZertZVvQOGYDUqtQ7uihx5G/rszhv8JV6k=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=PDoWlOycuBJDDY7XVPHZivculmLwuYZQ11cGuhm+AQbG9MGDtDkk6zHT0D70FeCayWS GUnZxwNW5WghpJcAeshzqzShu9Ex2osGP3S2JyNxQsNY6ZCeetjN0SPP17noyZNWDc5+g hPM+TY7iid42EP6Cq8EsFUbwGVyIgqN+bHI= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Remove a call to ParseAcpi() responsible for getting the XSDT table length. This call is not needed because the ACPI table buffer length is provided as an input argument to the ParseAcpiXsdt() function. Modify remaining code to use the AcpiTableLength argument of the ParseAcpiXsdt() function instead of a global static variable. Signed-off-by: Krzysztof Koch --- Notes: v1: - remove redundant ParseAcpi() call [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtParser.c | 1= 8 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/Xsdt= Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtPa= rser.c index 4196168bff47d70c67f79f3fc1f4cdee302d460e..e39061f8e2612f2cce4aebf51a5= 11b63b703662b 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtParser.c @@ -1,7 +1,7 @@ /** @file XSDT table parser =20 - Copyright (c) 2016 - 2018, ARM Limited. All rights reserved. + Copyright (c) 2016 - 2019, ARM Limited. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent =20 @par Reference(s): @@ -60,22 +60,12 @@ ParseAcpiXsdt ( UINTN EntryIndex; CHAR16 Buffer[32]; =20 - // Parse the ACPI header to get the length - ParseAcpi ( - FALSE, - 0, - "XSDT", - Ptr, - ACPI_DESCRIPTION_HEADER_LENGTH, - PARSER_PARAMS (XsdtParser) - ); - Offset =3D ParseAcpi ( Trace, 0, "XSDT", Ptr, - *AcpiHdrInfo.Length, + AcpiTableLength, PARSER_PARAMS (XsdtParser) ); =20 @@ -84,7 +74,7 @@ ParseAcpiXsdt ( if (Trace) { EntryIndex =3D 0; TablePointer =3D (UINT64*)(Ptr + TableOffset); - while (Offset < (*AcpiHdrInfo.Length)) { + while (Offset < AcpiTableLength) { CONST UINT32* Signature; CONST UINT32* Length; CONST UINT8* Revision; @@ -140,7 +130,7 @@ ParseAcpiXsdt ( // Process the tables Offset =3D TableOffset; TablePointer =3D (UINT64*)(Ptr + TableOffset); - while (Offset < (*AcpiHdrInfo.Length)) { + while (Offset < AcpiTableLength) { if ((UINT64*)(UINTN)(*TablePointer) !=3D NULL) { ProcessAcpiTable ((UINT8*)(UINTN)(*TablePointer)); } -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=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 (#44107): https://edk2.groups.io/g/devel/message/44107 Mute This Topic: https://groups.io/mt/32556316/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-