]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
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>
7 years agoMdeModulePkg: Fix the wrong Timer event check
Jiaxin Wu [Fri, 28 Oct 2016 06:31:30 +0000 (14:31 +0800)]
MdeModulePkg: 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>
7 years agoArmPlatformPkg/ArmVExpressFastBootDxe: eliminate deprecated string functions
Ard Biesheuvel [Tue, 25 Oct 2016 18:13:55 +0000 (19:13 +0100)]
ArmPlatformPkg/ArmVExpressFastBootDxe: eliminate deprecated string functions

Get rid of functions that are no longer available when defining
DISABLE_NEW_DEPRECATED_INTERFACES

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoArmPlatformPkg/ArmVExpressFastBootDxe: clean up code and comments
Ard Biesheuvel [Fri, 28 Oct 2016 15:10:16 +0000 (16:10 +0100)]
ArmPlatformPkg/ArmVExpressFastBootDxe: clean up code and comments

This module contains an implementation of the Android Fastboot Platform
protocol. So follow common Tianocore practice, and duplicate the per-method
comment blocks from the interface definition into the implementation.

In addition, let's make all methods and the procotol struct STATIC, given
that they are never referenced via external linkage.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
7 years agoArmPkg: remove LoadConstantXxx() asm macros
Ard Biesheuvel [Fri, 28 Oct 2016 11:41:11 +0000 (12:41 +0100)]
ArmPkg: remove LoadConstantXxx() asm macros

This is ancient cruft that is no longer used, so remove it.

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 agoArmPlatformPkg/PrePi RVCT: use relative reference to mSystemMemoryEnd
Ard Biesheuvel [Fri, 28 Oct 2016 11:38:51 +0000 (12:38 +0100)]
ArmPlatformPkg/PrePi RVCT: use relative reference to mSystemMemoryEnd

Bring the RVCT version of the PrePi entry point code in line with the
GCC version, by using a relative rather than an absolute reference to
the mSystemMemoryEnd variable.

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 agoArmPkg RVCT: add ADRL/LDRL macro equivalents
Ard Biesheuvel [Fri, 28 Oct 2016 11:36:19 +0000 (12:36 +0100)]
ArmPkg RVCT: add ADRL/LDRL macro equivalents

The GCC ARM builds have access to ADRL/LDRL macros that emit relative
symbol references, i.e., references that do not require fixing up at
load time (or FV generation time for XIP modules)

Implement equivalent functionality for RVCT: note that this does not
use movw/movt pairs, but the more compatible add/add/add or add/add/ldr
sequences (which Clang does not support, unfortunately, hence the use
of movw/movt for the GCC toolchain family)

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 agoIntelFsp2Pkg: Removing FSP Data Table
Satya Yarlagadda [Fri, 21 Oct 2016 00:45:55 +0000 (08:45 +0800)]
IntelFsp2Pkg: Removing FSP Data Table

FSP Base address is part of FSP_INFO_HEADER and we don't need additional
table to report the base address of FSP components. we expect Boot
loaders to parse the FSP INFO Header to get the base address. Also, this
the FSP_DATA_TABLE is not defined in the FSP EAS and we don't see a need
for it.

Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Satya Yarlagadda <satya.p.yarlagadda@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
7 years agoArmPlatformPkg/BootMonFs: eliminate deprecated string functions
Ard Biesheuvel [Tue, 25 Oct 2016 18:14:57 +0000 (19:14 +0100)]
ArmPlatformPkg/BootMonFs: eliminate deprecated string functions

Get rid of functions that are no longer available when defining
DISABLE_NEW_DEPRECATED_INTERFACES

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoBeagleBoardPkg: enable -DDISABLE_NEW_DEPRECATED_INTERFACES
Ard Biesheuvel [Tue, 25 Oct 2016 16:33:48 +0000 (17:33 +0100)]
BeagleBoardPkg: enable -DDISABLE_NEW_DEPRECATED_INTERFACES

