TianoCore EDK2 master
Loading...
Searching...
No Matches
FmpDxe.h
Go to the documentation of this file.
1
13#ifndef _FMP_DXE_H_
14#define _FMP_DXE_H_
15
16#include <PiDxe.h>
17#include <Library/DebugLib.h>
18#include <Library/BaseLib.h>
21#include <Library/PcdLib.h>
25#include <Library/UefiLib.h>
26#include <Library/PrintLib.h>
37#include <Guid/EventGroup.h>
38#include <LastAttemptStatus.h>
40#include <Library/VariablePolicyHelperLib.h>
41
42#define VERSION_STRING_NOT_SUPPORTED L"VERSION STRING NOT SUPPORTED"
43#define VERSION_STRING_NOT_AVAILABLE L"VERSION STRING NOT AVAILABLE"
44
48#define FIRMWARE_MANAGEMENT_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('f','m','p','p')
49
50typedef struct {
51 UINTN Signature;
52 EFI_HANDLE Handle;
54 BOOLEAN DescriptorPopulated;
56 CHAR16 *ImageIdName;
57 CHAR16 *VersionName;
58 BOOLEAN RuntimeVersionSupported;
59 EFI_EVENT FmpDeviceLockEvent;
60 //
61 // Indicates if an attempt has been made to lock a
62 // FLASH storage device by calling FmpDeviceLock().
63 // A FLASH storage device may not support being locked,
64 // so this variable is set to TRUE even if FmpDeviceLock()
65 // returns an error.
66 //
67 BOOLEAN FmpDeviceLocked;
68 VOID *FmpDeviceContext;
69 CHAR16 *VersionVariableName;
70 CHAR16 *LsvVariableName;
71 CHAR16 *LastAttemptStatusVariableName;
72 CHAR16 *LastAttemptVersionVariableName;
73 CHAR16 *FmpStateVariableName;
74 BOOLEAN DependenciesSatisfied;
76
80#define FIRMWARE_MANAGEMENT_PRIVATE_DATA_FROM_THIS(a) \
81 CR (a, FIRMWARE_MANAGEMENT_PRIVATE_DATA, Fmp, FIRMWARE_MANAGEMENT_PRIVATE_DATA_SIGNATURE)
82
86extern CHAR16 *mImageIdName;
87
98VOID
100 VOID
101 );
102
142EFIAPI
145 IN OUT UINTN *ImageInfoSize,
147 OUT UINT32 *DescriptorVersion,
148 OUT UINT8 *DescriptorCount,
149 OUT UINTN *DescriptorSize,
150 OUT UINT32 *PackageVersion,
151 OUT CHAR16 **PackageVersionName
152 );
153
178EFIAPI
181 IN UINT8 ImageIndex,
182 IN OUT VOID *Image,
183 IN OUT UINTN *ImageSize
184 );
185
208EFIAPI
211 IN UINT8 ImageIndex,
212 IN CONST VOID *Image,
213 IN UINTN ImageSize,
214 OUT UINT32 *ImageUpdatable
215 );
216
264EFIAPI
267 IN UINT8 ImageIndex,
268 IN CONST VOID *Image,
269 IN UINTN ImageSize,
270 IN CONST VOID *VendorCode,
272 OUT CHAR16 **AbortReason
273 );
274
308EFIAPI
311 OUT UINT32 *PackageVersion,
312 OUT CHAR16 **PackageVersionName,
313 OUT UINT32 *PackageVersionNameMaxLen,
314 OUT UINT64 *AttributesSupported,
315 OUT UINT64 *AttributesSetting
316 );
317
350EFIAPI
353 IN CONST VOID *Image,
354 IN UINTN ImageSize,
355 IN CONST VOID *VendorCode,
356 IN UINT32 PackageVersion,
357 IN CONST CHAR16 *PackageVersionName
358 );
359
360#endif
UINT64 UINTN
EFI_STATUS(EFIAPI * EFI_FIRMWARE_MANAGEMENT_UPDATE_IMAGE_PROGRESS)(IN UINTN Completion)
EFI_STATUS EFIAPI SetTheImage(IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, IN UINT8 ImageIndex, IN CONST VOID *Image, IN UINTN ImageSize, IN CONST VOID *VendorCode, IN EFI_FIRMWARE_MANAGEMENT_UPDATE_IMAGE_PROGRESS Progress, OUT CHAR16 **AbortReason)
Definition: FmpDxe.c:1166
EFI_STATUS EFIAPI CheckTheImage(IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, IN UINT8 ImageIndex, IN CONST VOID *Image, IN UINTN ImageSize, OUT UINT32 *ImageUpdatable)
Definition: FmpDxe.c:1105
EFI_STATUS EFIAPI SetPackageInfo(IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, IN CONST VOID *Image, IN UINTN ImageSize, IN CONST VOID *VendorCode, IN UINT32 PackageVersion, IN CONST CHAR16 *PackageVersionName)
Definition: FmpDxe.c:1577
CHAR16 * mImageIdName
Definition: FmpDxe.c:101
EFI_STATUS EFIAPI GetTheImageInfo(IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, IN OUT UINTN *ImageInfoSize, IN OUT EFI_FIRMWARE_IMAGE_DESCRIPTOR *ImageInfo, OUT UINT32 *DescriptorVersion, OUT UINT8 *DescriptorCount, OUT UINTN *DescriptorSize, OUT UINT32 *PackageVersion, OUT CHAR16 **PackageVersionName)
Definition: FmpDxe.c:451
EFI_STATUS EFIAPI GetPackageInfo(IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, OUT UINT32 *PackageVersion, OUT CHAR16 **PackageVersionName, OUT UINT32 *PackageVersionNameMaxLen, OUT UINT64 *AttributesSupported, OUT UINT64 *AttributesSetting)
Definition: FmpDxe.c:1532
EFI_STATUS EFIAPI GetTheImage(IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, IN UINT8 ImageIndex, IN OUT VOID *Image, IN OUT UINTN *ImageSize)
Definition: FmpDxe.c:567
VOID DetectTestKey(VOID)
Definition: DetectTestKey.c:23
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_EVENT
Definition: UefiBaseType.h:37
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33