summaryrefslogtreecommitdiffstats
path: root/ArmVirtPkg
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2022-10-24 18:51:43 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-10-27 16:52:01 +0000
commit99338ef81ed6e48be57f71c01af85fbbdd7030ed (patch)
tree92d071b3bdd08e5afaada035c90704c6f97f3013 /ArmVirtPkg
parentb92298af8218dd074c231947bc95f2be94af663c (diff)
downloadedk2-99338ef81ed6e48be57f71c01af85fbbdd7030ed.tar.gz
edk2-99338ef81ed6e48be57f71c01af85fbbdd7030ed.tar.bz2
edk2-99338ef81ed6e48be57f71c01af85fbbdd7030ed.zip
ArmVirtPkg/ArmVirtKvmTool: Migrate to OVMF's VirtNorFlashDxe
Migrate to the virt specific NOR flash driver as the ArmPlatformPkg is going away. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
Diffstat (limited to 'ArmVirtPkg')
-rw-r--r--ArmVirtPkg/ArmVirtKvmTool.dsc4
-rw-r--r--ArmVirtPkg/ArmVirtKvmTool.fdf2
-rw-r--r--ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtool.c20
-rw-r--r--ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf4
4 files changed, 15 insertions, 15 deletions
diff --git a/ArmVirtPkg/ArmVirtKvmTool.dsc b/ArmVirtPkg/ArmVirtKvmTool.dsc
index 3bd3ebd6e0..c598903b33 100644
--- a/ArmVirtPkg/ArmVirtKvmTool.dsc
+++ b/ArmVirtPkg/ArmVirtKvmTool.dsc
@@ -50,7 +50,7 @@
ArmVirtMemInfoLib|ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.inf
TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
- NorFlashPlatformLib|ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf
+ VirtNorFlashPlatformLib|ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf
CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
@@ -291,7 +291,7 @@
NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
}
- ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
+ OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf
MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
diff --git a/ArmVirtPkg/ArmVirtKvmTool.fdf b/ArmVirtPkg/ArmVirtKvmTool.fdf
index 9e006e83ee..b696bffc7c 100644
--- a/ArmVirtPkg/ArmVirtKvmTool.fdf
+++ b/ArmVirtPkg/ArmVirtKvmTool.fdf
@@ -154,7 +154,7 @@ READ_LOCK_STATUS = TRUE
INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
- INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
+ INF OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf
#
# FAT filesystem + GPT/MBR partitioning + UDF filesystem
diff --git a/ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtool.c b/ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtool.c
index 39d2615b54..129c16b711 100644
--- a/ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtool.c
+++ b/ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtool.c
@@ -9,8 +9,8 @@
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
-#include <Library/NorFlashPlatformLib.h>
#include <Library/UefiBootServicesTableLib.h>
+#include <Library/VirtNorFlashPlatformLib.h>
#include <Protocol/FdtClient.h>
/** Macro defining the NOR block size configured in Kvmtool.
@@ -25,10 +25,10 @@
*/
#define LABEL_UEFI_VAR_STORE "System-firmware"
-STATIC NOR_FLASH_DESCRIPTION mNorFlashDevices[MAX_FLASH_DEVICES];
-STATIC UINTN mNorFlashDeviceCount = 0;
-STATIC INT32 mUefiVarStoreNode = MAX_INT32;
-STATIC FDT_CLIENT_PROTOCOL *mFdtClient;
+STATIC VIRT_NOR_FLASH_DESCRIPTION mNorFlashDevices[MAX_FLASH_DEVICES];
+STATIC UINTN mNorFlashDeviceCount = 0;
+STATIC INT32 mUefiVarStoreNode = MAX_INT32;
+STATIC FDT_CLIENT_PROTOCOL *mFdtClient;
/** This function performs platform specific actions to initialise
the NOR flash, if required.
@@ -36,7 +36,7 @@ STATIC FDT_CLIENT_PROTOCOL *mFdtClient;
@retval EFI_SUCCESS Success.
**/
EFI_STATUS
-NorFlashPlatformInitialization (
+VirtNorFlashPlatformInitialization (
VOID
)
{
@@ -89,7 +89,7 @@ NorFlashPlatformInitialization (
STATIC
EFI_STATUS
SetupVariableStore (
- IN NOR_FLASH_DESCRIPTION *FlashDevice
+ IN VIRT_NOR_FLASH_DESCRIPTION *FlashDevice
)
{
UINTN FlashRegion;
@@ -187,9 +187,9 @@ SetupVariableStore (
@retval EFI_NOT_FOUND Flash device not found.
**/
EFI_STATUS
-NorFlashPlatformGetDevices (
- OUT NOR_FLASH_DESCRIPTION **NorFlashDescriptions,
- OUT UINT32 *Count
+VirtNorFlashPlatformGetDevices (
+ OUT VIRT_NOR_FLASH_DESCRIPTION **NorFlashDescriptions,
+ OUT UINT32 *Count
)
{
if (mNorFlashDeviceCount > 0) {
diff --git a/ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf b/ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf
index 04d6723295..b5f35d4782 100644
--- a/ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf
+++ b/ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf
@@ -12,7 +12,7 @@
FILE_GUID = E75F07A1-B160-4893-BDD4-09E32FF847DC
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
- LIBRARY_CLASS = NorFlashPlatformLib
+ LIBRARY_CLASS = VirtNorFlashPlatformLib
CONSTRUCTOR = NorFlashPlatformLibConstructor
[Sources.common]
@@ -20,11 +20,11 @@
[Packages]
ArmPkg/ArmPkg.dec
- ArmPlatformPkg/ArmPlatformPkg.dec
ArmVirtPkg/ArmVirtPkg.dec
EmbeddedPkg/EmbeddedPkg.dec
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
+ OvmfPkg/OvmfPkg.dec
[LibraryClasses]
BaseLib