]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
4 years agoedksetup.bat stuck on unicode locale Windows
Park, Aiden [Fri, 20 Dec 2019 18:24:37 +0000 (02:24 +0800)]
edksetup.bat stuck on unicode locale Windows

This issue happens under two conditions.
  1. Unicode language environment in Windows
  2. Python2 (Not reproducible with Python3)

Step to reproduce
  C:\edk2>edksetup.bat forcerebuild
The edksetup.bat stuck at 'nmake cleanall'.

Signed-off-by: Aiden Park <aiden.park@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
4 years agoMdePkg/Tcg: Add new definition in TCG PFP spec.
Jiewen Yao [Wed, 18 Dec 2019 07:13:07 +0000 (15:13 +0800)]
MdePkg/Tcg: Add new definition in TCG PFP spec.

The latest TCG PFP specification (TCG PC Client Platform Firmware Profile
Specification, Revision 1.05) added new data structure. For example,
the SPDM device measurement. This patch adds the new content.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoMdePkg: Use __builtin_offset with CLANGPDB toolchain
Alex James [Thu, 28 Nov 2019 05:56:45 +0000 (13:56 +0800)]
MdePkg: Use __builtin_offset with CLANGPDB toolchain

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

CLANGPDB does not define __GNUC__, but it does define __clang__. Check
for the __clang__ preprocessor definition to use __builtin_offsetof to
implement the OFFSET_OF macro.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Alex James <theracermaster@gmail.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoMdePkg PciExpress21: PCI_REG_PCIE_DEVICE_CONTROL2 struct has 17 bits
Daniel Pawel Banaszek [Tue, 17 Dec 2019 13:39:25 +0000 (14:39 +0100)]
MdePkg PciExpress21: PCI_REG_PCIE_DEVICE_CONTROL2 struct has 17 bits

Device Control 2 Structure have an issue.
 LtrMechanism - there is 2 bits instead of 1.

Signed-off-by: Daniel Pawel Banaszek <daniel.pawel.banaszek@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
4 years agoShellPkg/ShellProtocol: Return error code while fail parsing cmd-line
Zhichao Gao [Fri, 29 Nov 2019 08:51:45 +0000 (16:51 +0800)]
ShellPkg/ShellProtocol: Return error code while fail parsing cmd-line

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

Errors happened in the arguments parsing is not a critical error.
And it would miss the error status code in the release version of shell.
So replace the ASSERT with returning error status code while fail
parsing command-line in UpdateArgcArgv.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Linson Augustine <linson.augustine@intel.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
4 years agoMdePkg/Spdm: fix Nonce structure error.
Jiewen Yao [Wed, 18 Dec 2019 02:56:28 +0000 (10:56 +0800)]
MdePkg/Spdm: fix Nonce structure error.

Align to SPDM 1.0.0 specification.
Fix Nonce data structure error.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoBaseTools: Resolve a issue of Incremental build
Bob Feng [Mon, 16 Dec 2019 10:18:46 +0000 (18:18 +0800)]
BaseTools: Resolve a issue of Incremental build

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

In patch set 13c5e34a - 0c3e8e99, we implemented incremental build with
using compiler/pre-processor generate dependent header file function.

A issue is found for MSVC compiler, that the cl.exe /showIncludes
build option generate header file list to either stdout or stderr.
For .c file, the header file list is print out to stdout while for
.vfr, .aslc and .nasm file, the file list is print out to stderr.

The build tool use two threads to process the message from stdout and
stderr, but to generate correct *.deps file, build tool need to
combine the header file list from stderr and other messages from stdout
together with correct time sequence order.

So this patch is trying to combine the stdout and stderr together for
the process which is for calling make program.

The impact of this patch is that the output message of build with -q
will be changed. The compiler error message will not print out.
The build behavior of other log level setting will not be impacted.

Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Steven Shi <steven.shi@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoMaintainers.txt: Update email address and role
Maciej Rabeda [Wed, 11 Dec 2019 09:54:19 +0000 (17:54 +0800)]
Maintainers.txt: Update email address and role

Created new email account that will not append legal disclaimers to
my responses/patches.

Switching to NetworkPkg maintainer.

Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Signed-off-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
4 years agoBaseTools:replaces the two offending quotes by ascii quotes
Fan, Zhiju [Tue, 17 Dec 2019 05:51:51 +0000 (13:51 +0800)]
BaseTools:replaces the two offending quotes by ascii quotes

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

