audk/FmpDevicePkg/FmpDxe/FmpDxeLib.inf

81 lines
2.7 KiB
INI
Raw Normal View History

## @file
# Produces a Firmware Management Protocol that supports updates to a firmware
# image stored in a firmware device with platform and firmware device specific
# information provided through PCDs and libraries.
#
# Copyright (c) 2016, Microsoft Corporation. All rights reserved.<BR>
FmdDevicePkg/FmpDxe: Support Fmp Capsule Dependency. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2421 Capsule Dependency is an incremental change of Fmp Capsule Update. The capsule format is extended to include a set of binary encoded dependency expression. The dependency expression is signed together with the Fmp payload and evaluated before update is applied. This feature is defined in UEFI Spec 2.8. The dependency evaluation has two steps: 1. Validate platform existing Fmp images' version satisfy the dependency expression in capsule image. 2. Validate the capsule image version satisfy all the platform existing Fmp image's dependency expression. If the dependency expression evaluates to FALSE, then the capsule update fails and last attempt status is set to LAST_ATTEMPT_STATUS_ERROR_UNSATISFIED_DEPENDENCIES. The dependency saving and getting is FmpDeviceLib implementation scope. The parameter "Image" of FmpDeviceSetImage and FmpDeviceGetImage function is extended to contain the dependency. The layout: +--------------------------+ | Dependency Op-codes | +--------------------------+ | Fmp Payload Image | +--------------------------+ 1. FmpDeviceSetImage is responsible for retrieving the dependency from the parameter "Image" and saving it to a protected storage. 2. FmpDeviceGetImage is responsible for retrieving the dependency from the storage where FmpDeviceSetImage saves dependency and combining it with the Fmp Payload Image into one buffer which is returned to the caller. This dependency will be populated into EFI_FIRMWARE_IMAGE_DESCRIPTOR and used for dependency evaluation. 3. FmpDeviceGetAttributes must set the bit IMAGE_ATTRIBUTE_DEPENDENCY to indicate the Fmp device supports Fmp Capsule Dependency feature. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Wei6 Xu <wei6.xu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2020-01-10 06:34:54 +01:00
# Copyright (c) 2018 - 2020, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = FmpDxeLib
MODULE_UNI_FILE = FmpDxe.uni
FILE_GUID = 4B11717A-30B3-4122-8C69-8E0D5E141C32
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = NULL
CONSTRUCTOR = FmpDxeEntryPoint
DESTRUCTOR = FmpDxeLibDestructor
#
# The following information is for reference only and not required by the build tools.
#
# VALID_ARCHITECTURES = IA32 X64 ARM AARCH64
#
[Sources]
FmpDxe.c
FmpDxe.h
DetectTestKey.c
VariableSupport.h
VariableSupport.c
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
CryptoPkg/CryptoPkg.dec
FmpDevicePkg/FmpDevicePkg.dec
[LibraryClasses]
DebugLib
BaseLib
BaseMemoryLib
UefiBootServicesTableLib
MemoryAllocationLib
PrintLib
UefiLib
BaseCryptLib
FmpAuthenticationLib
FmpDeviceLib
FmpPayloadHeaderLib
CapsuleUpdatePolicyLib
FmpDependencyLib
FmpDependencyCheckLib
FmpDependencyDeviceLib
[Guids]
gEfiEndOfDxeEventGroupGuid
[Protocols]
gEdkiiVariableLockProtocolGuid ## CONSUMES
gEfiFirmwareManagementProtocolGuid ## PRODUCES
gEdkiiFirmwareManagementProgressProtocolGuid ## PRODUCES
[Pcd]
gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceStorageAccessEnable ## CONSUMES
gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName ## CONSUMES
gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceBuildTimeLowestSupportedVersion ## CONSUMES
gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceLockEventGuid ## CONSUMES
gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceProgressWatchdogTimeInSeconds ## CONSUMES
gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceProgressColor ## CONSUMES
gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr ## CONSUMES
gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceTestKeySha256Digest ## CONSUMES
gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageTypeIdGuid ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed ## SOMETIMES_PRODUCES
[Depex]
gEfiVariableWriteArchProtocolGuid AND gEdkiiVariableLockProtocolGuid