]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
18 months agoMdePkg: Add Tls configuration related define
Yi Li [Sat, 7 May 2022 07:37:32 +0000 (15:37 +0800)]
MdePkg: Add Tls configuration related define

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

Consumed by TlsSetEcCurve and TlsSetSignatureAlgoList.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Yi Li <yi1.li@intel.com>
Acked-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months agoCryptoPkg: Fix integer overflow
Yuan Yu [Wed, 28 Sep 2022 07:49:24 +0000 (15:49 +0800)]
CryptoPkg: Fix integer overflow

SECSPERDAY is 86400 which exceeds the limit of a UINT16 which is 65536.
Therefore DayRemainder cannot use UINT16. This patch makes it UINT32.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Julien Grall <julien@xen.org>
Signed-off-by: Yuan Yu <yuanyu@google.com>
Reviewed-by: Ard Biesheuvel <ardb+tianocore@kernel.org>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
18 months agoMdeModulePkg: Handle InitialVFs=0 case for SR-IOV
Foster Nong [Thu, 29 Sep 2022 09:20:01 +0000 (17:20 +0800)]
MdeModulePkg: Handle InitialVFs=0 case for SR-IOV

Per the section 3.3.5 SR-IOV spec v1.1, InitialVFs (0ch).
InitialVFs indicates to SR-PCIM the number of VFs that are initially associated with the PF.
The minimum value of InitialVFs is 0.

Below code is used to calculate SR-IOV reserved bus number,
if InitialVFs =0, it maybe calculate the wrong bus number in this case.
  LastVF = PFRid + FirstVFOffset + (PciIoDevice->InitialVFs - 1) * VFStride

we can fix it with below code:
 if (PciIoDevice->InitialVFs == 0) {
 PciIoDevice->ReservedBusNum = 0;
} else {
PFRid  = EFI_PCI_RID (Bus, Device, Func);
 LastVF = PFRid + FirstVFOffset + (PciIoDevice->InitialVFs - 1) * VFStride;
//
// Calculate ReservedBusNum for this PF
//
PciIoDevice->ReservedBusNum = (UINT16)(EFI_PCI_BUS_OF_RID (LastVF) - Bus + 1);
//
 // Calculate ReservedBusNum for this PF
//
 PciIoDevice->ReservedBusNum = (UINT16)(EFI_PCI_BUS_OF_RID (LastVF) - Bus + 1);
}

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

Signed-off-by: Foster Nong <foster.nong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
18 months agoUefiCpuPkg: Reset a parameter when BSP Exit in CPU relaxed mode.
Zhihao Li [Tue, 27 Sep 2022 12:57:38 +0000 (20:57 +0800)]
UefiCpuPkg: Reset a parameter when BSP Exit in CPU relaxed mode.

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

In CPU relaxed mode, it doesn't reset the value of
mSmmMpSyncData->AllApArrivedWithException when BSP exit smm mode.
So this patch will reset this variable.

Cc: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Signed-off-by: Zhihao Li <zhihao.li@intel.com>
Reviewed-by: Abner Chang <abner.chang@amd.com>
18 months agoUefiCpuPkg/CpuExceptionHandlerLib: Code optimization to allow bigger stack
Tan, Dun [Thu, 29 Sep 2022 09:06:51 +0000 (17:06 +0800)]
UefiCpuPkg/CpuExceptionHandlerLib: Code optimization to allow bigger stack

This commit is a code optimization to allow bigger seperate stack size in
ArchSetupExceptionStack. In previous code logic, CPU_STACK_ALIGNMENT bytes
will be wasted if StackTop is already CPU_STACK_ALIGNMENT aligned.

Signed-off-by: Dun Tan <dun.tan@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Reviewed-by: Abner Chang <abner.chang@amd.com>
18 months agoOvmfPkg: rename QemuBootOrderNNNN to VMMBootOrderNNNN
Gerd Hoffmann [Tue, 4 Oct 2022 11:21:57 +0000 (13:21 +0200)]
OvmfPkg: rename QemuBootOrderNNNN to VMMBootOrderNNNN

While the actual implementation (using qemu fw_cfg) is qemu-specific,
the idea to store the boot order as configured by the VMM in EFI
variables is not.  So lets give the variables a more neutral name while
we still can (i.e. no stable tag yet with the new feature).

While being at it also fix the NNNN format (use %x instead of %d for
consistency with BootNNNN).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
18 months agoRevert "OvmfPkg/Microvm: no secure boot"
Gerd Hoffmann [Thu, 6 Oct 2022 11:05:26 +0000 (13:05 +0200)]
Revert "OvmfPkg/Microvm: no secure boot"

This reverts commit 60d55c4156523e5dfb316b7c0c445b96c8f8be81.

Now that we have stateless secure boot support (which doesn't
need SMM) in OVMF we can enable the build option for MicroVM.

Bring it back by reverting the commit removing it.
Also add the new PlatformPKProtectionLib.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
18 months agoOvmfPkg/Microvm: add SECURE_BOOT_FEATURE_ENABLED
Gerd Hoffmann [Thu, 6 Oct 2022 11:05:25 +0000 (13:05 +0200)]
OvmfPkg/Microvm: add SECURE_BOOT_FEATURE_ENABLED

Compiler flag is needed to make (stateless) secure boot be actually
secure, i.e. restore EFI variables from ROM on reset.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
18 months agoOvmfPkg/PciHotPlugInitDxe: reserve more mmio space
Gerd Hoffmann [Tue, 4 Oct 2022 13:47:28 +0000 (15:47 +0200)]
OvmfPkg/PciHotPlugInitDxe: reserve more mmio space

In case the 64-bit pci mmio window is larger than the default size
of 32G be generous and hand out larger chunks of address space for
prefetchable mmio bridge windows.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
18 months agoOvmfPkg/PlatformInitLib: dynamic mmio window size
Gerd Hoffmann [Tue, 4 Oct 2022 13:47:27 +0000 (15:47 +0200)]
OvmfPkg/PlatformInitLib: dynamic mmio window size

