]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
7 years agoMdeModulePkg/DxeCapsuleLibNull: Add ProcessCapsules() interface.
Jiewen Yao [Wed, 21 Sep 2016 01:54:58 +0000 (09:54 +0800)]
MdeModulePkg/DxeCapsuleLibNull: Add ProcessCapsules() interface.

Add ProcessCapsules() interface for DxeCapsuleLibNull.

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>
7 years agoMdeModulePkg/FmpAuthenticationLibNull: Add NULL instance FMP.
Jiewen Yao [Wed, 21 Sep 2016 01:46:32 +0000 (09:46 +0800)]
MdeModulePkg/FmpAuthenticationLibNull: Add NULL instance FMP.

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>
7 years agoMdeModulePkg/MdeModulePkg.dec: Add capsule related definition.
Jiewen Yao [Wed, 21 Sep 2016 02:13:20 +0000 (10:13 +0800)]
MdeModulePkg/MdeModulePkg.dec: Add capsule related definition.

1) Add capsule related library.
   FmpAuthenticationLib
2) Add capsule related status code PCD.
   PcdStatusCodeSubClassCapsule
   PcdCapsuleStatusCodeProcessCapsulesBegin
   PcdCapsuleStatusCodeProcessCapsulesEnd
   PcdCapsuleStatusCodeUpdatingFirmware
   PcdCapsuleStatusCodeUpdateFirmwareSuccess
   PcdCapsuleStatusCodeUpdateFirmwareFailed
   PcdCapsuleStatusCodeResettingSystem
3) Add capsule status variable PCD - CapsuleMax value.
   PcdCapsuleMax
4) Add system FMP indicator PCD - used by ESRT.
   PcdSystemFmpCapsuleImageTypeIdGuid
5) Add PcdTestKeyUsed PCD.
This PCD can be set by platform to indicate if there is any
test key used in current BIOS, such as recovery key,
or capsule update key.
Then the generic UI may consume this PCD to show warning information.
Other platform driver may also consume this PCD to know such info,
and report it via platform specific way.

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>
7 years agoMdeModulePkg/CapsuleLib: Add ProcessCapsules() API.
Jiewen Yao [Wed, 21 Sep 2016 01:42:40 +0000 (09:42 +0800)]
MdeModulePkg/CapsuleLib: Add ProcessCapsules() API.

ProcessCapsules() API can be used by platform BDS to process all capsules.

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>
7 years agoMdeModulePkg/Include: Add FmpAuthenticationLib header.
Jiewen Yao [Wed, 21 Sep 2016 01:27:10 +0000 (09:27 +0800)]
MdeModulePkg/Include: Add FmpAuthenticationLib header.

This library is used to authenticate a UEFI defined FMP 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>
7 years agoBaseTools/VfrCompile/Pccts: Make assignment operator not returning void
Hao Wu [Mon, 10 Oct 2016 12:53:22 +0000 (20:53 +0800)]
BaseTools/VfrCompile/Pccts: Make assignment operator not returning void

The assignment operators for class ANTLRTokenPtr return void in current
code.

This commit makes them return the reference to the object just like
primitive types do.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/VfrCompile/Pccts: Add virtual destructor for class DLGInputStream
Hao Wu [Mon, 10 Oct 2016 12:40:38 +0000 (20:40 +0800)]
BaseTools/VfrCompile/Pccts: Add virtual destructor for class DLGInputStream

Class DLGInputStream defined in DLexerBase.h has a virtual method but no
virtual destructor.

This commit add an empty virtual destructor to avoid potential
memory/resource leak when an object of a class derived from class
DLGInputStream is deleted through a pointer to the DLGInputStream class.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/VolInfo: Add definitions for command format strings
Hao Wu [Sat, 8 Oct 2016 12:53:48 +0000 (20:53 +0800)]
BaseTools/VolInfo: Add definitions for command format strings

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/VfrCompile: Explicitly state format string for DebugMsg()
Hao Wu [Sat, 8 Oct 2016 12:44:51 +0000 (20:44 +0800)]
BaseTools/VfrCompile: Explicitly state format string for DebugMsg()

For calls to API DebugMsg(), explicitly state format string as "%s" when
the given variable list is a sting.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/VolInfo: Provide string width in '%s' specifier in format string
Hao Wu [Tue, 11 Oct 2016 08:08:16 +0000 (16:08 +0800)]
BaseTools/VolInfo: Provide string width in '%s' specifier in format string

String width is not specified for '%s' specifier in the format string for
scanf functions.

