summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* FmpDevicePkg FmpDxe: Use Attributes to know whether reset is requiredStar Zeng2018-08-025-17/+10
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1040 Use Attributes to know whether reset is required and remove PcdFmpDeviceSystemResetRequired. Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* FmpDevicePkg FmpDxe: Check ImageIndex first before Image/ImageSizeStar Zeng2018-08-021-10/+9
| | | | | | | | | | It does not make sense to check the Image/ImageSize if ImageIndex has been invalid. Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* FmpDevicePkg FmpDxe: Add NULL check to return Value from GetVariable2Star Zeng2018-08-021-4/+4
| | | | | | | Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* FmpDevicePkg: Remove DisplayUpdateProgressLib mapping for FmpDxeStar Zeng2018-08-021-9/+5
| | | | | | | | | | | FmpDxe does not consume DisplayUpdateProgressLib, so remove the mapping in FmpDevicePkg.dsc. Also rename the ESRT GUIDs. Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* FmpDevicePkg FmpDxe: Fix typo "EFI_SECURITY_VIOLATIO"Star Zeng2018-08-021-4/+4
| | | | | | | | | Fix typo "EFI_SECURITY_VIOLATIO" to "EFI_SECURITY_VIOLATION". Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* FmpDevicePkg FmpDxe: Add EFI_ABORTED in retval of CheckTheImage()Star Zeng2018-08-021-0/+1
| | | | | | | Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* FmpDevicePkg FmpDxe: Check Progress!= NULL before calling Progress(100)Star Zeng2018-08-021-4/+6
| | | | | | | Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* FmpDevicePkg: Add DISABLE_NEW_DEPRECATED_INTERFACES build optionsStar Zeng2018-08-021-0/+3
| | | | | | | | | | Add DISABLE_NEW_DEPRECATED_INTERFACES build options to make sure no deprecated interface used in this package. Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* FmpDevicePkg: Remove IPFStar Zeng2018-08-026-6/+6
| | | | | | | Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* FmpDevicePkg FmpDxe: Return 0 when LSV check is not requiredStar Zeng2018-08-021-3/+6
| | | | | | | | | | | | | | Current code return 1 when LSV check is not required, but 1 LSV will make 0 Version capsule image update failed. 0 LSV is valid, this patch updates the code to return 0 when LSV check is not required We can see even the DEFAULT_LOWESTSUPPORTEDVERSION is 0. Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* FmpDevicePkg FmpDxe: Update function comment for FmpDxeEntryPointStar Zeng2018-08-021-1/+1
| | | | | | | | | FmpDxeEntryPoint is used by both FmpDxe and FmpDxeLib. Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* FmpDevicePkg: Add DSC file to build all package componentsKinney, Michael D2018-08-021-0/+134
| | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=922 Based on content from the following branch: https://github.com/Microsoft/MS_UEFI/tree/share/MsCapsuleSupport/MsCapsuleUpdatePkg Adds a DSC file that is used to verify that all of the FmpDevicePkg libraries and modules build without error. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* FmpDevicePkg: Add FmpDxe moduleKinney, Michael D2018-08-028-0/+2480
| | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=922 Based on content from the following branch: https://github.com/Microsoft/MS_UEFI/tree/share/MsCapsuleSupport/MsCapsuleUpdatePkg The FmpDxe directory contains 2 INF files. FmpDxe.inf is a DXE driver that is used in a platform to add a Firmware Management Protocol for firmware device that supports firmware updates. FmpDxeLib.inf is a NULL library instance with the exact same functionality as FmpDxe.inf, but allows the the Firmware Management Protocol feature to be added to an existing device driver. The FmpDxe component is intended to be used "as is" with no need for any device specific or platform specific changes. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* FmpDevicePkg: Add library instancesKinney, Michael D2018-08-029-0/+948
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=922 Based on content from the following branch: https://github.com/Microsoft/MS_UEFI/tree/share/MsCapsuleSupport/MsCapsuleUpdatePkg Add library instances for FmpDeviceLib, CapsuleUpdatePolicyLib, and FmpPayloadHeaderLib. Library Classes =============== * FmpDeviceLibNull - Non-functional template of the FmpDeviceLib that can be used as a starting point for an FmpDeviceLib for a specific firmware storage device. * CapsuleUpdatePolicyLibNull - Functional template of the CapsuleUpdatePolicyLib that can be used as a starting point of a platform specific implementation. * FmpPayloadHeaderLibV1 - Version 1 of the FmpPayloadHeaderLib. This library is indented to be used "as is" with no need for any device specific or platform specific changes. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* FmpDevicePkg: Add package, library classes, and PCDsKinney, Michael D2018-08-026-0/+855
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=922 Based on content from the following branch: https://github.com/Microsoft/MS_UEFI/tree/share/MsCapsuleSupport/MsCapsuleUpdatePkg Create FmpDevicePkg with library classes and PCDs used to customize the behavior of a Firmware Management Protocol instance. Library Classes =============== * FmpDeviceLib - Provides firmware device specific services to support updates of a firmware image stored in a firmware device. * CapsuleUpdatePolicyLib - Provides platform policy services used during a capsule update. * FmpPayloadHeaderLib - Provides services to retrieve values from a capsule's FMP Payload Header. The structure is not included in the library class. Instead, services are provided to retrieve information from the FMP Payload Header. If information is added to the FMP Payload Header, then new services may be added to this library class to retrieve the new information. PCDs set per module ==================== * PcdFmpDeviceSystemResetRequired - Indicates if a full system reset is required before a firmware update to a firmware devices takes effect * PcdFmpDeviceTestKeySha256Digest - The SHA-256 hash of a PKCS7 test key that is used to detect if a test key is being used to authenticate capsules. Test key detection is disabled by setting the value to {0}. * PcdFmpDeviceProgressColor - The color of the progress bar during a firmware update. * PcdFmpDeviceImageIdName - The Null-terminated Unicode string used to fill in the ImageIdName field of the EFI_FIRMWARE_IMAGE_DESCRIPTOR structure that is returned by the GetImageInfo() service of the Firmware Management Protocol for the firmware device. * PcdFmpDeviceBuildTimeLowestSupportedVersion - The build time value used to fill in the LowestSupportedVersion field of the EFI_FIRMWARE_IMAGE_DESCRIPTOR structure that is returned by the GetImageInfo() service of the Firmware Management Protocol. * PcdFmpDeviceProgressWatchdogTimeInSeconds - The time in seconds to arm a watchdog timer during the update of a firmware device. PCDs set per module or for entire platform ========================================== * PcdFmpDevicePkcs7CertBufferXdr - One or more PKCS7 certificates used to verify a firmware device capsule update image. * PcdFmpDeviceLockEventGuid - An event GUID that locks the firmware device when the event is signaled. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* BaseTools/Capsule: Support capsules without a payload headerKinney, Michael D2018-08-021-11/+23
| | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1028 Update --dump-info and --decode to show auth header information even if a payload header is not present. The --decode operation still fails if a payload header is not present. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools/Capsule: Prevent traceback during signing operationsKinney, Michael D2018-08-021-2/+0
| | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1046 https://bugzilla.tianocore.org/show_bug.cgi?id=1048 https://bugzilla.tianocore.org/show_bug.cgi?id=1050 Remove raise statements that generate Tracebacks that were only intended for development/debug. With the raise statements removed proper error messages are shown. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools/Capsule: Update file header with tool limitationsKinney, Michael D2018-08-021-0/+11
| | | | | | | | | | | | | | | | | Update file header to state that the tool does not support: * Multiple payloads * Drivers * Vendor code bytes https://bugzilla.tianocore.org/show_bug.cgi?id=1031 Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools/Capsule: Update help for --fw-version and --lsvKinney, Michael D2018-08-021-2/+2
| | | | | | | | | | | | | | | Update help to state that --fw-version and -=-lsv are required for encode operations that sign a payload. https://bugzilla.tianocore.org/show_bug.cgi?id=1029 Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools/Capsule: Do not support -o with --dump-infoKinney, Michael D2018-08-021-0/+4
| | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1025 Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools/Capsule: Fix CertType GUID byte orderKinney, Michael D2018-08-021-1/+1
| | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1024 Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools/Capsule: Remove support for PopulateSystemTableKinney, Michael D2018-08-021-5/+3
| | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1030 Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools/Capsule: Add max value checks to Capsule Generation toolsKinney, Michael D2018-08-021-0/+10
| | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1021 https://bugzilla.tianocore.org/show_bug.cgi?id=1022 https://bugzilla.tianocore.org/show_bug.cgi?id=1026 Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools GenerateCapsule: Change property to executable for LinuxStar Zeng2018-08-021-0/+0
| | | | | | | Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* BaseTools/Capsule: Add Capsule Generation ToolsKinney, Michael D2018-08-0211-0/+1310
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=945 Based on content from the following branch https://github.com/Microsoft/MS_UEFI/tree/share/beta/CapsuleTools * Convert C tools to Python * Add common python modules to: BaseTools/Source/Python/Common/Uefi/Capsule BaseTools/Source/Python/Common/Edk2/Capsule * Add GenerateCapsule.py to BaseTools/Source/Python/Capsule * Add Windows and Posix wrappers for GenerateCapsule.py usage: GenerateCapsule [-h] [-o OUTPUTFILE] (-e | -d | --dump-info) [--capflag {PersistAcrossReset,PopulateSystemTable,InitiateReset}] [--capoemflag CAPSULEOEMFLAG] [--guid GUID] [--hardware-instance HARDWAREINSTANCE] [--monotonic-count MONOTONICCOUNT] [--fw-version FWVERSION] [--lsv LOWESTSUPPORTEDVERSION] [--pfx-file SIGNTOOLPFXFILE] [--signer-private-cert OPENSSLSIGNERPRIVATECERTFILE] [--other-public-cert OPENSSLOTHERPUBLICCERTFILE] [--trusted-public-cert OPENSSLTRUSTEDPUBLICCERTFILE] [--signing-tool-path SIGNINGTOOLPATH] [--version] [-v] [-q] [--debug [0-9]] InputFile Generate a capsule. Copyright (c) 2018, Intel Corporation. All rights reserved. positional arguments: InputFile Input binary payload filename. optional arguments: -h, --help show this help message and exit -o OUTPUTFILE, --output OUTPUTFILE Output filename. -e, --encode Encode file -d, --decode Decode file --dump-info Display FMP Payload Header information --capflag {PersistAcrossReset,PopulateSystemTable,InitiateReset} Capsule flag can be PersistAcrossReset, or PopulateSystemTable or InitiateReset or not set --capoemflag CAPSULEOEMFLAG Capsule OEM Flag is an integer between 0x0000 and 0xffff. --guid GUID The FMP/ESRT GUID in registry format. Required for encode operations. --hardware-instance HARDWAREINSTANCE The 64-bit hardware instance. The default is 0x0000000000000000 --monotonic-count MONOTONICCOUNT 64-bit monotonic count value in header. Default is 0x0000000000000000. --fw-version FWVERSION The 32-bit version of the binary payload (e.g. 0x11223344 or 5678). --lsv LOWESTSUPPORTEDVERSION The 32-bit lowest supported version of the binary payload (e.g. 0x11223344 or 5678). --pfx-file SIGNTOOLPFXFILE signtool PFX certificate filename. --signer-private-cert OPENSSLSIGNERPRIVATECERTFILE OpenSSL signer private certificate filename. --other-public-cert OPENSSLOTHERPUBLICCERTFILE OpenSSL other public certificate filename. --trusted-public-cert OPENSSLTRUSTEDPUBLICCERTFILE OpenSSL trusted public certificate filename. --signing-tool-path SIGNINGTOOLPATH Path to signtool or OpenSSL tool. Optional if path to tools are already in PATH. --version show program's version number and exit -v, --verbose Turn on verbose output with informational messages printed, including capsule headers and warning messages. -q, --quiet Disable all messages except fatal errors. --debug [0-9] Set debug level Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Use pickle to replace cPickleYunhua Feng2018-08-021-3/+3
| | | | | | | | | | Use pickle to replace cPickle because of python3 removed cPickle Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: remove unused import threadYunhua Feng2018-08-021-1/+0
| | | | | | | | | | remove unused import thread Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* ShellPkg/UefiShellAcpiViewCommandLib: Fix VS2017 compilation errorsAlexeiFedorov2018-08-022-8/+8
| | | | | | | | | | | | | | This patch fixes VS2017 compilation errors for UefiShellAcpiViewCommandLib\Parsers\Gtdt\GtdtParser.c and UefiShellAcpiViewCommandLib\Parsers\Xsdt\XsdtParser.c reported in https://bugzilla.tianocore.org/show_bug.cgi?id=985 https://bugzilla.tianocore.org/show_bug.cgi?id=986 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* BaseTools/BinToPcd: Fix Python 2.7.x compatibility issueKinney, Michael D2018-08-011-1/+1
| | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1042 Convert Buffer to type bytearray before converting to a string of hex byte values so the type of items in Buffer is consistent for both Python 2.7.x and Python 3.x. Cc: YanYan Sun <yanyan.sun@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* ArmPkg: Add initial OpteeLib implementationSumit Garg2018-08-016-0/+124
| | | | | | | | | | | This is initial version of OP-TEE library that provides api's to communicate with OP-TEE OS (Trusted OS based on ARM TrustZone) via secure monitor calls. Currently it provides basic api to detect OP-TEE presence via UID matching. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* MdePkg FirmwareManagement.h: Fix code style issueStar Zeng2018-08-011-4/+4
| | | | | | | | | | | Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Cc: Hess Chen <hesheng.chen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
* MdeModulePkg DxeCapsuleLibFmp: Free HandleBuffer after it is usedStar Zeng2018-08-011-0/+4
| | | | | | | | 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: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* MdeModulePkg DxeCapsuleLib: Use Attr to know whether reset is requiredStar Zeng2018-08-012-40/+134
| | | | | | | | | | | | Current DxeCapsuleLibFmp always do reset for FMP capsule. Actually, the code should use Attributes from FMP descriptor to know whether reset is required or not. 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: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@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>
* ShellPkg/UefiShellAcpiViewCommandLib: Fix GCC build failureDandan Bi2018-08-012-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix following GCC build issues: 1. xxx/SratParser.c:127:47: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] {L"Proximity Domain [31:8]", 3, 9, L"0x%x", DumpSratApicProximity, ^ xxx/SratParser.c:127:47: note: (near initialization for 'SratApciSapicAffinityParser[6].PrintFormatter') 2. xxx\UefiShellAcpiViewCommandLib.c:66:14: error: 'Status' may be used uninitialized in this fu nction [-Werror=maybe-uninitialized] EFI_STATUS Status; ^ cc: Alexei Fedorov <Alexei.Fedorov@arm.com> cc: Ruiyu Ni <ruiyu.ni@intel.com> cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/UefiShellAcpiViewCommandLib: Fix VS2012 build failureDandan Bi2018-08-014-7/+7
| | | | | | | | | | | | | | | Fix following build error: UefiShellAcpiViewCommandLib\AcpiParser.c(519) : error C2308: concatenating mismatched strings Concatenating wide "ERROR: %a: Offset Mismatch for %s" with narrow "CurrentOffset = %d FieldOffset = %d" cc: Alexei Fedorov <Alexei.Fedorov@arm.com> cc: Ruiyu Ni <ruiyu.ni@intel.com> cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/UefiShellAcpiViewCommandLib: Fix VS2012 build failureDandan Bi2018-08-011-1/+1
| | | | | | | | | | | | | | | | | | | Fix following build error: xxx\AcpiParser.c(487) : error C2275: 'UINTN' : illegal use of this type as an expression xxx\ProcessorBind.h(224) : see declaration of 'UINTN' xxx\AcpiParser.c(487) : error C2146: syntax error : missing ';' before identifier 'OriginalAttribute' xxx\AcpiParser.c(487) : error C2065: 'OriginalAttribute' : undeclared identifier ...... cc: Alexei Fedorov <Alexei.Fedorov@arm.com> cc: Ruiyu Ni <ruiyu.ni@intel.com> cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* UefiCpuPkg/PiSmmCpuDxeSmm: Avoid possible NULL ptr dereferenceHao Wu2018-07-311-1/+1
| | | | | | | | | Within function GetUefiMemoryAttributesTable(), add a check to avoid possible null pointer dereference. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* MdePkg/SmmMemLib: Avoid possible NULL ptr dereferenceHao Wu2018-07-311-1/+1
| | | | | | | | | Within function SmmMemLibInternalGetUefiMemoryAttributesTable(), add a check to avoid possible null pointer dereference. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* BaseTools: Update build report for StructurePcd valueYunhua Feng2018-07-301-2/+12
| | | | | | | | | | | Update build report to display the structure Pcd value that from FDF file. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Fix build crash when fdf is empty fileYunhua Feng2018-07-301-0/+2
| | | | | | | | | | | | Fix build crash when fdf is empty file Fix https://bugzilla.tianocore.org/show_bug.cgi?id=912 Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* MdeModulePkg DxeCapsuleLibFmp: Fix typo "EsrtSyncFmp" to "SyncEsrtFmp"Star Zeng2018-07-281-1/+1
| | | | | | | | 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: Michael D Kinney <michael.d.kinney@intel.com>
* SecurityPkg:DSC: Fix 2 DSC build errorZhang, Chao B2018-07-281-2/+2
| | | | | | | | | | Error is caused by SHA384/SHA512 hash lib change in. Cc: Bi Dandan <dandan.bi@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhang, Chao B <chao.b.zhang@intel.com> Reviewed-by: Bi Dandan <dandan.bi@intel.com>
* SecurityPkg: HashLib: Add SHA384, SHA512 HashLibZhang, Chao B2018-07-278-1/+448
| | | | | | | | | | Add SHA384, 512 Hash lib support. Now only CryptoPkg support PEI/DXE version. Cc: Long Qin <qin.long@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhang Chao B <chao.b.zhang@intel.com> Reviewed-by: Long Qin <qin.long@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>