Define DISABLE_NEW_DEPRECATED_INTERFACES on the compiler command line by
default, to prevent deprecated interfaces from being used in core EDK2
code.

Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=164
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 agoEmbeddedPkg: enable -DDISABLE_NEW_DEPRECATED_INTERFACES
Ard Biesheuvel [Mon, 24 Oct 2016 17:35:08 +0000 (18:35 +0100)]
EmbeddedPkg: enable -DDISABLE_NEW_DEPRECATED_INTERFACES

Define DISABLE_NEW_DEPRECATED_INTERFACES on the compiler command line by
default, to prevent deprecated interfaces from being used in core EDK2
code.

Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=164
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 agoEmbeddedPkg/MmcDxe: eliminate deprecated string function calls
Ard Biesheuvel [Mon, 24 Oct 2016 17:33:31 +0000 (18:33 +0100)]
EmbeddedPkg/MmcDxe: eliminate deprecated string function calls

Get rid of calls to unsafe string functions. These are deprecated and may
be removed in the future.

Note that this also fixes an existing issue in the code, where the buffer
may be overrun by one character when en == mLogRemainChar, in which case
the NUL terminator ends up after the end of the buffer.

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 agoEmbeddedPkg/EfiFileLib: eliminate deprecated string function calls
Ard Biesheuvel [Mon, 24 Oct 2016 17:31:53 +0000 (18:31 +0100)]
EmbeddedPkg/EfiFileLib: eliminate deprecated string function calls

Get rid of calls to unsafe string functions. These are deprecated and may
be removed in the future.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoEmbeddedPkg/Ebl: eliminate deprecated string function calls
Ard Biesheuvel [Mon, 24 Oct 2016 17:30:37 +0000 (18:30 +0100)]
EmbeddedPkg/Ebl: eliminate deprecated string function calls

Get rid of calls to unsafe string functions. These are deprecated and may
be removed in the future.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoEmbeddedPkg/AndroidFastboot: eliminate deprecated string function calls
Ard Biesheuvel [Mon, 24 Oct 2016 17:29:35 +0000 (18:29 +0100)]
EmbeddedPkg/AndroidFastboot: eliminate deprecated string function calls

Get rid of calls to unsafe string functions. These are deprecated and may
be removed in the future.

Note that this also addresses a latent potential issue in HandleDownload(),
where NumBytesString[] (which comes from the wire) is assumed to contain a
string representation of a number with all the significant digits in the
first 8 bytes, which is not guaranteed by the protocol.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoEmbeddedPkg/GdbDebugAgent: fix VOID* cast of incorrect size
Ard Biesheuvel [Mon, 24 Oct 2016 17:32:12 +0000 (18:32 +0100)]
EmbeddedPkg/GdbDebugAgent: fix VOID* cast of incorrect size

The result of PcdGet64() can only be cast to VOID* on 64-bit platforms,
so add an intermediate UINTN cast to make this code build again on 32 bit.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoEmbeddedPkg: add missing modules
Ard Biesheuvel [Mon, 24 Oct 2016 17:34:14 +0000 (18:34 +0100)]
EmbeddedPkg: add missing modules

Add modules that live under EmbeddedPkg but were missing from the
[Components] section of the package .dsc file

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 agoEmbeddedPkg: remove unused PrePiHobListPointerLib
Ard Biesheuvel [Mon, 24 Oct 2016 16:52:11 +0000 (17:52 +0100)]
EmbeddedPkg: remove unused PrePiHobListPointerLib

Remove this unused version: all existing platforms use the one under
ArmPlatformPkg instead.

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 agoEmbeddedPkg/AndroidFastbootTransportTcpDxe: remove broken hostname handling
Ard Biesheuvel [Mon, 24 Oct 2016 16:39:10 +0000 (17:39 +0100)]
EmbeddedPkg/AndroidFastbootTransportTcpDxe: remove broken hostname handling

The fastboot TCP connection setup routine retrieves a hostname from a
UEFI variable 'hostname' that is scoped under a GUID gEfiHostnameVariableGuid
whose definition is missing from the code. Since the hostname is only printed
and then discarded, let's just drop the whole thing.

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 agoArmPkg: enable -DDISABLE_NEW_DEPRECATED_INTERFACES
Ard Biesheuvel [Mon, 24 Oct 2016 15:33:32 +0000 (16:33 +0100)]
ArmPkg: enable -DDISABLE_NEW_DEPRECATED_INTERFACES

