2 Firmware volume block driver for Intel Firmware Hub (FWH) device
4 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
5 Portions copyright (c) 2011, Apple Inc. All rights reserved.
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
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.
16 #ifndef _FW_BLOCK_SERVICE_H
17 #define _FW_BLOCK_SERVICE_H
20 // BugBug: Add documentation here for data structure!!!!
22 #define FVB_PHYSICAL 0
29 EFI_FIRMWARE_VOLUME_HEADER VolumeHeader
;
30 } EFI_FW_VOL_INSTANCE
;
34 EFI_FW_VOL_INSTANCE
*FvInstance
[2];
38 // Fvb Protocol instance data
40 #define FVB_DEVICE_FROM_THIS(a) CR (a, EFI_FW_VOL_BLOCK_DEVICE, FwVolBlockInstance, FVB_DEVICE_SIGNATURE)
41 #define FVB_EXTEND_DEVICE_FROM_THIS(a) CR (a, EFI_FW_VOL_BLOCK_DEVICE, FvbExtension, FVB_DEVICE_SIGNATURE)
42 #define FVB_DEVICE_SIGNATURE SIGNATURE_32 ('F', 'V', 'B', 'N')
45 MEMMAP_DEVICE_PATH MemMapDevPath
;
46 EFI_DEVICE_PATH_PROTOCOL EndDevPath
;
51 FV_DEVICE_PATH DevicePath
;
53 EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL FwVolBlockInstance
;
54 } EFI_FW_VOL_BLOCK_DEVICE
;
59 OUT EFI_FIRMWARE_VOLUME_HEADER
**FvbInfo
68 IN OUT UINTN
*NumBytes
,
70 IN ESAL_FWB_GLOBAL
*Global
,
80 IN OUT UINTN
*NumBytes
,
82 IN ESAL_FWB_GLOBAL
*Global
,
91 IN ESAL_FWB_GLOBAL
*Global
,
97 FvbSetVolumeAttributes (
99 IN OUT EFI_FVB_ATTRIBUTES_2
*Attributes
,
100 IN ESAL_FWB_GLOBAL
*Global
,
106 FvbGetVolumeAttributes (
108 OUT EFI_FVB_ATTRIBUTES_2
*Attributes
,
109 IN ESAL_FWB_GLOBAL
*Global
,
115 FvbGetPhysicalAddress (
117 OUT EFI_PHYSICAL_ADDRESS
*Address
,
118 IN ESAL_FWB_GLOBAL
*Global
,
126 IN EFI_HANDLE ImageHandle
,
127 IN EFI_SYSTEM_TABLE
*SystemTable
134 FvbClassAddressChangeEvent (
144 OUT UINTN
*LbaAddress
,
145 OUT UINTN
*LbaLength
,
146 OUT UINTN
*NumOfBlocks
,
147 IN ESAL_FWB_GLOBAL
*Global
,
157 FvbProtocolGetAttributes (
158 IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
159 OUT EFI_FVB_ATTRIBUTES_2
*Attributes
165 FvbProtocolSetAttributes (
166 IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
167 IN OUT EFI_FVB_ATTRIBUTES_2
*Attributes
173 FvbProtocolGetPhysicalAddress (
174 IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
175 OUT EFI_PHYSICAL_ADDRESS
*Address
181 FvbProtocolGetBlockSize (
182 IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
184 OUT UINTN
*BlockSize
,
185 OUT UINTN
*NumOfBlocks
192 IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
195 IN OUT UINTN
*NumBytes
,
203 IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
206 IN OUT UINTN
*NumBytes
,
213 FvbProtocolEraseBlocks (
214 IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,