mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-25 06:34:30 +02:00
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>
This commit is contained in:
parent
b92298af82
commit
99338ef81e
@ -50,7 +50,7 @@
|
|||||||
ArmVirtMemInfoLib|ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.inf
|
ArmVirtMemInfoLib|ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.inf
|
||||||
|
|
||||||
TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.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
|
CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
|
||||||
|
|
||||||
@ -291,7 +291,7 @@
|
|||||||
NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
|
NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
|
||||||
}
|
}
|
||||||
|
|
||||||
ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
|
OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf
|
||||||
|
|
||||||
MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
|
MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ READ_LOCK_STATUS = TRUE
|
|||||||
INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
|
INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
|
||||||
INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
|
INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
|
||||||
INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.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
|
# FAT filesystem + GPT/MBR partitioning + UDF filesystem
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
|
|
||||||
#include <Library/BaseLib.h>
|
#include <Library/BaseLib.h>
|
||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
#include <Library/NorFlashPlatformLib.h>
|
|
||||||
#include <Library/UefiBootServicesTableLib.h>
|
#include <Library/UefiBootServicesTableLib.h>
|
||||||
|
#include <Library/VirtNorFlashPlatformLib.h>
|
||||||
#include <Protocol/FdtClient.h>
|
#include <Protocol/FdtClient.h>
|
||||||
|
|
||||||
/** Macro defining the NOR block size configured in Kvmtool.
|
/** Macro defining the NOR block size configured in Kvmtool.
|
||||||
@ -25,10 +25,10 @@
|
|||||||
*/
|
*/
|
||||||
#define LABEL_UEFI_VAR_STORE "System-firmware"
|
#define LABEL_UEFI_VAR_STORE "System-firmware"
|
||||||
|
|
||||||
STATIC NOR_FLASH_DESCRIPTION mNorFlashDevices[MAX_FLASH_DEVICES];
|
STATIC VIRT_NOR_FLASH_DESCRIPTION mNorFlashDevices[MAX_FLASH_DEVICES];
|
||||||
STATIC UINTN mNorFlashDeviceCount = 0;
|
STATIC UINTN mNorFlashDeviceCount = 0;
|
||||||
STATIC INT32 mUefiVarStoreNode = MAX_INT32;
|
STATIC INT32 mUefiVarStoreNode = MAX_INT32;
|
||||||
STATIC FDT_CLIENT_PROTOCOL *mFdtClient;
|
STATIC FDT_CLIENT_PROTOCOL *mFdtClient;
|
||||||
|
|
||||||
/** This function performs platform specific actions to initialise
|
/** This function performs platform specific actions to initialise
|
||||||
the NOR flash, if required.
|
the NOR flash, if required.
|
||||||
@ -36,7 +36,7 @@ STATIC FDT_CLIENT_PROTOCOL *mFdtClient;
|
|||||||
@retval EFI_SUCCESS Success.
|
@retval EFI_SUCCESS Success.
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
NorFlashPlatformInitialization (
|
VirtNorFlashPlatformInitialization (
|
||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -89,7 +89,7 @@ NorFlashPlatformInitialization (
|
|||||||
STATIC
|
STATIC
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
SetupVariableStore (
|
SetupVariableStore (
|
||||||
IN NOR_FLASH_DESCRIPTION *FlashDevice
|
IN VIRT_NOR_FLASH_DESCRIPTION *FlashDevice
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINTN FlashRegion;
|
UINTN FlashRegion;
|
||||||
@ -187,9 +187,9 @@ SetupVariableStore (
|
|||||||
@retval EFI_NOT_FOUND Flash device not found.
|
@retval EFI_NOT_FOUND Flash device not found.
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
NorFlashPlatformGetDevices (
|
VirtNorFlashPlatformGetDevices (
|
||||||
OUT NOR_FLASH_DESCRIPTION **NorFlashDescriptions,
|
OUT VIRT_NOR_FLASH_DESCRIPTION **NorFlashDescriptions,
|
||||||
OUT UINT32 *Count
|
OUT UINT32 *Count
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (mNorFlashDeviceCount > 0) {
|
if (mNorFlashDeviceCount > 0) {
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
FILE_GUID = E75F07A1-B160-4893-BDD4-09E32FF847DC
|
FILE_GUID = E75F07A1-B160-4893-BDD4-09E32FF847DC
|
||||||
MODULE_TYPE = DXE_DRIVER
|
MODULE_TYPE = DXE_DRIVER
|
||||||
VERSION_STRING = 1.0
|
VERSION_STRING = 1.0
|
||||||
LIBRARY_CLASS = NorFlashPlatformLib
|
LIBRARY_CLASS = VirtNorFlashPlatformLib
|
||||||
CONSTRUCTOR = NorFlashPlatformLibConstructor
|
CONSTRUCTOR = NorFlashPlatformLibConstructor
|
||||||
|
|
||||||
[Sources.common]
|
[Sources.common]
|
||||||
@ -20,11 +20,11 @@
|
|||||||
|
|
||||||
[Packages]
|
[Packages]
|
||||||
ArmPkg/ArmPkg.dec
|
ArmPkg/ArmPkg.dec
|
||||||
ArmPlatformPkg/ArmPlatformPkg.dec
|
|
||||||
ArmVirtPkg/ArmVirtPkg.dec
|
ArmVirtPkg/ArmVirtPkg.dec
|
||||||
EmbeddedPkg/EmbeddedPkg.dec
|
EmbeddedPkg/EmbeddedPkg.dec
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
MdeModulePkg/MdeModulePkg.dec
|
MdeModulePkg/MdeModulePkg.dec
|
||||||
|
OvmfPkg/OvmfPkg.dec
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
BaseLib
|
BaseLib
|
||||||
|
Loading…
x
Reference in New Issue
Block a user