diff options
Diffstat (limited to 'MdePkg/Include/Protocol/FirmwareManagement.h')
-rw-r--r-- | MdePkg/Include/Protocol/FirmwareManagement.h | 64 |
1 files changed, 45 insertions, 19 deletions
diff --git a/MdePkg/Include/Protocol/FirmwareManagement.h b/MdePkg/Include/Protocol/FirmwareManagement.h index e9a9e04ea0c3..d998b5738e4a 100644 --- a/MdePkg/Include/Protocol/FirmwareManagement.h +++ b/MdePkg/Include/Protocol/FirmwareManagement.h @@ -8,15 +8,9 @@ CheckImage(), GetPackageInfo(), and SetPackageInfo() shall return EFI_UNSUPPORTED if not supported by the driver. - Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR> + Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.<BR> Copyright (c) 2013 - 2014, Hewlett-Packard Development Company, L.P.<BR> - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + SPDX-License-Identifier: BSD-2-Clause-Patent @par Revision Reference: This Protocol is introduced in UEFI Specification 2.3 @@ -35,6 +29,31 @@ typedef struct _EFI_FIRMWARE_MANAGEMENT_PROTOCOL EFI_FIRMWARE_MANAGEMENT_PROTOCOL; /// +/// Dependency Expression Opcode +/// +#define EFI_FMP_DEP_PUSH_GUID 0x00 +#define EFI_FMP_DEP_PUSH_VERSION 0x01 +#define EFI_FMP_DEP_VERSION_STR 0x02 +#define EFI_FMP_DEP_AND 0x03 +#define EFI_FMP_DEP_OR 0x04 +#define EFI_FMP_DEP_NOT 0x05 +#define EFI_FMP_DEP_TRUE 0x06 +#define EFI_FMP_DEP_FALSE 0x07 +#define EFI_FMP_DEP_EQ 0x08 +#define EFI_FMP_DEP_GT 0x09 +#define EFI_FMP_DEP_GTE 0x0A +#define EFI_FMP_DEP_LT 0x0B +#define EFI_FMP_DEP_LTE 0x0C +#define EFI_FMP_DEP_END 0x0D + +/// +/// Image Attribute - Dependency +/// +typedef struct { + UINT8 Dependencies[1]; +} EFI_FIRMWARE_IMAGE_DEP; + +/// /// EFI_FIRMWARE_IMAGE_DESCRIPTOR /// typedef struct { @@ -117,6 +136,7 @@ typedef struct { /// present in version 3 or higher. /// UINT64 HardwareInstance; + EFI_FIRMWARE_IMAGE_DEP *Dependencies; } EFI_FIRMWARE_IMAGE_DESCRIPTOR; @@ -149,11 +169,17 @@ typedef struct { /// The attribute IMAGE_ATTRIBUTE_UEFI_IMAGE indicates that this image is an EFI compatible image. /// #define IMAGE_ATTRIBUTE_UEFI_IMAGE 0x0000000000000010 +/// +/// The attribute IMAGE_ATTRIBUTE_DEPENDENCY indicates that there is an EFI_FIRMWARE_IMAGE_DEP +/// section associated with the image. +/// +#define IMAGE_ATTRIBUTE_DEPENDENCY 0x0000000000000020 // // Image Compatibility Definitions // +/// /// Values from 0x0000000000000002 thru 0x000000000000FFFF are reserved for future assignments. /// Values from 0x0000000000010000 thru 0xFFFFFFFFFFFFFFFF are used by firmware vendor for /// compatibility check. @@ -163,11 +189,11 @@ typedef struct { /// /// Descriptor Version exposed by GetImageInfo() function /// -#define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION 3 +#define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION 4 /// -/// Image Attribute -Authentication Required +/// Image Attribute - Authentication Required /// typedef struct { /// @@ -316,11 +342,11 @@ EFI_STATUS This function allows a copy of the current firmware image to be created and saved. The saved copy could later been used, for example, in firmware image recovery or rollback. - @param[in] This A pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance. - @param[in] ImageIndex A unique number identifying the firmware image(s) within the device. + @param[in] This A pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance. + @param[in] ImageIndex A unique number identifying the firmware image(s) within the device. The number is between 1 and DescriptorCount. - @param[out] Image Points to the buffer where the current image is copied to. - @param[out] ImageSize On entry, points to the size of the buffer pointed to by Image, in bytes. + @param[out] Image Points to the buffer where the current image is copied to. + @param[in, out] ImageSize On entry, points to the size of the buffer pointed to by Image, in bytes. On return, points to the length of the image, in bytes. @retval EFI_SUCCESS The device was successfully updated with the new image. @@ -330,7 +356,7 @@ EFI_STATUS @retval EFI_INVALID_PARAMETER The Image was NULL. @retval EFI_NOT_FOUND The current image is not copied to the buffer. @retval EFI_UNSUPPORTED The operation is not supported. - @retval EFI_SECURITY_VIOLATIO The operation could not be performed due to an authentication failure. + @retval EFI_SECURITY_VIOLATION The operation could not be performed due to an authentication failure. **/ typedef @@ -338,7 +364,7 @@ EFI_STATUS (EFIAPI *EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_IMAGE)( IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, IN UINT8 ImageIndex, - IN OUT VOID *Image, + OUT VOID *Image, IN OUT UINTN *ImageSize ); @@ -385,7 +411,7 @@ EFI_STATUS @retval EFI_ABORTED The operation is aborted. @retval EFI_INVALID_PARAMETER The Image was NULL. @retval EFI_UNSUPPORTED The operation is not supported. - @retval EFI_SECURITY_VIOLATIO The operation could not be performed due to an authentication failure. + @retval EFI_SECURITY_VIOLATION The operation could not be performed due to an authentication failure. **/ typedef @@ -417,7 +443,7 @@ EFI_STATUS @retval EFI_SUCCESS The image was successfully checked. @retval EFI_INVALID_PARAMETER The Image was NULL. @retval EFI_UNSUPPORTED The operation is not supported. - @retval EFI_SECURITY_VIOLATIO The operation could not be performed due to an authentication failure. + @retval EFI_SECURITY_VIOLATION The operation could not be performed due to an authentication failure. **/ typedef @@ -501,7 +527,7 @@ EFI_STATUS @retval EFI_INVALID_PARAMETER The PackageVersionName length is longer than the value returned in PackageVersionNameMaxLen. @retval EFI_UNSUPPORTED The operation is not supported. - @retval EFI_SECURITY_VIOLATIO The operation could not be performed due to an authentication failure. + @retval EFI_SECURITY_VIOLATION The operation could not be performed due to an authentication failure. **/ typedef |