In case we have a reliable PhysMemAddressWidth use that to dynamically
size the 64bit address window.  Allocate 1/8 of the physical address
space and place the window at the upper end of the address space.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
18 months agoOvmfPkg/PlatformInitLib: detect physical address space
Gerd Hoffmann [Tue, 4 Oct 2022 13:47:26 +0000 (15:47 +0200)]
OvmfPkg/PlatformInitLib: detect physical address space

Try detect physical address space, when successful use it.
Otherwise go continue using the current guesswork code path.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
18 months agoOvmfPkg/PlatformInitLib: qemu cpuid physbits detection
Gerd Hoffmann [Tue, 4 Oct 2022 13:47:25 +0000 (15:47 +0200)]
OvmfPkg/PlatformInitLib: qemu cpuid physbits detection

Add some qemu specific quirks to PlatformAddressWidthFromCpuid()
to figure whenever the PhysBits value returned by CPUID is
something real we can work with or not.

See the source code comment for details on the logic.

Also apply some limits to the address space we are going to use:
 * Place a hard cap at 47 PhysBits (128 TB) to avoid using addresses
   which require 5-level paging support.
 * Cap at 40 PhysBits (1 TB) in case the CPU has no support for
   gigabyte pages, to avoid excessive amounts of pages being
   used for page tables.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
18 months agoMdeModulePkg/UefiBootManagerLib: Add Disk Info support for Ufs
Jeff Brasen [Thu, 6 Oct 2022 14:44:38 +0000 (08:44 -0600)]
MdeModulePkg/UefiBootManagerLib: Add Disk Info support for Ufs

Add support for getting disk info from UFS devices.

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
18 months ago.azurepipelines: Add SourceLevelDebugPkg to CI
Michael Kubacki [Tue, 4 Oct 2022 15:05:37 +0000 (11:05 -0400)]
.azurepipelines: Add SourceLevelDebugPkg to CI

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

Adds SourceLevelDebugPkg to the "OTHER" CI matrix job so it is built
in edk2 CI.

Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Hao A Wu <hao.a.wu@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months agoSourceLevelDebugPkg: Add package CI YAML file
Michael Kubacki [Tue, 4 Oct 2022 15:01:50 +0000 (11:01 -0400)]
SourceLevelDebugPkg: Add package CI YAML file

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

Adds the package as a supported package to .pytool/CISettings.py
and adds a CI YAML for the package so it can be run in CI.

Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months agoSourceLevelDebugPkg: Fix spelling errors
Michael Kubacki [Tue, 4 Oct 2022 14:55:27 +0000 (10:55 -0400)]
SourceLevelDebugPkg: Fix spelling errors

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

Fixes spelling errors in the package so the SpellCheck CI plugin can
be enabled.

Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months agoIntelFsp2WrapperPkg: Remove CI exception of PlatformMultiPhaseLib.
Chasel Chiu [Wed, 5 Oct 2022 01:04:40 +0000 (18:04 -0700)]
IntelFsp2WrapperPkg: Remove CI exception of PlatformMultiPhaseLib.

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

Duplicate library class header issue will be resolved and CI
exception for FspWrapperPlatformMultiPhaseLib should be removed too.

Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com>
18 months agoIntelFsp2WrapperPkg: Add header for PlatformMultiPhaseLib.
Chasel Chiu [Tue, 4 Oct 2022 20:10:14 +0000 (13:10 -0700)]
IntelFsp2WrapperPkg: Add header for PlatformMultiPhaseLib.

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

To comply with coding style rule each library class
should have its own header even if it is just a private child library
instance consumed by parent public library in the same package.

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: Nate DeSimone <nathaniel.l.desimone@intel.com>
18 months ago.azurepipelines: Add SignedCapsulePkg to CI
Michael Kubacki [Thu, 1 Sep 2022 18:54:12 +0000 (14:54 -0400)]
.azurepipelines: Add SignedCapsulePkg to CI

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

Adds SignedCapsulePkg to the "OTHER" CI matrix job so it is built
in edk2 CI.

Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Jian J Wang <jian.j.wang@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months agoSignedCapsulePkg: Add package CI YAML file
Michael Kubacki [Thu, 1 Sep 2022 18:51:45 +0000 (14:51 -0400)]
SignedCapsulePkg: Add package CI YAML file

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

Adds the package as a supported package to .pytool/CISettings.py
and adds a CI YAML for the package so it can be run in CI.

Cc: Jian J Wang <jian.j.wang@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months ago.azurepipelines: Add IntelFsp2Pkg and IntelFsp2WrapperPkg to CI
Michael Kubacki [Tue, 6 Sep 2022 21:19:17 +0000 (17:19 -0400)]
.azurepipelines: Add IntelFsp2Pkg and IntelFsp2WrapperPkg to CI

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

Adds these packages to a new edk2 matrix job so they can be validated
in edk2 CI.

Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months agoIntelFsp2WrapperPkg: Add CI YAML file
Michael Kubacki [Tue, 6 Sep 2022 21:18:28 +0000 (17:18 -0400)]
IntelFsp2WrapperPkg: Add CI YAML file

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

Adds IntelFsp2WrapperPkg to the list of supported build packages
for edk2 CI and defines an initial set of CI configuration options.

Adds a special case for the Library Class check CI plugin to ignore
FspWrapperPlatformMultiPhaseLib with an explanatory comment.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney>
18 months agoIntelFsp2WrapperPkg: Fix code formatting errors
Michael Kubacki [Tue, 6 Sep 2022 19:52:39 +0000 (15:52 -0400)]
IntelFsp2WrapperPkg: Fix code formatting errors

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

