3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 Firmware volume block driver for Intel Firmware Hub (FWH) device
22 #ifndef _FW_BLOCK_SERVICE_H
23 #define _FW_BLOCK_SERVICE_H
26 // BugBug: Add documentation here for data structure!!!!
28 #define FVB_PHYSICAL 0
35 EFI_FIRMWARE_VOLUME_HEADER VolumeHeader
;
36 } EFI_FW_VOL_INSTANCE
;
40 EFI_FW_VOL_INSTANCE
*FvInstance
[2];
41 UINT8
*FvbScratchSpace
[2];
45 // Fvb Protocol instance data
47 #define FVB_DEVICE_FROM_THIS(a) CR (a, EFI_FW_VOL_BLOCK_DEVICE, FwVolBlockInstance, FVB_DEVICE_SIGNATURE)
48 #define FVB_EXTEND_DEVICE_FROM_THIS(a) CR (a, EFI_FW_VOL_BLOCK_DEVICE, FvbExtension, FVB_DEVICE_SIGNATURE)
49 #define FVB_DEVICE_SIGNATURE EFI_SIGNATURE_32 ('F', 'V', 'B', 'N')
52 MEMMAP_DEVICE_PATH MemMapDevPath
;
53 EFI_DEVICE_PATH_PROTOCOL EndDevPath
;
58 FV_DEVICE_PATH DevicePath
;
60 EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL FwVolBlockInstance
;
61 EFI_FVB_EXTENSION_PROTOCOL FvbExtension
;
62 } EFI_FW_VOL_BLOCK_DEVICE
;
67 OUT EFI_FIRMWARE_VOLUME_HEADER
**FvbInfo
76 IN OUT UINTN
*NumBytes
,
78 IN ESAL_FWB_GLOBAL
*Global
,
88 IN OUT UINTN
*NumBytes
,
90 IN ESAL_FWB_GLOBAL
*Global
,
99 IN ESAL_FWB_GLOBAL
*Global
,
105 FvbSetVolumeAttributes (
107 IN OUT EFI_FVB_ATTRIBUTES_2
*Attributes
,
108 IN ESAL_FWB_GLOBAL
*Global
,
114 FvbGetVolumeAttributes (
116 OUT EFI_FVB_ATTRIBUTES_2
*Attributes
,
117 IN ESAL_FWB_GLOBAL
*Global
,
123 FvbGetPhysicalAddress (
125 OUT EFI_PHYSICAL_ADDRESS
*Address
,
126 IN ESAL_FWB_GLOBAL
*Global
,
134 IN EFI_HANDLE ImageHandle
,
135 IN EFI_SYSTEM_TABLE
*SystemTable
142 FvbClassAddressChangeEvent (
152 OUT UINTN
*LbaAddress
,
153 OUT UINTN
*LbaLength
,
154 OUT UINTN
*NumOfBlocks
,
155 IN ESAL_FWB_GLOBAL
*Global
,
165 FvbProtocolGetAttributes (
166 IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
167 OUT EFI_FVB_ATTRIBUTES_2
*Attributes
173 FvbProtocolSetAttributes (
174 IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
175 IN OUT EFI_FVB_ATTRIBUTES_2
*Attributes
181 FvbProtocolGetPhysicalAddress (
182 IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
183 OUT EFI_PHYSICAL_ADDRESS
*Address
189 FvbProtocolGetBlockSize (
190 IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
192 OUT UINTN
*BlockSize
,
193 OUT UINTN
*NumOfBlocks
200 IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
203 IN OUT UINTN
*NumBytes
,
211 IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
214 IN OUT UINTN
*NumBytes
,
221 FvbProtocolEraseBlocks (
222 IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
229 FvbExtendProtocolEraseCustomBlockRange (
230 IN EFI_FVB_EXTENSION_PROTOCOL
*This
,
232 IN UINTN OffsetStartLba
,
234 IN UINTN OffsetLastLba