Commit Graph

26138 Commits

Author SHA1 Message Date
Gary Lin 89d7c543cf 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>
2019-05-16 15:36:04 +02:00
Dandan Bi bf502ae449 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>
2019-05-15 21:02:59 +08:00
Dandan Bi 805313dbac 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>
2019-05-15 20:48:27 +08:00
Dandan Bi 3f0055c8de 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>
2019-05-15 20:48:26 +08:00
Krzysztof Koch a40f30398a 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>
2019-05-15 20:04:58 +08:00
Zhang, Shenglei a11d371ef6 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>
2019-05-15 11:08:50 +02:00
Hao A Wu 32f345eba7 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>
2019-05-15 16:31:26 +08:00
Hao A Wu f0b8166505 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>
2019-05-15 16:31:20 +08:00
Zhichao Gao e90ea9470a 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>
2019-05-15 13:00:37 +08:00
Joe Richey 4000f249ba 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>
2019-05-15 12:57:20 +08:00
Star Zeng cf574f0a18 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>
2019-05-14 15:54:57 +08:00
Michael D Kinney 83f997e58d 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>
2019-05-13 15:58:52 -07:00
Michael D Kinney 5347c48016 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>
2019-05-13 15:30:42 -07:00
Pete Batard 96ef5a8e30 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>
2019-05-13 16:54:38 +01:00
Pete Batard d039044be4 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>
2019-05-13 16:54:29 +01:00
Pete Batard 482704df27 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>
2019-05-13 16:53:51 +01:00
Pete Batard c4521157bf 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>
2019-05-13 16:53:38 +01:00
Dandan Bi 4ff689d982 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 1b72fd5121
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>
2019-05-13 09:18:16 +08:00
Joe Richey e2aaec4b08 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>
2019-05-13 08:45:22 +08:00
Maurice Ma f684c3f5ee 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>
2019-05-10 10:53:45 -07:00
Liu, Zhiguang ae3c247dbc 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>
2019-05-10 17:18:00 +08:00
Fan, ZhijuX 6b74ccf0f8 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>
2019-05-10 17:07:07 +08:00
Fan, ZhijuX afe8c4110c 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>
2019-05-10 17:06:44 +08:00
Tien Hock, Loh 70023bab7e 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>
2019-05-10 16:43:22 +08:00
Michael D Kinney cd5147734c 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>
2019-05-09 20:03:26 -07:00
Michael D Kinney 62fdb9bbc5 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>
2019-05-09 19:58:06 -07:00
Michael D Kinney 1bb262ea04 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>
2019-05-09 19:58:06 -07:00
Michael D Kinney f2197f0d0c 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>
2019-05-09 19:58:06 -07:00
Michael D Kinney 447597f123 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>
2019-05-09 19:58:06 -07:00
Michael D Kinney 9d87197eda 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>
2019-05-09 19:58:06 -07:00
Michael D Kinney ef81f9f12a 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>
2019-05-09 19:58:05 -07:00
Michael D Kinney a4390a28b8 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>
2019-05-09 19:58:05 -07:00
Michael D Kinney 76386f4292 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>
2019-05-09 19:58:05 -07:00
Michael D Kinney 86be1a2eaa 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>
2019-05-09 19:58:05 -07:00
Michael D Kinney 5cf0cb1582 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>
2019-05-09 19:58:05 -07:00
Michael D Kinney 927926f454 Vlv2TbltDevicePkg: Find UEFI Shell using gUefiShellFileGuid
Remove use of PCD PcdShellFile from the IntelFrameworkModulePkg
and instead use gUefiShellFileGuid to find the UEFI Shell in
an FV.

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>
2019-05-09 19:58:05 -07:00
Michael D Kinney f4aa56e7cc Vlv2TbltDevicePkg/SmBiosMiscDxe: Fix GCC build issue
Fix loop comparison for end of languages.

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>
2019-05-09 19:58:05 -07:00
Michael D Kinney e5a0cf9125 Vlv2TbltDevicePkg/PpmPolicy: Fix call to MP Services Protocol
The NumberOfEnabledProcessors parameter to the MP Services
Protocol service GetNumberOfProcessors() is not optional and is
not allowed to be NULL.  Add the CpuEnabledCount local variable
and pass it into GetNumberOfProcessors().

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>
2019-05-09 19:58:05 -07:00
Michael D Kinney 24990e84d3 Vlv2TbltDevicePkg/AcpiPlatform: Add variable protocols to depex
Add the arch protocols gEfiVariableArchProtocolGuid and
gEfiVariableWriteArchProtocolGuid to the dependency expression
for the AcpiPlatform module to guarantee that the variables
that AcpiPlatform depends upon are set before they are used by
this 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>
2019-05-09 19:58:05 -07:00
Michael D Kinney f635a42e14 Vlv2TbltDevicePkg/AcpiPlatform: Change Size type to UINTN
Change the type of the local variable Size in the function
AcpiPlatformEntryPoint() from UINT32 to UINTN.  This local
variable is passed into the function ReadSection() that returns
a value of type UINTN.  Using type UINT32 can potentially
corrupt an adjacent local on the stack.

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>
2019-05-09 19:58:05 -07:00
Michael D Kinney 3eac7496be Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add error return
If the FLASH device cannot be erased or written, then the
flag FlashError is set to TRUE.

