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>
17 This function will be called following a call to the
18 EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL Read function.
20 @param[in] This The EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL instance.
21 @param[in] Lba The starting logical block index
23 @param[in] Offset Offset into the block at which to begin reading.
24 @param[in] NumBytes The number of bytes read.
25 @param[in] Buffer Pointer to the buffer that was read, and will be
26 returned to the caller.
32 IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL
*This
,
42 This function will be called following a call to the
43 EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL Write function.
45 @param[in] This EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL instance.
46 @param[in] Lba The starting logical block index to written to.
47 @param[in] Offset Offset into the block at which to begin writing.
48 @param[in] NumBytes The number of bytes written.
49 @param[in] Buffer Pointer to the buffer that was written.
54 PlatformFvbDataWritten (
55 IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL
*This
,
62 STATIC EFI_EVENT EventToSignal
= NULL
;
64 if (!EfiAtRuntime ()) {
65 if (EventToSignal
== NULL
) {
66 EventToSignal
= (EFI_EVENT
)(UINTN
)PcdGet64 (PcdEmuVariableEvent
);
69 if (EventToSignal
!= NULL
) {
70 gBS
->SignalEvent (EventToSignal
);
76 This function will be called following a call to the
77 EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL Erase function.
79 @param This Indicates the EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL
81 @param List The variable argument list as documented for
82 the EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL Erase
88 PlatformFvbBlocksErased (
89 IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL
*This
,