This commit now specifies the string length for '%s' in format strings
according to the size of receiving buffers.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/GenVtf: Provide string width in '%s' specifier in format string
Hao Wu [Sat, 8 Oct 2016 07:28:21 +0000 (15:28 +0800)]
BaseTools/GenVtf: Provide string width in '%s' specifier in format string

String width is not specified for '%s' specifier in the format string for
scanf functions.

This commit now specifies the string length for '%s' in format strings
according to the size of receiving buffers.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/VolInfo: Fix file handles not being closed
Hao Wu [Tue, 11 Oct 2016 07:57:13 +0000 (15:57 +0800)]
BaseTools/VolInfo: Fix file handles not being closed

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/TianoCompress: Fix file handles not being closed
Hao Wu [Tue, 11 Oct 2016 07:56:40 +0000 (15:56 +0800)]
BaseTools/TianoCompress: Fix file handles not being closed

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/LzmaCompress: Fix file handles not being closed
Hao Wu [Tue, 11 Oct 2016 07:51:09 +0000 (15:51 +0800)]
BaseTools/LzmaCompress: Fix file handles not being closed

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/GenVtf: Fix file handles not being closed
Hao Wu [Tue, 11 Oct 2016 07:50:10 +0000 (15:50 +0800)]
BaseTools/GenVtf: Fix file handles not being closed

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/GenFv: Fix file handles not being closed
Hao Wu [Tue, 11 Oct 2016 07:47:55 +0000 (15:47 +0800)]
BaseTools/GenFv: Fix file handles not being closed

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/GenCrc32: Fix file handles not being closed
Hao Wu [Tue, 11 Oct 2016 07:47:02 +0000 (15:47 +0800)]
BaseTools/GenCrc32: Fix file handles not being closed

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/GenBootSector: Fix file handles not being closed
Hao Wu [Tue, 11 Oct 2016 07:46:18 +0000 (15:46 +0800)]
BaseTools/GenBootSector: Fix file handles not being closed

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/EfiRom: Fix file handles not being closed
Hao Wu [Fri, 30 Sep 2016 02:41:26 +0000 (10:41 +0800)]
BaseTools/EfiRom: Fix file handles not being closed

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/VolInfo: Fix potential memory leak
Hao Wu [Tue, 11 Oct 2016 07:27:55 +0000 (15:27 +0800)]
BaseTools/VolInfo: Fix potential memory leak

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/VfrCompile: Fix potential memory leak
Hao Wu [Tue, 11 Oct 2016 07:25:32 +0000 (15:25 +0800)]
BaseTools/VfrCompile: Fix potential memory leak

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/TianoCompress: Fix potential memory leak
Hao Wu [Tue, 11 Oct 2016 07:24:15 +0000 (15:24 +0800)]
BaseTools/TianoCompress: Fix potential memory leak

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/Split: Fix potential memory and resource leak
Hao Wu [Tue, 11 Oct 2016 07:23:12 +0000 (15:23 +0800)]
BaseTools/Split: Fix potential memory and resource leak

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/GenVtf: Fix potential memory leak
Hao Wu [Tue, 11 Oct 2016 07:18:32 +0000 (15:18 +0800)]
BaseTools/GenVtf: Fix potential memory leak

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/GenSec: Fix potential memory leak
Hao Wu [Tue, 11 Oct 2016 07:09:37 +0000 (15:09 +0800)]
BaseTools/GenSec: Fix potential memory leak

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/GenPage: Fix potential memory leak
Hao Wu [Tue, 11 Oct 2016 07:08:17 +0000 (15:08 +0800)]
BaseTools/GenPage: Fix potential memory leak

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/GenFv: Fix potential memory leak
Hao Wu [Tue, 11 Oct 2016 05:57:07 +0000 (13:57 +0800)]
BaseTools/GenFv: Fix potential memory leak

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/EfiRom: Fix potential memory leak
Hao Wu [Tue, 11 Oct 2016 05:56:20 +0000 (13:56 +0800)]
BaseTools/EfiRom: Fix potential memory leak

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/C/Common: Fix potential memory leak
Hao Wu [Wed, 28 Sep 2016 03:18:12 +0000 (11:18 +0800)]
BaseTools/C/Common: Fix potential memory leak

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/VfrCompile: Remove unused local variables
Hao Wu [Wed, 28 Sep 2016 01:46:34 +0000 (09:46 +0800)]
BaseTools/VfrCompile: Remove unused local variables

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/VfrCompile: Avoid freeing freed memory in classes
Hao Wu [Tue, 27 Sep 2016 05:43:32 +0000 (13:43 +0800)]
BaseTools/VfrCompile: Avoid freeing freed memory in classes

