summaryrefslogtreecommitdiffstats
path: root/SignedCapsulePkg
Commit message (Collapse)AuthorAgeFilesLines
* SignedCapsulePkg SystemFirmwareUpdateDxe: Fix failure caused by d69d922Star Zeng2018-07-131-5/+16
| | | | | | | | | | | | | | | | | | d69d9227d046211265de1fab5580c50a65944614 caused system firmware update failure. It is because FindMatchingFmpHandles() is expected to return handles matched, but the function returns all handles found. This patch is to fix the issue. This patch also assigns mSystemFmpPrivate->Handle for "case 1:" path in case the Handle is needed by other place in future. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> (cherry picked from commit 665bfd41ac32b364201c07dc1c5434432730c034)
* SignedCapsulePkg/SystemFirmwareReportDxe: Pass thru on same handleKinney, Michael D2018-07-131-3/+7
| | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=928 Use HandleProtocol() to pass thru a SetImage() call to the System FMP Protocol that must be on the same handle as the FMP Protocol. Cc: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> (cherry picked from commit 153f5c7a93be09403891404c06e5b0e24eb019a3)
* SignedCapsulePkg/SystemFirmwareUpdateDxe: Single FMPKinney, Michael D2018-07-131-21/+322
| | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=928 Uninstall all System FMP Protocols for the current FW device. If an FMP Protocol for the current FW device is already present, then install the new System FMP protocol onto the same handle as the FMP Protocol. Otherwise, install the FMP protocol onto a new handle. This supports use cases where multiple capsules for the same system firmware device are processed on the same boot of the platform. It guarantees there is at most one FMP protocol for each system firmware device. Cc: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> (cherry picked from commit d69d9227d046211265de1fab5580c50a65944614)
* SignedCapsulePkg: Convert files to CRLF line endingHao Wu2017-04-061-11/+11
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* SignedCapsulePkg: Update RecoveryModuleLoadPei to report the correct FvInfoLiming Gao2017-03-291-2/+2
| | | | | | | | | Update logic to install FvInfo PPI with its file system guid. Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* SignedCapsulePkg: Add Readme.mdJiewen Yao2017-03-101-0/+11
| | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
* SignedCapsulePkg: Replace [Ascii|Unicode]ValueToStringHao Wu2017-03-022-4/+16
| | | | | | | | | | It is the follow up of commits 51f0ceb..9e32e97 to replace AsciiValueToString/UnicodeValueToString with AsciiValueToStringS/UnicodeValueToStringS. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* SignedCapsulePkg/IniParsingLib: Use AsciiStrToGuid in BaseLibRuiyu Ni2017-02-281-143/+3
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* SignedCapsulePkg/IniParsing: Rename StrToGuid to avoid link failureRuiyu Ni2017-02-281-3/+3
| | | | | | | | | | Since the next patch will add AsciiStrToGuid in BaseLib, renaming the internal function AsciiStrToGuid to IniAsciiStrToGuid to avoid link failure. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* SignedCapsulePkg/EdkiiSystemCapsuleLib: Fix logic error.Jiewen Yao2017-02-081-1/+1
| | | | | | | | | This patch fixes https://bugzilla.tianocore.org/show_bug.cgi?id=367 Cc: Wang Cloud <winggundum82@163.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Wang Cloud <winggundum82@163.com>
* SignedCapsulePkg/CapsuleLib: Refine to compare with same typeHao Wu2017-01-121-2/+2
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* SignedCapsulePkg/SystemCapsuleLib: Add ASSERT check for PCDJiewen Yao2016-12-231-0/+2
| | | | | | | | | | Add ASSERT check for PCD to avoid platform mis-configuration. Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Qin Long <qin.long@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Qin Long <qin.long@intel.com>
* SignedCapsulePkg/IniParsingLib: Update struct nameDandan Bi2016-12-141-4/+4
| | | | | | | | | | | | | 1. Change _SECTION_ITEM to _INI_SECTION_ITEM 2. Change _COMMENT_LINE to _INI_COMMENT_LINE Because _SECTION_ITEM and _COMMENT_LINE are duplicated with the one defined in IntelFrameworkModulePkg\Universal\ FirmwareVolume\UpdateDriverDxe\UpdateDriver.h Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* SignedCapsulePkg/SystemFirmwareUpdate: Add source file to INF fileDandan Bi2016-12-142-0/+2
| | | | | | | | | Add SystemFirmwareDxe.h to [Sources] section of INF file. Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* SignedCapsulePkg/RecoveryModuleLoadPei: Add source file to INF fileDandan Bi2016-12-141-0/+1
| | | | | | | | | Add RecoveryModuleLoadPei.h to [Sources] section of INF file. Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* SignedCapsulePkg/EdkiiSystemCapsuleLib: Fix coding style issues in INF fileDandan Bi2016-12-141-9/+9
| | | | | | | | | Fix incorrect Guid/Pcd format issues in INF file. Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* SignedCapsulePkg: GetImage() return EFI_UNSUPPORTED.Jiewen Yao2016-11-301-12/+0
| | | | | | | | | | According to UEFI spec, unsupported function should return EFI_UNSUPPORTED directly. Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* SignedCapsulePkg Universal: Init local variables before using themHao Wu2016-11-183-0/+9
| | | | | | | Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* SignedCapsulePkg IniParsingLib: ASSERT to ensure 'Value' is not NULLHao Wu2016-11-181-0/+4
| | | | | | | | | | | | Function GetStringFromDataFile() ensures its fourth (output) parameter will not be NULL when the return status is EFI_SUCCESS. This commit adds ASSERT as warnings for the case that will not happen. Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* SignedCapsulePkg/CapsulePkg.dsc: Add capsule related component.Jiewen Yao2016-11-111-0/+210
| | | | | | | | | | | | | | | Add capsule related component to check build. Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Tested-by: Michael D Kinney <michael.d.kinney@intel.com>
* SignedCapsulePkg/RecoveryModuleLoadPei: Add RecoveryModuleLoadPei.Jiewen Yao2016-11-086-0/+1125
| | | | | | | | | | | | | | | | | | | | | | | | | | RecoveryModuleLoadPei supports recovery system firmware via FMP capsule. RecoveryModuleLoadPei produces EFI_PEI_RECOVERY_MODULE_PPI. It is invoked by DxeIpl in recovery boot mode. LoadRecoveryCapsule() will scan all possible gEfiPeiDeviceRecoveryModulePpiGuid and get EDKII system FMP capsule there. LoadRecoveryCapsule() will perform the FMP authentication and version check. If and only if the FMP authentication passes, and EDKII system FMP capsule version is equal to the current system firmware Version, the recovery will be performed. Or this capsule image is discard. Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Tested-by: Michael Kinney <michael.d.kinney@intel.com>
* SignedCapsulePkg/SystemFirmwareUpdate: Add SystemFirmwareUpdate.Jiewen Yao2016-11-0811-0/+2017
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SystemFirmwareUpdate supports update system firmware via UEFI FMP capsule. SystemFirmwareReportDxe.inf can be included in system BIOS. It is a lightweight FMP protocol implementation and it only reports FMP information, so that ESRT table can report the system firmware information. SetImage() will dispatch the driver FV in the EDKII system FMP image (SystemFirmwareUpdateDxe), then pass thru the SetImage() request to latter. SystemFirmwareUpdateDxe.inf can be included in EDKII system capsule image. It is a full feature FMP protocol implementation and supports SetImage(). It can be used to update the system firmware. SystemFirmwareUpdateDxe.inf can also be included in system firmware. If so SystemFirmwareReportDxe.inf is not needed. SystemFirmwareUpdateDxe SetImage() will perform the FMP authentication and version check. If and only if the FMP authentication passes, and new EDKII system capsule version is no less than current system firmware LowestSupportedVersion, the system firmware will be updated. Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Tested-by: Michael Kinney <michael.d.kinney@intel.com>
* SignedCapsulePkg/PlatformFlashAccessLib: Add NULL instance.Jiewen Yao2016-11-083-0/+112
| | | | | | | | | | | | | | | Add NULL instance to pass build. Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Tested-by: Michael Kinney <michael.d.kinney@intel.com>
* SignedCapsulePkg/EdkiiSystemCapsuleLib: Add EdkiiSystemCapsuleLib.Jiewen Yao2016-11-083-0/+754
| | | | | | | | | | | | | | | | This library is used to abstract the action for EDKII system FMP capsule, such as extracting a component from capsule, or authenticate the capsule. Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Tested-by: Michael Kinney <michael.d.kinney@intel.com>
* SignedCapsulePkg/IniParsingLib: Add InitParsingLib instance.Jiewen Yao2016-11-083-0/+1485
| | | | | | | | | | | | | | | | | | | This library is used to parse the INI configuration file. The INI configuration file is used in EDKII capsule image to describe the capsule information. Detail format is documented in header file. Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Tested-by: Michael Kinney <michael.d.kinney@intel.com>
* SignedCapsulePkg/CapsulePkg.dec: Add capsule related definition.Jiewen Yao2016-11-081-0/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Add capsule related GUID. EdkiiSystemFmpCapsule 2) Add capsule related library. EdkiiSystemCapsuleLib IniParsingLib PlatformFlashAccessLib 3) Add EDKII system capsule related DynamicEx PCD PcdEdkiiSystemFirmwareImageDescriptor PcdEdkiiSystemFirmwareFileGuid NOTE: We use DynamicEx here because the update driver may be in the capsule FMP, instead of system firmware. The update driver MUST use the PCD info produced system firmware. 4) Add Test key file PCD These PCDs indicate the GUID of FFS which contains test key file. Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Tested-by: Michael Kinney <michael.d.kinney@intel.com>
* SignedCapsulePkg/Include: Add PlatformFlashAccessLib header.Jiewen Yao2016-11-081-0/+57
| | | | | | | | | | | | | | | | | This library is used to abstract platform flash access. This library is consumed by a capsule update module. It may cover SystemFirmware region and/or non-SystemFirmware region. Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Tested-by: Michael Kinney <michael.d.kinney@intel.com>
* SignedCapsulePkg/Include: Add IniParsingLib header.Jiewen Yao2016-11-081-0/+166
| | | | | | | | | | | | | | | | | | | This library is used to parse the INI configuration file. The INI configuration file is used in EDKII capsule image to describe the capsule information. Detail format is documented in header file. Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Tested-by: Michael Kinney <michael.d.kinney@intel.com>
* SignedCapsulePkg/Include: Add EdkiiSystemCapsuleLib definition.Jiewen Yao2016-11-081-0/+154
| | | | | | | | | | | | | | | | This library is used to abstract the action for EDKII system FMP capsule, such as extracting a component from capsule, or authenticate the capsule. Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Tested-by: Michael Kinney <michael.d.kinney@intel.com>
* SignedCapsulePkg/Include: Add EDKII system FMP capsule header.Jiewen Yao2016-11-081-0/+151
| | | | | | | | | | | | | | | | Add EDKII system FMP capsule header file. This describes the EDKII system FMP capsule format. Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Tested-by: Michael Kinney <michael.d.kinney@intel.com>
* SignedCapsulePkg: Add license file.Jiewen Yao2016-11-082-0/+243
Add license file for SignedCapsulePkg. This package contains sample drivers to do system firmware update and recovery. It also includes a capsule library to support system FMP and device FMP. Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Tested-by: Michael Kinney <michael.d.kinney@intel.com>