summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/VirtNorFlashDxe/VirtNorFlash.h
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2022-10-24 17:12:08 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-10-27 16:52:01 +0000
commit83f11f957240ead9b135a778316330762b0a3acb (patch)
tree51f6ffabfd2e3ef9caf5ce68ea0ddda02ab1acd7 /OvmfPkg/VirtNorFlashDxe/VirtNorFlash.h
parent68d234989b2d6bd8f255577e08bf8be0b1d197bb (diff)
downloadedk2-83f11f957240ead9b135a778316330762b0a3acb.tar.gz
edk2-83f11f957240ead9b135a778316330762b0a3acb.tar.bz2
edk2-83f11f957240ead9b135a778316330762b0a3acb.zip
OvmfPkg/VirtNorFlashDxe: drop block I/O protocol implementation
We never boot from NOR flash, and generally rely on the firmware volume PI protocols to expose the contents. So drop the block I/O protocol implementation from VirtNorFlashDxe. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
Diffstat (limited to 'OvmfPkg/VirtNorFlashDxe/VirtNorFlash.h')
-rw-r--r--OvmfPkg/VirtNorFlashDxe/VirtNorFlash.h54
1 files changed, 3 insertions, 51 deletions
diff --git a/OvmfPkg/VirtNorFlashDxe/VirtNorFlash.h b/OvmfPkg/VirtNorFlashDxe/VirtNorFlash.h
index 7733ee02ee..b7f5d208b2 100644
--- a/OvmfPkg/VirtNorFlashDxe/VirtNorFlash.h
+++ b/OvmfPkg/VirtNorFlashDxe/VirtNorFlash.h
@@ -14,7 +14,6 @@
#include <Guid/EventGroup.h>
-#include <Protocol/BlockIo.h>
#include <Protocol/FirmwareVolumeBlock.h>
#include <Library/DebugLib.h>
@@ -108,8 +107,7 @@
#define P30_CMD_READ_CONFIGURATION_REGISTER 0x0003
#define NOR_FLASH_SIGNATURE SIGNATURE_32('n', 'o', 'r', '0')
-#define INSTANCE_FROM_FVB_THIS(a) CR(a, NOR_FLASH_INSTANCE, FvbProtocol, NOR_FLASH_SIGNATURE)
-#define INSTANCE_FROM_BLKIO_THIS(a) CR(a, NOR_FLASH_INSTANCE, BlockIoProtocol, NOR_FLASH_SIGNATURE)
+#define INSTANCE_FROM_FVB_THIS(a) CR(a, NOR_FLASH_INSTANCE, FvbProtocol, NOR_FLASH_SIGNATURE)
typedef struct _NOR_FLASH_INSTANCE NOR_FLASH_INSTANCE;
@@ -129,9 +127,8 @@ struct _NOR_FLASH_INSTANCE {
UINTN RegionBaseAddress;
UINTN Size;
EFI_LBA StartLba;
-
- EFI_BLOCK_IO_PROTOCOL BlockIoProtocol;
- EFI_BLOCK_IO_MEDIA Media;
+ EFI_LBA LastBlock;
+ UINT32 BlockSize;
EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL FvbProtocol;
VOID *ShadowBuffer;
@@ -156,51 +153,6 @@ NorFlashWriteBuffer (
);
//
-// BlockIO Protocol function EFI_BLOCK_IO_PROTOCOL.Reset
-//
-EFI_STATUS
-EFIAPI
-NorFlashBlockIoReset (
- IN EFI_BLOCK_IO_PROTOCOL *This,
- IN BOOLEAN ExtendedVerification
- );
-
-//
-// BlockIO Protocol function EFI_BLOCK_IO_PROTOCOL.ReadBlocks
-//
-EFI_STATUS
-EFIAPI
-NorFlashBlockIoReadBlocks (
- IN EFI_BLOCK_IO_PROTOCOL *This,
- IN UINT32 MediaId,
- IN EFI_LBA Lba,
- IN UINTN BufferSizeInBytes,
- OUT VOID *Buffer
- );
-
-//
-// BlockIO Protocol function EFI_BLOCK_IO_PROTOCOL.WriteBlocks
-//
-EFI_STATUS
-EFIAPI
-NorFlashBlockIoWriteBlocks (
- IN EFI_BLOCK_IO_PROTOCOL *This,
- IN UINT32 MediaId,
- IN EFI_LBA Lba,
- IN UINTN BufferSizeInBytes,
- IN VOID *Buffer
- );
-
-//
-// BlockIO Protocol function EFI_BLOCK_IO_PROTOCOL.FlushBlocks
-//
-EFI_STATUS
-EFIAPI
-NorFlashBlockIoFlushBlocks (
- IN EFI_BLOCK_IO_PROTOCOL *This
- );
-
-//
// NorFlashFvbDxe.c
//