3 Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials are licensed and made available
6 under the terms and conditions of the BSD License which accompanies this
7 distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 Firmware volume block driver for Intel Firmware Hub (FWH) device
23 #ifndef _FW_BLOCK_SERVICE_H
24 #define _FW_BLOCK_SERVICE_H
29 EFI_FIRMWARE_VOLUME_HEADER VolumeHeader
;
30 } EFI_FW_VOL_INSTANCE
;
34 EFI_FW_VOL_INSTANCE
*FvInstance
;
37 extern ESAL_FWB_GLOBAL
*mFvbModuleGlobal
;
40 // Fvb Protocol instance data
42 #define FVB_DEVICE_FROM_THIS(a) CR (a, EFI_FW_VOL_BLOCK_DEVICE, \
43 FwVolBlockInstance, FVB_DEVICE_SIGNATURE)
45 #define FVB_EXTEND_DEVICE_FROM_THIS(a) CR (a, EFI_FW_VOL_BLOCK_DEVICE, \
46 FvbExtension, FVB_DEVICE_SIGNATURE)
48 #define FVB_DEVICE_SIGNATURE SIGNATURE_32 ('F', 'V', 'B', 'N')
51 MEDIA_FW_VOL_DEVICE_PATH FvDevPath
;
52 EFI_DEVICE_PATH_PROTOCOL EndDevPath
;
53 } FV_PIWG_DEVICE_PATH
;
56 MEMMAP_DEVICE_PATH MemMapDevPath
;
57 EFI_DEVICE_PATH_PROTOCOL EndDevPath
;
58 } FV_MEMMAP_DEVICE_PATH
;
62 EFI_DEVICE_PATH_PROTOCOL
*DevicePath
;
64 EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL FwVolBlockInstance
;
65 } EFI_FW_VOL_BLOCK_DEVICE
;
70 OUT EFI_FIRMWARE_VOLUME_HEADER
**FvbInfo
74 FvbSetVolumeAttributes (
76 IN OUT EFI_FVB_ATTRIBUTES_2
*Attributes
,
77 IN ESAL_FWB_GLOBAL
*Global
81 FvbGetVolumeAttributes (
83 OUT EFI_FVB_ATTRIBUTES_2
*Attributes
,
84 IN ESAL_FWB_GLOBAL
*Global
88 FvbGetPhysicalAddress (
90 OUT EFI_PHYSICAL_ADDRESS
*Address
,
91 IN ESAL_FWB_GLOBAL
*Global
97 IN EFI_HANDLE ImageHandle
,
98 IN EFI_SYSTEM_TABLE
*SystemTable
104 FvbClassAddressChangeEvent (
113 OUT UINTN
*LbaAddress
,
114 OUT UINTN
*LbaLength
,
115 OUT UINTN
*NumOfBlocks
,
116 IN ESAL_FWB_GLOBAL
*Global
124 FvbProtocolGetAttributes (
125 IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
126 OUT EFI_FVB_ATTRIBUTES_2
*Attributes
131 FvbProtocolSetAttributes (
132 IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
133 IN OUT EFI_FVB_ATTRIBUTES_2
*Attributes
138 FvbProtocolGetPhysicalAddress (
139 IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
140 OUT EFI_PHYSICAL_ADDRESS
*Address
145 FvbProtocolGetBlockSize (
146 IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
147 IN CONST EFI_LBA Lba
,
148 OUT UINTN
*BlockSize
,
149 OUT UINTN
*NumOfBlocks
155 IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
156 IN CONST EFI_LBA Lba
,
157 IN CONST UINTN Offset
,
158 IN OUT UINTN
*NumBytes
,
165 IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
168 IN OUT UINTN
*NumBytes
,
174 FvbProtocolEraseBlocks (
175 IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*This
,
180 // The following functions have different implementations dependent on the
181 // module type chosen for building this driver.
184 InstallProtocolInterfaces (
185 IN EFI_FW_VOL_BLOCK_DEVICE
*FvbDevice
189 InstallVirtualAddressChangeHandler (
194 MarkIoMemoryRangeForRuntimeAccess (
195 IN EFI_PHYSICAL_ADDRESS BaseAddress
,