This package did not have CI enabled so code changes were merged
that fail uncrustify formatting. This change updates those files
to include uncustify formatting.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney>
18 months agoIntelFsp2Pkg: Add CI YAML file
Michael Kubacki [Tue, 6 Sep 2022 19:46:08 +0000 (15:46 -0400)]
IntelFsp2Pkg: Add CI YAML file

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

Adds IntelFsp2Pkg to the list of supported build packages for edk2
CI and defines an initial set of CI configuration options.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney>
18 months agoIntelFsp2Pkg/BaseFspMultiPhaseLib: Replace duplicate GUID
Michael Kubacki [Tue, 6 Sep 2022 17:47:21 +0000 (13:47 -0400)]
IntelFsp2Pkg/BaseFspMultiPhaseLib: Replace duplicate GUID

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

The FILE_GUID for this library instance file is a duplicate of
Library/SecFspSecPlatformLibNull/SecFspSecPlatformLibNull.inf.

This change replaces the duplicated GUID value with a unique GUID.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney>
18 months agoIntelFsp2Pkg: Fix code formatting errors
Michael Kubacki [Tue, 6 Sep 2022 17:45:01 +0000 (13:45 -0400)]
IntelFsp2Pkg: Fix code formatting errors

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

This package did not have CI enabled so code changes were merged
that fail uncrustify formatting. This change updates those files
to include uncustify formatting.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney>
18 months agoEmbeddedPkg: Only run in CI for GCC5
Michael Kubacki [Tue, 6 Sep 2022 22:48:10 +0000 (18:48 -0400)]
EmbeddedPkg: Only run in CI for GCC5

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

This package currently does not build on non-GCC toolchains.

This change adds the package to edk2 CI so it can benefit from
ongoing CI and only tests the package against GCC.

Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Daniel Schaefer <git@danielschaefer.me>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
18 months agoEmbeddedPkg: Add CI YAML file
Michael Kubacki [Sat, 3 Sep 2022 00:56:28 +0000 (20:56 -0400)]
EmbeddedPkg: Add CI YAML file

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

Adds EmbeddedPkg to the list of supported build packages for edk2
CI and fixes Library Class Check errors reported.

These changes allow EmbeddedPkg to pass NO-TARGET CI testing.

Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Daniel Schaefer <git@danielschaefer.me>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
18 months agoEmbeddedPkg/AcpiLib: Fix code formatting errors
Michael Kubacki [Sat, 3 Sep 2022 00:52:36 +0000 (20:52 -0400)]
EmbeddedPkg/AcpiLib: Fix code formatting errors

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

This package did not have CI enabled so code changes were merged
that fail uncrustify formatting. This change updates those files
to include uncustify formatting.

Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Daniel Schaefer <git@danielschaefer.me>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
18 months agoBaseTools/VolInfo: Update file and section type strings
Konstantin Aladyshev [Fri, 22 Jul 2022 13:30:11 +0000 (21:30 +0800)]
BaseTools/VolInfo: Update file and section type strings

Change SMM to MM in naming according to the recent PI specifications.
Remove trailing whitespaces in some strings.

Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
18 months agoBaseTools/VolInfo: Update copyright information
Konstantin Aladyshev [Sun, 24 Jul 2022 09:47:39 +0000 (17:47 +0800)]
BaseTools/VolInfo: Update copyright information

Add Konstantin Aladyshev to the copyright header.

Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
18 months agoBaseTools/VolInfo: Parse apriori files
Konstantin Aladyshev [Fri, 22 Jul 2022 15:37:30 +0000 (23:37 +0800)]
BaseTools/VolInfo: Parse apriori files

Output file GUIDs from the DXE and PEI apriori files.

Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
18 months agoBaseTools/VolInfo: Increase GUID base name string
Konstantin Aladyshev [Thu, 21 Jul 2022 13:11:48 +0000 (21:11 +0800)]
BaseTools/VolInfo: Increase GUID base name string

The current string lenght (=60) is not enough for cases where basename
is a path to Build folder.
Drop custom define and use MAX_LINE_LEN from the BaseTools codebase
instead.

Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
18 months agoBaseTools/VolInfo: Fix EFI_SECTION_GUID_DEFINED parsing
Konstantin Aladyshev [Tue, 30 Aug 2022 10:14:40 +0000 (18:14 +0800)]
BaseTools/VolInfo: Fix EFI_SECTION_GUID_DEFINED parsing

Currently 'PutFileImage' function is called with arguments that are
not advanced on each section parsing. This would lead to an error if
EFI_SECTION_GUID_DEFINED is not the first in a file.
The same mistake is present in the parsing of CRC32 guided section
case.
Use correct arguments to fix the issue.

Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
18 months agoBaseTools/VolInfo: Correct buffer for GenCrc32 tool
Konstantin Aladyshev [Tue, 19 Jul 2022 13:44:35 +0000 (21:44 +0800)]
BaseTools/VolInfo: Correct buffer for GenCrc32 tool

If the guided section was encoded with GenCrc32 tool the resulting
'EFI_GUID_DEFINED_SECTION.DataOffset' field points to the start of
the meaningfull data that follows the CRC32 value.
But if we want to decode the section with GenCrc32 tool we need to
provide a buffer that includes the CRC32 value itself.

Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
18 months agoMdeModulePkg/NonDiscoverablePciDeviceDxe: Allow partial FreeBuffer
Jeff Brasen via groups.io [Mon, 14 Feb 2022 18:45:31 +0000 (18:45 +0000)]
MdeModulePkg/NonDiscoverablePciDeviceDxe: Allow partial FreeBuffer

Add support for partial free of non cached buffers.
If a request for less than the full size is requested new allocations
for the remaining head and tail of the buffer are added to the list.
Added verification that Buffer is EFI_PAGE_SIZE aligned.
The XHCI driver does this if the page size for the controller is >4KB.

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
Acked-by: Liming Gao <gaoliming@byosoft.com.cn>
18 months agoSecurityPkg: Remove enforcement of final GoIdle transition for CRB commands
Rodrigo Gonzalez Del Cueto [Thu, 22 Sep 2022 07:35:36 +0000 (15:35 +0800)]
SecurityPkg: Remove enforcement of final GoIdle transition for CRB commands

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

