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