For classes that contain dynamically allocated data members, copy
constructor and assignment operator should be implemented or both
operations should be prohibited to avoid freeing freed memory caused by
shallow copy.

This commit declares both copy constructor and assignment operator as
'private' for classes that contain dynamically allocated data members.
This will prevent freeing already freed memory.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/VfrCompile: Add assignment operator definition for some classes
Hao Wu [Tue, 27 Sep 2016 05:41:50 +0000 (13:41 +0800)]
BaseTools/VfrCompile: Add assignment operator definition for some classes

For class that defines the copy constructor, it is better to add the
assignment operator definition as well.

This commit adds the definition for assignment operator for the classes
with the copy constructor defined.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/VfrCompile: Avoid freeing memory with mismatched functions
Hao Wu [Tue, 27 Sep 2016 05:40:58 +0000 (13:40 +0800)]
BaseTools/VfrCompile: Avoid freeing memory with mismatched functions

Memory allocated by operator new[] should be freed using delete[] to avoid
possible memory leak.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/VfrCompile: Add checks for user/file inputs
Hao Wu [Thu, 3 Nov 2016 06:47:48 +0000 (14:47 +0800)]
BaseTools/VfrCompile: Add checks for user/file inputs

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/GenFv: Add checks for user/file inputs
Hao Wu [Tue, 11 Oct 2016 03:13:41 +0000 (11:13 +0800)]
BaseTools/GenFv: Add checks for user/file inputs

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/EfiRom: Add checks for user/file inputs
Hao Wu [Tue, 11 Oct 2016 03:08:41 +0000 (11:08 +0800)]
BaseTools/EfiRom: Add checks for user/file inputs

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/VfrCompile: Add checks for array access
Hao Wu [Tue, 11 Oct 2016 03:21:31 +0000 (11:21 +0800)]
BaseTools/VfrCompile: Add checks for array access

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/TianoCompress: Add checks for array access
Hao Wu [Tue, 11 Oct 2016 03:17:46 +0000 (11:17 +0800)]
BaseTools/TianoCompress: Add checks for array access

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/C/Common: Add checks for array access
Hao Wu [Tue, 27 Sep 2016 05:28:33 +0000 (13:28 +0800)]
BaseTools/C/Common: Add checks for array access

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/GenVtf: Fix parameter format mismatch in scanf functions
Hao Wu [Tue, 11 Oct 2016 03:04:13 +0000 (11:04 +0800)]
BaseTools/GenVtf: Fix parameter format mismatch in scanf functions

According to MSDN https://msdn.microsoft.com/en-us/library/6ttkkkhh.aspx

Format specification '%x' for scanf expects type 'int *', modify the type
of the relating variable to 'int' to keep them matched.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/GenFw: Fix parameter format mismatch in scanf functions
Hao Wu [Tue, 11 Oct 2016 03:03:48 +0000 (11:03 +0800)]
BaseTools/GenFw: Fix parameter format mismatch in scanf functions

According to MSDN https://msdn.microsoft.com/en-us/library/6ttkkkhh.aspx

Format specification '%X' for scanf expects type 'int *', modify the type
of the relating variable to 'int' to keep them matched.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/GenFv: Fix parameter format mismatch in scanf functions
Hao Wu [Tue, 11 Oct 2016 03:03:24 +0000 (11:03 +0800)]
BaseTools/GenFv: Fix parameter format mismatch in scanf functions

According to MSDN https://msdn.microsoft.com/en-us/library/6ttkkkhh.aspx &
https://msdn.microsoft.com/en-us/library/xdb9w69d.aspx

Format specification '%llx' for scanf expects type 'long long *', modify
the type of the relating variable to 'long long' to keep them matched.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/C/Common: Fix parameter format mismatch in scanf functions
Hao Wu [Thu, 22 Sep 2016 01:57:20 +0000 (09:57 +0800)]
BaseTools/C/Common: Fix parameter format mismatch in scanf functions

According to MSDN https://msdn.microsoft.com/en-us/library/6ttkkkhh.aspx

Format specification '%x' for scanf expects type 'int *', modify the type
of the relating variable to 'int' to keep them matched.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/VolInfo: Fix parameter format mismatch in printf functions
Hao Wu [Tue, 11 Oct 2016 03:01:07 +0000 (11:01 +0800)]
BaseTools/VolInfo: Fix parameter format mismatch in printf functions