Following the design described in the TCG specification,
the driver implementation of the CRB protocol does not require
enforcing completing the transition to goIdle at the end of a command
sequence.

Signed-off-by: Rodrigo Gonzalez Del Cueto <rodrigo.gonzalez.del.cueto@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
18 months agoOvmfPkg/QemuBootOrderLib: skip unsupported entries in StoreQemuBootOrder
Gerd Hoffmann [Wed, 21 Sep 2022 05:30:45 +0000 (07:30 +0200)]
OvmfPkg/QemuBootOrderLib: skip unsupported entries in StoreQemuBootOrder

When finding an unsupported entry just skip over and continue
with the next entry instead of stop processing altogether.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
18 months agoOvmfPkg/QemuBootOrderLib: allow slash in rom filenames
Gerd Hoffmann [Wed, 21 Sep 2022 05:30:44 +0000 (07:30 +0200)]
OvmfPkg/QemuBootOrderLib: allow slash in rom filenames

See comment for details.  Needed to avoid the parser abort,
so we can continue parsing the bootorder fw_cfg file.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
18 months agoOvmfPkg/PlatformInitLib: q35 mtrr setup fix
Gerd Hoffmann [Thu, 22 Sep 2022 05:55:30 +0000 (07:55 +0200)]
OvmfPkg/PlatformInitLib: q35 mtrr setup fix

Traditional q35 memory layout is 2.75 GB of low memory, leaving room
for the pcie mmconfig at 0xb0000000 and the 32-bit pci mmio window at
0xc0000000.  Because of that OVMF tags the memory range above
0xb0000000 as uncachable via mtrr.

A while ago qemu started to gigabyte-align memory by default (to make
huge pages more effective) and q35 uses only 2G of low memory in that
case.  Which effectively makes the 32-bit pci mmio window start at
0x80000000.

This patch updates the mtrr setup code accordingly.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
18 months agoUefiPayloadPkg: Provide a wrapper for UniversalPayloadBuild.py
VictorX Hsu [Mon, 26 Sep 2022 10:48:24 +0000 (18:48 +0800)]
UefiPayloadPkg: Provide a wrapper for UniversalPayloadBuild.py

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

Provide a wrapper to wrap UniversalPayloadBuild.py

Reviewed-by: Guo Dong <guo.dong@intel.com>
Reviewed-by: James Lu <james.lu@intel.com>
Signed-off-by: VictorX Hsu <victorx.hsu@intel.com>
18 months agoOvmfPkg/PeilessStartupLib: move mPageTablePool to stack
Min M Xu [Tue, 27 Sep 2022 07:07:53 +0000 (15:07 +0800)]
OvmfPkg/PeilessStartupLib: move mPageTablePool to stack

PeilessStartupLib is running in SEC phase. In this phase global variable
is not allowed to be modified. This patch moves mPageTablePool to stack
and pass it as input parameter between functions.

Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoMdeModulePkg/XhciDxe: Input context update for Evaluate Context command
jdzhang [Wed, 21 Sep 2022 03:05:40 +0000 (11:05 +0800)]
MdeModulePkg/XhciDxe: Input context update for Evaluate Context command

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

Update XhcEvaluateContext/XhcEvaluateContext64 to properly initialize the
input context for Evaluate Context command.

Signed-off-by: jdzhang <jdzhang@kunluntech.com.cn>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
19 months agoIntelFsp2WrapperPkg: Implement FSP 2.4 MultiPhase wrapper handlers.
Chasel Chiu [Wed, 10 Aug 2022 00:35:50 +0000 (17:35 -0700)]
IntelFsp2WrapperPkg: Implement FSP 2.4 MultiPhase wrapper handlers.

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

Implement MultiPhase wrapper handlers and only call to MultiPhase
handlers when FSP supports.

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: Nate DeSimone <nathaniel.l.desimone@intel.com>
19 months agoCryptoPkg/Test: Add unit test for CryptoEc
Yi Li [Sun, 25 Sep 2022 09:26:21 +0000 (17:26 +0800)]
CryptoPkg/Test: Add unit test for CryptoEc

Add unit test for CryptoEc.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Yi Li <yi1.li@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: Add ECC related usage reference
Yi Li [Sun, 25 Sep 2022 09:26:20 +0000 (17:26 +0800)]
CryptoPkg: Add ECC related usage reference

Describes the use cases under which ECC needs to be enabled,
and provides the impact on memory size for developers' reference.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Yi Li <yi1.li@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: Add EC APIs to DXE and protocol
Yi Li [Sun, 25 Sep 2022 09:26:19 +0000 (17:26 +0800)]
CryptoPkg: Add EC APIs to DXE and protocol

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

The implementation provides CryptEc library functions
for EFI Driveer and EFI BaseCrypt Protocol.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Yi Li <yi1.li@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: Add EC support
Yi Li [Sun, 25 Sep 2022 09:26:18 +0000 (17:26 +0800)]
CryptoPkg: Add EC support

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

This patch is used to add CryptEc library, which is wrapped
over OpenSSL.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Yi Li <yi1.li@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: Fix pem heap-buffer-overflow due to BIO_snprintf()
Yi Li [Mon, 26 Sep 2022 00:24:33 +0000 (08:24 +0800)]
CryptoPkg: Fix pem heap-buffer-overflow due to BIO_snprintf()

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