That commit 13c5e34a1b introduces the first two UTF-8
characters (the quote ') in an otherwise all-ascii file.

In Conf\tools_def.template
There is tow lines of
  Notes: Since this tool chain is obsolete, it doesn't enable
  the compiler option for included header file list generation,

we replaces the two offending quotes by proper ascii quotes
The patch is going to fix this issue

Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
4 years agoBaseTools: Fix build failure when multiple build targets given
Bob Feng [Wed, 11 Dec 2019 11:22:21 +0000 (19:22 +0800)]
BaseTools: Fix build failure when multiple build targets given

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

This patch is to fix a regression issue that build fails
if multiple build targets given.

Two changes cause this regression issue.
One is AutoGen object __hash__ function only
hash file path and arch, missing ToolChain and build target.

The other is changing the multiple-thread-genfds function as default
build behavior. To generate the genffs command to Makefile, there
is a global data set is used, GenFdsGlobalVariable, which cause build
tool use the data of first build-target build in
the second build-target build.

Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Steven Shi <steven.shi@intel.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoMdePkg/Include: Add DCC and BCM2835 SPCR UART types
Pete Batard [Tue, 10 Dec 2019 18:23:04 +0000 (18:23 +0000)]
MdePkg/Include: Add DCC and BCM2835 SPCR UART types

As per the Microsoft Debug Port Table 2 (DBG2) documentation, that
can be found online, we are missing 2 serial interface types for
Arm DCC and Bcm2835 (the latter being used with the Raspberry Pi).

These same types are present in DebugPort2Table.h so add them to
SerialPortConsoleRedirectionTable.h too.

Note that we followed the same idiosyncrasies as DebugPort2Table
for naming these new macros.

Signed-off-by: Pete Batard <pete@akeo.ie>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoArmPkg/MmCommunicationDxe: relay architected PI events to MM context
Ard Biesheuvel [Tue, 5 Mar 2019 13:32:48 +0000 (14:32 +0100)]
ArmPkg/MmCommunicationDxe: relay architected PI events to MM context

PI defines a few architected events that have significance in the MM
context as well as in the non-secure DXE context. So register notify
handlers for these events, and relay them into the standalone MM world.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Achin Gupta <achin.gupta@arm.com>
4 years agoMdeModulePkg PeiCore: Improve comment semantics
Michael Kubacki [Thu, 21 Nov 2019 01:31:24 +0000 (17:31 -0800)]
MdeModulePkg PeiCore: Improve comment semantics

This patch clarifies wording in several PeiCore comments to improve
reading comprehension.

Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
4 years agoMdeModulePkg PeiCore: Fix typos
Michael Kubacki [Thu, 21 Nov 2019 01:10:48 +0000 (17:10 -0800)]
MdeModulePkg PeiCore: Fix typos

Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
4 years agoIntelFsp2WrapperPkg: Fix various typos
Antoine Coeur [Wed, 4 Dec 2019 04:14:53 +0000 (12:14 +0800)]
IntelFsp2WrapperPkg: Fix various typos

Fix various typos in comments and documentation.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
4 years agoSecurityPkg/Tcg2Smm: Measure the table before patch.
Jiewen Yao [Sat, 7 Dec 2019 13:41:10 +0000 (21:41 +0800)]
SecurityPkg/Tcg2Smm: Measure the table before patch.

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

According to TCG PFP specification: the ACPI table must be
measured prior to any modification, and the measurement
must be same cross every boot cycle.

There is a fix 3a63c17ebc853cbb27d190729d01e27f68e65b94
for the HID data. However that is not enough.
The LAML/LASA and PCD configuration change may also cause
similar problem.

We need measure the table before any update.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Signed-off-by: Jiewen Yao <Jiewen.Yao@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
4 years agoBaseTools: Remove redundant binary cache file
Steven Shi [Tue, 19 Nov 2019 08:22:08 +0000 (16:22 +0800)]
BaseTools: Remove redundant binary cache file

Redesign the binary cache and not need to save the
cache intermediate result and state in memory as a
ModuleBuildCacheIR class instance. So remove the
CacheIR.py which define the ModuleBuildCacheIR class.

Signed-off-by: Steven Shi <steven.shi@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
4 years agoBaseTools: Leverage compiler output to optimize binary cache
Steven Shi [Tue, 19 Nov 2019 08:17:00 +0000 (16:17 +0800)]
BaseTools: Leverage compiler output to optimize binary cache

Redesign the binary cache and bases on the compiler to
output the dependency header files info for every module.
The binary cache will directly consume the dependency header
files info and doesn't parse the C source code by iteself.
Also redesign the dependency files list format for module
and try to share the common lib hash result as more as
possible in local process. Remove the unnecessary share data
access across multiprocessing.

Signed-off-by: Steven Shi <steven.shi@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
4 years agoBaseTools: enhance the CacheCopyFile method arg names
Steven Shi [Mon, 21 Oct 2019 06:51:49 +0000 (14:51 +0800)]
BaseTools: enhance the CacheCopyFile method arg names

Enhance the CacheCopyFile method arg names to be more
clear and readable

Signed-off-by: Steven Shi <steven.shi@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
4 years agoBaseTools: store more complete output files in binary cache
Steven Shi [Mon, 21 Oct 2019 06:24:57 +0000 (14:24 +0800)]
BaseTools: store more complete output files in binary cache

Binary cache use the OutputFile method to return the module
built output files needed to store in cache, but current
OutputFile implementation doesn't return complete output files.
Enhance the OutputFile method to return more complete output files.

Signed-off-by: Steven Shi <steven.shi@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
4 years agoBaseTools: Enhance Basetool for incremental build
Bob Feng [Wed, 20 Nov 2019 02:58:30 +0000 (10:58 +0800)]
BaseTools: Enhance Basetool for incremental build

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

Include dependency file in Makefile to enhance
incremental build

Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Steven Shi <steven.shi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoBaseTools: Update build_rule.txt to generate dependent files.
Bob Feng [Mon, 2 Dec 2019 08:25:32 +0000 (16:25 +0800)]
BaseTools: Update build_rule.txt to generate dependent files.

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

Enable the dependent files generation function for compilers
and Trim tool.

Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Steven Shi <steven.shi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoBaseTools: Generate dependent files for ASL and ASM files
Bob Feng [Wed, 20 Nov 2019 02:58:28 +0000 (10:58 +0800)]
BaseTools: Generate dependent files for ASL and ASM files

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

Implement the function in Trim tool to get the included
file list for ASL and ASM file.

Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Steven Shi <steven.shi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoBaseTools: Add build option for dependency file generation
Bob Feng [Mon, 2 Dec 2019 08:24:19 +0000 (16:24 +0800)]
BaseTools: Add build option for dependency file generation

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

Add /showIncludes for msvc and -MMD -MF $@.deps
for GCC and CLANG

Remove /MP for msvc since /MP does not work with
/showIncludes

Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Steven Shi <steven.shi@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoMaintainers: assume co-maintainership of StandaloneMmPkg
Ard Biesheuvel [Fri, 6 Dec 2019 15:21:33 +0000 (15:21 +0000)]
Maintainers: assume co-maintainership of StandaloneMmPkg

Achin has indicated that he no longer has the bandwidth available to
co-maintain StandaloneMmPkg, and has asked Sami and me to step in.

Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Jiewen Yao <Jiewen.Yao@intel.com>
Reviewed-by: Achin Gupta <achin.gupta@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
4 years agoEmbeddedPkg: implement EDK2 IoMmu protocol wrapping DmaLib
Ard Biesheuvel [Thu, 21 Nov 2019 08:32:27 +0000 (09:32 +0100)]
EmbeddedPkg: implement EDK2 IoMmu protocol wrapping DmaLib

Implement a version of the EDK2 IoMmu protocol that is a simple wrapper
around DmaLib. This is intended to be used to wrap NonCoherentDmaLib so
that the generic PCI infrastructure can be used to implement support for
non cache-coherent DMA.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Tested-by: Pete Batard <pete@akeo.ie>
4 years agoEmbeddedPkg/NonCoherentDmaLib: implement support for DMA range limits
Ard Biesheuvel [Thu, 21 Nov 2019 08:32:26 +0000 (09:32 +0100)]
EmbeddedPkg/NonCoherentDmaLib: implement support for DMA range limits

Implement support for driving peripherals with limited DMA ranges to
NonCoherentDmaLib, by adding a device address limit, and taking it,
along with the device offset, into account when allocating or mapping
DMA buffers.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Pete Batard <pete@akeo.ie>
Acked-by: Philippe Mathieu-Daude <philmd@redhat.com>
Acked-by: Leif Lindholm <leif.lindholm@linaro.org>
4 years agoUefiCpuPkg/PiSmmCpuDxeSmm: Avoid allocate Token every time
Eric Dong [Fri, 6 Dec 2019 03:36:35 +0000 (11:36 +0800)]
UefiCpuPkg/PiSmmCpuDxeSmm: Avoid allocate Token every time

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

Token is new introduced by MM MP Protocol. Current logic allocate Token
every time when need to use it. The logic caused SMI latency raised to
very high. Update logic to allocate Token buffer at driver's entry point.
Later use the token from the allocated token buffer. Only when all the
buffer have been used, then need to allocate new buffer.

Reviewed-by: Ray Ni <ray.ni@intel.com>
Signed-off-by: Eric Dong <eric.dong@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
4 years agoBaseTools: Avoid "is" with a literal Python 3.8 warnings
Philippe Mathieu-Daude [Thu, 5 Dec 2019 11:19:41 +0000 (19:19 +0800)]
BaseTools: Avoid "is" with a literal Python 3.8 warnings

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

The following statement produces a SyntaxWarning with Python 3.8:

  if str(FdRegion.RegionType) is 'FILE' and self.Platform.VpdToolGuid in \
    str(FdRegion.RegionDataList):
  BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py:168: SyntaxWarning: \
    "is" with a literal. Did you mean "=="?

Change the 'is' operator by the conventional '==' comparator.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com>
4 years ago.pytool: Avoid "is" with a literal Python 3.8 warnings in CI plugins
Philippe Mathieu-Daude [Thu, 5 Dec 2019 11:19:42 +0000 (19:19 +0800)]
.pytool: Avoid "is" with a literal Python 3.8 warnings in CI plugins

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

To avoid SyntaxWarning with Python 3.8, change the 'is' operator
by the conventional '==' comparator.

Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com>
4 years agoArmPkg: Dispatch deferred images after EndOfDxe
Sami Mujawar [Thu, 11 Apr 2019 18:41:36 +0000 (11:41 -0700)]
ArmPkg: Dispatch deferred images after EndOfDxe

Third party driver images loaded from Option ROM get queued
for execution after EndOfDxe. These queued images need to be
dispatched from the PlatformBootManagerLib.

Since the queued images were not dispatched, the PCI Option
ROM drivers were not getting loaded on Juno. Therefore,
add call to EfiBootManagerDispatchDeferredImages() for
dispatching deferred images from PlatformBootManagerLib.

Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
4 years agoShellPkg/UefiHandleParsingLib: Fix error allocate pool
Zhichao Gao [Mon, 15 Jul 2019 06:23:21 +0000 (14:23 +0800)]
ShellPkg/UefiHandleParsingLib: Fix error allocate pool

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

For function InsertNewGuidNameMapping, it rellocate the
mGuidList with new size
"mGuidListCount+1 * sizeof(GUID_INFO_BLOCK)". That isn't
its purpose and would cause a overflow operation in
"mGuidList[mGuidListCount - 1].xxx = xxx". Its purpose
is to increase 1 block size of mGuidList. Change it to
"(mGuidListCount + 1) * sizeof (GUID_INFO_BLOCK)".

Adjust the coding style of this function.

Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Andrew Fish <afish@apple.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
4 years agoShellPkg/edit: typo "%d Lines Wrote"
Heinrich Schuchardt [Sun, 24 Nov 2019 10:33:20 +0000 (18:33 +0800)]
ShellPkg/edit: typo "%d Lines Wrote"

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

When a file is saved in the edit command a status message L"%d Lines Wrote"
is displayed. The hexedit command suffers from the same typo.

Change the message to L"%d Lines Written".

Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoShellPkg: acpiview: IORT Spec Rev D updates
Sami Mujawar [Mon, 25 Nov 2019 09:18:13 +0000 (17:18 +0800)]
ShellPkg: acpiview: IORT Spec Rev D updates

Updated IORT parser to conform to the IO Remapping
Table, Platform Design Document, Revision D, March 2018.

The following structure parsers have been updated:
  1. SMMUv3 - added proximity domain and device Id
              mapping index.
  2. RootComplex - added memory address size limit.
  2. PMCG - added page 1 support.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
4 years agoShellPkg: acpiview: Add support for parsing FACS
Sami Mujawar [Fri, 22 Nov 2019 11:31:45 +0000 (19:31 +0800)]
ShellPkg: acpiview: Add support for parsing FACS

Add support for parsing the ACPI FACS table.

The FADT parser has also been updated as it
links the FACS table using the FIRMWARE_CTRL
or X_FIRMWARE_CTRL fields.

Since the FACS table does not follow the standard
ACPI header, the FADT parser extracts the FACS
signature, length and version fields before invoking
the FACS parser.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
4 years agoMdeModulePkg: Add ARM/Aarch64 support which were missing
Zhiguang Liu [Wed, 4 Dec 2019 00:45:35 +0000 (08:45 +0800)]
MdeModulePkg: Add ARM/Aarch64 support which were missing

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

Add ARM/Aarch64 which were missing to VALID_ARCHITECTURES
 in LzmaCustomDecompressLib.inf

Cc: Liming Gao <liming.gao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
4 years agoMdeModulePkg: LzmaCustomDecompressLib.inf don't support EBC anymore
Zhiguang Liu [Wed, 4 Dec 2019 00:43:24 +0000 (08:43 +0800)]
MdeModulePkg: LzmaCustomDecompressLib.inf don't support EBC anymore

After unifying the definition of size_t, EBC compiler has failure.
So don't compile this inf file for EBC

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

Cc: Liming Gao <liming.gao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Philippe Mathieu-Daude <philmd@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
4 years agoBaseTools:Enhance the way to handling included dsc file
Fan, ZhijuX [Tue, 3 Dec 2019 09:04:25 +0000 (17:04 +0800)]
BaseTools:Enhance the way to handling included dsc file

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

In Dsc Parser, included dsc file is parsed always no matter
if its condition is False

  gUefiOvmfPkgTokenSpaceGuid.test1|FALSE
!if gUefiOvmfPkgTokenSpaceGuid.test1 == FALSE
  !include OvmfPkg/test1.dsc
!else
  !include OvmfPkg/test2.dsc
!endif

The patch avoids processing redundant dsc files and improves
the way Tool handles them.

In the above case, since the conditional result is FALSE,
"test2.dsc" is not parsed.

Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
4 years agoUefiCpuPkg: Update the coding styles
Shenglei Zhang [Thu, 14 Nov 2019 11:00:10 +0000 (16:30 +0530)]
UefiCpuPkg: Update the coding styles

In MpLib.c, remove the white space on a new line.
In PageTbl.c and PiSmmCpuDxeSmm.h, update the comment style.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
4 years agoUefiCpuPkg/UefiCpuPkg.uni: Add missing strings for PCD
Shenglei Zhang [Thu, 14 Nov 2019 10:46:59 +0000 (16:16 +0530)]
UefiCpuPkg/UefiCpuPkg.uni: Add missing strings for PCD

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
4 years agoNetworkPkg/NetworkPkg.uni: Add missing strings for PCD
Shenglei Zhang [Thu, 14 Nov 2019 10:43:14 +0000 (16:13 +0530)]
NetworkPkg/NetworkPkg.uni: Add missing strings for PCD

Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Maciej Rabeda <maciej.rabeda@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
4 years agoMdeModulePkg/MdeModulePkg.uni: Add missing strings for PCD
Shenglei Zhang [Wed, 13 Nov 2019 04:30:34 +0000 (10:00 +0530)]
MdeModulePkg/MdeModulePkg.uni: Add missing strings for PCD

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
4 years agoNetworkPkg: Fixes to static code analysis hits
Maciej Rabeda [Thu, 28 Nov 2019 14:46:06 +0000 (15:46 +0100)]
NetworkPkg: Fixes to static code analysis hits

Introducing fixes to memory leak issues identified by static code analysis
tool.

Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Signed-off-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
4 years agoCryptoPkg/OpensslLib.inf: list OpenSSL local header "ms/uplink.h"
Laszlo Ersek [Thu, 21 Nov 2019 08:01:10 +0000 (09:01 +0100)]
CryptoPkg/OpensslLib.inf: list OpenSSL local header "ms/uplink.h"

Commit 8906f076de35 ("CryptoPkg/OpensslLib: Add missing header files in
INF file", 2019-08-16) incorrectly placed "ms/uplink.h" in the
auto-generated part of [Sources], in "OpensslLib.inf".

("ms/uplink.h" was added in the right spot in "OpensslLibCrypto.inf".)

Subsequently, when commit 9f4fbd56d430 ("CryptoPkg/OpensslLib: Update
process_files.pl to generate .h files", 2019-10-30) re-generated that part
of "OpensslLib.inf", the "ms/uplink.h" file reference was lost. This
triggers a warning from the "build" utility now.

Name the header file in the right spot in [Sources].

This change makes "OpensslLib.inf" consistent with "OpensslLibCrypto.inf".

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Shenglei Zhang <shenglei.zhang@intel.com>
Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
Fixes: 8906f076de35b222a7d62bcf6ed1a4a2498a5791
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
4 years agoCryptoPkg/OpensslLib: improve INF file consistency
Laszlo Ersek [Thu, 21 Nov 2019 07:46:10 +0000 (08:46 +0100)]
CryptoPkg/OpensslLib: improve INF file consistency

When diffing "OpensslLib.inf" against "OpensslLibCrypto.inf", the *only*
differences should be:

- BASE_NAME, MODULE_UNI_FILE, and FILE_GUID are expected to differ, in
  [Defines];

- "OpensslLib.inf" is expected to list "$(OPENSSL_PATH)/ssl/..." source
  files in the auto-generated part of the [Sources] section.

Commit 8906f076de35 ("CryptoPkg/OpensslLib: Add missing header files in
INF file", 2019-08-16) broke that invariant, by adding "buildinf.h" and
"rand_pool_noise.h" in different order to both INF files.

Fix that order in "OpensslLib.inf" now. (Note that this does not
re-establish full consistency between both INF files -- it just highlights
another problem, which we'll fix in the next patch.)

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Shenglei Zhang <shenglei.zhang@intel.com>
Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
Fixes: 8906f076de35b222a7d62bcf6ed1a4a2498a5791
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
4 years agoMdeModulePkg/VariableSmmRuntimeDxe.inf: list local header "Variable.h"
Laszlo Ersek [Thu, 21 Nov 2019 07:31:24 +0000 (08:31 +0100)]
MdeModulePkg/VariableSmmRuntimeDxe.inf: list local header "Variable.h"

Commit aab3b9b9a1e5 ("MdeModulePkg/Variable: Add RT GetVariable() cache
support", 2019-11-05) added "VariableParsing.h" to
"VariableSmmRuntimeDxe.inf".

"VariableParsing.h" includes "Variable.h", so the "build" utility is right
to warn us that "Variable.h" should be listed in [Sources] too.

Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kubacki <michael.a.kubacki@intel.com>
Fixes: aab3b9b9a1e5e1f3fa966fb1667fc3e6c47e7706
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
4 years agoMdeModulePkg/Variable: Initialize local variable "RtPtrTrack" edk2-stable201911
Kubacki, Michael A [Thu, 21 Nov 2019 23:02:36 +0000 (07:02 +0800)]
MdeModulePkg/Variable: Initialize local variable "RtPtrTrack"

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

Fixes a new build warning in VS2012 introduced in f8ff4cca7c.

This patch initializes the local variable "RtPtrTrack" in
FindVariableInRuntimeCache ().

This ensures the pointers in the structure are initialized
in the case no variable stores exist in the list of variable
stores.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
4 years agoMdeModulePkg/Variable: Initialize local variable "Variable"
Kubacki, Michael A [Thu, 21 Nov 2019 23:02:35 +0000 (07:02 +0800)]
MdeModulePkg/Variable: Initialize local variable "Variable"

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

Fixes a new build warning in VS2012 introduced in f8ff4cca7c.

This patch initializes the local variable "Variable" in
VariableServiceGetNextVariableInternal ().

This ensures the pointers in the structure are initialized
in the case no variable stores exist in the list of variable
stores.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
4 years agoStandaloneMmPkg: Fix build failure - Bug 2253
Sami Mujawar [Mon, 25 Nov 2019 09:06:04 +0000 (17:06 +0800)]
StandaloneMmPkg: Fix build failure - Bug 2253

The StandaloneMmPkg currently has code for supporting
Arm architecture only. Support for X64 and IA32 is
currently under development on a separate branch.

However, StandaloneMmPkg/StandaloneMmPkg.dsc is
indicating that support for X64 and IA32 is
available which is causing build failures.
This has been reported in
https://bugzilla.tianocore.org/show_bug.cgi?id=2253

This issue has been discussed earlier on the list:
(1) https://edk2.groups.io/g/devel/message/47276

(2) https://edk2.groups.io/g/devel/message/47283

In light of the above, this patch removes IA32 and X64
from SUPPORTED_ARCHITECTURES, until support for the
respective architectures is merged into StandaloneMmPkg.

Cc: Achin Gupta <achin.gupta@arm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
4 years agoBaseTools:fix regression issue for platform .map file
Fan, ZhijuX [Fri, 22 Nov 2019 10:54:39 +0000 (18:54 +0800)]
BaseTools:fix regression issue for platform .map file

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

This patch is to fix a build tool regression issue which was introduced
by commit b8ac0b7f28.This issue caused map file lost the line of IMAGE=***.
For example,in Ovmf.map, there is no line of (IMAGE=<path to efi> ) under
each of modules item.

The path to the efi file generated by each module is written on this line
The purpose of this line is add the debug image full path.
there is no information about the module in the map file other than FVName,
it allows us to quickly know which module this part corresponds to.

In commit b8ac0b7f28,add a line ("self.BuildModules = []") in function,
but it's used to calculate the variable ModuleList in the following code.

Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
4 years agoMdePkg: Update the comments of IsLanguageSupported
Shenglei Zhang [Thu, 14 Nov 2019 11:46:41 +0000 (19:46 +0800)]
MdePkg: Update the comments of IsLanguageSupported

Keep the comment style of IsLanguageSupported align with
other functions.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoBaseTools:Add [packages] section in dsc file
Fan, ZhijuX [Thu, 14 Nov 2019 01:27:42 +0000 (09:27 +0800)]
BaseTools:Add [packages] section in dsc file

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

Currently a PCD (e.g. FeaturePCD) cannot be used in a conditional
statement in a DSC/FDF file without a module in the build referencing
the PCD package DEC file.

An example implementation that to support this is to allow a [Packages]
section in the DSC file to list additional package dependencies for PCD
references in the package DSC/FDF files.

this patch is going to  add the ability to have the [packages] section
defined in the DSC file

Cc: Liming Gao <liming.gao@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Acked-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
4 years agoMdeModulePkg/NvmExpressDxe: Fix wrong queue size for async IO queues
Sean Brogan [Tue, 3 Sep 2019 23:52:26 +0000 (16:52 -0700)]
MdeModulePkg/NvmExpressDxe: Fix wrong queue size for async IO queues

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

When a packet is queued/completed for the asynchronous IO queue, the logic
to roll over to the front of the queue doesn't account for actual size of
the IO Submission/Completion queue.

This causes a device to hang due to doorbell being outside of visible
queue. An example would be if an NVMe drive only supported a queue size of
128 while the driver supports 256.

Cc: Jian J Wang <jian.j.wang@intel.com>
Signed-off-by: Sean Brogan <sean.brogan@microsoft.com>
Signed-off-by: Hao A Wu <hao.a.wu@intel.com>
Acked-by: Ray Ni <ray.ni@intel.com>
4 years agoEmulatorPkg DSC and WinHost.inf: Update tool chain name to CLANGPDB
Liming Gao [Thu, 14 Nov 2019 08:04:36 +0000 (16:04 +0800)]
EmulatorPkg DSC and WinHost.inf: Update tool chain name to CLANGPDB

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

Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Andrew Fish <afish@apple.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
4 years agoOvmfPkg DSC: Update tool chain name to CLANGPDB
Liming Gao [Thu, 14 Nov 2019 08:04:01 +0000 (16:04 +0800)]
OvmfPkg DSC: Update tool chain name to CLANGPDB

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

Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
4 years agoCryptoPkg CryptoLib: Update tool chain name to CLANGPDB
Liming Gao [Thu, 14 Nov 2019 08:03:24 +0000 (16:03 +0800)]
CryptoPkg CryptoLib: Update tool chain name to CLANGPDB

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

Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
4 years agoMdeModulePkg RegularExpressionDxe: Update tool chain name to CLANGPDB
Liming Gao [Thu, 14 Nov 2019 08:02:18 +0000 (16:02 +0800)]
MdeModulePkg RegularExpressionDxe: Update tool chain name to CLANGPDB

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

Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
4 years agoBaseTools: Rename tool chain CLANG9 to CLANGPDB
Liming Gao [Thu, 14 Nov 2019 08:00:53 +0000 (16:00 +0800)]
BaseTools: Rename tool chain CLANG9 to CLANGPDB

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

Based on feedback from https://edk2.groups.io/g/devel/message/50466,
CLANGPDB is the most acceptable tool chain name,
because this tool chain generates PE/COFF image with PDB debug symbol.
The following changes are made in this patch.
1. Update tool chain name from CLANG9 to CLANGPDB.
2. Update tool chain BUILDRULEFAMILY from CLANGPE to CLANGPDB.
3. Update CLANG9_BIN env name to CLANG_BIN without version info.

Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
4 years agoMdeModulePkg: Unify the definitions of size_t
Zhiguang Liu [Tue, 12 Nov 2019 08:47:44 +0000 (16:47 +0800)]
MdeModulePkg: Unify the definitions of size_t

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

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoMdeModulePkg/Variable: Fix volatile variable RT cache update logic
Michael Kubacki [Mon, 11 Nov 2019 04:03:21 +0000 (20:03 -0800)]
MdeModulePkg/Variable: Fix volatile variable RT cache update logic

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

During a SetVariable () invocation, UpdateVariable () is called.
UpdateVariable () contains logic to determine whether a volatile or
non-volatile UEFI variable was set so the corresponding runtime
cache can be updated to reflect the change. The current logic simply
evaluates Variable->Volatile to determine which runtime cache should
be updated.

The problem is Variable->Volatile does not always reflect whether a
volatile variable is being set. Variable->Volatile is set to TRUE
only in the case a pre-existing variable is found in the volatile
variable store. Therefore, the value is FALSE when a new volatile
variable is written.

This change updates the logic to take this into account. If a new
variable is written successfully, the Attributes will accurately
reflect whether the variable is non-volatile. If a pre-existing
variable is modified, the Volatile field will reflect the type of
variable (Attributes are not reliable; e.g. 0x0 indicates deletion).

* Observable symptom: A volatile variable that was set successfully
  might return EFI_NOT_FOUND when the variable should be found.

* The issue is a regression introduced to the variable services only
  when the variable runtime cache is enabled by the following PCD
  being set to TRUE:
  gEfiMdeModulePkgTokenSpaceGuid.PcdEnableVariableRuntimeCache

* The issue was implemented in commit aab3b9b9a1 but the PCD was not
  set to TRUE by default enabling the issue until commit e07b7d024a.

Fixes: aab3b9b9a1e5e1f3fa966fb1667fc3e6c47e7706
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
4 years agoShellPkg/SmbiosView: SMBIOS 3.3.0 Update "Intel persistent memory"
Gao, Zhichao [Tue, 12 Nov 2019 03:49:00 +0000 (09:19 +0530)]
ShellPkg/SmbiosView: SMBIOS 3.3.0 Update "Intel persistent memory"

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

Memory Device (Type 17):
- SMBIOSCR00179: update the string for Intel persistent memory

Cc: Ray Ni <ray.ni@intel.com>
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
4 years agoShellPkg/SmbiosView: SMBIOS 3.3.0 Add value HBM and Die for type 17
Gao, Zhichao [Tue, 12 Nov 2019 03:48:59 +0000 (09:18 +0530)]
ShellPkg/SmbiosView: SMBIOS 3.3.0 Add value HBM and Die for type 17

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

Memory Device (Type 17):
- SMBIOSCR00178: add new memory device type value (HBM) and new form
factor value (Die)

Cc: Ray Ni <ray.ni@intel.com>
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
4 years agoShellPkg/SmbiosView: SMBIOS 3.3.0 add support for CXL Flexbus
Gao, Zhichao [Tue, 12 Nov 2019 03:48:58 +0000 (09:18 +0530)]
ShellPkg/SmbiosView: SMBIOS 3.3.0 add support for CXL Flexbus

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

Various:
- SMBIOSCR00183: add support for CXL Flexbus

Cc: Ray Ni <ray.ni@intel.com>
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
4 years agoShellPkg/SmbiosView: SMBIOS 3.3.0 add PCI gen4 values for type 9
Gao, Zhichao [Tue, 12 Nov 2019 03:48:57 +0000 (09:18 +0530)]
ShellPkg/SmbiosView: SMBIOS 3.3.0 add PCI gen4 values for type 9

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

System Slots (Type 9):
- SMBIOSCR00184: add PCI Express Gen 4 values

Add the SmBios.h to use the MARCOs or enums.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
4 years agoMdePkg/SmBios.h: SMBIOS 3.3.0 Update Intel Persistent Memory string
Gao, Zhichao [Tue, 12 Nov 2019 03:48:56 +0000 (09:18 +0530)]
MdePkg/SmBios.h: SMBIOS 3.3.0 Update Intel Persistent Memory string

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

Memory Device (Type 17):
- SMBIOSCR00179: update the string for Intel persistent memory

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
4 years agoMdePkg/SmBios.h: SMBIOS 3.3.0 Add value HBM and Die for type 17
Gao, Zhichao [Tue, 12 Nov 2019 03:48:55 +0000 (09:18 +0530)]
MdePkg/SmBios.h: SMBIOS 3.3.0 Add value HBM and Die for type 17

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

Memory Device (Type 17):
- SMBIOSCR00178: add new memory device type value (HBM) and new form
factor value (Die)

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
4 years agoMdePkg/SmBios.h: SMBIOS 3.3.0 add support for CXL Flexbus
Gao, Zhichao [Tue, 12 Nov 2019 03:48:54 +0000 (09:18 +0530)]
MdePkg/SmBios.h: SMBIOS 3.3.0 add support for CXL Flexbus

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

Various:
- SMBIOSCR00183: add support for CXL Flexbus

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
4 years agoMdePkg/SmBios.h: SMBIOS 3.3.0 add PCI gen4 values for type 9
Gao, Zhichao [Tue, 12 Nov 2019 03:48:53 +0000 (09:18 +0530)]
MdePkg/SmBios.h: SMBIOS 3.3.0 add PCI gen4 values for type 9

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

System Slots (Type 9):
- SMBIOSCR00184: add PCI Express Gen 4 values

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
4 years agoMdePkg: add null version of RngLib
Jian J Wang [Tue, 12 Nov 2019 08:45:48 +0000 (16:45 +0800)]
MdePkg: add null version of RngLib

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

This is null version of RngLib which should be used with modules that
inherit an (indirect) dependency on the RngLib class, but never actually
call RngLib APIs for consuming randomness.

To be more specific, if following components or functionalities are used
in a platform, the BaseRngLibNull should *not* be used. Instead, a non-Null
version of RngLib must be used (like BaseRngLib for IA32/X64, or future
DxeRngLibRngProtocol for all ARCHs).

- HddPasswordDxe.inf
- AES, TLS (TlsDxe.inf, TlsLib.inf), RSA_OAEP, RSA_PK1
- (If BaseRngLibNull interface ASSERTed at boot time)

Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoUefiCpuPkg/RegisterCpuFeature: Remove CPU_FEATURE_XD macro
Ray Ni [Mon, 11 Nov 2019 03:05:48 +0000 (11:05 +0800)]
UefiCpuPkg/RegisterCpuFeature: Remove CPU_FEATURE_XD macro

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

Signed-off-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
4 years agoUefiCpuPkg/CpuCommonFeaturesLib: Remove XD enable/disable logic
Ray Ni [Mon, 11 Nov 2019 02:47:47 +0000 (10:47 +0800)]
UefiCpuPkg/CpuCommonFeaturesLib: Remove XD enable/disable logic

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

XD (ExecutionDisable) feature, when turned on, allows page table
entry BIT63 set to 1 indicating the memory pointed by the page table
is disallowed to execute.
DxeIpl::CreateIdentityMappingPageTables() enables the XD when CPU
supports it.
Later DxeCore modifies the page table to set the BIT63 to protect
the stack/heap to disallow code execution in stack/heap.

UefiCpuPkg/CpuCommonFeaturesLib enables/disables the XD feature
according to PcdCpuFeaturesSetting.
When XD is disabled, GP fault is generated immediately because some
page entries have BIT63 set.

To fix this issue, this patch removes the XD feature logic from
UefiCpuPkg/CpuCommonFeaturesLib so the XD feature is only taken
care of by DxeIpl.

Signed-off-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
4 years agoBaseTools: Fix build failure when using python38
Ni, Ray [Tue, 12 Nov 2019 06:17:35 +0000 (14:17 +0800)]
BaseTools: Fix build failure when using python38

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

Signed-off-by: Ray Ni <ray.ni@intel.com>
Cc: Bob C Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
4 years agoBaseTools: Enable MACRO for DSC Components section tag
Feng, Bob C [Thu, 24 Oct 2019 00:35:44 +0000 (08:35 +0800)]
BaseTools: Enable MACRO for DSC Components section tag

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

This patch is to enable MACRO for Components section architecture
modifier.

Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoEmulatorPkg/PlatformSmbiosDxe: fix a spell error of platform.
Tan, Ming [Mon, 11 Nov 2019 07:18:50 +0000 (15:18 +0800)]
EmulatorPkg/PlatformSmbiosDxe: fix a spell error of platform.

Old code use platfomr.
Change PlatfomrSmbiosDriverEntryPoint to PlatformSmbiosDriverEntryPoint.

Signed-off-by: Ming Tan <ming.tan@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
4 years agoReadme.md: Update EDK II CI build branch name
Michael D Kinney [Tue, 12 Nov 2019 01:39:28 +0000 (17:39 -0800)]
Readme.md: Update EDK II CI build branch name

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

Update Readme.md to indicate that that status badges are for
the edk2/master branch.

Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Sean Brogan <sean.brogan@microsoft.com>
4 years agoReadme.md: Update EDK II CI build status badge and links
Michael D Kinney [Mon, 11 Nov 2019 23:13:10 +0000 (15:13 -0800)]
Readme.md: Update EDK II CI build status badge and links

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

Update Readme.md with the status badges from the Azure
Pipelines, tianocore organization, edk2-ci project

    https://dev.azure.com/tianocore/edk2-ci/_build

* Windows VS2019 CI pipeline badges and results
* Ubuntu GCC5 CI pipeline badges and results

Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Sean Brogan <sean.brogan@microsoft.com>
4 years agoReadme.md: Add CI build status badges
Michael D Kinney [Mon, 28 Oct 2019 20:48:49 +0000 (13:48 -0700)]
Readme.md: Add CI build status badges

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

Update Readme.md with status badges from the most recent
EDK II Continuous Integration(CI) build.

Cc: Andrew Fish <afish@apple.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
4 years ago.mergify: Add Mergify YML pull request rules configuration file
Michael D Kinney [Fri, 18 Oct 2019 22:22:36 +0000 (15:22 -0700)]
.mergify: Add Mergify YML pull request rules configuration file

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

Add directory for the Mergify YML configuration files that
provides rules and actions used to process a pull request.

* Auto commit a PR from EDK II Maintainer with 'push' label
  set and all CI checks pass
* Auto close a PR from any developers without 'push' label
  set and all CI checks pass.
* Auto close a PR from a non EDK II Maintainer that has
  the 'push' label set.
* Post a comment to a PR that has a merge conflict.
  Submitter can resolved conflicts and reopen the PR.
* Post a comment to a PR that fails PatchCheck.py
  Submitter can resolve PatchCheck.py issues and
  reopen the PR.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years ago.azurepipelines: Add Azure Pipelines YML configuration files
Sean Brogan [Tue, 8 Oct 2019 03:34:34 +0000 (20:34 -0700)]
.azurepipelines: Add Azure Pipelines YML configuration files

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

Add YML configuration files used to run the EDK II Continuous
Integration (CI) checks on Azure Pipelines agents.

Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years ago.pytool: Add CISettings.py and Readme.md
Sean Brogan [Tue, 8 Oct 2019 03:25:30 +0000 (20:25 -0700)]
.pytool: Add CISettings.py and Readme.md

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

Add main python script for EDK II Continuous Integration (CI)
builds along with a Readme.md that provides a summary of the
packages, platforms, and checks performs during a CI build.

Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoSignedCapsulePkg: Use BaseCryptLibNull to reduce package CI time
Michael D Kinney [Fri, 25 Oct 2019 20:53:34 +0000 (13:53 -0700)]
SignedCapsulePkg: Use BaseCryptLibNull to reduce package CI time

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

Use BaseCryptLibNull for package CI builds to reduce package
build times.  Enabled with PYTOOL_CONTINUOUS_INTEGRATION in YAML
files.  By default PYTOOL_CONTINUOUS_INTEGRATION is not defined,
and the original lib mappings are preserved.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoUefiCpuPkg: Add YAML file for CI builds
Michael D Kinney [Mon, 28 Oct 2019 20:21:54 +0000 (13:21 -0700)]
UefiCpuPkg: Add YAML file for CI builds

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

Add YAML file to the package directory with the
configuration of the checks to perform during a
CI build.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoShellPkg: Add YAML file for CI builds
Michael D Kinney [Mon, 28 Oct 2019 20:21:41 +0000 (13:21 -0700)]
ShellPkg: Add YAML file for CI builds

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

Add YAML file to the package directory with the
configuration of the checks to perform during a
CI build.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Zhichao Gao <zhichao.gao@intel.com>
Acked-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoSecurityPkg: Add YAML files for CI builds
Michael D Kinney [Mon, 28 Oct 2019 20:21:26 +0000 (13:21 -0700)]
SecurityPkg: Add YAML files for CI builds

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

Add YAML file to the package directory with the
configuration of the checks to perform during a
CI build.

Use BaseCryptLibNull for package CI builds to reduce package
build times.  Enabled with CONTINUOUS_INTEGRATION in YAML
files.  By default CONTINUOUS_INTEGRATION is not defined,
and the original lib mappings are preserved.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
4 years agoPcAtChipsetPkg: Add YAML files for CI builds
Michael D Kinney [Mon, 28 Oct 2019 20:21:07 +0000 (13:21 -0700)]
PcAtChipsetPkg: Add YAML files for CI builds

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

Add YAML file to the package directory with the
configuration of the checks to perform during a
CI build.

Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoNetworkPkg: Add YAML file for CI builds
Michael D Kinney [Mon, 28 Oct 2019 20:20:40 +0000 (13:20 -0700)]
NetworkPkg: Add YAML file for CI builds

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

Add YAML file to the package directory with the
configuration of the checks to perform during a
CI build.

Use BaseCryptLibNull and TlsLibNull for package CI
builds to reduce package build times.  Enabled with
CONTINUOUS_INTEGRATION in YAML files.  By default
CONTINUOUS_INTEGRATION is not defined, and the
original lib mappings are preserved.

Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoMdePkg: Add YAML file for CI builds
Michael D Kinney [Mon, 28 Oct 2019 20:20:17 +0000 (13:20 -0700)]
MdePkg: Add YAML file for CI builds

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

Add YAML file to the package directory with the
configuration of the checks to perform during a
CI build.

Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoMdeModulePkg: Add YAML file for CI builds
Michael D Kinney [Mon, 28 Oct 2019 20:20:04 +0000 (13:20 -0700)]
MdeModulePkg: Add YAML file for CI builds

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

Add YAML file to the package directory with the
configuration of the checks to perform during a
CI build.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoFmpDevicePkg: Add YAML file for CI builds
Michael D Kinney [Mon, 28 Oct 2019 20:19:46 +0000 (13:19 -0700)]
FmpDevicePkg: Add YAML file for CI builds

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

Add YAML file to the package directory with the
configuration of the checks to perform during a
CI build.

Use BaseCryptLibNull for package CI builds to reduce package
build times.  Enabled with CONTINUOUS_INTEGRATION in YAML
files.  By default CONTINUOUS_INTEGRATION is not defined,
and the original lib mappings are preserved.

Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoFatPkg: Add YAML file for CI builds
Michael D Kinney [Mon, 28 Oct 2019 20:19:28 +0000 (13:19 -0700)]
FatPkg: Add YAML file for CI builds

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

Add YAML file to the package directory with the
configuration of the checks to perform during a
CI build.

Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoCryptoPkg: Add YAML file for CI builds
Michael D Kinney [Mon, 28 Oct 2019 20:19:09 +0000 (13:19 -0700)]
CryptoPkg: Add YAML file for CI builds

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

Add YAML file to the package directory with the
configuration of the checks to perform during a
CI build.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
Signed-off-by: Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years ago.pytool/Plugin: Add CI plugins
Sean Brogan [Fri, 18 Oct 2019 04:40:58 +0000 (21:40 -0700)]
.pytool/Plugin: Add CI plugins

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

Add .pytool directory to the edk2 repository with the
following plugins.  These plugins are in a top level
directory because that can be used with all packages
and platforms.

* CharEncodingCheck
* CompilerPlugin
* DependencyCheck
* DscCompleteCheck
* GuidCheck
* LibraryClassCheck
* SpellCheck

Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoBaseTools: Add BaseTools plugins to support CI
Sean Brogan [Tue, 8 Oct 2019 02:57:30 +0000 (19:57 -0700)]
BaseTools: Add BaseTools plugins to support CI

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

Add the following plugins that are required to support
EDK II Continuous Integration (CI) builds.  These plugins
are added to BaseTools because that support EDK II BaseTools
features.

* BuildToolsReportGenerator
* LinuxGcc5ToolChain
* WindowsResourceCompiler
* WindowsVsToolChain

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoBaseTools: Add YAML files with path env and tool extdeps
Sean Brogan [Tue, 8 Oct 2019 01:37:13 +0000 (18:37 -0700)]
BaseTools: Add YAML files with path env and tool extdeps

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

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoBaseTools: Add RC_PATH define for VS2017/2019
Sean Brogan [Tue, 8 Oct 2019 02:54:21 +0000 (19:54 -0700)]
BaseTools: Add RC_PATH define for VS2017/2019

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

Add use of RC_PATH define that provides the path to the resource
compiler that is typically provided in a Windows SDK.  The path
changes with different Windows SDK releases.  This define is set
to the WINSDK_PATH_FOR_RC_EXE environment variable.  This
environment variable must be set to the path to the currently
installed resource compiler (rc.exe).

Update set_vsprefix_envs.bat to set WINSDK_PATH_FOR_RC_EXE
if a Windows SDK is detected.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agopip-requirements.txt: Add python pip requirements file
Sean Brogan [Wed, 25 Sep 2019 04:34:26 +0000 (21:34 -0700)]
pip-requirements.txt: Add python pip requirements file

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

Add pip requirements file that is used to install the
python pip modules build from the edk2-pytool-library and
edk2-pytool-extensions repositories.

These python modules provide the extensions required to
perform EDK II Continuous Integration(CI) builds.

Cc: Andrew Fish <afish@apple.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
4 years ago.gitignore: Ignore python compiled files, extdeps, and vscode
Sean Brogan [Wed, 25 Sep 2019 05:34:18 +0000 (22:34 -0700)]
.gitignore: Ignore python compiled files, extdeps, and vscode

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

Update .gitignore to ignore .pyc files and __pycache__
directories.  Python based plugins can be added to any
package or platform, so these files and directories may
be present outside of BaseTools.

Ignore _extdep directories that are generated by the
pytool external dependency feature.

Ignore .vscode directories generated by the VS Code
editor.

Cc: Andrew Fish <afish@apple.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Kinney <michael.d.kinney@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoMaintainers.txt: Add continuous integration(CI) directories
Michael D Kinney [Fri, 25 Oct 2019 18:44:54 +0000 (11:44 -0700)]
Maintainers.txt: Add continuous integration(CI) directories

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

Add maintainers and reviewers for the directories associated
with continuous integration steps.
* .azurepipelines
* .mergify
* .pytool

Cc: Andrew Fish <afish@apple.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
4 years agoReadme.md: remove positional references from submodule description
Leif Lindholm [Tue, 29 Oct 2019 01:54:36 +0000 (09:54 +0800)]
Readme.md: remove positional references from submodule description

Remove references to the number of submodules in the tree, as well as
reword the referring to specific submodules as "former" and "previous".
This means we won't need to keep updating the surrounding text if we
add/remove submodules.

Cc: Andrew Fish <afish@apple.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
4 years agoMdeModulePkg/Pci: Add DeviceSecurity support.
Jiewen Yao [Sun, 29 Sep 2019 08:37:14 +0000 (16:37 +0800)]
MdeModulePkg/Pci: Add DeviceSecurity support.

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

Whenever a PCI device is discovered, PCI bus calls the
EDKII_DEVICE_SECURITY_PROTOCOL to authenticate it.
If the function returns success, the PCI bus allocates
the resource and installs the PCI_IO for the device.
If the function returns fail, the PCI bus skips the device.

It is similar to EFI_SECURITY_ARCH_PROTOCOL, which
is used to verify an EFI image.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Yun Lou <yun.lou@intel.com>
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>