Format specification '%ls' for printf expects type 'wchar_t *', cast the
type of the parameter to 'wchar_t *' to keep them matched.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/GenBootSector: Fix parameter format mismatch in printf functions
Hao Wu [Mon, 10 Oct 2016 01:35:05 +0000 (09:35 +0800)]
BaseTools/GenBootSector: Fix parameter format mismatch in printf functions

The return value of GetLastError() API is 32-bit unsigned integer, change
the relating format specification from '%x' to '%lx' to keep them matched.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/VfrCompile: Initialize local variables before being used
Hao Wu [Tue, 11 Oct 2016 02:56:20 +0000 (10:56 +0800)]
BaseTools/VfrCompile: Initialize local variables before being used

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/TianoCompress: Initialize local variables before being used
Hao Wu [Thu, 22 Sep 2016 01:47:58 +0000 (09:47 +0800)]
BaseTools/TianoCompress: Initialize local variables before being used

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/VolInfo: Avoid possible NULL pointer dereference
Hao Wu [Tue, 11 Oct 2016 02:40:49 +0000 (10:40 +0800)]
BaseTools/VolInfo: Avoid possible NULL pointer dereference

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/VfrCompile: Avoid possible NULL pointer dereference
Hao Wu [Tue, 11 Oct 2016 02:33:17 +0000 (10:33 +0800)]
BaseTools/VfrCompile: Avoid possible NULL pointer dereference

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/TianoCompress: Avoid possible NULL pointer dereference
Hao Wu [Tue, 11 Oct 2016 02:30:49 +0000 (10:30 +0800)]
BaseTools/TianoCompress: Avoid possible NULL pointer dereference

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/GenVtf: Avoid possible NULL pointer dereference
Hao Wu [Tue, 11 Oct 2016 02:25:34 +0000 (10:25 +0800)]
BaseTools/GenVtf: Avoid possible NULL pointer dereference

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/GenSec: Avoid possible NULL pointer dereference
Hao Wu [Tue, 11 Oct 2016 02:22:13 +0000 (10:22 +0800)]
BaseTools/GenSec: Avoid possible NULL pointer dereference

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/GenPage: Avoid possible NULL pointer dereference
Hao Wu [Tue, 11 Oct 2016 02:21:01 +0000 (10:21 +0800)]
BaseTools/GenPage: Avoid possible NULL pointer dereference

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/GenFw: Avoid possible NULL pointer dereference
Hao Wu [Tue, 11 Oct 2016 02:20:14 +0000 (10:20 +0800)]
BaseTools/GenFw: Avoid possible NULL pointer dereference

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/GenFv: Avoid possible NULL pointer dereference
Hao Wu [Tue, 11 Oct 2016 02:14:22 +0000 (10:14 +0800)]
BaseTools/GenFv: Avoid possible NULL pointer dereference

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/GenFfs: Avoid possible NULL pointer dereference
Hao Wu [Tue, 11 Oct 2016 02:13:26 +0000 (10:13 +0800)]
BaseTools/GenFfs: Avoid possible NULL pointer dereference

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/EfiRom: Avoid possible NULL pointer dereference
Hao Wu [Tue, 11 Oct 2016 02:06:50 +0000 (10:06 +0800)]
BaseTools/EfiRom: Avoid possible NULL pointer dereference

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools/C/Common: Avoid possible NULL pointer dereference
Hao Wu [Tue, 20 Sep 2016 12:53:31 +0000 (20:53 +0800)]
BaseTools/C/Common: Avoid possible NULL pointer dereference

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoCorebootPayloadPkg: Fix typos in comments
Maurice Ma [Tue, 8 Nov 2016 06:44:01 +0000 (22:44 -0800)]
CorebootPayloadPkg: Fix typos in comments

- dirver -> driver
- futhure -> future

Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Prince Agyeman <prince.agyeman@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Maurice Ma <maurice.ma@intel.com>
7 years agoShellPkg/Ping6: Add a note in help for TargetIp
hegdenag [Mon, 7 Nov 2016 08:40:48 +0000 (00:40 -0800)]
ShellPkg/Ping6: Add a note in help for TargetIp

'Ping6 TargetIp' is a valid command input but we bail out
when TargetIp is a link local address because we would want
the user to specify the NIC (via SourceIp) through which
he/she would want to ping to TargetIp. This patch updates
the help text to mention the same.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
7 years agoCryptoPkg: Fix typos in comments
Gary Lin [Wed, 19 Oct 2016 07:01:10 +0000 (15:01 +0800)]
CryptoPkg: Fix typos in comments

- intialized -> initialized
- componenet -> component
- compoents -> components
- FAlSE -> FALSE
- responsiblity -> responsibility
- validility -> validity
- procudure -> procedure
- pamameter -> parameter
- randome -> random
- buiild -> build

