summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/Include
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2022-10-24 18:35:10 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-10-27 16:52:01 +0000
commit16bf588b604a9f190accb71ada715b81756c94e2 (patch)
tree53886758d154354dd1c4920f4394a20958c8bdde /OvmfPkg/Include
parent115cebbe4d7541c795b4f9baefc38f9a1733b7f6 (diff)
downloadedk2-16bf588b604a9f190accb71ada715b81756c94e2.tar.gz
edk2-16bf588b604a9f190accb71ada715b81756c94e2.tar.bz2
edk2-16bf588b604a9f190accb71ada715b81756c94e2.zip
OvmfPkg: clone NorFlashPlatformLib into VirtNorFlashPlatformLib
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>
Diffstat (limited to 'OvmfPkg/Include')
-rw-r--r--OvmfPkg/Include/Library/VirtNorFlashPlatformLib.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/OvmfPkg/Include/Library/VirtNorFlashPlatformLib.h b/OvmfPkg/Include/Library/VirtNorFlashPlatformLib.h
new file mode 100644
index 0000000000..8f5b5e972d
--- /dev/null
+++ b/OvmfPkg/Include/Library/VirtNorFlashPlatformLib.h
@@ -0,0 +1,30 @@
+/** @file
+
+ Copyright (c) 2011-2012, ARM Ltd. All rights reserved.<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+ **/
+
+#ifndef __VIRT_NOR_FLASH_PLATFORM_LIB__
+#define __VIRT_NOR_FLASH_PLATFORM_LIB__
+
+typedef struct {
+ UINTN DeviceBaseAddress; // Start address of the Device Base Address (DBA)
+ UINTN RegionBaseAddress; // Start address of one single region
+ UINTN Size;
+ UINTN BlockSize;
+} VIRT_NOR_FLASH_DESCRIPTION;
+
+EFI_STATUS
+VirtNorFlashPlatformInitialization (
+ VOID
+ );
+
+EFI_STATUS
+VirtNorFlashPlatformGetDevices (
+ OUT VIRT_NOR_FLASH_DESCRIPTION **NorFlashDescriptions,
+ OUT UINT32 *Count
+ );
+
+#endif /* __VIRT_NOR_FLASH_PLATFORM_LIB__ */