From nobody Tue Feb 10 05:10:01 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+59514+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 1589445899410899.9779942126245; Thu, 14 May 2020 01:44:59 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id tHA0YY1788612x3jZ8WzCqxU; Thu, 14 May 2020 01:44:59 -0700 X-Received: from EUR04-HE1-obe.outbound.protection.outlook.com (EUR04-HE1-obe.outbound.protection.outlook.com [40.107.7.40]) by mx.groups.io with SMTP id smtpd.web12.8518.1589445897750929456 for ; Thu, 14 May 2020 01:44:58 -0700 X-Received: from DB6PR07CA0013.eurprd07.prod.outlook.com (2603:10a6:6:2d::23) by AM5PR0801MB2114.eurprd08.prod.outlook.com (2603:10a6:203:37::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.27; Thu, 14 May 2020 08:44:54 +0000 X-Received: from DB5EUR03FT036.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:2d:cafe::81) by DB6PR07CA0013.outlook.office365.com (2603:10a6:6:2d::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.11 via Frontend Transport; Thu, 14 May 2020 08:44:54 +0000 Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+59514+1787277+3901457@groups.io; helo=web01.groups.io; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT036.mail.protection.outlook.com (10.152.20.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.19 via Frontend Transport; Thu, 14 May 2020 08:44:54 +0000 X-Received: ("Tessian outbound 567b75aed2b9:v54"); Thu, 14 May 2020 08:44:54 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 2c75e0ce16825a70 X-CR-MTA-TID: 64aa7808 X-Received: from 22ffe6e69ba9.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 701D5F25-CB68-479C-9C5E-00ED61E94214.1; Thu, 14 May 2020 08:44:44 +0000 X-Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 22ffe6e69ba9.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 14 May 2020 08:44:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S/c3BxvQkYe5xycsC1Bx41/eDMojfzhiDyeseVSOWZXWOFGlzuBoMfPFEP3mNa5zEtursvx+JaOCtq9SLCBoC2vLiZBxx/nfcnfAZ2R6V1NmDjn7fMzEUWcd8fYk1a6/qsAIyLA3lMHBW+3qhpQrdBVBWZMP7tf/TFMBgWXsfcsYSkdmQuWNR/jIr0BKDEtYALdnrLy7AhS2EalN5fLufd1e0dIf+JVqUDlXR3L5IPBkUg4dksI6fq3VOFmfajYjawyLav2VQbpbryxMThcrdUApOhB3bMslnOU01oIbIfsQXraF4whAPoDESoCMHlhGV3vjHp8syxgFZMHQorhJKw== 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=14Eic6NkJnPAGqVeN+tmPDx4TmxiF+cMe2IBZqljjm8=; b=d18gpYRij5T3LkZD/doKsL5HxCb6dKA+cGaUv20qyPICTaMQu6Qa2U5q6EmQxcWPz1672FQo4JxbDLyYs3DIpBwHmtPT8lblcud16fb1+xMIEbPuRXWk9lRaVfEz8/a8QlIh8J4VBgsUl/7mmdRXvd11u3xKBkmhaHS9Yuj63byxjr9Yw79il6SUXCe5k+3Q6cdv8ktpAqa/f53sAdX6iCTi5VKe3J2SpK1DQWHZ6G2rZLWjTrWSyF4fHUYSndBAeckB2b1dFYgPkDzU7QUYM8hpQB81fGlUPhv34rzAek0OkViakqPRTDfzpBLlEerWOVZ/rTK5CPtNwJC5UsIy2Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=bestguesspass action=none header.from=arm.com; dkim=none (message not signed); arc=none X-Received: from DB6PR0301CA0046.eurprd03.prod.outlook.com (2603:10a6:4:54::14) by HE1PR0802MB2505.eurprd08.prod.outlook.com (2603:10a6:3:df::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.28; Thu, 14 May 2020 08:44:42 +0000 X-Received: from DB5EUR03FT021.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:54:cafe::57) by DB6PR0301CA0046.outlook.office365.com (2603:10a6:4:54::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.20 via Frontend Transport; Thu, 14 May 2020 08:44:41 +0000 X-MS-Exchange-Authentication-Results: spf=pass (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=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; X-Received: from nebula.arm.com (40.67.248.234) by DB5EUR03FT021.mail.protection.outlook.com (10.152.20.238) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3000.19 via Frontend Transport; Thu, 14 May 2020 08:44:41 +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; Thu, 14 May 2020 08:40:32 +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.1779.2; Thu, 14 May 2020 08:40:32 +0000 X-Received: from E107187.Arm.com (10.57.42.179) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Thu, 14 May 2020 08:40:31 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v1 10/11] ArmVirtPkg: Link NorFlashDxe with BaseMemoryLibMmio Date: Thu, 14 May 2020 09:40:18 +0100 Message-ID: <20200514084019.71368-11-sami.mujawar@arm.com> In-Reply-To: <20200514084019.71368-1-sami.mujawar@arm.com> References: <20200514084019.71368-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;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFTY:;SFS:(4636009)(346002)(39860400002)(396003)(136003)(376002)(46966005)(70586007)(4326008)(70206006)(6916009)(82310400002)(2906002)(47076004)(478600001)(426003)(86362001)(81166007)(356005)(82740400003)(336012)(6666004)(26005)(54906003)(186003)(8936002)(36756003)(316002)(44832011)(5660300002)(1076003)(8676002)(2616005)(7696005);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4103e2ca-0499-4719-b820-08d7f7e312c9 X-MS-TrafficTypeDiagnostic: HE1PR0802MB2505:|AM5PR0801MB2114: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8273;OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: /NqX8bsPB0TatdC/5L2+pbxcJk+zoDyZdKAkj6ZiCXEz93/3kqutjqpFYXp1aOQXj1kDFav2CW0IGJDxc/e381w6ddFBKkrj9ibj7v7cKufvdkcavj8yFA30fVVe8NrMKNjr08vSWOQI/nC3k9Z8so2esRLNCy2qBvNNnhwBbCRC0sFjobqoqtRaHTcBSJCd3n3Ac3PKRE9j8B38QVxxNSOS5NGS6wbIsSkbHKJg2hxyyL/wFODUdmSD/v7fPfI2aENSfgvObNOe9aib45DAKXKwTgATG06+CXRx83WJpDEulb1yyLHVmRkf5d7r20V8+U2bq4NDdiV4x3l+rOCVJgtPV+eRWy8derDmkY9LRMg+EKuJDrpEWt4DGAxxt9HV2R3T0rHsyUicEQRbpwrgAMpdwDl6EznECyIEW1dGl7b2MeVPhfUt44uAirpoXAuPuDCZl+atSyzfeVtJscP/KKqKS7sGfxXzQmRnut9UDGlug8qFwTRdNsKSnE7kXbkMpiuwhItZMH9y9Qp80qhhJQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0802MB2505 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT036.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 4cc739c2-fdff-4ca0-4e29-08d7f7e30b80 X-Microsoft-Antispam-Message-Info: 5cwrOZWw9D2r760EDVkJafHmwM6pE0KaQ+cpUZh4oBQawy2mmzSvk9AA3uGqCZAv9Yx04LgnveQ6WwjwYg0SUSO23N/7+kQ/HCKNTWTRsTamG+sSojuH9kbcJczxSDvBO5VA3gJT1OlVztD33Be66J2h6h0E+IL08ddSsKcg9h1bAp6h68aX5L24tD6A93qC1j/0IB8J+PT5nX9m5Bt307tho5wuBoESCYLwD2UHl8OtmyedzmUPEewsfNob4WrizqeCuc1ZnIOHox+O62JNhhLIA76y2eIt+PPvn87vrnRpWI9RuvC/vO+DM1ufeUyfX48PDDYQC+dWR53407UHLad6dkV7cE3RaX/ZuVTiMvl3g5bLZokNwu1rWTl1wY1TrsjbIDDIMR0QVbURpctrWnElO5r02894IFsyf+Bu48pknbmRlyUeaSnksZPSwEaqtR5UTp9Yl90+Q4XNsUngR37GO9sXH8Crfzqo+BTHZqw75UMbxlExQ0/yIv5w5FD43kdq9qmA1QK7KIEOX6DOIw== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 May 2020 08:44:54.1001 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4103e2ca-0499-4719-b820-08d7f7e312c9 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: AM5PR0801MB2114 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 X-Gm-Message-State: 7SlLSG65SgXtPKQpgav8N7fqx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1589445899; bh=4Sfc/fhFPSn1BSgugQ0JHTE2/Hoq5rw9nyp70Mer4D8=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=Pg+5/bdZ41baWE++v0fw5TspfQSBBoxjqY0Q+ooaasglMozXl9ylJYxPUEy+yTnxngj WzE+oeRx6jBcnYc00ma9D7EzD5LcM2/2k0y+9QnRv4hcPDqCeNdYb7WsQv04I/e+rcwbW uMycbMmihF0awsMBJ8tSa9QNXDD4KkGyh3U= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" NorFlashDxe must use aligned MMIO accesses to read data from flash as this is device memory. The AlignedCopyMem() in NorFlashDxe was used to copy the flash data which prevented unaligned access to device memory. However, the compiler could optimize the code to generate pre/post indexed or LDP operations. This is a problem for guest/virtual firmware as the hypervisor code cannot get the syndrome information for the trapped accesses. To address the such issues, BaseMemoryLibMmio library has been introduced to perform aligned MMIO accesses. The NorFlashDxe has been updated to use CopyMem() instead of using AlignedCopyMem() and therefore the NorFlashDxe must be linked with BaseMemoryLibMmio. This patch updates the workspace files to link NorFlashDxe with BaseMemoryLibMmio for the following platforms: - Arm Qemu - Arm Qemu Kernel Signed-off-by: Sami Mujawar --- ArmVirtPkg/ArmVirtQemu.dsc | 8 ++++++-- ArmVirtPkg/ArmVirtQemuKernel.dsc | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index 3f649c91d8d6a2e3f3e62f35aa40906e048a15c4..82b7d54c2031fed60dccff38353= d3ec19cfdefd0 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -1,5 +1,5 @@ # -# Copyright (c) 2011-2015, ARM Limited. All rights reserved. +# Copyright (c) 2011-2020, ARM Limited. All rights reserved. # Copyright (c) 2014, Linaro Limited. All rights reserved. # Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved. # @@ -384,7 +384,11 @@ [Components.common] NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClie= ntLib.inf } - ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf + ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf { + + BaseMemoryLib|MdePkg/Library/BaseMemoryLibMmio/BaseMemoryLibMmio.inf + } + MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf =20 # diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKerne= l.dsc index 2a6fd6bc06be1cc20d8c6f2bf00d88d593061edf..6cceb61e493c8c84f6564b120b0= 864ff817c3f31 100644 --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc @@ -1,5 +1,5 @@ # -# Copyright (c) 2011-2015, ARM Limited. All rights reserved. +# Copyright (c) 2011-2020, ARM Limited. All rights reserved. # Copyright (c) 2014, Linaro Limited. All rights reserved. # Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved. # @@ -323,7 +323,11 @@ [Components.common] NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClie= ntLib.inf } - ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf + ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf { + + BaseMemoryLib|MdePkg/Library/BaseMemoryLibMmio/BaseMemoryLibMmio.inf + } + MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf =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 (#59514): https://edk2.groups.io/g/devel/message/59514 Mute This Topic: https://groups.io/mt/74200921/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-