]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: clone NorFlashPlatformLib into VirtNorFlashPlatformLib
authorArd Biesheuvel <ardb@kernel.org>
Mon, 24 Oct 2022 16:35:10 +0000 (18:35 +0200)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 27 Oct 2022 16:52:01 +0000 (16:52 +0000)
Create a new library class in Ovmf that duplicates the existing
NorFlashPlatformLib, but which will be tied to the VirtNorFlashDxe
driver that will be introduced in a subsequent patch. This allows us to
retire the original from ArmPlatformPkg.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
OvmfPkg/Include/Library/VirtNorFlashPlatformLib.h [new file with mode: 0644]
OvmfPkg/OvmfPkg.dec

diff --git a/OvmfPkg/Include/Library/VirtNorFlashPlatformLib.h b/OvmfPkg/Include/Library/VirtNorFlashPlatformLib.h
new file mode 100644 (file)
index 0000000..8f5b5e9
--- /dev/null
@@ -0,0 +1,30 @@
+/** @file\r
+\r
+ Copyright (c) 2011-2012, ARM Ltd. All rights reserved.<BR>\r
+\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+ **/\r
+\r
+#ifndef __VIRT_NOR_FLASH_PLATFORM_LIB__\r
+#define __VIRT_NOR_FLASH_PLATFORM_LIB__\r
+\r
+typedef struct {\r
+  UINTN    DeviceBaseAddress;       // Start address of the Device Base Address (DBA)\r
+  UINTN    RegionBaseAddress;       // Start address of one single region\r
+  UINTN    Size;\r
+  UINTN    BlockSize;\r
+} VIRT_NOR_FLASH_DESCRIPTION;\r
+\r
+EFI_STATUS\r
+VirtNorFlashPlatformInitialization (\r
+  VOID\r
+  );\r
+\r
+EFI_STATUS\r
+VirtNorFlashPlatformGetDevices (\r
+  OUT VIRT_NOR_FLASH_DESCRIPTION  **NorFlashDescriptions,\r
+  OUT UINT32                      *Count\r
+  );\r
+\r
+#endif /* __VIRT_NOR_FLASH_PLATFORM_LIB__ */\r
index f13dd4a61f017a4dbf1590e6d6498fd3dfda0cb7..5f5556c67c6c9ca2c82479438c7170d741c30ab3 100644 (file)
   #                  transports.\r
   VirtioMmioDeviceLib|Include/Library/VirtioMmioDeviceLib.h\r
 \r
+  ##  @libraryclass  Provides a Nor flash interface.\r
+  #\r
+  VirtNorFlashPlatformLib|Include/Library/VirtNorFlashPlatformLib.h\r
+\r
   ##  @libraryclass  Invoke Xen hypercalls\r
   #\r
   XenHypercallLib|Include/Library/XenHypercallLib.h\r