]>
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 |
b26f0cf9 | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
61069836 | 6 | \r |
7 | **/\r | |
8 | \r | |
9 | #include "PiDxe.h"\r | |
10 | #include <Library/DebugLib.h>\r | |
11 | #include <Library/PcdLib.h>\r | |
12 | #include <Library/PlatformFvbLib.h>\r | |
13 | #include <Library/UefiBootServicesTableLib.h>\r | |
14 | #include <Library/UefiRuntimeLib.h>\r | |
15 | \r | |
61069836 | 16 | /**\r |
17 | This function will be called following a call to the\r | |
3a4ddfc5 | 18 | EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL Read function.\r |
61069836 | 19 | \r |
3a4ddfc5 | 20 | @param[in] This The EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL instance.\r |
21 | @param[in] Lba The starting logical block index\r | |
22 | from which to read.\r | |
23 | @param[in] Offset Offset into the block at which to begin reading.\r | |
24 | @param[in] NumBytes The number of bytes read.\r | |
25 | @param[in] Buffer Pointer to the buffer that was read, and will be\r | |
26 | returned to the caller.\r | |
27 | \r | |
28 | **/\r | |
29 | VOID\r | |
30 | EFIAPI\r | |
31 | PlatformFvbDataRead (\r | |
ac0a286f MK |
32 | IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL *This,\r |
33 | IN EFI_LBA Lba,\r | |
34 | IN UINTN Offset,\r | |
35 | IN UINTN NumBytes,\r | |
36 | IN UINT8 *Buffer\r | |
3a4ddfc5 | 37 | )\r |
38 | {\r | |
39 | }\r | |
40 | \r | |
3a4ddfc5 | 41 | /**\r |
42 | This function will be called following a call to the\r | |
43 | EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL Write function.\r | |
44 | \r | |
45 | @param[in] This EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL instance.\r | |
61069836 | 46 | @param[in] Lba The starting logical block index to written to.\r |
9529d0ff | 47 | @param[in] Offset Offset into the block at which to begin writing.\r |
48 | @param[in] NumBytes The number of bytes written.\r | |
49 | @param[in] Buffer Pointer to the buffer that was written.\r | |
61069836 | 50 | \r |
51 | **/\r | |
52 | VOID\r | |
53 | EFIAPI\r | |
54 | PlatformFvbDataWritten (\r | |
ac0a286f MK |
55 | IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL *This,\r |
56 | IN EFI_LBA Lba,\r | |
57 | IN UINTN Offset,\r | |
58 | IN UINTN NumBytes,\r | |
59 | IN UINT8 *Buffer\r | |
61069836 | 60 | )\r |
61 | {\r | |
ac0a286f | 62 | STATIC EFI_EVENT EventToSignal = NULL;\r |
61069836 | 63 | \r |
64 | if (!EfiAtRuntime ()) {\r | |
65 | if (EventToSignal == NULL) {\r | |
ac0a286f | 66 | EventToSignal = (EFI_EVENT)(UINTN)PcdGet64 (PcdEmuVariableEvent);\r |
61069836 | 67 | }\r |
ac0a286f | 68 | \r |
61069836 | 69 | if (EventToSignal != NULL) {\r |
70 | gBS->SignalEvent (EventToSignal);\r | |
71 | }\r | |
72 | }\r | |
73 | }\r | |
74 | \r | |
3a4ddfc5 | 75 | /**\r |
76 | This function will be called following a call to the\r | |
77 | EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL Erase function.\r | |
78 | \r | |
79 | @param This Indicates the EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL\r | |
80 | instance.\r | |
81 | @param List The variable argument list as documented for\r | |
82 | the EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL Erase\r | |
83 | function.\r | |
84 | \r | |
85 | **/\r | |
86 | VOID\r | |
87 | EFIAPI\r | |
88 | PlatformFvbBlocksErased (\r | |
ac0a286f MK |
89 | IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL *This,\r |
90 | IN VA_LIST List\r | |
3a4ddfc5 | 91 | )\r |
92 | {\r | |
93 | }\r |