Fake BIO_snprintf() does not actually print anything to buf,
it should return -1 as error.
0 will be considered a correct return value, the consumer may think that
the buf is valid and parse the buffer.
please refer to bugzilla link for details.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Yi Li <yi1.li@intel.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
19 months agoCryptoPkg: Add missing library mappings to DSC file
Michael D Kinney [Fri, 23 Sep 2022 19:45:51 +0000 (12:45 -0700)]
CryptoPkg: Add missing library mappings to DSC file

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

Add SynchronizationLib and MmServicesTableLib mappings that are
required for the CRYPTO_SERVICES set to ALL or MIN_DXE_MIN_SMM
builds.

Also update the family PCD settings for the PACKAGE and ALL
profiles to enable all families.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoEmbeddedPkg/PrePi: Check for enough space before aligning heap pointer
Jeff Brasen [Fri, 23 Sep 2022 15:56:16 +0000 (09:56 -0600)]
EmbeddedPkg/PrePi: Check for enough space before aligning heap pointer

Update check for enough space to occur prior to alignment offset.
This prevents cases where EfiFreeMemoryTop < EfiFreeMemoryBottom.

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
19 months agoDynamicTablesPkg: SSDT CPU _CPC generator
Jeff Brasen [Thu, 22 Sep 2022 20:36:46 +0000 (14:36 -0600)]
DynamicTablesPkg: SSDT CPU _CPC generator

Add code to use a token attached to GICC to generate _CPC object on cpus.

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
19 months agoDynamicTablesPkg: AML Code generation to add _CPC entries
Jeff Brasen [Thu, 22 Sep 2022 20:36:45 +0000 (14:36 -0600)]
DynamicTablesPkg: AML Code generation to add _CPC entries

_CPC entries can describe CPU performance information.
The object is described in ACPI 6.4 s8.4.7.1.
"_CPC (Continuous Performance Control)".

Add AmlCreateCpcNode() helper function to add _CPC entries to an
existing CPU object.

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
19 months agoDynamicTablesPkg: Add CM_ARM_CPC_INFO object
Jeff Brasen [Thu, 22 Sep 2022 20:36:44 +0000 (14:36 -0600)]
DynamicTablesPkg: Add CM_ARM_CPC_INFO object

Introduce the CM_ARM_CPC_INFO CmObj in the ArmNameSpaceObjects.
This allows to describe CPC information, as described in ACPI 6.4,
s8.4.7.1 "_CPC (Continuous Performance Control)".

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
19 months agoArmPkg/SmbiosMiscDxe: Get SMBIOS information from OemMiscLib
Minh Nguyen [Mon, 19 Sep 2022 02:19:50 +0000 (09:19 +0700)]
ArmPkg/SmbiosMiscDxe: Get SMBIOS information from OemMiscLib

In some scenarios, the information of Bios Version, Bios Release
and Embedded Controller Firmware Release are fetched during UEFI
booting. This patch supports updating those fields dynamically
when the PCDs are empty.

Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
Reviewed-by: Rebecca Cran <rebecca@quicinc.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
19 months agoArmPkg/SmbiosMiscDxe: Remove redundant updates in SMBIOS Type 2
Minh Nguyen [Mon, 19 Sep 2022 02:19:49 +0000 (09:19 +0700)]
ArmPkg/SmbiosMiscDxe: Remove redundant updates in SMBIOS Type 2

This patch removes redundant updates of "BoardManufacturerType02"
and "SerialNumberType02".

Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
Reviewed-by: Rebecca Cran <rebecca@quicinc.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Leif Lindholm <quic_llindhol@quicinc.com>
19 months agoArmPkg/SmbiosMiscDxe: Fix typo of "AssetTagType02"
Minh Nguyen [Mon, 19 Sep 2022 02:19:48 +0000 (09:19 +0700)]
ArmPkg/SmbiosMiscDxe: Fix typo of "AssetTagType02"

This patch fixes typo from "AssertTagType02"
to "AssetTagType02".

Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
Reviewed-by: Rebecca Cran <rebecca@quicinc.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Leif Lindholm <quic_llindhol@quicinc.com>
19 months agoArmPkg/SmbiosMiscDxe: Support fetching System UUID
Nhi Pham [Mon, 19 Sep 2022 02:19:47 +0000 (09:19 +0700)]
ArmPkg/SmbiosMiscDxe: Support fetching System UUID

This adds an API to OemMiscLib for fetching the system UUID according to
the platform.

Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
Reviewed-by: Rebecca Cran <rebecca@quicinc.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Leif Lindholm <quic_llindhol@quicinc.com>
19 months agoArmPkg: Correct return value of "SMCCC_ARCH_SOC_ID" Function ID call
Minh Nguyen [Mon, 19 Sep 2022 02:19:46 +0000 (09:19 +0700)]
ArmPkg: Correct return value of "SMCCC_ARCH_SOC_ID" Function ID call

According to "SMC Calling Convention" specification, section 7.4,
return value of Arm Architecture Calls is stored at first argument of
SMC aguments (ARM_SMC_ARGS). This value can be negative values indicating
error or positive values (including zero) indicating success. Positive
value would contain information of respective Function ID (Section 7.3.4
and 7.4.4).

For that reason, "SMCCC_VERSION" and "SMCCC_ARCH_FEATURES"
Function ID calls read return value from "SmcCallStatus" variable
(Args.Arg0 - first argument of SMC call). But "SMCCC_ARCH_SOC_ID"
Function ID call is reading return value from "SmcParam" variable
(Args.Arg1 - second argument of SMC call) so it leads to unexpected
results of "Jep106Code" and "SocRevision". This patch is to correct it.

Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
Reviewed-by: Rebecca Cran <rebecca@quicinc.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Leif Lindholm <quic_llindhol@quicinc.com>
19 months agoArmPkg/ProcessorSubClassDxe: Get processor version from OemMiscLib
Minh Nguyen [Mon, 19 Sep 2022 02:19:45 +0000 (09:19 +0700)]
ArmPkg/ProcessorSubClassDxe: Get processor version from OemMiscLib