Cc: Ting Ye <ting.ye@intel.com>
Cc: Qin Long <qin.long@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Qin Long <qin.long@intel.com>
7 years agoShellPkg/reset: Support "-fwui" flag
Chen A Chen [Thu, 3 Nov 2016 07:20:48 +0000 (15:20 +0800)]
ShellPkg/reset: Support "-fwui" flag

The patch adds "-fwui" support to reset command which is newly added
to Shell 2.2 spec.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
7 years agoEdk2Setup.bat: Fix build errors from VS tools PREFIX ENV missing
Cinnamon Shia [Fri, 4 Nov 2016 02:19:46 +0000 (10:19 +0800)]
Edk2Setup.bat: Fix build errors from VS tools PREFIX ENV missing

BaseTools/set_vsprefix_envs.bat is introduced for setting the PREFIX ENV
of VS tools in tools_def.template.
For example:

DEFINE VS2015_BIN      = ENV(VS2015_PREFIX)Vc\bin
DEFINE VS2015_DLL      = ENV(VS2015_PREFIX)Common7\IDE;DEF(VS2015_BIN)
DEFINE VS2015_BINX64   = DEF(VS2015_BIN)\x86_amd64

The issue is EdkSetup.bat calls BaseTools\set_vsprefix_envs.bat but
Edk2Setup.bat does not.

Edk2Setup.bat should call BaseTools/set_vsprefix_envs.bat  to set up the
PREFIX ENV of VS tools.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
7 years agoBaseTools: Add the support for character '<' and '>' in the map file
Yonghong Zhu [Thu, 3 Nov 2016 03:16:29 +0000 (11:16 +0800)]
BaseTools: Add the support for character '<' and '>' in the map file

Current the regex for the symbol in the map file doesn't support the '<'
and '>' character, while user use Lambda Expression (C++11 feature), it
would generate the something like @V<lambda_xxx>@ in the map file which
cause build fail to parse the symbol in map file.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoOvmfPkg/ResetVector: Depend on PCD values of the page tables.
Marvin Häuser [Fri, 4 Nov 2016 13:32:39 +0000 (13:32 +0000)]
OvmfPkg/ResetVector: Depend on PCD values of the page tables.

Currently, the value of the page tables' address is hard-coded in the
ResetVector. This patch replaces these values with a PCD dependency.

A check for the size has been added to alert the developer to rewrite
the ASM according to the new size, if it has been changed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
7 years agoBaseTools/Pkcs7: Add readme.md
Jiewen Yao [Sat, 29 Oct 2016 12:51:56 +0000 (20:51 +0800)]
BaseTools/Pkcs7: Add readme.md

Add readme.md to describe the X.509 certificate generation.

Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@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>
7 years agoMdePkg/BaseMemoryLib*: check for zero length in ZeroMem ()
Ard Biesheuvel [Thu, 3 Nov 2016 17:29:01 +0000 (17:29 +0000)]
MdePkg/BaseMemoryLib*: check for zero length in ZeroMem ()

Unlike other string functions in this library, ZeroMem () does not
return early when the length of the input buffer is 0. So add the
same to ZeroMem () as well, for all implementations of BaseMemoryLib
living under MdePkg/

This fixes an issue with the ARM implementation of BaseMemoryLibOPtDxe,
whose InternalMemZeroMem code does not expect a length of 0, and always
writes at least a single byte.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools: Fix the Windows GCC Build Failure with too long path
Yonghong Zhu [Thu, 3 Nov 2016 07:44:17 +0000 (15:44 +0800)]
BaseTools: Fix the Windows GCC Build Failure with too long path

When path is too long, build tool will wrap them into resp.txt, then call
gcc @resp.txt. It will cause windows GCC build failure, because resp.txt
still uses windows directory separator \. This patch change the \ to /.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoMdePkg/BaseLib: Move CHAR_NULL definition to Base.h in BaseLib
Song, BinX [Thu, 3 Nov 2016 02:33:20 +0000 (10:33 +0800)]
MdePkg/BaseLib: Move CHAR_NULL definition to Base.h in BaseLib

- Required unicode control chars -> Null character
- Remove CHAR_NULL definition in SimpleTextIn.h
- https://bugzilla.tianocore.org/show_bug.cgi?id=172

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Bell Song <binx.song@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoIntelFrameworkModulePkg/BootMaint: Show "Change Boot order" page correctly
Dandan Bi [Fri, 28 Oct 2016 01:34:51 +0000 (09:34 +0800)]
IntelFrameworkModulePkg/BootMaint: Show "Change Boot order" page correctly

