From nobody Tue May 7 11:53:29 2024 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+46262+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 1566557817261878.3284291269331; Fri, 23 Aug 2019 03:56:57 -0700 (PDT) Return-Path: X-Received: from EUR03-AM5-obe.outbound.protection.outlook.com (EUR03-AM5-obe.outbound.protection.outlook.com [40.107.3.70]) by groups.io with SMTP; Fri, 23 Aug 2019 03:56:56 -0700 X-Received: from VI1PR08CA0221.eurprd08.prod.outlook.com (2603:10a6:802:15::30) by DB8PR08MB4954.eurprd08.prod.outlook.com (2603:10a6:10:bf::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2157.18; Fri, 23 Aug 2019 10:56:51 +0000 X-Received: from AM5EUR03FT005.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::203) by VI1PR08CA0221.outlook.office365.com (2603:10a6:802:15::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.14 via Frontend Transport; Fri, 23 Aug 2019 10:56:50 +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+46262+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 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT005.mail.protection.outlook.com (10.152.16.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:56:49 +0000 X-Received: ("Tessian outbound 0c23f37acac0:v27"); Fri, 23 Aug 2019 10:56:49 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 1424e97548c786a4 X-CR-MTA-TID: 64aa7808 X-Received: from f66e95a3c5a8.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.10.53]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id C0F66FD1-57AB-4571-9495-174EF30A6CA2.1; Fri, 23 Aug 2019 10:56:44 +0000 X-Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-db5eur03lp2053.outbound.protection.outlook.com [104.47.10.53]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id f66e95a3c5a8.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 23 Aug 2019 10:56:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YE16/q2o1b5urbFRTZ4kcYi1Am4foBoRqTYxzsQz+sbzOIKbFhmNBx+ohrh60EfLkrvZqEd3/omzuIhxEOLOy3FFIxufBCbCBQMyBFAe57DMZ+Au7kUMp1GbuS1Cqes5GrDjU6j2PNJQIJQkxEsGakfHom0RV4s3FfWslBFlJF8D/omrjiM/JCuu5xd3s/lSO+d/EfRFG/tmw3ZU5wtkdLRasGqj06jGj8Pc5UV7pmeWCT9K+urMj1PkVoxR8OZm33AKh7m5oNbwrdWa9n66gJAJoB2AqhMyZHk4TY2p2HRvi7joAsoQgCHdAMkvFtNoNlFaoudnd3s/KYln8+T3oA== 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=1q4Y3JmhPf9VHJdwySrqgJaRvxcPxZYO8Rf8wPA0YVg=; b=U7kFeSKsruMo1PH//XdGL5KgFJ0gD/Ig/noARGch3uRovs7bKo4xbnRgvGrR6/6gfVPb80Vyb9pfR+MFVCsjPTwNR32Swb6ddTJTWqqaRyPsXEXQ5l4hI7XxQCZOhInVBW+SeMKvKpQaxcoBd77oMaBYCVy8BTyZdDGnc2krl/OgKSlwl93u+M4Br5oRZm9a+kaFxKy73W/mCxh0xsXahLegwZxmWjx3n6MSUKUCGHKW9sRAv/JLNiu9eSxX1NCGMiztVWhOFEA2GzpRSSgqnZ2OgGR0wtwnLDEyDZhxAM5nTAYPEnojv568RwMUp9RS04h1Q6jU1Lzoa9UmmbAdRA== 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 AM6PR08CA0020.eurprd08.prod.outlook.com (2603:10a6:20b:b2::32) by VI1PR0802MB2606.eurprd08.prod.outlook.com (2603:10a6:800:bb::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.16; Fri, 23 Aug 2019 10:56:41 +0000 X-Received: from AM5EUR03FT044.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::204) by AM6PR08CA0020.outlook.office365.com (2603:10a6:20b:b2::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.14 via Frontend Transport; Fri, 23 Aug 2019 10:56:41 +0000 Authentication-Results-Original: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; 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 AM5EUR03FT044.mail.protection.outlook.com (10.152.17.56) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:56:39 +0000 X-Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1415.2; Fri, 23 Aug 2019 10:56:25 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) 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; Fri, 23 Aug 2019 10:56:09 +0000 X-Received: from E107187.Arm.com (10.1.195.55) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Fri, 23 Aug 2019 10:56:09 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , Subject: [edk2-devel] [PATCH v1 01/19] DynamicTablesPkg: Fix entry point param definition Date: Fri, 23 Aug 2019 11:55:21 +0100 Message-ID: <20190823105539.13260-2-sami.mujawar@arm.com> In-Reply-To: <20190823105539.13260-1-sami.mujawar@arm.com> References: <20190823105539.13260-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;IPV:NLI;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(136003)(396003)(376002)(39860400002)(346002)(2980300002)(189003)(199004)(14444005)(19627235002)(7696005)(50466002)(30864003)(48376002)(478600001)(1076003)(70586007)(44832011)(486006)(126002)(476003)(26005)(316002)(16586007)(5660300002)(54906003)(6666004)(356004)(70206006)(186003)(86362001)(76176011)(51416003)(36756003)(4326008)(2351001)(53416004)(53936002)(50226002)(81166006)(8936002)(8676002)(81156014)(2616005)(2906002)(336012)(63370400001)(63350400001)(426003)(11346002)(446003)(305945005)(47776003)(6916009);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0802MB2606;H:nebula.arm.com;FPR:;SPF:TempError;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a5ae1018-7ba1-4a75-e925-08d727b89976 X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(2017052603328);SRVR:VI1PR0802MB2606; X-MS-TrafficTypeDiagnostic: VI1PR0802MB2606:|DB8PR08MB4954: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true X-MS-Oob-TLC-OOBClassifiers: OLM:4941;OLM:4941; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: Bl3WwmY0hyH3RyUm9FLt6eGtH+n6O4mk+Oqw+DkVYkxCMiryV4CtVe0KhEVgukExwWYE3ueGAf4heOVhWaZRLFwuhNJAP9mcjY89i2T29kD6QhV5uqBtQkXG3uxVKPEbFr1l7vcZgINAf/fMYAxRYJHkl2ha4MjFRzSyHpNCsfhIgzgARGBm8nfo3S8npDq+YUSE8f8jaNsYSOgfGfxfWhko10KSep06DIDe+2E+CZsnfHV4cAoYrSW0h9R2me8PUA9fBg5k0Np4ogtrSeurE+ds0qVvDQ1EYJ2TsuUSrpFAHDldywaqux/ksc2uMTIp6y0dhnoVV1eZ3/QbVYn8NMKYta1m+1uWCX9AfoTvAPB7+3Or63Ta/ZQs4LuZ0CYWLpSWoCadth/Mud7oQC7hHILMUTkJ2VfG13z7Racs100= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2606 Original-Authentication-Results: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT005.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: bfe9bb91-ba0d-44f7-fe33-08d727b8936a NoDisclaimer: True X-Microsoft-Antispam-Message-Info: PwycrIscSPLyC1aerRM2WxjKdA9FnvrxzkJjnSblWAgz2l7L8Gv0aoIaQfRi3aYWi2dUDKfK93v35aA0cpC8cPXP+1tYuJL1TWRMG2VX/34LAqh+azc7Sx3/r1nZzJgi8Z1ui/TqeHbTqpgBkhenjrnrIwZ/xC/U5cQKFGBcSah9ggDflyNRQRbBrqJhCOncgXj3tQ25DSUYyqYP0MH0CQu4V1LIVkUx1no4ulpHOy5T94OQuZnuLzPxbEDV4/u4kGpDRQjY82jXDb/AupwjvgR06RhOYxlvD8ihZfu59zFctvjGD5SVebfKzTR9k1mTPKTn/T66t+9Tw39c7q0BZ46b8JdpL+ElwRgIJo1YZq4MdHMvJnfhwZqxsHXWzTMT5mUWfCIQXKDZjRmD0MXp/NLRjI4vs5ZZ/Fd5bZrwnn0= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2019 10:56:49.7456 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a5ae1018-7ba1-4a75-e925-08d727b89976 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB4954 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,sami.mujawar@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1566557816; bh=mQzEYYtzp6rRt6A6EqBgcL3u1F9LA/WpeQvEgzU1SZI=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=T00bfOg1kwntz9HP8rBpALyTfrtnK0Q5NnAPC+hJk9cS8tMvjV8ak/3pqijPDCDn8Zb /5HS/2yV2e8e03bm6mIlz79tBarkHIG5MihKfQRZ02H0pqrgTB28fWwW6hsvba4iQrCrx +9Smmjp6ZpWrnMYdeTJPmAn/kWAdGG///rU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" VS2017 reports 'warning C4028: formal parameter 2 different from declaration' for the library constructor and destructor interfaces for the Generator modules. VS2017 compiler also reports similar warnings for the DXE entry points. Remove the CONST qualifier for the SystemTable pointer (the second parameter to the constructor/destructor/DXE Entry point) to make it compatible with the formal declaration. Signed-off-by: Sami Mujawar Reviewed-by: Alexei Fedorov --- DynamicTablesPkg/Drivers/DynamicTableFactoryDxe/DynamicTableFactoryDxe.c |= 6 +++--- DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe.c |= 4 ++-- DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c |= 8 ++++---- DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c |= 8 ++++---- DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c |= 8 ++++---- DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c |= 8 ++++---- DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c |= 8 ++++---- DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/McfgGenerator.c |= 8 ++++---- DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c |= 8 ++++---- DynamicTablesPkg/Library/Acpi/Arm/AcpiRawLibArm/RawGenerator.c |= 8 ++++---- DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c |= 8 ++++---- 11 files changed, 41 insertions(+), 41 deletions(-) diff --git a/DynamicTablesPkg/Drivers/DynamicTableFactoryDxe/DynamicTableFa= ctoryDxe.c b/DynamicTablesPkg/Drivers/DynamicTableFactoryDxe/DynamicTableFa= ctoryDxe.c index d87ea7809eae09cdb5ff06290cff8c2d7e7fa904..d1432348f05143bed8588cea54d= 7b9b6722b9b6d 100644 --- a/DynamicTablesPkg/Drivers/DynamicTableFactoryDxe/DynamicTableFactoryDx= e.c +++ b/DynamicTablesPkg/Drivers/DynamicTableFactoryDxe/DynamicTableFactoryDx= e.c @@ -1,7 +1,7 @@ /** @file Dynamic Table Factory Dxe =20 - Copyright (c) 2017 - 2018, ARM Limited. All rights reserved. + Copyright (c) 2017 - 2019, ARM Limited. All rights reserved. =20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -60,8 +60,8 @@ EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL DynamicTableFactoryP= rotocol =3D { EFI_STATUS EFIAPI DynamicTableFactoryDxeInitialize ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE * CONST SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE * SystemTable ) { EFI_STATUS Status; diff --git a/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableMa= nagerDxe.c b/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableMa= nagerDxe.c index 39b75996d9922d2daf953bb28809aa285f7d214c..e27dcaf37470d811c4d6218d4f4= 0d2260f550c02 100644 --- a/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDx= e.c +++ b/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDx= e.c @@ -655,8 +655,8 @@ ProcessAcpiTables ( EFI_STATUS EFIAPI DynamicTableManagerDxeInitialize ( - IN CONST EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE * CONST SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE * SystemTable ) { EFI_STATUS Status; diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c index 0b45e15d2d1c2c1e35e801ca719d68d9ff88a65e..346ab5b22f5402bf87c385558f6= 8f080d1b454ed 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c @@ -418,8 +418,8 @@ ACPI_TABLE_GENERATOR Dbg2Generator =3D { EFI_STATUS EFIAPI AcpiDbg2LibConstructor ( - IN CONST EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE * CONST SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE * SystemTable ) { EFI_STATUS Status; @@ -442,8 +442,8 @@ AcpiDbg2LibConstructor ( EFI_STATUS EFIAPI AcpiDbg2LibDestructor ( - IN CONST EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE * CONST SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE * SystemTable ) { EFI_STATUS Status; diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c index e9e4991dc127abb97f859436df0c4ceafdb3f5ec..6cb60e898f697ce4347ad3adeb5= bca1cc1f30a0c 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c @@ -648,8 +648,8 @@ ACPI_TABLE_GENERATOR FadtGenerator =3D { EFI_STATUS EFIAPI AcpiFadtLibConstructor ( - IN CONST EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE * CONST SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE * SystemTable ) { EFI_STATUS Status; @@ -671,8 +671,8 @@ AcpiFadtLibConstructor ( EFI_STATUS EFIAPI AcpiFadtLibDestructor ( - IN CONST EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE * CONST SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE * SystemTable ) { EFI_STATUS Status; diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c index a30870806d7f223fde7311e3609cca92f47731cc..7e86c30649bd36ecebac75c7e3a= 86a0c25cd590b 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c @@ -738,8 +738,8 @@ ACPI_TABLE_GENERATOR GtdtGenerator =3D { EFI_STATUS EFIAPI AcpiGtdtLibConstructor ( - IN CONST EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE * CONST SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE * SystemTable ) { EFI_STATUS Status; @@ -761,8 +761,8 @@ AcpiGtdtLibConstructor ( EFI_STATUS EFIAPI AcpiGtdtLibDestructor ( - IN CONST EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE * CONST SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE * SystemTable ) { EFI_STATUS Status; diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c index 05e360c899c7563aed04c071921865929524fdc4..f303e9f29cc700634d236c08505= cab91b9d62cb8 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c @@ -2040,8 +2040,8 @@ ACPI_IORT_GENERATOR IortGenerator =3D { EFI_STATUS EFIAPI AcpiIortLibConstructor ( - IN CONST EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE * CONST SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE * SystemTable ) { EFI_STATUS Status; @@ -2063,8 +2063,8 @@ AcpiIortLibConstructor ( EFI_STATUS EFIAPI AcpiIortLibDestructor ( - IN CONST EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE * CONST SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE * SystemTable ) { EFI_STATUS Status; diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c index dc5238078376746847e7ae14258bbe35ca07ca2c..2651ca15414694c494678bcec65= 5fc882ee2cc0c 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c @@ -795,8 +795,8 @@ ACPI_TABLE_GENERATOR MadtGenerator =3D { EFI_STATUS EFIAPI AcpiMadtLibConstructor ( - IN CONST EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE * CONST SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE * SystemTable ) { EFI_STATUS Status; @@ -818,8 +818,8 @@ AcpiMadtLibConstructor ( EFI_STATUS EFIAPI AcpiMadtLibDestructor ( - IN CONST EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE * CONST SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE * SystemTable ) { EFI_STATUS Status; diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/McfgGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/McfgGenerator.c index d219e2f04ad6602b8157b048ae840a3094492680..1293ac8e43c8e0ed641b20ba425= 19172bc541b54 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/McfgGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/McfgGenerator.c @@ -329,8 +329,8 @@ ACPI_TABLE_GENERATOR McfgGenerator =3D { EFI_STATUS EFIAPI AcpiMcfgLibConstructor ( - IN CONST EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE * CONST SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE * SystemTable ) { EFI_STATUS Status; @@ -352,8 +352,8 @@ AcpiMcfgLibConstructor ( EFI_STATUS EFIAPI AcpiMcfgLibDestructor ( - IN CONST EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE * CONST SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE * SystemTable ) { EFI_STATUS Status; diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c index c8713dec625cc18b0806659ffcdc3d9e70411e11..9e42eee9b75bb330833b0f56c98= 947563d9eb821 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c @@ -1492,8 +1492,8 @@ ACPI_PPTT_GENERATOR PpttGenerator =3D { EFI_STATUS EFIAPI AcpiPpttLibConstructor ( - IN CONST EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE * CONST SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE * SystemTable ) { EFI_STATUS Status; @@ -1516,8 +1516,8 @@ AcpiPpttLibConstructor ( EFI_STATUS EFIAPI AcpiPpttLibDestructor ( - IN CONST EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE * CONST SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE * SystemTable ) { EFI_STATUS Status; diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiRawLibArm/RawGenerator.c= b/DynamicTablesPkg/Library/Acpi/Arm/AcpiRawLibArm/RawGenerator.c index 544ea06f0bcb3442b78cf6409846f70ae5360664..2facfaa048115575829c9787084= 876efbe60834a 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiRawLibArm/RawGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiRawLibArm/RawGenerator.c @@ -109,8 +109,8 @@ ACPI_TABLE_GENERATOR RawGenerator =3D { EFI_STATUS EFIAPI AcpiRawLibConstructor ( - IN CONST EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE * CONST SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE * SystemTable ) { EFI_STATUS Status; @@ -132,8 +132,8 @@ AcpiRawLibConstructor ( EFI_STATUS EFIAPI AcpiRawLibDestructor ( - IN CONST EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE * CONST SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE * SystemTable ) { EFI_STATUS Status; diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c index 7b70ba2c2c55a9a15a569680d1a57b359db4e73d..1404279f828d5c06bb7605cb2fe= 6d864ef7a080e 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c @@ -308,8 +308,8 @@ ACPI_TABLE_GENERATOR SpcrGenerator =3D { EFI_STATUS EFIAPI AcpiSpcrLibConstructor ( - IN CONST EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE * CONST SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE * SystemTable ) { EFI_STATUS Status; @@ -331,8 +331,8 @@ AcpiSpcrLibConstructor ( EFI_STATUS EFIAPI AcpiSpcrLibDestructor ( - IN CONST EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE * CONST SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE * SystemTable ) { EFI_STATUS Status; --=20 '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 (#46262): https://edk2.groups.io/g/devel/message/46262 Mute This Topic: https://groups.io/mt/32999778/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 Tue May 7 11:53:29 2024 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+46270+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 1566557851951719.0876218059425; Fri, 23 Aug 2019 03:57:31 -0700 (PDT) Return-Path: X-Received: from EUR04-HE1-obe.outbound.protection.outlook.com (EUR04-HE1-obe.outbound.protection.outlook.com [40.107.7.75]) by groups.io with SMTP; Fri, 23 Aug 2019 03:57:30 -0700 X-Received: from VE1PR08CA0036.eurprd08.prod.outlook.com (2603:10a6:803:104::49) by DB8PR08MB4955.eurprd08.prod.outlook.com (2603:10a6:10:38::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.20; Fri, 23 Aug 2019 10:57:26 +0000 X-Received: from DB5EUR03FT005.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::203) by VE1PR08CA0036.outlook.office365.com (2603:10a6:803:104::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.15 via Frontend Transport; Fri, 23 Aug 2019 10:57:25 +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+46270+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 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT005.mail.protection.outlook.com (10.152.20.122) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:57:24 +0000 X-Received: ("Tessian outbound df6366865adf:v27"); Fri, 23 Aug 2019 10:57:24 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: c109248d517f61ad X-CR-MTA-TID: 64aa7808 X-Received: from 424fa8afdbb5.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.13.50]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id 41D65D24-79BB-4917-B79E-942AE4677A56.1; Fri, 23 Aug 2019 10:57:24 +0000 X-Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04lp2050.outbound.protection.outlook.com [104.47.13.50]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 424fa8afdbb5.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 23 Aug 2019 10:57:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V1XuumozV6dkhnU0SVevt0tyyQRwHlrIA8DVokjnDpcJ0poif2PSFXLJGcvz1zOBN/ZdwS1AuDPqzW+UKfJnR9f0/BqODLFIoyfmNHQ40wB4P87rbL6tVK+BV/aRcs8oC0HNzeaM66c4qlsOp1TMj/hUL4d64sxuptAV0P5yZSRzMETWSuRwBkKH1rV2LC8+QozxbIHYLa5BmqhIDNsAieAhMAb/j5Es4OHBIM64K+0f+Qz65DeX42mB5DHBPHe+7soz1YWxhWT0HuiHyxuSHLJ+7ku0WxfCMpYsHm7P3TcfYHSlFwsSYPPQCjK8OX4fsr5+26c7yKIsNWE7pp0iCQ== 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=McBhOorIghk82URwxRvVAMZaHWwy8RDTEfBMkDBrkX4=; b=KJI0D4Ieg8EWWW4DOSBzKeFga4lSMK+g3LUWJzt+4jj17QdEvkQMY6leF/CDkWVIRT0KiqWv1/xyZzvoCc9MKc1Q+Z2CWl4uErEr/6KC6e1mm9XZUR1jcaMM06IXJrvjWZcvMkH54UzG024mEo8DqDaX+4DMKHy/iL0ki9Zg4eDXQnWqBlfouIIlSVpVAP05isVds8Sa1mJT1UYSU3+z62TMEY5I03zEahqajpiK5MTfpWn9v4d7JYh/jvc3RgIfoC2U0ucTc/0yttLOBAbFxA1M7jEdYQmx28cgg2oWMuOaKAquDmYcUE84sKV2fdScEDFSW+uDrX8UCezrl4KCMw== 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 AM4PR08CA0054.eurprd08.prod.outlook.com (2603:10a6:205:2::25) by DB8PR08MB4955.eurprd08.prod.outlook.com (2603:10a6:10:38::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.20; Fri, 23 Aug 2019 10:57:20 +0000 X-Received: from AM5EUR03FT045.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::209) by AM4PR08CA0054.outlook.office365.com (2603:10a6:205:2::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.14 via Frontend Transport; Fri, 23 Aug 2019 10:57:20 +0000 Authentication-Results-Original: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; 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 AM5EUR03FT045.mail.protection.outlook.com (10.152.17.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:57:18 +0000 X-Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1415.2; Fri, 23 Aug 2019 10:56:25 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) 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; Fri, 23 Aug 2019 10:56:18 +0000 X-Received: from E107187.Arm.com (10.1.195.55) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Fri, 23 Aug 2019 10:56:17 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , Subject: [edk2-devel] [PATCH v1 02/19] DynamicTablesPkg: Fix missing local header warning Date: Fri, 23 Aug 2019 11:55:22 +0100 Message-ID: <20190823105539.13260-3-sami.mujawar@arm.com> In-Reply-To: <20190823105539.13260-1-sami.mujawar@arm.com> References: <20190823105539.13260-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;IPV:NLI;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(39860400002)(376002)(396003)(136003)(346002)(2980300002)(199004)(189003)(356004)(6666004)(486006)(81156014)(81166006)(53416004)(2351001)(476003)(126002)(2616005)(6916009)(44832011)(305945005)(50466002)(8676002)(54906003)(14444005)(16586007)(47776003)(316002)(50226002)(8936002)(36756003)(48376002)(4326008)(51416003)(53936002)(86362001)(478600001)(1076003)(70586007)(70206006)(186003)(336012)(26005)(5660300002)(76176011)(7696005)(63350400001)(446003)(2906002)(426003)(11346002)(63370400001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB8PR08MB4955;H:nebula.arm.com;FPR:;SPF:TempError;LANG:en;PTR:InfoDomainNonexistent;A:1;MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f8f35411-7450-45f0-362c-08d727b8ae23 X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600166)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328);SRVR:DB8PR08MB4955; X-MS-TrafficTypeDiagnostic: DB8PR08MB4955:|DB8PR08MB4955: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true X-MS-Oob-TLC-OOBClassifiers: OLM:6790;OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: r6CJQg789nKXdego2vhfyavBBWKO5OjEOhCRqrNu2tk4BcIPStYjmWQtN92KhDmuS/eURwGwJ5+VesofRNXRba0psG5JYKc2ER4RM2dL0hoLoteeG1FDFpDsZ3iaaTl0Pz4v4j/iQsFseoah5JRWUgfUh+TB85n6j3KWs93fRX4/84RWrC5oOe2jomqku3SSVpR1R5ee8xdpP+bbgLzFf9l0G2Xaznb22YKTPxf9G45AIIYqZINhz7cHdBpObl0CJGWrKc5UdCWRrqp/faH3MwHZz7zdT/Qg20nDEA+vvEx+6L8gICKwxHx0FdiOGzzeoYcXUF+rcd+Jx3HA4ccyMToBuJ5vu/TRiksk4We/3pywmGiKTpEz3K4Ov3XN5sqd2r2eklWKdpuYvG4hroN72u6bDniN69ORHmg+KySzrTM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB4955 Original-Authentication-Results: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT005.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 8092bae2-470d-4437-125f-08d727b8aaa5 NoDisclaimer: True X-Microsoft-Antispam-Message-Info: TTp8V/G+nUznb2xIWE79nw912/8WHcRfpzROc5rmF/jP/dN4rLodxbh3I1QJo2u/3V8h/F06uIJKav0VZBDt3koqVWvpzc4WjDfScZWjqrlHJITNIJdvimTLxLfK/FyAGXBJ8y6EoknT+vxaXuH4Vfvtg3egGFePrCT8UeWMDHn+OVwFtFf8NLpW0QVgxFwuodSPO78dKvPzXw74PIwMW5hYkwdhyKQggJDAoaGArsft8hjJIpvFciHpTzHlmMGsw/oHDPG9bDMPInsxDpCDjN8deYHvhwG8F8AoBf0SP0SGscVzeBeqxYC5Gv5mjpHiXamkqLcsa8jA7t0ef1zEVwnACO/r1+iPRkDyEJ4VjG6Pd8Nt+PkrqHxRyXsCgINJUeqBgU5s0VkpS1bKmHuHMwKytcaLVOWV/Rr6WwvY/y4= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2019 10:57:24.4663 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f8f35411-7450-45f0-362c-08d727b8ae23 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB4955 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,sami.mujawar@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1566557851; bh=MLjG276s8Oajo44WlF+iL29Ct9iWl+WHA35p/7F1cNM=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=NNJNgeH64fGsvb6ZuweqeINlwPRVESMprRw48ogDmbrUxnppmv4MZKdc4O7ky6Z+U/Y gS8WiTgo/UxCpfc2hpJ32H/DJ3fajngd1YTHU2W6FoieUngmHPxsXhaZ6L7oL+ztGdsDy Nk6eAZKVK8iR11ey+6YUqb3bSYQ9y89BsWY= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The edk2 BaseTools report a warning if a local header file is not listed under the [Sources] section in the INF file. Add header files to the [Sources] section in the respective INF files to fix the warnings. Signed-off-by: Sami Mujawar Reviewed-by: Alexei Fedorov Reviewed-by: Philippe Mathieu-Daude --- DynamicTablesPkg/Drivers/DynamicTableFactoryDxe/DynamicTableFactoryDxe.inf= | 1 + DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/AcpiIortLibArm.inf = | 3 ++- DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/AcpiPpttLibArm.inf = | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/DynamicTablesPkg/Drivers/DynamicTableFactoryDxe/DynamicTableFa= ctoryDxe.inf b/DynamicTablesPkg/Drivers/DynamicTableFactoryDxe/DynamicTable= FactoryDxe.inf index b47a690dd72702a2d7157cbb21249ba1d01d08cd..56b69591ac52ca3ba51250dc01a= 0846b22442ce9 100644 --- a/DynamicTablesPkg/Drivers/DynamicTableFactoryDxe/DynamicTableFactoryDx= e.inf +++ b/DynamicTablesPkg/Drivers/DynamicTableFactoryDxe/DynamicTableFactoryDx= e.inf @@ -25,6 +25,7 @@ [Sources] DeviceTreeTableFactory/DeviceTreeTableFactory.c DynamicTableFactoryDxe.c SmbiosTableFactory/SmbiosTableFactory.c + DynamicTableFactory.h =20 [Packages] MdePkg/MdePkg.dec diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/AcpiIortLibAr= m.inf b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/AcpiIortLibArm.inf index 3bbd0e7818c6172f9178b12a3d0960e2d298bca1..2f987e3b6d339d4b5f342cb52b8= dc712cf4e585c 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/AcpiIortLibArm.inf +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/AcpiIortLibArm.inf @@ -1,7 +1,7 @@ ## @file # IORT Table Generator # -# Copyright (c) 2017 - 2018, ARM Limited. All rights reserved. +# Copyright (c) 2017 - 2019, ARM Limited. All rights reserved. # # SPDX-License-Identifier: BSD-2-Clause-Patent ## @@ -18,6 +18,7 @@ [Defines] =20 [Sources] IortGenerator.c + IortGenerator.h =20 [Packages] MdePkg/MdePkg.dec diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/AcpiPpttLibAr= m.inf b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/AcpiPpttLibArm.inf index 3cb13d7d8fd3df04f3e16cc6161d9736f7579a80..2c7d19513d6ceea29fd9f271f98= 3a6cf6d2c1046 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/AcpiPpttLibArm.inf +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/AcpiPpttLibArm.inf @@ -18,6 +18,7 @@ [Defines] =20 [Sources] PpttGenerator.c + PpttGenerator.h =20 [Packages] EmbeddedPkg/EmbeddedPkg.dec --=20 '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 (#46270): https://edk2.groups.io/g/devel/message/46270 Mute This Topic: https://groups.io/mt/32999789/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 Tue May 7 11:53:29 2024 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+46271+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 1566557852207177.19177462701703; Fri, 23 Aug 2019 03:57:32 -0700 (PDT) Return-Path: X-Received: from EUR02-HE1-obe.outbound.protection.outlook.com (EUR02-HE1-obe.outbound.protection.outlook.com [40.107.1.74]) by groups.io with SMTP; Fri, 23 Aug 2019 03:57:30 -0700 X-Received: from VI1PR0802CA0018.eurprd08.prod.outlook.com (2603:10a6:800:aa::28) by HE1PR0802MB2601.eurprd08.prod.outlook.com (2603:10a6:3:d8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.19; Fri, 23 Aug 2019 10:57:26 +0000 X-Received: from VE1EUR03FT006.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::206) by VI1PR0802CA0018.outlook.office365.com (2603:10a6:800:aa::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.15 via Frontend Transport; Fri, 23 Aug 2019 10:57:25 +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+46271+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 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT006.mail.protection.outlook.com (10.152.18.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:57:24 +0000 X-Received: ("Tessian outbound 8b8b6ad907d7:v27"); Fri, 23 Aug 2019 10:57:24 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: b31955e9e1aa8fe9 X-CR-MTA-TID: 64aa7808 X-Received: from 59ec0dec7d09.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.4.58]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id 6E5EE9EA-1BF7-4FAC-A811-2C8F79C6F184.1; Fri, 23 Aug 2019 10:57:24 +0000 X-Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-am5eur02lp2058.outbound.protection.outlook.com [104.47.4.58]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 59ec0dec7d09.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384); Fri, 23 Aug 2019 10:57:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BPc04ERBlXI7MXbaLRIRngQ5xphiCNVc+J8eWdOGh4U9M8McKe9vNchY31ecr9eiZ4kT1ZxY6hriXLFIcYuIMGQG9DUb+1769tX7EFGjxwbL9oTJBGOXyUKdEF5wWDXNS0vXx0TFvihJ00vDlwr7SOXgOcQpMf1506JgT3GPCmmV/67+08/jJsJY8yz+fhbp1EyHq/Kr5vuUC2yJi6NNqPrG6or7k+fx1rl6mEkLwZcVTePcfka0Or4yrKURaiZeHQ9na9+arEiwiS2PSSLh7djB7U8wF5qYlHAQN+DQBfA685erSCZQE81lYp70HlcgUlLVz+GHOMxMPT2Oxamgfw== 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=lMLSUwz2DZPwqzv9mbNkFqo75OxlLer+hLPlNJT+gv0=; b=amHGjLqWg7ElQrF40wvajHTWn1/LYbeWLvG9UnY3eWER9fZW3XJeJ5FHWRvECrFcJqkFbLNPYM85/DXbg8Nyc9amE+O3Ud3s2eHXQFm8yStjb9qGD0V77X2FpacJhdYbUdvyg+ddZ5BhP+OPWLcfhdfzsbwShds82vdsjCq5FlAOCmB3JSrinaxWX6ZiYHMDAHfKwH4OdBbu4Q20tAi2JULTT2dyuYyfpQR1D60pMUbqj5TT0bbECThizi8pOKmpT1sDkOuKKzFJB9emaEBdMV5URae/TN+e0UU8oaYm7M3HrkNdQeS+iAXHAWlHDf2xKLgXziAXq85pBcPNzb3obg== 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 DB7PR08CA0029.eurprd08.prod.outlook.com (2603:10a6:5:16::42) by AM6PR08MB4950.eurprd08.prod.outlook.com (2603:10a6:20b:ea::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.19; Fri, 23 Aug 2019 10:57:22 +0000 X-Received: from AM5EUR03FT015.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::207) by DB7PR08CA0029.outlook.office365.com (2603:10a6:5:16::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.17 via Frontend Transport; Fri, 23 Aug 2019 10:57:21 +0000 Authentication-Results-Original: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; 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 AM5EUR03FT015.mail.protection.outlook.com (10.152.16.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:57:20 +0000 X-Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1415.2; Fri, 23 Aug 2019 10:56:25 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) 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; Fri, 23 Aug 2019 10:56:19 +0000 X-Received: from E107187.Arm.com (10.1.195.55) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Fri, 23 Aug 2019 10:56:19 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , Subject: [edk2-devel] [PATCH v1 03/19] DynamicTablesPkg: Remove struct CM_ARM_CPU_INFO Date: Fri, 23 Aug 2019 11:55:23 +0100 Message-ID: <20190823105539.13260-4-sami.mujawar@arm.com> In-Reply-To: <20190823105539.13260-1-sami.mujawar@arm.com> References: <20190823105539.13260-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;IPV:NLI;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(136003)(346002)(39860400002)(376002)(396003)(2980300002)(189003)(199004)(336012)(50226002)(2616005)(81166006)(81156014)(7696005)(476003)(426003)(446003)(486006)(186003)(63370400001)(6916009)(63350400001)(2351001)(50466002)(48376002)(4744005)(316002)(5660300002)(11346002)(47776003)(51416003)(54906003)(16586007)(2906002)(8676002)(44832011)(126002)(478600001)(70586007)(76176011)(1076003)(305945005)(4326008)(26005)(86362001)(36756003)(53936002)(70206006)(8936002)(356004)(6666004)(53416004);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR08MB4950;H:nebula.arm.com;FPR:;SPF:TempError;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4abe3d04-c2c6-43a8-249d-08d727b8ae05 X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(2017052603328);SRVR:AM6PR08MB4950; X-MS-TrafficTypeDiagnostic: AM6PR08MB4950:|HE1PR0802MB2601: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true X-MS-Oob-TLC-OOBClassifiers: OLM:8882;OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: 1d50Du1PIzP632qdm+T/g5CQqJB6+U7Z+RjT56xEO9DEa6h4MNSoE2pxY1yHH6YYAJqdpokS7Ic4aqEav5Z3i2ChbTcVeIEBvq329mZAm/ybNPtsk2cJKGy9CBko4tqhxr4IPat7RogymJCUFaPApn17pcBi1ZSofm7Voq5e/i4w1eoW10pWku4a1tnLlfbBWjhn15C9ib41IOf688O1LeeZuHvck7fgKNW4c5YaP8FqbO1QJWlZxZY859KhWWHWr6uJC3IZLaStDwTU7o4DWKsXFAscIrI73cKscdHGxOIrBoyJKorCsDCiDQCjqhf2Y00xpuFXPOuylbUq6KEW0Ic6YVYpZ5hsf7uFsjUKe6b2+5x1cryaG253GGvpLE5n0VEoXZ1xnpvzTLYLyJj9m8LSiLVO1GUsNYo+AVVtsb4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4950 Original-Authentication-Results: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT006.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: d0513014-bf20-47b5-aead-08d727b8abb3 NoDisclaimer: True X-Microsoft-Antispam-Message-Info: 8yptPAvEpwGD2h2HdY3nnF6HAMEMWFBlJv75egrDkQiGHi6iXHd0Rx0o/Wf3WjhKrAJAy7SCTyynQyW5va9kTcUJ/NYdXVPtSaoOFsAS1OGasMFlZMzA659FC1F1FpyVEA79DXZV5hYuM2MUtGOAQvm6gEM4OtYyBgEyu8CpkVLlReYzqRCb56xLLCsptbsuTSCTLNvQdi1uJ6LxXKar7EH1BsI024fqYlI3E8nXA5AJO3PW4TEyZDPG/zfJDhhGRcSmAvi3IT/pCAzd+KsnCQA4KUB5wZmHt7+B5KImuAv0PuJTIIIPK8RaWw4shVOzPPVLpjizIR48Y2uFiCsQzUlCXi+9oQvV3oDgQk4iI5hArK6mWLeeYQHeMYRfhY8tHrq3OEfOkBm8agKW14p0V0lHwmmwvBMZVRAH1bA0dD0= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2019 10:57:24.2011 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4abe3d04-c2c6-43a8-249d-08d727b8ae05 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0802MB2601 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,sami.mujawar@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1566557851; bh=+xX9MJ+rHkm0lwTMEiOVXo5h2ilA/74JY9TzJiDVkyg=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=Eu8Njau2GFfOcfWcAqinB2241ldYxPbM00xehH7aU8u73S46q7KTygUtU92GqSUvw+B agN2hERlkMg5WsoLPQVT6u94um3piteuBLcigMQdENhTeDKdN7J5zSTzWQCotlaN2YVZ6 hAjCLnsXgE1HBomwog1MfcVUbFX948c04pA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The VS2017 compiler reports 'error C2016: C requires that a struct or union has at least one member' for the struct CM_ARM_CPU_INFO. Remove struct CM_ARM_CPU_INFO as this is not in use. Signed-off-by: Sami Mujawar Reviewed-by: Alexei Fedorov --- DynamicTablesPkg/Include/ArmNameSpaceObjects.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTables= Pkg/Include/ArmNameSpaceObjects.h index ac451b306dfd7ba299a83209675b21696be235be..f08b8257678c8b6aacc863bbe1d= b09587b51a291 100644 --- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h @@ -67,10 +67,6 @@ typedef struct CmArmBootArchInfo { UINT32 BootArchFlags; } CM_ARM_BOOT_ARCH_INFO; =20 -typedef struct CmArmCpuInfo { - // Reserved for use when SMBIOS tables are implemented -} CM_ARM_CPU_INFO; - /** A structure that describes the Power Management Profile Information for the Platform. =20 --=20 '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 (#46271): https://edk2.groups.io/g/devel/message/46271 Mute This Topic: https://groups.io/mt/32999790/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 Tue May 7 11:53:29 2024 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+46265+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 1566557819208387.21870469145756; Fri, 23 Aug 2019 03:56:59 -0700 (PDT) Return-Path: X-Received: from EUR02-AM5-obe.outbound.protection.outlook.com (EUR02-AM5-obe.outbound.protection.outlook.com [40.107.0.48]) by groups.io with SMTP; Fri, 23 Aug 2019 03:56:58 -0700 X-Received: from HE1PR0802CA0003.eurprd08.prod.outlook.com (2603:10a6:3:bd::13) by VE1PR08MB4957.eurprd08.prod.outlook.com (2603:10a6:803:110::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.16; Fri, 23 Aug 2019 10:56:53 +0000 X-Received: from AM5EUR03FT054.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::206) by HE1PR0802CA0003.outlook.office365.com (2603:10a6:3:bd::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.14 via Frontend Transport; Fri, 23 Aug 2019 10:56:53 +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+46265+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 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT054.mail.protection.outlook.com (10.152.16.212) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:56:50 +0000 X-Received: ("Tessian outbound 4ee777a495a5:v27"); Fri, 23 Aug 2019 10:56:47 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 08628c56ba17078c X-CR-MTA-TID: 64aa7808 X-Received: from e69b3d0a8de5.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.12.53]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id A884B08A-6CDB-450B-827C-A06A5CCA0CEC.1; Fri, 23 Aug 2019 10:56:39 +0000 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04lp2053.outbound.protection.outlook.com [104.47.12.53]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e69b3d0a8de5.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 23 Aug 2019 10:56:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SAnGVgwKAhJW1efybDwhd35E79DReSjvhO03kh0xwQ2qV6FTOVSXzWYKvkNUr2E8LLDNfyIjkQSgjVKHvh2Mg4iCSIYtqUT5dzL3aO6quB3XcHOeV6fFQvoN2jeBFrQTymIOuCH6gZ5m+JedMDIY9/70lfEuUCzDq4Atwt2gjFHiKfTNimLdyve72aUaJkgcXPdviUC8kcXx4YDExlX9TKgC+vxsRejwWOCzz0pJs8f5a1B8sNCh2RJY5geC23a6/KxSXzTOo1403FiG7FcBgCsSgOvQA+gMyXyNXY4mlnyqnLsLIo/WYBBF52BPg3A3UksZPgxxDgFCU+ZCvzR/Ww== 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=cc8AFgzhriEfT9IVhX16kZ6VOCuKfW8y+4RIMXwteCA=; b=izWk02RSGsDITEMorzZofRZlyt2VDbZADOCTdRSTHRKV522mkxFw1e9fCsgqzv+hMoHty0BOPRVc2N2A3HtCGk9VVCGDa9yPARk+EEW6BVQCBYkwCDa/jCzF1f/aDnC4qE+ltiAh38rctr1apLxleQs3im36dZesvjeYM/BSD/QR7C9VLP47rkwk6tA839qhjHro8n+F+iAyDtd6+HqJUmJRafg6qJOIcBxeyOwh/KlQS7eQBm1tVqWgKToHfqE471R6+U8Yw8isANKfDclrpBOtG7V6tEb+l+cUmxkT/7TQZF1siltU/OWHqZDGVUIWvylCB5o+nN9BkCD8JautUg== 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 VE1PR08CA0006.eurprd08.prod.outlook.com (2603:10a6:803:104::19) by AM5PR0802MB2594.eurprd08.prod.outlook.com (2603:10a6:203:99::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.16; Fri, 23 Aug 2019 10:56:36 +0000 X-Received: from AM5EUR03FT011.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::203) by VE1PR08CA0006.outlook.office365.com (2603:10a6:803:104::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.14 via Frontend Transport; Fri, 23 Aug 2019 10:56:36 +0000 Authentication-Results-Original: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; 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 AM5EUR03FT011.mail.protection.outlook.com (10.152.16.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:56:35 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Fri, 23 Aug 2019 10:56:20 +0000 X-Received: from E107187.Arm.com (10.1.195.55) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Fri, 23 Aug 2019 10:56:20 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , Subject: [edk2-devel] [PATCH v1 04/19] DynamicTablesPkg: Fix serial port subtype warning Date: Fri, 23 Aug 2019 11:55:24 +0100 Message-ID: <20190823105539.13260-5-sami.mujawar@arm.com> In-Reply-To: <20190823105539.13260-1-sami.mujawar@arm.com> References: <20190823105539.13260-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;IPV:NLI;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(396003)(376002)(136003)(346002)(39860400002)(2980300002)(189003)(199004)(2906002)(36756003)(50226002)(50466002)(86362001)(336012)(63370400001)(446003)(63350400001)(16586007)(356004)(305945005)(186003)(26005)(486006)(48376002)(6916009)(47776003)(54906003)(53936002)(2616005)(81156014)(81166006)(53416004)(5660300002)(2351001)(44832011)(4326008)(476003)(76176011)(8676002)(316002)(126002)(426003)(8936002)(11346002)(1076003)(14444005)(7696005)(478600001)(51416003)(70206006)(70586007);DIR:OUT;SFP:1101;SCL:1;SRVR:AM5PR0802MB2594;H:nebula.arm.com;FPR:;SPF:TempError;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f83cd1f3-2296-491d-27e1-08d727b89a20 X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(2017052603328);SRVR:AM5PR0802MB2594; X-MS-TrafficTypeDiagnostic: AM5PR0802MB2594:|VE1PR08MB4957: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true X-MS-Oob-TLC-OOBClassifiers: OLM:10000;OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: CFPtmXY6FxoXloc0actfqGEMmzHa8rhxg1syzoXzp9AjpW5LwMFRtxANntxTxIH+X+Nvp4cYswpuL+eeAbSHF8WF/75DxspZzDGI1FpH7bACmkJXCYHtbaVt/VBc0NkjTZK422dBMP4CwGxOHk5wXyBtqgvV63p5/buWaGBlt2tPD+szfeGK2j2Kv69bXsbNJ6FShfHSD1khUPiEaKFp8BnXGh+2q2vZHt3auxsVNksKiZ31u5i0oCulu2en6hvmtg3/nc/cCNrBuKrhxPXlcCXMDR7P9VKvQa2pTuU12EJ+emOXzszsX5DL2Vgby760Fhhd6xMroNYhaCdA3PW9NeURC61Q9K+YaRRN653JCaBmfTJBMXYbsygxLkRsrF7PgeZZXiJqiAJuZ0AZp5ieSQ5up2U9MIyaYRU6N/BxixA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2594 Original-Authentication-Results: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT054.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 01c6c2eb-2917-4d79-294b-08d727b890c1 NoDisclaimer: True X-Microsoft-Antispam-Message-Info: 9Uq3cnITchBc9qHjlNNlaqZl75+PX6JwR+jS92l6NLBB5EZwTAx1x6urOq6VNHwizTrhx4fZW8yMbxkod6O5F1OtytsPKscMVF+RV7h5OmM8S/UbpVlUYmOhGRo37TuXXbaFc2Q0lqAVN4g/qOjoekglLYOuMLiXDjYpxwLYgKIsJ9yTKI1RFYc6PpfS5BfNzjL/vafAcrA2841zH8kTDILUamg0RObmP1ANjKog/Le0RKmFlRPBrEDyRk5ePQWnXlSUSflm5lMDjjNznI2samRcoHtaXtmzQW/1pbzjPUhbW/1/xb1xUhHhmCo0448Nnrt0SW2j8w27sU9LSVGoBVxIWAevr990clRM9pj2mMWchNRfyaCpCDszWMCcNvVNMNKFbTMSyWYGtO+5wKfzJvt64/NisV4X3Ebbcb6BnH8= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2019 10:56:50.8748 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f83cd1f3-2296-491d-27e1-08d727b89a20 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4957 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,sami.mujawar@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1566557818; bh=L8x9iUqkrQuA12EL9c+kadR8389gy+qVVeYawMQNcog=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=ALDqGTMo5ko3jnQe+WYeDFyuicbyXh+sJ2ythlKQWmx+fiQolGFKtd9uDEmlTmNCb9M 80dWcUuQDntiw5nLN5+acAcMvvwH5p6Ss2SxwiPVA6t7D/VA1bsHsXQPirJplq6VcmFMG f1+ZpdTINRVcB3TBAhZqZNSPdFbuoif+dpc= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The VS2017 compiler reports 'warning C4244: '=3D': conversion from 'UINT16' to 'UINT8', possible loss of data' for the SPCR InterfaceType field assignment. The SPCR InterfaceType field uses the same encoding as that of the DBG2 table Port Subtype field. However SPCR.InterfaceType is 8-bit while the Port Subtype field in DBG2 table is 16-bit. Since the Configuration Manager represents the Serial port information using the struct CM_ARM_SERIAL_PORT_INFO, the PortSubtype member in this struct is 16-bit. To fix the warning an explicit type case is added. A validation is also added to ensure that the Serial Port Subtype value provided by the Configuration Manager is within the 8-bit range (less than 256). Signed-off-by: Sami Mujawar Reviewed-by: Alexei Fedorov Reviewed-by: Philippe Mathieu-Daude --- DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c | 15 ++++= ++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c index 1404279f828d5c06bb7605cb2fe6d864ef7a080e..4b2580da7df9b4472ae9bcc3df2= 138a9e13004d0 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c @@ -217,8 +217,21 @@ BuildSpcrTable ( goto error_handler; } =20 + // The SPCR InterfaceType uses the same encoding as that of the + // DBG2 table Port Subtype field. However InterfaceType is 8-bit + // while the Port Subtype field in the DBG2 table is 16-bit. + if ((SerialPortInfo->PortSubtype & 0xFF00) !=3D 0) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: SPCR: Invalid Port Sybtype (must be < 256). Status =3D %r\n", + Status + )); + goto error_handler; + } + // Update the serial port subtype - AcpiSpcr.InterfaceType =3D SerialPortInfo->PortSubtype; + AcpiSpcr.InterfaceType =3D (UINT8)SerialPortInfo->PortSubtype; =20 // Update the base address AcpiSpcr.BaseAddress.Address =3D SerialPortInfo->BaseAddress; --=20 '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 (#46265): https://edk2.groups.io/g/devel/message/46265 Mute This Topic: https://groups.io/mt/32999781/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 Tue May 7 11:53:29 2024 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+46263+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 1566557817239392.83045608319424; Fri, 23 Aug 2019 03:56:57 -0700 (PDT) Return-Path: X-Received: from EUR03-DB5-obe.outbound.protection.outlook.com (EUR03-DB5-obe.outbound.protection.outlook.com [40.107.4.40]) by groups.io with SMTP; Fri, 23 Aug 2019 03:56:56 -0700 X-Received: from VI1PR08CA0220.eurprd08.prod.outlook.com (2603:10a6:802:15::29) by VE1PR08MB4959.eurprd08.prod.outlook.com (2603:10a6:803:110::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.16; Fri, 23 Aug 2019 10:56:51 +0000 X-Received: from VE1EUR03FT063.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::206) by VI1PR08CA0220.outlook.office365.com (2603:10a6:802:15::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.14 via Frontend Transport; Fri, 23 Aug 2019 10:56:51 +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+46263+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 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT063.mail.protection.outlook.com (10.152.18.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:56:49 +0000 X-Received: ("Tessian outbound df6366865adf:v27"); Fri, 23 Aug 2019 10:56:46 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 104b78dda65872ba X-CR-MTA-TID: 64aa7808 X-Received: from 3fd8dc3cbe16.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.2.53]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id A483CBF5-8C08-4DFF-94C9-6E1C7C575AEE.1; Fri, 23 Aug 2019 10:56:38 +0000 X-Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01lp2053.outbound.protection.outlook.com [104.47.2.53]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 3fd8dc3cbe16.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384); Fri, 23 Aug 2019 10:56:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CPbfxe8hRxUSY4FCvv0w/a8pY8sK3sGYPR6FMN3Fj8wXm1tHXjQ5hjAV0xCNm15YxH6I96tJyDRPgSNOTc9OI2WRcxx4OsL+LeV2JCK/JhdgCOrRVu01XUn4c2hHdfomWqk648akdCHti1xyduBG3tRhcJStosyH5ocCzYsoAO9Hc2duRKuSI8gSQtH0QELmy+4JAtN7w26S/aFzlH3CfUgaz0J/bb7xUu09WRvQyqbEBKIMOGp7XPn94+mNFHca9KFxCxz0zMCSfS17dh/6G8NkgL/hvtXr5yaRR/rB83X4inD1I0RJ0NCUjdb8aZVLUmD1V1za1AfmKesQYyC+Gg== 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=iFT6qtTvunSH9itRRfyJQ2LW8v17ti3AHrkTirnoq3Q=; b=Rp5dOPhkKkoUKZYGqfodZ8Jz+PbKHWU2ypYWWjrwsAXBFLuoQo6yqrhGPNxjM37eaZAX1P6lv2U8VaUC5n0pQyZtsII/Yoydcx6579ieW1DFWb1C2ldhMeI98GVi9XxjKdJBgdvTUkavC4TpBB+nY+Lx1AIMf7xnII0wiWvQJ1uyJb06HxVg23voz8o2yI3ouJn5KPcUb8R4EXwsYrg2szsf2KyMuLesJikQvV9C/D1S54TOt/IKccYvdvK15ssIX8yAw4psUJSFFWtMAJBTskXPLgn9HhiyIp7cV8RV1n4XBNz26sMJis1E/ptKtnIqks5esiKqxfap+osDx8xoUA== 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 DB6PR0801CA0046.eurprd08.prod.outlook.com (2603:10a6:4:2b::14) by HE1PR0802MB2604.eurprd08.prod.outlook.com (2603:10a6:3:db::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.16; Fri, 23 Aug 2019 10:56:36 +0000 X-Received: from AM5EUR03FT003.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::208) by DB6PR0801CA0046.outlook.office365.com (2603:10a6:4:2b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.14 via Frontend Transport; Fri, 23 Aug 2019 10:56:35 +0000 Authentication-Results-Original: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; 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 AM5EUR03FT003.mail.protection.outlook.com (10.152.16.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:56:34 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Fri, 23 Aug 2019 10:56:21 +0000 X-Received: from E107187.Arm.com (10.1.195.55) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Fri, 23 Aug 2019 10:56:21 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , Subject: [edk2-devel] [PATCH v1 05/19] DynamicTablesPkg: Fix Proc node length assignment Date: Fri, 23 Aug 2019 11:55:25 +0100 Message-ID: <20190823105539.13260-6-sami.mujawar@arm.com> In-Reply-To: <20190823105539.13260-1-sami.mujawar@arm.com> References: <20190823105539.13260-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;IPV:NLI;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(396003)(39860400002)(346002)(136003)(376002)(2980300002)(189003)(199004)(8676002)(63370400001)(446003)(86362001)(53416004)(426003)(2906002)(11346002)(50226002)(356004)(2351001)(5660300002)(63350400001)(4326008)(81156014)(47776003)(76176011)(48376002)(478600001)(81166006)(44832011)(336012)(70206006)(70586007)(486006)(2616005)(476003)(26005)(6916009)(1076003)(305945005)(8936002)(126002)(14444005)(7696005)(16586007)(54906003)(50466002)(36756003)(186003)(51416003)(53936002)(316002);DIR:OUT;SFP:1101;SCL:1;SRVR:HE1PR0802MB2604;H:nebula.arm.com;FPR:;SPF:TempError;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 978402be-9d43-4f60-0514-08d727b89924 X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(2017052603328);SRVR:HE1PR0802MB2604; X-MS-TrafficTypeDiagnostic: HE1PR0802MB2604:|VE1PR08MB4959: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true X-MS-Oob-TLC-OOBClassifiers: OLM:8273;OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: xTcHcRo57Xe2tP8sqDISM5X+UtsyGcxkj/Uk/qkYkydYlRazkmeITsEfFWh7N3m/b75GCTWattbosY+Tol/zFgBZ1PuLBPi2jGtMqR7lX5X1rulvjgt4yt7y5VqaQcDbp/pOnK3fohc1eHKoYgUVmQK8BWZIwhQSnYvvgEk2Q94ko5nrR0JyH50cZhzkBJvf9/4hShEZ0b0+IqtaczJxNBi7XHw8iJ92+vIT0q1AHhT1qQjvX3uaZKgsseBfF6ziBeyeGDeGQWvYIrt6wtDZCthbdEFhivOoVJXypuMXIxLpYT0BouFX/6720TLgx2imXraEkE7R37aXkFG+IGhy1XOBHQ+6rLSJuE5HnoCNDe156/t5jHFMMuYwaP/b370S5oxeOieqwoDuc28j+lxBmxACGDXIjk2rb3sV+KLTE1w= X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0802MB2604 Original-Authentication-Results: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT063.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: b4d9c261-35b6-4480-6b54-08d727b8902d NoDisclaimer: True X-Microsoft-Antispam-Message-Info: iUVT9AsB28cc5qtujU/H9sWqUVOs52j4rRgB6Vg8w82uvauaGs5E/1ytVmkFAJmEqkJwdTguEoYObq7DBSHlgVBauMtZz6zjGmatHkeKgLApLiSrHG/Hk6bDsC5RlWkOlRS4wdfC6qUDL9k8k1Cm4YcPrvlbjpFQfDG1aiPQClSc9OvXobmRIVw7ZC+hAX97SZZvSkbSEDMjMkL0PUmHxdB5CP7xMVYJUnUl8m8d78nlzr2sKIId/upSs+TtJeVnB4nx0jB8mVrnPX66d31syW/hOgeMmJnSNlMHsjN9+/ioqqeIANtIe+LZAadUo1pGhVKRMVcahxmXgF356rYXlNJUZn13gC37cCCdV6l1wXj6Aa0qkBpUBWkcKRXpVN7CQ37e/019YlZ+xTQMz/KwJP6e8vmcYDtHKQboaJw2uRI= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2019 10:56:49.1683 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 978402be-9d43-4f60-0514-08d727b89924 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4959 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,sami.mujawar@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1566557816; bh=ZXs6V04JzNgCi+rkqtBJnrhd8QhoOAHlDPOKR+a5YUw=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=osMR1YnwmqlSSUD3B27o+mnzmxUs8VWFl1D8gyshm4YEd1DAxxUXJCJWdKQiC3vrYEB 5YNTPbLqN7b3xOjFaw3dmXA5cGDWF7dVRL2FcoUxo3/VmXh0aXS+0uK9hw80JoB0LkuW/ 6fHP8Mx6B1GWQ4E7kOOX66pD7wepumPYUTs= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The length field for the Processor Hierarchy node structure is 8-bit wide while the number of private resource field is 32-bit wide. Therefore, the GetProcHierarchyNodeSize() returns the size as a 32-bit value. The VS2017 compiler reports 'warning C4244: '=3D': conversion from 'UINT32' to 'UINT8', possible loss of data' while assigning the length field of the Processor Hierarchy node structure. To fix this, a type cast is added. In addition, there is a check to ensure that the Processor Hierarchy node size does not exceed MAX_UINT8. Signed-off-by: Sami Mujawar Reviewed-by: Alexei Fedorov --- DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c | 7 ++++-= -- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c index 9e42eee9b75bb330833b0f56c98947563d9eb821..40699ce113caa8530c89ac20562= cf5abda26b88e 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c @@ -504,6 +504,7 @@ AddProcHierarchyNodes ( =20 PPTT_NODE_INDEXER * ProcNodeIterator; UINT32 NodeCount; + UINT32 Length; =20 ASSERT ( (Generator !=3D NULL) && @@ -539,8 +540,8 @@ AddProcHierarchyNodes ( // imposed on the Processor Hierarchy node by the specification. // Note: The length field is 8 bit wide while the number of private // resource field is 32 bit wide. - if ((sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR) + - (ProcInfoNode->NoOfPrivateResources * sizeof (UINT32))) > MAX_UINT= 8) { + Length =3D GetProcHierarchyNodeSize (ProcInfoNode); + if (Length > MAX_UINT8) { Status =3D EFI_INVALID_PARAMETER; DEBUG (( DEBUG_ERROR, @@ -556,7 +557,7 @@ AddProcHierarchyNodes ( =20 // Populate the node header ProcStruct->Type =3D EFI_ACPI_6_3_PPTT_TYPE_PROCESSOR; - ProcStruct->Length =3D GetProcHierarchyNodeSize (ProcInfoNode); + ProcStruct->Length =3D (UINT8)Length; ProcStruct->Reserved[0] =3D EFI_ACPI_RESERVED_BYTE; ProcStruct->Reserved[1] =3D EFI_ACPI_RESERVED_BYTE; =20 --=20 '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 (#46263): https://edk2.groups.io/g/devel/message/46263 Mute This Topic: https://groups.io/mt/32999779/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 Tue May 7 11:53:29 2024 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+46267+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 1566557825034577.4574876241196; Fri, 23 Aug 2019 03:57:05 -0700 (PDT) Return-Path: X-Received: from EUR02-VE1-obe.outbound.protection.outlook.com (EUR02-VE1-obe.outbound.protection.outlook.com [40.107.2.85]) by groups.io with SMTP; Fri, 23 Aug 2019 03:57:03 -0700 X-Received: from VI1PR08CA0180.eurprd08.prod.outlook.com (2603:10a6:800:d1::34) by DB6PR0802MB2598.eurprd08.prod.outlook.com (2603:10a6:4:97::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.18; Fri, 23 Aug 2019 10:56:59 +0000 X-Received: from VE1EUR03FT064.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::200) by VI1PR08CA0180.outlook.office365.com (2603:10a6:800:d1::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.18 via Frontend Transport; Fri, 23 Aug 2019 10:56:58 +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+46267+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 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT064.mail.protection.outlook.com (10.152.19.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:56:57 +0000 X-Received: ("Tessian outbound 0c23f37acac0:v27"); Fri, 23 Aug 2019 10:56:51 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 0892f88288b5b917 X-CR-MTA-TID: 64aa7808 X-Received: from 64dae712afa0.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.0.51]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id 77D25131-24EA-4332-8F15-DA873394C4A4.1; Fri, 23 Aug 2019 10:56:42 +0000 X-Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp2051.outbound.protection.outlook.com [104.47.0.51]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 64dae712afa0.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384); Fri, 23 Aug 2019 10:56:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mFcg51/voHtQHWauxzNgB6+2tMLrMslGSqpEPumkQzb0LmH2Q97eHWMKjgr+Q/0AzEYY1FLdpk5d4TEHZy0GmlIG8WV7lNbhNBCUXDg5Ca8z5Ec1hUhHtdc44n1Fq9Xw7iklDheJdAYWaGE6G2ukfeTmbvcmenaES8Yw3brZdI+m1xnjF+E7ayynCdbuPdEgtZxe97/5k+9r0EnqpL8uahR6WgnlvcTsz9BK6fXJ0Q4TcWWTqSQ4ASoF2aatHLmHrzEGkONvEMhXHcJ/mjtGuC3OGiD9xLhH/UpyYX2jUAp/PVNt1JvPe+a+kYySENn9vKbYatcoRXMK3joWLz2HXA== 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=STN+0P7tz3g7WTSgrl8YvAHv9WC0XGzBZkd/rmpRdd8=; b=Om5sCnx2Ztqt+MLGuaKzwUtbuRY+m1YwyGwgKYEEZcqOVFiswU8FlVhYyXsBtlGnrJxWd8UpBduLlIwwqybwSlRHoMKhzqFT/HwGpKkPfBShd7hZFCkwNvLsb27RQqxdILBMHhQAt1y+Ic2yw/qZvkdzOuW6Aiyb6wKmgt4ncOf4k/emG37m8/crCuW6YSwoY0CWEVO59JzF242eW9tWxbOK+rib+FilnmIRGraLZMUwAd0BHS1FDlj5oMCf8hZfxa47iE691sqO7SNsWypCeInFjqLA0FnR1mjMU8hG0WVO3SbGpjaOfIf6okvkZRUFPHyHEn7UrsiM3EHRxMA8rA== 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 DB6PR0801CA0050.eurprd08.prod.outlook.com (2603:10a6:4:2b::18) by AM0PR08MB4948.eurprd08.prod.outlook.com (2603:10a6:208:163::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.19; Fri, 23 Aug 2019 10:56:40 +0000 X-Received: from AM5EUR03FT003.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::208) by DB6PR0801CA0050.outlook.office365.com (2603:10a6:4:2b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.14 via Frontend Transport; Fri, 23 Aug 2019 10:56:39 +0000 Authentication-Results-Original: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; 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 AM5EUR03FT003.mail.protection.outlook.com (10.152.16.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:56:38 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Fri, 23 Aug 2019 10:56:21 +0000 X-Received: from E107187.Arm.com (10.1.195.55) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Fri, 23 Aug 2019 10:56:21 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , Subject: [edk2-devel] [PATCH v1 06/19] DynamicTablesPkg: Fix GT Block length assignment Date: Fri, 23 Aug 2019 11:55:26 +0100 Message-ID: <20190823105539.13260-7-sami.mujawar@arm.com> In-Reply-To: <20190823105539.13260-1-sami.mujawar@arm.com> References: <20190823105539.13260-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;IPV:NLI;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(396003)(136003)(39860400002)(376002)(346002)(2980300002)(199004)(189003)(446003)(336012)(426003)(63350400001)(63370400001)(186003)(1076003)(44832011)(53416004)(486006)(70586007)(11346002)(2616005)(36756003)(126002)(356004)(476003)(70206006)(2351001)(2906002)(16586007)(51416003)(26005)(76176011)(54906003)(316002)(8676002)(7696005)(6916009)(86362001)(5660300002)(50466002)(48376002)(47776003)(305945005)(53936002)(8936002)(4326008)(50226002)(478600001)(81166006)(81156014)(14444005);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR08MB4948;H:nebula.arm.com;FPR:;SPF:TempError;LANG:en;PTR:InfoDomainNonexistent;A:1;MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dde24ff1-ddcf-4533-7650-08d727b89dfe X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(2017052603328);SRVR:AM0PR08MB4948; X-MS-TrafficTypeDiagnostic: AM0PR08MB4948:|DB6PR0802MB2598: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true X-MS-Oob-TLC-OOBClassifiers: OLM:608;OLM:608; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: 0WlQsZFx+1OUARM8VHUjswYb2DfBcSczg9PDeh+yhbO4H1MjQuMbRLTgbnQsu4xEn7PYrd0yzweENcQRaNeg4Mu78giCKf7CR2YK26j0+2/jyDU5XjavsaFHnzJq3DUhVGsxKZt7LlULODg9bzKZBZX27G89OyGyV6nQ4MsngviYrNAPJycJnb/QERUMFYxVL4wyUdg/3KGHU9fjeorw0cYUmDslz1O6CTW6RF6ZK69CWASxWZntbi017iCrXwYsT9WV11l0fIjyr0mjRvcChDZWkByzQdA4nYYakWALfbd+vc2P/ales8cSNp5oQ6pwgj5y1Sn/L7sujGx2mVgheFmbDwIfb47oPmBtbAhxBc2xbmCsNQEUW1aRFtsCrfiHgJihJOUDrtXdNydv1pnUiQIc3viddTK6z438LBflGnk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4948 Original-Authentication-Results: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT064.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 61acf15f-073f-447e-bc01-08d727b89297 NoDisclaimer: True X-Microsoft-Antispam-Message-Info: JGka9Fp/QASSwuSSKefe1Ynyd4GxpziDdaZsJPeIKA8Dlzvnn+xVJuLCYiS8qt5kNS4UjMkwyI/Q2bLYBxqrltCbgfUivexDknK008F4wLk80s9clbgzC1U0CsT4ip4CT0es1pI5VQcEFqV1mnsJ8HqQ5p35nkz09pkF3e+4tep0gsy/yz8Qoou/8onx3SC79iHBROPAEs/FKjC5tprV39wG+zng7kvLXhZdVhfL0e6qLoCR42O6OBJteiiwVGnCRvZP/5ZbqgHf1Y7MAABuhJ9pOt60SxzNWy2GNb3D2lMNqFGpdLi/UTChEOfIpJfZvGhDeqoITI+iISdL/VnF2dVJ4zNf0fWounO7Cczd9LLzr50n5vfJqwWnoE9HuUVB0sHzLLr0pMCEGneakQtj+tubKSXvNh7wepwaqLO7wFY= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2019 10:56:57.2778 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dde24ff1-ddcf-4533-7650-08d727b89dfe X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2598 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,sami.mujawar@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1566557824; bh=lMzZ0vPpQRS8oFWdTW4zkCnIvnRG+QjYe0D2edYdua0=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=XF6R736ngsZ8eRKE6xV72FCc6mDVKq55tEpmxRKZ8ydpszdg6gza6vXCgTDs8Mimdn5 HWJ02D1RzfXH0j8ig6YOD3uY8IxjpzmTCGOMFqiHYM9u9KSQJg44n2wlvB0T6WJFUj7vO 5DQ+pDJ/XRYQQBveVn7jLhSK8w2u17giyYw= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The VS2017 compiler reports 'warning C4267: '=3D': conversion from 'size_t' to 'UINT16', possible loss of data'. The sizeof() operator is used to calculate the size of the GT Block structure. The length field in the GT Block structure is 16-bit wide. Since the return type of sizeof() operator is size_t the VS2017 compiler reports the above warning. To fix the warning, an explicit type cast is added. An additional check is also performed to ensure that the calculated GT Block length does not exceed MAX_UINT16. Signed-off-by: Sami Mujawar Reviewed-by: Alexei Fedorov Reviewed-by: Philippe Mathieu-Daude --- DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c | 25 ++++= ++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c index 7e86c30649bd36ecebac75c7e3a86a0c25cd590b..0e996698887aefca8a7240fc27f= e3cb9324fd3e2 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c @@ -350,6 +350,7 @@ AddGTBlockList ( EFI_ACPI_6_3_GTDT_GT_BLOCK_TIMER_STRUCTURE * GtBlockFrame; CM_ARM_GTBLOCK_TIMER_FRAME_INFO * GTBlockTimerFrameList; UINT32 GTBlockTimerFrameCount; + UINTN Length; =20 ASSERT (Gtdt !=3D NULL); ASSERT (GTBlockInfo !=3D NULL); @@ -376,11 +377,27 @@ AddGTBlockList ( return Status; } =20 + Length =3D sizeof (EFI_ACPI_6_3_GTDT_GT_BLOCK_STRUCTURE) + + (sizeof (EFI_ACPI_6_3_GTDT_GT_BLOCK_TIMER_STRUCTURE) * + GTBlockInfo->GTBlockTimerFrameCount); + + // Check that the length of the GT block does not + // exceed MAX_UINT16 + if (Length > MAX_UINT16) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: GTDT: Too many GT Frames. Count =3D %d. " \ + "Maximum supported GT Block size exceeded. " \ + "Status =3D %r\n", + GTBlockInfo->GTBlockTimerFrameCount, + Status + )); + return Status; + } + GTBlock->Type =3D EFI_ACPI_6_3_GTDT_GT_BLOCK; - GTBlock->Length =3D sizeof (EFI_ACPI_6_3_GTDT_GT_BLOCK_STRUCTURE) + - (sizeof (EFI_ACPI_6_3_GTDT_GT_BLOCK_TIMER_STRUCTUR= E) * - GTBlockInfo->GTBlockTimerFrameCount); - + GTBlock->Length =3D (UINT16)Length; GTBlock->Reserved =3D EFI_ACPI_RESERVED_BYTE; GTBlock->CntCtlBase =3D GTBlockInfo->GTBlockPhysicalAddress; GTBlock->GTBlockTimerCount =3D GTBlockInfo->GTBlockTimerFrameCount; --=20 '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 (#46267): https://edk2.groups.io/g/devel/message/46267 Mute This Topic: https://groups.io/mt/32999784/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 Tue May 7 11:53:29 2024 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+46266+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 1566557819938269.20155872423516; Fri, 23 Aug 2019 03:56:59 -0700 (PDT) Return-Path: X-Received: from EUR02-AM5-obe.outbound.protection.outlook.com (EUR02-AM5-obe.outbound.protection.outlook.com [40.107.0.75]) by groups.io with SMTP; Fri, 23 Aug 2019 03:56:59 -0700 X-Received: from VI1PR08CA0180.eurprd08.prod.outlook.com (2603:10a6:800:d1::34) by AM6PR08MB4951.eurprd08.prod.outlook.com (2603:10a6:20b:eb::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.16; Fri, 23 Aug 2019 10:56:55 +0000 X-Received: from VE1EUR03FT064.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::200) by VI1PR08CA0180.outlook.office365.com (2603:10a6:800:d1::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.18 via Frontend Transport; Fri, 23 Aug 2019 10:56:54 +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+46266+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 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT064.mail.protection.outlook.com (10.152.19.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:56:53 +0000 X-Received: ("Tessian outbound 0c23f37acac0:v27"); Fri, 23 Aug 2019 10:56:50 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 86124cf8d437f40c X-CR-MTA-TID: 64aa7808 X-Received: from 09f55f8f34c1.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.0.58]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id D6126664-CBD3-43E5-987E-8E6710EC4528.1; Fri, 23 Aug 2019 10:56:44 +0000 X-Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp2058.outbound.protection.outlook.com [104.47.0.58]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 09f55f8f34c1.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 23 Aug 2019 10:56:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NJV+nhdfSjTQytwwH5N/aKeN2t+PrbxvUi6/g1nyWm6Xd1ScswxZd+R/NdRVj3ONzZPRycQ9PvkMVpZl2e7gJCg9vlHR/s2gDUuwxgOBIktX5QwBnzr2P+PNleXYRTL8gTOzj0BPIhUXbjhfSOSjbAod5SkY3kjfZEtxPIFAHNV8D/M6HdKmHMJ4xMftCAKFZYVA3IND1mdASgFcZd6itFmgihNsO7gda//i9l6lia7YjenvzLyK8eJVAmGsKNId3P4G7Efai4jiIqRu9P7DrZk31Qqdg/IGVtEcjMhO7NjuZqpQcVNUJjiD9yFfX2G1lkD0DGIMLWkTFqf4USLILw== 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=PwL2QXz7tQGOX+MysjUwKBsqKsSUsucKrr47+SY30+8=; b=A1lVaPgbjb3JtVBm3zdKuCynbMOxD7WgmmgP4eGmOGVoo5w1ERzG+x2OG+ekLMfcaB7z0VleIx1bf85UXbf548aT16V5sULFQmzpTiWbcYNCz5UFzua/WeHVJRVYWom9eNuGkl0mAdRF1XJ+W9CAymxomRdg9FuF5fa5khLW6k7BQVg+3g6htyEO7papNj8Th9q8hC7EgeO8Rks5aFwFDSeDj9I2khmQ/3RttiLceroGg5Dg6Xph+njKu2H31JrdPWb4kB1W1uKadbNweshQUaM/xsC1s4MrfM3qWiMdZrjnPh1xc7wtDiOdU5NRqKgZGH+49E+PKqfWUrkq6BUnPg== 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 DB6PR0801CA0066.eurprd08.prod.outlook.com (2603:10a6:4:2b::34) by AM0PR08MB4945.eurprd08.prod.outlook.com (2603:10a6:208:157::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.19; Fri, 23 Aug 2019 10:56:42 +0000 X-Received: from AM5EUR03FT003.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::202) by DB6PR0801CA0066.outlook.office365.com (2603:10a6:4:2b::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.15 via Frontend Transport; Fri, 23 Aug 2019 10:56:41 +0000 Authentication-Results-Original: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; 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 AM5EUR03FT003.mail.protection.outlook.com (10.152.16.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:56:40 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Fri, 23 Aug 2019 10:56:21 +0000 X-Received: from E107187.Arm.com (10.1.195.55) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Fri, 23 Aug 2019 10:56:21 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , Subject: [edk2-devel] [PATCH v1 07/19] DynamicTablesPkg: Fix Boot arch flag width Date: Fri, 23 Aug 2019 11:55:27 +0100 Message-ID: <20190823105539.13260-8-sami.mujawar@arm.com> In-Reply-To: <20190823105539.13260-1-sami.mujawar@arm.com> References: <20190823105539.13260-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;IPV:NLI;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(136003)(346002)(39860400002)(376002)(396003)(2980300002)(199004)(189003)(478600001)(51416003)(7696005)(5660300002)(48376002)(70206006)(70586007)(53936002)(1076003)(426003)(16586007)(50466002)(336012)(63370400001)(54906003)(446003)(11346002)(53416004)(26005)(81166006)(81156014)(126002)(486006)(2616005)(76176011)(476003)(356004)(8936002)(316002)(8676002)(86362001)(44832011)(4326008)(186003)(63350400001)(36756003)(2906002)(14444005)(50226002)(2351001)(305945005)(47776003)(6916009);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR08MB4945;H:nebula.arm.com;FPR:;SPF:TempError;LANG:en;PTR:InfoDomainNonexistent;A:1;MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c71ae930-7caa-4e55-9885-08d727b89baa X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(2017052603328);SRVR:AM0PR08MB4945; X-MS-TrafficTypeDiagnostic: AM0PR08MB4945:|AM6PR08MB4951: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true X-MS-Oob-TLC-OOBClassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: urkFh4RO4+wqtL38uJx8A5b0q7i0Sm8eheHF+D+E7nmSOlZRAaU/T4g+UoS2OQLaZTrRttckPvoFUWuwfwXQc9WRi63MEqyZodmp7IIUNREgwMZdZBHRA3XMjlpZmJJLCpiEazG/RmodfDpfP50NVI4NoQqgZ+TcqVPABxofJCK3llCRMrt/qPq4LCO3gtfREDWJDm5FGzIG4jfYqcyhKWS3BLrwfmTTEwAeB6rwn4sV8+vTnh7PPWpWC+eIMbbJ8+XrqGnl9vvLiP5zhyvPCG60Iqj+QMcnJ6IS7Nl4tcJELT9UCm+2P2536Ia3ZPyv+cEjTzEOgWGjZ5KF7fXyi0QOUB5lH3Y8YyUSfP3FDkJiH/3IlWROMBWjxWYDzKLOpdZn5SkR1e2ahte0jWxHdsr0wzcH68g4vxQVptBwwtI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4945 Original-Authentication-Results: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT064.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: ee1a4f8e-d2e8-4d28-383a-08d727b893ca NoDisclaimer: True X-Microsoft-Antispam-Message-Info: tLvtFYun3re7UYSOG6H72kEt+yHMvjzt3DROIPcPt9z9A4L+Sxl3hYELrxZAjEL49jbzeWSbn5SiS91oKRyX+g8BenqowvXYECaoHV+x4k1XS8Wf5mJJFCLYy8ZgopVXwyEFDEW+lzl5l+3R45N6wpj5DxeowENsLb9USIkLD58R9FdoH+H56r5dkxF99zDyKStt4HQOIjlwGTsYEOagrm/43hB7XBvDFUZ8gNb0UzHVPWvqgf6+XHItt4XVUbi4RxrXZ+/9wxs7ReqbPorkKacfyl+DdfzBgaFaG2JW2ldrT1F7mxH6yTrScr0y5ZUIopMjx1HsN8EBzWBq4pOwWSwMyArjcbUGd3aJ+NMTALI5ukeHVHZE15RGEA0JeU7+NhXYsMMKRAU3lL5j4Z0Ap6hnrO9sUShYnStjfmxpb4o= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2019 10:56:53.4007 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c71ae930-7caa-4e55-9885-08d727b89baa X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4951 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,sami.mujawar@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1566557819; bh=KO4l+F4dcSBNX+zgEM5jrmEsPBJDpL9ECo0XZYfl+w8=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=IsbX619WYCdulQLFuOEbcBQN+3itvNw/YGfKcVCJaBnk8RTJVdc5gnuzWxVzMK3YFgV PtciGBCgnV4XfEn2h62cO52gjaWxYpPGddTzBsEjHK0iiFUqN6/yVIQp+FH60B1iUQA/l YpL1jQCm1XhtHt3tiVDhYfBSx1v2k9sPEVU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The ArmBootArch field of the FADT table is 16-bit wide. The VS2017 compiler reports 'warning C4244: '=3D': conversion from 'UINT32' to 'UINT16', possible loss of data' when assigning the CM_ARM_BOOT_ARCH_INFO.BootArchFlags value as the width of this field in CM_ARM_BOOT_ARCH_INFO is 32-bit wide. To fix this warning, update the CM_ARM_BOOT_ARCH_INFO struct to make the BootArchFlags field 16-bit wide. This also makes it compatible with the ACPI FADT specification. Signed-off-by: Sami Mujawar --- DynamicTablesPkg/Include/ArmNameSpaceObjects.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTables= Pkg/Include/ArmNameSpaceObjects.h index f08b8257678c8b6aacc863bbe1db09587b51a291..cd955379c90d8633c89e324b556= 7643d2676e557 100644 --- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h @@ -64,7 +64,7 @@ typedef struct CmArmBootArchInfo { /** This is the ARM_BOOT_ARCH flags field of the FADT Table described in the ACPI Table Specification. */ - UINT32 BootArchFlags; + UINT16 BootArchFlags; } CM_ARM_BOOT_ARCH_INFO; =20 /** A structure that describes the --=20 '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 (#46266): https://edk2.groups.io/g/devel/message/46266 Mute This Topic: https://groups.io/mt/32999782/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 Tue May 7 11:53:29 2024 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+46269+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 1566557839932984.2498692707255; Fri, 23 Aug 2019 03:57:19 -0700 (PDT) Return-Path: X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com (EUR04-DB3-obe.outbound.protection.outlook.com [40.107.6.41]) by groups.io with SMTP; Fri, 23 Aug 2019 03:57:18 -0700 X-Received: from DB6PR0801CA0065.eurprd08.prod.outlook.com (2603:10a6:4:2b::33) by VE1PR08MB4958.eurprd08.prod.outlook.com (2603:10a6:803:110::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.20; Fri, 23 Aug 2019 10:57:13 +0000 X-Received: from DB5EUR03FT057.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::205) by DB6PR0801CA0065.outlook.office365.com (2603:10a6:4:2b::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.14 via Frontend Transport; Fri, 23 Aug 2019 10:57:13 +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+46269+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 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT057.mail.protection.outlook.com (10.152.20.235) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:57:12 +0000 X-Received: ("Tessian outbound 3aa685aedf5f:v27"); Fri, 23 Aug 2019 10:57:10 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a75fd91cea5c39a5 X-CR-MTA-TID: 64aa7808 X-Received: from a8ce5c5d62ca.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.8.55]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8D6C190E-CEAD-4008-A5E4-A90002F51AC3.1; Fri, 23 Aug 2019 10:57:05 +0000 X-Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-am5eur03lp2055.outbound.protection.outlook.com [104.47.8.55]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a8ce5c5d62ca.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 23 Aug 2019 10:57:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CPYqBU2eiUdvHD5SgPVfXuRdJD4fbWuc7msQ5Ve+gMdfeDijwK3i/yv6+CxfBRWXgd19sZbM061OL+w7iC4V9ynOugI1xCLc42/blv5YH8ho1nOCWIsoZJybGZJdQ+VU51sGFnDTMeFGEgcR9OGX+8xaJXVoppGjVqFy+90SlhNYW5crBfnzsm14moRpoZbY9yNnNU3IzNcRVfPKbt+vfVDSVgbQ0Oja/3W91iusnp1SW973CmjFCmJ2oxiK5If5wxrt0/Z5HEzV5ttsZ8EpS7wlmgOWmLGwzikZMzOC21slDjDm3WBM3erqRJ0/dgJgfY07edPU86K3N3W9P5Koww== 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=BdyL+DKly/xrpkl6CbrCPa0Kt6jsuqTPZeXupGnfhPQ=; b=N2wctfXQpD0hKfilX1Icnul/Dnh94uEAp7bHCTA9tMveq1qpzTFFDX7vIo1/uXd7dfmL6Lp1ZiH5XBw21Hxu5MxAHJb6+8jGsgyzP4bjoUfe/CR2WFW6ncXp/MepR2o4a/i3Fb02M9VvjaMMukEY/UnL90h8AWHIxHWPhZBuPPBud2Aprzd9XV/ZRsVmb7M6j9Or8WERytVIt6Cp7gyReCSKgqIqjosvY7FmBQhV23MiW5h8bMHkWnt2KRhbDMXLNXu/ERyV0StnZZhEiiRh4xc/7RJgpx2POyFmSyeJjD4UiAELqAWpzkCjmJrtqLgF/FWUqxKwoUFWNZRUKJ2xPw== 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 VI1PR0802CA0032.eurprd08.prod.outlook.com (2603:10a6:800:a9::18) by VI1PR0802MB2608.eurprd08.prod.outlook.com (2603:10a6:800:ae::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.18; Fri, 23 Aug 2019 10:56:59 +0000 X-Received: from AM5EUR03FT033.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::205) by VI1PR0802CA0032.outlook.office365.com (2603:10a6:800:a9::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.15 via Frontend Transport; Fri, 23 Aug 2019 10:56:59 +0000 Authentication-Results-Original: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; 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 AM5EUR03FT033.mail.protection.outlook.com (10.152.16.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:56:58 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Fri, 23 Aug 2019 10:56:22 +0000 X-Received: from E107187.Arm.com (10.1.195.55) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Fri, 23 Aug 2019 10:56:22 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , Subject: [edk2-devel] [PATCH v1 08/19] DynamicTablesPkg: Fix ACPI table rev field width Date: Fri, 23 Aug 2019 11:55:28 +0100 Message-ID: <20190823105539.13260-9-sami.mujawar@arm.com> In-Reply-To: <20190823105539.13260-1-sami.mujawar@arm.com> References: <20190823105539.13260-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;IPV:NLI;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(396003)(346002)(136003)(376002)(39860400002)(2980300002)(189003)(199004)(426003)(478600001)(47776003)(51416003)(53416004)(86362001)(81156014)(76176011)(2351001)(8936002)(50226002)(8676002)(81166006)(7696005)(70206006)(53936002)(186003)(305945005)(16586007)(26005)(50466002)(48376002)(70586007)(4326008)(5660300002)(446003)(1076003)(54906003)(36756003)(2616005)(6916009)(11346002)(356004)(486006)(316002)(336012)(476003)(126002)(2906002)(63370400001)(63350400001)(44832011)(14444005);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0802MB2608;H:nebula.arm.com;FPR:;SPF:TempError;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 66008318-5865-4251-07c2-08d727b8a739 X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600166)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328);SRVR:VI1PR0802MB2608; X-MS-TrafficTypeDiagnostic: VI1PR0802MB2608:|VE1PR08MB4958: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true X-MS-Oob-TLC-OOBClassifiers: OLM:6108;OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: VvKeFiM3JOyL1YHL9h805L/YayblK+FmjxmcQYcnNrZ17pFhHw9XNt+ds4UfcUO56Vs5LWbfrAT8OhKqvuW6mBOrvyENXeQFY/EKWCSMlVbMD0+uqwXqJaou+bFdNJrp15XWpZp/P41CTqMOvpJlUOGr8yVi89Saj/yeUAszDcjSEJHVoVdl+m/mZUfjVV98ZgRQdsS34a62Heta0YUIPxTHaMfYcmzZjg45yLE1ZJ3jNKPwXll44ziqMJwLEgRe/XwuU+yyNlo+Zy6xtc9GUKqJerxzYNS/nDmzJxmfC/sGEDdnWp8SqQ07/nHSlwp9BAKnpmDmDWHnJDamhaR9bIk5QIAittuvXo4RHNmiFM+NxMa8WHV6uFjXqlLkb65zaEKV793s1XRf0hA2r213TGmfMjAd4lQrYNztBV6S3AM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2608 Original-Authentication-Results: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT057.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 098e133a-49d2-428a-d157-08d727b89e60 NoDisclaimer: True X-Microsoft-Antispam-Message-Info: YOAbrGEvTaFeVORHLgcpGLllWp7/ZWxvdYl0jdRUltuo+v4v0RiPcz/L3fCRdyI1pOx4SejtD+OJaiwu/gCTp+A/povggro0Whk4bMd4SlHO8FPQBiBGBWkr70Ew6seebirBO0TF6ex3fqYsuKABvJQLAV2ATso90I3c72U9PxsSpL0LNELlntHEOsIhT417uxY+YEK9SLM9uFRQhELlOQTIHFOecw3WfGcsb4SJdw87AI1OMo8o2el+ixdcqW5CNdGqhk+Mlu1TfLn+bXMCNdrXtE5ZjLMzGUQ6jFWMT7fncS0X/LDrpnoiVDpOovKAtb7KtPwLQpM05fjIS6hW3Y9BkA4XEu8Q8+PGYn6EJpvDKlWzfQGV5MzfcUu1vDpYR2yXGbKvak5yhwfiaUp/MtpJFeq+ISik7nhtNw66uUI= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2019 10:57:12.8652 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 66008318-5865-4251-07c2-08d727b8a739 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4958 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,sami.mujawar@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1566557839; bh=nzCpB9x0Ev8bQUclYZVmfUihjgUh8WguW9GctBPyKug=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=Y9RfVXdKomp+nb+CDAEtbhTsLtdATj5OcJuPQGwdSdr1e3e30s12ytn5EOk1bkZWNrQ CgR2042yqS+6XeeGOukGy+I5DLIPx5lxqVpUVs7CqBXd5wvJX3M64K9T2j7nFeXP0tTyq OxG0zKV6q9UNnXqES9ASFX5ClEMpa+USkkQ= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The VS2017 compiler reports 'warning C4244: '=3D': conversion from 'const UINT32' to 'UINT8', possible loss of data' when the ACPI table revision field is being updated. The width of the revision field in the EFI_ACPI_DESCRIPTION_HEADER struct is 8-bit wide. Therefore, to fix the above warning make the ACPI Table revision field usage 8-bit wide across Dynamic Tables Framework. Signed-off-by: Sami Mujawar Reviewed-by: Alexei Fedorov --- DynamicTablesPkg/Include/AcpiTableGenerator.h | 4 ++-- DynamicTablesPkg/Include/StandardNameSpaceObjects.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DynamicTablesPkg/Include/AcpiTableGenerator.h b/DynamicTablesP= kg/Include/AcpiTableGenerator.h index 7d6d3442276db7b4abaeb3b053ba489258adea0b..d7a1209c4d40c2e6ffb3dac786c= 276a30d70b6df 100644 --- a/DynamicTablesPkg/Include/AcpiTableGenerator.h +++ b/DynamicTablesPkg/Include/AcpiTableGenerator.h @@ -284,10 +284,10 @@ typedef struct AcpiTableGenerator { UINT32 AcpiTableSignature; =20 /// The ACPI table revision. - UINT32 AcpiTableRevision; + UINT8 AcpiTableRevision; =20 /// The minimum supported ACPI table revision. - UINT32 MinAcpiTableRevision; + UINT8 MinAcpiTableRevision; =20 /// The ACPI table creator ID. UINT32 CreatorId; diff --git a/DynamicTablesPkg/Include/StandardNameSpaceObjects.h b/DynamicT= ablesPkg/Include/StandardNameSpaceObjects.h index 21bb7de4044ffd6f97156f761e30fc1790f11c0c..0ba6b163691ea127ae7a7d57fb5= f9fdf84789338 100644 --- a/DynamicTablesPkg/Include/StandardNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/StandardNameSpaceObjects.h @@ -79,7 +79,7 @@ typedef struct CmAStdObjAcpiTableInfo { UINT32 AcpiTableSignature; =20 /// The ACPI table revision - UINT32 AcpiTableRevision; + UINT8 AcpiTableRevision; =20 /// The ACPI Table Generator ID ACPI_TABLE_GENERATOR_ID TableGeneratorId; --=20 '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 (#46269): https://edk2.groups.io/g/devel/message/46269 Mute This Topic: https://groups.io/mt/32999787/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 Tue May 7 11:53:29 2024 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+46268+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 1566557837798148.55723362485276; Fri, 23 Aug 2019 03:57:17 -0700 (PDT) Return-Path: X-Received: from EUR03-VE1-obe.outbound.protection.outlook.com (EUR03-VE1-obe.outbound.protection.outlook.com [40.107.5.49]) by groups.io with SMTP; Fri, 23 Aug 2019 03:57:16 -0700 X-Received: from HE1PR0802CA0010.eurprd08.prod.outlook.com (2603:10a6:3:bd::20) by AM6SPR01MB14.eurprd08.prod.outlook.com (2603:10a6:209:3c::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.18; Fri, 23 Aug 2019 10:57:11 +0000 X-Received: from AM5EUR03FT054.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::202) by HE1PR0802CA0010.outlook.office365.com (2603:10a6:3:bd::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.14 via Frontend Transport; Fri, 23 Aug 2019 10:57:11 +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+46268+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 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT054.mail.protection.outlook.com (10.152.16.212) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:57:09 +0000 X-Received: ("Tessian outbound 4ee777a495a5:v27"); Fri, 23 Aug 2019 10:57:09 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: fa66d4c7401ee795 X-CR-MTA-TID: 64aa7808 X-Received: from fb679d1035a9.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.14.58]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id AC5B32C6-EEAA-482C-8111-7298D68AA322.1; Fri, 23 Aug 2019 10:57:03 +0000 X-Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04lp2058.outbound.protection.outlook.com [104.47.14.58]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id fb679d1035a9.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384); Fri, 23 Aug 2019 10:57:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VgNq0KuVgglOd2uTVYuS4oDLZIt/2HbwrBRzC5Og8kujjkgL/MZkX+WObqDaZ93fTzaOyXIYXdg78FBLSrNbUi8mxR3ud5uycjaWRiBSxunoOTCkmugtpRQ1tjLboNepzj1dAE3gvdXsSOuLslzb/KuvPbb9tJ6+Rn4qi/HUHjaBPaPcesOqATsVzeNfGytYhcNbiqj6e/dslS9rYhffD+z6+CxiSGIdIIucEvYZ806QJVU7uq1hI/aTPyaVnOn5G0Cnjjc4gQd5B4F7jv4PBY0XjdTiM1ltj7nlOavu26l08IeYsB9sCxF4uICH+va2/guOuOA78QBTYN7QhqawMQ== 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=cZR+FSgHYiRws2EF1diUudTo/SgsxqLZWiWS5HL2Tsg=; b=HQnUqucqwUFrpjnvZA+1VIWBTEzkXc46PTLIXqj83oniQOe0I1/XkW365eUZ5hVnOhWH9V74/BjzeCGbxPrDdn/lLst+zR7iAQKHWADobyq07bBAW5+BZ6Cwt1Ovf+tLwmEKk3rzEJ+h/uKdoiXgXJiH+1yTgk+w0EZfHLeGzoC8hhCGy+wtl+OSts8+zryMmSzFtYIjiltfeh8pNqSpSxf0G/bCLwgyL2Q8L2YynuZlVnzxWRTng7bnI2nxCpJpTp+LnoId+SkhDJ1Nvm51gz9PbSt3UHMeD5LBrm5R1ZIn7hE3RRdJb5nm8Q27dZMLJlAkYazz5479wuAX5rgv0A== 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 VE1PR08CA0019.eurprd08.prod.outlook.com (2603:10a6:803:104::32) by HE1PR0802MB2603.eurprd08.prod.outlook.com (2603:10a6:3:e0::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.16; Fri, 23 Aug 2019 10:57:01 +0000 X-Received: from AM5EUR03FT011.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::201) by VE1PR08CA0019.outlook.office365.com (2603:10a6:803:104::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.14 via Frontend Transport; Fri, 23 Aug 2019 10:57:00 +0000 Authentication-Results-Original: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; 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 AM5EUR03FT011.mail.protection.outlook.com (10.152.16.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:56:59 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Fri, 23 Aug 2019 10:56:22 +0000 X-Received: from E107187.Arm.com (10.1.195.55) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Fri, 23 Aug 2019 10:56:22 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , Subject: [edk2-devel] [PATCH v1 09/19] DynamicTablesPkg: Fix unaligned pointers usage Date: Fri, 23 Aug 2019 11:55:29 +0100 Message-ID: <20190823105539.13260-10-sami.mujawar@arm.com> In-Reply-To: <20190823105539.13260-1-sami.mujawar@arm.com> References: <20190823105539.13260-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;IPV:NLI;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(376002)(396003)(39860400002)(346002)(136003)(2980300002)(189003)(199004)(2616005)(76176011)(14444005)(86362001)(6916009)(70206006)(70586007)(1076003)(16586007)(81156014)(54906003)(7696005)(51416003)(81166006)(47776003)(316002)(8936002)(8676002)(305945005)(186003)(26005)(36756003)(336012)(50466002)(2906002)(50226002)(4326008)(356004)(5660300002)(2351001)(53416004)(63370400001)(478600001)(63350400001)(11346002)(446003)(426003)(44832011)(53936002)(126002)(48376002)(486006)(476003);DIR:OUT;SFP:1101;SCL:1;SRVR:HE1PR0802MB2603;H:nebula.arm.com;FPR:;SPF:TempError;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c7534d67-840f-4291-c798-08d727b8a507 X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(2017052603328);SRVR:HE1PR0802MB2603; X-MS-TrafficTypeDiagnostic: HE1PR0802MB2603:|AM6SPR01MB14: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true X-MS-Oob-TLC-OOBClassifiers: OLM:3826;OLM:3826; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: 71PX83e5BDby9npWb1ar2dD8Nl5MVxCZw1nJVgqwy4UxVPblwNbmxf8qxtG9pWzigkuGRto7yax/9LW4XHr0SSDw6SejzZTT0acCFEpVaosnNNWKXUfG2LAUAYcFi8YzmHXFgfncnwiBsnZ/9HNc8ANY1VaY5cjBnzQDyItCbY+m2rxCL/KaGAKBWZ9HOV0hMCKPi7D/zlxpv6npd77T/dHuaKEocsxkJdC3Rltw+7CYGnnfQPeZRMuLJ/ELEOgI5pzmVpzZUMZUVwhuNB5VPq7D8/kXMDNgzsIaEaCLn2poM8uYNQYTqXfjGNa2Dv9jNbcOVnsRON5teDK7+4BTgkEU1q/dYVGqrxytQlbRLXAUzyB4fk029ylKhC+qaHdAXGIG0mtntTBth/ewjWe4NPtkEPhEPs7yeWIitIjExQc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0802MB2603 Original-Authentication-Results: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT054.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 336e7bde-92e7-4c4c-5f11-08d727b89eff NoDisclaimer: True X-Microsoft-Antispam-Message-Info: Ou+9HkmOfw8SIoTNwYvA0SRgnGiXL5ztME699OzxD7cK1FVD6j3FoMtqGBfAhlaLAzASaZVdSaeNkyWGgq1HZvItT21O2J2OFB8OGzqy9A5JDzhF+x25jgQ9iW+OZK0s45B/I+a1arIBmLAxm/ZT+ri5C/mip6bpq7WY0fkz+qM+ShSkg9OvPw5b8hLQitG+yfzfJgJScleUZgxI4tNrXs67L5hdOdO4AVdkwO9xIVusuvvoglwtSZ8Nm0gxO25whwb4f4/pgKzOIUHGTTt1oPSQGwzh5cthbLj07J0StvEtwhUsw0pUu+HJwpX152m8FGWvDbixmLIAog9MFWbJvDXr4GGVN6FHMP446n7ALAXFcsSTyBq4weTS/Mczt93qfNIY2K1dlRlz7rNpeCdGBL1ewFvsDlfpFKlPWuqKtRM= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2019 10:57:09.1700 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c7534d67-840f-4291-c798-08d727b8a507 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6SPR01MB14 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,sami.mujawar@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1566557837; bh=6lIJ7hhXL+lhLbQoqCu8c5Uh6aZuAnNUhf1ssyV+gHc=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=XOGPqb3yc9GbDfh1x3bvNapg/HqvibP0S5U6k5JZqf7czjFfkXp1VXL30tXUC18r3il q74LfAmoFAuyW/HB2iOHJQiveLzMFNSMozGSjCzgbRetDCL1HmotZE/FM5fCWuWvi9Bcy Q/hGFLHJWItqLyYJArMHgA2U33pekHO0BbA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The VS2017 compiler reports 'warning C4366: The result of the unary '&' operator may be unaligned' if an address of an unaligned structure member is passed as an argument to a function. Fix this warning by using local variables in place of unaligned structure members. Signed-off-by: Sami Mujawar Reviewed-by: Alexei Fedorov --- DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c | 24 ++++= +++++++++++----- DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.h | 13 ++++= +------ 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c index 40699ce113caa8530c89ac20562cf5abda26b88e..82070403ac8757f54e839fd00eb= 4acb3292fc60c 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c @@ -1066,6 +1066,9 @@ BuildPpttTable ( EFI_STATUS Status; UINT32 TableSize; UINT32 ProcTopologyStructCount; + UINT32 ProcHierarchyNodeCount; + UINT32 CacheStructCount; + UINT32 IdStructCount; =20 UINT32 ProcHierarchyNodeOffset; UINT32 CacheStructOffset; @@ -1113,7 +1116,7 @@ BuildPpttTable ( CfgMgrProtocol, CM_NULL_TOKEN, &ProcHierarchyNodeList, - &Generator->ProcHierarchyNodeCount + &ProcHierarchyNodeCount ); if (EFI_ERROR (Status)) { DEBUG (( @@ -1124,7 +1127,8 @@ BuildPpttTable ( goto error_handler; } =20 - ProcTopologyStructCount =3D Generator->ProcHierarchyNodeCount; + ProcTopologyStructCount =3D ProcHierarchyNodeCount; + Generator->ProcHierarchyNodeCount =3D ProcHierarchyNodeCount; =20 // Get the cache info and update the processor topology structure count = with // Cache Type Structures (Type 1) @@ -1132,7 +1136,7 @@ BuildPpttTable ( CfgMgrProtocol, CM_NULL_TOKEN, &CacheStructList, - &Generator->CacheStructCount + &CacheStructCount ); if (EFI_ERROR (Status) && (Status !=3D EFI_NOT_FOUND)) { DEBUG (( @@ -1143,7 +1147,8 @@ BuildPpttTable ( goto error_handler; } =20 - ProcTopologyStructCount +=3D Generator->CacheStructCount; + ProcTopologyStructCount +=3D CacheStructCount; + Generator->CacheStructCount =3D CacheStructCount; =20 // Get the processor hierarchy node ID info and update the processor top= ology // structure count with ID Structures (Type 2) @@ -1151,7 +1156,7 @@ BuildPpttTable ( CfgMgrProtocol, CM_NULL_TOKEN, &IdStructList, - &Generator->IdStructCount + &IdStructCount ); if (EFI_ERROR (Status) && (Status !=3D EFI_NOT_FOUND)) { DEBUG (( @@ -1163,7 +1168,8 @@ BuildPpttTable ( goto error_handler; } =20 - ProcTopologyStructCount +=3D Generator->IdStructCount; + ProcTopologyStructCount +=3D IdStructCount; + Generator->IdStructCount =3D IdStructCount; =20 // Allocate Node Indexer array NodeIndexer =3D (PPTT_NODE_INDEXER*)AllocateZeroPool ( @@ -1475,6 +1481,12 @@ ACPI_PPTT_GENERATOR PpttGenerator =3D { =20 // Processor topology node count 0, + // Count of Processor Hierarchy Nodes + 0, + // Count of Cache Structures + 0, + // Count of Id Structures + 0, // Pointer to PPTT Node Indexer NULL }; diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator= .h b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.h index 6a0fdd08e1533c57285f420555586314c70a5ed5..0a14da502d595e27d87262b1bac= 681318f1d9ced 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.h +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.h @@ -167,6 +167,12 @@ typedef struct AcpiPpttGenerator { ACPI_TABLE_GENERATOR Header; /// PPTT structure count UINT32 ProcTopologyStructCount; + /// Count of Processor Hierarchy Nodes + UINT32 ProcHierarchyNodeCount; + /// Count of Cache Structures + UINT32 CacheStructCount; + /// Count of Id Structures + UINT32 IdStructCount; /// List of indexed CM objects for PPTT generation PPTT_NODE_INDEXER * NodeIndexer; /// Pointer to the start of Processor Hierarchy nodes in @@ -176,13 +182,6 @@ typedef struct AcpiPpttGenerator { PPTT_NODE_INDEXER * CacheStructIndexedList; /// Pointer to the start of Id Structures in the Node Indexer array PPTT_NODE_INDEXER * IdStructIndexedList; - /// Count of Processor Hierarchy Nodes - UINT32 ProcHierarchyNodeCount; - /// Count of Cache Structures - UINT32 CacheStructCount; - /// Count of Id Structures - UINT32 IdStructCount; - } ACPI_PPTT_GENERATOR; =20 #pragma pack() --=20 '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 (#46268): https://edk2.groups.io/g/devel/message/46268 Mute This Topic: https://groups.io/mt/32999786/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 Tue May 7 11:53:29 2024 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+46273+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 1566557861382287.2713260693175; Fri, 23 Aug 2019 03:57:41 -0700 (PDT) Return-Path: X-Received: from EUR03-VE1-obe.outbound.protection.outlook.com (EUR03-VE1-obe.outbound.protection.outlook.com [40.107.5.50]) by groups.io with SMTP; Fri, 23 Aug 2019 03:57:40 -0700 X-Received: from VI1PR08CA0184.eurprd08.prod.outlook.com (2603:10a6:800:d2::14) by AM6PR08MB4949.eurprd08.prod.outlook.com (2603:10a6:20b:ee::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.16; Fri, 23 Aug 2019 10:57:35 +0000 X-Received: from DB5EUR03FT019.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::205) by VI1PR08CA0184.outlook.office365.com (2603:10a6:800:d2::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.14 via Frontend Transport; Fri, 23 Aug 2019 10:57:35 +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+46273+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 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT019.mail.protection.outlook.com (10.152.20.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:57:34 +0000 X-Received: ("Tessian outbound 85b7b0590c81:v27"); Fri, 23 Aug 2019 10:57:31 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d5924438099b6406 X-CR-MTA-TID: 64aa7808 X-Received: from d44c109efaad.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.0.52]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id 3EA597D4-A2F9-4504-8FEF-65779A3ABD31.1; Fri, 23 Aug 2019 10:57:31 +0000 X-Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp2052.outbound.protection.outlook.com [104.47.0.52]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d44c109efaad.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384); Fri, 23 Aug 2019 10:57:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MVOVfCTW5HcQlZm1F6sBtwf/S1z/529a65aRUAhaX78Sxz4Pt1qo4SqP6RvujPiwvKHzeudzbwMcAdeI6PDCXJ1Jw87zEq742UHjPA9ag4l/qgbOu1yA2779RduJ7kM3jyFoohwNcT8dFnbtaDMqUQ7+/DNEbnPhnChgkWHtffY51mGZJ2TKV2WQbqWM0HfTdOb6GUdmJLfn3cMNMn0+y4oog2R6b28LoX0vaHLOi2I5nk8SaJIOSJAPvH6aVaGwQRkMBC5TtyBT7RzAAZYkCFPB2X9QT+/QpgE6n1iGiGAuLim8LcGWxrdubHfeiFnApF58N/loDzFkvXB+ff48cQ== 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=4+rvSQbYeyJsY+M8b1t1C+VkcWcbyH022NXW+CikVpQ=; b=D+1bib+c9DNLqWdd2Nd9uJAsQbXsbTrqGQ3zTTKxQqwcjtA89DY/keS0bUCaI9GLHFmlY3Xh7W+miVBYbWGO2yWfssN7qKJZDiiNIMdKed1ANSG8h6drE+7obiOXWupe9C6fICYIdxf5jcK5E184FknEodvETah4v4oLlz5X7iaRIu/aAS4rRqm5XyC0HEwlAnrUZEymqs+Difr8UfoMR1f0ZRrFKQ0KDaVXKb6ydsS7q7c6cGjrDeukE5JN4tbkDHorXnwy3QJs13AsoPrXJI/GHcSAw/y3tb2svDAOVSGSTk9+5qb75jNm2lWAAXbdeE+CuUGEjjZacILneTIrkw== 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 DB7PR08CA0029.eurprd08.prod.outlook.com (2603:10a6:5:16::42) by AM0PR08MB4948.eurprd08.prod.outlook.com (2603:10a6:208:163::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.19; Fri, 23 Aug 2019 10:57:29 +0000 X-Received: from AM5EUR03FT015.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::207) by DB7PR08CA0029.outlook.office365.com (2603:10a6:5:16::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.17 via Frontend Transport; Fri, 23 Aug 2019 10:57:29 +0000 Authentication-Results-Original: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; 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 AM5EUR03FT015.mail.protection.outlook.com (10.152.16.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:57:27 +0000 X-Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1415.2; Fri, 23 Aug 2019 10:56:27 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) 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; Fri, 23 Aug 2019 10:56:22 +0000 X-Received: from E107187.Arm.com (10.1.195.55) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Fri, 23 Aug 2019 10:56:22 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , Subject: [edk2-devel] [PATCH v1 10/19] DynamicTablesPkg: Serial debug port initialisation Date: Fri, 23 Aug 2019 11:55:30 +0100 Message-ID: <20190823105539.13260-11-sami.mujawar@arm.com> In-Reply-To: <20190823105539.13260-1-sami.mujawar@arm.com> References: <20190823105539.13260-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;IPV:NLI;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(396003)(136003)(39860400002)(376002)(346002)(2980300002)(199004)(189003)(446003)(336012)(426003)(63350400001)(63370400001)(186003)(1076003)(44832011)(53416004)(486006)(70586007)(6666004)(11346002)(2616005)(36756003)(126002)(356004)(476003)(70206006)(2351001)(2906002)(16586007)(51416003)(26005)(76176011)(54906003)(316002)(8676002)(7696005)(6916009)(86362001)(5660300002)(50466002)(48376002)(47776003)(305945005)(53936002)(8936002)(4326008)(50226002)(478600001)(81166006)(81156014);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR08MB4948;H:nebula.arm.com;FPR:;SPF:TempError;LANG:en;PTR:InfoDomainNonexistent;A:1;MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 03ca78f8-d188-4ec3-f6ff-08d727b8b3d5 X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(2017052603328);SRVR:AM0PR08MB4948; X-MS-TrafficTypeDiagnostic: AM0PR08MB4948:|AM6PR08MB4949: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true X-MS-Oob-TLC-OOBClassifiers: OLM:8273;OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: sxDaDXmiXHOo6dY0TqBM8Bm17E+e1DG6PSU48+sKoGcwkvh10KTgOSda1hNAaDDxZ6+QcVYXu+kp/nh5Oje6KofjlMSGa5EuAK+7A6pe+8ICztVSLSfjCPcHZidOlR2eemyb8ghPncWwxWL73nLafcvFOCQUc5ffuzG0qOkb9aj8f5+ioLbvzT4mVvs34OOfYXfHIUSYfQFpzsGfoSo6L3ySnkgMP8dOhEmRj951GjK201w95x+ZQH27lp/ZBkxTrJR/83AUPdD8ZpZ3Lcmlu2r02KanudsXJQJ5uQn7x8UaN461u4jAKmrQiqqAVjEtPa1jcoRdEmcJbWv8cDUalhwSvlRq96DDNkYajE5dUs5cIhzqmt6wuf9FzGxeA3JcbBN0zjVSRMtztKl6nc9wMyuZlNxmJhMzn2LlpYaM2gc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4948 Original-Authentication-Results: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT019.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 4851f880-f5b3-4a9d-a1c8-08d727b8afb8 NoDisclaimer: True X-Microsoft-Antispam-Message-Info: Mwzr0OY7HwdglsajGN7DOuh4/lk//DVN7a0VSYj3xZpAtnGs6KIYHY/NciuV66aMR2fZGKKDlVjaUa+vcbXB+eNqXM3vkAOVnxCeLkRYOF2MwR2gIpbzCzmFFfaFiEje/4luSLgEHG0r1VK+RFGRNp7ownFXiLboLcEHCJ0kqnlYm228TOcXlPJUepCqEBKxzlvNz5yRSC3c/1ZZYmafC3xseLE4qRYIRcXViPX4A58ynC5VIMZ+OwmT21emSbn3abRWMW7GOnsARQK5MLAbkpsOyOvrG72bavo6CnNv1u/Z4pZ/GMU2htJbqq9elFxQ4N0PE+efyB0fzBVukRLCyfHcIgBhooXL4kWBJEWPg2xK/typ+BtVMEIRYLRnK4LlNHw0MunUi+WOZ22eC3R2U5Y1qvVn+lBN+KDsQQnhSME= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2019 10:57:34.0273 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 03ca78f8-d188-4ec3-f6ff-08d727b8b3d5 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4949 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,sami.mujawar@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1566557861; bh=Wad2ntYeMH22u2FTsZ3xrwPxHDapkne2ThrvImXcYvg=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=EbkcxAKl/J69eCJCPXOXmguMn/TSqPGXnHzKUpmkPkEkzuxE7kRV70KxX5IJkzlylOA buV2FO/zv89zmM0EnrOVP9ANciETkhdxHL/AKAfPtXC0mh/a0yCYqf+G3SN0VdOx58tkJ 7IJp+27F3fGakDWEBnqynhyL2AQllqlAywE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The ARM DCC serial port subtype is an option that is supported by the DBG2 generator. However, the serial port initialisation should only be done for PL011/SBSA compatible UARTs. Add check to conditionally initialise the serial port. Signed-off-by: Sami Mujawar Reviewed-by: Philippe Mathieu-Daude --- DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c | 27 ++++= ++++++++-------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c index 346ab5b22f5402bf87c385558f68f080d1b454ed..51c843d25f75388104694855ce1= 33b3d61860196 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c @@ -175,7 +175,7 @@ GET_OBJECT_LIST ( CM_ARM_SERIAL_PORT_INFO ); =20 -/** Initialize the PL011 UART with the parameters obtained from +/** Initialize the PL011/SBSA UART with the parameters obtained from the Configuration Manager. =20 @param [in] SerialPortInfo Pointer to the Serial Port Information. @@ -353,15 +353,22 @@ BuildDbg2Table ( AcpiDbg2.Dbg2DeviceInfo[DBG_PORT_INDEX_PORT1].Dbg2Device.PortSubtype =3D SerialPortInfo->PortSubtype; =20 - // Initialize the serial port - Status =3D SetupDebugUart (SerialPortInfo); - if (EFI_ERROR (Status)) { - DEBUG (( - DEBUG_ERROR, - "ERROR: DBG2: Failed to configure debug serial port. Status =3D %r\n= ", - Status - )); - goto error_handler; + if ((SerialPortInfo->PortSubtype =3D=3D + EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_PL011_UART) || + (SerialPortInfo->PortSubtype =3D=3D + EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_SBSA_GENERIC_UART_2X) || + (SerialPortInfo->PortSubtype =3D=3D + EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_SBSA_GENERIC_UART)) { + // Initialize the serial port + Status =3D SetupDebugUart (SerialPortInfo); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "ERROR: DBG2: Failed to configure debug serial port. Status =3D %r= \n", + Status + )); + goto error_handler; + } } =20 *Table =3D (EFI_ACPI_DESCRIPTION_HEADER*)&AcpiDbg2; --=20 '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 (#46273): https://edk2.groups.io/g/devel/message/46273 Mute This Topic: https://groups.io/mt/32999793/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 Tue May 7 11:53:29 2024 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+46272+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 1566557852600428.5569565400805; Fri, 23 Aug 2019 03:57:32 -0700 (PDT) Return-Path: X-Received: from EUR03-DB5-obe.outbound.protection.outlook.com (EUR03-DB5-obe.outbound.protection.outlook.com [40.107.4.53]) by groups.io with SMTP; Fri, 23 Aug 2019 03:57:31 -0700 X-Received: from VI1PR08CA0209.eurprd08.prod.outlook.com (2603:10a6:802:15::18) by AM5PR0801MB1843.eurprd08.prod.outlook.com (2603:10a6:203:3a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.19; Fri, 23 Aug 2019 10:57:27 +0000 X-Received: from VE1EUR03FT063.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::208) by VI1PR08CA0209.outlook.office365.com (2603:10a6:802:15::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.15 via Frontend Transport; Fri, 23 Aug 2019 10:57:27 +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+46272+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 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT063.mail.protection.outlook.com (10.152.18.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:57:26 +0000 X-Received: ("Tessian outbound df6366865adf:v27"); Fri, 23 Aug 2019 10:57:24 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: b4d36b804ca820dd X-CR-MTA-TID: 64aa7808 X-Received: from 024146e04d3c.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.1.58]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id C2FD436B-A664-4493-BE09-AA54D2B572EE.1; Fri, 23 Aug 2019 10:57:19 +0000 X-Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01lp2058.outbound.protection.outlook.com [104.47.1.58]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 024146e04d3c.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 23 Aug 2019 10:57:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A7nzdR3KIB3vMeMsnYK6mBKI/6b/Uvw8/SymHLCxwUTV8R0MvrMIIpQ1JOpZHmH/+hyHfoDGi6FDp7gY31sFxHgd15gAh98cKnv8ZGxOC07+VciRqpEKOIs7T7TOyI/axxn2t4Bo9ZXncqJo23+7GvqY3t0m4HPU1RG3zojmCiaxppr/CqyHsDGFzMOgh7Bkm7igtdem9nZ9Gpa/XVFP36C++iUkVWE7br5QphmoM+6JCyP3zEPoumiKIFUFxsC6xWvVk0dBoaqd4ZahufClV1DDq5arCSlId8Xq8eNIUNnTnAj9nZC3saEoLQXFtvfbcpOJQ3jAtpcDxcO8v2Q3Nw== 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=qvvlFARuyly1j6fL+3kYvIUiiXwYwdllWfOq8dpbO7o=; b=Gpigmo0+kbrByy2aJBC4xqd+Opzc1GR7sf8qv4lutRH7uNtc7dvhG8mOsoN1UZjHB85vrwns0MpWq0W29N75rHdO7wxNiOkKZs4nn1O1vzf9PuSAOsQY6Vq3oCmElA7kIupVs+k868awxKD4y5Ecw3OttwzQfjRc63g3/iG5GR8yJ+YmD14MIjTSKL6HSW290MoM2yG2mIQFvXo5FkfWd4V3k2B6ICLRl3G1BWS6ZqXTx+MK/rW3CGIgT8Vxy9YKo0CQKp1/PIxvgIq26wZpEoCRRZlyHLuK8nVOxIsoHyIniOru8vIoNO+qPRr1gKJdT6Cjv3LG7M+LfZKBZMZIFA== 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 VI1PR08CA0134.eurprd08.prod.outlook.com (2603:10a6:800:d5::12) by AM5PR0801MB1843.eurprd08.prod.outlook.com (2603:10a6:203:3a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.19; Fri, 23 Aug 2019 10:57:17 +0000 X-Received: from AM5EUR03FT017.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::206) by VI1PR08CA0134.outlook.office365.com (2603:10a6:800:d5::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.14 via Frontend Transport; Fri, 23 Aug 2019 10:57:17 +0000 Authentication-Results-Original: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; 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 AM5EUR03FT017.mail.protection.outlook.com (10.152.16.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:57:15 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Fri, 23 Aug 2019 10:56:24 +0000 X-Received: from E107187.Arm.com (10.1.195.55) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Fri, 23 Aug 2019 10:56:24 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , Subject: [edk2-devel] [PATCH v1 11/19] DynamicTablesPkg: Remove redundant frame count check Date: Fri, 23 Aug 2019 11:55:31 +0100 Message-ID: <20190823105539.13260-12-sami.mujawar@arm.com> In-Reply-To: <20190823105539.13260-1-sami.mujawar@arm.com> References: <20190823105539.13260-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;IPV:NLI;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(979002)(4636009)(396003)(136003)(376002)(346002)(39860400002)(2980300002)(199004)(189003)(36756003)(50226002)(8936002)(1076003)(16586007)(70206006)(305945005)(70586007)(47776003)(316002)(6666004)(356004)(53416004)(6916009)(4326008)(53936002)(86362001)(14444005)(44832011)(5660300002)(2351001)(54906003)(81166006)(81156014)(8676002)(50466002)(186003)(48376002)(26005)(126002)(476003)(2616005)(336012)(63350400001)(11346002)(446003)(63370400001)(486006)(478600001)(2906002)(76176011)(7696005)(51416003)(426003)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM5PR0801MB1843;H:nebula.arm.com;FPR:;SPF:TempError;LANG:en;PTR:InfoDomainNonexistent;A:1;MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b2a0b415-087a-4073-cb26-08d727b8af1d X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(2017052603328);SRVR:AM5PR0801MB1843; X-MS-TrafficTypeDiagnostic: AM5PR0801MB1843:|AM5PR0801MB1843: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true X-MS-Oob-TLC-OOBClassifiers: OLM:2043;OLM:2043; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: MzbI3pbqPTbM6sDjEfMAwiMERami9hhWnNufJVh4oM0PAOFK7+lR0plsQUoCVZ0z89xwlBAgm5ImfrtrOOqmacc3Qe4Az3xItMWRdLdS8OKg9hteuOaZcPEumD0ifCsITxFQ41jVS4zuDxBAXx7lwbaQrwHZm94mHRa6zjrHIWCtXSGlfm/NDUwG3feRp3sKV81pFPDh5/YKfC9qzy23lTeWWCMMH52dDXrV1ppxgO9qj4TsPv/7lUvV8zXFS2Jis8OH7jC739B4UcWoJITQ4qiKX3gZP/4Zy5oGACKrzQ1YmI46RlA8qXMw9b3f+qRukN3o3nSw4mPoEqsUvQJNp0vFIJuduZfiIagR0OeWW/QsYP8al25gUfv26AjBM6EOZDlT9xrs9V5KXjD7grizwAZVGwzbl/zNZBbQaQxcWYY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1843 Original-Authentication-Results: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT063.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 996da3f7-360f-4b50-a744-08d727b8a8bb NoDisclaimer: True X-Microsoft-Antispam-Message-Info: JI2uvnNGaXCuIMV9PMACDDyuQg+FIBppT1oopUP7G1fceX+oXSEi3ZQy/zSqopBdmWRqSt2lWHO+DMJ6Ao5078X0hc/IgmhvT0OreV9iWWlv7SpmS6HeUni9aIWNO0cXJ/IZdLfpLpXyxzkMrK7PkNT3juYeHyUI2VJD+ckUdkX2Ra58WQTB9SU5UBt9yGoDnnuDrsTjvcYN78CVFppyaWauXiCcaf1mGZwNVsU8zLOCenQlph5Z6VqGknhV1ednDrByNhqbHr7KnT850WhLQoVoIdquxg9VNlKRkXsR0J8RGLAOeCgj/nEN4e5UE+N62kskCKjJgNQhIqyBrKeHhYlUFM8htXgrsycJL7KaBd+IMeSXh3b7TC3Y2c2M4cqMnezAWCBzWLDfdV/ZZ+uWACmdWx5UkfjhAzB4CCeFiec= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2019 10:57:26.0374 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b2a0b415-087a-4073-cb26-08d727b8af1d X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1843 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,sami.mujawar@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1566557852; bh=aMUgPoRwDqZeHylyEeBC/imRxXQxXQca1C/i2ZEWF4U=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=vjXmYr/0LK0sXQPMnW49qe7tdtr8EFSDm2Z2fKKyMoPuWIAI01EkeVhFQdQUZA7NoFT YdlDvmYMAnx4U+o2/yNK+mnTLSJZwVp9IT2stH8owIBOmmNBtLKXhR/UVopk/Aq2KzpIH SWQK+2c9QsB6TPYLz/SFLbGArY95Q4KGjAU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Removing GT Block frame count check from AddGTBlockTimerFrames() as this is already validated in BuildGtdtTable(). Signed-off-by: Sami Mujawar Reviewed-by: Alexei Fedorov --- DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c | 10 ----= ------ 1 file changed, 10 deletions(-) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c index 0e996698887aefca8a7240fc27fe3cb9324fd3e2..c109f2ac207311646e5a4ad3aa4= 65b1c2883e465 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c @@ -259,16 +259,6 @@ AddGTBlockTimerFrames ( ASSERT (GtBlockFrame !=3D NULL); ASSERT (GTBlockTimerFrameList !=3D NULL); =20 - if (GTBlockFrameCount > 8) { - DEBUG (( - DEBUG_ERROR, - "ERROR: GTDT: GT Block Frame Count %d is greater than 8\n", - GTBlockFrameCount - )); - ASSERT (GTBlockFrameCount <=3D 8); - return EFI_INVALID_PARAMETER; - } - IsFrameNumberDuplicated =3D FindDuplicateValue ( GTBlockTimerFrameList, GTBlockFrameCount, --=20 '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 (#46272): https://edk2.groups.io/g/devel/message/46272 Mute This Topic: https://groups.io/mt/32999791/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 Tue May 7 11:53:29 2024 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+46275+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 1566557867274848.1500908916777; Fri, 23 Aug 2019 03:57:47 -0700 (PDT) Return-Path: X-Received: from EUR03-VE1-obe.outbound.protection.outlook.com (EUR03-VE1-obe.outbound.protection.outlook.com [40.107.5.74]) by groups.io with SMTP; Fri, 23 Aug 2019 03:57:46 -0700 X-Received: from VI1PR08CA0178.eurprd08.prod.outlook.com (2603:10a6:800:d1::32) by VE1PR08MB4959.eurprd08.prod.outlook.com (2603:10a6:803:110::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.16; Fri, 23 Aug 2019 10:57:40 +0000 X-Received: from VE1EUR03FT064.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::209) by VI1PR08CA0178.outlook.office365.com (2603:10a6:800:d1::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.17 via Frontend Transport; Fri, 23 Aug 2019 10:57:40 +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+46275+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 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT064.mail.protection.outlook.com (10.152.19.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:57:38 +0000 X-Received: ("Tessian outbound 0c23f37acac0:v27"); Fri, 23 Aug 2019 10:57:38 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 2b48922cfb706f02 X-CR-MTA-TID: 64aa7808 X-Received: from 7bc86ae40e87.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.13.51]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id EB1507DB-8DEE-454F-B98D-DB76EF7707DC.1; Fri, 23 Aug 2019 10:57:38 +0000 X-Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04lp2051.outbound.protection.outlook.com [104.47.13.51]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 7bc86ae40e87.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 23 Aug 2019 10:57:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gVJuZCrXZJWmuKcMxsbKY9rS2KoXlM1b6AB8bxgruFEPAhW02IZbDiu+TyOTyaJOp4I0+qZHtwhzU87caP53gJf1+DHSafIRvBI6k1Tflyoa4Og9o0GfSHO+LHD/laJ+T5/isBuN4GYX+fsVH6lEjU5MOV1BpnWYweU/QxVXsV4tUapFDdCDcS3Df9MoedgqYu1fyfAAuyA85l8jxwkT1JzrxrFukY3bEH53VcaRxzu1dD+wSUhrtuWmTOuR8rLrRmc6X8WZKioC0oZKSl7UDmq1307YeEjPxyHeDrzvt5ibG2UTrVOYzeSl/wlEeRSIj5XL2PDUhjPVovxoCzFAeg== 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=eiPiFx2wqG2+xd+2ekwFjIFyo6E4OWIRrVgXaU7B3o0=; b=j16oexKt3Cv0mPtcnrl2w0mQPknrfkIEqAxWg8ufdFfEgb49o/b929mramB5FtkpDF4i9ITAxCMjECQL1ddoLOvSIqw+J1JefMvgtTnqTPujCy4G+mNLwP4t4djps1HBSv/T6CxLI5W8EYdtDHSIGkqerJJUGHE25JLrmEWkwm2NrthblvNjIXJc6S28MIbu3gVJgwvo+CLk2wxlycn2lrP45Ve56nQrPQ7/e1aXd/68lsTGsSxwaqo3F8vJPGGvaRHEDSkHnRU9vVz8R0HGWpR3ms/oM/OlhI8i09So5EuH0q1LHdvjzqivGnJ4KLhqhXpb6O+mhWLILS+s5qZvzA== 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 VI1PR08CA0142.eurprd08.prod.outlook.com (2603:10a6:800:d5::20) by AM5PR0802MB2596.eurprd08.prod.outlook.com (2603:10a6:203:98::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.18; Fri, 23 Aug 2019 10:57:35 +0000 X-Received: from AM5EUR03FT017.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::209) by VI1PR08CA0142.outlook.office365.com (2603:10a6:800:d5::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.14 via Frontend Transport; Fri, 23 Aug 2019 10:57:35 +0000 Authentication-Results-Original: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; 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 AM5EUR03FT017.mail.protection.outlook.com (10.152.16.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:57:33 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Fri, 23 Aug 2019 10:56:24 +0000 X-Received: from E107187.Arm.com (10.1.195.55) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Fri, 23 Aug 2019 10:56:24 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , Subject: [edk2-devel] [PATCH v1 12/19] DynamicTablesPkg: Fix IORT node length assignment Date: Fri, 23 Aug 2019 11:55:32 +0100 Message-ID: <20190823105539.13260-13-sami.mujawar@arm.com> In-Reply-To: <20190823105539.13260-1-sami.mujawar@arm.com> References: <20190823105539.13260-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;IPV:NLI;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(136003)(39860400002)(346002)(396003)(376002)(2980300002)(199004)(189003)(53416004)(50226002)(4326008)(19627235002)(478600001)(36756003)(356004)(6666004)(30864003)(53936002)(2351001)(5660300002)(6916009)(14444005)(16586007)(76176011)(51416003)(8676002)(7696005)(50466002)(126002)(26005)(426003)(476003)(81166006)(81156014)(48376002)(305945005)(47776003)(70206006)(2906002)(486006)(70586007)(44832011)(336012)(86362001)(63370400001)(63350400001)(54906003)(186003)(1076003)(8936002)(316002)(446003)(2616005)(11346002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM5PR0802MB2596;H:nebula.arm.com;FPR:;SPF:TempError;LANG:en;PTR:InfoDomainNonexistent;A:1;MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9962a960-3b08-40bc-ca3e-08d727b8b683 X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(2017052603328);SRVR:AM5PR0802MB2596; X-MS-TrafficTypeDiagnostic: AM5PR0802MB2596:|VE1PR08MB4959: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true X-MS-Oob-TLC-OOBClassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: Lnidv40KvUPc3a/adWYJwcPNLSHPkzerNrgIYUz/UxqAu58E5A2di0vAFy2J6ot4oHo9AJGJkDf7BJQe38AIjx5yi0DNkFJZYgoeC8eGvRAhT4K+7ZTy2ypnqKE9xiTX8EuY5Y9ZnNHn9R1ebxd9DxPYtIMEYA7D8z9yeIe5Wup3RE4uIiKnksvmvGEgBWTtaTWEi/SQCKZgfU5F6rY4WkC+RczNFsjt2sl/cZ321i/FGHArEjUU0M+4l7Tql046irKzRWL+qdNcziSrD9iN4B9cmRW1YiQ2MFiQKOzBBRwA6onsc0u5h0zY/zSon0lvj357c8EVvGm9k/yPS+1Fmgmkr4bYpn0IuM8kbRPVwcvdWi3D1gdtyRCK1PNf7j/SCNck/pmtHYC0+Cv6wAQ1LlIhpDsz151YAHWkdRR0Dx4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2596 Original-Authentication-Results: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT064.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 80a1fa9d-cc98-42d3-25ad-08d727b8b389 NoDisclaimer: True X-Microsoft-Antispam-Message-Info: CPOefFxfzfmEJU5NrP88VFW631gq+XRqcKWL6PbcXzI+N4tE5FyM8cA7p1ha99NnmNvvbLfJQ8m7gq2K9M+noG2Sj5lcH1fb/WwPHyH9sbQ/pRAK15XB0xwIboXHIdLWv25q38oCVQbW5I61duW+IKK8nYhrCHmubPRDO1P9zK2LDyPhQqVbnCMsG1xkWE/ePkaJCJ98zRcJ60Lx4rtGd/Ds0kSy5DnNCVQrAI4xkVJTpL1wg4pp9x34VsXMZ+HYEN+4SUDU5f2yR5ymbde2ShWblFZL2u7W85hJAznTxaMm9k6Sh4Wicus9FBCNLSoY6GGJ5GrwPgcH8hDOieFhiPV0SYG0ZNbe9e3S9CfenJDC1tghsQrwF5UCmHGfbLvGJxCdHOqp6DCxm+fS3XtFbI/8myk4BYyfD38xfs9scIo= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2019 10:57:38.4159 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9962a960-3b08-40bc-ca3e-08d727b8b683 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4959 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,sami.mujawar@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1566557866; bh=PPvcxWyAK9NcK8dklb21yk071HWeBLKHCdh0viSxRyI=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=JGBcwNCbZ8g7xdeEz04amvysa3iKp8sF9w9O0x+hyLsL9LMqgAGF07EGhuihC6JeOEq EoActrURdAH5+qrgidNtQ9MBEYi7sFe09pv6X9a4YuICf3DM3k11gD/nxZXxL6QoZsMuG /8dtwPRZPnLow8RS2NpN76/kLMoFTZAEyx0= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The VS2017 compiler reports 'warning C4267: 'return': conversion from 'size_t' to 'UINT32', possible loss of data' for a number of functions that compute the IORT node length. Similarly, it reports warnings for IORT node length field assignments as the length field is 16-bit wide. This patch adds type casts at appropriate places and also implements validations to ensure that the max width of the respective fields is not exceeded. This patch also fixes a typo in one of the local variable names. Signed-off-by: Sami Mujawar Reviewed-by: Alexei Fedorov --- DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c | 352 +++= +++++++++++------ 1 file changed, 253 insertions(+), 99 deletions(-) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c index f303e9f29cc700634d236c08505cab91b9d62cb8..bd71220ca19679792de2bb6d88e= ed8d1913a7600 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c @@ -140,8 +140,8 @@ GetItsGroupNodeSize ( /* Size of ITS Group Node + Size of ITS Identifier array */ - return sizeof (EFI_ACPI_6_0_IO_REMAPPING_ITS_NODE) + - (Node->ItsIdCount * sizeof (UINT32)); + return (UINT32)(sizeof (EFI_ACPI_6_0_IO_REMAPPING_ITS_NODE) + + (Node->ItsIdCount * sizeof (UINT32))); } =20 /** Returns the total size required for the ITS Group nodes and @@ -160,7 +160,7 @@ GetItsGroupNodeSize ( @retval Total size of the ITS Group Nodes. **/ STATIC -UINT32 +UINT64 GetSizeofItsGroupNodes ( IN CONST UINT32 NodeStartOffset, IN CONST CM_ARM_ITS_GROUP_NODE * NodeList, @@ -168,7 +168,7 @@ GetSizeofItsGroupNodes ( IN OUT IORT_NODE_INDEXER ** CONST NodeIndexer ) { - UINT32 Size; + UINT64 Size; =20 ASSERT (NodeList !=3D NULL); =20 @@ -176,7 +176,7 @@ GetSizeofItsGroupNodes ( while (NodeCount-- !=3D 0) { (*NodeIndexer)->Token =3D NodeList->Token; (*NodeIndexer)->Object =3D (VOID*)NodeList; - (*NodeIndexer)->Offset =3D Size + NodeStartOffset; + (*NodeIndexer)->Offset =3D (UINT32)(Size + NodeStartOffset); DEBUG (( DEBUG_INFO, "IORT: Node Indexer =3D %p, Token =3D %p, Object =3D %p, Offset =3D = 0x%x\n", @@ -211,10 +211,10 @@ GetNamedComponentNodeSize ( Size of ID mapping array + Size of ASCII string + 'padding to 32-bit word aligned'. */ - return sizeof (EFI_ACPI_6_0_IO_REMAPPING_NAMED_COMP_NODE) + - (Node->IdMappingCount * - sizeof (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE)) + - ALIGN_VALUE (AsciiStrSize (Node->ObjectName), 4); + return (UINT32)(sizeof (EFI_ACPI_6_0_IO_REMAPPING_NAMED_COMP_NODE) + + (Node->IdMappingCount * + sizeof (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE)) + + ALIGN_VALUE (AsciiStrSize (Node->ObjectName), 4)); } =20 /** Returns the total size required for the Named Component nodes and @@ -233,7 +233,7 @@ GetNamedComponentNodeSize ( @retval Total size of the Named Component nodes. **/ STATIC -UINT32 +UINT64 GetSizeofNamedComponentNodes ( IN CONST UINT32 NodeStartOffset, IN CONST CM_ARM_NAMED_COMPONENT_NODE * NodeList, @@ -241,7 +241,7 @@ GetSizeofNamedComponentNodes ( IN OUT IORT_NODE_INDEXER ** CONST NodeIndexer ) { - UINT32 Size; + UINT64 Size; =20 ASSERT (NodeList !=3D NULL); =20 @@ -249,7 +249,7 @@ GetSizeofNamedComponentNodes ( while (NodeCount-- !=3D 0) { (*NodeIndexer)->Token =3D NodeList->Token; (*NodeIndexer)->Object =3D (VOID*)NodeList; - (*NodeIndexer)->Offset =3D Size + NodeStartOffset; + (*NodeIndexer)->Offset =3D (UINT32)(Size + NodeStartOffset); DEBUG (( DEBUG_INFO, "IORT: Node Indexer =3D %p, Token =3D %p, Object =3D %p, Offset =3D = 0x%x\n", @@ -284,9 +284,9 @@ GetRootComplexNodeSize ( /* Size of Root Complex node + Size of ID mapping array */ - return sizeof (EFI_ACPI_6_0_IO_REMAPPING_RC_NODE) + - (Node->IdMappingCount * - sizeof (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE)); + return (UINT32)(sizeof (EFI_ACPI_6_0_IO_REMAPPING_RC_NODE) + + (Node->IdMappingCount * + sizeof (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE))); } =20 /** Returns the total size required for the Root Complex nodes and @@ -305,7 +305,7 @@ GetRootComplexNodeSize ( @retval Total size of the Root Complex nodes. **/ STATIC -UINT32 +UINT64 GetSizeofRootComplexNodes ( IN CONST UINT32 NodeStartOffset, IN CONST CM_ARM_ROOT_COMPLEX_NODE * NodeList, @@ -313,7 +313,7 @@ GetSizeofRootComplexNodes ( IN OUT IORT_NODE_INDEXER ** CONST NodeIndexer ) { - UINT32 Size; + UINT64 Size; =20 ASSERT (NodeList !=3D NULL); =20 @@ -321,7 +321,7 @@ GetSizeofRootComplexNodes ( while (NodeCount-- !=3D 0) { (*NodeIndexer)->Token =3D NodeList->Token; (*NodeIndexer)->Object =3D (VOID*)NodeList; - (*NodeIndexer)->Offset =3D Size + NodeStartOffset; + (*NodeIndexer)->Offset =3D (UINT32)(Size + NodeStartOffset); DEBUG (( DEBUG_INFO, "IORT: Node Indexer =3D %p, Token =3D %p, Object =3D %p, Offset =3D = 0x%x\n", @@ -358,13 +358,13 @@ GetSmmuV1V2NodeSize ( Size of context interrupt array + Size of PMU interrupt array */ - return sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU_NODE) + - (Node->IdMappingCount * - sizeof (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE)) + - (Node->ContextInterruptCount * - sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT)) + - (Node->PmuInterruptCount * - sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT)); + return (UINT32)(sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU_NODE) + + (Node->IdMappingCount * + sizeof (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE)) + + (Node->ContextInterruptCount * + sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT)) + + (Node->PmuInterruptCount * + sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT))); } =20 /** Returns the total size required for the SMMUv1/SMMUv2 nodes and @@ -383,7 +383,7 @@ GetSmmuV1V2NodeSize ( @retval Total size of the SMMUv1/SMMUv2 nodes. **/ STATIC -UINT32 +UINT64 GetSizeofSmmuV1V2Nodes ( IN CONST UINT32 NodeStartOffset, IN CONST CM_ARM_SMMUV1_SMMUV2_NODE * NodeList, @@ -391,7 +391,7 @@ GetSizeofSmmuV1V2Nodes ( IN OUT IORT_NODE_INDEXER ** CONST NodeIndexer ) { - UINT32 Size; + UINT64 Size; =20 ASSERT (NodeList !=3D NULL); =20 @@ -399,7 +399,7 @@ GetSizeofSmmuV1V2Nodes ( while (NodeCount-- !=3D 0) { (*NodeIndexer)->Token =3D NodeList->Token; (*NodeIndexer)->Object =3D (VOID*)NodeList; - (*NodeIndexer)->Offset =3D Size + NodeStartOffset; + (*NodeIndexer)->Offset =3D (UINT32)(Size + NodeStartOffset); DEBUG (( DEBUG_INFO, "IORT: Node Indexer =3D %p, Token =3D %p, Object =3D %p, Offset =3D = 0x%x\n", @@ -433,9 +433,9 @@ GetSmmuV3NodeSize ( /* Size of SMMU v1/SMMU v2 node + Size of ID mapping array */ - return sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU3_NODE) + - (Node->IdMappingCount * - sizeof (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE)); + return (UINT32)(sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU3_NODE) + + (Node->IdMappingCount * + sizeof (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE))); } =20 /** Returns the total size required for the SMMUv3 nodes and @@ -454,7 +454,7 @@ GetSmmuV3NodeSize ( @retval Total size of the SMMUv3 nodes. **/ STATIC -UINT32 +UINT64 GetSizeofSmmuV3Nodes ( IN CONST UINT32 NodeStartOffset, IN CONST CM_ARM_SMMUV3_NODE * NodeList, @@ -462,7 +462,7 @@ GetSizeofSmmuV3Nodes ( IN OUT IORT_NODE_INDEXER ** CONST NodeIndexer ) { - UINT32 Size; + UINT64 Size; =20 ASSERT (NodeList !=3D NULL); =20 @@ -470,7 +470,7 @@ GetSizeofSmmuV3Nodes ( while (NodeCount-- !=3D 0) { (*NodeIndexer)->Token =3D NodeList->Token; (*NodeIndexer)->Object =3D (VOID*)NodeList; - (*NodeIndexer)->Offset =3D Size + NodeStartOffset; + (*NodeIndexer)->Offset =3D (UINT32)(Size + NodeStartOffset); DEBUG (( DEBUG_INFO, "IORT: Node Indexer =3D %p, Token =3D %p, Object =3D %p, Offset =3D = 0x%x\n", @@ -504,9 +504,9 @@ GetPmcgNodeSize ( /* Size of PMCG node + Size of ID mapping array */ - return sizeof (EFI_ACPI_6_0_IO_REMAPPING_PMCG_NODE) + - (Node->IdMappingCount * - sizeof (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE)); + return (UINT32)(sizeof (EFI_ACPI_6_0_IO_REMAPPING_PMCG_NODE) + + (Node->IdMappingCount * + sizeof (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE))); } =20 /** Returns the total size required for the PMCG nodes and @@ -525,7 +525,7 @@ GetPmcgNodeSize ( @retval Total size of the PMCG nodes. **/ STATIC -UINT32 +UINT64 GetSizeofPmcgNodes ( IN CONST UINT32 NodeStartOffset, IN CONST CM_ARM_PMCG_NODE * NodeList, @@ -533,7 +533,7 @@ GetSizeofPmcgNodes ( IN OUT IORT_NODE_INDEXER ** CONST NodeIndexer ) { - UINT32 Size; + UINT64 Size; =20 ASSERT (NodeList !=3D NULL); =20 @@ -541,7 +541,7 @@ GetSizeofPmcgNodes ( while (NodeCount-- !=3D 0) { (*NodeIndexer)->Token =3D NodeList->Token; (*NodeIndexer)->Object =3D (VOID*)NodeList; - (*NodeIndexer)->Offset =3D Size + NodeStartOffset; + (*NodeIndexer)->Offset =3D (UINT32)(Size + NodeStartOffset); DEBUG (( DEBUG_INFO, "IORT: Node Indexer =3D %p, Token =3D %p, Object =3D %p, Offset =3D = 0x%x\n", @@ -735,6 +735,7 @@ AddItsGroupNodes ( CM_ARM_ITS_IDENTIFIER * ItsIdentifier; UINT32 ItsIdentifierCount; UINT32 IdIndex; + UINT64 NodeLength; =20 ASSERT (Iort !=3D NULL); =20 @@ -742,9 +743,22 @@ AddItsGroupNodes ( NodesStartOffset); =20 while (NodeCount-- !=3D 0) { + NodeLength =3D GetItsGroupNodeSize (NodeList); + if (NodeLength > MAX_UINT16) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: ITS Id Array Node length 0x%lx > MAX_UINT16." + " Status =3D %r\n", + NodeLength, + Status + )); + return Status; + } + // Populate the node header ItsGroupNode->Node.Type =3D EFI_ACPI_IORT_TYPE_ITS_GROUP; - ItsGroupNode->Node.Length =3D GetItsGroupNodeSize (NodeList); + ItsGroupNode->Node.Length =3D (UINT16)NodeLength; ItsGroupNode->Node.Revision =3D 0; ItsGroupNode->Node.Reserved =3D EFI_ACPI_RESERVED_DWORD; ItsGroupNode->Node.NumIdMappings =3D 0; @@ -825,8 +839,9 @@ AddNamedComponentNodes ( EFI_STATUS Status; EFI_ACPI_6_0_IO_REMAPPING_NAMED_COMP_NODE * NcNode; EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE * IdMapArray; - UINT32 ObjectNameLenght; CHAR8 * ObjectName; + UINTN ObjectNameLength; + UINT64 NodeLength; =20 ASSERT (Iort !=3D NULL); =20 @@ -834,18 +849,30 @@ AddNamedComponentNodes ( NodesStartOffset); =20 while (NodeCount-- !=3D 0) { + NodeLength =3D GetNamedComponentNodeSize (NodeList); + if (NodeLength > MAX_UINT16) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Named Component Node length 0x%lx > MAX_UINT16." + " Status =3D %r\n", + NodeLength, + Status + )); + return Status; + } + // Populate the node header NcNode->Node.Type =3D EFI_ACPI_IORT_TYPE_NAMED_COMP; - NcNode->Node.Length =3D - GetNamedComponentNodeSize (NodeList); + NcNode->Node.Length =3D (UINT16)NodeLength; NcNode->Node.Revision =3D 2; NcNode->Node.Reserved =3D EFI_ACPI_RESERVED_DWORD; NcNode->Node.NumIdMappings =3D NodeList->IdMappingCount; =20 - ObjectNameLenght =3D AsciiStrLen (NodeList->ObjectName) + 1; + ObjectNameLength =3D AsciiStrLen (NodeList->ObjectName) + 1; NcNode->Node.IdReference =3D - sizeof (EFI_ACPI_6_0_IO_REMAPPING_NAMED_COMP_NODE) + - (ALIGN_VALUE (ObjectNameLenght, 4)); + (UINT32)(sizeof (EFI_ACPI_6_0_IO_REMAPPING_NAMED_COMP_NODE) + + (ALIGN_VALUE (ObjectNameLength, 4))); =20 // Named Component specific data NcNode->Flags =3D NodeList->Flags; @@ -860,7 +887,7 @@ AddNamedComponentNodes ( sizeof (EFI_ACPI_6_0_IO_REMAPPING_NAMED_COMP_NODE)); Status =3D AsciiStrCpyS ( ObjectName, - ObjectNameLenght, + ObjectNameLength, NodeList->ObjectName ); if (EFI_ERROR (Status)) { @@ -936,6 +963,7 @@ AddRootComplexNodes ( EFI_STATUS Status; EFI_ACPI_6_0_IO_REMAPPING_RC_NODE * RcNode; EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE * IdMapArray; + UINT64 NodeLength; =20 ASSERT (Iort !=3D NULL); =20 @@ -943,9 +971,22 @@ AddRootComplexNodes ( NodesStartOffset); =20 while (NodeCount-- !=3D 0) { + NodeLength =3D GetRootComplexNodeSize (NodeList); + if (NodeLength > MAX_UINT16) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Root Complex Node length 0x%lx > MAX_UINT16." + " Status =3D %r\n", + NodeLength, + Status + )); + return Status; + } + // Populate the node header RcNode->Node.Type =3D EFI_ACPI_IORT_TYPE_ROOT_COMPLEX; - RcNode->Node.Length =3D GetRootComplexNodeSize (NodeList); + RcNode->Node.Length =3D (UINT16)NodeLength; RcNode->Node.Revision =3D 1; RcNode->Node.Reserved =3D EFI_ACPI_RESERVED_DWORD; RcNode->Node.NumIdMappings =3D NodeList->IdMappingCount; @@ -1093,6 +1134,7 @@ AddSmmuV1V2Nodes ( =20 EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT * ContextInterruptArray; EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT * PmuInterruptArray; + UINT64 NodeLength; =20 ASSERT (Iort !=3D NULL); =20 @@ -1100,9 +1142,21 @@ AddSmmuV1V2Nodes ( NodesStartOffset); =20 while (NodeCount-- !=3D 0) { + NodeLength =3D GetSmmuV1V2NodeSize (NodeList); + if (NodeLength > MAX_UINT16) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: SMMU V1/V2 Node length 0x%lx > MAX_UINT16. Status = =3D %r\n", + NodeLength, + Status + )); + return Status; + } + // Populate the node header SmmuNode->Node.Type =3D EFI_ACPI_IORT_TYPE_SMMUv1v2; - SmmuNode->Node.Length =3D GetSmmuV1V2NodeSize (NodeList); + SmmuNode->Node.Length =3D (UINT16)NodeLength; SmmuNode->Node.Revision =3D 0; SmmuNode->Node.Reserved =3D EFI_ACPI_RESERVED_DWORD; SmmuNode->Node.NumIdMappings =3D NodeList->IdMappingCount; @@ -1239,6 +1293,7 @@ AddSmmuV3Nodes ( EFI_STATUS Status; EFI_ACPI_6_0_IO_REMAPPING_SMMU3_NODE * SmmuV3Node; EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE * IdMapArray; + UINT64 NodeLength; =20 ASSERT (Iort !=3D NULL); =20 @@ -1246,9 +1301,21 @@ AddSmmuV3Nodes ( NodesStartOffset); =20 while (NodeCount-- !=3D 0) { + NodeLength =3D GetSmmuV3NodeSize (NodeList); + if (NodeLength > MAX_UINT16) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: SMMU V3 Node length 0x%lx > MAX_UINT16. Status =3D %= r\n", + NodeLength, + Status + )); + return Status; + } + // Populate the node header SmmuV3Node->Node.Type =3D EFI_ACPI_IORT_TYPE_SMMUv3; - SmmuV3Node->Node.Length =3D GetSmmuV3NodeSize (NodeList); + SmmuV3Node->Node.Length =3D (UINT16)NodeLength; SmmuV3Node->Node.Revision =3D 2; SmmuV3Node->Node.Reserved =3D EFI_ACPI_RESERVED_DWORD; SmmuV3Node->Node.NumIdMappings =3D NodeList->IdMappingCount; @@ -1344,6 +1411,7 @@ AddPmcgNodes ( EFI_ACPI_6_0_IO_REMAPPING_PMCG_NODE * PmcgNode; EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE * IdMapArray; ACPI_IORT_GENERATOR * Generator; + UINT64 NodeLength; =20 ASSERT (Iort !=3D NULL); =20 @@ -1352,9 +1420,21 @@ AddPmcgNodes ( NodesStartOffset); =20 while (NodeCount-- !=3D 0) { + NodeLength =3D GetPmcgNodeSize (NodeList); + if (NodeLength > MAX_UINT16) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: PMCG Node length 0x%lx > MAX_UINT16. Status =3D %r\n= ", + NodeLength, + Status + )); + return Status; + } + // Populate the node header PmcgNode->Node.Type =3D EFI_ACPI_IORT_TYPE_PMCG; - PmcgNode->Node.Length =3D GetPmcgNodeSize (NodeList); + PmcgNode->Node.Length =3D (UINT16)NodeLength; PmcgNode->Node.Revision =3D 1; PmcgNode->Node.Reserved =3D EFI_ACPI_RESERVED_DWORD; PmcgNode->Node.NumIdMappings =3D NodeList->IdMappingCount; @@ -1448,9 +1528,11 @@ BuildIortTable ( ) { EFI_STATUS Status; - UINT32 TableSize; + + UINT64 TableSize; + UINT64 NodeSize; + UINT32 IortNodeCount; - UINT32 ItsGroupNodeCount; UINT32 NamedComponentNodeCount; UINT32 RootComplexNodeCount; @@ -1638,81 +1720,141 @@ BuildIortTable ( =20 // ITS Group Nodes if (ItsGroupNodeCount > 0) { - ItsGroupOffset =3D TableSize; + ItsGroupOffset =3D (UINT32)TableSize; // Size of ITS Group node list. - TableSize +=3D GetSizeofItsGroupNodes ( - ItsGroupOffset, - ItsGroupNodeList, - ItsGroupNodeCount, - &NodeIndexer - ); + NodeSize =3D GetSizeofItsGroupNodes ( + ItsGroupOffset, + ItsGroupNodeList, + ItsGroupNodeCount, + &NodeIndexer + ); + if (NodeSize > MAX_UINT32) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Invalid Size of Group Nodes. Status =3D %r\n", + Status + )); + goto error_handler; + } + TableSize +=3D NodeSize; } =20 // Named Component Nodes if (NamedComponentNodeCount > 0) { - NamedComponentOffset =3D TableSize; + NamedComponentOffset =3D (UINT32)TableSize; // Size of Named Component node list. - TableSize +=3D GetSizeofNamedComponentNodes ( - NamedComponentOffset, - NamedComponentNodeList, - NamedComponentNodeCount, - &NodeIndexer - ); + NodeSize =3D GetSizeofNamedComponentNodes ( + NamedComponentOffset, + NamedComponentNodeList, + NamedComponentNodeCount, + &NodeIndexer + ); + if (NodeSize > MAX_UINT32) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Invalid Size of Named Component Nodes. Status =3D %r= \n", + Status + )); + goto error_handler; + } + TableSize +=3D NodeSize; } =20 // Root Complex Nodes if (RootComplexNodeCount > 0) { - RootComplexOffset =3D TableSize; + RootComplexOffset =3D (UINT32)TableSize; // Size of Root Complex node list. - TableSize +=3D GetSizeofRootComplexNodes ( - RootComplexOffset, - RootComplexNodeList, - RootComplexNodeCount, - &NodeIndexer - ); + NodeSize =3D GetSizeofRootComplexNodes ( + RootComplexOffset, + RootComplexNodeList, + RootComplexNodeCount, + &NodeIndexer + ); + if (NodeSize > MAX_UINT32) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Invalid Size of Root Complex Nodes. Status =3D %r\n", + Status + )); + goto error_handler; + } + TableSize +=3D NodeSize; } =20 // SMMUv1/SMMUv2 Nodes if (SmmuV1V2NodeCount > 0) { - SmmuV1V2Offset =3D TableSize; + SmmuV1V2Offset =3D (UINT32)TableSize; // Size of SMMUv1/SMMUv2 node list. - TableSize +=3D GetSizeofSmmuV1V2Nodes ( - SmmuV1V2Offset, - SmmuV1V2NodeList, - SmmuV1V2NodeCount, - &NodeIndexer - ); + NodeSize =3D GetSizeofSmmuV1V2Nodes ( + SmmuV1V2Offset, + SmmuV1V2NodeList, + SmmuV1V2NodeCount, + &NodeIndexer + ); + if (NodeSize > MAX_UINT32) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Invalid Size of SMMUv1/v2 Nodes. Status =3D %r\n", + Status + )); + goto error_handler; + } + TableSize +=3D NodeSize; } =20 // SMMUv3 Nodes if (SmmuV3NodeCount > 0) { - SmmuV3Offset =3D TableSize; + SmmuV3Offset =3D (UINT32)TableSize; // Size of SMMUv3 node list. - TableSize +=3D GetSizeofSmmuV3Nodes ( - SmmuV3Offset, - SmmuV3NodeList, - SmmuV3NodeCount, - &NodeIndexer - ); + NodeSize =3D GetSizeofSmmuV3Nodes ( + SmmuV3Offset, + SmmuV3NodeList, + SmmuV3NodeCount, + &NodeIndexer + ); + if (NodeSize > MAX_UINT32) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Invalid Size of SMMUv3 Nodes. Status =3D %r\n", + Status + )); + goto error_handler; + } + TableSize +=3D NodeSize; } =20 // PMCG Nodes if (PmcgNodeCount > 0) { - PmcgOffset =3D TableSize; + PmcgOffset =3D (UINT32)TableSize; // Size of PMCG node list. - TableSize +=3D GetSizeofPmcgNodes ( - PmcgOffset, - PmcgNodeList, - PmcgNodeCount, - &NodeIndexer - ); + NodeSize =3D GetSizeofPmcgNodes ( + PmcgOffset, + PmcgNodeList, + PmcgNodeCount, + &NodeIndexer + ); + if (NodeSize > MAX_UINT32) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Invalid Size of PMCG Nodes. Status =3D %r\n", + Status + )); + goto error_handler; + } + TableSize +=3D NodeSize; } =20 DEBUG (( DEBUG_INFO, "INFO: IORT:\n" \ " IortNodeCount =3D %d\n" \ - " TableSize =3D %d\n", + " TableSize =3D 0x%lx\n", IortNodeCount, TableSize )); @@ -1765,6 +1907,18 @@ BuildIortTable ( PmcgOffset )); =20 + if (TableSize > MAX_UINT32) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: IORT Table Size 0x%lx > MAX_UINT32," \ + " Status =3D %r\n", + TableSize, + Status + )); + goto error_handler; + } + // Allocate the Buffer for IORT table *Table =3D (EFI_ACPI_DESCRIPTION_HEADER*)AllocateZeroPool (TableSize); if (*Table =3D=3D NULL) { @@ -1783,7 +1937,7 @@ BuildIortTable ( =20 DEBUG (( DEBUG_INFO, - "IORT: Iort =3D 0x%p TableSize =3D 0x%x\n", + "IORT: Iort =3D 0x%p TableSize =3D 0x%lx\n", Iort, TableSize )); @@ -1793,7 +1947,7 @@ BuildIortTable ( This, &Iort->Header, AcpiTableInfo, - TableSize + (UINT32)TableSize ); if (EFI_ERROR (Status)) { DEBUG (( --=20 '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 (#46275): https://edk2.groups.io/g/devel/message/46275 Mute This Topic: https://groups.io/mt/32999796/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 Tue May 7 11:53:29 2024 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+46264+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 156655781844522.06768360871888; Fri, 23 Aug 2019 03:56:58 -0700 (PDT) Return-Path: X-Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.70]) by groups.io with SMTP; Fri, 23 Aug 2019 03:56:57 -0700 X-Received: from VI1PR08CA0089.eurprd08.prod.outlook.com (10.175.228.15) by HE1PR0802MB2603.eurprd08.prod.outlook.com (10.175.35.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.16; Fri, 23 Aug 2019 10:56:52 +0000 X-Received: from AM5EUR03FT047.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::208) by VI1PR08CA0089.outlook.office365.com (2603:10a6:800:d3::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.14 via Frontend Transport; Fri, 23 Aug 2019 10:56:52 +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+46264+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 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT047.mail.protection.outlook.com (10.152.16.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:56:51 +0000 X-Received: ("Tessian outbound 3aa685aedf5f:v27"); Fri, 23 Aug 2019 10:56:51 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 0c9e0a03926dd5e2 X-CR-MTA-TID: 64aa7808 X-Received: from cdf396dba65d.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.0.52]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id 9F0AD989-423E-410B-A290-2DB34F5D9928.1; Fri, 23 Aug 2019 10:56:46 +0000 X-Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp2052.outbound.protection.outlook.com [104.47.0.52]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id cdf396dba65d.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 23 Aug 2019 10:56:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Acctm7D7352mZPSFzlv+q7WtAPoiEPp/AKzwg0aA+cHjnzamEGj2z/2GyoSDOUXM5H5NAaaOTkOYoWcBEODqn+9Zl2HQGgiqyaDA0aZciUUqot9vST87UKTpIfQtZX2qwu4nICcpCdoMXXGYXF3m/Kd6IIGj2Vz2vCzwlq/u2hvBbqG21eTVFT08nijmxr8Z/7nSJjvUFpxqw9hoRtSfCsLFC/IJwe47Ee7vTO3YtulBOjRLjDLYWofUb/ERq2RXvaT9E7WcFg2S3idsPubthfsdMlzVa6UmZ4snyaKgguvn4yAAASo3E8yPXx76prfuUKs+zmM4j4WWeaw1xW19PA== 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=2ZmjvLEFmj3MbNSDzvc+7FXelayibRvCz4hEhJi6FiA=; b=K/HhSw1kcY6FGiOAXtvjbYO+vNYNpef1+skdliEx/qbbmLfLXlGNK3R6yUyKBdc8Zodd6p2wX0XpLWiJyRgnQGPId/GdJDQCPa9h8DiiLtNFl7hhQGB1RXs6TrwuW+22OchX+X4EKTjTnaq5HFHPU8aJGXadVrYqa2/NvywnXwFs5FA/5U5Dsq21WfnRpcz/NoSmzKqOg+fcffPVGxC6fcQTCod465ELZ+21pqaZbX/lNxAipbTd1nVss9K6s1rwiVRwLUrT0shq3lU8l8Ht29OfH1HSAXvGXAmzZv6F3d59HU7JGDsiXvEM+4HA4GJArLuYUbW6Gqp4KkRDHHlhfA== 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 HE1PR0802CA0009.eurprd08.prod.outlook.com (2603:10a6:3:bd::19) by AM6PR08MB4952.eurprd08.prod.outlook.com (2603:10a6:20b:e1::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.16; Fri, 23 Aug 2019 10:56:42 +0000 X-Received: from AM5EUR03FT025.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::205) by HE1PR0802CA0009.outlook.office365.com (2603:10a6:3:bd::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.14 via Frontend Transport; Fri, 23 Aug 2019 10:56:42 +0000 Authentication-Results-Original: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; 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 AM5EUR03FT025.mail.protection.outlook.com (10.152.16.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:56:41 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Fri, 23 Aug 2019 10:56:24 +0000 X-Received: from E107187.Arm.com (10.1.195.55) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Fri, 23 Aug 2019 10:56:24 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , Subject: [edk2-devel] [PATCH v1 13/19] DynamicTablesPkg: IORT: Fix uninitialized memory usage Date: Fri, 23 Aug 2019 11:55:33 +0100 Message-ID: <20190823105539.13260-14-sami.mujawar@arm.com> In-Reply-To: <20190823105539.13260-1-sami.mujawar@arm.com> References: <20190823105539.13260-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;IPV:NLI;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(39860400002)(396003)(346002)(376002)(136003)(2980300002)(189003)(199004)(2616005)(11346002)(50226002)(4326008)(36756003)(478600001)(356004)(26005)(336012)(53936002)(81156014)(81166006)(305945005)(2351001)(6666004)(14444005)(8676002)(70206006)(6916009)(70586007)(1076003)(47776003)(86362001)(476003)(63350400001)(76176011)(446003)(486006)(426003)(44832011)(316002)(126002)(51416003)(54906003)(48376002)(50466002)(186003)(2906002)(5660300002)(8936002)(63370400001)(16586007)(7696005)(53416004);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR08MB4952;H:nebula.arm.com;FPR:;SPF:TempError;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dcf6f3d9-7d14-4bbc-ac29-08d727b89a74 X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600166)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328);SRVR:AM6PR08MB4952; X-MS-TrafficTypeDiagnostic: AM6PR08MB4952:|HE1PR0802MB2603: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true X-MS-Oob-TLC-OOBClassifiers: OLM:5516;OLM:5516; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: OYMtaLLgESvKMxw53xKGw02oFMqjB7O5A7AHjfMHXOBBElKv47Ce6M8t9DDerRUuILbpknLIEnekDq7rJJ+EyRcgYzRPGYhyq4Jk2+mS6BruZZ/3QnSFMoZz94SvjfLNjByQyVOkhwzkde9DATCaXgv8mN93BzJOq3+MxjVVEuSpVnc7GGSihA7skztBKMKoJNdzjxdekGpuM884BZC0WpFyVCTxX7BnfkbIkjvyrMcd/dR1nRHQIfmDyU/w7GaMHh1QHwagCJmNWm1TlJD2IJ0k73lsRB5Iqi6FI39pB0dm94v3KCodPL3hxFFqNC16Bmyl/bxFcoJmwlloKR2hqPibnFjAKEv53syEQJgcX9HaCaZXv+cr8wndY02QP6nYY1PZmqkjvswTibICD4VjwhfNWpsPEAfZaLh87oZmRLE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4952 Original-Authentication-Results: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT047.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 14eec2a1-cffb-4e68-ae77-08d727b8945c NoDisclaimer: True X-Microsoft-Antispam-Message-Info: eSRvGFfiX7QpPADj12N9e+JliNXqIwhDGGvJd891nPMuAOpJaV7Pnyh+pEldresJaWjrolXVcY7E8gKmP+VLtAyMUpaeNwpftL22yj69fZbEkjnaaklxtWrwSBNbjL5p3o0OSKswrQnMYrgx6w6HL9Kee0YLpg4rtPGQ+2xQ3JiLAqRDOCNxN+AhP9IXEl4SiB06W1Df8VspZ94eF5aI8TpGCJY29wjzxBjbwzUefKNs05nI0iTh96SqOfypoV0H4zgPjZZ2YToEoqXUpmyT7bnwaSq5ThPZpAT32RnpP7qntexfbDKJoS3qwQK12QxmwwsF2QFe9Kb32nVbkBXo7YBY/DY6wh/xEkEp6rqnkF4Z6ZmLdtzYobqEarHjoAaWlyz97nyf3WyMPInnM4fBFBWWtV94ol050OYG3wvJqrk= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2019 10:56:51.4287 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dcf6f3d9-7d14-4bbc-ac29-08d727b89a74 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0802MB2603 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,sami.mujawar@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1566557818; bh=1eYosUgkZZUzMGE76BrSlogFlbk8wmlCppogqOPvziU=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=FX7BW1CU15fRuVrBaBdzsvtp6PhOap+yUYGm4rCF4ZG55C8bS3i4Se6yLthhDNds6jM sB6g5jrB/P9ZWknrxdtNJ3NG8RyZ/+lOlKRPNxs4D1sES1tFKqTrPXAxuV8TDn9Kskfny sPHzuLghgJv/KeKmhd0vXIydr/JCmQ20V+o= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" On enabling the /analyse option the VS2017 compiler reports: warning C6001: Using uninitialized memory. This warning is reported as some variables that were being logged were uninitialised. To fix this, moved the logging code after the variables being logged are initialised. Signed-off-by: Sami Mujawar --- DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c | 96 ++++= ++++++---------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c index bd71220ca19679792de2bb6d88eed8d1913a7600..65d006c89e668c8b2b8a14326cd= df1b69979597f 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c @@ -1738,6 +1738,14 @@ BuildIortTable ( goto error_handler; } TableSize +=3D NodeSize; + + DEBUG (( + DEBUG_INFO, + " ItsGroupNodeCount =3D %d\n" \ + " ItsGroupOffset =3D %d\n", + ItsGroupNodeCount, + ItsGroupOffset + )); } =20 // Named Component Nodes @@ -1760,6 +1768,14 @@ BuildIortTable ( goto error_handler; } TableSize +=3D NodeSize; + + DEBUG (( + DEBUG_INFO, + " NamedComponentNodeCount =3D %d\n" \ + " NamedComponentOffset =3D %d\n", + NamedComponentNodeCount, + NamedComponentOffset + )); } =20 // Root Complex Nodes @@ -1782,6 +1798,14 @@ BuildIortTable ( goto error_handler; } TableSize +=3D NodeSize; + + DEBUG (( + DEBUG_INFO, + " RootComplexNodeCount =3D %d\n" \ + " RootComplexOffset =3D %d\n", + RootComplexNodeCount, + RootComplexOffset + )); } =20 // SMMUv1/SMMUv2 Nodes @@ -1804,6 +1828,14 @@ BuildIortTable ( goto error_handler; } TableSize +=3D NodeSize; + + DEBUG (( + DEBUG_INFO, + " SmmuV1V2NodeCount =3D %d\n" \ + " SmmuV1V2Offset =3D %d\n", + SmmuV1V2NodeCount, + SmmuV1V2Offset + )); } =20 // SMMUv3 Nodes @@ -1826,6 +1858,14 @@ BuildIortTable ( goto error_handler; } TableSize +=3D NodeSize; + + DEBUG (( + DEBUG_INFO, + " SmmuV3NodeCount =3D %d\n" \ + " SmmuV3Offset =3D %d\n", + SmmuV3NodeCount, + SmmuV3Offset + )); } =20 // PMCG Nodes @@ -1848,6 +1888,14 @@ BuildIortTable ( goto error_handler; } TableSize +=3D NodeSize; + + DEBUG (( + DEBUG_INFO, + " PmcgNodeCount =3D %d\n" \ + " PmcgOffset =3D %d\n", + PmcgNodeCount, + PmcgOffset + )); } =20 DEBUG (( @@ -1859,54 +1907,6 @@ BuildIortTable ( TableSize )); =20 - DEBUG (( - DEBUG_INFO, - " ItsGroupNodeCount =3D %d\n" \ - " ItsGroupOffset =3D %d\n", - ItsGroupNodeCount, - ItsGroupOffset - )); - - DEBUG (( - DEBUG_INFO, - " NamedComponentNodeCount =3D %d\n" \ - " NamedComponentOffset =3D %d\n", - NamedComponentNodeCount, - NamedComponentOffset - )); - - DEBUG (( - DEBUG_INFO, - " RootComplexNodeCount =3D %d\n" \ - " RootComplexOffset =3D %d\n", - RootComplexNodeCount, - RootComplexOffset - )); - - DEBUG (( - DEBUG_INFO, - " SmmuV1V2NodeCount =3D %d\n" \ - " SmmuV1V2Offset =3D %d\n", - SmmuV1V2NodeCount, - SmmuV1V2Offset - )); - - DEBUG (( - DEBUG_INFO, - " SmmuV3NodeCount =3D %d\n" \ - " SmmuV3Offset =3D %d\n", - SmmuV3NodeCount, - SmmuV3Offset - )); - - DEBUG (( - DEBUG_INFO, - " PmcgNodeCount =3D %d\n" \ - " PmcgOffset =3D %d\n", - PmcgNodeCount, - PmcgOffset - )); - if (TableSize > MAX_UINT32) { Status =3D EFI_INVALID_PARAMETER; DEBUG (( --=20 '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 (#46264): https://edk2.groups.io/g/devel/message/46264 Mute This Topic: https://groups.io/mt/32999780/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 Tue May 7 11:53:29 2024 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+46277+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 1566557908790733.341966722022; Fri, 23 Aug 2019 03:58:28 -0700 (PDT) Return-Path: X-Received: from EUR02-HE1-obe.outbound.protection.outlook.com (EUR02-HE1-obe.outbound.protection.outlook.com [40.107.1.43]) by groups.io with SMTP; Fri, 23 Aug 2019 03:58:27 -0700 X-Received: from AM6PR08CA0044.eurprd08.prod.outlook.com (2603:10a6:20b:c0::32) by AM5PR0801MB1841.eurprd08.prod.outlook.com (2603:10a6:203:2e::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.16; Fri, 23 Aug 2019 10:58:23 +0000 X-Received: from VE1EUR03FT064.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::203) by AM6PR08CA0044.outlook.office365.com (2603:10a6:20b:c0::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.15 via Frontend Transport; Fri, 23 Aug 2019 10:58:22 +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+46277+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 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT064.mail.protection.outlook.com (10.152.19.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:58:21 +0000 X-Received: ("Tessian outbound 4f2e8f9f1994:v27"); Fri, 23 Aug 2019 10:58:20 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 4721cc0a0d9ac3d6 X-CR-MTA-TID: 64aa7808 X-Received: from ad9096f4aa2a.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.12.58]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id DE912E6E-A1AA-4AB7-B27E-FB1B8E9C9801.1; Fri, 23 Aug 2019 10:58:20 +0000 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04lp2058.outbound.protection.outlook.com [104.47.12.58]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id ad9096f4aa2a.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 23 Aug 2019 10:58:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=haD5bXipXoX65r83Pq19E7oG+DzT9scnr5kJL5YZOawx4q9TD4CTPgYyNpTM/6vGl/GjxwcLxKF+uf/pZKnYPKMZqJ+1n4Yn0+2BQXKdXf9kfUUhVnNE0FYjazuL8o9qIsBHwXUMlRGcFj8Uu71+LsQApgcY2+VCv8AeIftZpnIZ/XhN2c339ynm5YdeuH4emt5/O5UIWSjh80ndEp5YZZgrX7sQNvihyUm9VqP/1b6jwzdO0qxghTI6kKjNyg+k8FQmn1r2H4TBH6x7RAznLOH0R0o+/QkeRcNfCm6ok/Q7sQ2k3+wLZNxKOlImCzClc1a8BgLiVJWSnrtSJj6jAQ== 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=Sbyp5hrEj5iFZxbhb5y/xWVPJW+UmDyuWgEPR24Urtg=; b=e7YMqDHMyeKuo2Sw4nLZyxKtnJmMME529Yk5K/op0oApBi0jSHLHa3b7gJRvuCDLvJVjNWysYN93Cj6laWFCDAEyM795NaySd5CsXjDD1cNaOS/zfHN+cqVdaeQ7IglPnLpU5r6uLX/WqgyzGL8aux4SNCDjvVP15zYwEs+rBE+phSGBK98NfqzwdrFsRnjQSnJk4UwYBgSd1XzpaCiYg0PQe5m+edVoB2LzxHRMADSSNv5KLxP7ud32/6Br5inBOXVmzUuSP2u8imypxFVILo0Cj+yt4toGsp8gtV6vbINcrZK+kCeULE1HNLO0UM9ZpqgdtaZhnpSqJSRgfDYLfg== 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 AM4PR08CA0077.eurprd08.prod.outlook.com (2603:10a6:205:2::48) by HE1PR0801MB1851.eurprd08.prod.outlook.com (2603:10a6:3:7b::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.16; Fri, 23 Aug 2019 10:58:18 +0000 X-Received: from AM5EUR03FT045.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::208) by AM4PR08CA0077.outlook.office365.com (2603:10a6:205:2::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.15 via Frontend Transport; Fri, 23 Aug 2019 10:58:18 +0000 Authentication-Results-Original: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; 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 AM5EUR03FT045.mail.protection.outlook.com (10.152.17.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:58:16 +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; Fri, 23 Aug 2019 10:56:27 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) 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; Fri, 23 Aug 2019 10:56:25 +0000 X-Received: from E107187.Arm.com (10.1.195.55) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Fri, 23 Aug 2019 10:56:25 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , Subject: [edk2-devel] [PATCH v1 14/19] DynamicTablesPkg: PPTT: Fix uninitialized memory usage Date: Fri, 23 Aug 2019 11:55:34 +0100 Message-ID: <20190823105539.13260-15-sami.mujawar@arm.com> In-Reply-To: <20190823105539.13260-1-sami.mujawar@arm.com> References: <20190823105539.13260-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;IPV:NLI;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(396003)(39860400002)(136003)(346002)(376002)(2980300002)(189003)(199004)(70206006)(50466002)(48376002)(53416004)(2351001)(86362001)(47776003)(36756003)(356004)(6666004)(2906002)(4326008)(14444005)(53936002)(26005)(305945005)(6916009)(186003)(1076003)(44832011)(51416003)(63350400001)(76176011)(8936002)(11346002)(446003)(63370400001)(126002)(476003)(2616005)(50226002)(426003)(486006)(7696005)(478600001)(81156014)(81166006)(5660300002)(336012)(8676002)(54906003)(70586007)(316002)(16586007);DIR:OUT;SFP:1101;SCL:1;SRVR:HE1PR0801MB1851;H:nebula.arm.com;FPR:;SPF:TempError;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: db122733-cc7e-4a50-235b-08d727b8cfef X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(2017052603328);SRVR:HE1PR0801MB1851; X-MS-TrafficTypeDiagnostic: HE1PR0801MB1851:|AM5PR0801MB1841: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true X-MS-Oob-TLC-OOBClassifiers: OLM:8882;OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: fTPcl1/1vx7DN6LZEMVYAGrP8zga/+xQPOJxF1phQG7XrnQ6LqwY+JIlimzzWQMyjEW8iuqohu/es/q1ZR5Lxe0+s9pJi/tbx1eLxXQ38iw0jfal35BI3r1b4ypRFjXyzYJeWOb/UbNzmzqmyf88yu+XtZAIpigdSMvgNwlYLJgiqNm/dRbHADHrpiLPMI7z3DLwv3Eg+ZUefjDLZz2hEG8uFEjlhmwmvMcB+P0o2IIvncpM2TMPBnnIV63dRX/JlBTcQk7EF6legWY2CMng8KGE6EjsM872crj2Yw1M8Txd2IBjDcbZpaszwQFKAmE45CvbjTJboOeoSLInWPBPuJpHug/NlEUJQkxoiUnFgLoo7fm4Bj0Q5d7Sz/dABJxjCYcuEFA/xw4w4K/RD8GZxgZRH2VA6OtwFvlvfjUOfM8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1851 Original-Authentication-Results: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT064.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 471806c3-c6c2-47e3-a731-08d727b8cd35 NoDisclaimer: True X-Microsoft-Antispam-Message-Info: r7BNkIE8aIxlUlbWgQmJbEn7vEugQZGk7CwLt97gEWvi2u/434ntjJDB1u2eZ0mGl1XVAKp1lfc+cOilwzM1O9Y3nKEJTfUvdJ9hUWbbtLCNStVWX6HHTqk28CLVYXKHKM/CzMEpvU9Inki4HNnjobehfQIjnJDiME8ssN3ZLTTEc9m9BlR5F5K4H++x9s+yZwmTgDjJEUyFA9IhwBGUct47d0AXqbGwDBhO9sAfZE6MpiGp/w3jrKmiI9DdLMR41wny9CgjAZ626ZJxOrXsi/RmtqvVwOgiT5Ycp6aYgLCkhq3Lf0QdoAx8HFTgh4HSkXjZNilbcAnDH3FHylNL71E9GvjBqOnQY3FTXO0OcJtbrIL/LzxgVGo7rRx9iwEXDeK7b6H/XQH/qHSmYJnkmwFRmBJ43aBukkiqPGBEBlg= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2019 10:58:21.0394 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: db122733-cc7e-4a50-235b-08d727b8cfef X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1841 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,sami.mujawar@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1566557908; bh=Czu/kUG2GQZjScPM/wwTfnbgIOfXJbN8NdRBc0VVYeA=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=gOE+Ex+ytrVgIMPz0cS51MFxDe1roIcSjRrkOoBYPhOQQDkAlpV2BOEnnWuSZAw/Li4 HZ51quTabv9OzjKIT7bXfiC7PNF3dPutdAGfhIk2iGeFaw+kOk3+SjfAt1ircY9/aPJ8p NafPh7BqIqat7uAkZfZXwaEpIwZ6EzNZbnc= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" On enabling the /analyse option the VS2017 compiler reports: warning C6001: Using uninitialized memory. This warning is reported as some variables that were being logged were uninitialised. To fix this, moved the logging code after the variables being logged are initialised. Signed-off-by: Sami Mujawar Reviewed-by: Alexei Fedorov --- DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c | 59 ++++= ++++++---------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c index 82070403ac8757f54e839fd00eb4acb3292fc60c..d70fc59e754e7d348965b8c3739= 822a9f1c4b7e6 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c @@ -1203,6 +1203,17 @@ BuildPpttTable ( Generator->ProcHierarchyNodeCount, &NodeIndexer ); + + DEBUG (( + DEBUG_INFO, + " ProcHierarchyNodeCount =3D %d\n" \ + " ProcHierarchyNodeOffset =3D 0x%x\n" \ + " ProcHierarchyNodeIndexedList =3D 0x%p\n", + Generator->ProcHierarchyNodeCount, + ProcHierarchyNodeOffset, + Generator->ProcHierarchyNodeIndexedList + )); + } =20 // Include the size of Cache Type Structures and index them @@ -1215,6 +1226,15 @@ BuildPpttTable ( Generator->CacheStructCount, &NodeIndexer ); + DEBUG (( + DEBUG_INFO, + " CacheStructCount =3D %d\n" \ + " CacheStructOffset =3D 0x%x\n" \ + " CacheStructIndexedList =3D 0x%p\n", + Generator->CacheStructCount, + CacheStructOffset, + Generator->CacheStructIndexedList + )); } =20 // Include the size of ID Type Structures and index them @@ -1227,6 +1247,15 @@ BuildPpttTable ( Generator->IdStructCount, &NodeIndexer ); + DEBUG (( + DEBUG_INFO, + " IdStructCount =3D %d\n" \ + " IdStructOffset =3D 0x%x\n" \ + " IdStructIndexedList =3D 0x%p\n", + Generator->IdStructCount, + IdStructOffset, + Generator->IdStructIndexedList + )); } =20 DEBUG (( @@ -1238,36 +1267,6 @@ BuildPpttTable ( TableSize )); =20 - DEBUG (( - DEBUG_INFO, - " ProcHierarchyNodeCount =3D %d\n" \ - " ProcHierarchyNodeOffset =3D 0x%x\n" \ - " ProcHierarchyNodeIndexedList =3D 0x%p\n", - Generator->ProcHierarchyNodeCount, - ProcHierarchyNodeOffset, - Generator->ProcHierarchyNodeIndexedList - )); - - DEBUG (( - DEBUG_INFO, - " CacheStructCount =3D %d\n" \ - " CacheStructOffset =3D 0x%x\n" \ - " CacheStructIndexedList =3D 0x%p\n", - Generator->CacheStructCount, - CacheStructOffset, - Generator->CacheStructIndexedList - )); - - DEBUG (( - DEBUG_INFO, - " IdStructCount =3D %d\n" \ - " IdStructOffset =3D 0x%x\n" \ - " IdStructIndexedList =3D 0x%p\n", - Generator->IdStructCount, - IdStructOffset, - Generator->IdStructIndexedList - )); - // Allocate the Buffer for the PPTT table *Table =3D (EFI_ACPI_DESCRIPTION_HEADER*)AllocateZeroPool (TableSize); if (*Table =3D=3D NULL) { --=20 '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 (#46277): https://edk2.groups.io/g/devel/message/46277 Mute This Topic: https://groups.io/mt/32999800/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 Tue May 7 11:53:29 2024 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+46274+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 1566557867497921.3543108127718; Fri, 23 Aug 2019 03:57:47 -0700 (PDT) Return-Path: X-Received: from EUR03-VE1-obe.outbound.protection.outlook.com (EUR03-VE1-obe.outbound.protection.outlook.com [40.107.5.83]) by groups.io with SMTP; Fri, 23 Aug 2019 03:57:46 -0700 X-Received: from DB6PR0802CA0047.eurprd08.prod.outlook.com (2603:10a6:4:a3::33) by AM6PR08MB4949.eurprd08.prod.outlook.com (2603:10a6:20b:ee::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.16; Fri, 23 Aug 2019 10:57:40 +0000 X-Received: from VE1EUR03FT004.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::209) by DB6PR0802CA0047.outlook.office365.com (2603:10a6:4:a3::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.15 via Frontend Transport; Fri, 23 Aug 2019 10:57:40 +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+46274+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 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT004.mail.protection.outlook.com (10.152.18.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:57:39 +0000 X-Received: ("Tessian outbound eba0b9aef687:v27"); Fri, 23 Aug 2019 10:57:39 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 11d8043a3c781561 X-CR-MTA-TID: 64aa7808 X-Received: from 55102628b674.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.13.52]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id E71F8DD6-3DFF-48DA-AFB7-1BAD12D77C40.1; Fri, 23 Aug 2019 10:57:33 +0000 X-Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04lp2052.outbound.protection.outlook.com [104.47.13.52]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 55102628b674.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384); Fri, 23 Aug 2019 10:57:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oN2QV/oZZxbyoRhftrIdjRmtz6nC0OH3W0q4FZlQlqh43vwGc2+j6C3qPHAwAUymflGghlSx4LWgqbg/gU7QBU+qlenDq3/cVyPElnM060josMe3A1QIfCD0nhfW4E6Q1EBtQijyS/2jTAPwMJKRZemk2KjhVSsdDvEqUGORalK3MqKl5Boxr484IEpQkjn5v7BIoUDwRhTQkmRbzUSCY+CRb3dpsn+zrymbciI6wcKdy6IzcvqNBfuZKOfcrtM5WE7hUBjM5EzIDK08OCy+JyOleBb0D9RR6Fs9m7EKnc9Jf/aRpbl3DUXixRFqPtjDLUlpD3ht7Ycra/NLi9Sdhg== 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=k5PQZ+hcnJnKGIiqEBiTLA2jjFjEDQLbkEh8BNeBvtE=; b=OBookkOrsE0HJQF/2TqpIGiMwRLIHYOr+FKBbTWgy6muczMv+yCzzp15xh7DczyEyuore7DYEZt5RLGENfDujMLybIw500wgGAtAqyFq9YtlXUWC4qjbGsx0VqxFhaT5Jg7kTs5X9MdWtIyF5mFdl9PPfyO2X7xT7q6qnRQPZjAld9kuRPTDi2yrlzxCBYot2QwfQePdmAzwIJtgka1M07BYTselY3n1HkJxs4YcVOtNh0GE/UjcpH9d4BZ81ayE6EmOg2sek2GR74FHTgdUK3kQJRKtviEoqAH9d5igsrtmpXIhBo4VtrRU5R7bnRhyWpIMyyTY+38dHMA0ZZlvwQ== 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 DB7PR08CA0002.eurprd08.prod.outlook.com (2603:10a6:5:16::15) by HE1PR0802MB2604.eurprd08.prod.outlook.com (2603:10a6:3:db::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.16; Fri, 23 Aug 2019 10:57:31 +0000 X-Received: from AM5EUR03FT015.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::203) by DB7PR08CA0002.outlook.office365.com (2603:10a6:5:16::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.14 via Frontend Transport; Fri, 23 Aug 2019 10:57:31 +0000 Authentication-Results-Original: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; 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 AM5EUR03FT015.mail.protection.outlook.com (10.152.16.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:57:29 +0000 X-Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1415.2; Fri, 23 Aug 2019 10:56:29 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) 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; Fri, 23 Aug 2019 10:56:26 +0000 X-Received: from E107187.Arm.com (10.1.195.55) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Fri, 23 Aug 2019 10:56:26 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , Subject: [edk2-devel] [PATCH v1 15/19] DynamicTablesPkg: Remove erroneous use of EFIAPI Date: Fri, 23 Aug 2019 11:55:35 +0100 Message-ID: <20190823105539.13260-16-sami.mujawar@arm.com> In-Reply-To: <20190823105539.13260-1-sami.mujawar@arm.com> References: <20190823105539.13260-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;IPV:NLI;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(396003)(39860400002)(346002)(136003)(376002)(2980300002)(189003)(199004)(8676002)(63370400001)(446003)(86362001)(53416004)(426003)(2906002)(11346002)(50226002)(356004)(6666004)(2351001)(5660300002)(63350400001)(4326008)(81156014)(47776003)(76176011)(48376002)(478600001)(81166006)(44832011)(336012)(70206006)(70586007)(486006)(2616005)(476003)(26005)(6916009)(1076003)(305945005)(8936002)(126002)(7696005)(16586007)(54906003)(50466002)(36756003)(186003)(51416003)(53936002)(316002);DIR:OUT;SFP:1101;SCL:1;SRVR:HE1PR0802MB2604;H:nebula.arm.com;FPR:;SPF:TempError;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e94c5225-2488-46b0-3d0a-08d727b8b70a X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(2017052603328);SRVR:HE1PR0802MB2604; X-MS-TrafficTypeDiagnostic: HE1PR0802MB2604:|AM6PR08MB4949: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true X-MS-Oob-TLC-OOBClassifiers: OLM:6108;OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: UStXeX0mthKmcwOtiNd6BQPWPs6/ZgKToasCQzPweVPELKCseEH/fGwCKJOhOlHqrBDsXsEbbjfWgFa+OR+UcIaOcQg1gxmdkQGW7KErXgw34Mox4U//im9e68pwSuX0LmujJ+wK33Joq/rygGbf1+yYi2fkuTO649zw5u6ng3052tK2bfNYlJzkEY/kGVhO1STIUIFhlTqR/yE7Xz2aOJ3hPUhO4BquVz73c74JtyrwhICCUw07KbxoIwYXwzfES97C53o+F5Xmb8Jsvmlv/964pI4R1sV1qYMTC8u3kRTQ7x/nx2GPBB5ouRDA9a4D8CAnuZf5y/WykeB8Ie34NBpFkRweHdWKVrgKhkAwpMJoCH6DMM2U2NC71HKuo+5BY0Yqdk/HiZiqofxQ9y7CWAJc0q46lpxdnNlHqhVaAEw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0802MB2604 Original-Authentication-Results: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT004.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 739004af-24a0-435e-db3a-08d727b8b122 NoDisclaimer: True X-Microsoft-Antispam-Message-Info: Tp9om0DQsO/BP5Z9FXQEbheuTS29YP0pdJyS3pcXFt1+XdauAJl2wvZxJUF78vIZeCCEoGLX5F2bIwmwHf75yXb9md8Q7acW4gxyNN4cTGYAEgB9qaCT0I52Wnnp0rCx6MOeHDRCplzOlQSavqyNgHlaPN0YNcyPZqX1w7Pa5fyHZVVVAn2NFTSBhu7KrbVgmRffjvjhnGE0h4RMQbrHgpwwhOs4rZGKtnnTvKhcB1aVQENUd0cAHctcBPX7Bca/xfjLnSiALGYyKNlTIGhu1CKIG3kk9VbJeOmzNV4BCKfalzP0rTFqS2cqW77MFpUO1EO26/o4hv696p+Ru7hc11DhsKgUR1L/TlViPHXQcFrf3fO9ax7nATpSWdX4X1ZaLvR9neZr9CQ71Y4vNZlnWSz/JJ2ecjzzzuslQH0amXA= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2019 10:57:39.3280 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e94c5225-2488-46b0-3d0a-08d727b8b70a X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4949 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,sami.mujawar@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1566557867; bh=cPs92/xK15AZi7TRci+KVpGjn8yK3vMbMh5vzOQj1CA=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=Vp6L4maX82wDIz88HGyQjSSVjoQbO4GhI6rvPpI/tBZ2159pYUUKpUpXLvm5oZoWsRy jzjT45Yw0LEtlxCqmUDffuD9I5OV0WG9RFon+7qbBcrsnlQoXEfVre/G4ocbIHLB2wAit 7E4DXyF3tkalqixDQNI6OKiqUxhgblEZ+RI= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The Dynamic Tables Factory protocol has an erroneous EFIAPI calling convention macro in the function pointer declaration. Remove the erroneous EFIAPI calling convention macro from the interface declarations. Signed-off-by: Sami Mujawar Reviewed-by: Alexei Fedorov Reviewed-by: Philippe Mathieu-Daude --- DynamicTablesPkg/Include/Protocol/DynamicTableFactoryProtocol.h | 11 +----= ------ 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/DynamicTablesPkg/Include/Protocol/DynamicTableFactoryProtocol.= h b/DynamicTablesPkg/Include/Protocol/DynamicTableFactoryProtocol.h index d07d0cac36dedb0568f6f604daa22429565aafd3..ff2331b060019976319fc2707f6= 5252130a5326c 100644 --- a/DynamicTablesPkg/Include/Protocol/DynamicTableFactoryProtocol.h +++ b/DynamicTablesPkg/Include/Protocol/DynamicTableFactoryProtocol.h @@ -1,6 +1,6 @@ /** @file =20 - Copyright (c) 2017 - 2018, ARM Limited. All rights reserved. + Copyright (c) 2017 - 2019, ARM Limited. All rights reserved. =20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -53,7 +53,6 @@ typedef struct DynamicTableFactoryInfo EDKII_DYNAMIC_TABL= E_FACTORY_INFO; **/ typedef EFI_STATUS -EFIAPI (EFIAPI * EDKII_DYNAMIC_TABLE_FACTORY_GET_ACPI_TABLE_GENERATOR) ( IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL * CONST This, IN CONST ACPI_TABLE_GENERATOR_ID GeneratorId, @@ -73,7 +72,6 @@ EFIAPI **/ typedef EFI_STATUS -EFIAPI (EFIAPI * EDKII_DYNAMIC_TABLE_FACTORY_REGISTER_ACPI_TABLE_GENERATOR) ( IN CONST ACPI_TABLE_GENERATOR * CONST Generator ); @@ -89,7 +87,6 @@ EFIAPI **/ typedef EFI_STATUS -EFIAPI (EFIAPI * EDKII_DYNAMIC_TABLE_FACTORY_DEREGISTER_ACPI_TABLE_GENERATOR) ( IN CONST ACPI_TABLE_GENERATOR * CONST Generator ); @@ -109,7 +106,6 @@ EFIAPI **/ typedef EFI_STATUS -EFIAPI (EFIAPI * EDKII_DYNAMIC_TABLE_FACTORY_GET_SMBIOS_TABLE_GENERATOR) ( IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL * CONST This, IN CONST SMBIOS_TABLE_GENERATOR_ID GeneratorId, @@ -129,7 +125,6 @@ EFIAPI **/ typedef EFI_STATUS -EFIAPI (EFIAPI * EDKII_DYNAMIC_TABLE_FACTORY_REGISTER_SMBIOS_TABLE_GENERATOR) ( IN CONST SMBIOS_TABLE_GENERATOR * CONST Generator ); @@ -145,7 +140,6 @@ EFIAPI **/ typedef EFI_STATUS -EFIAPI (EFIAPI * EDKII_DYNAMIC_TABLE_FACTORY_DEREGISTER_SMBIOS_TABLE_GENERATOR) ( IN CONST SMBIOS_TABLE_GENERATOR * CONST Generator ); @@ -165,7 +159,6 @@ EFIAPI **/ typedef EFI_STATUS -EFIAPI (EFIAPI * EDKII_DYNAMIC_TABLE_FACTORY_GET_DT_TABLE_GENERATOR) ( IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL * CONST This, IN CONST DT_TABLE_GENERATOR_ID GeneratorId, @@ -185,7 +178,6 @@ EFIAPI **/ typedef EFI_STATUS -EFIAPI (EFIAPI * EDKII_DYNAMIC_TABLE_FACTORY_REGISTER_DT_TABLE_GENERATOR) ( IN CONST DT_TABLE_GENERATOR * CONST Generator ); @@ -204,7 +196,6 @@ EFIAPI **/ typedef EFI_STATUS -EFIAPI (EFIAPI * EDKII_DYNAMIC_TABLE_FACTORY_DEREGISTER_DT_TABLE_GENERATOR) ( IN CONST DT_TABLE_GENERATOR * CONST Generator ); --=20 '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 (#46274): https://edk2.groups.io/g/devel/message/46274 Mute This Topic: https://groups.io/mt/32999795/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 Tue May 7 11:53:29 2024 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+46276+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 1566557876947342.6686221157893; Fri, 23 Aug 2019 03:57:56 -0700 (PDT) Return-Path: X-Received: from EUR03-VE1-obe.outbound.protection.outlook.com (EUR03-VE1-obe.outbound.protection.outlook.com [40.107.5.54]) by groups.io with SMTP; Fri, 23 Aug 2019 03:57:56 -0700 X-Received: from VI1PR08CA0172.eurprd08.prod.outlook.com (2603:10a6:800:d1::26) by VI1PR0802MB2607.eurprd08.prod.outlook.com (2603:10a6:800:b9::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.18; Fri, 23 Aug 2019 10:57:51 +0000 X-Received: from VE1EUR03FT064.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::203) by VI1PR08CA0172.outlook.office365.com (2603:10a6:800:d1::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.15 via Frontend Transport; Fri, 23 Aug 2019 10:57:51 +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+46276+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 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT064.mail.protection.outlook.com (10.152.19.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:57:50 +0000 X-Received: ("Tessian outbound 4f2e8f9f1994:v27"); Fri, 23 Aug 2019 10:57:50 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: c3ffd1a2db8ec085 X-CR-MTA-TID: 64aa7808 X-Received: from 049cf6c35f46.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.6.56]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id 0AA85F50-9D27-46A8-9836-F56CB86A7888.1; Fri, 23 Aug 2019 10:57:45 +0000 X-Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-ve1eur02lp2056.outbound.protection.outlook.com [104.47.6.56]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 049cf6c35f46.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 23 Aug 2019 10:57:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ts28U19XvfFCt0HaFeh51oGl25e2Dwm6c04MCRAkmtNoysDZL/lsIN/6bYw88UPBBfRuX89VgHiPKT4g+ToRnOD+NM2dY2ljq+gLAskh+hPNgUuPZf45m81opeWzn3U9bZMYWapeGZ2nNMcwugrRSUPph9nDM4fYecjzvFS4Hg4ZfjuPPben2ryLnxg26M1KpUkmLOrBHL/5iql9YgWqZwuxsL46Tvny+Rfn36O4Fs2f/ikuxKikylX7eYB/aIYTrV7B4DiM2HxoeWQKsr5Ivx7dt69pUMVPmMPhQKivjfjNqOlnlHk/P9PTGCrAeTrIAxkC8a/KDaiJ1ENrgcIKjA== 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=mhimAzKFh+AHqnQA/IDer7qMAJLKoemw9/3MUAA66wI=; b=Yy3ENPey7oMClkIyYv6BNLCTessAY/ebKd7II4xYTb7eGDVCG8vLtKERraE5Af3sEnLFTPp3ZTm8W1g9xOp884COVxMBCAkM5icTw81rvqb1jF/iT5VeXQHufssHj+1GDlrSSPdek4bTIbhBL5jFM7nPWw/sYh571gTE1GOUP9WVo4++utZkJkv4oAXHjIvtV2UmcJcsZKgmQus5S6wCaQGyC2ZYlfh+dGkqWLdOJfjpjGeuYikF+NC2TBqBRXC9Rjl47qi5M8/VG31SefprCsdSY8vrMdJU6OJB575/EHXClK+3Hc4gRI4dYX18adusiuK6vt7g+fsDvnR6bneCKg== 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 VI1PR08CA0139.eurprd08.prod.outlook.com (10.175.229.17) by VE1PR08MB4958.eurprd08.prod.outlook.com (10.255.158.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.20; Fri, 23 Aug 2019 10:57:41 +0000 X-Received: from AM5EUR03FT017.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::204) by VI1PR08CA0139.outlook.office365.com (2603:10a6:800:d5::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.14 via Frontend Transport; Fri, 23 Aug 2019 10:57:41 +0000 Authentication-Results-Original: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; 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 AM5EUR03FT017.mail.protection.outlook.com (10.152.16.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:57:39 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Fri, 23 Aug 2019 10:56:26 +0000 X-Received: from E107187.Arm.com (10.1.195.55) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Fri, 23 Aug 2019 10:56:26 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , Subject: [edk2-devel] [PATCH v1 16/19] DynamicTablesPkg: Option for VS2017 static code analysis Date: Fri, 23 Aug 2019 11:55:36 +0100 Message-ID: <20190823105539.13260-17-sami.mujawar@arm.com> In-Reply-To: <20190823105539.13260-1-sami.mujawar@arm.com> References: <20190823105539.13260-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;IPV:NLI;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(346002)(136003)(396003)(39860400002)(376002)(2980300002)(199004)(189003)(53416004)(478600001)(2351001)(36756003)(6666004)(356004)(54906003)(5660300002)(1076003)(6916009)(2906002)(316002)(16586007)(47776003)(86362001)(53936002)(50466002)(48376002)(4326008)(81166006)(81156014)(305945005)(8676002)(186003)(26005)(50226002)(2616005)(11346002)(446003)(486006)(126002)(70206006)(70586007)(336012)(426003)(63370400001)(63350400001)(7696005)(44832011)(8936002)(476003)(76176011)(14444005)(51416003);DIR:OUT;SFP:1101;SCL:1;SRVR:VE1PR08MB4958;H:nebula.arm.com;FPR:;SPF:TempError;LANG:en;PTR:InfoDomainNonexistent;A:1;MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b9961c5e-70e6-4a1f-4e0d-08d727b8bdbe X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(2017052603328);SRVR:VE1PR08MB4958; X-MS-TrafficTypeDiagnostic: VE1PR08MB4958:|VI1PR0802MB2607: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true X-MS-Oob-TLC-OOBClassifiers: OLM:361;OLM:361; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: oWbZ+1yPweFfZQH9uhfPeqNRtgwmiWN6VbGk40lpq9RmOGfPGNgbSbAQC1w4YsnwMKvKLSMyy7simU/xgEoai/CCL81WPsEcS5flOMzT1+SQSB89VMjDpOWStJtVUwYiTYFY7ZU8SH0TbGyiM0mZB5psuE0ia7aVfOJyH1C37xp+EWiZ734US2rUTrW3giPHmg7KIKXC6Gg4t4d8FZR/kp9PJAMhk0rJUxX8zDmvQ2oqZmfz51OI/B22sPAD90aVaPwRaSx6Q8+Z2ZLM8gQmCfivgfQQdA3+G2gohWoimJ+SUJnS6c1FgNjfEqe/sDpTgLrM8XbA2w1+MoZPSTvOy8NeTKOqxsRbvSCF5Nwj/K6QaQ0m0CLcvomIL37goynBdrdlNTCOSYghaNiwgzsOn+xV8M53C6NUV5SmHWFalqY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4958 Original-Authentication-Results: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT064.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: a2116554-2999-4645-8878-08d727b8b715 NoDisclaimer: True X-Microsoft-Antispam-Message-Info: Q9dz3O6gO5VkcqlKYxj7CST44CyPxUYRgmuvehriE3itK2lyQzOCT/qlvMQI3lOg5wRE6XNY8hj3Mm6damMhUlf5zVWEJ0KD8y0+5O128iTDyv4wuKMxJRnA6XbuipySPMdx4ZPKtqVlY2j7Dt5R9J6MOE+N6uazsSfHk8F9D+N4SHgOfA50WJxCoddJ0LOAlramtfhcFEENRM/BdJEbl5jbZNpkLg/LkRBQjyJKSqKRnqwZbDWHXBvwxxqLBu2PhV/BU6C+NCyM1hxNhSBb3unhM0rG5FfcW8OW7WsHOOESs87StOMjPW1CPfHYt1qDuXzHzmbdwDJpj2ALn6YgJzyFnq/T6YTvOxnKHcjIjdf5DOIHk7yhTg1OJL70WH+6bADmo9QsxZ+Ty3vN4ThBWD8RkPH3dNCmig29K8XXR94= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2019 10:57:50.5804 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b9961c5e-70e6-4a1f-4e0d-08d727b8bdbe X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2607 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,sami.mujawar@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1566557876; bh=xfQeLZwsPZw5EneTevBPQWJg06+K4hfqeelK5FWGtwo=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=o9kHBEJj9x0gWQkZJ77A3xUvMlq+ImsZNhJwKIsdwHYPMrUcUIoWKQLZphTDSIF00bP JYSUIEa4w4HM5W1sTXIiKem4/jhq310WVVBCim/kYWf/KlJRgTKALMbeCix1J3S8searS JOouezzoUrhVhLzLizKGJ65DSBUa2r/Kw+8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add build option STATIC_ANALYSIS to enable VS2017 static code analysis. Signed-off-by: Sami Mujawar Reviewed-by: Alexei Fedorov --- DynamicTablesPkg/DynamicTablesPkg.dsc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/DynamicTablesPkg/DynamicTablesPkg.dsc b/DynamicTablesPkg/Dynam= icTablesPkg.dsc index dfe6c07111059cdd3eed23becf5000c04270bd9c..6ff6ff019e080f355ca24c9d05f= 71f8b85ab9077 100644 --- a/DynamicTablesPkg/DynamicTablesPkg.dsc +++ b/DynamicTablesPkg/DynamicTablesPkg.dsc @@ -4,7 +4,7 @@ # Copyright (c) 2019, Linaro Limited. All rights reserved.
# Copyright (c) 2019, ARM Limited. All rights reserved.
# -# SPDX-License-Identifier: BSD-2-Clause-Patent +# SPDX-License-Identifier: BSD-2-Clause-Patent # ## =20 @@ -39,3 +39,10 @@ [Components.common] =20 [BuildOptions] *_*_*_CC_FLAGS =3D -DDISABLE_NEW_DEPRECATED_INTERFACES + +!ifdef STATIC_ANALYSIS + # Check all rules + # Inhibit C6305: Potential mismatch between sizeof and countof quantitie= s. + *_VS2017_*_CC_FLAGS =3D /wd6305 /analyze +!endif + --=20 '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 (#46276): https://edk2.groups.io/g/devel/message/46276 Mute This Topic: https://groups.io/mt/32999797/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 Tue May 7 11:53:29 2024 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+46279+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 1566557919880155.41814390790057; Fri, 23 Aug 2019 03:58:39 -0700 (PDT) Return-Path: X-Received: from EUR02-HE1-obe.outbound.protection.outlook.com (EUR02-HE1-obe.outbound.protection.outlook.com [40.107.1.84]) by groups.io with SMTP; Fri, 23 Aug 2019 03:58:37 -0700 X-Received: from DB7PR08CA0071.eurprd08.prod.outlook.com (20.176.237.176) by AM6PR08MB4951.eurprd08.prod.outlook.com (10.255.122.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.16; Fri, 23 Aug 2019 10:58:33 +0000 X-Received: from AM5EUR03FT053.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::202) by DB7PR08CA0071.outlook.office365.com (2603:10a6:10:26::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.14 via Frontend Transport; Fri, 23 Aug 2019 10:58:32 +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+46279+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 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT053.mail.protection.outlook.com (10.152.16.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:58:30 +0000 X-Received: ("Tessian outbound 4f2e8f9f1994:v27"); Fri, 23 Aug 2019 10:58:28 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 0a6bcfd75bde45ce X-CR-MTA-TID: 64aa7808 X-Received: from d2c19d536457.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.13.54]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id AA9E6A7E-FDDA-41E3-82DF-9E6F8A768284.1; Fri, 23 Aug 2019 10:58:22 +0000 X-Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04lp2054.outbound.protection.outlook.com [104.47.13.54]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d2c19d536457.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 23 Aug 2019 10:58:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=auxTMM0ltTY12k3qgn54NZRM3fgpxFMrKb/VJOUaCTdoArvxMzjNBuCfAN4FzgQfvy3ecyhUoNrkAx1qlAqQVIcdWHJtp5HPOVNScu2xtksTD2qccWYmH7hzwSjZ57M0lTVkScEZtW5zh0mfdKeXxPllpVhs5At6wY0G1MIWbmeaEbhvD05fTyaQ7VWEEtdf+v8ft4K/0/RHVTyOKN+hwm/ZBXSZzUWx8b4bjrw0oOCu0Eq1HqifdBpDZzg332QccstLYcgA10rYi8Zr/R13Ji4xSAmSJJmXZSW4li9ytLaI7kdUhhcbSt+e/U3+ZmVaILE2TCcK1xGgQxmMlbC39A== 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=CcDOv5yr/k7Xib28G4PTZYxIiRSLlYHnC6d5cleALkE=; b=AcGMlPSMtCjvGA9O/mzZx6joIK7Iabh5+dSBCthNzaMnHWD+dgUzBHKOMvqNvMkJnpyfzBLyhuy6iVwIeOhBh2QLorJ4Lugq0mjsW/N8sSgNgFTX0MOC5fMpdJ96Xmj6Kmeonmli0/yLJ1zf5A8DvpkN1C9JHbqw79K1TDEFXHcpiTiMBtvatyo2PDxYj8VYZKkexibckG1Dn1ydzgsOpAH1qJl1mIWYWcr9v1Ff8bd3K3LR7RUe5N1yvlm4ijAv8tkfqJQLa7S/C0qdPrlT+4W2BAYMPAKDLEiuwYN1nGz16Zi9S4x8Megz0NmuC3S/X236upznVZdc1tzaJDXcZQ== 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 AM4PR08CA0054.eurprd08.prod.outlook.com (2603:10a6:205:2::25) by DB8PR08MB4955.eurprd08.prod.outlook.com (2603:10a6:10:38::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.20; Fri, 23 Aug 2019 10:58:20 +0000 X-Received: from AM5EUR03FT045.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::209) by AM4PR08CA0054.outlook.office365.com (2603:10a6:205:2::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.14 via Frontend Transport; Fri, 23 Aug 2019 10:58:20 +0000 Authentication-Results-Original: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; 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 AM5EUR03FT045.mail.protection.outlook.com (10.152.17.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:58:18 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Fri, 23 Aug 2019 10:56:27 +0000 X-Received: from E107187.Arm.com (10.1.195.55) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Fri, 23 Aug 2019 10:56:26 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , Subject: [edk2-devel] [PATCH v1 17/19] ArmPlatformPkg: Fix UART divisor warning Date: Fri, 23 Aug 2019 11:55:37 +0100 Message-ID: <20190823105539.13260-18-sami.mujawar@arm.com> In-Reply-To: <20190823105539.13260-1-sami.mujawar@arm.com> References: <20190823105539.13260-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;IPV:NLI;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(39860400002)(376002)(396003)(136003)(346002)(2980300002)(199004)(189003)(356004)(6666004)(486006)(81156014)(81166006)(53416004)(2351001)(476003)(126002)(2616005)(6916009)(44832011)(305945005)(50466002)(8676002)(19627235002)(54906003)(14444005)(16586007)(47776003)(316002)(50226002)(8936002)(36756003)(48376002)(4326008)(51416003)(53936002)(86362001)(478600001)(1076003)(70586007)(70206006)(186003)(336012)(26005)(5660300002)(76176011)(7696005)(63350400001)(446003)(2906002)(426003)(11346002)(63370400001)(46800400005);DIR:OUT;SFP:1101;SCL:1;SRVR:DB8PR08MB4955;H:nebula.arm.com;FPR:;SPF:TempError;LANG:en;PTR:InfoDomainNonexistent;A:1;MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 77ef8cbd-4c2b-40d1-e9ee-08d727b8d58c X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600166)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328);SRVR:DB8PR08MB4955; X-MS-TrafficTypeDiagnostic: DB8PR08MB4955:|AM6PR08MB4951: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true X-MS-Oob-TLC-OOBClassifiers: OLM:6790;OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: hy/uzvjM7dSg4J7OtqcpONjAn83DkVWyeAerzrUlEkR5MN+rYdnHG5yLFpiTbXyxyXbWgSxlULJj4HqThl5NfJXrZiXk5+9s4ks4AqVWReJDbTOmQ1BzHhLWhqFnAIqSLgntW7I4EOCxihzJOGumRCXL8DPMIVmrQNL7t4exHB9Bt0WiktmI7MkIiC7NpJN6D991octi2+BTL9CRxViIywmvAlOVVNxocNR7iBsaFcwDRf640Me2uodhXz5qJkroaV0UJmtauCCcAt4ejhmkfWIFxkL0/Oi9YAaWYxrcmjI3BnX4BA58DPpz7aOeH0nb35sfaSOQ32jsLofZVNzPzwxjSvi2/8DrMr0VROpS7eNr2gSXCSAsJWF48n8PW740vOhIypPqoehhyF+RghH8uZ/apAUfiV4RRyTpJHxRnB8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB4955 Original-Authentication-Results: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT053.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 5d7a3637-bd3d-4be7-188a-08d727b8ce7b NoDisclaimer: True X-Microsoft-Antispam-Message-Info: HUpoinm/jorcnopIIvmVX8GP+GKE3zzNNYM40jtj/eyw2GduEAt7VLVbFKLjKRUQ6k/lIkgZQwCucPukjty4TZ9trBFtDZuQ6Vny7SnPXAl/TO8PeS+qT82NxEGw20X9k278qa73rfUSUoinh7mmdHrRy/gmxVD6veoUzxcDXgDncuCjPk7gA3z+JcsAmxsHhG+Ye+Cydb4Doi09wT38TfrwMUREjVemqClYD8py3DYDnqP6Fsuxj5jsRTWKqI7HLdwvk+aTkP/QxQ2J1UwmqfhQV4K4iQ76M42mOJFaUlRP2oMMyFkC0jB8jVpG02APiaH0NfQlY7p0fmFpuGHFn9nIcn4Z8oC9M6bIEGbDGlhMGSBgaY8ofo0TJjsqN/5udwbjJxroaDIwvgfpRm5FoZjg3TueFPGkUcoCpVJP5PE= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2019 10:58:30.5711 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 77ef8cbd-4c2b-40d1-e9ee-08d727b8d58c X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4951 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,sami.mujawar@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1566557918; bh=s/AedM6q4iLylithQJQ1t9Agu4H97BQ/iIkFhG/XEt4=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=O8SnSnnfkC/dJyjDdWgpKivAR6suekf3v3jI9pvLt6hBho7ymc4LsensbZokYAVwhWa +55EunpP+e+uZ8HkTvinLkrYd/dWB3Xim5IEE/yRHCrZY1I3DSpNbl7DET91jI4uL/Bks hPFAidoCIfBdZw3wS40EpfNSbiCaJnT4SqQ= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The VS2017 compiler reports 'warning C4244: '=3D': conversion from 'UINT64' to 'UINT32', possible loss of data' for the calculation of the UART Divisor value. Fix this warning by adding appropriate typecast and a validation that ensures that the UART divisor value generated does not exceed MAX_UINT32. Signed-off-by: Sami Mujawar Reviewed-by: Alexei Fedorov Reviewed-by: Leif Lindholm Reviewed-by: Philippe Mathieu-Daude --- ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c b/ArmPlatfo= rmPkg/Library/PL011UartLib/PL011UartLib.c index 801990d9551a638c17d560d4226137b8a3ee47bb..2d3c279cce49304959953ec4a34= b50e09a7d0045 100644 --- a/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c +++ b/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c @@ -2,7 +2,7 @@ Serial I/O Port library functions with no library constructor/destructor =20 Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.
- Copyright (c) 2011 - 2016, ARM Ltd. All rights reserved.
+ Copyright (c) 2011 - 2019, ARM Ltd. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -78,6 +78,7 @@ PL011UartInitializePort ( UINT32 Integer; UINT32 Fractional; UINT32 HardwareFifoDepth; + UINT64 DivisorValue; =20 HardwareFifoDepth =3D (PL011_UARTPID2_VER (MmioRead32 (UartBase + UARTPI= D2)) \ > PL011_VER_R1P4) \ @@ -188,7 +189,12 @@ PL011UartInitializePort ( return RETURN_INVALID_PARAMETER; } =20 - Divisor =3D (UartClkInHz * 4) / *BaudRate; + DivisorValue =3D (((UINT64)UartClkInHz * 4) / *BaudRate); + if (DivisorValue > MAX_UINT32) { + return RETURN_INVALID_PARAMETER; + } + + Divisor =3D (UINT32)DivisorValue; Integer =3D Divisor >> FRACTION_PART_SIZE_IN_BITS; Fractional =3D Divisor & FRACTION_PART_MASK; } --=20 '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 (#46279): https://edk2.groups.io/g/devel/message/46279 Mute This Topic: https://groups.io/mt/32999802/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 Tue May 7 11:53:29 2024 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+46278+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 1566557911945269.13556824892976; Fri, 23 Aug 2019 03:58:31 -0700 (PDT) Return-Path: X-Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.47]) by groups.io with SMTP; Fri, 23 Aug 2019 03:58:25 -0700 X-Received: from DB6PR0802CA0028.eurprd08.prod.outlook.com (2603:10a6:4:a3::14) by AM5PR0802MB2596.eurprd08.prod.outlook.com (2603:10a6:203:98::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.18; Fri, 23 Aug 2019 10:58:21 +0000 X-Received: from VE1EUR03FT004.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::200) by DB6PR0802CA0028.outlook.office365.com (2603:10a6:4:a3::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.15 via Frontend Transport; Fri, 23 Aug 2019 10:58:20 +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+46278+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 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT004.mail.protection.outlook.com (10.152.18.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:58:19 +0000 X-Received: ("Tessian outbound eba0b9aef687:v27"); Fri, 23 Aug 2019 10:58:19 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 23f6222d3728f4b2 X-CR-MTA-TID: 64aa7808 X-Received: from fc5461a84a52.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.13.53]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id E87A8A68-390F-4670-A5EE-3AFC9DF06DEF.1; Fri, 23 Aug 2019 10:58:19 +0000 X-Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04lp2053.outbound.protection.outlook.com [104.47.13.53]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id fc5461a84a52.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 23 Aug 2019 10:58:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H3RMu3zkZVpDBfmnU3m8JkTq/qFZdPWke125ZuVZPL4+bFWCPzeZ1JYPDqCr1ox9LVzP2Dttl0yl6YObz+McC/DM4EJm2l2jS/xQ/CHoTBmijS3dFknpNoeRNPq3o3Sf87OWgwUM58wlbVh3X/a0Bb/XKhP0lSO3IJnkY7n1QYbqCnVttDP3JuTRDU19x8ISwtlf/nWrtYABSlLxYxH+gW8LBXipNUQ1sz6CScxKZZIQIF+plB2riBCQoiYoS0oU0v/H2Z0UEStxRNgUbKTJ0Hua+R9m9+4jvDG3sDeYbuw7FyxAZs415sO4zICNCJYmCQ+NHdQluGDoZlGOMU5w3Q== 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=Ip+TPsYZEdJq8oug2IJ4tOkAT5Zie8HUNiEH/wgC+Cw=; b=FKYKCTXVefhqzClM9W5XjHMfLGGrDuvCwrzU7w9jju1PWnT8mCSwdMo8CiRzQ2dFN3V7ud2dOl24+aazVqNPp3TGe3d6Cegd7LiMlTnmvGGmB3vYYHUhYN2z62aDouDPX+p+ecaSTfFAoH2Clhvzf1bidf1BloSThHI/7sLOPzFsxl9zpiCTp0LlmY8yY/jL5GZv76V3HqiQSM/542y30tQZsjUpV+tL1v+vffF6hdohnHrGFm1bs2TyKKjKPrd3cYmErE+/5McpTaK3/2vjpxtgp1LoAmpINZQaZnNgJbeOzwt2afRwC7lXoC1Y1VJsKfeMOQ0UgrY55SWgHExJgQ== 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 AM4PR08CA0077.eurprd08.prod.outlook.com (2603:10a6:205:2::48) by AM5PR0802MB2596.eurprd08.prod.outlook.com (2603:10a6:203:98::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.18; Fri, 23 Aug 2019 10:58:16 +0000 X-Received: from AM5EUR03FT045.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::208) by AM4PR08CA0077.outlook.office365.com (2603:10a6:205:2::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.15 via Frontend Transport; Fri, 23 Aug 2019 10:58:16 +0000 Authentication-Results-Original: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; 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 AM5EUR03FT045.mail.protection.outlook.com (10.152.17.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:58:15 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Fri, 23 Aug 2019 10:56:27 +0000 X-Received: from E107187.Arm.com (10.1.195.55) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Fri, 23 Aug 2019 10:56:27 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , Subject: [edk2-devel] [PATCH v1 18/19] ArmPlatformPkg: Fix comparison of constants warning Date: Fri, 23 Aug 2019 11:55:38 +0100 Message-ID: <20190823105539.13260-19-sami.mujawar@arm.com> In-Reply-To: <20190823105539.13260-1-sami.mujawar@arm.com> References: <20190823105539.13260-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;IPV:NLI;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(376002)(346002)(39860400002)(136003)(396003)(2980300002)(189003)(199004)(47776003)(305945005)(48376002)(81156014)(81166006)(70586007)(486006)(44832011)(2906002)(70206006)(16586007)(76176011)(26005)(476003)(426003)(126002)(51416003)(8676002)(50466002)(7696005)(1076003)(186003)(54906003)(63350400001)(8936002)(11346002)(2616005)(316002)(446003)(86362001)(336012)(63370400001)(19627235002)(36756003)(6666004)(356004)(53416004)(4326008)(50226002)(478600001)(6916009)(14444005)(53936002)(5660300002)(2351001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM5PR0802MB2596;H:nebula.arm.com;FPR:;SPF:TempError;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8d26423b-b8df-4599-abbf-08d727b8ceea X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(2017052603328);SRVR:AM5PR0802MB2596; X-MS-TrafficTypeDiagnostic: AM5PR0802MB2596:|AM5PR0802MB2596: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true X-MS-Oob-TLC-OOBClassifiers: OLM:247;OLM:247; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: X5K5aH3oBGL/wkxw5fAXTIHMb96Xfi41kz2lggS++oZR28E6B0/Krl0Iuo/ey6EOYPWMK4447ZN4qpBRNtr/sPk5SljkR0mNDKlhEUeGdU123oNqOvhDBqI/XGKo9KtFG0TcjxjNlfzb3VlXdcfeORiMIYJROIiW23MwbbzbECbitGfWbfvlRtI8lQviewzX95wvpV9mRgZZ0+YYUHV3Yp1m02JoeWIKC0h4LsODTPU2iNLCUV3mBiVKpHeVca0+6h3AtjgVyDTbuLVtY93/wg3liU+1NcA02WfxMdcEpb2zIfMSctcs5wHLAU4px6tQcIm11fgjaSG6bTgX2GPpIuKeKH2QWOoi+LKPLmPK3tB8HoDc9XVuNGSfm8EdRjh31lNInos+cd8CvmlFEx89XlNp588BnkbO4IxF55IXMNQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2596 Original-Authentication-Results: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT004.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 5d74b7a7-3a41-4037-5752-08d727b8cc67 NoDisclaimer: True X-Microsoft-Antispam-Message-Info: R+NUhXr6gYBoYi+4vAXImeOKam2P6YcaKDoK+BGldGPApYbq4TAK8zr1+28dOnkTlROCr+IOM73uU9omSEzp4XzmuCGB71IQXQQoZMx3NhHA3r4JwDTUmvljuJ/tI1skDxYDTPHriTREvpdQcDE0XLncuGBc7aZhHNadde61L9YR0M7yEAJuNXGmPO3GAr0+tg/EglmX81Co1puBSNhTqxVV0/rHzlB8j1JVfWmqaP+d2Fy3UDK8FDh4l/4MVeAwSruzxHA5OzZNnlKO6tc8sC0mFl0uMsaslY7PSJTw01+zL126n4t/rRPdIKICiXwXolhEUcNox7RxDACzYw0GKqga9D0XmikaElPXZK9ewLLmqIZYA/T47P8vVkBb4lY2PBrF32gI8wGY8M+SY77jvelJHmVAtKmaKz6eXKBcpwU= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2019 10:58:19.3845 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8d26423b-b8df-4599-abbf-08d727b8ceea X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2596 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,sami.mujawar@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1566557911; bh=zp7JUKZj6FGIA9MYJZ0XI41tlL787pIqhhzIsoFRfB0=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=w14qY17rtlN3SaWrDnW/HcH/O8JL5pTdKpvFXczc6R+UJ64sCJ/pvt2u4g/UXLW6paW ycpCfG9vmvn68A3ipca95iSpLCJITfESDKtk/GdKyRmLY2Iw+yDybc4Spe8dCeWfhp4u4 Dg+knBxjksgWdzf2laEujsYpo6r3Kkqh0jE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The VS2017 compiler reports 'warning C6326: potential comparison of a constant with another constant' when a fixed PCD value is compared with a constant value. The faulting code is as marked by '-->' below: --> if (FixedPcdGet32 (PL011UartInteger) !=3D 0) { Integer =3D FixedPcdGet32 (PL011UartInteger); Fractional =3D FixedPcdGet32 (PL011UartFractional); } else { ... The macro FixedPcdGet32 (PL011UartInteger) evaluates to a macro _PCD_VALUE_PL011UartInteger that is defined by the build system to represent the UART Integer value. Therefore, the VS2017 compiler reports the above warning. Fix this warning by enclosing the code in appropriate #if .. #else .. #endif directives. Signed-off-by: Sami Mujawar Reviewed-by: Alexei Fedorov Reviewed-by: Leif Lindholm --- ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c b/ArmPlatfo= rmPkg/Library/PL011UartLib/PL011UartLib.c index 2d3c279cce49304959953ec4a34b50e09a7d0045..dabf099b9bc82e1fb1bd5a2eae3= fa4b5878a9e07 100644 --- a/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c +++ b/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c @@ -174,10 +174,10 @@ PL011UartInitializePort ( // =20 // If PL011 Integer value has been defined then always ignore the BAUD r= ate - if (FixedPcdGet32 (PL011UartInteger) !=3D 0) { +#if (FixedPcdGet32 (PL011UartInteger) !=3D 0) Integer =3D FixedPcdGet32 (PL011UartInteger); Fractional =3D FixedPcdGet32 (PL011UartFractional); - } else { +#else // If BAUD rate is zero then replace it with the system default value if (*BaudRate =3D=3D 0) { *BaudRate =3D FixedPcdGet32 (PcdSerialBaudRate); @@ -197,7 +197,7 @@ PL011UartInitializePort ( Divisor =3D (UINT32)DivisorValue; Integer =3D Divisor >> FRACTION_PART_SIZE_IN_BITS; Fractional =3D Divisor & FRACTION_PART_MASK; - } +#endif =20 // // If PL011 is already initialized, check the current settings --=20 '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 (#46278): https://edk2.groups.io/g/devel/message/46278 Mute This Topic: https://groups.io/mt/32999801/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 Tue May 7 11:53:29 2024 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+46280+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 15665579229601001.6688797885829; Fri, 23 Aug 2019 03:58:42 -0700 (PDT) Return-Path: X-Received: from EUR02-HE1-obe.outbound.protection.outlook.com (EUR02-HE1-obe.outbound.protection.outlook.com [40.107.1.45]) by groups.io with SMTP; Fri, 23 Aug 2019 03:58:41 -0700 X-Received: from VI1PR08CA0140.eurprd08.prod.outlook.com (2603:10a6:800:d5::18) by HE1PR0802MB2603.eurprd08.prod.outlook.com (2603:10a6:3:e0::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.16; Fri, 23 Aug 2019 10:58:36 +0000 X-Received: from DB5EUR03FT023.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::204) by VI1PR08CA0140.outlook.office365.com (2603:10a6:800:d5::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.14 via Frontend Transport; Fri, 23 Aug 2019 10:58:36 +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+46280+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 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT023.mail.protection.outlook.com (10.152.20.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:58:35 +0000 X-Received: ("Tessian outbound eba0b9aef687:v27"); Fri, 23 Aug 2019 10:58:35 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 459e4c5cb034a56c X-CR-MTA-TID: 64aa7808 X-Received: from 901e375a38cf.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.0.55]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8A1366CB-8B52-45C8-A573-48294B84563B.1; Fri, 23 Aug 2019 10:58:29 +0000 X-Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp2055.outbound.protection.outlook.com [104.47.0.55]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 901e375a38cf.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 23 Aug 2019 10:58:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hs45hWIgXELQphESKjxEp2Kg8YMWnOhQR57a8m8WWgnbJqr2lISdK9QDFDfznZX60tq3USjJQRvuyCacqODJnkLYR/do74hH4dlLHtFosxjA9EIjkOp4MD7j7s/7XumGf6pgtZ6xneVLsMnig/kEwFnp+t0Ajb7NcRBAfimId9zMbRRG+p40WORRlKlI2TiWbOm/N5GX6gs99gcs5F8OOkm+xYhFJRdOlswwNjEg0xCsg7WvN+0nEzBKhnf4iTlb+0h9UjATljXdQ7g/ys7lA04galgVYLph8X0Sncw7BkwGDqJSsHh2/l57TaSyKPY+JfheXucfAjfMkhdwG7hdVQ== 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=QlxMIRiJqo0if4y5BqLqFQ2BCsfUlDNJyljFlvzDOU8=; b=Ux7waEUMC8b8XsiqH1Ycko9tux2ICmZyTAXliYXCIE1jrm3LXYUvCBWWHDgsmdNEHjf6Lj40VkjzjWipwbzn7qmbicKNKWJjJhTfa1rBUvbhj4AGTee0MgEGHzOQevgZm9WqEAP3W40VoP/ZDaZ6qXL2VfREfBGXCKBDKH+2+GEpD5E3mmHsRGq16Iu5wm7yj0KlsNv7wGqxCXr5dtvMbEfFJMgtsRgc695WA+5RXzNterT643QhVWLN+oMBLE//Kqqm/qDHmb3AUbvMPWXfVoLWcXtAt6RfOgyYdeMvGmr2ZuOYHurC8D9n/GYw3ILyDz8uLBS+OYbT/uSJb5LabQ== 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 VE1PR08CA0034.eurprd08.prod.outlook.com (2603:10a6:803:104::47) by HE1PR0801MB1852.eurprd08.prod.outlook.com (2603:10a6:3:7c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.16; Fri, 23 Aug 2019 10:58:27 +0000 X-Received: from AM5EUR03FT064.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::205) by VE1PR08CA0034.outlook.office365.com (2603:10a6:803:104::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.15 via Frontend Transport; Fri, 23 Aug 2019 10:58:26 +0000 Authentication-Results-Original: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; 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 AM5EUR03FT064.mail.protection.outlook.com (10.152.17.53) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:58:25 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Fri, 23 Aug 2019 10:56:27 +0000 X-Received: from E107187.Arm.com (10.1.195.55) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Fri, 23 Aug 2019 10:56:27 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , Subject: [edk2-devel] [PATCH v1 19/19] MdePkg: Initialise VA_LIST variables before use Date: Fri, 23 Aug 2019 11:55:39 +0100 Message-ID: <20190823105539.13260-20-sami.mujawar@arm.com> In-Reply-To: <20190823105539.13260-1-sami.mujawar@arm.com> References: <20190823105539.13260-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;IPV:NLI;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(376002)(136003)(396003)(39860400002)(346002)(2980300002)(189003)(199004)(4326008)(50226002)(8676002)(53416004)(486006)(305945005)(81156014)(50466002)(2616005)(11346002)(426003)(2351001)(2906002)(476003)(446003)(36756003)(53936002)(8936002)(86362001)(316002)(54906003)(126002)(16586007)(1076003)(7696005)(63370400001)(26005)(51416003)(44832011)(6916009)(5660300002)(81166006)(76176011)(6666004)(47776003)(356004)(70206006)(70586007)(63350400001)(478600001)(186003)(336012)(48376002)(14444005);DIR:OUT;SFP:1101;SCL:1;SRVR:HE1PR0801MB1852;H:nebula.arm.com;FPR:;SPF:TempError;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 37778b23-d913-4270-99da-08d727b8d83d X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600166)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328);SRVR:HE1PR0801MB1852; X-MS-TrafficTypeDiagnostic: HE1PR0801MB1852:|HE1PR0802MB2603: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true X-MS-Oob-TLC-OOBClassifiers: OLM:230;OLM:230; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: 1nKToDFZOfwfzygC9H0WKuJfZg37riEdLjh4Bt148P3LGlG+shEkBaShP9Ucv3KmikLhrGS6phmXnuNAruXUg6yNkpfMHRHzxsJB1HtWBhemt4qw7wQWoycJWOiYX7BzrkCzszgwZjEtKOa78rpxfh5NPUI3SM7miZVt3InWYXlyomSBR7vYFEuiFMf96YZeDaLHfYPFRW51huu3pmRj3rPLSuED+GLvl4V40iJPF7fH3XqGaftndE2hY+t+PLocJwWGPXd/ojB06q2Q45P/W3o5/xKoYH4cuN3l5qicNUj9+5mbMaIVZC+W0LCjGkFyDrCxoutcue3/IP918sr43t/3Z5XlQ8TvTJ/QtT2kPUPRXuwdIxRpXBNeCKBHsBsC8y4YwqQhtKRje6mK1QkOG7+G9sOZK6A1AD3zzUTGTFE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1852 Original-Authentication-Results: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT023.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 52d7384c-6474-4dc8-ff5c-08d727b8d2b6 NoDisclaimer: True X-Microsoft-Antispam-Message-Info: HBIpJwz0XPT6TtDa7+1tgr/wMwURKY8egmdIyiKC5xUzagMUqFmXvVy3b8kG/zX56OMfgnEfYM4qV98kcKdKQxKeOCYE/wIZeOPgOqOMjGscOnO5MP5dJAhNRxfZ6U8Bj20xAME1vsHLkLfSSdEGPeXk8zmGHLoaAWVcIcnm5XqtyIGWhyYlEiJvewxZhm9WG0ilToQ1wEUwD/d8k+T8Ed2PBIsjzwp+MkKUT7JWzNmv257+ZfqhseYpxH+6jGfjmIXh9Sp4ZSLqJI0q4HuvM6JWuF6t6oGSRUWlFVp+h6upImouu6SAC99NEn6h/E+fcbt+ht7Rhc8Ww4Dil7JMadcqmzRlH1Bf3RajdEV8hv4AfPFzuHT7X467iTOHEGazDy1TV4T4UbQxtbfPeNFoFkdHwxMgyOVnzgtHJVlW0Nw= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2019 10:58:35.1065 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 37778b23-d913-4270-99da-08d727b8d83d X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0802MB2603 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,sami.mujawar@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1566557922; bh=tWmzIDpDmnn1IeiSw0XL8drxedWyYrNPWfZbG1VFJik=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=XWApRzNo0Zhl0sr8klZGkZWlVE3cZT3r+O8GcOICusubqwVnKrGGMVhjCxJZyzw5GtS yfoIOpNeWnkkD9w/nhtitx34/b805GrAP8c1w6+QMOWrshIL7+zPlNUlH0NEb+Hgpjry/ QtdcdcuguQrslaxJz7a7lZP1b64E1DOgH5M= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The VS2017 compiler reports 'warning C6001: Using uninitialized memory 'Marker'.' for VA_LIST variables. To fix this issue declare a VA_LIST global variable and use this to initialise VA_LIST variables before use. Note: The VA_LIST cannot be assigned a NULL value because some compilers define VA_LIST to be a structure. Signed-off-by: Sami Mujawar Reviewed-by: Alexei Fedorov --- MdePkg/Library/BaseLib/SwitchStack.c | 9 +++++++++ MdePkg/Library/BasePrintLib/PrintLib.c | 5 +++++ MdePkg/Library/BasePrintLib/PrintLibInternal.c | 9 +++++++++ 3 files changed, 23 insertions(+) diff --git a/MdePkg/Library/BaseLib/SwitchStack.c b/MdePkg/Library/BaseLib/= SwitchStack.c index cb9f69f1eaceba690b48e9ca6b8a9af2e348bddd..e1bb524819b3de3521c5461ce68= 1aa3a6c186f2c 100644 --- a/MdePkg/Library/BaseLib/SwitchStack.c +++ b/MdePkg/Library/BaseLib/SwitchStack.c @@ -2,12 +2,20 @@ Switch Stack functions. =20 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ Copyright (c) 2019, ARM Ltd. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ =20 #include "BaseLibInternals.h" =20 +// +// Declare a VA_LIST global variable that is used to initialise VA_LIST +// variables before use. The VA_LIST cannot be assigned a NULL value +// because some compilers define VA_LIST to be a structure. +// +STATIC VA_LIST gNullVaList; + /** Transfers control to a function starting with a new stack. =20 @@ -57,6 +65,7 @@ SwitchStack ( // ASSERT (((UINTN)NewStack & (CPU_STACK_ALIGNMENT - 1)) =3D=3D 0); =20 + Marker =3D gNullVaList; VA_START (Marker, NewStack); =20 InternalSwitchStack (EntryPoint, Context1, Context2, NewStack, Marker); diff --git a/MdePkg/Library/BasePrintLib/PrintLib.c b/MdePkg/Library/BasePr= intLib/PrintLib.c index af771652e4b0aebd616973ba1089ae5bc2b6f0c0..67c5f3dd547cea5447075ef88d6= 97879883ba5ab 100644 --- a/MdePkg/Library/BasePrintLib/PrintLib.c +++ b/MdePkg/Library/BasePrintLib/PrintLib.c @@ -3,6 +3,7 @@ =20 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
+ Copyright (c) 2019, ARM Ltd. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -177,6 +178,7 @@ UnicodeSPrint ( VA_LIST Marker; UINTN NumberOfPrinted; =20 + Marker =3D gNullVaList; VA_START (Marker, FormatString); NumberOfPrinted =3D UnicodeVSPrint (StartOfBuffer, BufferSize, FormatStr= ing, Marker); VA_END (Marker); @@ -337,6 +339,7 @@ UnicodeSPrintAsciiFormat ( VA_LIST Marker; UINTN NumberOfPrinted; =20 + Marker =3D gNullVaList; VA_START (Marker, FormatString); NumberOfPrinted =3D UnicodeVSPrintAsciiFormat (StartOfBuffer, BufferSize= , FormatString, Marker); VA_END (Marker); @@ -614,6 +617,7 @@ AsciiSPrint ( VA_LIST Marker; UINTN NumberOfPrinted; =20 + Marker =3D gNullVaList; VA_START (Marker, FormatString); NumberOfPrinted =3D AsciiVSPrint (StartOfBuffer, BufferSize, FormatStrin= g, Marker); VA_END (Marker); @@ -774,6 +778,7 @@ AsciiSPrintUnicodeFormat ( VA_LIST Marker; UINTN NumberOfPrinted; =20 + Marker =3D gNullVaList; VA_START (Marker, FormatString); NumberOfPrinted =3D AsciiVSPrintUnicodeFormat (StartOfBuffer, BufferSize= , FormatString, Marker); VA_END (Marker); diff --git a/MdePkg/Library/BasePrintLib/PrintLibInternal.c b/MdePkg/Librar= y/BasePrintLib/PrintLibInternal.c index b6ec5ac4fbb98982f8ccaf3908c2a91ce583e31e..11392f2a5d12eb059611c3ff77b= 27b602f9b9a40 100644 --- a/MdePkg/Library/BasePrintLib/PrintLibInternal.c +++ b/MdePkg/Library/BasePrintLib/PrintLibInternal.c @@ -2,12 +2,20 @@ Print Library internal worker functions. =20 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ Copyright (c) 2019, ARM Ltd. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ =20 #include "PrintLibInternal.h" =20 +// +// Declare a VA_LIST global variable that is used to initialise VA_LIST +// variables before use. The VA_LIST cannot be assigned a NULL value +// because some compilers define VA_LIST to be a structure. +// +extern VA_LIST gNullVaList; + #define WARNING_STATUS_NUMBER 5 #define ERROR_STATUS_NUMBER 33 =20 @@ -1256,6 +1264,7 @@ BasePrintLibSPrint ( VA_LIST Marker; UINTN NumberOfPrinted; =20 + Marker =3D gNullVaList; VA_START (Marker, FormatString); NumberOfPrinted =3D BasePrintLibSPrintMarker (StartOfBuffer, BufferSize,= Flags, FormatString, Marker, NULL); VA_END (Marker); --=20 '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 (#46280): https://edk2.groups.io/g/devel/message/46280 Mute This Topic: https://groups.io/mt/32999803/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-