3 Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
4 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 SIGNATURE_32 ('F', 'V', 'B', 'N')
52 MEDIA_FW_VOL_DEVICE_PATH FvDevPath
;
53 EFI_DEVICE_PATH_PROTOCOL EndDevPath
;
54 } FV_PIWG_DEVICE_PATH
;
57 MEMMAP_DEVICE_PATH MemMapDevPath
;
58 EFI_DEVICE_PATH_PROTOCOL EndDevPath
;
59 } FV_MEMMAP_DEVICE_PATH
;
63 EFI_DEVICE_PATH_PROTOCOL
*DevicePath
;
65 EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL FwVolBlockInstance
;
66 } EFI_FW_VOL_BLOCK_DEVICE
;
71 OUT EFI_FIRMWARE_VOLUME_HEADER
**FvbInfo
75 FvbSetVolumeAttributes (
77 IN OUT EFI_FVB_ATTRIBUTES_2
*Attributes
,
78 IN ESAL_FWB_GLOBAL
*Global
,
83 FvbGetVolumeAttributes (
85 OUT EFI_FVB_ATTRIBUTES_2
*Attributes
,
86 IN ESAL_FWB_GLOBAL
*Global
,
91 FvbGetPhysicalAddress (
93 OUT EFI_PHYSICAL_ADDRESS
*Address
,
94 IN ESAL_FWB_GLOBAL
*Global
,
101 IN EFI_HANDLE ImageHandle
,
102 IN EFI_SYSTEM_TABLE
*SystemTable
108 FvbClassAddressChangeEvent (
117 OUT UINTN
*LbaAddress
,
118 OUT UINTN
*LbaLength
,
119 OUT UINTN
*NumOfBlocks
,
120 IN ESAL_FWB_GLOBAL
*Global
,
129 FvbProtocolGetAttributes (
130 IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
131 OUT EFI_FVB_ATTRIBUTES_2
*Attributes
136 FvbProtocolSetAttributes (
137 IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
138 IN OUT EFI_FVB_ATTRIBUTES_2
*Attributes
143 FvbProtocolGetPhysicalAddress (
144 IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
145 OUT EFI_PHYSICAL_ADDRESS
*Address
150 FvbProtocolGetBlockSize (
151 IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
152 IN CONST EFI_LBA Lba
,
153 OUT UINTN
*BlockSize
,
154 OUT UINTN
*NumOfBlocks
160 IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
161 IN CONST EFI_LBA Lba
,
162 IN CONST UINTN Offset
,
163 IN OUT UINTN
*NumBytes
,
170 IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
173 IN OUT UINTN
*NumBytes
,
179 FvbProtocolEraseBlocks (
180 IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,