summaryrefslogtreecommitdiffstats
path: root/SignedCapsulePkg/Universal
Commit message (Collapse)AuthorAgeFilesLines
* SignedCapsulePkg: Apply uncrustify changesMichael Kubacki2021-12-078-643/+678
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the SignedCapsulePkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
* SignedCapsulePkg: Change OPTIONAL keyword usage styleMichael D Kinney2021-12-071-1/+1
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3760 Update all use of ', OPTIONAL' to ' OPTIONAL,' for function params. Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
* SignedCapsulePkg: Address NULL pointer dereference case.Vin Xue2020-07-161-18/+21
| | | | | | | | | | | | Original code GetFmpImageDescriptors for OriginalFmpImageInfoBuf pointer, if failed, return a NULL pointer. The OriginalFmpImageInfoBuf should not be NULL and the NULL pointer dereference case should be false positive. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Signed-off-by: Vin Xue <vinxue@outlook.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* SignedCapsulePkg: Add FMP Capsule Image Header extensionOleksiy Yakovlev2020-05-201-3/+14
| | | | | | | | | | | Add bitmask to structure which gives a binary-inspectable mechanism to determine if a capsule contains an authentication section or depex section. (UEFI 2.8 errata a, mantis 2026) Signed-off-by: Oleksiy Yakovlev <oleksiyy@ami.com> Signed-off-by: Wei6 Xu <wei6.xu@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* SignedCapsulePkg/Universal: Fix various typosAntoine Coeur2020-02-107-18/+18
| | | | | | | | | | | | Fix various typos in documentation, comments and debug strings. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Signed-off-by: Antoine Coeur <coeur@gmx.fr> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com> Message-Id: <20200207010831.9046-71-philmd@redhat.com>
* SignedCapsulePkg: Remove PcdFrameworkCompatibilitySupport usageDandan Bi2019-05-092-7/+4
| | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1464 Currently Framework compatibility support is not needed and PcdFrameworkCompatibilitySupport will be removed from edk2. So remove the usage of this PCD firstly. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Jiewen.yao@intel.com Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
* SignedCapsulePkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-0917-120/+17
| | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
* SignedCapsulePkg: Removing ipf which is no longer supported from edk2.Chen A Chen2018-09-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing rules for Ipf sources file: * Remove the source file which path with "ipf" and also listed in [Sources.IPF] section of INF file. * Remove the source file which listed in [Components.IPF] section of DSC file and not listed in any other [Components] section. * Remove the embedded Ipf code for MDE_CPU_IPF. Removing rules for Inf file: * Remove IPF from VALID_ARCHITECTURES comments. * Remove DXE_SAL_DRIVER from LIBRARY_CLASS in [Defines] section. * Remove the INF which only listed in [Components.IPF] section in DSC. * Remove statements from [BuildOptions] that provide IPF specific flags. * Remove any IPF sepcific sections. Removing rules for Dec file: * Remove [Includes.IPF] section from Dec. Removing rules for Dsc file: * Remove IPF from SUPPORTED_ARCHITECTURES in [Defines] section of DSC. * Remove any IPF specific sections. * Remove statements from [BuildOptions] that provide IPF specific flags. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: <Jiewen.yao@intel.com>
* SignedCapsulePkg: Remove redundant things in inf,.h and .c filesshenglei2018-08-204-31/+0
| | | | | | | | | | | | | | Two redundant library classes have been removed. The redundant function "IsSystemFmp" has been removed. https://bugzilla.tianocore.org/show_bug.cgi?id=1067 v2: Remove DxeServicesLib from SystemFirmwareUpdateDxe.inf. Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: shenglei <shenglei.zhang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* SignedCapsulePkg SystemFirmwareReportDxe: Try LocateProtocolStar Zeng2018-08-011-11/+18
| | | | | | | | | | | Try LocateProtocol after HandleProtocol fails to be compatible with old SystemFirmwareUpdateDxe. 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>
* SignedCapsulePkg RecoveryModuleLoadPei: Fix typo 'Press' to 'Process'Star Zeng2018-07-111-2/+2
| | | | | | | | | Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Ming Shao <ming.shao@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>
* SignedCapsulePkg/SystemFirmwareUpdateDxe: Fix ECC issuesDandan Bi2018-06-211-0/+5
| | | | | | | | | | | Make function comments align with functions. Cc: Star Zeng <star.zeng@intel.com> 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: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* SignedCapsulePkg/SystemFirmwareUpdateDxe: Use progress APIKinney, Michael D2018-06-081-23/+67
| | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=801 Use PlatformFlashWriteWithProgress() instead of PlatformFLashWrite() so the user can be informed of the progress as a capsule is used to update a firmware image in a 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 Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Star Zeng <star.zeng@intel.com>
* SignedCapsulePkg SystemFirmwareUpdate: Fix typo EFI_SECURITY_VIOLATIOStar Zeng2018-04-254-11/+11
| | | | | | | | | Fix typo EFI_SECURITY_VIOLATIO to EFI_SECURITY_VIOLATION. 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>
* SignedCapsulePkg SystemFirmwareUpdateDxe: Fix failure caused by d69d922Star Zeng2018-04-161-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>
* SignedCapsulePkg/SystemFirmwareReportDxe: Pass thru on same handleKinney, Michael D2018-04-111-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>
* SignedCapsulePkg/SystemFirmwareUpdateDxe: Single FMPKinney, Michael D2018-04-111-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>
* 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: 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/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: 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/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>