summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Include/Protocol/FvbExtension.h
blob: e961057f91e64fb7c6f07f46424db1b8460fc998 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/** @file

  FVB Extension protocol that extends the FVB Class in a component fashion.

Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution.  The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

**/

#ifndef __FVB_EXTENSION_H__
#define __FVB_EXTENSION_H__

#define EFI_FVB_EXTENSION_PROTOCOL_GUID  \
  {0x53a4c71b, 0xb581, 0x4170, {0x91, 0xb3, 0x8d, 0xb8, 0x7a, 0x4b, 0x5c, 0x46 } }

typedef struct _EFI_FVB_EXTENSION_PROTOCOL EFI_FVB_EXTENSION_PROTOCOL;

//
//  FVB Extension Function Prototypes
//
/**
  Erases and initializes a specified range of a firmware volume

  @param[in]     This           Pointer to the FVB Extension protocol instance
  @param[in]     StartLba       The starting logical block index to be erased
  @param[in]     OffsetStartLba Offset into the starting block at which to 
                                begin erasing    
  @param[in]     LastLba        The last logical block index to be erased
  @param[in]     OffsetLastLba  Offset into the last block at which to end erasing     

  @retval   EFI_EFI_SUCCESS        Range was erased 
  @retval   EFI_INVALID_PARAMETER  invalid parameter
  @retval   EFI_UNSUPPORTED        Range can not be erased

**/
typedef
EFI_STATUS
(EFIAPI * EFI_FV_ERASE_CUSTOM_BLOCK) (
  IN EFI_FVB_EXTENSION_PROTOCOL   *This,
  IN EFI_LBA                              StartLba,
  IN UINTN                                OffsetStartLba,
  IN EFI_LBA                              LastLba,
  IN UINTN                                OffsetLastLba
);

//
// FVB Extension PROTOCOL
//
struct _EFI_FVB_EXTENSION_PROTOCOL {
  EFI_FV_ERASE_CUSTOM_BLOCK               EraseFvbCustomBlock;
};

extern EFI_GUID                           gEfiFvbExtensionProtocolGuid;

#endif