Some boot options may be deleted in the "Delete Boot Option page",
But the data BootOptionOrder in BmmFakeNvData may not be updated.
So when user enter the "Change Boot Order" page, we should not always
get the BootOptionOrder in BmmFakeNvData, it will result in incorrect
UI behaviors. When the Boot Options have been saved,
we should get the BootOptionOrder through function GetBootOrder.

For driver option codes need to do the same change.

This patch is to fix the issue in bugzilla:
https://bugzilla.tianocore.org/show_bug.cgi?id=39

Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
7 years agoOvmfPkg/ResetVector: Remove the unused ASM ResetVector.
Marvin Häuser [Thu, 3 Nov 2016 21:40:27 +0000 (21:40 +0000)]
OvmfPkg/ResetVector: Remove the unused ASM ResetVector.

Remove the ResetVector.asm file as it is no longer referenced since
the switch to ResetVector.nasmb.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
7 years agoBaseTool/Pkcs7: Add TestRoot.cer.
Jiewen Yao [Fri, 30 Sep 2016 07:45:50 +0000 (15:45 +0800)]
BaseTool/Pkcs7: Add TestRoot.cer.

We add this binary data file for TestRoot.cer.
So that a platform may include this default file in FDF,
to check if the platform is using default test key,
or different production key.

Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
7 years agoMdeModulePkg/PCD: Fix PcdGetNextToken may get a wrong PCD token
Cinnamon Shia [Wed, 2 Nov 2016 02:40:34 +0000 (10:40 +0800)]
MdeModulePkg/PCD: Fix PcdGetNextToken may get a wrong PCD token

If there are two DynamicEx PCDs have the same PCD token number but
in different PCD token spaces, the PcdGetNextToken function may get
the wrong PCD token.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoMdeModulePkg/FrameBufferBltLib: Change module type to UEFI_DRIVER
Song, BinX [Wed, 2 Nov 2016 02:11:55 +0000 (10:11 +0800)]
MdeModulePkg/FrameBufferBltLib: Change module type to UEFI_DRIVER

- BASE -> UEFI_DRIVER
- https://bugzilla.tianocore.org/show_bug.cgi?id=173

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Bell Song <binx.song@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoEdkCompatibilityPkg/PrintLite: Fix ErrorPrint() wrong NULL char check
Song, BinX [Wed, 2 Nov 2016 02:09:26 +0000 (10:09 +0800)]
EdkCompatibilityPkg/PrintLite: Fix ErrorPrint() wrong NULL char check

- '\0' -> NULL
- https://bugzilla.tianocore.org/show_bug.cgi?id=47

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Bell Song <binx.song@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoUefiCpuPkg PeiCpuExceptionHandlerLib: Add the missing nasm files in INF
Liming Gao [Mon, 31 Oct 2016 05:27:19 +0000 (13:27 +0800)]
UefiCpuPkg PeiCpuExceptionHandlerLib: Add the missing nasm files in INF

All CpuExceptionHandlerLib library instances use nasm source files.

Cc: Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
7 years agoIntelFrameworkModulePkg LzmaDecompressLib: Update LZMA to new 16.04 version
Liming Gao [Thu, 27 Oct 2016 06:54:27 +0000 (14:54 +0800)]
IntelFrameworkModulePkg LzmaDecompressLib: Update LZMA to new 16.04 version

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
7 years agoMdeModulePkg LzmaDecompressLib: Update LZMA to new 16.04 version
Liming Gao [Thu, 27 Oct 2016 06:08:39 +0000 (14:08 +0800)]
MdeModulePkg LzmaDecompressLib: Update LZMA to new 16.04 version

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
7 years agoBaseTools LzmaCompress: Update LZMA to new 16.04 version
Liming Gao [Thu, 27 Oct 2016 06:50:54 +0000 (14:50 +0800)]
BaseTools LzmaCompress: Update LZMA to new 16.04 version

New version LZMA SDK improves the compression performance on windows OS,
and has no change on the compression ratio. I compress 8M FVMAIN image,
the compression time is reduced from 2.590s to 1.419s.

Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
7 years agoArmPkg/CpuDxe: set DmaBufferAlignment according to CWG
Ard Biesheuvel [Mon, 31 Oct 2016 15:43:49 +0000 (15:43 +0000)]
ArmPkg/CpuDxe: set DmaBufferAlignment according to CWG

