summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Application/CapsuleApp
Commit message (Collapse)AuthorAgeFilesLines
* MdeModulePkg: Add FMP Capsule Image Header extensionOleksiy Yakovlev2020-05-201-1/+4
| | | | | | | | | | 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: Liming Gao <liming.gao@intel.com>
* MdeModulePkg/Application: Fix various typosAntoine Coeur2020-02-102-3/+3
| | | | | | | | | | | | Fix various typos in documentation, comments and debug strings. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Antoine Coeur <coeur@gmx.fr> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com> Message-Id: <20200207010831.9046-11-philmd@redhat.com>
* MdeModulePkg/CapsuleApp: Enhance CapsuleApp for Fmp Capsule DependencyXu, Wei62020-01-191-1/+15
| | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2421 1. Enhance "CapsuleApp -P" to output the depex expression op-codes in the EFI_FIRMWARE_IMAGE_DESCRIPTOR. 2. Enhance Last Attempt Status String with a new string to describe the error LAST_ATTEMPT_STATUS_ERROR_UNSATISFIED_DEPENDENCIES. 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>
* MdeModulePkg/CapsuleApp: Improve comparisons in CapsuleOnDisk.cXu, Wei62019-08-151-1/+1
| | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2028 Non-Boolean comparisons should use a compare operator (==, !=, >, < >=, <=). Signed-off-by: Wei6 Xu <wei6.xu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg/CapsuleApp: Enhance Capsule-On-Disk related functions.Wei6 Xu2019-06-266-332/+323
| | | | | | | | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1840 1. Introduce an internal header file to put definitions in it. 2. Add missing '\n' in usage. 3. Fix the dead loop of CapsuleApp -L. 4. Fix the bug that CapsuleApp -OD cannot perform capsules in sub- folder. 5. Optimize the handling for option -NR and -OD to support both 'CapsuleApp <Capsule> -OD -NR' and 'CapsuleApp <Capsule> -NR -OD'. 6. Check if Capsule-On-Disk is supported by "OsIndicationsSupported" variable firstly before processing capsules. If not supported, prompt an error message and quit the process. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Chao B Zhang <chao.b.zhang@intel.com> Signed-off-by: Wei6 Xu <wei6.xu@intel.com> Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com> Acked-by: Hao A Wu <hao.a.wu@intel.com>
* Revert "Capsule-on-Disk entire PatchZhang, Chao B2019-06-213-77/+24
| | | | | | | | | | | | | | | | This reverts commit 0d4aa276d1f6e0cb9d71a7fb88b30c416ba6d5a3, 6470a43160183cd48cad8901c912a48811f18b13, fd7286089542ee7a98cfea00be45ceb3561e0b20, 7837d1249807b4248079699097bc993254235d7a, 6b32af2e105f9b5454a55b581f2dc365c5eb6397, 8636f70b5a763ed1c03b292708f9c5543e531ea9, f17935321a5b818a66e999632ef371b374b98f0c due to incorrect review process. Cc: Wei6 Xu <wei6.xu@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Zhang, Chao B <chao.b.zhang@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg/CapsuleApp: Enhance Capsule-On-Disk related functions.xuwei62019-06-203-24/+77
| | | | | | | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1840 1. Add missing '\n' in usage. 2. Fix the dead loop of CapsuleApp -L. 3. Fix the bug that CapsuleApp -OD cannot perform capsules in sub- folder. 4. Optimize the handling for option -NR and -OD to support both 'CapsuleApp <Capsule> -OD -NR' and 'CapsuleApp <Capsule> -NR -OD'. 5. Check if Capsule-On-Disk is supported by "OsIndicationsSupported" variable firstly before processing capsules. If not supported, prompt an error message and quit the process. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Chao B Zhang <chao.b.zhang@intel.com> Signed-off-by: Wei6 Xu <wei6.xu@intel.com> Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com> Acked-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-097-47/+7
| | | | | | | | | | | | | | | | | | | | | 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: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
* MdeModulePkg: Rename confusion function nameChen A Chen2019-02-251-1/+1
| | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1536 To avoid the confusion caused by function name, rename EfiBootManagerGetNextFullDevicePath to EfiBootManagerGetNextLoadOptionDevicePath. As an API function should add EFIAPI prefix for this function. Cc: Ray Ni <ray.ni@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* MdeModulePkg/CapsuleApp: Fix memory leak issue.Chen A Chen2019-02-131-27/+60
| | | | | | | | | | | | | | This issue is caused by FileInfoBuffer variable. This is a pointer array and each elements also pointer to a memory buffer that is allocated and returned by AllocateCopyPool function. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Cc: Zhang Chao B <chao.b.zhang@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* MdeModulePkg/CapsuleApp: Fix potential NULL pointer dereference issueChen A Chen2019-02-122-10/+18
| | | | | | | | | | | | | To avoid potential NULL pointer dereference issue. Initialize them at the beginning of the function. This patch is a supplement which was missed at e98212cb5d59fff8f385d9179ad7f1a3ce9cf215 commit. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* MdeModulePkg/CapsuleApp: Fix potential NULL pointer dereference issueChen A Chen2019-02-023-10/+29
| | | | | | | | | | | To avoid potential NULL pointer dereference issue. Initialize them at the beginning of the function. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg/CapsuleApp: Enhance CapsuleApp to support Capsule-on-DiskChen A Chen2019-01-313-17/+689
| | | | | | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1482 CapsuleApp is used for trigger capsule update. Add -OD option in CapsuleApp to support doing capsule update via storage. Add -F and -L options to support dumping information feature. Finish unit test for -F and -L options. Already verify this feature on Denlow platform, success to update capsule via hard disk with -OD option. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Cc: Zhang Chao B <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
* MdeModulePkg/CapsuleApp: Add functions to support Capsule-on-DiskChen A Chen2019-01-311-0/+808
| | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1482 This file provide some basic function to support Capsule-on-Disk. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Cc: Zhang Chao B <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
* MdeModulePkg CapsuleApp:Remove two redundant GuidsZhang, Shenglei2018-09-211-2/+0
| | | | | | | | | | | | | Remove two redundant Guids which are not used. They are gEfiCertTypeRsa2048Sha256Guid and gEfiCertPkcs7Guid.This is an improved version of https://bugzilla.tianocore.org/show_bug.cgi?id=1062 Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: shenglei <shenglei.zhang@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg CapsuleApp: Remove a redundant functionshenglei2018-08-211-31/+0
| | | | | | | | | | | | The function DumpImageAuthentication that is never called has been removed. https://bugzilla.tianocore.org/show_bug.cgi?id=1062 Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: shenglei <shenglei.zhang@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg: Remove redundant library classes and GUIDsshenglei2018-08-202-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some redundant library classes and GUIDs have been removed in inf, .c and .h files. https://bugzilla.tianocore.org/show_bug.cgi?id=1044 https://bugzilla.tianocore.org/show_bug.cgi?id=1045 https://bugzilla.tianocore.org/show_bug.cgi?id=1047 https://bugzilla.tianocore.org/show_bug.cgi?id=1049 https://bugzilla.tianocore.org/show_bug.cgi?id=1051 https://bugzilla.tianocore.org/show_bug.cgi?id=1052 https://bugzilla.tianocore.org/show_bug.cgi?id=1053 https://bugzilla.tianocore.org/show_bug.cgi?id=1054 https://bugzilla.tianocore.org/show_bug.cgi?id=1055 https://bugzilla.tianocore.org/show_bug.cgi?id=1056 https://bugzilla.tianocore.org/show_bug.cgi?id=1017 https://bugzilla.tianocore.org/show_bug.cgi?id=1035 https://bugzilla.tianocore.org/show_bug.cgi?id=1033 https://bugzilla.tianocore.org/show_bug.cgi?id=1012 https://bugzilla.tianocore.org/show_bug.cgi?id=1011 https://bugzilla.tianocore.org/show_bug.cgi?id=1062 v2: 1. Correct copyright year. 2. Fix alignment issue in AcpiPlatformDxe.inf. 3. Add DevicePathLib which is removed before in I2cHostDxe.inf. 4. Update NvmExpressPei.inf, NvmExpressPei.h, IScsiDxe.inf, IScsiDxe.inf, IScsiDxe.h, DxeMain.inf, DxeMain.h, PiSmmCore.inf and PiSmmCore.h for https://bugzilla.tianocore.org/show_bug.cgi?id=1062. v3: 1. Add https://bugzilla.tianocore.org/show_bug.cgi?id=1062 to the link list. 2. Remove DevicePathLib from I2cHostDxe.inf. 3. Update NvmExpressPei.inf, NvmExpressPei.h, UfsPciHcDxe.inf, UfsPciHcDxe.h, I2cHostDxe.inf, AtaBusDxe.inf, IScsiDxe.inf, IScsiDxe.h, DxeMain.inf, DxeMain.h, PiSmmCore.inf and PiSmmCore.h for https://bugzilla.tianocore.org/show_bug.cgi?id=1062. (Forget to add UfsPciHcDxe.inf, UfsPciHcDxe.h, AtaBusDxe.inf, and I2cHostDxe.inf previously.) Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: shenglei <shenglei.zhang@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg CapsuleApp: Check capsule header for -D and -N optionsStar Zeng2018-07-272-34/+90
| | | | | | | | | | | | Then meaningful error message can be shown when the input image is unexpected. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@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>
* MdeModulePkg CapsuleApp: Prompt info for -C optionStar Zeng2018-07-272-5/+14
| | | | | | | | | Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@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>
* MdeModulePkg CapsuleApp: Index need be decimal for -P GET optionStar Zeng2018-07-271-5/+8
| | | | | | | | | | | | Also adjust the help information to be not too long to be suitable for different display resolutions. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@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>
* MdeModulePkg CapsuleApp: Refine -N option help informationStar Zeng2018-07-271-1/+2
| | | | | | | | | | | | -N option is used to append a Capsule Header to an existing FMP capsule image with its ImageTypeId supported by the system. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@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>
* MdeModulePkg CapsuleApp: Fix -D failed to dump Nest FMP capsuleStar Zeng2018-07-271-1/+1
| | | | | | | | | Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@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>
* MdeModulePkg CapsuleApp: Fix VS2012 build failure caused by 5410502Star Zeng2018-07-271-10/+10
| | | | | | | | | | | | | | | | | | | | | | | The build failure is like below. xxx\CapsuleApp.c(868) : error C2275: 'EFI_GUID' : illegal use of this type as an expression xxx/UefiBaseType.h(29) : see declaration of 'EFI_GUID' xxx\CapsuleApp.c(868) : error C2146: syntax error : missing ';' before identifier 'ImageTypeId' xxx\CapsuleApp.c(868) : error C2065: 'ImageTypeId' : undeclared identifier xxx\CapsuleApp.c(869) : error C2275: 'UINTN' : illegal use of this type as an expression xxx\ProcessorBind.h(224) : see declaration of 'UINTN' xxx\CapsuleApp.c(869) : error C2146: syntax error : missing ';' before identifier 'ImageIndex' xxx\CapsuleApp.c(869) : error C2065: 'ImageIndex' : undeclared identifier Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Dandan Bi <dandan.bi@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: Dandan Bi <dandan.bi@intel.com>
* MdeModulePkg CapsuleApp: Use EFI_UNSUPPORTED for incorrect Argc caseStar Zeng2018-07-231-7/+8
| | | | | | | | | | | Align code to use EFI_UNSUPPORTED for all incorrect Argc cases. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@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>
* MdeModulePkg CapsuleApp: Check capsule header before using its FlagsStar Zeng2018-07-231-0/+38
| | | | | | | | | Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@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>
* MdeModulePkg CapsuleApp: Show clear message when option is unrecognizedStar Zeng2018-07-231-0/+7
| | | | | | | | | Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@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>
* MdeModulePkg CapsuleApp: Do not parse bits in CapsuleFlags of ESRTStar Zeng2018-07-231-3/+0
| | | | | | | | | | | | | | | | | | | | According to UEFI spec, only bits 0-15 of CapsuleFlags are meaningful and CapsuleGuid specific, CAPSULE_FLAGS_PERSIST_ACROSS_RESET CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE/CAPSULE_FLAGS_INITIATE_RESET defined in UEFI spec are in bits 16-31, they should not be parsed in CapsuleFlags of ESRT. CapsuleFlags The capsule flags field contains the CapsuleGuid flags (bits 0-15) as defined in the EFI_CAPSULE_HEADER that will be set in the capsule header. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@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>
* MdeModulePkg CapsuleApp: Fix memory leak in DumpFmpImage()Star Zeng2018-07-231-0/+2
| | | | | | | | | | | Image buffer should be freed after using. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@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>
* MdeModulePkg CapsuleApp: Check Arg count for -P GET optionStar Zeng2018-07-231-4/+15
| | | | | | | | | | | Also add help info for CapsuleApp -P GET option. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@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>
* MdeModulePkg CapsuleApp: Fix typo EFI_CAPSULE_RPORT_GUIDStar Zeng2018-07-131-1/+1
| | | | | | | | | Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@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>
* MdeModulePkg CapsuleApp: Refine -D option help informationStar Zeng2018-07-131-3/+3
| | | | | | | | | Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@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>
* MdeModulePkg CapsuleApp: Check Arg count for -D optionStar Zeng2018-07-131-0/+4
| | | | | | | | | Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@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>
* MdeModulePkg CapsuleApp: Fix NestedCapsuleHeader->Flags assigned wrongStar Zeng2018-07-111-1/+1
| | | | | | | | | | | | | (FwType == ESRT_FW_TYPE_DEVICEFIRMWARE) ? system : device should be (FwType == ESRT_FW_TYPE_SYSTEMFIRMWARE) ? system : device 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>
* MdeModulePkg CapsuleApp: Check Buffer against NULL before freeing itStar Zeng2018-05-081-2/+5
| | | | | | | | | | | If the capsule from command line is not present, Buffer will be random value when freeing it in DumpCapsule(), then ASSERT will happen or other memory pool may be freed. 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>
* MdeModulePkg/CapsuleApp: Center bitmap at bottom of screenMichael D Kinney2018-03-212-5/+61
| | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=907 When -G option is used to convert a BMP file to a UX capsule, the bitmap is centered horizontally and placed in the lower half of the screen below the boot logo. This matches examples shown in the following pages: https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/user-experience-for-uefi-firmware-updates https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/boot-screen-components Checks are also made to make sure the bitmap provided fits in the current GOP mode. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@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>
* MdeModulePkg/CapsuleApp: Fix logic bug in CleanGatherList()Michael D Kinney2018-03-211-2/+2
| | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=905 Fix pointer math when more than one capsule is passed to the CapsuleApp. Use the ContinuationPointer from the last array entry instead of the first array entry. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@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>
* MdeModulePkg CapsuleApp: Fix print info in BuildGatherList()Star Zeng2017-07-031-1/+1
| | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=614 Print (L"CapsuleApp: capsule data starts at 0x%X with size 0x%X\n", (UINTN) CapsuleBuffer, FileSize); It should use (UINTN) CapsuleBuffer[Index] and FileSize[Index] as parameter. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Cloud Wang <winggundum82@163.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* MdeModulePkg CapsuleApp: Fix mixed EOL format issueStar Zeng2017-05-111-1/+1
| | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg CapsuleApp: Add directory supportStar Zeng2017-04-143-302/+94
| | | | | | | | | | | | | | | | | Current CapsuleApp only supports input/output file from rootdirectory. If the CapsuleApp and related file are put into subdirectory, below message will be shown when running the CapsuleApp in shell. "CapsuleApp: capsule image (Capsule image file name) is not found." This patch is to add directory support for CapsuleApp by using shell protocol. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* MdeModulePkg CapsuleApp: Add -NR (no-reset) option supportStar Zeng2017-03-211-5/+23
| | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=388 Add -NR (no-reset) option support, once the option is specified, no reset will be trigger for the capsule with flag CAPSULE_FLAGS_PERSIST_ACROSS_RESET and no CAPSULE_FLAGS_INITIATE_RESET. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaofeng Wang <winggundum82@163.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* MdeModulePkg/CapsuleApp: Use StrToGuid in BaseLibRuiyu Ni2017-02-282-161/+6
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* MdeModulePkg/CapsuleApp: Dump capsule name in record.Jiewen Yao2016-12-231-8/+8
| | | | | | | | | | | | | According to UEFI spec, capsule report variable should include a null terminator for capsule name and capsule target, if they are not present. Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg/CapsuleApp: Fix Guid format issuesDandan Bi2016-12-201-9/+9
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* MdeModulePkg/CapsuleApp: Fix GUID/protocol format issuesDandan Bi2016-12-141-14/+14
| | | | | | | 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>
* MdeModulePkg: Make the comments align with the functionDandan Bi2016-12-142-8/+8
| | | | | | | 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>
* MdeModulePkg/CapsuleApp: add Internal for function name.Jiewen Yao2016-12-012-6/+6
| | | | | | | | | | To prevent potential build failure. Cc: Feng Tian <feng.tian@intel.com> Cc: Jeff Fan <jeff.fan@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg/CapsuleApp: Add Fmp->GetImage() support.Jiewen Yao2016-12-013-1/+411
| | | | | | | | | | | | | We add Fmp->GetImage() support in CapsuleApp. So that user may call Fmp->GetImage() in UEFI shell environment. This is useful to do unit test for FMP which supports GetImage(), or user wants to get current image, such as Microcode. Cc: Eric Dong <eric.dong@intel.com> Cc: Jeff Fan <jeff.fan@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
* MdeModulePkg CapsuleApp: ASSERT to ensure 'CapsuleIndex' is not NULLHao Wu2016-11-221-0/+2
| | | | | | | | | | | | Function GetVariable2() ensures its third (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>
* MdeModulePkg/CapsuleApp: remove unused definition.Jiewen Yao2016-11-151-3/+0
| | | | | | | | | | | | | remove EFI_CAPSULE_FROM_FILE_DIR remove EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED. no one uses them. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* MdeModulePkg/CapsuleApp: Add CapsuleApp application.Jiewen Yao2016-11-086-0/+2148
This CapsuleApp can help perform capsule update in UEFI shell environment. It can also dump capsule information, capsule status variable, ESRT and 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: Liming Gao <liming.gao@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Tested-by: Michael Kinney <michael.d.kinney@intel.com>