Add the missing logic to return an error if FlashError
is TRUE.  The missing logic was found from a GCC build that
noticed a local variable was declared and assigned, but was
not being used.

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>
2019-05-09 19:58:05 -07:00
Zhiguang Liu 21d5bf86b2 EmulatorPkg: Remove framework pkgs dependency from EmulatorPkg
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1721

Remove two inf files form EmulatorPkg.

About IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf,
this inf file is not included in the EmulaotrPkg.fdf,
which means the StatusCodePei.inf does't work at all,
so it is ok to remove it from EmulatorPkg.

About IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBusDxe.inf,
in the inf file, we can see it consumes gEfiIdeControllerInitProtocolGuid.
there are only two inf files in the edk project that produce this Protocol,
as belows:
    PcAtChipsetPkg\Bus\Pci\IdeControllerDxe\IdeControllerDxe.inf
    MdeModulePkg\Bus\Pci\SataControllerDxe\SataControllerDxe.inf
However, neither of them is included in the EmulatorPkg.dsc.
It means the IdeBusDxe.inf can't work at all,
so it is ok to remove it from EmulatorPkg.

Signed-off-by: Zhiguang Liu <zhiguang.liu@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>
2019-05-10 10:49:57 +08:00
Zhiguang Liu 68cafc7bf0 EmulatorPkg: Save the modified order after rebooting
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1650

Use memory mapped FV device path
by adding FvNameGuid to EmulatorPkg.fdf file.

Signed-off-by: Zhiguang Liu <zhiguang.liu@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>
2019-05-10 10:49:52 +08:00
Zhiguang Liu 0e92957eaa EmulatorPkg: Make the shell be the first boot option
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1649

Make the shell be the first boot option by default,
So it can boot into UEFI Internal Shell directly

Signed-off-by: Zhiguang Liu <zhiguang.liu@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>
2019-05-10 10:49:45 +08:00
Zhiguang Liu ad9df93770 EmulatorPkg: Change the cpu frequency to a non-zero value
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1686

The valuse of 1234 is a fake value for CPU frequency.

Signed-off-by: Zhiguang Liu <zhiguang.liu@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>
2019-05-10 10:48:51 +08:00
Hao A Wu 8522ce2c9f Maintainers.txt: Update the name of 'Hao Wu' to 'Hao A Wu'
This commit will update the name of 'Hao Wu' to 'Hao A Wu' to match the
mail address.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-05-10 10:44:23 +08:00
Zhichao Gao 30a888b5a0 IntelSiliconPkg/IntelVTdDxe: Do global invalidation before boot
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1547

V2:
Abandon V1.
Do global invalidation of context-cache and IOTLB at
ExitBootServices.

V1:
Only doing IOTLB invalidation would cause a BSOD
'DRIVER_VERIFIER_DMA_VIOLATION' while changing the second
level page entry's attributes. So always do the global
invalidation of context-cache and IOTLB.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
2019-05-10 08:34:45 +08:00
xuwei6 0a506fc7ab MdeModulePkg: Remove BootInRecoveryMode PPI
DEPEX from PEI storage stack.

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

BootInRecoveryMode Ppi dependency should be removed from PEI storage stack
drivers. Besides recovery, more features are using the storage stack.
Platform can apply Ppi dependency in Recovery FV which contains full
storage driver stack. Platform storage stack modules, such as host
controller init PEI module, should also remove this dependency.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com>
2019-05-09 20:52:41 +08:00
xuwei6 20af3a7a3e FatPkg/FatPei: Remove BootInRecoveryMode PPI DEPEX.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1777

BootInRecoveryMode Ppi dependency should be removed from PEI storage stack
drivers. Besides recovery, more features are using the storage stack.
Platform can apply Ppi dependency in Recovery FV which contains full
storage driver stack. Platform storage stack modules, such as host
controller init PEI module, should also remove this dependency.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com>
2019-05-09 20:52:40 +08:00
Fan, ZhijuX 49693202ec Revert "BaseTools:code of test python module is moved to edksetup"
This reverts commit df7c81b5b2.

In commint df7c81b5b219c9,used a function to test python module
But the Boolean value of the return value of this function is the
opposite of the Correct result, resulting in an unexpected result

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>
2019-05-09 19:02:35 +08:00