In some scenarios, the processor version may be updated dynamically
from pre-UEFI firmware during booting. But the processor version is
fixed with PCD (PcdProcessorVersion), so it can not be updated it
dynamically. This patch will support setting that value both
statically and dynamically.

Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
Reviewed-by: Rebecca Cran <rebecca@quicinc.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Leif Lindholm <quic_llindhol@quicinc.com>
19 months agoCryptoPkg/OpensslLib: Update generated files for native X64
Christopher Zurcher [Wed, 21 Sep 2022 20:25:41 +0000 (04:25 +0800)]
CryptoPkg/OpensslLib: Update generated files for native X64

Cc: Yi Li <yi1.li@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Christopher Zurcher <christopher.zurcher@microsoft.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg/OpensslLib: Commit the auto-generated assembly files for IA32
Christopher Zurcher [Wed, 21 Sep 2022 20:25:40 +0000 (04:25 +0800)]
CryptoPkg/OpensslLib: Commit the auto-generated assembly files for IA32

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

Adding the auto-generated assembly files for IA32 architectures.

Cc: Yi Li <yi1.li@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Christopher Zurcher <christopher.zurcher@microsoft.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg/OpensslLib: Add native instruction support for IA32
Christopher Zurcher [Wed, 21 Sep 2022 20:25:39 +0000 (04:25 +0800)]
CryptoPkg/OpensslLib: Add native instruction support for IA32

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

Adding native instruction support for accelerated OpenSSL features for
IA32 architecture, following the pattern set by the previous commits for
X64 native support.

Cc: Yi Li <yi1.li@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Christopher Zurcher <christopher.zurcher@microsoft.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg/Test: Add unit test for CryptoBn
Yi Li [Thu, 12 May 2022 09:10:16 +0000 (17:10 +0800)]
CryptoPkg/Test: Add unit test for CryptoBn

Add unit test for CryptoBn.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Yi Li <yi1.li@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: Add BigNum API to DXE and protocol
Yi Li [Wed, 7 Sep 2022 08:14:35 +0000 (16:14 +0800)]
CryptoPkg: Add BigNum API to DXE and protocol

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

The implementation provides CryptBn library functions
for EFI Driver and EFI BaseCrypt Protocol.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Yi Li <yi1.li@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: Add BigNum support
Yi Li [Wed, 7 Sep 2022 08:12:00 +0000 (16:12 +0800)]
CryptoPkg: Add BigNum support

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

This patch is used to add CryptBn library, which is wrapped
over OpenSSL.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Yi Li <yi1.li@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: add UnitTest for AeadAesGcm.
Qi Zhang [Fri, 23 Sep 2022 06:32:01 +0000 (14:32 +0800)]
CryptoPkg: add UnitTest for AeadAesGcm.

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

Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: add AeadAesGcm to Crypto Service.
Qi Zhang [Fri, 23 Sep 2022 06:32:00 +0000 (14:32 +0800)]
CryptoPkg: add AeadAesGcm to Crypto Service.

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

Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: add AeadAesGcm support.
Qi Zhang [Fri, 23 Sep 2022 06:31:59 +0000 (14:31 +0800)]
CryptoPkg: add AeadAesGcm support.

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

Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: add AeadAesGcm function() definition.
Qi Zhang [Fri, 23 Sep 2022 06:31:58 +0000 (14:31 +0800)]
CryptoPkg: add AeadAesGcm function() definition.

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

Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: add Hkdf UnitTest.
Qi Zhang [Fri, 23 Sep 2022 06:25:09 +0000 (14:25 +0800)]
CryptoPkg: add Hkdf UnitTest.

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

Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: add new Hkdf api to Crypto Service.
Qi Zhang [Fri, 23 Sep 2022 06:25:08 +0000 (14:25 +0800)]
CryptoPkg: add new Hkdf api to Crypto Service.

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

Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: add new Hkdf api in Crypt Lib.
Qi Zhang [Fri, 23 Sep 2022 06:25:07 +0000 (14:25 +0800)]
CryptoPkg: add new Hkdf api in Crypt Lib.

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

Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: add new Hkdf api definition in Crypt Lib.
Qi Zhang [Fri, 23 Sep 2022 06:25:06 +0000 (14:25 +0800)]
CryptoPkg: add new Hkdf api definition in Crypt Lib.

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

Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: add Hmac Sha384 to host UnitTest.
Qi Zhang [Fri, 23 Sep 2022 01:14:52 +0000 (09:14 +0800)]
CryptoPkg: add Hmac Sha384 to host UnitTest.

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

Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: Add new hmac SHA api to Crypto Service.
Qi Zhang [Fri, 23 Sep 2022 01:14:51 +0000 (09:14 +0800)]
CryptoPkg: Add new hmac SHA api to Crypto Service.

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

Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: Update CryptLib inf as the file name changed.
Qi Zhang [Fri, 23 Sep 2022 01:14:50 +0000 (09:14 +0800)]
CryptoPkg: Update CryptLib inf as the file name changed.

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

Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: Add HMAC-SHA384 cipher support.
Qi Zhang [Fri, 23 Sep 2022 01:14:49 +0000 (09:14 +0800)]
CryptoPkg: Add HMAC-SHA384 cipher support.

Rename file from CryptHmacSha256 to CryptHmac and
add HmacSha384 and HmacSha256All funcitons.

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

Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoCryptoPkg: Add new hmac definition to cryptlib
Qi Zhang [Fri, 23 Sep 2022 01:14:48 +0000 (09:14 +0800)]
CryptoPkg: Add new hmac definition to cryptlib

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

Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agoRedfishPkg/JsonLib: Fix JsonLib build failure
Nickle Wang [Thu, 22 Sep 2022 14:06:32 +0000 (22:06 +0800)]
RedfishPkg/JsonLib: Fix JsonLib build failure

