TianoCore EDK2 master
Loading...
Searching...
No Matches
QemuFlash.h File Reference

Go to the source code of this file.

Functions

EFI_STATUS QemuFlashRead (IN EFI_LBA Lba, IN UINTN Offset, IN UINTN *NumBytes, IN UINT8 *Buffer)
 
EFI_STATUS QemuFlashWrite (IN EFI_LBA Lba, IN UINTN Offset, IN UINTN *NumBytes, IN UINT8 *Buffer)
 
EFI_STATUS QemuFlashEraseBlock (IN EFI_LBA Lba)
 
EFI_STATUS QemuFlashInitialize (VOID)
 
VOID QemuFlashConvertPointers (VOID)
 
VOID QemuFlashBeforeProbe (IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINTN FdBlockSize, IN UINTN FdBlockCount)
 
VOID QemuFlashPtrWrite (IN volatile UINT8 *Ptr, IN UINT8 Value)
 

Variables

UINT8 * mFlashBase
 

Detailed Description

OVMF support for QEMU system firmware flash device

Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file QemuFlash.h.

Function Documentation

◆ QemuFlashBeforeProbe()

VOID QemuFlashBeforeProbe ( IN EFI_PHYSICAL_ADDRESS  BaseAddress,
IN UINTN  FdBlockSize,
IN UINTN  FdBlockCount 
)

Definition at line 34 of file QemuFlashDxe.c.

◆ QemuFlashConvertPointers()

VOID QemuFlashConvertPointers ( VOID  )

Definition at line 22 of file QemuFlashDxe.c.

◆ QemuFlashEraseBlock()

EFI_STATUS QemuFlashEraseBlock ( IN EFI_LBA  Lba)

Erase a QEMU Flash block

Parameters
LbaThe logical block index to erase.

Definition at line 234 of file QemuFlash.c.

◆ QemuFlashInitialize()

EFI_STATUS QemuFlashInitialize ( VOID  )

Initializes QEMU flash memory support

Return values
EFI_WRITE_PROTECTEDThe QEMU flash device is not present.
EFI_SUCCESSThe QEMU flash device is supported.

Definition at line 258 of file QemuFlash.c.

◆ QemuFlashPtrWrite()

VOID QemuFlashPtrWrite ( IN volatile UINT8 *  Ptr,
IN UINT8  Value 
)

Write to QEMU Flash

Parameters
[in]PtrPointer to the location to write.
[in]ValueThe value to write.

Definition at line 53 of file QemuFlashDxe.c.

◆ QemuFlashRead()

EFI_STATUS QemuFlashRead ( IN EFI_LBA  Lba,
IN UINTN  Offset,
IN UINTN NumBytes,
IN UINT8 *  Buffer 
)

Read from QEMU Flash

Parameters
[in]LbaThe starting logical block index to read from.
[in]OffsetOffset into the block at which to begin reading.
[in]NumBytesOn input, indicates the requested read size. On output, indicates the actual number of bytes read
[in]BufferPointer to the buffer to read into.

Definition at line 150 of file QemuFlash.c.

◆ QemuFlashWrite()

EFI_STATUS QemuFlashWrite ( IN EFI_LBA  Lba,
IN UINTN  Offset,
IN UINTN NumBytes,
IN UINT8 *  Buffer 
)

Write to QEMU Flash

Parameters
[in]LbaThe starting logical block index to write to.
[in]OffsetOffset into the block at which to begin writing.
[in]NumBytesOn input, indicates the requested write size. On output, indicates the actual number of bytes written
[in]BufferPointer to the data to write.

Definition at line 188 of file QemuFlash.c.

Variable Documentation

◆ mFlashBase

UINT8* mFlashBase
extern

Definition at line 27 of file QemuFlash.c.