The DmaBufferAlignment currently defaults to 4, which is dangerously
small and may result in lost data on platforms that perform non-coherent
DMA. So instead, take the CWG value from the cache info registers.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoCryptoPkg: Add PKCS5 PBKDF2 interface for password derivation.
Qin Long [Tue, 1 Nov 2016 02:38:36 +0000 (10:38 +0800)]
CryptoPkg: Add PKCS5 PBKDF2 interface for password derivation.

Add one new API (Pkcs5HashPassword) to provide PKCS#5 v2.0 PBKDF2
support (Password based encryption key derivation function, specified
in RFC 2898).
Also update the Cryptest utility to include the new API testing (with
the test vector from RFC6070).

Cc: Ting Ye <ting.ye@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long <qin.long@intel.com>
Reviewed-by: Ting Ye <ting.ye@intel.com>
7 years agoCryptoPkg: Add HMAC-SHA256 cipher support
Qin Long [Mon, 31 Oct 2016 07:43:48 +0000 (15:43 +0800)]
CryptoPkg: Add HMAC-SHA256 cipher support

Add new HMAC-SHA256 cipher support in CryptoPkg to meet more security
and industry requirements,

and update Cryptest utility to include new HMAC-SHA256 test case.

Cc: Ting Ye <ting.ye@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long <qin.long@intel.com>
Reviewed-by: Ting Ye <ting.ye@intel.com>
7 years agoCryptoPkg: Add xxxxHashAll APIs to facilitate the digest computation
Qin Long [Tue, 1 Nov 2016 02:25:30 +0000 (10:25 +0800)]
CryptoPkg: Add xxxxHashAll APIs to facilitate the digest computation

Add new xxxxHashAll APIs to facilitate the digest computation of blob
data. New APIs include: Md4HashAll(), Md5HashAll(), Sha1HashAll(),
Sha256HashAll(), Sha384HashAll(), and Sha512HashAll().

The corresponding test cases were added in Cryptest utility.

Cc: Ting Ye <ting.ye@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long <qin.long@intel.com>
Reviewed-by: Ting Ye <ting.ye@intel.com>
7 years agoBaseTools:introduce PREFIX env for VS tool path
Yonghong Zhu [Fri, 28 Oct 2016 02:38:11 +0000 (10:38 +0800)]
BaseTools:introduce PREFIX env for VS tool path

This patch introduce PREFIX env for VS tool path for tools_def.template
file.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools: Update toolsetup.bat to call the set_vsprefix_envs.bat
Yonghong Zhu [Fri, 28 Oct 2016 02:37:23 +0000 (10:37 +0800)]
BaseTools: Update toolsetup.bat to call the set_vsprefix_envs.bat

Update toolsetup.bat to call the set_vsprefix_envs.bat to set the PREFIX
envs.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools: Add a new bat file to set PREFIX envs
Yonghong Zhu [Fri, 28 Oct 2016 02:34:24 +0000 (10:34 +0800)]
BaseTools: Add a new bat file to set PREFIX envs

Add set_vsprefix_envs.bat to set PREFIX envs as the default values if
they are not set.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools: Fix a bug for tooldef class not include the newly Env
Yonghong Zhu [Fri, 28 Oct 2016 01:09:48 +0000 (09:09 +0800)]
BaseTools: Fix a bug for tooldef class not include the newly Env

Prebuild script may update os.environ, but the tooldef class not include
the new ENV variables. so after the Launch prebuild script, we should
re-init the tooldef class to include the new ENV variables.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools: Fix a bug for ExpandMacros to support mixed case ENV var
Yonghong Zhu [Fri, 28 Oct 2016 01:24:52 +0000 (09:24 +0800)]
BaseTools: Fix a bug for ExpandMacros to support mixed case ENV var

os.environ contains all environment variables uppercase on Windows which
cause the key in the self.MacroDictionary is uppercase, but the real
variable name maybe mixed case, eg:WINSDK81x86, then we can't find the
variable in the self.MacroDictionary.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools: Fix the bug for OptionRom generation with different arch
Yonghong Zhu [Wed, 19 Oct 2016 09:09:43 +0000 (17:09 +0800)]
BaseTools: Fix the bug for OptionRom generation with different arch

The GenFds tool uses the same output for the same module with the
different arch, IA32 and X64 module will have the same output. The
solution is add the arch info in the output directory.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoUefiCpuPkg/LocalApicLib: Add EFIAPI for GetProcessorLocationByApicId()
Jeff Fan [Tue, 1 Nov 2016 02:48:18 +0000 (10:48 +0800)]
UefiCpuPkg/LocalApicLib: Add EFIAPI for GetProcessorLocationByApicId()

We need to add EFIAPI for all interface service including library API.

