From: "Sami Mujawar" <sami.mujawar@arm.com>
To: <devel@edk2.groups.io>
Cc: Sami Mujawar <sami.mujawar@arm.com>, <ard.biesheuvel@arm.com>,
<leif@nuviainc.com>, <philmd@redhat.com.Alexandru.Elisei@arm.com>,
<Andre.Przywara@arm.com>, <Matteo.Carlini@arm.com>,
<Laura.Moretta@arm.com>, <nd@arm.com>
Subject: [PATCH v3 03/15] ArmPlatformPkg: Dynamic flash variable base
Date: Wed, 24 Jun 2020 14:34:46 +0100 [thread overview]
Message-ID: <20200624133458.61920-4-sami.mujawar@arm.com> (raw)
In-Reply-To: <20200624133458.61920-1-sami.mujawar@arm.com>
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 <sami.mujawar@arm.com>
Reviewed-by: Ard Biesheuvel <Ard.Biesheuvel@arm.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
---
Notes:
v3:
- Resend patch with updated series. [Sami]
Ref: https://edk2.groups.io/g/devel/topic/74200906#60337
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/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.<BR>
+ Copyright (c) 2011 - 2020, ARM Ltd. All rights reserved.<BR>
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)'
next prev parent reply other threads:[~2020-06-24 13:35 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-24 13:34 [PATCH v3 00/15] Kvmtool guest firmware support for Arm Sami Mujawar
2020-06-24 13:34 ` [PATCH v3 01/15] PcAtChipsetPkg: Add MMIO Support to RTC driver Sami Mujawar
2020-06-25 11:24 ` Ard Biesheuvel
2020-06-29 2:36 ` [edk2-devel] " Guomin Jiang
2020-06-24 13:34 ` [PATCH v3 02/15] ArmVirtPkg: Add Kvmtool RTC Fdt Client Library Sami Mujawar
2020-06-25 11:31 ` Ard Biesheuvel
2020-06-24 13:34 ` Sami Mujawar [this message]
2020-06-24 13:34 ` [PATCH v3 04/15] ArmVirtPkg: Add kvmtool platform driver Sami Mujawar
2020-06-25 11:35 ` Ard Biesheuvel
2020-06-24 13:34 ` [PATCH v3 05/15] ArmVirtPkg: kvmtool platform memory map Sami Mujawar
2020-06-24 13:34 ` [PATCH v3 06/15] ArmVirtPkg: Add Kvmtool NOR flash lib Sami Mujawar
2020-06-25 8:45 ` Philippe Mathieu-Daudé
2020-06-25 11:19 ` [edk2-devel] " Ard Biesheuvel
2020-06-25 11:41 ` Philippe Mathieu-Daudé
2020-06-25 11:38 ` Ard Biesheuvel
2020-06-25 17:33 ` Sami Mujawar
2020-06-24 13:34 ` [PATCH v3 07/15] ArmVirtPkg: Early serial port initialisation Sami Mujawar
2020-06-25 11:42 ` Ard Biesheuvel
2020-06-26 9:23 ` Julien Grall
2020-06-24 13:34 ` [PATCH v3 08/15] MdeModulePkg: Fix constructor invocation ordering Sami Mujawar
2020-06-25 13:51 ` Ard Biesheuvel
2020-06-26 13:22 ` Laszlo Ersek
2020-06-27 11:37 ` Ard Biesheuvel
2020-06-24 13:34 ` [PATCH v3 09/15] ArmVirtPkg: GUID Hob for 16550 UART base address Sami Mujawar
2020-06-25 13:52 ` Ard Biesheuvel
2020-06-24 13:34 ` [PATCH v3 10/15] ArmVirtPkg: 16550 UART Platform hook library Sami Mujawar
2020-06-25 13:56 ` Ard Biesheuvel
2020-06-24 13:34 ` [PATCH v3 11/15] ArmVirtPkg: Add Kvmtool Platform Pei Lib Sami Mujawar
2020-06-25 14:05 ` Ard Biesheuvel
2020-06-24 13:34 ` [PATCH v3 12/15] ArmVirtPkg: Support for kvmtool virtual platform Sami Mujawar
2020-06-25 14:08 ` Ard Biesheuvel
2020-06-26 13:26 ` Laszlo Ersek
2020-06-24 13:34 ` [PATCH v3 13/15] ArmVirtPkg: Package dependency for MC146818 RTC Sami Mujawar
2020-06-25 14:08 ` Ard Biesheuvel
2020-06-24 13:34 ` [PATCH v3 14/15] ArmVirtPkg: Add kvmtool to package dictionary Sami Mujawar
2020-06-25 14:09 ` Ard Biesheuvel
2020-06-24 13:34 ` [PATCH v3 15/15] Maintainer.txt: Add Kvmtool platform reviewer Sami Mujawar
2020-06-25 14:09 ` Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200624133458.61920-4-sami.mujawar@arm.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox