From nobody Mon Feb 9 18:19:42 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+62140+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 1594126110812335.3816982002925; Tue, 7 Jul 2020 05:48:30 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id IPVfYY1788612xJJyiohdI9J; Tue, 07 Jul 2020 05:48:30 -0700 X-Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.57]) by mx.groups.io with SMTP id smtpd.web11.15375.1594126108438702636 for ; Tue, 07 Jul 2020 05:48:29 -0700 X-Received: from DB6PR0301CA0005.eurprd03.prod.outlook.com (2603:10a6:4:3e::15) by AM6PR08MB3302.eurprd08.prod.outlook.com (2603:10a6:209:41::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20; Tue, 7 Jul 2020 12:48:25 +0000 X-Received: from DB5EUR03FT014.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:3e:cafe::b9) by DB6PR0301CA0005.outlook.office365.com (2603:10a6:4:3e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.21 via Frontend Transport; Tue, 7 Jul 2020 12:48:25 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; 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+62140+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 DB5EUR03FT014.mail.protection.outlook.com (10.152.20.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:24 +0000 X-Received: ("Tessian outbound a4b10e5b482d:v62"); Tue, 07 Jul 2020 12:48:24 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: ef8239474847b150 X-CR-MTA-TID: 64aa7808 X-Received: from fd2f740d0a17.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id C124450A-AF35-48AD-B64F-BE279AD97C50.1; Tue, 07 Jul 2020 12:48:18 +0000 X-Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id fd2f740d0a17.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 07 Jul 2020 12:48:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gVtzclnDXj/B/yvpJI4W8Lf8Clv9117umhw6CSW5hlgD/9yGWBqAKTGpcUFUvPtUJBR82W9zgrOBRoTeVOHDZlgPDolwLXLcVUdpHpjTazA0UlOBQhVpwq3lnbmH0mvujweDCb/ROG1x1C4nsfAcB/NH2nNNmrokop94ECHvx9eNceFERJInyObctHcV+M3IpnGDCUmhvsrQTOg9bcDlxedBcLitnIBusncwSPABsRSSPY4JkcBC8MCzooE+QIYb8jUnelnmMsLHpwXDxcwU0Ut0DGeUwrQldmxspNRvkoqeM/J/RIoCOG6EihnG+IysmMuC0dWvBs3Oo9EuJU5rMg== 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=5JZzRL5Y2nrgz7TJj+Sp4KlqiRcX+FJnhkrBs1YDxwA=; b=afozqbQTdbE9862jjpiPY12bz8cjJ3qBPgcenC8BemacXfyOhA947O5RrP8oe53coLXB7pz3JDIy4mp5t3eIvl+FfyA3WnYc1A8lFeSl4WYdAV57Y4qEEHe50osLmr07KTwrh7o3s64lerYA6aLS7JO3yUViVYhxDkOGkW+cooKnBNL9xT0ERp+7vYs6juBcVEbOQwG/wgjFOuxs1tsRiKfcWuuMbZwu77aOd+liDrHLprpo+dJc8rmHVhgCsOiWbINeCxUhf23w95DsMv+RStZsolVIdJWXE7Su2K/ZxLitzbl3UcoVdzyJubCnJfBOStB6AZ1v4Yw7mweP9ti8zw== 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 DB6PR0501CA0006.eurprd05.prod.outlook.com (2603:10a6:4:8f::16) by VI1PR08MB4192.eurprd08.prod.outlook.com (2603:10a6:803:e3::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20; Tue, 7 Jul 2020 12:48:17 +0000 X-Received: from DB5EUR03FT013.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:8f:cafe::f5) by DB6PR0501CA0006.outlook.office365.com (2603:10a6:4:8f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.21 via Frontend Transport; Tue, 7 Jul 2020 12:48:17 +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 DB5EUR03FT013.mail.protection.outlook.com (10.152.20.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3153.24 via Frontend Transport; Tue, 7 Jul 2020 12:48:17 +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; Tue, 7 Jul 2020 12:48:15 +0000 X-Received: from E107187.Arm.com (10.57.21.15) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Tue, 7 Jul 2020 12:48:14 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , Subject: [edk2-devel] [PATCH v4 03/15] ArmPlatformPkg: Dynamic flash variable base Date: Tue, 7 Jul 2020 13:47:57 +0100 Message-ID: <20200707124810.50668-4-sami.mujawar@arm.com> In-Reply-To: <20200707124810.50668-1-sami.mujawar@arm.com> References: <20200707124810.50668-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)(136003)(396003)(376002)(346002)(39860400002)(46966005)(316002)(8676002)(2616005)(44832011)(6916009)(8936002)(70586007)(478600001)(81166007)(5660300002)(82310400002)(47076004)(82740400003)(70206006)(356005)(186003)(26005)(4326008)(83380400001)(966005)(36756003)(426003)(6666004)(2906002)(86362001)(54906003)(1076003)(7696005)(336012);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c5ad738f-44c4-4936-5c04-08d8227409ca X-MS-TrafficTypeDiagnostic: VI1PR08MB4192:|AM6PR08MB3302: 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: mlTdjUzNvpbzSCrRDw4cnPmFzdL2MTfqZ1E6QYMCZMb8iXrgR+BwNPCpg0ExqKm/6Mn/B7Pwzk3Ruqs+OqwUhogmlIsmHoz07qIJSrnlcp2WADr+O3ZHikIMYv5MqOgvThtGLjYywMIeiAqeFmODAfp00keRCLMjKZyG34wfEQtBAYdXqAvTbzNoHBWVIKyRXtNMXbzHemh5Nk4vgKIFXMDoWPE/VBIiYd5lM9Tbrw6oXjkZWy/BaxjAUyR22OcQwQLHlNjQzxWd4k2XXUD1wTJQrb4MLNeaBe5A6VOXylwHQvDVM4jDAsscAPQeN0trI4/0WWqW8UWk/fQhKblhdvvl3fIilVpnOxUmSYMCE4n30PA6KnFA0Spq1Nh015KH/oKToKtDVzdKiRGCoX2p3PE3uLLFajunV7+5ske70k8ro1NByVC1tWgkzgLLgKPGRib3CeU3pQJTTGH/T/8Y96JJuhB/rPMUAy7fVnfaRjQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4192 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT014.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 60f4b974-5aa1-41f3-f6eb-08d822740540 X-Microsoft-Antispam-Message-Info: DQzETFChtIlTbM5GlrFCToy3FPiL1VuzhqD/CcglejaMqHckpznb4RF+zyKTIDhtz4t56WsATdUpPgbc2gym5hVGzvpHItA3LM3TagKEFACTul/I7vsXE2fC4SnucpN/u8HKgsVMX+lFkAABWCzIrGW+s87IvHPAU9+lh+siIxu+qiKcPkQbsg+JVRC7McKHgwdhlECW86PDhyK4Yh7A2vEUNgvo9rmz07pV2zORi14AUYLk1GXIEbBrcU8pKTwY0MS5yZFlm/TXy5Lp8gD91+YNpkOZfC4LeqD30Uog5l0wEKZGjrWRQQlWfzIhOKv5MrXwBcjVgMdfm4p9uv5Czw1uVVAHNVzT5o5+IhUagH4eMG69LYFwqvr96CkkasjK810dtF1zmqD+JDHsGpDYjZZn2QqXm033DOHiltwsoc0bfGeJNFDbo7RJW8mIeP7ghW0hEgDgGMHAVK7u510jdoHRv8pOSN681wUiECq5aoY= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2020 12:48:24.8672 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c5ad738f-44c4-4936-5c04-08d8227409ca 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-AuthSource: DB5EUR03FT014.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3302 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: ormOPjMX1lZsFjg2hMFhZigax1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1594126110; bh=LFVPMLWHdlES6u1qJ1f2rlBBOg0ja2e7Nhq4iX5DU+c=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=VRwwOcM8ofZ9umnbyKY48KrAmYxDw/l6fB02C8u7wIpPjShBVEjgbcJr8eZFC26n3HZ +gThSOk/8lT7Ed2DPuMxYaB4xDqqOVQmi0eMlDjZDZjp6TeHtc7MQ3UjjodtUKoysHKW3 buJWRUc3HFCbuYjlayuPs4/067VgVxTQAeg= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Some virtual machine managers like kvmtool can relocate the devices in the system memory map. The information about the devices location in memory is described in the device tree. Therefore, the CFI memory region and the associated Non volatile storage variables need to be adjusted accordingly. To support such use cases the non-volatile storage variable base PCD PcdFlashNvStorageVariableBase has been defined as a dynamic PCD. The NOR flash driver was using the Flash non-volatile storage variable base PCD as a fixed PCD, thereby preventing runtime resolution of the variable base address. Therefore update the NOR flash driver to load the PCD using PcdGet32 instead of FixedPcdGet32. Signed-off-by: Sami Mujawar Reviewed-by: Ard Biesheuvel Reviewed-by: Philippe Mathieu-Daude --- Notes: v4: - No code changes, resending patch with v4 series. [Sami] Ref: https://edk2.groups.io/g/devel/message/61666 =20 v3: - Resend patch with updated series. [Sami] Ref: https://edk2.groups.io/g/devel/topic/74200906#60337 =20 v2: - Add support to make PCD PcdFlashNvStorageVariableBase [Sami] a dynamic PCD and update NOR flash driver to PcdGet32 instead of FixedPcdGet32 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c b/ArmPlatf= ormPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c index e248fdf6db94191648b5d33bf1a9263f446ee141..9cdd85096a463f69b3b864cecde= af247e65f4f73 100644 --- a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c +++ b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c @@ -1,6 +1,6 @@ /*++ @file NorFlashFvbDxe.c =20 - Copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.
+ Copyright (c) 2011 - 2020, ARM Ltd. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -736,7 +736,7 @@ NorFlashFvbInitialize ( EFI_MEMORY_UC | EFI_MEMORY_RUNTIME); ASSERT_EFI_ERROR (Status); =20 - mFlashNvStorageVariableBase =3D FixedPcdGet32 (PcdFlashNvStorageVariable= Base); + mFlashNvStorageVariableBase =3D PcdGet32 (PcdFlashNvStorageVariableBase); =20 // Set the index of the first LBA for the FVB Instance->StartLba =3D (PcdGet32 (PcdFlashNvStorageVariableBase) - Insta= nce->RegionBaseAddress) / Instance->Media.BlockSize; --=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 (#62140): https://edk2.groups.io/g/devel/message/62140 Mute This Topic: https://groups.io/mt/75354084/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-