Contributed-under: TianoCore Contribution Agreement 1.0
Cc: Leo Duran <leo.duran@amd.com>
Cc: Michael Kinney <Michael.d.kinney@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Michael Kinney <Michael.d.kinney@intel.com>
Reviewed-by: Leo Duran <leo.duran@amd.com>
7 years agoUefiCpuPkg/LocalApicLib: Rename GetProcessorLocation()
Jeff Fan [Tue, 1 Nov 2016 02:45:37 +0000 (10:45 +0800)]
UefiCpuPkg/LocalApicLib: Rename GetProcessorLocation()

GetProcessorLocation() is too generic and will conflict with the API defined in
Galileo Board Software Package v1.0.0.

This update is just to rename GetProcessorLocation() to one specific name
GetProcessorLocationByApicId().

Contributed-under: TianoCore Contribution Agreement 1.0
Cc: Leo Duran <leo.duran@amd.com>
Cc: Michael Kinney <Michael.d.kinney@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Michael Kinney <Michael.d.kinney@intel.com>
Reviewed-by: Leo Duran <leo.duran@amd.com>
7 years agoIntelSiliconPkg: Add SMBIOS data HOB GUID
Mudusuru, Giri P [Mon, 31 Oct 2016 16:56:35 +0000 (00:56 +0800)]
IntelSiliconPkg: Add SMBIOS data HOB GUID

Add gIntelSmbiosDataHobGuid used to publish SMBIOS data from PEI phase.
The HOB data format will be same as SMBIOS spec define formats for
Types 0 to 127 and OEM defined types for 128 to 255.

Generic library or DXE driver can add SMBIOS records using this HOB(s).

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoMdeModulePkg/Xhci: Change short packet debug message to verbose level
Feng Tian [Mon, 31 Oct 2016 05:20:05 +0000 (13:20 +0800)]
MdeModulePkg/Xhci: Change short packet debug message to verbose level

Short Packet case is a normal case, we shouldn't print it as an error

Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoMdeModulePkg/AtaAtapiPassThru: update AtaStatusBlock after cmd exec
Feng Tian [Mon, 31 Oct 2016 05:46:08 +0000 (13:46 +0800)]
MdeModulePkg/AtaAtapiPassThru: update AtaStatusBlock after cmd exec

AhciDumpPortStatus doesn't fully populate all the fields of
AtaStatusBlock after completing command execution, which may bring
issue if someone depends on the return status.

Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoUefiCpuPkg: Move GetProcessorLocation() to LocalApicLib library
Leo Duran [Mon, 31 Oct 2016 19:42:57 +0000 (03:42 +0800)]
UefiCpuPkg: Move GetProcessorLocation() to LocalApicLib library

1) Remove SmmGetProcessorLocation() from PiSmmCpuDxeSmm driver.
2) Remove ExtractProcessorLocation() from MpInitLib library.
3) Add GetProcessorLocation() to BaseXApicLib and BaseXApicX2ApicLib.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leo Duran <leo.duran@amd.com>
Signed-off-by: Michael Kinney <Michael.d.kinney@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Michael Kinney <Michael.d.kinney@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
7 years agoShellPkg: print only valid characters for file overwrite prompt
Tapan Shah [Fri, 28 Oct 2016 19:48:59 +0000 (12:48 -0700)]
ShellPkg: print only valid characters for file overwrite prompt

When copy command prompts to overwrite an existing file, pressing
backspace continuously removes everything including the shell prompt.
So print only valid characters for file overwrite prompt.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
7 years agoNetworkPkg: Check for NULL pointer before dereference it.
Fu Siyuan [Mon, 31 Oct 2016 02:21:39 +0000 (10:21 +0800)]
NetworkPkg: Check for NULL pointer before dereference it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
7 years agoMdeModulePkg: Check for NULL pointer before dereference it.
Fu Siyuan [Mon, 31 Oct 2016 02:21:24 +0000 (10:21 +0800)]
MdeModulePkg: Check for NULL pointer before dereference it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
7 years agoNetworkPkg: Add error handling logic when using AllocateZeroPool
Zhang Lubo [Thu, 27 Oct 2016 07:36:00 +0000 (15:36 +0800)]
NetworkPkg: Add error handling logic when using AllocateZeroPool

Add error handling logic if failed to apply new memory.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-By: Fu Siyuan <siyuan.fu@intel.com>
7 years agoNetworkPkg: Fix the wrong Timer event check
Jiaxin Wu [Fri, 28 Oct 2016 06:32:02 +0000 (14:32 +0800)]
NetworkPkg: Fix the wrong Timer event check

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>