VS2019 reports build failure: "warning C4701: potentially uninitialized
local variable 'Ucs2Str' used". Initial Ucs2Str to NULL at the beginning
of function.

Cc: Abner Chang <abner.chang@amd.com>
Cc: Nick Ramirez <nramirez@nvidia.com>
Signed-off-by: Nickle Wang <nicklew@nvidia.com>
Reviewed-by: Abner Chang <abner.chang@amd.com>
19 months agoCryptoPkg/BaseCryptLib:Remove redundant init
Wenyi Xie [Thu, 15 Sep 2022 09:26:20 +0000 (17:26 +0800)]
CryptoPkg/BaseCryptLib:Remove redundant init

CertCtx is used to be defined as a struct and ZeroMem is called to
init this struct. But now CertCtx is defined as a point, so use
ZeroMem (&CertCtx, sizeof (CertCtx)) is not correct any more.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Wenyi Xie <xiewenyi2@huawei.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
19 months agonasm_ext_dep.yaml: Remove leading zero in patch version
Michael Kubacki [Fri, 16 Sep 2022 19:44:27 +0000 (15:44 -0400)]
nasm_ext_dep.yaml: Remove leading zero in patch version

The patch version is currently: "2.15.05"

When a formal semantic version validator is run against this version
it is recognized as being invalid due to the leading zero in the
patch which is not allowed per the Semantic Versioning Specification:

https://semver.org/#spec-item-2

The NuGet Gallery already reports the version without the leading
zero: https://www.nuget.org/packages/mu_nasm/2.15.5

This change simply removes the leading zero to prevent code such as
https://pypi.org/project/semantic-version/ from reporting a version
error.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Michael Kubacki <mikuback@linux.microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
19 months agoBaseTools: Edk2ToolsBuild: Fixing pipeline build due to path too long
Sean Brogan [Wed, 21 Sep 2022 20:44:59 +0000 (04:44 +0800)]
BaseTools: Edk2ToolsBuild: Fixing pipeline build due to path too long

Current implementation of looking up toolchain will _insert_ the findings
from vsvarsall.bat to existing path and potentially stuff the variable to
exceed the length of maximal path length accepted by Windows.

This change updated the logic to use the discovered shell varialbes to
replace the existing path, which is desirable in the specific use case.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Co-authored-by: Sean Brogan <sean.brogan@microsoft.com>
Signed-off-by: Kun Qin <kuqin12@gmail.com>
Reviewed-by: Sean Brogan <sean.brogan@microsoft.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
19 months agoMaintainers.txt: Update email address
Nickle Wang [Thu, 15 Sep 2022 01:46:17 +0000 (09:46 +0800)]
Maintainers.txt: Update email address

Update Nickle's email address from csie.io to nvidia.com for those
packages which are reviewed by Nickle. Per suggestion from Abner,
change Nickle from reviewer to maintainer for RedfishPkg.

Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Abner Chang <abner.chang@amd.com>
Signed-off-by: Nickle Wang <nicklew@nvidia.com>
Reviewed-by: Abner Chang <abner.chang@amd.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Andrew Fish <afish@apple.com>
19 months agoUefiPayloadPkg/PayloadLoaderPeim: remove GCC build warning
James Lu [Thu, 15 Sep 2022 08:48:07 +0000 (16:48 +0800)]
UefiPayloadPkg/PayloadLoaderPeim: remove GCC build warning

Fix the gcc build warning:
variable PldInfo set but not used [-Wunused-but-set-variable]

Reviewed-by: James Lu <james.lu@intel.com>
Reviewed-by: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Gang Chen <gang.c.chen@intel.com>
19 months agoMaintainers.txt: Update maintainers/reviewers for CI and Test
Bret Barkelew [Sat, 3 Sep 2022 00:23:39 +0000 (20:23 -0400)]
Maintainers.txt: Update maintainers/reviewers for CI and Test

Remove Bret Barkelew from:
- .azurepipelines
- .mergify
- .pytool
- UnitTestFrameworkPkg

Add Michael Kubacki to:
- .azurepipelines
- .pytool

Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael Kubacki <mikuback@linux.microsoft.com>
Signed-off-by: Bret Barkelew <bret.barkelew@microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com>
19 months agoIntelFsp2Pkg: Fix FspSecCoreI build failure.
Chasel Chiu [Wed, 7 Sep 2022 15:46:06 +0000 (08:46 -0700)]
IntelFsp2Pkg: Fix FspSecCoreI build failure.

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

Link error occurred in certain compiling environment when building
FspSecCoreI: unresolved external symbol _TempRamInitApi.

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: Nate DeSimone <nathaniel.l.desimone@intel.com>
19 months agoIntelFsp2Pkg: NvsBufferPtr is missing in Fsp24ApiEntryM.nasm
Kuo, Ted [Thu, 15 Sep 2022 13:39:33 +0000 (06:39 -0700)]
IntelFsp2Pkg: NvsBufferPtr is missing in Fsp24ApiEntryM.nasm

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4063
Added NvsBufferPtr to FSPM_UPD_COMMON_FSP24 in Fsp24ApiEntryM.nasm to
align with FSP 2.4 SPEC.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Ashraf Ali S <ashraf.ali.s@intel.com>
Cc: Chinni B Duggapu <chinni.b.duggapu@intel.com>
Signed-off-by: Ted Kuo <ted.kuo@intel.com>
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
19 months agoDynamicTablesPkg: AcpiSsdtPcieLibArm: Allow use of segment number as UID
Jeff Brasen [Tue, 6 Sep 2022 20:33:56 +0000 (14:33 -0600)]
DynamicTablesPkg: AcpiSsdtPcieLibArm: Allow use of segment number as UID

Add support for selecting to use index or segment number as UID and name.
This allows the path of the nodes to be well known.
For example, if the PCIe node needs to be notified from by an interrupt
for a Generic Event Device

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
19 months agoBaseTools: 64bit FSP FV map file cannot be created correctly
Kuo, Ted [Mon, 29 Aug 2022 09:28:17 +0000 (17:28 +0800)]
BaseTools: 64bit FSP FV map file cannot be created correctly

