VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Include/Protocol/FirmwareManagement.h@ 105681

最後變更 在這個檔案從105681是 105670,由 vboxsync 提交於 7 月 前

Devices/EFI/FirmwareNew: Merge edk2-stable-202405 and make it build on aarch64, bugref:4643

  • 屬性 svn:eol-style 設為 native
檔案大小: 27.3 KB
 
1/** @file
2 UEFI Firmware Management Protocol definition
3 Firmware Management Protocol provides an abstraction for device to provide firmware
4 management support. The base requirements for managing device firmware images include
5 identifying firmware image revision level and programming the image into the device.
6
7 GetImageInfo() is the only required function. GetImage(), SetImage(),
8 CheckImage(), GetPackageInfo(), and SetPackageInfo() shall return
9 EFI_UNSUPPORTED if not supported by the driver.
10
11 Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.<BR>
12 Copyright (c) 2013 - 2014, Hewlett-Packard Development Company, L.P.<BR>
13 SPDX-License-Identifier: BSD-2-Clause-Patent
14
15 @par Revision Reference:
16 This Protocol is introduced in UEFI Specification 2.3
17
18**/
19
20#ifndef __EFI_FIRMWARE_MANAGEMENT_PROTOCOL_H__
21#define __EFI_FIRMWARE_MANAGEMENT_PROTOCOL_H__
22
23#define EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GUID \
24 { \
25 0x86c77a67, 0xb97, 0x4633, {0xa1, 0x87, 0x49, 0x10, 0x4d, 0x6, 0x85, 0xc7 } \
26 }
27
28typedef struct _EFI_FIRMWARE_MANAGEMENT_PROTOCOL EFI_FIRMWARE_MANAGEMENT_PROTOCOL;
29
30///
31/// Dependency Expression Opcode
32///
33#define EFI_FMP_DEP_PUSH_GUID 0x00
34#define EFI_FMP_DEP_PUSH_VERSION 0x01
35#define EFI_FMP_DEP_VERSION_STR 0x02
36#define EFI_FMP_DEP_AND 0x03
37#define EFI_FMP_DEP_OR 0x04
38#define EFI_FMP_DEP_NOT 0x05
39#define EFI_FMP_DEP_TRUE 0x06
40#define EFI_FMP_DEP_FALSE 0x07
41#define EFI_FMP_DEP_EQ 0x08
42#define EFI_FMP_DEP_GT 0x09
43#define EFI_FMP_DEP_GTE 0x0A
44#define EFI_FMP_DEP_LT 0x0B
45#define EFI_FMP_DEP_LTE 0x0C
46#define EFI_FMP_DEP_END 0x0D
47#define EFI_FMP_DEP_DECLARE_LENGTH 0x0E
48
49///
50/// Image Attribute - Dependency
51///
52typedef struct {
53 UINT8 Dependencies[1];
54} EFI_FIRMWARE_IMAGE_DEP;
55
56///
57/// EFI_FIRMWARE_IMAGE_DESCRIPTOR
58///
59typedef struct {
60 ///
61 /// A unique number identifying the firmware image within the device. The number is
62 /// between 1 and DescriptorCount.
63 ///
64 UINT8 ImageIndex;
65 ///
66 /// A unique GUID identifying the firmware image type.
67 ///
68 EFI_GUID ImageTypeId;
69 ///
70 /// A unique number identifying the firmware image.
71 ///
72 UINT64 ImageId;
73 ///
74 /// A pointer to a null-terminated string representing the firmware image name.
75 ///
76 CHAR16 *ImageIdName;
77 ///
78 /// Identifies the version of the device firmware. The format is vendor specific and new
79 /// version must have a greater value than an old version.
80 ///
81 UINT32 Version;
82 ///
83 /// A pointer to a null-terminated string representing the firmware image version name.
84 ///
85 CHAR16 *VersionName;
86 ///
87 /// Size of the image in bytes. If size=0, then only ImageIndex and ImageTypeId are valid.
88 ///
89 UINTN Size;
90 ///
91 /// Image attributes that are supported by this device. See 'Image Attribute Definitions'
92 /// for possible returned values of this parameter. A value of 1 indicates the attribute is
93 /// supported and the current setting value is indicated in AttributesSetting. A
94 /// value of 0 indicates the attribute is not supported and the current setting value in
95 /// AttributesSetting is meaningless.
96 ///
97 UINT64 AttributesSupported;
98 ///
99 /// Image attributes. See 'Image Attribute Definitions' for possible returned values of
100 /// this parameter.
101 ///
102 UINT64 AttributesSetting;
103 ///
104 /// Image compatibilities. See 'Image Compatibility Definitions' for possible returned
105 /// values of this parameter.
106 ///
107 UINT64 Compatibilities;
108 ///
109 /// Describes the lowest ImageDescriptor version that the device will accept. Only
110 /// present in version 2 or higher.
111 ///
112 UINT32 LowestSupportedImageVersion;
113 ///
114 /// Describes the version that was last attempted to update. If no update attempted the
115 /// value will be 0. If the update attempted was improperly formatted and no version
116 /// number was available then the value will be zero. Only present in version 3 or higher.
117 UINT32 LastAttemptVersion;
118 ///
119 /// Describes the status that was last attempted to update. If no update has been attempted
120 /// the value will be LAST_ATTEMPT_STATUS_SUCCESS. Only present in version 3 or higher.
121 ///
122 UINT32 LastAttemptStatus;
123 ///
124 /// An optional number to identify the unique hardware instance within the system for
125 /// devices that may have multiple instances (Example: a plug in pci network card). This
126 /// number must be unique within the namespace of the ImageTypeId GUID and
127 /// ImageIndex. For FMP instances that have multiple descriptors for a single
128 /// hardware instance, all descriptors must have the same HardwareInstance value.
129 /// This number must be consistent between boots and should be based on some sort of
130 /// hardware identified unique id (serial number, etc) whenever possible. If a hardware
131 /// based number is not available the FMP provider may use some other characteristic
132 /// such as device path, bus/dev/function, slot num, etc for generating the
133 /// HardwareInstance. For implementations that will never have more than one
134 /// instance a zero can be used. A zero means the FMP provider is not able to determine a
135 /// unique hardware instance number or a hardware instance number is not needed. Only
136 /// present in version 3 or higher.
137 ///
138 UINT64 HardwareInstance;
139 EFI_FIRMWARE_IMAGE_DEP *Dependencies;
140} EFI_FIRMWARE_IMAGE_DESCRIPTOR;
141
142//
143// Image Attribute Definitions
144//
145///
146/// The attribute IMAGE_ATTRIBUTE_IMAGE_UPDATABLE indicates this device supports firmware
147/// image update.
148///
149#define IMAGE_ATTRIBUTE_IMAGE_UPDATABLE 0x0000000000000001
150///
151/// The attribute IMAGE_ATTRIBUTE_RESET_REQUIRED indicates a reset of the device is required
152/// for the new firmware image to take effect after a firmware update. The device is the device hosting
153/// the firmware image.
154///
155#define IMAGE_ATTRIBUTE_RESET_REQUIRED 0x0000000000000002
156///
157/// The attribute IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED indicates authentication is
158/// required to perform the following image operations: GetImage(), SetImage(), and
159/// CheckImage(). See 'Image Attribute - Authentication'.
160///
161#define IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED 0x0000000000000004
162///
163/// The attribute IMAGE_ATTRIBUTE_IN_USE indicates the current state of the firmware image.
164/// This distinguishes firmware images in a device that supports redundant images.
165///
166#define IMAGE_ATTRIBUTE_IN_USE 0x0000000000000008
167///
168/// The attribute IMAGE_ATTRIBUTE_UEFI_IMAGE indicates that this image is an EFI compatible image.
169///
170#define IMAGE_ATTRIBUTE_UEFI_IMAGE 0x0000000000000010
171///
172/// The attribute IMAGE_ATTRIBUTE_DEPENDENCY indicates that there is an EFI_FIRMWARE_IMAGE_DEP
173/// section associated with the image.
174///
175#define IMAGE_ATTRIBUTE_DEPENDENCY 0x0000000000000020
176
177//
178// Image Compatibility Definitions
179//
180///
181/// Values from 0x0000000000000002 thru 0x000000000000FFFF are reserved for future assignments.
182/// Values from 0x0000000000010000 thru 0xFFFFFFFFFFFFFFFF are used by firmware vendor for
183/// compatibility check.
184///
185#define IMAGE_COMPATIBILITY_CHECK_SUPPORTED 0x0000000000000001
186
187///
188/// Descriptor Version exposed by GetImageInfo() function
189///
190#define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION 4
191
192///
193/// Image Attribute - Authentication Required
194///
195typedef struct {
196 ///
197 /// It is included in the signature of AuthInfo. It is used to ensure freshness/no replay.
198 /// It is incremented during each firmware image operation.
199 ///
200 UINT64 MonotonicCount;
201 ///
202 /// Provides the authorization for the firmware image operations. It is a signature across
203 /// the image data and the Monotonic Count value. Caller uses the private key that is
204 /// associated with a public key that has been provisioned via the key exchange.
205 /// Because this is defined as a signature, WIN_CERTIFICATE_UEFI_GUID.CertType must
206 /// be EFI_CERT_TYPE_PKCS7_GUID.
207 ///
208 WIN_CERTIFICATE_UEFI_GUID AuthInfo;
209} EFI_FIRMWARE_IMAGE_AUTHENTICATION;
210
211//
212// ImageUpdatable Definitions
213//
214///
215/// IMAGE_UPDATABLE_VALID indicates SetImage() will accept the new image and update the
216/// device with the new image. The version of the new image could be higher or lower than
217/// the current image. SetImage VendorCode is optional but can be used for vendor
218/// specific action.
219///
220#define IMAGE_UPDATABLE_VALID 0x0000000000000001
221///
222/// IMAGE_UPDATABLE_INVALID indicates SetImage() will reject the new image. No additional
223/// information is provided for the rejection.
224///
225#define IMAGE_UPDATABLE_INVALID 0x0000000000000002
226///
227/// IMAGE_UPDATABLE_INVALID_TYPE indicates SetImage() will reject the new image. The
228/// rejection is due to the new image is not a firmware image recognized for this device.
229///
230#define IMAGE_UPDATABLE_INVALID_TYPE 0x0000000000000004
231///
232/// IMAGE_UPDATABLE_INVALID_OLD indicates SetImage() will reject the new image. The
233/// rejection is due to the new image version is older than the current firmware image
234/// version in the device. The device firmware update policy does not support firmware
235/// version downgrade.
236///
237#define IMAGE_UPDATABLE_INVALID_OLD 0x0000000000000008
238///
239/// IMAGE_UPDATABLE_VALID_WITH_VENDOR_CODE indicates SetImage() will accept and update
240/// the new image only if a correct VendorCode is provided or else image would be
241/// rejected and SetImage will return appropriate error.
242///
243#define IMAGE_UPDATABLE_VALID_WITH_VENDOR_CODE 0x0000000000000010
244
245//
246// Package Attribute Definitions
247//
248///
249/// The attribute PACKAGE_ATTRIBUTE_VERSION_UPDATABLE indicates this device supports the
250/// update of the firmware package version.
251///
252#define PACKAGE_ATTRIBUTE_VERSION_UPDATABLE 0x0000000000000001
253///
254/// The attribute PACKAGE_ATTRIBUTE_RESET_REQUIRED indicates a reset of the device is
255/// required for the new package info to take effect after an update.
256///
257#define PACKAGE_ATTRIBUTE_RESET_REQUIRED 0x0000000000000002
258///
259/// The attribute PACKAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED indicates authentication
260/// is required to update the package info.
261///
262#define PACKAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED 0x0000000000000004
263
264/**
265 Callback function to report the process of the firmware updating.
266
267 @param[in] Completion A value between 1 and 100 indicating the current completion
268 progress of the firmware update. Completion progress is
269 reported as from 1 to 100 percent. A value of 0 is used by
270 the driver to indicate that progress reporting is not supported.
271
272 @retval EFI_SUCCESS SetImage() continues to do the callback if supported.
273 @retval other SetImage() discontinues the callback and completes
274 the update and returns.
275
276**/
277typedef
278EFI_STATUS
279(EFIAPI *EFI_FIRMWARE_MANAGEMENT_UPDATE_IMAGE_PROGRESS)(
280 IN UINTN Completion
281 );
282
283/**
284 Returns information about the current firmware image(s) of the device.
285
286 This function allows a copy of the current firmware image to be created and saved.
287 The saved copy could later been used, for example, in firmware image recovery or rollback.
288
289 @param[in] This A pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance.
290 @param[in, out] ImageInfoSize A pointer to the size, in bytes, of the ImageInfo buffer.
291 On input, this is the size of the buffer allocated by the caller.
292 On output, it is the size of the buffer returned by the firmware
293 if the buffer was large enough, or the size of the buffer needed
294 to contain the image(s) information if the buffer was too small.
295 @param[in, out] ImageInfo A pointer to the buffer in which firmware places the current image(s)
296 information. The information is an array of EFI_FIRMWARE_IMAGE_DESCRIPTORs.
297 @param[out] DescriptorVersion A pointer to the location in which firmware returns the version number
298 associated with the EFI_FIRMWARE_IMAGE_DESCRIPTOR.
299 @param[out] DescriptorCount A pointer to the location in which firmware returns the number of
300 descriptors or firmware images within this device.
301 @param[out] DescriptorSize A pointer to the location in which firmware returns the size, in bytes,
302 of an individual EFI_FIRMWARE_IMAGE_DESCRIPTOR.
303 @param[out] PackageVersion A version number that represents all the firmware images in the device.
304 The format is vendor specific and new version must have a greater value
305 than the old version. If PackageVersion is not supported, the value is
306 0xFFFFFFFF. A value of 0xFFFFFFFE indicates that package version comparison
307 is to be performed using PackageVersionName. A value of 0xFFFFFFFD indicates
308 that package version update is in progress.
309 @param[out] PackageVersionName A pointer to a pointer to a null-terminated string representing the
310 package version name. The buffer is allocated by this function with
311 AllocatePool(), and it is the caller's responsibility to free it with a call
312 to FreePool().
313
314 @retval EFI_SUCCESS The device was successfully updated with the new image.
315 @retval EFI_BUFFER_TOO_SMALL The ImageInfo buffer was too small. The current buffer size
316 needed to hold the image(s) information is returned in ImageInfoSize.
317 @retval EFI_INVALID_PARAMETER ImageInfoSize is NULL.
318 @retval EFI_DEVICE_ERROR Valid information could not be returned. Possible corrupted image.
319
320**/
321typedef
322EFI_STATUS
323(EFIAPI *EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_IMAGE_INFO)(
324 IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This,
325 IN OUT UINTN *ImageInfoSize,
326 IN OUT EFI_FIRMWARE_IMAGE_DESCRIPTOR *ImageInfo,
327 OUT UINT32 *DescriptorVersion,
328 OUT UINT8 *DescriptorCount,
329 OUT UINTN *DescriptorSize,
330 OUT UINT32 *PackageVersion,
331 OUT CHAR16 **PackageVersionName
332 );
333
334/**
335 Retrieves a copy of the current firmware image of the device.
336
337 This function allows a copy of the current firmware image to be created and saved.
338 The saved copy could later been used, for example, in firmware image recovery or rollback.
339
340 @param[in] This A pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance.
341 @param[in] ImageIndex A unique number identifying the firmware image(s) within the device.
342 The number is between 1 and DescriptorCount.
343 @param[out] Image Points to the buffer where the current image is copied to.
344 @param[in, out] ImageSize On entry, points to the size of the buffer pointed to by Image, in bytes.
345 On return, points to the length of the image, in bytes.
346
347 @retval EFI_SUCCESS The device was successfully updated with the new image.
348 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to hold the
349 image. The current buffer size needed to hold the image is returned
350 in ImageSize.
351 @retval EFI_INVALID_PARAMETER The Image was NULL.
352 @retval EFI_NOT_FOUND The current image is not copied to the buffer.
353 @retval EFI_UNSUPPORTED The operation is not supported.
354 @retval EFI_SECURITY_VIOLATION The operation could not be performed due to an authentication failure.
355
356**/
357typedef
358EFI_STATUS
359(EFIAPI *EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_IMAGE)(
360 IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This,
361 IN UINT8 ImageIndex,
362 OUT VOID *Image,
363 IN OUT UINTN *ImageSize
364 );
365
366/**
367 Updates the firmware image of the device.
368
369 This function updates the hardware with the new firmware image.
370 This function returns EFI_UNSUPPORTED if the firmware image is not updatable.
371 If the firmware image is updatable, the function should perform the following minimal validations
372 before proceeding to do the firmware image update.
373 - Validate the image authentication if image has attribute
374 IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED. The function returns
375 EFI_SECURITY_VIOLATION if the validation fails.
376 - Validate the image is a supported image for this device. The function returns EFI_ABORTED if
377 the image is unsupported. The function can optionally provide more detailed information on
378 why the image is not a supported image.
379 - Validate the data from VendorCode if not null. Image validation must be performed before
380 VendorCode data validation. VendorCode data is ignored or considered invalid if image
381 validation failed. The function returns EFI_ABORTED if the data is invalid.
382
383 VendorCode enables vendor to implement vendor-specific firmware image update policy. Null if
384 the caller did not specify the policy or use the default policy. As an example, vendor can implement
385 a policy to allow an option to force a firmware image update when the abort reason is due to the new
386 firmware image version is older than the current firmware image version or bad image checksum.
387 Sensitive operations such as those wiping the entire firmware image and render the device to be
388 non-functional should be encoded in the image itself rather than passed with the VendorCode.
389 AbortReason enables vendor to have the option to provide a more detailed description of the abort
390 reason to the caller.
391
392 @param[in] This A pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance.
393 @param[in] ImageIndex A unique number identifying the firmware image(s) within the device.
394 The number is between 1 and DescriptorCount.
395 @param[in] Image Points to the new image.
396 @param[in] ImageSize Size of the new image in bytes.
397 @param[in] VendorCode This enables vendor to implement vendor-specific firmware image update policy.
398 Null indicates the caller did not specify the policy or use the default policy.
399 @param[in] Progress A function used by the driver to report the progress of the firmware update.
400 @param[out] AbortReason A pointer to a pointer to a null-terminated string providing more
401 details for the aborted operation. The buffer is allocated by this function
402 with AllocatePool(), and it is the caller's responsibility to free it with a
403 call to FreePool().
404
405 @retval EFI_SUCCESS The device was successfully updated with the new image.
406 @retval EFI_ABORTED The operation is aborted.
407 @retval EFI_INVALID_PARAMETER The Image was NULL.
408 @retval EFI_UNSUPPORTED The operation is not supported.
409 @retval EFI_SECURITY_VIOLATION The operation could not be performed due to an authentication failure.
410
411**/
412typedef
413EFI_STATUS
414(EFIAPI *EFI_FIRMWARE_MANAGEMENT_PROTOCOL_SET_IMAGE)(
415 IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This,
416 IN UINT8 ImageIndex,
417 IN CONST VOID *Image,
418 IN UINTN ImageSize,
419 IN CONST VOID *VendorCode,
420 IN EFI_FIRMWARE_MANAGEMENT_UPDATE_IMAGE_PROGRESS Progress,
421 OUT CHAR16 **AbortReason
422 );
423
424/**
425 Checks if the firmware image is valid for the device.
426
427 This function allows firmware update application to validate the firmware image without
428 invoking the SetImage() first.
429
430 @param[in] This A pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance.
431 @param[in] ImageIndex A unique number identifying the firmware image(s) within the device.
432 The number is between 1 and DescriptorCount.
433 @param[in] Image Points to the new image.
434 @param[in] ImageSize Size of the new image in bytes.
435 @param[out] ImageUpdatable Indicates if the new image is valid for update. It also provides,
436 if available, additional information if the image is invalid.
437
438 @retval EFI_SUCCESS The image was successfully checked.
439 @retval EFI_INVALID_PARAMETER The Image was NULL.
440 @retval EFI_UNSUPPORTED The operation is not supported.
441 @retval EFI_SECURITY_VIOLATION The operation could not be performed due to an authentication failure.
442
443**/
444typedef
445EFI_STATUS
446(EFIAPI *EFI_FIRMWARE_MANAGEMENT_PROTOCOL_CHECK_IMAGE)(
447 IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This,
448 IN UINT8 ImageIndex,
449 IN CONST VOID *Image,
450 IN UINTN ImageSize,
451 OUT UINT32 *ImageUpdatable
452 );
453
454/**
455 Returns information about the firmware package.
456
457 This function returns package information.
458
459 @param[in] This A pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance.
460 @param[out] PackageVersion A version number that represents all the firmware images in the device.
461 The format is vendor specific and new version must have a greater value
462 than the old version. If PackageVersion is not supported, the value is
463 0xFFFFFFFF. A value of 0xFFFFFFFE indicates that package version
464 comparison is to be performed using PackageVersionName. A value of
465 0xFFFFFFFD indicates that package version update is in progress.
466 @param[out] PackageVersionName A pointer to a pointer to a null-terminated string representing
467 the package version name. The buffer is allocated by this function with
468 AllocatePool(), and it is the caller's responsibility to free it with a
469 call to FreePool().
470 @param[out] PackageVersionNameMaxLen The maximum length of package version name if device supports update of
471 package version name. A value of 0 indicates the device does not support
472 update of package version name. Length is the number of Unicode characters,
473 including the terminating null character.
474 @param[out] AttributesSupported Package attributes that are supported by this device. See 'Package Attribute
475 Definitions' for possible returned values of this parameter. A value of 1
476 indicates the attribute is supported and the current setting value is
477 indicated in AttributesSetting. A value of 0 indicates the attribute is not
478 supported and the current setting value in AttributesSetting is meaningless.
479 @param[out] AttributesSetting Package attributes. See 'Package Attribute Definitions' for possible returned
480 values of this parameter
481
482 @retval EFI_SUCCESS The package information was successfully returned.
483 @retval EFI_UNSUPPORTED The operation is not supported.
484
485**/
486typedef
487EFI_STATUS
488(EFIAPI *EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_PACKAGE_INFO)(
489 IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This,
490 OUT UINT32 *PackageVersion,
491 OUT CHAR16 **PackageVersionName,
492 OUT UINT32 *PackageVersionNameMaxLen,
493 OUT UINT64 *AttributesSupported,
494 OUT UINT64 *AttributesSetting
495 );
496
497/**
498 Updates information about the firmware package.
499
500 This function updates package information.
501 This function returns EFI_UNSUPPORTED if the package information is not updatable.
502 VendorCode enables vendor to implement vendor-specific package information update policy.
503 Null if the caller did not specify this policy or use the default policy.
504
505 @param[in] This A pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance.
506 @param[in] Image Points to the authentication image.
507 Null if authentication is not required.
508 @param[in] ImageSize Size of the authentication image in bytes.
509 0 if authentication is not required.
510 @param[in] VendorCode This enables vendor to implement vendor-specific firmware
511 image update policy.
512 Null indicates the caller did not specify this policy or use
513 the default policy.
514 @param[in] PackageVersion The new package version.
515 @param[in] PackageVersionName A pointer to the new null-terminated Unicode string representing
516 the package version name.
517 The string length is equal to or less than the value returned in
518 PackageVersionNameMaxLen.
519
520 @retval EFI_SUCCESS The device was successfully updated with the new package
521 information.
522 @retval EFI_INVALID_PARAMETER The PackageVersionName length is longer than the value
523 returned in PackageVersionNameMaxLen.
524 @retval EFI_UNSUPPORTED The operation is not supported.
525 @retval EFI_SECURITY_VIOLATION The operation could not be performed due to an authentication failure.
526
527**/
528typedef
529EFI_STATUS
530(EFIAPI *EFI_FIRMWARE_MANAGEMENT_PROTOCOL_SET_PACKAGE_INFO)(
531 IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This,
532 IN CONST VOID *Image,
533 IN UINTN ImageSize,
534 IN CONST VOID *VendorCode,
535 IN UINT32 PackageVersion,
536 IN CONST CHAR16 *PackageVersionName
537 );
538
539///
540/// EFI_FIRMWARE_MANAGEMENT_PROTOCOL
541/// The protocol for managing firmware provides the following services.
542/// - Get the attributes of the current firmware image. Attributes include revision level.
543/// - Get a copy of the current firmware image. As an example, this service could be used by a
544/// management application to facilitate a firmware roll-back.
545/// - Program the device with a firmware image supplied by the user.
546/// - Label all the firmware images within a device with a single version.
547///
548struct _EFI_FIRMWARE_MANAGEMENT_PROTOCOL {
549 EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_IMAGE_INFO GetImageInfo;
550 EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_IMAGE GetImage;
551 EFI_FIRMWARE_MANAGEMENT_PROTOCOL_SET_IMAGE SetImage;
552 EFI_FIRMWARE_MANAGEMENT_PROTOCOL_CHECK_IMAGE CheckImage;
553 EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_PACKAGE_INFO GetPackageInfo;
554 EFI_FIRMWARE_MANAGEMENT_PROTOCOL_SET_PACKAGE_INFO SetPackageInfo;
555};
556
557extern EFI_GUID gEfiFirmwareManagementProtocolGuid;
558
559#endif
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette