]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/Library/EmuVariableFvbLib/EmuVariableFvbLib.c
OvmfPkg: convert C files with LF line terminators to CRLF
[mirror_edk2.git] / OvmfPkg / Library / EmuVariableFvbLib / EmuVariableFvbLib.c
CommitLineData
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
3a4ddfc5 25 EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL Read function.\r
61069836 26\r
3a4ddfc5 27 @param[in] This The EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL instance.\r
28 @param[in] Lba The starting logical block index\r
29 from which to read.\r
30 @param[in] Offset Offset into the block at which to begin reading.\r
31 @param[in] NumBytes The number of bytes read.\r
32 @param[in] Buffer Pointer to the buffer that was read, and will be\r
33 returned to the caller.\r
34\r
35**/\r
36VOID\r
37EFIAPI\r
38PlatformFvbDataRead (\r
39 IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL *This,\r
40 IN EFI_LBA Lba,\r
41 IN UINTN Offset,\r
42 IN UINTN NumBytes,\r
43 IN UINT8 *Buffer\r
44 )\r
45{\r
46}\r
47\r
48\r
49/**\r
50 This function will be called following a call to the\r
51 EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL Write function.\r
52\r
53 @param[in] This EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL instance.\r
61069836 54 @param[in] Lba The starting logical block index to written to.\r
9529d0ff 55 @param[in] Offset Offset into the block at which to begin writing.\r
56 @param[in] NumBytes The number of bytes written.\r
57 @param[in] Buffer Pointer to the buffer that was written.\r
61069836 58\r
59**/\r
60VOID\r
61EFIAPI\r
62PlatformFvbDataWritten (\r
949b0f3b 63 IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL *This,\r
9529d0ff 64 IN EFI_LBA Lba,\r
65 IN UINTN Offset,\r
66 IN UINTN NumBytes,\r
67 IN UINT8 *Buffer\r
61069836 68 )\r
69{\r
70 STATIC EFI_EVENT EventToSignal = NULL;\r
71\r
72 if (!EfiAtRuntime ()) {\r
73 if (EventToSignal == NULL) {\r
74 EventToSignal = (EFI_EVENT)(UINTN) PcdGet64 (PcdEmuVariableEvent);\r
75 }\r
76 if (EventToSignal != NULL) {\r
77 gBS->SignalEvent (EventToSignal);\r
78 }\r
79 }\r
80}\r
81\r
82\r
3a4ddfc5 83/**\r
84 This function will be called following a call to the\r
85 EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL Erase function.\r
86\r
87 @param This Indicates the EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL\r
88 instance.\r
89 @param List The variable argument list as documented for\r
90 the EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL Erase\r
91 function.\r
92\r
93**/\r
94VOID\r
95EFIAPI\r
96PlatformFvbBlocksErased (\r
97 IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL *This,\r
98 IN VA_LIST List\r
99 )\r
100{\r
101}\r
102\r
103\r