https://bugzilla.tianocore.org/show_bug.cgi?id=4035
64bit FSP FV map file cannot be created correctly when using CLANG
compiler. When compiling 64bit FSP with CLANG, there is no prefix
symbol '_' added to function name. Hence FSP FV map file cannot be
created properly. Updated the if condition for CLANG in GenFv to
get the issue fixed.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Cc: Lee Hamel <lee.m.hamel@intel.com>
Signed-off-by: Ted Kuo <ted.kuo@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
19 months agoMdeModulePkg/AhciPei: Fix MMIO base assignment
Czajkowski, Maciej [Fri, 9 Sep 2022 18:10:55 +0000 (02:10 +0800)]
MdeModulePkg/AhciPei: Fix MMIO base assignment

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

There is a mistake in getting MMIO base using PciDevicePpi that
can lead to the data corruption.

Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Maciej Czajkowski <maciej.czajkowski@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
19 months agoMdeModulePkg SmbiosMeasurementDxe: Add Type4 CurrentSpeed to filter table
Heng Luo [Thu, 8 Sep 2022 05:40:59 +0000 (13:40 +0800)]
MdeModulePkg SmbiosMeasurementDxe: Add Type4 CurrentSpeed to filter table

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

The Type4 CurrentSpeed field may be various.
So this patch adds it into the filter table.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Signed-off-by: Heng Luo <heng.luo@intel.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
Reviewed-by: James Lu <james.lu@intel.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
19 months agoMdeModulePkg: Use configurable PCD for AHCI command retries
Baraneedharan Anbazhagan [Thu, 8 Sep 2022 04:23:32 +0000 (23:23 -0500)]
MdeModulePkg: Use configurable PCD for AHCI command retries

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

AHCI commands are retried internally which prevents platform feature
like drive password to process correctly entered password on subsequent
attempts. PCD allows the platform to determine the number of retries.

Signed-off-by: Baraneedharan Anbazhagan <anbazhagan@hp.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
19 months agoOvmfPkg: Allow runtime control of IPv4 and IPv6 support on QEMU
Ard Biesheuvel [Mon, 15 Aug 2022 09:17:12 +0000 (11:17 +0200)]
OvmfPkg: Allow runtime control of IPv4 and IPv6 support on QEMU

Wire up the newly added UefiDriverEntrypoint in a way that ties dispatch
of the Ip4Dxe and Ip6Dxe drivers to QEMU fw_cfg variables
'opt/org.tianocore/IPv4Support' and 'opt/org.tianocore/IPv6Support'
respectively.

Setting both variables to 'n' disables IP based networking entirely,
without the need for additional code changes at the NIC driver or
network boot protocol level.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
19 months agoOvmfPkg: gather common NetworkComponents overrides in .dsc.inc file
Ard Biesheuvel [Tue, 6 Sep 2022 11:26:35 +0000 (13:26 +0200)]
OvmfPkg: gather common NetworkComponents overrides in .dsc.inc file

All QEMU based OVMF platforms override the same set of network
components, to specify NULL library class resolutions that modify the
behavior of those components in a QEMU specific way.

Before adding more occurrences of that, let's drop those definitions in
a common include file.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
19 months agoOvmfPkg: Introduce alternate UefiDriverEntrypoint to inhibit driver load
Ard Biesheuvel [Mon, 15 Aug 2022 08:47:51 +0000 (10:47 +0200)]
OvmfPkg: Introduce alternate UefiDriverEntrypoint to inhibit driver load

Add a new library that can be incorporated into any driver built from
source, and which permits loading of the driver to be inhibited based on
the value of a QEMU fw_cfg boolean variable. This will be used in a
subsequent patch to allow dispatch of the IPv4 and IPv6 network protocol
driver to be controlled from the QEMU command line.

This approach is based on the notion that all UEFI and DXE drivers share
a single UefiDriverEntryPoint implementation, which we can easily swap
out at build time with one that will abort execution based on the value
of some QEMU fw_cfg variable.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
19 months agoArmPkg, ArmVirtPkg: put SpellCheck in AuditOnly mode
Ard Biesheuvel [Wed, 7 Sep 2022 15:24:26 +0000 (17:24 +0200)]
ArmPkg, ArmVirtPkg: put SpellCheck in AuditOnly mode

Don't allow spelling errors to break the CI build and inadvertently
reject pull requests - spelling is important but not that important.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Rebecca Cran <rebecca@quicinc.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
19 months agoOvmfPkg/LegacyBootManagerLib: Fix debug macro arguments
Michael Kubacki [Thu, 25 Aug 2022 03:01:51 +0000 (23:01 -0400)]
OvmfPkg/LegacyBootManagerLib: Fix debug macro arguments

The DEBUG macro updated in this patch previously contained 11 print
specifiers in the debug string but passeed 13 arguments. This change
attempts to update the macro to the author's intention so the number
of specifiers match the number of arguments.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
19 months agoNetworkPkg/TcpDxe: Fix debug macro arguments
Michael Kubacki [Thu, 25 Aug 2022 02:55:48 +0000 (22:55 -0400)]
NetworkPkg/TcpDxe: Fix debug macro arguments

Removes Status argument that is not needed from DEBUG macros.

Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
19 months agoDynamicTablesPkg/AcpiPpttLibArm: Fix debug macro arguments
Michael Kubacki [Thu, 25 Aug 2022 02:51:43 +0000 (22:51 -0400)]
DynamicTablesPkg/AcpiPpttLibArm: Fix debug macro arguments

Cc: Sami Mujawar <Sami.Mujawar@arm.com>
Cc: Alexei Fedorov <Alexei.Fedorov@arm.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>