2 OVMF platform customization for EMU Variable FVB driver
4 Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #include <Library/DebugLib.h>
11 #include <Library/PcdLib.h>
12 #include <Library/PlatformFvbLib.h>
13 #include <Library/UefiBootServicesTableLib.h>
14 #include <Library/UefiRuntimeLib.h>
18 This function will be called following a call to the
19 EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL Read function.
21 @param[in] This The EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL instance.
22 @param[in] Lba The starting logical block index
24 @param[in] Offset Offset into the block at which to begin reading.
25 @param[in] NumBytes The number of bytes read.
26 @param[in] Buffer Pointer to the buffer that was read, and will be
27 returned to the caller.
33 IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL
*This
,
44 This function will be called following a call to the
45 EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL Write function.
47 @param[in] This EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL instance.
48 @param[in] Lba The starting logical block index to written to.
49 @param[in] Offset Offset into the block at which to begin writing.
50 @param[in] NumBytes The number of bytes written.
51 @param[in] Buffer Pointer to the buffer that was written.
56 PlatformFvbDataWritten (
57 IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL
*This
,
64 STATIC EFI_EVENT EventToSignal
= NULL
;
66 if (!EfiAtRuntime ()) {
67 if (EventToSignal
== NULL
) {
68 EventToSignal
= (EFI_EVENT
)(UINTN
) PcdGet64 (PcdEmuVariableEvent
);
70 if (EventToSignal
!= NULL
) {
71 gBS
->SignalEvent (EventToSignal
);
78 This function will be called following a call to the
79 EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL Erase function.
81 @param This Indicates the EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL
83 @param List The variable argument list as documented for
84 the EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL Erase
90 PlatformFvbBlocksErased (
91 IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL
*This
,