]>
Commit | Line | Data |
---|---|---|
61069836 | 1 | /** @file\r |
2 | OVMF platform customization for EMU Variable FVB driver\r | |
3 | \r | |
9529d0ff | 4 | Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r |
56d7640a | 5 | This program and the accompanying materials\r |
61069836 | 6 | are licensed and made available under the terms and conditions of the BSD License\r |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #include "PiDxe.h"\r | |
16 | #include <Library/DebugLib.h>\r | |
17 | #include <Library/PcdLib.h>\r | |
18 | #include <Library/PlatformFvbLib.h>\r | |
19 | #include <Library/UefiBootServicesTableLib.h>\r | |
20 | #include <Library/UefiRuntimeLib.h>\r | |
21 | \r | |
22 | \r | |
23 | /**\r | |
24 | This function will be called following a call to the\r | |
25 | EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL Write function.\r | |
26 | \r | |
27 | @param[in] This EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL instance.\r | |
28 | @param[in] Lba The starting logical block index to written to.\r | |
9529d0ff | 29 | @param[in] Offset Offset into the block at which to begin writing.\r |
30 | @param[in] NumBytes The number of bytes written.\r | |
31 | @param[in] Buffer Pointer to the buffer that was written.\r | |
61069836 | 32 | \r |
33 | **/\r | |
34 | VOID\r | |
35 | EFIAPI\r | |
36 | PlatformFvbDataWritten (\r | |
949b0f3b | 37 | IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL *This,\r |
9529d0ff | 38 | IN EFI_LBA Lba,\r |
39 | IN UINTN Offset,\r | |
40 | IN UINTN NumBytes,\r | |
41 | IN UINT8 *Buffer\r | |
61069836 | 42 | )\r |
43 | {\r | |
44 | STATIC EFI_EVENT EventToSignal = NULL;\r | |
45 | \r | |
46 | if (!EfiAtRuntime ()) {\r | |
47 | if (EventToSignal == NULL) {\r | |
48 | EventToSignal = (EFI_EVENT)(UINTN) PcdGet64 (PcdEmuVariableEvent);\r | |
49 | }\r | |
50 | if (EventToSignal != NULL) {\r | |
51 | gBS->SignalEvent (EventToSignal);\r | |
52 | }\r | |
53 | }\r | |
54 | }\r | |
55 | \r | |
56 | \r |