]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
4 years agoOvmfPkg/PlatformPei: set 32-bit UC area at PciBase / PciExBarBase (pc/q35)
Laszlo Ersek [Wed, 29 May 2019 12:49:55 +0000 (14:49 +0200)]
OvmfPkg/PlatformPei: set 32-bit UC area at PciBase / PciExBarBase (pc/q35)

(This is a replacement for commit 39b9a5ffe661 ("OvmfPkg/PlatformPei: fix
MTRR for low-RAM sizes that have many bits clear", 2019-05-16).)

Reintroduce the same logic as seen in commit 39b9a5ffe661 for the pc
(i440fx) board type.

For q35, the same approach doesn't work any longer, given that (a) we'd
like to keep the PCIEXBAR in the platform DSC a fixed-at-build PCD, and
(b) QEMU expects the PCIEXBAR to reside at a lower address than the 32-bit
PCI MMIO aperture.

Therefore, introduce a helper function for determining the 32-bit
"uncacheable" (MMIO) area base address:

- On q35, this function behaves statically. Furthermore, the MTRR setup
  exploits that the range [0xB000_0000, 0xFFFF_FFFF] can be marked UC with
  just two variable MTRRs (one at 0xB000_0000 (size 256MB), another at
  0xC000_0000 (size 1GB)).

- On pc (i440fx), the function behaves dynamically, implementing the same
  logic as commit 39b9a5ffe661 did. The PciBase value is adjusted to the
  value calculated, similarly to commit 39b9a5ffe661. A further
  simplification is that we show that the UC32 area size truncation to a
  whole power of two automatically guarantees a >=2GB base address.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1859
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
4 years agoOvmfPkg: raise the PCIEXBAR base to 2816 MB on Q35
Laszlo Ersek [Wed, 29 May 2019 09:59:02 +0000 (11:59 +0200)]
OvmfPkg: raise the PCIEXBAR base to 2816 MB on Q35

(This is a replacement for commit 75136b29541b, "OvmfPkg/PlatformPei:
reorder the 32-bit PCI window vs. the PCIEXBAR on q35", 2019-05-16).

Commit 7b8fe63561b4 ("OvmfPkg: PlatformPei: enable PCIEXBAR (aka MMCONFIG
/ ECAM) on Q35", 2016-03-10) claimed that,

  On Q35 machine types that QEMU intends to support in the long term, QEMU
  never lets the RAM below 4 GB exceed 2 GB.

Alas, this statement came from a misunderstanding that occurred while we
worked out the interface contract. In fact QEMU does allow the 32-bit RAM
extend up to 0xB000_0000 (exclusive), in case the RAM size falls in the
range (0x8000_0000, 0xB000_0000) (i.e., the RAM size is greater than
2048MB and smaller than 2816MB).

In turn, such a RAM size (justifiedly) triggers

  ASSERT (TopOfLowRam <= PciExBarBase);

in MemMapInitialization(), because we placed the 256MB PCIEXBAR at
0x8000_0000 (2GB) exactly, relying on the interface contract. (And, the
32-bit PCI window would follow the PCIEXBAR, covering the [0x9000_0000,
0xFC00_0000) range.)

In order to fix this, place the PCIEXBAR at 2816MB (0xB000_0000), and
start the 32-bit PCI window at 3 GB (0xC000_0000). This shrinks the 32-bit
PCI window to

  0xFC00_0000 - 0xC000_0000 = 0x3C00_0000 = 960 MB.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1859
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
4 years agoRevert "OvmfPkg/PlatformPei: assign PciSize on both i440fx/q35 branches explicitly"
Laszlo Ersek [Wed, 29 May 2019 09:52:03 +0000 (11:52 +0200)]
Revert "OvmfPkg/PlatformPei: assign PciSize on both i440fx/q35 branches explicitly"

This reverts commit 60e95bf5094fbb9b728729ccfaf32184b3662317.

The original fix for <https://bugzilla.tianocore.org/show_bug.cgi?id=1814>
triggered a bug / incorrect assumption in QEMU.

QEMU assumes that the PCIEXBAR is below the 32-bit PCI window, not above
it. When the firmware doesn't satisfy this assumption, QEMU generates an
\_SB.PCI0._CRS object in the ACPI DSDT that does not reflect the
firmware's 32-bit MMIO BAR assignments. This causes OSes to re-assign
32-bit MMIO BARs.

Working around the problem in the firmware looks less problematic than
fixing QEMU. Revert the original changes first, before implementing an
alternative fix.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1859
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
4 years agoRevert "OvmfPkg/PlatformPei: hoist PciBase assignment above the i440fx/q35 branching"
Laszlo Ersek [Wed, 29 May 2019 09:51:44 +0000 (11:51 +0200)]
Revert "OvmfPkg/PlatformPei: hoist PciBase assignment above the i440fx/q35 branching"

This reverts commit 9a2e8d7c65ef7f39c6754d27e52954b616bc6628.

The original fix for <https://bugzilla.tianocore.org/show_bug.cgi?id=1814>
triggered a bug / incorrect assumption in QEMU.

QEMU assumes that the PCIEXBAR is below the 32-bit PCI window, not above
it. When the firmware doesn't satisfy this assumption, QEMU generates an
\_SB.PCI0._CRS object in the ACPI DSDT that does not reflect the
firmware's 32-bit MMIO BAR assignments. This causes OSes to re-assign
32-bit MMIO BARs.

Working around the problem in the firmware looks less problematic than
fixing QEMU. Revert the original changes first, before implementing an
alternative fix.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1859
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
4 years agoRevert "OvmfPkg/PlatformPei: reorder the 32-bit PCI window vs. the PCIEXBAR on q35"
Laszlo Ersek [Wed, 29 May 2019 09:51:26 +0000 (11:51 +0200)]
Revert "OvmfPkg/PlatformPei: reorder the 32-bit PCI window vs. the PCIEXBAR on q35"

This reverts commit 75136b29541b0e093a51d2e2c2af8d19855c2b60.

The original fix for <https://bugzilla.tianocore.org/show_bug.cgi?id=1814>
triggered a bug / incorrect assumption in QEMU.

QEMU assumes that the PCIEXBAR is below the 32-bit PCI window, not above
it. When the firmware doesn't satisfy this assumption, QEMU generates an
\_SB.PCI0._CRS object in the ACPI DSDT that does not reflect the
firmware's 32-bit MMIO BAR assignments. This causes OSes to re-assign
32-bit MMIO BARs.

Working around the problem in the firmware looks less problematic than
fixing QEMU. Revert the original changes first, before implementing an
alternative fix.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1859
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
4 years agoRevert "OvmfPkg/PlatformPei: fix MTRR for low-RAM sizes that have many bits clear"
Laszlo Ersek [Wed, 29 May 2019 09:49:07 +0000 (11:49 +0200)]
Revert "OvmfPkg/PlatformPei: fix MTRR for low-RAM sizes that have many bits clear"

This reverts commit 39b9a5ffe6618b7870be2a54fe7725000249c33a.

The original fix for <https://bugzilla.tianocore.org/show_bug.cgi?id=1814>
triggered a bug / incorrect assumption in QEMU.

QEMU assumes that the PCIEXBAR is below the 32-bit PCI window, not above
it. When the firmware doesn't satisfy this assumption, QEMU generates an
\_SB.PCI0._CRS object in the ACPI DSDT that does not reflect the
firmware's 32-bit MMIO BAR assignments. This causes OSes to re-assign
32-bit MMIO BARs.

Working around the problem in the firmware looks less problematic than
fixing QEMU. Revert the original changes first, before implementing an
alternative fix.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1859
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
4 years agoCryptoPkg CLANG35: add -std=c99 to dodge OpenSSL C atomics issue
Ard Biesheuvel [Mon, 3 Jun 2019 16:19:41 +0000 (18:19 +0200)]
CryptoPkg CLANG35: add -std=c99 to dodge OpenSSL C atomics issue

Commit c51f8bae7cabe ("CryptoPkg: Fix possible build problem with
Clang") added -std=c99 to the CLANG38 compiler command line of
packages that incorporate parts of OpenSSL, to ensure that the new
C atomics code used by OpenSSL for refcounting (which we don't care
about) does not pull in system C library headers, which we cannot
rely on when (cross)building EDK2 code.

Unsurprisingly, CLANG35 (which is only defined for ARM and AARCH64)
suffers from the exact same issue, so let's add the same flags
there as well.

Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
4 years agoCryptoPkg/BaseCryptLib: Make HMAC_CTX size backward compatible
Xiaoyu Lu [Wed, 29 May 2019 18:40:38 +0000 (18:40 +0000)]
CryptoPkg/BaseCryptLib: Make HMAC_CTX size backward compatible

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

OpenSSL internally redefines the size of HMAC_CTX at
crypto/hmac/hmac_lcl.h(OpenSSL commit e0810e35).
Ref: https://github.com/openssl/openssl/pull/4338

We should not use it directly and should remove relevant
functions(Hmac*GetContextSize).
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1792

But for compatiblility, temporarily change these definition
of HMAC_*_CTX_SIZE.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Ting Ye <ting.ye@intel.com>
Signed-off-by: Xiaoyu Lu <xiaoyux.lu@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Gary Lin <glin@suse.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
4 years agoCryptoPkg: Upgrade OpenSSL to 1.1.1b
XiaoyuX Lu [Wed, 29 May 2019 18:40:37 +0000 (18:40 +0000)]
CryptoPkg: Upgrade OpenSSL to 1.1.1b

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

* Update OpenSSL submodule to OpenSSL_1_1_1b
   OpenSSL_1_1_1b(50eaac9f3337667259de725451f201e784599687)

* Run process_files.pl script to regenerate OpensslLib[Crypto].inf
  and opensslconf.h

* Remove -DNO_SYSLOG from OPENSSL_FLAGS in OpensslLib[Crypto].inf,
  due to upstream OpenSSL commit cff55b90e95e("Cleaning UEFI
  Build with additional OPENSSL_SYS_UEFI flags", 2017-03-29),
  which was first released as part of OpenSSL_1_1_1.

* Starting with OpenSSL commit 8a8d9e1905(first release in
  OpenSSL_1_1_1), the OpenSSL_version() function can no longer
  return a pointer to the string literal "compiler: information
  not available", in the case CFLAGS macro is not defined.
  Instead, the function now has a hard dependency on the global
  variable 'compiler_flags'. This variable is normally placed
  by "util/mkbuildinf.pl" into "buildinf.h". In edk2 we don't
  run that script whenever we build OpenSSL, therefore we
  must provide our own dummy 'compiler_flags'.

* BUFSIZ is used by crypto/evp/evp_key.c(OpenSSL_1_1_1b)
  And it is declared in stdio.h. So add it to CrtLibSupport.h.
  Here's a discussion about this.
  Ref: https://github.com/openssl/openssl/issues/8904

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Ting Ye <ting.ye@intel.com>
Signed-off-by: Xiaoyu Lu <xiaoyux.lu@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Gary Lin <glin@suse.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
4 years agoCryptoPkg/OpensslLib: Add functions for upgrading OpenSSL1_1_1b
XiaoyuX Lu [Wed, 29 May 2019 18:40:36 +0000 (18:40 +0000)]
CryptoPkg/OpensslLib: Add functions for upgrading OpenSSL1_1_1b

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

* From OpenSSL_1_1_0i(97c0959f27b294fe1eb10b547145ebef2524b896) to
  OpenSSL_1_1_1b(50eaac9f3337667259de725451f201e784599687), OpenSSL
  updated DRBG / RAND to request nonce and additional low entropy
  randomness from system(line 229 openssl/CHANGES).

  Since OpenSSL_1_1_1b doesn't fully implement rand pool functions
  for UEFI. We must provide a method to implenet these method.
  TSC is used as first entropy source if it's availabe otherwise
  fallback to TimerLib. But we are not sure the amount of randomness
  they provide. If you really care about the security, one choice is
  overrided it with hardware generator.

  Add rand_pool.c to implement these functions required by OpenSSL
    rand_pool_acquire_entropy
    rand_pool_add_nonce_data
    rand_pool_add_additional_data
    rand_pool_init
    rand_pool_cleanup
    rand_pool_keep_random_devices_open

  And add rand_pool_noise.* for getting entropy noise from different
  architecture.

* We don't need ossl_store functions. We exclude relative files
  through process_files.pl. And ossl_store_cleanup_int was first
  added in crypto/init.c OpenSSL_1_1_1(71a5516d).
  So add a new file(ossl_store.c) to implement ossl_store_cleanup_int
  function.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Ting Ye <ting.ye@intel.com>
Signed-off-by: Xiaoyu Lu <xiaoyux.lu@intel.com>
Tested-by: Gary Lin <glin@suse.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
4 years agoCryptoPkg: Fix possible build problem with Clang
XiaoyuX Lu [Wed, 29 May 2019 18:40:35 +0000 (18:40 +0000)]
CryptoPkg: Fix possible build problem with Clang

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

When building CryptoPkg with Clang, blow error may result

* /usr/lib/llvm-3.8/lib/clang/3.8.0/include/stdatomic.h:105:17: error:
    unknown type name 'wchar_t'

Since the C native atomics are C11 feature we can explicitly
use C99 to work around it.
add -std=c99 to avoid it

* openssl/crypto/conf/conf_sap.c:71:12: error: variable 'ret' is
  uninitialized
  when used here [-Werror,-Wuninitialized]

Suppress warnings in OpenSSL so we don't break the build with -Werror.
add -Wno-error=uninitialized to disalbe this warning

Cc: Ting Ye <ting.ye@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Signed-off-by: Xiaoyu Lu <xiaoyux.lu@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
4 years agoCryptoPkg/OpensslLib: Fix cross-build problem for AARCH64
Laszlo Ersek [Wed, 29 May 2019 18:40:34 +0000 (18:40 +0000)]
CryptoPkg/OpensslLib: Fix cross-build problem for AARCH64

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

Thanks Laszlo Ersek <lersek@redhat.com>.
Ref: https://edk2.groups.io/g/devel/message/40375

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Ting Ye <ting.ye@intel.com>
Signed-off-by: Xiaoyu Lu <xiaoyux.lu@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
4 years agoCryptoPkg/OpensslLib: Prepare for upgrading OpenSSL
XiaoyuX Lu [Wed, 29 May 2019 18:40:33 +0000 (18:40 +0000)]
CryptoPkg/OpensslLib: Prepare for upgrading OpenSSL

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

Disable warning for building OpenSSL_1_1_1b

add /wd4132 /wd4700 /wd4310 for Visual Studio in OpensslLib[Crypto].inf

add -Wno-error=unused-but-set-variable for GCC in OpensslLib[Crypto].inf
Although this option is set in some build environments by default.
But this is only for OpenSSL compilation, no matter how the
default options change.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Ting Ye <ting.ye@intel.com>
Signed-off-by: Xiaoyu Lu <xiaoyux.lu@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Gary Lin <glin@suse.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
4 years agoCryptoPkg/IntrinsicLib: Fix possible unresolved external symbol issue
Xiaoyu Lu [Wed, 29 May 2019 18:40:32 +0000 (18:40 +0000)]
CryptoPkg/IntrinsicLib: Fix possible unresolved external symbol issue

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

This is for the upcoming upgrade to OpenSSL_1_1_1b

Compiler optimization(Visual Studio) may automatically use _ftol2
instead of some type conversion. For example:

 OpensslLib.lib(drbg_lib.obj) : error LNK2001:
    unresolved external symbol __ftol2

This patch add _ftol2 function for the compiler intrinsic.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Ting Ye <ting.ye@intel.com>
Signed-off-by: Xiaoyu Lu <xiaoyux.lu@intel.com>
Tested-by: Gary Lin <glin@suse.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
4 years agoCryptoPkg/OpensslLib: Exclude unnecessary files in process_files.pl
Xiaoyu Lu [Wed, 29 May 2019 18:40:31 +0000 (18:40 +0000)]
CryptoPkg/OpensslLib: Exclude unnecessary files in process_files.pl

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

When running process_files.py to configure OpenSSL, we can exclude
some unnecessary files. This can reduce porting time, compiling
time and library size.

Upstream OpenSSL commit 71a5516dcc8a which was as part of
OpenSSL_1_1_1b, Add the STORE module(crypto/store/*).
But UEFI don't use them. So exclude these files.

Functions in crypto/rand/randfile.c OpenSSL and edk2 don't
call them. And it requires more crt runtime support.
So exclude it.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Ting Ye <ting.ye@intel.com>
Signed-off-by: Xiaoyu Lu <xiaoyux.lu@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Gary Lin <glin@suse.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
4 years agoCryptoPkg/OpensslLib: Modify process_files.pl for upgrading OpenSSL
Xiaoyu Lu [Wed, 29 May 2019 18:40:30 +0000 (18:40 +0000)]
CryptoPkg/OpensslLib: Modify process_files.pl for upgrading OpenSSL

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

OpenSSL configure mechanism use --with-rand-seed=xxx option to configure
random number generation.

OpenSSL_1_1_0j(74f2d9c1ec5f5510e1d3da5a9f03c28df0977762)
we use default --with-rand-seed=os option to for building it.

But OpenSSL_1_1_1b(50eaac9f3337667259de725451f201e784599687)
only support seeding NONE for UEFI(rand_unix.c line 93).

This OpenSSL change was introduced in commit
8389ec4b4950 ("Add --with-rand-seed", 2017-07-22).

So add --with-rand-seed=none to process_files.pl.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Ting Ye <ting.ye@intel.com>
Signed-off-by: Xiaoyu Lu <xiaoyux.lu@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Gary Lin <glin@suse.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
4 years agoArmPkg/ArmSoftFloatLib GCC4x: fix build failure
Ard Biesheuvel [Fri, 31 May 2019 20:46:30 +0000 (22:46 +0200)]
ArmPkg/ArmSoftFloatLib GCC4x: fix build failure

The upstream SoftFloat code that was recently incorporated into
ArmSoftFloatLib uses some parameterization to tweak the inlining
and optimization behavior for different compilers.

The custom platform.h file that sets these parameters is based on
the upstream version for Linux/ARM, but was updated to include the
'always_inline' GCC attribute into the INLINE macro, to ensure that
all definitions that are marked as inline are not only inlined into
their callers, but also to ensure that no version of the function is
ever emitted into the object file.

This works fine on recent GCC and Clang, but the latter part turns
out to break on GCC 4.x, resulting duplicate definition linker errors.
Fortunately, the synticatically more appriopriate 'static inline'
works fine on both the recent and the older compilers, so let's switch
to that instead.

Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
4 years agoArmPkg/ArmLib ARM: set .fpu to let Clang 7 assemble ArmV7Support.S
Ard Biesheuvel [Thu, 20 Dec 2018 19:16:53 +0000 (20:16 +0100)]
ArmPkg/ArmLib ARM: set .fpu to let Clang 7 assemble ArmV7Support.S

Clang 7 complains about the vmsr instruction in ArmV7Support.S,
which is only available on cores that implement some flavour of
VFP. So set the .fpu to NEON like we do in some other places.

Acked-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
4 years agoArmPkg/ArmSoftFloatLib: remove source files that are no longer used
Ard Biesheuvel [Fri, 24 May 2019 14:58:40 +0000 (16:58 +0200)]
ArmPkg/ArmSoftFloatLib: remove source files that are no longer used

Now that we have switched to a new version of the SoftFloat code,
remove the source files that make up the old implementation, and
are no longer referenced.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1845
Acked-by: Jian J Wang <jian.j.wang@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
4 years agoArmPkg/ArmSoftFloatLib: switch to new version of softfloat library
Ard Biesheuvel [Fri, 24 May 2019 14:52:13 +0000 (16:52 +0200)]
ArmPkg/ArmSoftFloatLib: switch to new version of softfloat library

Update the INF description and the top level .c files in order to
switch to the new version of the SoftFloat library imported as a
Git submodule in the previous patch.

Note that we no longer use the code that travelled a long way from
the 2002 version of the softfloat library via NetBsd and the StdLib
package. Instead, we are using the upstream version unmodified, with
the glue .c file adopted from the OP-TEE project. This approach is
much cleaner and much more maintainable.

Note that support for the RVCT toolchains is being dropped at the same
time. RVCT is mostly untested, and planned to be removed, and so it
makes little sense to go to the trouble of upgrading this library for
RVCT as well.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1845
Acked-by: Jian J Wang <jian.j.wang@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
4 years agoArmPkg: import Berkeley Softfloat library as git submodule
Ard Biesheuvel [Fri, 24 May 2019 14:05:02 +0000 (16:05 +0200)]
ArmPkg: import Berkeley Softfloat library as git submodule

In preparation of bringing ArmSoftFloatLib up to date in order
to provide some missing routines, import the Berkely SoftFloat
library into the tree as a git submodule.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1845
Acked-by: Jian J Wang <jian.j.wang@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
4 years agoBaseTools:Update binary cache restore time to current time
Steven Shi [Tue, 28 May 2019 08:35:14 +0000 (16:35 +0800)]
BaseTools:Update binary cache restore time to current time

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

Current Binary Cache doesn't update the restored file
creation and modification times to the current time.
Preserve the new restored file creation time as old
cached time might has potential issue to block the make
to build updated files based on the time stamp.
Enhance to update the restored file creation time to
current time.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Zhiju Fan <zhijux.fan@intel.com>
Signed-off-by: Steven Shi <steven.shi@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
4 years agoBaseTools:Extend the binary cache to support library cache
Steven Shi [Thu, 30 May 2019 02:31:27 +0000 (10:31 +0800)]
BaseTools:Extend the binary cache to support library cache

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

Current binary cache doesn't support to save and restore
the library module. If a driver module cache miss happen,
all its dependency library modules need rebuild which
is very time-consuming. This patch is to extend the binary
cache to support library.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Christian Rodriguez <christian.rodriguez@intel.com>
Signed-off-by: Steven Shi <steven.shi@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
4 years agoMdeModulePkg/AhciPei: Fix device cannot be found in non-S3 path
Hao A Wu [Thu, 30 May 2019 01:17:22 +0000 (09:17 +0800)]
MdeModulePkg/AhciPei: Fix device cannot be found in non-S3 path

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

Current implementation of function AhciModeInitialization() has an
incorrect assumption that the value in the CAP (offset 00h) register will
always be greater than the highest bit set for the value in the PI (offset
0Ch) register.

This will lead to an issue that hard disk devices may not be found in the
non-S3 boot path for some AHCI controller capabilities.

More specifically, variable 'PortInitializeBitMap' will have the value
from 'Private->PortBitMap', which will be 0xFFFFFFFF in non-S3 boot path.
When the CAP register is of value 0x1 and PI register with value 0x4
(meaning port 2 is available), the current logic will only enumerate port
0. And the device attached behind port 2 will not be enumerated.

To address this issue, variable 'PortInitializeBitMap' will now take the
bitwise and result between 'Private->PortBitMap' and the value read from
the PI register.

Please note that there will be no function impact for S3 path, since in
this case, the bits being set in 'Private->PortBitMap' will be a subset
of the bits being set in the PI register. Their bitwise and operation will
still be the value of 'Private->PortBitMap'.

Cc: Maggie Chu <maggie.chu@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Signed-off-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
4 years agoIntelFsp2Pkg/SplitFspBin.py: Revert FSP 1.x support.
Chasel Chiu [Fri, 31 May 2019 06:46:41 +0000 (14:46 +0800)]
IntelFsp2Pkg/SplitFspBin.py: Revert FSP 1.x support.

This reverts commit:
  591b8cb7f3d026d2fa4483c59f3d5fb14be181bf.
Will submit again after freeze done.

Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoIntelFsp2Pkg/SplitFspBin.py: Support rebasing 1.x binary.
Chasel Chiu [Tue, 28 May 2019 13:51:39 +0000 (21:51 +0800)]
IntelFsp2Pkg/SplitFspBin.py: Support rebasing 1.x binary.

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

Support rebasing FSP 1.x binary.
FSP 1.x has single component in binary so not supported
by split command and rebase can be done with the same
command for rebasing FSP-T component in FSP 2.x image.

Test: both FSP 2.x (Kabylake) and FSP 1.x (BroadwellDE) binary
      can be rebased successfully.

Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
4 years agoMaintainers.txt: update UEFI payload information
Guo Dong [Wed, 29 May 2019 19:07:29 +0000 (03:07 +0800)]
Maintainers.txt: update UEFI payload information

Remove CorebootModulePkg and CorebootPayloadPkg, and add
UefiPayloadPkg to reflect recently change in UEFI payload.
wiki link for UefiPayloadPkg would be available soon.

Signed-off-by: Guo Dong <guo.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Maurice Ma <maurice.ma@intel.com>
4 years agoMaintainers.txt: update mailing list information
Leif Lindholm [Tue, 28 May 2019 10:15:31 +0000 (11:15 +0100)]
Maintainers.txt: update mailing list information

The devel mailing list has moved from 01.org to groups.io - update
the mailing list information to reflect this.

Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
4 years agoSignedCapsulePkg: Update Package DSC to remove unused network libs
Liming Gao [Tue, 28 May 2019 11:35:09 +0000 (19:35 +0800)]
SignedCapsulePkg: Update Package DSC to remove unused network libs

Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
4 years agoArmPkg: Update Package DSC to remove unused NetLib
Liming Gao [Tue, 28 May 2019 11:34:40 +0000 (19:34 +0800)]
ArmPkg: Update Package DSC to remove unused NetLib

Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
4 years agoUefiPayloadPkg: Update Package DSC files to refer to NetworkLibs.dsc.inc
Liming Gao [Tue, 28 May 2019 11:33:43 +0000 (19:33 +0800)]
UefiPayloadPkg: Update Package DSC files to refer to NetworkLibs.dsc.inc

Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
4 years agoMdeModulePkg: Remove network library header file from package DEC file
Liming Gao [Wed, 15 May 2019 12:02:20 +0000 (20:02 +0800)]
MdeModulePkg: Remove network library header file from package DEC file

Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
4 years agoNetworkPkg: Move Network library header file from MdeModulePkg to NetworkPkg
Liming Gao [Wed, 15 May 2019 12:02:19 +0000 (20:02 +0800)]
NetworkPkg: Move Network library header file from MdeModulePkg to NetworkPkg

Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
4 years agoNetworkPkg: Move Network library and drivers from MdeModulePkg to NetworkPkg
Liming Gao [Wed, 15 May 2019 12:02:18 +0000 (20:02 +0800)]
NetworkPkg: Move Network library and drivers from MdeModulePkg to NetworkPkg

Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
4 years agoBaseTools:Change the path of the file that Binary Cache
Fan, ZhijuX [Fri, 24 May 2019 05:02:18 +0000 (13:02 +0800)]
BaseTools:Change the path of the file that Binary Cache

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

Current Binary Cache use the PlatformInfo.Name to distinguish
the different platform cache paths in the database folder.

But the different platforms might use the same PLATFORM_NAME
in the DSC files. Different platform caches might overlay each
other inside Binary Cache database if they use same platform name

Use the PlatformInfo.Platform.OutputDirectory instead of the
PlatformInfo.Name can solve the problem.

This patch is going to fix that issue.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Steven Shi <steven.shi@intel.com>
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
4 years agoBaseTools: Remove './SecMain' from 'run' target
Bob Feng [Thu, 23 May 2019 09:06:35 +0000 (17:06 +0800)]
BaseTools: Remove './SecMain' from 'run' target

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

This patch is related to commit 9ca1f1
It's to remove the second .SecMain call from 'run' target.

Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
4 years agoMdeModulePkg: Update MdeModulePkg.dsc to remove Network related modules
Liming Gao [Tue, 21 May 2019 15:21:52 +0000 (23:21 +0800)]
MdeModulePkg: Update MdeModulePkg.dsc to remove Network related modules

Network related modules have been included in NetworkPkg.dsc.
They can be removed from MdeModulePkg.dsc.

Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
4 years agoBaseTools: Update Conf/target.template with the default EmulatorPkg.dsc
Liming Gao [Tue, 21 May 2019 15:09:05 +0000 (23:09 +0800)]
BaseTools: Update Conf/target.template with the default EmulatorPkg.dsc

Nt32Pkg has been removed. The default platform is changed to EmulatorPkg.dsc.

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 agoIntelFrameworkModulePkg/DebugLib: Fix string copy issue
Gao, Zhichao [Tue, 21 May 2019 07:49:52 +0000 (15:49 +0800)]
IntelFrameworkModulePkg/DebugLib: Fix string copy issue

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

There is a bug to use AsciiStrCpyS to copy a truncated
string. If would cause an assert because the truncated
length is always less than the source string length. It
should use the AsciiStrnCpyS instead.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoBaseTools: Remove './SecMain' from 'run' target
Feng, Bob C [Fri, 10 May 2019 06:33:36 +0000 (14:33 +0800)]
BaseTools: Remove './SecMain' from 'run' target

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

When a target of 'run' is passed into build.py,
BaseTools unconditionally attempts to execute the
application called './SecMain' in the build output directory.

This behavior applies to the Nt32Pkg which is being
replaced with features in the EmulatorPkg.

Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
4 years agoBaseTools:Update mailing list address in BaseTools error messages
Fan, ZhijuX [Tue, 21 May 2019 02:06:52 +0000 (10:06 +0800)]
BaseTools:Update mailing list address in BaseTools error messages

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

The edk2 source tree contains four instances of the outdated mailing
list address "edk2-devel@lists.01.org".
I created a new variable, MSG_EDKII_MAIL_ADDR, to receive the
new email address and replaced the old one with this variable

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
4 years agoBaseTools: Library hashing fix and optimization for --hash feature
Rodriguez, Christian [Mon, 20 May 2019 14:17:54 +0000 (22:17 +0800)]
BaseTools: Library hashing fix and optimization for --hash feature

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

In V3: Must generate hashes before attempting to copy from cache for
hash verifcation
In V2: Build failure caused by passing incorrect boolean parameter to
SaveFileOnChange(). Fixed for patch instances.

Library hashing is now supported by the --hash feature. The --hash
feature implementation assumed that the hashing could be done in
place once per module, but that isn't true for libraries due to the
fact that they are built as dependencies. So on a clean build, we now
generate the .hash after the library dependencies are complete.
Added early escape as optimization, if hash already exists in memory.

Signed-off-by: Christian Rodriguez <christian.rodriguez@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
4 years agoBaseTools: Fix private includes for FILE_GUID override
Michael D Kinney [Fri, 22 Mar 2019 00:27:20 +0000 (17:27 -0700)]
BaseTools: Fix private includes for FILE_GUID override

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

When a module in a DSC file uses a FILE_GUID override in the
module scoped <Defines> section, a copy of the modified INF file
is placed in the Conf/.cache directory.  The check for private
includes uses the INF path to determine if the module is allowed
to use the private includes.  Since the INF path in this case is
not in any package, this check always fails, and no private
include paths are possible.

The fix is to keep both the OriginalPath and the new Path in
the PathClass object, and always use the OriginalPath to see if
the module INF is in the package with private includes.

Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
4 years agoMaintainers.txt: remove UTF-8 BOM wrongly added in commit 147e6e70
Ray Ni [Fri, 17 May 2019 15:03:59 +0000 (23:03 +0800)]
Maintainers.txt: remove UTF-8 BOM wrongly added in commit 147e6e70

Signed-off-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
4 years agoEmulatorPkg: Add NetworkPkg/NetworkPkg.dec as the package dependency
Liming Gao [Mon, 20 May 2019 12:06:43 +0000 (20:06 +0800)]
EmulatorPkg: Add NetworkPkg/NetworkPkg.dec as the package dependency

NetLib will be moved from MdeModulePkg and NetworkPkg.
So, the module that consumes NetLib need to depend on NetworkPkg.dec.

Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Ray Ni <ray.ni@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
4 years agoShellPkg: Add NetworkPkg/NetworkPkg.dec as the package dependency
Liming Gao [Mon, 20 May 2019 01:57:37 +0000 (09:57 +0800)]
ShellPkg: Add NetworkPkg/NetworkPkg.dec as the package dependency

NetLib will be moved from MdeModulePkg and NetworkPkg.
So, the module that consumes NetLib need to depend on NetworkPkg.dec.

Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
4 years agoShellPkg: Display VENDOR_ID in ASCII when parsing PPTT
Krzysztof Koch [Wed, 8 May 2019 13:13:54 +0000 (06:13 -0700)]
ShellPkg: Display VENDOR_ID in ASCII when parsing PPTT

The ID Type Structure (Type 2) inside the Processor Properties
Topology Table (PPTT) has a VENDOR_ID field which identifies the
node vendor. The approved values are listed in the ACPI ID Registry
and they are meant to be interpreted as arrays of ASCII characters.

This change to the acpiview parser for PPTT aims to reflect that.

Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
4 years agoEmbeddedPkg: Update DSC to use NetworkPkg's include fragment file
Liming Gao [Fri, 17 May 2019 08:50:35 +0000 (16:50 +0800)]
EmbeddedPkg: Update DSC to use NetworkPkg's include fragment file

Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
4 years agoShellPkg: Update DSC to use NetworkPkg's include fragment file
Liming Gao [Fri, 17 May 2019 08:50:34 +0000 (16:50 +0800)]
ShellPkg: Update DSC to use NetworkPkg's include fragment file

Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
4 years agoUefiCpuPkg CpuCommonFeaturesLib: Remove CPU generation check
Star Zeng [Thu, 16 May 2019 10:30:03 +0000 (18:30 +0800)]
UefiCpuPkg CpuCommonFeaturesLib: Remove CPU generation check

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

The checking to CpuInfo->CpuIdVersionInfoEcx.Bits.AESNI is enough,
the checking to CPU generation could be removed, then the code
could be reused by more platforms.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Chandana Kumar <chandana.c.kumar@intel.com>
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
4 years agoShellPkg/UefiShellAcpiViewCommandLib: Fix PPTT cache attributes validation
Krzysztof Koch [Fri, 17 May 2019 15:50:50 +0000 (08:50 -0700)]
ShellPkg/UefiShellAcpiViewCommandLib: Fix PPTT cache attributes validation

Removed conditional pre-compiling for ARM CPUs because function
ValidateCacheAttributes(..) is based on ACPI PPTT specification.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com>
Reported-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Bi Dandan <dandan.bi@intel.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
4 years agoShellPkg: acpiview: Add GT Frame Number validation to GTDT parser
Krzysztof Koch [Thu, 16 May 2019 08:43:35 +0000 (01:43 -0700)]
ShellPkg: acpiview: Add GT Frame Number validation to GTDT parser

The ACPI 6.2 specification mandates that the Generic Timer (GT) Block
Timer Structures must have a frame number in the range 0-7.

Update the GTDT parser to warn if this condition is violated.

Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
4 years agoMaintainers.txt: Add 'Zhichao Gao' for ShellPkg review
Zhichao Gao [Fri, 17 May 2019 00:55:35 +0000 (08:55 +0800)]
Maintainers.txt: Add 'Zhichao Gao' for ShellPkg review

Add 'Zhichao Gao' as a reviewer for ShellPkg.

Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
4 years agoCryptoPkg/BaseCryptLib: remove unused code for IPF
Jian J Wang [Tue, 14 May 2019 14:28:33 +0000 (22:28 +0800)]
CryptoPkg/BaseCryptLib: remove unused code for IPF

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

CryptRandItc.c is only for IPF arch, which has not been supported any
more in edk2. And no module actually reference this file. This patch
just removes it from tree.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Ting Ye <ting.ye@intel.com>
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoMaintainers.txt: Remove Nt32Pkg reference after Nt32Pkg is removed
Ray Ni [Fri, 17 May 2019 04:56:35 +0000 (12:56 +0800)]
Maintainers.txt: Remove Nt32Pkg reference after Nt32Pkg is removed

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: 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>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
4 years agoNt32Pkg: Remove it
Ray Ni [Fri, 17 May 2019 04:55:16 +0000 (12:55 +0800)]
Nt32Pkg: Remove it

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

Now since EmulatorPkg supports to run in Windows environment,
this patch removes Nt32Pkg to remove duplicate code in edk2 repo.

Signed-off-by: Ray Ni <ray.ni@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoUefiCpuPkg: Remove double \r
Joe Richey [Fri, 10 May 2019 09:36:33 +0000 (17:36 +0800)]
UefiCpuPkg: Remove double \r

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Joe Richey <joerichey@google.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
4 years agoOvmfPkg/PlatformPei: fix MTRR for low-RAM sizes that have many bits clear
Laszlo Ersek [Fri, 3 May 2019 14:01:48 +0000 (16:01 +0200)]
OvmfPkg/PlatformPei: fix MTRR for low-RAM sizes that have many bits clear

Assume that we boot OVMF in a QEMU guest with 1025 MB of RAM. The
following assertion will fire:

> ASSERT_EFI_ERROR (Status = Out of Resources)
> ASSERT OvmfPkg/PlatformPei/MemDetect.c(696): !EFI_ERROR (Status)

That's because the range [1025 MB, 4 GB) that we try to mark as
uncacheable with MTRRs has size 3071 MB:

   0x1_0000_0000
  -0x0_4010_0000
  --------------
   0x0_BFF0_0000

The integer that stands for the uncacheable area size has 11 (eleven) bits
set to 1. As a result, covering this size requires 11 variable MTRRs (each
MTRR must cover a naturally aligned, power-of-two sized area). But, if we
need more variable MTRRs than the CPU can muster (such as 8), then
MtrrSetMemoryAttribute() fails, and we refuse to continue booting (which
is justified, in itself).

Unfortunately, this is not difficult to trigger, and the error message is
well-hidden from end-users, in the OVMF debug log. The following
mitigation is inspired by SeaBIOS:

Truncate the uncacheable area size to a power-of-two, while keeping the
end fixed at 4 GB. Such an interval can be covered by just one variable
MTRR.

This may leave such an MMIO gap, between the end of low-RAM and the start
of the uncacheable area, that is marked as WB (through the MTRR default).
Raise the base of the 32-bit PCI MMIO aperture accordingly -- the gap will
not be used for anything.

On Q35, the minimal 32-bit PCI MMIO aperture (triggered by RAM size 2815
MB) shrinks from

  0xE000_0000 - 0xAFF0_0000 = 769 MB

to

  0xE000_0000 - 0xC000_0000 = 512 MB

On i440fx, the minimal 32-bit PCI MMIO aperture (triggered by RAM size
3583 MB) shrinks from

  0xFC00_0000 - 0xDFF0_0000 = 449 MB

to

  0xFC00_0000 - 0xE000_0000 = 448 MB

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1814
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1666941
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1701710
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
4 years agoOvmfPkg/PlatformPei: reorder the 32-bit PCI window vs. the PCIEXBAR on q35
Laszlo Ersek [Tue, 22 Jan 2019 19:56:36 +0000 (20:56 +0100)]
OvmfPkg/PlatformPei: reorder the 32-bit PCI window vs. the PCIEXBAR on q35

Commit 7b8fe63561b4 ("OvmfPkg: PlatformPei: enable PCIEXBAR (aka MMCONFIG
/ ECAM) on Q35", 2016-03-10) claimed that,

  On Q35 machine types that QEMU intends to support in the long term, QEMU
  never lets the RAM below 4 GB exceed 2 GB.

Alas, this statement came from a misunderstanding that occurred while we
worked out the interface contract. In fact QEMU does allow the 32-bit RAM
extend up to 0xB000_0000 (exclusive), in case the RAM size falls in the
range (0x8000_0000, 0xB000_0000) (i.e., the RAM size is greater than
2048MB and smaller than 2816MB).

In turn, such a RAM size (justifiedly) triggers

  ASSERT (TopOfLowRam <= PciExBarBase);

in MemMapInitialization(), because we placed the 256MB PCIEXBAR at
0x8000_0000 (2GB) exactly, relying on the interface contract. (And, the
32-bit PCI window would follow the PCIEXBAR, covering the [0x9000_0000,
0xFC00_0000) range.)

In order to fix this, reorder the 32-bit PCI window against the PCIEXBAR,
as follows:

- start the 32-bit PCI window where it starts on i440fx as well, that is,
  at 2GB or TopOfLowRam, whichever is higher;

- unlike on i440fx, where the 32-bit PCI window extends up to 0xFC00_0000,
  stop it at 0xE000_0000 on q35,

- place the PCIEXBAR at 0xE000_0000.

(We cannot place the PCIEXBAR at 0xF000_0000 because the 256MB MMIO area
that starts there is not entirely free.)

Before this patch, the 32-bit PCI window used to only *end* at the same
spot (namely, 0xFC00_0000) between i440fx and q35; now it will only
*start* at the same spot (namely, 2GB or TopOfLowRam, whichever is higher)
between both boards.

On q35, the maximal window shrinks from

  0xFC00_0000 - 0x9000_0000 = 0x6C00_0000 == 1728 MB

to

  0xE000_0000 - 0x8000_0000 == 1536 MB.

We lose 192 MB of the aperture; however, the aperture is now aligned at
1GB, rather than 256 MB, and so it could fit a 1GB BAR even.

Regarding the minimal window (triggered by RAM size 2815MB), its size is

  0xE000_0000 - 0xAFF0_0000 = 769 MB

which is not great, but probably better than a failed ASSERT.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1814
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1666941
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1701710
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
4 years agoOvmfPkg/PlatformPei: hoist PciBase assignment above the i440fx/q35 branching
Laszlo Ersek [Tue, 22 Jan 2019 19:44:47 +0000 (20:44 +0100)]
OvmfPkg/PlatformPei: hoist PciBase assignment above the i440fx/q35 branching

In the MemMapInitialization() function, we currently assign PciBase
different values, on both branches of the board type check. Hoist the
PciBase assignment from the i440fx branch in front of the "if". This is a
no-op for the i440fx branch. On the q35 branch, we overwrite this value,
hence the change is a no-op on q35 as well.

This is another refactoring for simplifying the rest of this series.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1814
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1666941
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1701710
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
4 years agoOvmfPkg/PlatformPei: assign PciSize on both i440fx/q35 branches explicitly
Laszlo Ersek [Tue, 22 Jan 2019 19:37:31 +0000 (20:37 +0100)]
OvmfPkg/PlatformPei: assign PciSize on both i440fx/q35 branches explicitly

In the MemMapInitialization() function, we currently have a common
PciSize assignment, shared between i440fx and q35. In order to simplify
the rest of this series, lift and duplicate the assignment identically to
both board-specific branches.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1814
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1666941
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1701710
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
4 years agoEmulatorPkg: Update DSC/FDF to use NetworkPkg's include fragment file.
Fu Siyuan [Thu, 16 May 2019 08:18:10 +0000 (16:18 +0800)]
EmulatorPkg: Update DSC/FDF to use NetworkPkg's include fragment file.

This patch updates the platform DSC/FDF files to use the include fragment
files provided by NetworkPkg.
The feature enabling flags in [Defines] section have been updated to use
the NetworkPkg's terms, and the value has been overridden with the original
default value on this platform.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Message-Id: <20190516081810.27840-5-shenglei.zhang@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1293
[lersek@redhat.com: add TianoCore Bugzilla reference]

4 years agoArmVirtPkg: Update DSC/FDF to use NetworkPkg's include fragment file.
Fu Siyuan [Thu, 16 May 2019 08:18:09 +0000 (16:18 +0800)]
ArmVirtPkg: Update DSC/FDF to use NetworkPkg's include fragment file.

This patch updates the platform DSC/FDF files to use the include fragment
files provided by NetworkPkg.
The feature enabling flags in [Defines] section have been updated to use
the NetworkPkg's terms, and the value has been overridden with the original
default value on this platform.

v2:Add check for NETWORK_SNP_ENABLE and NETWORK_TLS_ENABLE.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Julien Grall <julien.grall@linaro.org>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Message-Id: <20190516081810.27840-4-shenglei.zhang@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1293
[lersek@redhat.com: add TianoCore Bugzilla reference]
[lersek@redhat.com: undo spurious whitespace changes]
[lersek@redhat.com: clarify SNP and TLS rejection messages]
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
4 years agoNt32Pkg: Update DSC/FDF to use NetworkPkg's include fragment file.
Fu Siyuan [Thu, 16 May 2019 08:18:08 +0000 (16:18 +0800)]
Nt32Pkg: Update DSC/FDF to use NetworkPkg's include fragment file.

This patch updates the platform DSC/FDF files to use the include fragment
files provided by NetworkPkg.
The feature enabling flags in [Defines] section have be updated to use the
NetworkPkg's terms, and the value have been overridden with the original
default value on this platform.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Message-Id: <20190516081810.27840-3-shenglei.zhang@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1293
[lersek@redhat.com: add TianoCore Bugzilla reference]

4 years agoOvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file.
Fu Siyuan [Thu, 16 May 2019 08:18:07 +0000 (16:18 +0800)]
OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file.

This patch updates the platform DSC/FDF files to use the include fragment
files provided by NetworkPkg.
The feature enabling flags in [Defines] section have been updated to use
the NetworkPkg's terms, and the value has been overridden with the original
default value on this platform.

v2:1.Make the comments before Network definition align other parts.
   2.Set NETWORK_ALLOW_HTTP_CONNECTIONS true.
   3.Remove TcpIoLib in lib classes section.
   4.Withdraw the removal of [PcdsFixedAtBuild.X64].

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Julien Grall <julien.grall@linaro.org>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Message-Id: <20190516081810.27840-2-shenglei.zhang@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1293
[lersek@redhat.com: add TianoCore Bugzilla reference]

4 years agoOvmfPkg/EnrollDefaultKeys: import the non-default key into db
Gary Lin [Thu, 16 May 2019 03:08:34 +0000 (11:08 +0800)]
OvmfPkg/EnrollDefaultKeys: import the non-default key into db

For QA test and development, we may need to test Secure Boot with a
devel key instead of UEFI CA.

This commit adds an argument, "--no-default", to EnrollDefaultKeys.efi.
With the argument, the key from SMBIOS Type 11 will also be enrolled
into db. Besides, the keys in AuthData.c, i.e. Microsoft KEK CA,
Microsoft PCA, and Microsoft UEFI CA will be excluded, so the developer
can easily create a varstore template for a specific key.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Gary Lin <glin@suse.com>
Message-Id: <20190516030834.12203-1-glin@suse.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
4 years agoMdeModulePkg/Library: Remove BaseUefiTianoCustomDecompressLib
Dandan Bi [Fri, 10 May 2019 14:17:56 +0000 (22:17 +0800)]
MdeModulePkg/Library: Remove BaseUefiTianoCustomDecompressLib

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

Since we have merged this one into MdePkg,
remove it now.

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: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
4 years agoNt32Pkg: Update UefiDecompressLib instance path
Dandan Bi [Fri, 10 May 2019 08:35:08 +0000 (16:35 +0800)]
Nt32Pkg: Update UefiDecompressLib instance path

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

Since we will merger the BaseUefiTianoCustomDecompressLib
in MdeModulePkg into BaseUefiDecompressLib in MdePkg and
remove the one in MdeModulePkg. So here update the Platform
to use the UefiDecompressLib instance in MdePkg.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
4 years agoMdePkg: Merge TianoCustomDecompress algorithm into
Dandan Bi [Thu, 9 May 2019 02:27:03 +0000 (10:27 +0800)]
MdePkg: Merge TianoCustomDecompress algorithm into

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

We plan to merge the BaseUefiTianoCustomDecompressLib
in MdeModulePkg into the BaseUefDecompressLib in MdePkg.
In order to reduce the duplicated codes and maintain
easily.
This patch adds a new fdf file in BaseUefDecompressLib
(BaseUefiTianoCustomDecompressLib.inf) to keep the same
functionality and usage model with the one in MdeModulePkg,
and then update consumer to use this new one one and
remove the one in MdeModulePkg finally.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoMdePkg: Add ACPI 6.3 header file
Krzysztof Koch [Wed, 24 Apr 2019 09:50:22 +0000 (10:50 +0100)]
MdePkg: Add ACPI 6.3 header file

The patch includes the following ACPI 6.3 updates:
 1. Reserve CRAT and CDIT table names in ACPI 6.3 header.
    - ACPI 6.3 January 2019, Table 5-30
    - Mantis ID 1883 (https://mantis.uefi.org/mantis/view.php?id=1883)
 2. Add new processor structure flags in PPTT.
    - ACPI 6.3 January 2019, Section 5.2.29
    - Mantis ID 1870 (https://mantis.uefi.org/mantis/view.php?id=1870)
    - Mantis ID 1934 (https://mantis.uefi.org/mantis/view.php?id=1934)
 3. Add SPE support to MADT.
    - ACPI 6.3 January 2019, Table 5-60
    - Mantis ID 1934 (https://mantis.uefi.org/mantis/view.php?id=1934)
 4. Add 'Hot-plug Capable' flag to APIC.
    - ACPI 6.3 January 2019, Table 5-44, Table 5-47 & Table 5-58
    - Mantis ID 1948 (https://mantis.uefi.org/mantis/view.php?id=1948)
 5. Add CNTHV timer to GTDT.
    - ACPI 6.3 January 2019, Section 5.2.24
    - Mantis ID 1851 (https://mantis.uefi.org/mantis/view.php?id=1851)
 6. Add 'Trigger Order' to Platform Communication Channel Identification
    Structure.
    - ACPI 6.3 January 2019, Section 5.2.28
    - Mantis ID 1867 (https://mantis.uefi.org/mantis/view.php?id=1867)
 7. Add Generic Initiator Affinity Structure to SRAT.
    - ACPI 6.3 January 2019, Section 5.2.16.6
    - Mantis ID 1904 (https://mantis.uefi.org/mantis/view.php?id=1904)
 8. Add 'HMAT Enhancements'.
    - ACPI 6.3 January 2019, Section 5.2.27
    - Mantis ID 1914 (https://mantis.uefi.org/mantis/view.php?id=1914)
    - Mantis ID 1959 (https://mantis.uefi.org/mantis/view.php?id=1959)
 9. Fix generic address structure definition to include all address
    space ID keywords.
   - ACPI 6.3 January 2019, Table 5-25
   - Mantis ID 1965 (https://mantis.uefi.org/mantis/view.php?id=1965)
10. Make Acpi63.h the latest ACPI definition.

Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
4 years agoOvmfPkg: Remove duplicated library classes in dxe drivers section in DSC
Zhang, Shenglei [Wed, 15 May 2019 07:24:19 +0000 (15:24 +0800)]
OvmfPkg: Remove duplicated library classes in dxe drivers section in DSC

NetLib,IpIoLib,UdpIoLib and DpcLib already exist in [LibraryClasses].
So the ones in [LibraryClasses.common.DXE_DRIVER] are duplicated,
which should be removed.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Julien Grall <julien.grall@linaro.org>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Message-Id: <20190515072419.23792-1-shenglei.zhang@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1293
[lersek@redhat.com: add TianoCore BZ reference]
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
4 years agoEmbeddedPkg/PrePiLib: Drop dependency on IntelFramework[Module]Pkg
Hao A Wu [Tue, 14 May 2019 03:02:19 +0000 (11:02 +0800)]
EmbeddedPkg/PrePiLib: Drop dependency on IntelFramework[Module]Pkg

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

This commit will remove the dependency on IntelFramework[Module]Pkg from
the PrePiLib.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
4 years agoEmbeddedPkg DSC: Use ReportStatusCodeLib (DXE) in MdeModulePkg
Hao A Wu [Tue, 14 May 2019 03:00:16 +0000 (11:00 +0800)]
EmbeddedPkg DSC: Use ReportStatusCodeLib (DXE) in MdeModulePkg

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

This commit will update the package DSC file to consume the
ReportStatusCodeLib (DXE phase instance) in MdeModulePkg, instead of using
the one in IntelFrameworkModulePkg.

Please note that, the 2 ReportStatusCodeLib are almost identical. Thus,
there is no functional impact for this commit.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
4 years agoSecurityPkg/AuthSeriableLib: Always delete variable in certdb
Zhichao Gao [Mon, 13 May 2019 02:48:27 +0000 (10:48 +0800)]
SecurityPkg/AuthSeriableLib: Always delete variable in certdb

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

While cleaning the certdb, always delete the variable data in
the certdb regardless of its attribute.

Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian Wang <jian.j.wang@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
4 years agoSecurityPkg: Remove double \r
Joe Richey [Fri, 10 May 2019 09:36:32 +0000 (17:36 +0800)]
SecurityPkg: Remove double \r

Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian Wang <jian.j.wang@intel.com>
Signed-off-by: Joe Richey <joerichey@google.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by : Chao Zhang <chao.b.zhang@intel.com>

4 years agoUefiCpuPkg PiSmmCpuDxeSmm: Only support IN/OUT IO save state read (CVE-2018-12182)
Star Zeng [Tue, 19 Dec 2017 01:59:50 +0000 (09:59 +0800)]
UefiCpuPkg PiSmmCpuDxeSmm: Only support IN/OUT IO save state read (CVE-2018-12182)

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1136
CVE: CVE-2018-12182

Customer met system hang-up during serial port loopback test in OS.
It is a corner case happened with one CPU core doing "out dx,al" and
another CPU core(s) doing "rep outs dx,byte ptr [rsi]".

Detailed code flow is as below.

1. Serial port loopback test in OS.
One CPU core: "out dx,al" -> Writing B2h, SMI will happen.
Another CPU core(s): "rep outs dx,byte ptr [rsi]".

2. SMI happens to enter SMM.
"out dx" (SMM_IO_TYPE_OUT_DX) is saved as I/O instruction type in
SMRAM save state for CPU doing "out dx,al".
"rep outs dx" (SMM_IO_TYPE_REP_OUTS) is saved as I/O instruction
type and rsi is save as I/O Memory Address in SMRAM save state for
CPU doing "rep outs dx, byte ptr [rsi]".

NOTE: I/O Memory Address (rsi) is a virtual address mapped by
OS/Virtual Machine.

3. Some SMM code calls EFI_SMM_CPU_PROTOCOL.ReadSaveState() with
EFI_SMM_SAVE_STATE_REGISTER_IO and parse data returned.

For example:
https://github.com/tianocore/edk2/blob/master/QuarkSocPkg/
QuarkNorthCluster/Smm/DxeSmm/QncSmmDispatcher/QNC/QNCSmmSw.c#L76

4. SmmReadSaveState() is executed to read save state for
EFI_SMM_SAVE_STATE_REGISTER_IO.

- The SmmReadSaveState() function in
  "UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c" calls the
  SmmCpuFeaturesReadSaveStateRegister() function, from the platform's
  SmmCpuFeaturesLib instance.

- If that platform-specific function returns EFI_UNSUPPORTED, then
  PiSmmCpuDxeSmm falls back to the common function
  ReadSaveStateRegister(), defined in file
  "UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c".

Current ReadSaveStateRegister() in
UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c is trying to copy data
from I/O Memory Address for EFI_SMM_SAVE_STATE_IO_TYPE_REP_PREFIX,
PF will happen as SMM page table does not know and cover this
OS/Virtual Machine virtual address.

Same case is for SmmCpuFeaturesReadSaveStateRegister() in platform-
specific SmmCpuFeaturesLib instance if it has similar implementation
to read save state for EFI_SMM_SAVE_STATE_REGISTER_IO with
EFI_SMM_SAVE_STATE_IO_TYPE_REP_PREFIX.

Same case is for "ins", 'outs' and 'rep ins'.

So to fix the problem, this patch updates the code to only support
IN/OUT, but not INS/OUTS/REP INS/REP OUTS for SmmReadSaveState().

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
4 years agoedk2: Update Maintainers.txt for packages moved to edk2-platforms
Michael D Kinney [Thu, 9 May 2019 20:34:06 +0000 (13:34 -0700)]
edk2: Update Maintainers.txt for packages moved to edk2-platforms

https://bugzilla.tianocore.org/show_bug.cgi?id=1467
https://bugzilla.tianocore.org/show_bug.cgi?id=1374
https://bugzilla.tianocore.org/show_bug.cgi?id=1793

Remove maintainers for ththe following packages that have been
imported to edk2-platforms/master
  * Omap35xxPkg
  * BeagleBoardPkg
  * QuarkSocPkg
  * QuarkPlatformPkg
  * Vlv2DeviceRefCodePkg
  * Vlv2TbltDevicePkg
  * OptionRomPkg

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Michael Kubacki <michael.a.kubacki@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>
Reviewed-by: Kelly Steele <kelly.steele@intel.com>
4 years agoedk2: Remove packages moved to edk2-platforms
Michael D Kinney [Fri, 10 May 2019 03:42:03 +0000 (20:42 -0700)]
edk2: Remove packages moved to edk2-platforms

https://bugzilla.tianocore.org/show_bug.cgi?id=1467
https://bugzilla.tianocore.org/show_bug.cgi?id=1374
https://bugzilla.tianocore.org/show_bug.cgi?id=1793

Remove the following packages that have been imported to
edk2-platforms/master
  * Omap35xxPkg
  * BeagleBoardPkg
  * QuarkSocPkg
  * QuarkPlatformPkg
  * Vlv2DeviceRefCodePkg
  * Vlv2TbltDevicePkg
  * OptionRomPkg

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Michael Kubacki <michael.a.kubacki@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Michael Kubacki <michael.a.kubacki@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>
Reviewed-by: Kelly Steele <kelly.steele@intel.com>
4 years agoArmPkg/CompilerIntrinsicsLib: Add uread, uwrite GCC assembly sources
Pete Batard [Mon, 13 May 2019 08:54:16 +0000 (09:54 +0100)]
ArmPkg/CompilerIntrinsicsLib: Add uread, uwrite GCC assembly sources

The new sources are a copy of the RVCT version.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Pete Batard <pete@akeo.ie>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
4 years agoArmPkg/CompilerIntrinsicsLib: Add lasr ARM assembly source for GCC
Pete Batard [Mon, 13 May 2019 08:54:15 +0000 (09:54 +0100)]
ArmPkg/CompilerIntrinsicsLib: Add lasr ARM assembly source for GCC

The new source is a port of the RVCT version.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Pete Batard <pete@akeo.ie>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
4 years agoArmPkg/CompilerIntrinsicsLib: Add memcmp, memmove intrinsics for MSFT
Pete Batard [Mon, 13 May 2019 08:54:14 +0000 (09:54 +0100)]
ArmPkg/CompilerIntrinsicsLib: Add memcmp, memmove intrinsics for MSFT

We could have reused memmove.asm for ARM, but we would still need to add
an implemention for ARM64, so we use the same source for both archs.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Pete Batard <pete@akeo.ie>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
4 years agoArmPkg/CompilerIntrinsicsLib: Remove unused sources and clean up .inf
Pete Batard [Mon, 13 May 2019 08:54:13 +0000 (09:54 +0100)]
ArmPkg/CompilerIntrinsicsLib: Remove unused sources and clean up .inf

None of the .c/.h in Arm/ are used any more => remove them.
Also merge the CC flags for MSFT ARM and ARM64, since these are the
only archs we support for this package.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Pete Batard <pete@akeo.ie>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
4 years agoBaseTools/VfrCompile: clean Framework Vfr support
Dandan Bi [Fri, 10 May 2019 05:22:15 +0000 (13:22 +0800)]
BaseTools/VfrCompile: clean Framework Vfr support

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

This commit is to do the cleanup which are missing in
previous commit 1b72fd5121b5b31918be0a9a0868a39070d4c8d4
BaseTools/VfrCompile: Remove framework VFR support

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoUefiCpuPkg: Remove double \r
Joe Richey [Fri, 10 May 2019 08:06:57 +0000 (16:06 +0800)]
UefiCpuPkg: Remove double \r

These files have \r\n line endings, but a few lines use \r\r\n which
is not a valid line ending. These lines were causing problems for git
and other tools.

Signed-off-by: Joe Richey <joerichey@google.com>
Review-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
4 years agoCoreboot*Pkg: Retire CorebootPayloadPkg and CorebootModulePkg
Maurice Ma [Fri, 10 May 2019 17:39:08 +0000 (10:39 -0700)]
Coreboot*Pkg: Retire CorebootPayloadPkg and CorebootModulePkg

RFC: https://edk2.groups.io/g/devel/message/39126

Since UefiPayloadPkg in EDK2 supports Coreboot and Slim Bootloader,
and I don't receive any concerns for the RFC to remove CorebootModulePkg
and CorebootPayloadPkg from EDK2, here is the action patch to remove
CorebootPayloadPkg and CorebootModulePkg.

Signed-off-by: Guo Dong <guo.dong@intel.com>
Cc: Prince Agyeman <prince.agyeman@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Reviewed-by: Maurice Ma <maurice.ma@intel.com>
4 years agoBaseTools: Check the fread function and avoid dead loop
Liu, Zhiguang [Fri, 10 May 2019 01:50:32 +0000 (09:50 +0800)]
BaseTools: Check the fread function and avoid dead loop

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

If the input file is not a valid file, it may cause dead loop,
because the return of fread function is not checked.

Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Bob 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:Enables FFS to support the GUID value format
Fan, ZhijuX [Thu, 9 May 2019 11:58:32 +0000 (19:58 +0800)]
BaseTools:Enables FFS to support the GUID value format

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

Per FDF spec, FFS Rule can specify the hard code FILE Guid value.
But,BaseTools reports the build failure.It should be fixed.

This patch is going to fix that issue.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
4 years agoBaseTools: Correct the value assignment for StructurePcd
Fan, ZhijuX [Thu, 9 May 2019 09:19:56 +0000 (17:19 +0800)]
BaseTools: Correct the value assignment for StructurePcd

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

This patch is to fix the code bug in StructurePcd overall
value assignment logic. If a Pcd Array size is fixed but the
size of actual value in Dsc or Dec is bigger than the Pcd
array size, the tool will report error about such setting and
stop build.

The patch is tested minplatform, Ovmf, structure pcd regression test
These tests are build pass. The patch also tested the following cases.
Our cases focused on PcdArraySize. 1.flexiable PcdArraySize.
 2.Fixed PcdArraySize, Pcd overall value exceeds the size of PcdArray.
 3.Fixed PcdArraySize, Pcd overall value Not exceeds the size of PcdArray.

Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
4 years agoMdeModulePkg: BaseSerialPortLib16550: Add missing Pcd to UNI
Tien Hock, Loh [Thu, 9 May 2019 09:19:54 +0000 (17:19 +0800)]
MdeModulePkg: BaseSerialPortLib16550: Add missing Pcd to UNI

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

Some buses doesn't allow 8 bit MMIO read/write, this adds support for
32 bits read/write. This patch adds the UNI information on the new Pcd
introduced - PcdSerialRegisterAccessWidth

Signed-off-by: "Tien Hock, Loh" <tien.hock.loh@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: "Zhu, YongHong" <yonghong.zhu@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
4 years agoOvmfPkg/QemuVideoDxe: Remove dependency on OptionRomPkg
Michael D Kinney [Thu, 9 May 2019 17:38:07 +0000 (10:38 -0700)]
OvmfPkg/QemuVideoDxe: Remove dependency on OptionRomPkg

Update the QemuVideoDxe driver to not depend on the
OptionRomPkg to support moving OptionRomPkg to the
edk2-platforms repository.

The only dependency on the OptionRomPkg is the use of
PcdDriverSupportedEfiVersion to set the version value in the
EFI Driver Supported EFI Version Protocol.

Quoting the UEFI-2.8 spec, "This protocol is required for EFI
drivers that are *on* PCI and other plug in cards" (emphasis ours).
However, QemuVideoDxe is always part of the OVMF platform firmware,
and is never read by PciBusDxe from the PCI ROM BAR of QEMU's
emulated graphics cards.

Since this protocol does not apply to QEMU environment, remove
both the PCD and the installation of the EFI Driver Supported EFI
Version Protocol.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
4 years agoVlv2TbltDevicePkg: Update Readme.md
Michael D Kinney [Wed, 8 May 2019 22:42:07 +0000 (15:42 -0700)]
Vlv2TbltDevicePkg: Update Readme.md

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>
4 years agoVlv2TbltDevicePkg/Capsule: Add Linux/LVFS generation scripts
Michael D Kinney [Wed, 8 May 2019 22:16:31 +0000 (15:16 -0700)]
Vlv2TbltDevicePkg/Capsule: Add Linux/LVFS generation scripts

Add batch scripts to generate the LVFS compatible capsule
update driver.

Add DSC/FDF files to build capsules and invoke post build
shell scripts for Linux build environments.

Make versions consistent.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>
Reviewed-by: Yi Qian <yi.qian@intel.com>
4 years agoVlv2TbltDevicePkg/Capsule: Remove path to openssl tools
Michael D Kinney [Wed, 8 May 2019 22:12:41 +0000 (15:12 -0700)]
Vlv2TbltDevicePkg/Capsule: Remove path to openssl tools

Remove path to openssl tools from batch scripts.  Instead,
the path to the openssl tools must be included in PATH for
a build to complete.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>
Reviewed-by: Yi Qian <yi.qian@intel.com>
4 years agoVlv2TbltDevicePkg/Capsule: Do not clear UEFI varstore
Michael D Kinney [Wed, 8 May 2019 22:02:51 +0000 (15:02 -0700)]
Vlv2TbltDevicePkg/Capsule: Do not clear UEFI varstore

Preserve the UEFI Variable store when a capsule update is
performed.  UEFI Variables are used to store firmware version
information for the sample devices (Red, Green, Blue).

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>
Reviewed-by: Yi Qian <yi.qian@intel.com>
4 years agoVlv2TbltDevicePkg: Remove directory assumptions from build scripts
Michael D Kinney [Wed, 8 May 2019 22:23:13 +0000 (15:23 -0700)]
Vlv2TbltDevicePkg: Remove directory assumptions from build scripts

In preparation for moving Vlv2TbltDevicePkg to the
edk2-platforms repository, the batch scripts used to build
this platform are updated to not make any assumptions about
the directory location of Vlv2TbltDevicePkg.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>
Reviewed-by: Yi Qian <yi.qian@intel.com>
4 years agoVlv2TbltDevicePkg/Stitch/Gcc: Update default setting binary
Michael D Kinney [Wed, 8 May 2019 21:39:26 +0000 (14:39 -0700)]
Vlv2TbltDevicePkg/Stitch/Gcc: Update default setting binary

Update the binary file that contains the default configuration
settings.  This file is generated using FCE.exe during a
Windows build and this binary file needs to be updated when
there are changes to the configuration setting layout or
configuration setting default values.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>
Reviewed-by: Yi Qian <yi.qian@intel.com>
4 years agoVlv2TbltDevicePkg: Always enable QuietBoot to produce BGRT
Michael D Kinney [Wed, 8 May 2019 22:04:06 +0000 (15:04 -0700)]
Vlv2TbltDevicePkg: Always enable QuietBoot to produce BGRT

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>
Reviewed-by: Yi Qian <yi.qian@intel.com>
4 years agoVlv2TbltDevicePkg: Add PchInitSmm module
Michael D Kinney [Wed, 8 May 2019 22:32:50 +0000 (15:32 -0700)]
Vlv2TbltDevicePkg: Add PchInitSmm module

Add the PcdInitSmm module that should not have been
removed.  This module performs actions at Exit Boot
Services to place devices in an OS compatible state.
Without this module, some versions of Linux can not
boot.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>
Reviewed-by: Yi Qian <yi.qian@intel.com>
4 years agoVlv2TbltDevicePkg: Use CpuDxe from UefiCpuPkg
Michael D Kinney [Wed, 8 May 2019 22:29:35 +0000 (15:29 -0700)]
Vlv2TbltDevicePkg: Use CpuDxe from UefiCpuPkg

Use the CpuDxe module from the UefiCpuPkg instead of the binary
MpCpu module.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>
Reviewed-by: Yi Qian <yi.qian@intel.com>
4 years agoVlv2TbltDevicePkg: Build full UEFI Shell from sources
Michael D Kinney [Wed, 8 May 2019 22:25:47 +0000 (15:25 -0700)]
Vlv2TbltDevicePkg: Build full UEFI Shell from sources

Update DSC files to build full UEFI Shell from sources.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>
Reviewed-by: Yi Qian <yi.qian@intel.com>