mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-21 20:54:29 +02:00
OvmfPkg EMU FVB: Convert to FVB2 protocol
Convert from using EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL to EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11240 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
9529d0ffaf
commit
949b0f3b27
@ -116,7 +116,7 @@ FvbVirtualAddressChangeEvent (
|
|||||||
a memory-mapped firmware volume. This function should be called
|
a memory-mapped firmware volume. This function should be called
|
||||||
only for memory-mapped firmware volumes.
|
only for memory-mapped firmware volumes.
|
||||||
|
|
||||||
@param This Indicates the EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL instance.
|
@param This Indicates the EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL instance.
|
||||||
|
|
||||||
@param Address Pointer to a caller-allocated
|
@param Address Pointer to a caller-allocated
|
||||||
EFI_PHYSICAL_ADDRESS that, on successful
|
EFI_PHYSICAL_ADDRESS that, on successful
|
||||||
@ -131,7 +131,7 @@ FvbVirtualAddressChangeEvent (
|
|||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
FvbProtocolGetPhysicalAddress (
|
FvbProtocolGetPhysicalAddress (
|
||||||
IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,
|
IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL *This,
|
||||||
OUT EFI_PHYSICAL_ADDRESS *Address
|
OUT EFI_PHYSICAL_ADDRESS *Address
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -152,7 +152,7 @@ FvbProtocolGetPhysicalAddress (
|
|||||||
retrieve the block map (see EFI_FIRMWARE_VOLUME_HEADER).
|
retrieve the block map (see EFI_FIRMWARE_VOLUME_HEADER).
|
||||||
|
|
||||||
|
|
||||||
@param This Indicates the EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL instance.
|
@param This Indicates the EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL instance.
|
||||||
|
|
||||||
@param Lba Indicates the block for which to return the size.
|
@param Lba Indicates the block for which to return the size.
|
||||||
|
|
||||||
@ -174,7 +174,7 @@ FvbProtocolGetPhysicalAddress (
|
|||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
FvbProtocolGetBlockSize (
|
FvbProtocolGetBlockSize (
|
||||||
IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,
|
IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL *This,
|
||||||
IN EFI_LBA Lba,
|
IN EFI_LBA Lba,
|
||||||
OUT UINTN *BlockSize,
|
OUT UINTN *BlockSize,
|
||||||
OUT UINTN *NumberOfBlocks
|
OUT UINTN *NumberOfBlocks
|
||||||
@ -199,7 +199,7 @@ FvbProtocolGetBlockSize (
|
|||||||
The GetAttributes() function retrieves the attributes and
|
The GetAttributes() function retrieves the attributes and
|
||||||
current settings of the block. Status Codes Returned
|
current settings of the block. Status Codes Returned
|
||||||
|
|
||||||
@param This Indicates the EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL instance.
|
@param This Indicates the EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL instance.
|
||||||
|
|
||||||
@param Attributes Pointer to EFI_FVB_ATTRIBUTES_2 in which the
|
@param Attributes Pointer to EFI_FVB_ATTRIBUTES_2 in which the
|
||||||
attributes and current settings are
|
attributes and current settings are
|
||||||
@ -213,7 +213,7 @@ FvbProtocolGetBlockSize (
|
|||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
FvbProtocolGetAttributes (
|
FvbProtocolGetAttributes (
|
||||||
IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,
|
IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL *This,
|
||||||
OUT EFI_FVB_ATTRIBUTES_2 *Attributes
|
OUT EFI_FVB_ATTRIBUTES_2 *Attributes
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -234,7 +234,7 @@ FvbProtocolGetAttributes (
|
|||||||
The SetAttributes() function sets configurable firmware volume
|
The SetAttributes() function sets configurable firmware volume
|
||||||
attributes and returns the new settings of the firmware volume.
|
attributes and returns the new settings of the firmware volume.
|
||||||
|
|
||||||
@param This Indicates the EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL instance.
|
@param This Indicates the EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL instance.
|
||||||
|
|
||||||
@param Attributes On input, Attributes is a pointer to
|
@param Attributes On input, Attributes is a pointer to
|
||||||
EFI_FVB_ATTRIBUTES_2 that contains the
|
EFI_FVB_ATTRIBUTES_2 that contains the
|
||||||
@ -255,7 +255,7 @@ FvbProtocolGetAttributes (
|
|||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
FvbProtocolSetAttributes (
|
FvbProtocolSetAttributes (
|
||||||
IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,
|
IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL *This,
|
||||||
IN OUT EFI_FVB_ATTRIBUTES_2 *Attributes
|
IN OUT EFI_FVB_ATTRIBUTES_2 *Attributes
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -281,7 +281,7 @@ FvbProtocolSetAttributes (
|
|||||||
flushed to the hardware before the EraseBlocks() service
|
flushed to the hardware before the EraseBlocks() service
|
||||||
returns.
|
returns.
|
||||||
|
|
||||||
@param This Indicates the EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
|
@param This Indicates the EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL
|
||||||
instance.
|
instance.
|
||||||
|
|
||||||
@param ... The variable argument list is a list of tuples.
|
@param ... The variable argument list is a list of tuples.
|
||||||
@ -314,7 +314,7 @@ FvbProtocolSetAttributes (
|
|||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
FvbProtocolEraseBlocks (
|
FvbProtocolEraseBlocks (
|
||||||
IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,
|
IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL *This,
|
||||||
...
|
...
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -413,7 +413,7 @@ FvbProtocolEraseBlocks (
|
|||||||
fully flushed to the hardware before the Write() service
|
fully flushed to the hardware before the Write() service
|
||||||
returns.
|
returns.
|
||||||
|
|
||||||
@param This Indicates the EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL instance.
|
@param This Indicates the EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL instance.
|
||||||
|
|
||||||
@param Lba The starting logical block index to write to.
|
@param Lba The starting logical block index to write to.
|
||||||
|
|
||||||
@ -445,7 +445,7 @@ FvbProtocolEraseBlocks (
|
|||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
FvbProtocolWrite (
|
FvbProtocolWrite (
|
||||||
IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,
|
IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL *This,
|
||||||
IN EFI_LBA Lba,
|
IN EFI_LBA Lba,
|
||||||
IN UINTN Offset,
|
IN UINTN Offset,
|
||||||
IN OUT UINTN *NumBytes,
|
IN OUT UINTN *NumBytes,
|
||||||
@ -496,7 +496,7 @@ FvbProtocolWrite (
|
|||||||
indicate the number of bytes actually read. The caller must be
|
indicate the number of bytes actually read. The caller must be
|
||||||
aware that a read may be partially completed.
|
aware that a read may be partially completed.
|
||||||
|
|
||||||
@param This Indicates the EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL instance.
|
@param This Indicates the EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL instance.
|
||||||
|
|
||||||
@param Lba The starting logical block index
|
@param Lba The starting logical block index
|
||||||
from which to read.
|
from which to read.
|
||||||
@ -530,7 +530,7 @@ FvbProtocolWrite (
|
|||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
FvbProtocolRead (
|
FvbProtocolRead (
|
||||||
IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,
|
IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL *This,
|
||||||
IN EFI_LBA Lba,
|
IN EFI_LBA Lba,
|
||||||
IN UINTN Offset,
|
IN UINTN Offset,
|
||||||
IN OUT UINTN *NumBytes,
|
IN OUT UINTN *NumBytes,
|
||||||
@ -846,7 +846,7 @@ FvbInitialize (
|
|||||||
Handle = 0;
|
Handle = 0;
|
||||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
&Handle,
|
&Handle,
|
||||||
&gEfiFirmwareVolumeBlockProtocolGuid,
|
&gEfiFirmwareVolumeBlock2ProtocolGuid,
|
||||||
&mEmuVarsFvb.FwVolBlockInstance,
|
&mEmuVarsFvb.FwVolBlockInstance,
|
||||||
&gEfiDevicePathProtocolGuid,
|
&gEfiDevicePathProtocolGuid,
|
||||||
&mEmuVarsFvb.DevicePath,
|
&mEmuVarsFvb.DevicePath,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# Firmware Block Services to support emulating non-volatile variables
|
# Firmware Block Services to support emulating non-volatile variables
|
||||||
# by pretending that a memory buffer is storage for the NV variables.
|
# by pretending that a memory buffer is storage for the NV variables.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2008 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -53,7 +53,7 @@
|
|||||||
gEfiEventVirtualAddressChangeGuid # ALWAYS_CONSUMED Create Event: EVENT_GROUP_GUID
|
gEfiEventVirtualAddressChangeGuid # ALWAYS_CONSUMED Create Event: EVENT_GROUP_GUID
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiFirmwareVolumeBlockProtocolGuid # PROTOCOL ALWAYS_PRODUCED
|
gEfiFirmwareVolumeBlock2ProtocolGuid # PROTOCOL ALWAYS_PRODUCED
|
||||||
gEfiDevicePathProtocolGuid # PROTOCOL ALWAYS_PRODUCED
|
gEfiDevicePathProtocolGuid # PROTOCOL ALWAYS_PRODUCED
|
||||||
|
|
||||||
[FixedPcd]
|
[FixedPcd]
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
PlatformFvbDataWritten (
|
PlatformFvbDataWritten (
|
||||||
IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,
|
IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL *This,
|
||||||
IN EFI_LBA Lba,
|
IN EFI_LBA Lba,
|
||||||
IN UINTN Offset,
|
IN UINTN Offset,
|
||||||
IN UINTN NumBytes,
|
IN UINTN NumBytes,
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
PlatformFvbDataWritten (
|
PlatformFvbDataWritten (
|
||||||
IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,
|
IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL *This,
|
||||||
IN EFI_LBA Lba,
|
IN EFI_LBA Lba,
|
||||||
IN UINTN Offset,
|
IN UINTN Offset,
|
||||||
IN UINTN NumBytes,
|
IN UINTN NumBytes,
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
PlatformFvbDataWritten (
|
PlatformFvbDataWritten (
|
||||||
IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,
|
IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL *This,
|
||||||
IN EFI_LBA Lba,
|
IN EFI_LBA Lba,
|
||||||
IN UINTN Offset,
|
IN UINTN Offset,
|
||||||
IN UINTN NumBytes,
|
IN UINTN NumBytes,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user