2 OVMF support for QEMU system firmware flash device
4 Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #ifndef __QEMU_FLASH_H__
11 #define __QEMU_FLASH_H__
13 #include <Protocol/FirmwareVolumeBlock.h>
15 extern UINT8
*mFlashBase
;
20 @param[in] Lba The starting logical block index to read from.
21 @param[in] Offset Offset into the block at which to begin reading.
22 @param[in] NumBytes On input, indicates the requested read size. On
23 output, indicates the actual number of bytes read
24 @param[in] Buffer Pointer to the buffer to read into.
39 @param[in] Lba The starting logical block index to write to.
40 @param[in] Offset Offset into the block at which to begin writing.
41 @param[in] NumBytes On input, indicates the requested write size. On
42 output, indicates the actual number of bytes written
43 @param[in] Buffer Pointer to the data to write.
56 Erase a QEMU Flash block
58 @param Lba The logical block index to erase.
68 Initializes QEMU flash memory support
70 @retval EFI_WRITE_PROTECTED The QEMU flash device is not present.
71 @retval EFI_SUCCESS The QEMU flash device is supported.
81 QemuFlashConvertPointers (
86 QemuFlashBeforeProbe (
87 IN EFI_PHYSICAL_ADDRESS BaseAddress
,