From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (EUR04-HE1-obe.outbound.protection.outlook.com [40.107.7.59]) by mx.groups.io with SMTP id smtpd.web12.8510.1589445875531995299 for ; Thu, 14 May 2020 01:44:36 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=FXQMth0m; spf=pass (domain: arm.com, ip: 40.107.7.59, mailfrom: sami.mujawar@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7smC3NMvS1LlXWtz6qAFplyDQWJuVUFchuD+lkFUNH0=; b=FXQMth0mHS+96SYlN8AIUjy/atGh/r+goA/ELuXsW76bIRM+u9N/UwRia3k7KYm2JpKJ17LiMua31wJcB7lnGSeUnkXnahVkc09hHa/jMuIF0LHPP/2N2sZQqqZWRS5LQ0F/elSynBZYq90AtA8RwvK9D6azl5i/7UzktMca1g4= Received: from MRXP264CA0043.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:14::31) by VI1PR08MB3935.eurprd08.prod.outlook.com (2603:10a6:803:e2::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.34; Thu, 14 May 2020 08:44:31 +0000 Received: from VE1EUR03FT013.eop-EUR03.prod.protection.outlook.com (2603:10a6:500:14:cafe::9f) by MRXP264CA0043.outlook.office365.com (2603:10a6:500:14::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.24 via Frontend Transport; Thu, 14 May 2020 08:44:31 +0000 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 (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; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT013.mail.protection.outlook.com (10.152.19.37) 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:31 +0000 Received: ("Tessian outbound b3a67fbfbb1f:v54"); Thu, 14 May 2020 08:44:31 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 323dba4e7009efb1 X-CR-MTA-TID: 64aa7808 Received: from 79e982e09fcd.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 706220F8-963E-4C77-83E1-8FBEA1C7A3C6.1; Thu, 14 May 2020 08:44:25 +0000 Received: from EUR01-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 79e982e09fcd.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 14 May 2020 08:44:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eqXWHBRV7JXWCFHzCojSI63vgA2NiUcQXDjlqz2fOn2N6UeAdOZwLsp6+fbbTDwul9KFLHaZsj2G0SfyH+xdxAg9sn4LNRpB9oTd4c8V7tOOIdeinPbctHX/5YvPc627Xe8FP2fpsv1rKZyNm7A6O4fckYIhFnkQK9rXeSM6k0MfsRKiuJ6IS1fwUdvCrIYEx9QWMagJEEXOQApFMk8mddgeQDx64ZyphaffFFNEnVynOBsJ4ET3ckyq/NAshmKYcraV82oUaKZGDP+rHX/Bjzuyoq75F3+vzpDojbRW7aMwUgQIiRYQ1dYrqIgsltYBJI5lIiH9tRfRajL/B0VV1g== 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=7smC3NMvS1LlXWtz6qAFplyDQWJuVUFchuD+lkFUNH0=; b=DkviPHdYMZh+rRjuv8+ATJVe/imZ9Ecik0c3A+9CTDtWo4OqAmq09jogWQZkf/788JUss39+ojAKr9MxghD4WtVQ7Xdy2syYd+gp81g37xp1fAZuX+cDiJ4KJvJK7KejXk9rLYP7qotg7EK8B04+UYRKVQxffX2zlAATi7wNa6CSzGw5br79+VRHeNZBGwpPzwTbt2cqU2363rG9xLD3KWl6fU6lYtc85s47I7xoyF1Kca7479z/nMQPNFZ2vQ/Q4JQSWEBZXgGHQsIWkBpVZ1st4+j2jvBxcKAEWQffpgdeenbSKTJZqhKd5ysTy2EKi4x3G4tU2nTbjVn9Zil/cQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7smC3NMvS1LlXWtz6qAFplyDQWJuVUFchuD+lkFUNH0=; b=FXQMth0mHS+96SYlN8AIUjy/atGh/r+goA/ELuXsW76bIRM+u9N/UwRia3k7KYm2JpKJ17LiMua31wJcB7lnGSeUnkXnahVkc09hHa/jMuIF0LHPP/2N2sZQqqZWRS5LQ0F/elSynBZYq90AtA8RwvK9D6azl5i/7UzktMca1g4= Received: from DB6PR07CA0117.eurprd07.prod.outlook.com (2603:10a6:6:2c::31) by HE1PR08MB2860.eurprd08.prod.outlook.com (2603:10a6:7:38::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.35; Thu, 14 May 2020 08:44:24 +0000 Received: from DB5EUR03FT008.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:2c:cafe::fe) by DB6PR07CA0117.outlook.office365.com (2603:10a6:6:2c::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.10 via Frontend Transport; Thu, 14 May 2020 08:44:23 +0000 Authentication-Results-Original: 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; Received: from nebula.arm.com (40.67.248.234) by DB5EUR03FT008.mail.protection.outlook.com (10.152.20.98) 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:23 +0000 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; Thu, 14 May 2020 08:40:27 +0000 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:27 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , Subject: [PATCH v1 05/11] ArmPlatformPkg: Dynamic flash variable base Date: Thu, 14 May 2020 09:40:13 +0100 Message-ID: <20200514084019.71368-6-sami.mujawar@arm.com> X-Mailer: git-send-email 2.11.0.windows.3 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)(396003)(136003)(376002)(39860400002)(346002)(46966005)(2906002)(70586007)(478600001)(7696005)(82310400002)(44832011)(1076003)(6666004)(54906003)(8676002)(5660300002)(356005)(6916009)(26005)(8936002)(426003)(70206006)(4326008)(82740400003)(336012)(47076004)(186003)(86362001)(36756003)(316002)(2616005)(81166007);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b9d8f1ea-4662-47d6-55bb-08d7f7e30526 X-MS-TrafficTypeDiagnostic: HE1PR08MB2860:|VI1PR08MB3935: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8273;OLM:8273; X-Forefront-PRVS: 040359335D X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: fJhT8+NsLE/HTQ4E7WWJ2ddfv/P66chzyymSE7Qp4gVbxI0wPq4fHC2p+Q+x3uNyKwNc2lbmMNS0HFyADPNitb5Xff2bODh/b038NPLCDiBnPfFSXnt0S/vAE13riSJ2JNt0zN0OhYevrS+3YRKxVX/X6h7tl+QwgAGdILdai2ZsW5PtSddtQdsO/Lji4yh52qKhWpRbpXKOkZpQ/o3HLmcnINDhszlWOWdy1rdTJL/DdrcwuyDmt/bOdtXqZiFUWHFJrEyLp8NWU9ayfxb6LhVJ5mAwJNEpwXNPuBMR0emTeBFUJ8j5ZWYkbvE2srieusqwTuZ2Gwv7sga3Asf3OlrDfcmOyt6bchTZl4e6Bh5eBGpz39MjLNwLOCQzfY7IPZYjUsdpQXuMcHxR9NttkzTZQkZUeGbdK5dCAAppuvmFNES/Zoo3eqP405y5zMso4fgnYpoP2QGymd28TUUKB0WR1dPor/W7KLJWb6uafh7mP4dV7t8r2lhOa1iYMVoiXs3uOg57NpzOioqAYe+JcQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR08MB2860 Original-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; Return-Path: Sami.Mujawar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT013.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFTY:;SFS:(4636009)(376002)(39860400002)(346002)(396003)(136003)(46966005)(81166007)(2906002)(4326008)(44832011)(478600001)(6916009)(186003)(6666004)(2616005)(82740400003)(70206006)(47076004)(7696005)(54906003)(336012)(36756003)(36906005)(70586007)(316002)(86362001)(82310400002)(426003)(8936002)(26005)(5660300002)(1076003)(8676002);DIR:OUT;SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: e874bdf9-8e9e-4e50-86df-08d7f7e300c7 X-Forefront-PRVS: 040359335D X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lWZXdgK39RSw3CmXXqARyscbwAA8F99IZQnBFvekn7iq/hXOTcl1C9RBalrXKXy+kpB9RmrOtyoipmhV+/2OULXO1MQr5J8Rdrlvvq6wSyeW9WEUhm4smIxfB8WXj/NKTFhtak5+9JDqAsud8vgK8YrzYrEPWnrxraJiW+JGS5dWRVXTN2YCD9loluiayfRQng+4HbKJ0VizAjpk6IrjveMhDceYxltiga46FjWPdmMJaeXWvb/NCkY3ZLwdB9sPsft0JkC9iEqMOtZ1oPb0YkFHMpz+U1DykaaysKoCIPmpcKFs8FgZFFUEij56p0i2kzgPFBkCVTIA3WFsFHwklkU9xTqbtAkUl5fIy/mxyGHaBgYWtb4e1YCjHdgyITYOxTT7DJONPb2QI65NeXV9D9l3KnnxMzh3Q6EMiabBEDwKLy82HleixMQb3MgoDFtozH2frvqpU+hcNiC5xE/QjJ2UtfdVg9qf7Us9qEHWro8RRqXPe+887DHdDTAFO9SxUTo6G7Z/YAeaQC1r4cEETA== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 May 2020 08:44:31.1210 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b9d8f1ea-4662-47d6-55bb-08d7f7e30526 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: VI1PR08MB3935 Content-Type: text/plain 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 --- ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c index e248fdf6db94191648b5d33bf1a9263f446ee141..9cdd85096a463f69b3b864cecdeaf247e65f4f73 100644 --- a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c +++ b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c @@ -1,6 +1,6 @@ /*++ @file NorFlashFvbDxe.c - Copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.
+ Copyright (c) 2011 - 2020, ARM Ltd. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent @@ -736,7 +736,7 @@ NorFlashFvbInitialize ( EFI_MEMORY_UC | EFI_MEMORY_RUNTIME); ASSERT_EFI_ERROR (Status); - mFlashNvStorageVariableBase = FixedPcdGet32 (PcdFlashNvStorageVariableBase); + mFlashNvStorageVariableBase = PcdGet32 (PcdFlashNvStorageVariableBase); // Set the index of the first LBA for the FVB Instance->StartLba = (PcdGet32 (PcdFlashNvStorageVariableBase) - Instance->RegionBaseAddress) / Instance->Media.BlockSize; -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'