+/** @file\r
+ OVMF platform customization for EMU Variable FVB driver\r
+\r
+ Copyright (c) 2009, Intel Corporation\r
+ All rights reserved. This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#include "PiDxe.h"\r
+#include <Library/DebugLib.h>\r
+#include <Library/PcdLib.h>\r
+#include <Library/PlatformFvbLib.h>\r
+#include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/UefiRuntimeLib.h>\r
+\r
+\r
+/**\r
+ This function will be called following a call to the\r
+ EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL Write function.\r
+\r
+ @param[in] This EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL instance.\r
+ @param[in] Lba The starting logical block index to written to.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+PlatformFvbDataWritten (\r
+ IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,\r
+ IN EFI_LBA Lba\r
+ )\r
+{\r
+ STATIC EFI_EVENT EventToSignal = NULL;\r
+\r
+ if (!EfiAtRuntime ()) {\r
+ if (EventToSignal == NULL) {\r
+ EventToSignal = (EFI_EVENT)(UINTN) PcdGet64 (PcdEmuVariableEvent);\r
+ }\r
+ if (EventToSignal != NULL) {\r
+ gBS->SignalEvent (EventToSignal);\r
+ }\r
+ }\r
+}\r
+\r
+\r