1/** @file
2  Library to define platform customization functions for a
3  Firmare Volume Block driver.
4
5  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
6  This program and the accompanying materials
7  are licensed and made available under the terms and conditions of the BSD License
8  which accompanies this distribution.  The full text of the license may be found at
9  http://opensource.org/licenses/bsd-license.php
10
11  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14**/
15
16#ifndef __PLATFORM_FVB_LIB__
17#define __PLATFORM_FVB_LIB__
18
19#include <Protocol/FirmwareVolumeBlock.h>
20
21/**
22  This function will be called following a call to the
23  EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL Read function.
24
25  @param[in] This     The EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL instance.
26  @param[in] Lba      The starting logical block index
27                      from which to read.
28  @param[in] Offset   Offset into the block at which to begin reading.
29  @param[in] NumBytes The number of bytes read.
30  @param[in] Buffer   Pointer to the buffer that was read, and will be
31                      returned to the caller.
32
33**/
34VOID
35EFIAPI
36PlatformFvbDataRead (
37  IN CONST  EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL *This,
38  IN        EFI_LBA                             Lba,
39  IN        UINTN                               Offset,
40  IN        UINTN                               NumBytes,
41  IN        UINT8                               *Buffer
42  );
43
44
45/**
46  This function will be called following a call to the
47  EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL Write function.
48
49  @param[in] This     EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL instance.
50  @param[in] Lba      The starting logical block index to written to.
51  @param[in] Offset   Offset into the block at which to begin writing.
52  @param[in] NumBytes The number of bytes written.
53  @param[in] Buffer   Pointer to the buffer that was written.
54
55**/
56VOID
57EFIAPI
58PlatformFvbDataWritten (
59  IN CONST  EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL  *This,
60  IN        EFI_LBA                              Lba,
61  IN        UINTN                                Offset,
62  IN        UINTN                                NumBytes,
63  IN        UINT8                                *Buffer
64  );
65
66
67/**
68  This function will be called following a call to the
69  EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL Erase function.
70
71  @param This   Indicates the EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL
72                instance.
73  @param List   The variable argument list as documented for
74                the EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL Erase
75                function.
76
77**/
78VOID
79EFIAPI
80PlatformFvbBlocksErased (
81  IN CONST  EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL *This,
82  IN  VA_LIST       List
83  );
84
85
86#endif
87
88