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];
44 // Fvb Protocol instance data
46 #define FVB_DEVICE_FROM_THIS(a) CR (a, EFI_FW_VOL_BLOCK_DEVICE, FwVolBlockInstance, FVB_DEVICE_SIGNATURE)
47 #define FVB_EXTEND_DEVICE_FROM_THIS(a) CR (a, EFI_FW_VOL_BLOCK_DEVICE, FvbExtension, FVB_DEVICE_SIGNATURE)
48 #define FVB_DEVICE_SIGNATURE SIGNATURE_32 ('F', 'V', 'B', 'N')
51 MEMMAP_DEVICE_PATH MemMapDevPath
;
52 EFI_DEVICE_PATH_PROTOCOL EndDevPath
;
57 FV_DEVICE_PATH DevicePath
;
59 EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL FwVolBlockInstance
;
60 } EFI_FW_VOL_BLOCK_DEVICE
;
65 OUT EFI_FIRMWARE_VOLUME_HEADER
**FvbInfo
74 IN OUT UINTN
*NumBytes
,
76 IN ESAL_FWB_GLOBAL
*Global
,
86 IN OUT UINTN
*NumBytes
,
88 IN ESAL_FWB_GLOBAL
*Global
,
97 IN ESAL_FWB_GLOBAL
*Global
,
103 FvbSetVolumeAttributes (
105 IN OUT EFI_FVB_ATTRIBUTES_2
*Attributes
,
106 IN ESAL_FWB_GLOBAL
*Global
,
112 FvbGetVolumeAttributes (
114 OUT EFI_FVB_ATTRIBUTES_2
*Attributes
,
115 IN ESAL_FWB_GLOBAL
*Global
,
121 FvbGetPhysicalAddress (
123 OUT EFI_PHYSICAL_ADDRESS
*Address
,
124 IN ESAL_FWB_GLOBAL
*Global
,
132 IN EFI_HANDLE ImageHandle
,
133 IN EFI_SYSTEM_TABLE
*SystemTable
140 FvbClassAddressChangeEvent (
150 OUT UINTN
*LbaAddress
,
151 OUT UINTN
*LbaLength
,
152 OUT UINTN
*NumOfBlocks
,
153 IN ESAL_FWB_GLOBAL
*Global
,
163 FvbProtocolGetAttributes (
164 IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
165 OUT EFI_FVB_ATTRIBUTES_2
*Attributes
171 FvbProtocolSetAttributes (
172 IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
173 IN OUT EFI_FVB_ATTRIBUTES_2
*Attributes
179 FvbProtocolGetPhysicalAddress (
180 IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
181 OUT EFI_PHYSICAL_ADDRESS
*Address
187 FvbProtocolGetBlockSize (
188 IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
190 OUT UINTN
*BlockSize
,
191 OUT UINTN
*NumOfBlocks
198 IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
201 IN OUT UINTN
*NumBytes
,
209 IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
212 IN OUT UINTN
*NumBytes
,
219 FvbProtocolEraseBlocks (
220 IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,