Define DISABLE_NEW_DEPRECATED_INTERFACES on the compiler command line by
default, to prevent deprecated interfaces from being used in core EDK2
code.

Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=164
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoArmPkg/BdsLib: eliminate calls to deprecated string functions
Ard Biesheuvel [Mon, 24 Oct 2016 15:31:06 +0000 (16:31 +0100)]
ArmPkg/BdsLib: eliminate calls to deprecated string functions

Remove calls to deprecated string functions like AsciiStrCpy() and
UnicodeStrToAsciiStr()

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoArmPkg/SemihostFs: eliminate calls to deprecated string functions
Ard Biesheuvel [Mon, 24 Oct 2016 15:30:48 +0000 (16:30 +0100)]
ArmPkg/SemihostFs: eliminate calls to deprecated string functions

Remove calls to deprecated string functions like AsciiStrCpy() and
UnicodeStrToAsciiStr()

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoArmPkg/LinuxLoader: eliminate calls to deprecated string functions
Ard Biesheuvel [Mon, 24 Oct 2016 15:28:27 +0000 (16:28 +0100)]
ArmPkg/LinuxLoader: eliminate calls to deprecated string functions

Remove calls to deprecated string functions like AsciiStrCpy() and
UnicodeStrToAsciiStr()

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoArmPkg/ArmCortexA9Lib RVCT: remove incompatible GCC include
Ard Biesheuvel [Mon, 24 Oct 2016 15:59:41 +0000 (16:59 +0100)]
ArmPkg/ArmCortexA9Lib RVCT: remove incompatible GCC include

Drop the include of AsmMacroIoLib.h, which contains GCC preprocessor macros
that RVCT does not use or require, given it has its own AsmMacroIoLib.inc

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoArmPkg: add missing components
Ard Biesheuvel [Mon, 24 Oct 2016 15:11:07 +0000 (16:11 +0100)]
ArmPkg: add missing components

ArmPkg.dsc was a bit out of date, and some modules added over the past
years had not been added to its [Components] section yet.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoNetworkPkg: Update IP4 stack drivers for classless address unicast check.
Fu Siyuan [Thu, 27 Oct 2016 01:23:22 +0000 (09:23 +0800)]
NetworkPkg: Update IP4 stack drivers for classless address unicast check.

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: Update IP4 stack drivers for classless address unicast check.
Fu Siyuan [Thu, 27 Oct 2016 01:23:08 +0000 (09:23 +0800)]
MdeModulePkg: Update IP4 stack drivers for classless address unicast check.

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: Update NetLib interface to support classless addressing.
Fu Siyuan [Thu, 27 Oct 2016 01:22:08 +0000 (09:22 +0800)]
MdeModulePkg: Update NetLib interface to support classless addressing.

The classful addressing (IP class A/B/C) has been deprecated according to
RFC4632. This patch updates the NetLib NetGetIpClass() and NetIp4IsUnicast()
accordingly.

NetGetIpClass()
The function is kept for compatibility, while the caller of this function
could only check the returned value against with IP4_ADDR_CLASSD (multicast)
or IP4_ADDR_CLASSE (reserved) now. The function has been updated to note this.

NetIp4IsUnicast()
The NetMask becomes a required parameter to check the unicast address.

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 agoMdePkg/Include: Add enumeration size checks to Base.h
Michael Kinney [Thu, 18 Aug 2016 06:41:20 +0000 (23:41 -0700)]
MdePkg/Include: Add enumeration size checks to Base.h

https://bugzilla.tianocore.org/show_bug.cgi?id=181

Add size check for 8-bit, 16-bit, and 32-bit enums
to make sure they follow the UEFI Specification 2.3.1
Data Types.

<Enumerated Type>

Element of a standard ANSI C enum type declaration.
Type INT32.or UINT32.  ANSI C does not define the
size of sign of an enum so they should never be
used in structures. ANSI C integer promotion rules
make INT32 or UINT32 interchangeable when passed as
an argument to a function.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>