]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
18 months agoCryptoPkg/Library/BaseCryptLib: Add missing UNI file and fix format
Michael D Kinney [Tue, 4 Oct 2022 23:34:25 +0000 (16:34 -0700)]
CryptoPkg/Library/BaseCryptLib: Add missing UNI file and fix format

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>
Cc: Christopher Zurcher <christopher.zurcher@microsoft.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
18 months agoCryptoPkg: Document and disable deprecated crypto services
Michael D Kinney [Thu, 29 Sep 2022 16:32:54 +0000 (09:32 -0700)]
CryptoPkg: Document and disable deprecated crypto services

Also note services that are recommended to be disabled and
update CryptoPkg.dsc PcdCryptoServiceFamilyEnable settings
to disable all deprecated services.

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>
Cc: Christopher Zurcher <christopher.zurcher@microsoft.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
18 months agoremove GCC build warning
Wu, JessyX [Tue, 4 Oct 2022 02:03:54 +0000 (10:03 +0800)]
remove GCC build warning

Fix gcc: warning:
 -x c after last input file has no effect

These kind of flag can only affect the source code after them.
For the build command in build_rule.template, we have no other source code or object after these two flag.
It seems we don't need them here.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: JessyX Wu <jessyx.wu@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
18 months agoBaseTools: Fixed the multiple pairs brackets issue in GenFv
Chao Li [Thu, 20 Oct 2022 09:25:01 +0000 (17:25 +0800)]
BaseTools: Fixed the multiple pairs brackets issue in GenFv

If operation Werro is turned on when compiling BaseTools, the
multi-brackets warning will be reported. This issue is comes from on of
the LoongArch enabled patche. Removed extra pairs brackets to fix it.

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

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
18 months agoBaseTools: Fix check for ${PYTHON_COMMAND} in Tests/GNUmakefile
Rebecca Cran [Mon, 19 Sep 2022 21:39:10 +0000 (05:39 +0800)]
BaseTools: Fix check for ${PYTHON_COMMAND} in Tests/GNUmakefile

When checking if $PYTHON_COMMAND exists, curly braces should
be used instead of parentheses.

Also, "1" causes an error on FreeBSD: it's likely supposed to
be 2>&1 like other scripts.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
18 months agoBaseTools/Scripts/PatchCheck.py: Allow tab in Makefile
Bob Feng [Sun, 16 Oct 2022 03:41:05 +0000 (11:41 +0800)]
BaseTools/Scripts/PatchCheck.py: Allow tab in Makefile

The syntax for Makefiles requires that indented lines s
tart with a tab, but not a space.

This change of PatchCheck.py make the patch for Makefile/GNUmakefile
pass the PatchCheck.py.

Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
18 months agoMdeModulePkg/XhciDxe: Add boundary check for TRB ring allocation
jdzhang [Tue, 18 Oct 2022 02:56:02 +0000 (10:56 +0800)]
MdeModulePkg/XhciDxe: Add boundary check for TRB ring allocation

According the Xhci Spec, TRB Rings may be larger than a Page, however they
shall not cross a 64K byte boundary, so add a parameter to indicate
whether the memory allocation is for TRB Rings or not. It will ensure the
allocation not crossing 64K boundary in UsbHcAllocMemFromBlock if the
memory is allocated for TRB Rings.

Signed-off-by: jdzhang <jdzhang@kunluntech.com.cn>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
18 months agoArmPkg/ArmMmuLib: Reuse XIP MMU routines when splitting entries
Ard Biesheuvel [Sat, 24 Sep 2022 20:31:44 +0000 (22:31 +0200)]
ArmPkg/ArmMmuLib: Reuse XIP MMU routines when splitting entries

In order to reduce the likelihood that we will need to rely on the logic
that disables and re-enables the MMU for updating a page table entry
safely, expose the XIP version of the helper routine via a HOB and use
it instead of the one that is copied into DRAM. Since the XIP copy is
already clean to the PoC, and will never end up getting unmapped during
a block entry split, we can use it safely without any cache maintenance,
and without running the risk of pulling the rug from under our feet when
updating an entry by going through an invalid mapping.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Leif Lindholm <quic_llindhol@quicinc.com>
18 months agoArmPkg/ArmMmuLib: permit initial configuration with MMU enabled
Ard Biesheuvel [Sat, 2 Jul 2022 13:14:28 +0000 (15:14 +0200)]
ArmPkg/ArmMmuLib: permit initial configuration with MMU enabled

Permit the use of this library with the MMU and caches already enabled.
This removes the need for any cache maintenance for coherency, and is
generally better for robustness and performance, especially when running
under virtualization.

Note that this means we have to defer assignment of TTBR0 until the
page tables are ready to be used, and so UpdateRegionMapping() can no
longer read back TTBR0 directly to discover the root table address.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Leif Lindholm <quic_llindhol@quicinc.com>
18 months agoArmPkg/ArmMmuLib: Disable and re-enable MMU only when needed
Ard Biesheuvel [Sat, 24 Sep 2022 16:26:19 +0000 (18:26 +0200)]
ArmPkg/ArmMmuLib: Disable and re-enable MMU only when needed

When updating a page table descriptor in a way that requires break
before make, we temporarily disable the MMU to ensure that we don't
unmap the memory region that the code itself is executing from.

However, this is a condition we can check in a straight-forward manner,
and if the regions are disjoint, we don't have to bother with the MMU
controls, and we can just perform an ordinary break before make.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
18 months agoArmPkg/ArmMmuLib: don't replace table entries with block entries
Ard Biesheuvel [Sun, 3 Jul 2022 07:29:26 +0000 (09:29 +0200)]
ArmPkg/ArmMmuLib: don't replace table entries with block entries

Drop the optimization that replaces table entries with block entries and
frees the page tables in the subhierarchy that is being replaced. This
rarely occurs in practice anyway, and will require more elaborate TLB
maintenance once we switch to a different approach where we no longer
disable the MMU and nuke the TLB entirely every time we update a
descriptor in a way that requires break-before-make (BBM).

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
18 months agoBaseTools: Add missing spaces for PCD expression values in AutoGenC
Konstantin Aladyshev [Tue, 30 Aug 2022 10:20:27 +0000 (18:20 +0800)]
BaseTools: Add missing spaces for PCD expression values in AutoGenC

Currently the PCD values calculated from the expressions have different
formating from the simple byte arrays in AutoGenC.

Example:
The following definition in DEC:
gTokenSpaceGuid.PcdArray|{0x44, 0x33, 0x22, 0x11}|VOID*|0x55555555
gTokenSpaceGuid.PcdArrayByExpression|{UINT32(0x11223344)}|VOID*|0x66666666

Produces these strings in AutoGenC:
<...> _gPcd_<...>_PcdArray[4] = {0x44, 0x33, 0x22, 0x11};
<...> _gPcd_<...>_PcdArrayByExpression[4] = {0x44,0x33,0x22,0x11};

Add missing space character between the array elements to unify PCD value
formatting.

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: Correct initialization data size check for array PCDs
Konstantin Aladyshev [Tue, 30 Aug 2022 10:20:54 +0000 (18:20 +0800)]
BaseTools: Correct initialization data size check for array PCDs

Currently it is not possible to initialize all elements in the
array PCD.

For example, this PCD would result to a build failure:
gTokenSpaceGuid.PcdArray|{0x11, 0x22}|UINT8[2]|0x4C4CB9A3

Correct logical operator in the initialization data size checks to
fix the issue.

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/GenFds: Correct file type set for the PIC section
Konstantin Aladyshev [Tue, 30 Aug 2022 10:18:31 +0000 (18:18 +0800)]
BaseTools/GenFds: Correct file type set for the PIC section

Corrently the set of file types for the PIC section contains two
duplicate values.
Replace the duplicate value with the correct one to fix the issue.

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: Support COMPAT16 section generation
Konstantin Aladyshev [Tue, 30 Aug 2022 10:19:57 +0000 (18:19 +0800)]
BaseTools: Support COMPAT16 section generation

Currently COMPAT16 section type is not recognized and GenSec is called
without the "-s [SectionType]" argument.
Add COMPAT16 type to the SectionType dictionary to fix the issue.

Now this syntax works correctly:
```
FILE FREEFORM = <GUID>  {
  SECTION COMPAT16 = <FILE>
}
```

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: Add support for SUBTYPE_GUID section generation
Konstantin Aladyshev [Wed, 20 Jul 2022 14:01:17 +0000 (22:01 +0800)]
BaseTools: Add support for SUBTYPE_GUID section generation

EFI_SECTION_FREEFORM_SUBTYPE_GUID is a leaf section type that contains
a single EFI_GUID in the header to describe the raw data.
Currently is is not possible to generate such section.
This patch adds initial support for the generation of such sections.
The added syntax for this type of section corresponds to EDKII
"[FV] section" documentation from the FDF Specification:
```
SECTION SUBTYPE_GUID <GUID> = <File>
```

Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
18 months agoBaseTools: Correct BPDG tool error prints
Konstantin Aladyshev [Mon, 5 Sep 2022 09:19:23 +0000 (17:19 +0800)]
BaseTools: Correct BPDG tool error prints

Popen communication returns bytestrings. It is necessary to perform
decode on these strings before passing them to the EdkLogger that
works with ordinary 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/FMMT: Add Shrink Fv function
Chen, Christine [Fri, 16 Sep 2022 01:51:18 +0000 (09:51 +0800)]
BaseTools/FMMT: Add Shrink Fv function

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

This function is used to remove the useless FV free space.
Usage: FMMT -s Inputfile Outputfile

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Yuwei Chen <yuwei.chen@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
18 months agoBaseTools/FMMT: Add Extract FV function
Chen, Christine [Fri, 16 Sep 2022 01:50:56 +0000 (09:50 +0800)]
BaseTools/FMMT: Add Extract FV function

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

With this patch "-e" parameter supports extract FV function.
Usage: FMMT -e Inputfile TargetFv Outputfile

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Yuwei Chen <yuwei.chen@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
18 months agoBaseTools: Remove duplicated words in Python tools
Pierre Gondois [Mon, 3 Oct 2022 07:47:32 +0000 (15:47 +0800)]
BaseTools: Remove duplicated words in Python tools

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
18 months agopip-requirement: Upgrade the edk2-basetools version from 0.1.29 to 0.1.39
Bob Feng [Sun, 16 Oct 2022 06:46:10 +0000 (14:46 +0800)]
pip-requirement: Upgrade the edk2-basetools version from 0.1.29 to 0.1.39

features and bug fixes:
1. Revert "BaseTools: Fix DSC LibraryClass precedence rule"
2. BaseTools: Correct BPDG tool error prints
3. BaseTools: Remove duplicated words in Python tools
4. BaseTools/FMMT: Add Extract FV function
5. BaseTools/FMMT: Add Shrink Fv function
6. BaseTools: Add support for SUBTYPE_GUID section generation
7. BaseTools: Support COMPAT16 section generation
8. BaseTools/GenFds: Correct file type set for the PIC section
9. BaseTools: Correct initialization data size check for array PCDs
10. BaseTools: Add missing spaces for PCD expression values in AutoGenC

Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Yuwei Chen <yuwei.chen@intel.com>
18 months agoUefiCpuPkg/Test: Add unit tests for MP service PPI and Protocol
Jason Lou [Mon, 10 Oct 2022 13:52:42 +0000 (21:52 +0800)]
UefiCpuPkg/Test: Add unit tests for MP service PPI and Protocol

The code changes add unit tests based on current UnitTestFramework.
EdkiiPeiMpServices2PpiPeiUnitTest PEI module is used to test
EdkiiPeiMpServices2Ppi and EfiMpServiceProtocolDxeUnitTest DXE driver is
used to test EfiMpServiceProtocol.

Signed-off-by: Jason Lou <yun.lou@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
18 months agoUefiCpuPkg: Add R8/R9 etc in EccCheck ExceptionList
Tan, Dun [Mon, 17 Oct 2022 06:35:42 +0000 (14:35 +0800)]
UefiCpuPkg: Add R8/R9 etc in EccCheck ExceptionList

Add GENERAL_REGISTER.R8/R9 etc in EccCheck ExceptionList
of UefiCpuPkg/UefiCpuPkg.ci.yaml to pass CI EccCheck.R8/R9
in structure GENERAL_REGISTER of CpuExceptionHandlerTest.h
lead to EccCheck failure since no lower case characters in
R8/R9/R10 etc.

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>
18 months agoUefiCpuPkg: Add Pei/DxeCpuExceptionHandlerLibUnitTest in dsc
Tan, Dun [Mon, 17 Oct 2022 06:35:41 +0000 (14:35 +0800)]
UefiCpuPkg: Add Pei/DxeCpuExceptionHandlerLibUnitTest in dsc

Add Pei/DxeCpuExceptionHandlerLibUnitTest module in UefiCpuPkg.dsc

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>
18 months agoUefiCpuPkg: Add Unit tests for PeiCpuExceptionHandlerLib
Tan, Dun [Mon, 17 Oct 2022 06:35:40 +0000 (14:35 +0800)]
UefiCpuPkg: Add Unit tests for PeiCpuExceptionHandlerLib

The previous change adds unit test for DxeCpuExeptionHandlerLib
in 64bit mode. This change create a PEIM to add unit test for
PeiCpuExceptionHandlerLib based on previous change.It can run
in both 32bit and 64bit modes.

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>
18 months agoUefiCpuPkg: Add Unit tests for DxeCpuExceptionHandlerLib
Tan, Dun [Mon, 17 Oct 2022 06:35:39 +0000 (14:35 +0800)]
UefiCpuPkg: Add Unit tests for DxeCpuExceptionHandlerLib

Add target based unit tests for the DxeCpuExceptionHandlerLib.
A DXE driver is created to test DxeCpuExceptionHandlerLib.

Four test cases are created in this Unit Test module:
a.Test if exception handler can be registered/unregistered
for no error code exception.In the test case, only no error
code exception is triggered and tested by INTn instruction.

b.Test if exception handler can be registered/unregistered
for GP and PF. In the test case, GP exception is triggered
and tested by setting CR4_RESERVED_BIT to 1. PF exception
is triggered by writting to not-present or RO address.

c.Test if CpuContext is consistent before and after exception.
In this test case:
1.Set Cpu register to mExpectedContextInHandler before
exception. 2.Trigger exception specified by ExceptionType.
3.Store SystemContext in mActualContextInHandler and set
SystemContext to mExpectedContextAfterException in handler.
4.After return from exception, store Cpu registers in
mActualContextAfterException.
The expectation is:
1.Register values in mActualContextInHandler are the same
with register values in mExpectedContextInHandler.
2.Register values in mActualContextAfterException are the
same with register values mActualContextAfterException.

d.Test if stack overflow can be captured by CpuStackGuard
in both Bsp and AP. In this test case, stack overflow is
triggered by a funtion which calls itself continuously.
This test case triggers stack overflow in both BSP and AP.
All AP use same Idt with Bsp. The expectation is:
1. PF exception is triggered (leading to a DF if sepereated
stack is not prepared for PF) when Rsp<=StackBase+SIZE_4KB
since [StackBase, StackBase + SIZE_4KB] is marked as not
present in page table when PcdCpuStackGuard is TRUE.
2. Stack for PF/DF exception handler in both Bsp and AP is
succussfully switched by InitializeSeparateExceptionStacks.

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>
18 months agoUefiCpuPkg/CpuPageTableLib:Support PAE paging for PageTableParse
Tan, Dun [Tue, 11 Oct 2022 05:59:35 +0000 (13:59 +0800)]
UefiCpuPkg/CpuPageTableLib:Support PAE paging for PageTableParse

Support PAE paging for PageTableParse API in CpuPageTableLib.

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>
18 months agoUefiCpuPkg:Add RegisterExceptionHandler in PeiCpuExceptionHandlerLib
Liu, Zhiguang [Wed, 12 Oct 2022 07:27:45 +0000 (15:27 +0800)]
UefiCpuPkg:Add RegisterExceptionHandler in PeiCpuExceptionHandlerLib

The PEI instance of the CpuExceptionHandlerLib didn't implement the
RegisterCpuInterruptHandler() API. This patch adds the missing API.

Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
18 months agoBaseTools: Remove duplicated words in C tools
Pierre Gondois [Mon, 3 Oct 2022 07:47:31 +0000 (15:47 +0800)]
BaseTools: Remove duplicated words in C tools

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
18 months agoFix bug on SRIOV ReservedBusNum when ARI enable.
Foster Nong [Wed, 12 Oct 2022 02:36:56 +0000 (10:36 +0800)]
Fix bug on SRIOV ReservedBusNum when ARI enable.

If a device which support both features SR-IOV/ARI  has multi
functions, which maybe support 8-255. After enable ARI forwarding in
the root port and ARI Capable Hierarchy in the SR-IOV PF0.
The device will support and expose multi functions(0-255) with ARI ID routing.
In next device loop in below for() code, actually it still be in the
same SR-IOV device, and just some PF which is over 8 or higher
one(n*8), PciAllocateBusNumber() will allocate bus
number(ReservedBusNum - TempReservedBusNum)) for this PF. if reset
TempReservedBusNum as 0 in this case,it will allocate wrong bus number
for this PF because TempReservedBusNum should be total previous PF's
reserved bus numbers.

code:
  for (Device = 0; Device <= PCI_MAX_DEVICE; Device++) {
    TempReservedBusNum = 0;
    for (Func = 0; Func <= PCI_MAX_FUNC; Func++) {
    //
    // Check to see whether a pci device is present
    //
    Status = PciDevicePresent (
                 PciRootBridgeIo,
                 &Pci,
                 StartBusNumber,
                 Device,
                 Func
                 );
    ...
    Status = PciAllocateBusNumber (PciDevice, *SubBusNumber,
    (UINT8)(PciDevice->ReservedBusNum - TempReservedBusNum), SubBusNumber);

The solution is add a new flag IsAriEnabled to help handle this case.
if ARI is enabled, then TempReservedBusNum will not be reset again
during all functions(1-255) scan with checking flag IsAriEnabled.

Signed-off-by: Foster Nong <foster.nong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
18 months agoMdeModulePkg: Fixed extra 1 SR-IOV reserved bus
Foster Nong [Wed, 12 Oct 2022 02:36:55 +0000 (10:36 +0800)]
MdeModulePkg: Fixed extra 1 SR-IOV reserved bus

Below code will calculate the reserved bus number for the each PF.

Based on the VF routing ID algorithm, PFRid and LastVF in below code
already sure that "All VFs and PFs must have distinct Routing IDs".
PF will be assigned Routing ID based on secBusNumber, ReservedBusNum
will add into SubBusNumber directly. So the SR-IOV device will be
assigned bus range as SecBusNumber ~ (SubBusNumber=(SecBusNumber +
ReservedBusNum)).
Thus "+1" in below code will cause extra 1 bus, and introduce a bus hole.

 PFRid  = EFI_PCI_RID (Bus, Device, Func);
 LastVF = PFRid + FirstVFOffset + (PciIoDevice->InitialVFs - 1) * VFStride;
 PciIoDevice->ReservedBusNum = (UINT16)(EFI_PCI_BUS_OF_RID (LastVF) -
 Bus + 1);

In SR-IOV spec, there is a note in section 2.1.2:
Note: Bus Numbers are a constrained resource. Devices are strongly
encouraged to avoid leaving ?holes? in their Bus Number usage to avoid
wasting Bus Numbers

So the issue can be fixed with below code change.
  PciIoDevice->ReservedBusNum = (UINT16)(EFI_PCI_BUS_OF_RID (LastVF) -
  Bus);

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 agoNetworkPkg: Add LoongArch64 architecture.
Chao Li [Fri, 12 Nov 2021 07:27:29 +0000 (15:27 +0800)]
NetworkPkg: Add LoongArch64 architecture.

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

Add LoongArch64 architecture in to NetworkPkg.

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: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months agoMdeModulePkg/DxeIplPeim : LoongArch DxeIPL implementation.
Chao Li [Fri, 12 Nov 2021 07:19:30 +0000 (15:19 +0800)]
MdeModulePkg/DxeIplPeim : LoongArch DxeIPL implementation.

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

Implement LoongArch DxeIPL instance.

Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Co-authored-by: Baoqi Zhang <zhangbaoqi@loongson.cn>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
18 months agoMdeModulePkg/CapsuleRuntimeDxe: Add LoongArch64 architecture.
Chao Li [Fri, 12 Nov 2021 06:48:25 +0000 (14:48 +0800)]
MdeModulePkg/CapsuleRuntimeDxe: Add LoongArch64 architecture.

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

Add LoongArch in INF for building CapsuleRuntimeDxe LoongArch64 image.

Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months agoMdeModulePkg/Logo: Add LoongArch64 architecture.
Chao Li [Fri, 12 Nov 2021 06:18:08 +0000 (14:18 +0800)]
MdeModulePkg/Logo: Add LoongArch64 architecture.

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

Add LoongArch64 architecture to the Logo.

Cc: Zhichao Gao <zhichao.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
18 months agoMdePkg/BaseSafeIntLib: Add LoongArch64 architecture for BaseSafeIntLib.
Chao Li [Fri, 12 Nov 2021 04:37:47 +0000 (12:37 +0800)]
MdePkg/BaseSafeIntLib: Add LoongArch64 architecture for BaseSafeIntLib.

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

Add LoongArch64 architecture for BaseSafeIntLib library.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months agoMdePkg/BaseSynchronizationLib: LoongArch cache related code.
Chao Li [Fri, 30 Sep 2022 23:38:07 +0000 (07:38 +0800)]
MdePkg/BaseSynchronizationLib: LoongArch cache related code.

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

Support LoongArch cache related functions.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Co-authored-by: Baoqi Zhang <zhangbaoqi@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months agoMdePkg/BaseCpuLib: LoongArch Base CPU library implementation.
Chao Li [Thu, 11 Nov 2021 12:14:20 +0000 (20:14 +0800)]
MdePkg/BaseCpuLib: LoongArch Base CPU library implementation.

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

Implement LoongArch CPU related functions in BaseCpuLib.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months agoMdePkg/BasePeCoff: Add LoongArch PE/Coff related code.
Chao Li [Mon, 29 Nov 2021 04:29:58 +0000 (12:29 +0800)]
MdePkg/BasePeCoff: Add LoongArch PE/Coff related code.

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

Add LoongArch image relocation.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Co-authored-by: Baoqi Zhang <zhangbaoqi@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months agoMdePkg/BaseIoLibIntrinsic: IoLibNoIo for LoongArch architecture.
Chao Li [Thu, 11 Nov 2021 11:09:24 +0000 (19:09 +0800)]
MdePkg/BaseIoLibIntrinsic: IoLibNoIo for LoongArch architecture.

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

LoongArch MMIO library instance, use the IoLibNoIo.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months agoMdePkg/BaseCacheMaintenanceLib: LoongArch cache maintenance implementation.
Chao Li [Wed, 14 Sep 2022 03:03:27 +0000 (11:03 +0800)]
MdePkg/BaseCacheMaintenanceLib: LoongArch cache maintenance implementation.

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

Implement LoongArch cache maintenance functions in
BaseCacheMaintenanceLib.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months agoMdePkg/BaseLib: BaseLib for LOONGARCH64 architecture.
Chao Li [Wed, 14 Sep 2022 02:29:15 +0000 (10:29 +0800)]
MdePkg/BaseLib: BaseLib for LOONGARCH64 architecture.

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

Add LoongArch LOONGARCH64 BaseLib functions.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Co-authored-by: Baoqi Zhang <zhangbaoqi@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months agoMdePkg/Include: LoongArch definitions.
Chao Li [Tue, 6 Sep 2022 07:53:36 +0000 (15:53 +0800)]
MdePkg/Include: LoongArch definitions.

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

Add LoongArch processor related definitions.

For the Http boot and PXE boot types seeing this URL section "Processor
Architecture Type" for the LOONGARCH values:
https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml

For definitions of PE/COFF and LOONGARCH relocation types, see the
"Machine Types" and "Basic Relocation Types" sections of this URL for
LOONGARCH values:
https://docs.microsoft.com/en-us/windows/win32/debug/pe-format

For the register definitions of exceptions context, see the UEFI V2.10
18.2.2, 18.2.4 and 18.2.5 sections of this URL for LOONGARCH
definitions:
https://uefi.org/specs/UEFI/2.10/18_Protocols_Debugger_Support.html

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
18 months agoMdePkg: Add LoongArch LOONGARCH64 binding
Chao Li [Fri, 19 Nov 2021 10:06:06 +0000 (18:06 +0800)]
MdePkg: Add LoongArch LOONGARCH64 binding

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

Add LOONGARCH64 sections in MdePkg.dec and LOONGARCH64 ProcessorBind.h

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Co-authored-by: Baoqi Zhang <zhangbaoqi@loongson.cn>
Co-authored-by: Dongyan Qian <qiandongyan@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months ago.pytool: Add LoongArch64 architecture on LoongArch64 EDK2 CI.
Chao Li [Mon, 15 Nov 2021 09:59:53 +0000 (17:59 +0800)]
.pytool: Add LoongArch64 architecture on LoongArch64 EDK2 CI.

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

Add LoongArch64 architecture on LoongArch64 EDK2 CI testing.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months ago.azurepipelines: Add LoongArch64 architecture on LoongArch64 EDK2 CI.
Chao Li [Mon, 15 Nov 2021 09:59:03 +0000 (17:59 +0800)]
.azurepipelines: Add LoongArch64 architecture on LoongArch64 EDK2 CI.

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

Add LoongArch64 architecture on LoongArch64 EDK2 CI.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months agoBaseTools: Enable LoongArch64 architecture for LoongArch64 EDK2 CI.
Chao Li [Mon, 15 Nov 2021 09:58:05 +0000 (17:58 +0800)]
BaseTools: Enable LoongArch64 architecture for LoongArch64 EDK2 CI.

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

EDK CI for LoongArch64 architecture

Enable LoongArch64 architecture for LoongArch64 EDK2 CI testing.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months agoBaseTools: Add LoongArch64 binding.
Chao Li [Mon, 15 Nov 2021 09:28:46 +0000 (17:28 +0800)]
BaseTools: Add LoongArch64 binding.

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

Add LoongArch64 ProcessorBin.h and add LoongArch to Makefiles.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Co-authored-by: Baoqi Zhang <zhangbaoqi@loongson.cn>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
18 months agoBaseTools: Updated build tools to support new LoongArch.
Chao Li [Fri, 14 Jan 2022 04:19:15 +0000 (12:19 +0800)]
BaseTools: Updated build tools to support new LoongArch.

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

Python code changes for building EDK2 LoongArch platform.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Co-authored-by: Baoqi Zhang <zhangbaoqi@loongson.cn>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
18 months agoBaseTools: Updated for GCC5 tool chain for LoongArch platfrom.
Chao Li [Tue, 6 Sep 2022 11:25:29 +0000 (19:25 +0800)]
BaseTools: Updated for GCC5 tool chain for LoongArch platfrom.

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

BaseTools define template files changes for building EDK2 LoongArch
platform.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Co-authored-by: Dongyan Qian <qiandongyan@loongson.cn>
Co-authored-by: Baoqi Zhang <zhangbaoqi@loongson.cn>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
18 months agoBaseTools: Update GenFw/GenFv to support LoongArch platform.
Chao Li [Tue, 6 Sep 2022 13:00:07 +0000 (21:00 +0800)]
BaseTools: Update GenFw/GenFv to support LoongArch platform.

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

C code changes for building EDK2 LoongArch platform.

For definitions of PE/COFF and LOONGARCH relocation types, see the
"Machine Types" and "Basic Relocation Types" sections of this URL for
LOONGARCH values:
https://docs.microsoft.com/en-us/windows/win32/debug/pe-format

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Co-authored-by: Dongyan Qian <qiandongyan@loongson.cn>
Co-authored-by: Baoqi Zhang <zhangbaoqi@loongson.cn>
Co-authored-by: Yang Zhou <zhouyang@loongson.cn>
Co-authored-by: Xiaotian Wu <wuxiaotian@loongson.cn>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
18 months ago.python/SpellCheck: Add "Loongson" and "LOONGARCH" to "words" section
Chao Li [Thu, 9 Jun 2022 12:26:47 +0000 (20:26 +0800)]
.python/SpellCheck: Add "Loongson" and "LOONGARCH" to "words" section

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

Add Loongson and LOONGARCH to "words" section in cspell.base.yaml file
to avoid spelling check error.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months agoMdeModulePkg: Use LockBoxNullLib for LOONGARCH64
Chao Li [Thu, 28 Oct 2021 02:49:01 +0000 (10:49 +0800)]
MdeModulePkg: Use LockBoxNullLib for LOONGARCH64

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

LoongArch doesn't have SMM by now.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months agoMdePkg/DxeServicesLib: Add LOONGARCH64 architecture
Chao Li [Wed, 27 Oct 2021 09:59:05 +0000 (17:59 +0800)]
MdePkg/DxeServicesLib: Add LOONGARCH64 architecture

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

Add LOONGARCH64 architecture to MdePkg/DxeServiceLib.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months agoUnitTestFrameworkPkg: Add LOONGARCH64 architecture for EDK2 CI.
Chao Li [Tue, 12 Oct 2021 13:02:02 +0000 (21:02 +0800)]
UnitTestFrameworkPkg: Add LOONGARCH64 architecture for EDK2 CI.

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

Add LOONGARCH64 architecture to UnitTestFramworkPkg for LOONGARCH64 EDK2
CI.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months agoShellPkg: Add LOONGARCH64 architecture for EDK2 CI.
Chao Li [Tue, 12 Oct 2021 12:57:53 +0000 (20:57 +0800)]
ShellPkg: Add LOONGARCH64 architecture for EDK2 CI.

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

Add LOONGARCH64 architecture to ShellPkg for EDK2 CI testing.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
18 months agoSecurityPkg: Add LOONGARCH64 architecture for EDK2 CI.
Chao Li [Tue, 12 Oct 2021 12:45:46 +0000 (20:45 +0800)]
SecurityPkg: Add LOONGARCH64 architecture for EDK2 CI.

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

Add LOONGARCH64 architecture to SecurityPkg for EDK2 CI testing.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
18 months agoMdePkg/Include: Add LOONGARCH related definitions EDK2 CI.
Chao Li [Tue, 13 Sep 2022 09:03:33 +0000 (17:03 +0800)]
MdePkg/Include: Add LOONGARCH related definitions EDK2 CI.

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

HTTP/PXE boot LOONGARCH64 related definitions for EDK2 CI.

For the LOONGARCH values, please seeing following URL section
"Processor Architecture Types":
https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months agoCryptoPkg: Add LOONGARCH64 architecture for EDK2 CI.
Chao Li [Fri, 10 Dec 2021 04:32:47 +0000 (12:32 +0800)]
CryptoPkg: Add LOONGARCH64 architecture for EDK2 CI.

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

Add LOONGARCH64 architecture for EDK2 CI testing.

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: Chao Li <lichao@loongson.cn>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
18 months agoNetworkPkg/HttpBootDxe: Add LOONGARCH64 architecture for EDK2 CI.
Chao Li [Fri, 10 Dec 2021 04:19:30 +0000 (12:19 +0800)]
NetworkPkg/HttpBootDxe: Add LOONGARCH64 architecture for EDK2 CI.

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

Add LOONGARCH architecture for EDK2 CI testing.

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: Chao Li <lichao@loongson.cn>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
18 months agoNetworkPkg: Add LOONGARCH64 architecture for EDK2 CI.
Chao Li [Tue, 12 Oct 2021 12:34:01 +0000 (20:34 +0800)]
NetworkPkg: Add LOONGARCH64 architecture for EDK2 CI.

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

Add LOONGARCH64 architecture for EDK2 CI testing.

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: Chao Li <lichao@loongson.cn>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
18 months agoFmpDevicePkg: Add LOONGARCH64 architecture for EDK2 CI.
Chao Li [Tue, 12 Oct 2021 12:30:43 +0000 (20:30 +0800)]
FmpDevicePkg: Add LOONGARCH64 architecture for EDK2 CI.

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

Add LOONGARCH64 architecture for EDK2 CI testing.

Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Cc: Wei6 Xu <wei6.xu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
18 months agoFatPkg: Add LOONGARCH64 architecture for EDK2 CI.
Chao Li [Tue, 12 Oct 2021 12:16:07 +0000 (20:16 +0800)]
FatPkg: Add LOONGARCH64 architecture for EDK2 CI.

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

Add LOONGARCH64 architecture for EDK2 CI testing.

Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
18 months agoMdePkg: Added LoongArch jump buffer register definition to MdePkg.ci.yaml
Chao Li [Wed, 7 Sep 2022 13:04:33 +0000 (21:04 +0800)]
MdePkg: Added LoongArch jump buffer register definition to MdePkg.ci.yaml

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

If the new Arch register is defined in BaseLib.h when running
the CI tests, it will give an ECC check error. Add the
LoongArch register defined in the ExceptionList field to make
the CI ECC check pass.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months agoMdePkg: Added file of DebugSupport.h to MdePkg.ci.yaml
Chao Li [Wed, 7 Sep 2022 12:53:44 +0000 (20:53 +0800)]
MdePkg: Added file of DebugSupport.h to MdePkg.ci.yaml

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

DebugSupport.h is all defined by UEFI Spec, most of the code
doesn't fit EDKII coding style, add it to IgnoreFiles field to
make CI ECC check pass.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
18 months agoUefiPayloadPkg: Remove deprecate Crypto Service
Gua Guo [Wed, 5 Oct 2022 08:48:05 +0000 (16:48 +0800)]
UefiPayloadPkg: Remove deprecate Crypto Service

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

TDES and ARC4 services are deprecated so set it as disable.

Cc: Guo Dong <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Reviewed-by: James Lu <james.lu@intel.com>
Signed-off-by: Gua Guo <gua.guo@intel.com>
18 months agoCryptoPkg: add Unit Test for X509 new function.
Qi Zhang [Wed, 12 Oct 2022 04:36:01 +0000 (12:36 +0800)]
CryptoPkg: add Unit Test for X509 new function.

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

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: Qi Zhang <qi1.zhang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
18 months agoCryptoPkg: add new X509 function to Crypto Service.
Qi Zhang [Wed, 12 Oct 2022 04:36:00 +0000 (12:36 +0800)]
CryptoPkg: add new X509 function to Crypto Service.

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

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: Qi Zhang <qi1.zhang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
18 months agoCryptoPkg: add new X509 function.
Qi Zhang [Wed, 12 Oct 2022 04:35:59 +0000 (12:35 +0800)]
CryptoPkg: add new X509 function.

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

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: Qi Zhang <qi1.zhang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
18 months agoCryptoPkg: add new X509 function definition.
Qi Zhang [Wed, 12 Oct 2022 04:35:58 +0000 (12:35 +0800)]
CryptoPkg: add new X509 function definition.

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

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: Qi Zhang <qi1.zhang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
18 months agoCryptoPkg: add unit test for EC key interface.
Qi Zhang [Wed, 12 Oct 2022 02:48:00 +0000 (10:48 +0800)]
CryptoPkg: add unit test for EC key interface.

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

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: Qi Zhang <qi1.zhang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
18 months agoCryptoPkg: Add EC key interface to DXE and protocol
Qi Zhang [Wed, 12 Oct 2022 02:47:59 +0000 (10:47 +0800)]
CryptoPkg: Add EC key interface to DXE and protocol

The implementation provide EC key interface for EFI
 driver nad EFI BaseCrypt protocol.

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

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: Qi Zhang <qi1.zhang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
18 months agoCryptoPkg: Add EC key retrieving and signature interface.
Qi Zhang [Wed, 12 Oct 2022 02:47:58 +0000 (10:47 +0800)]
CryptoPkg: Add EC key retrieving and signature interface.

This patch is used to retrieve EC key from PEM and X509 and
carry out the EC-DSA signature and verify it.

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

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: Qi Zhang <qi1.zhang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
18 months agoOvmfPkg/VirtioNetDxe: Check ChildHandle argument in GetControllerName
Dimitrije Pavlov [Wed, 17 Aug 2022 14:35:03 +0000 (09:35 -0500)]
OvmfPkg/VirtioNetDxe: Check ChildHandle argument in GetControllerName

Per the UEFI specification, a device driver implementation should return
EFI_UNSUPPORTED if the ChildHandle argument in
EFI_COMPONENT_NAME2_PROTOCOL.GetControllerName() is not NULL.

Signed-off-by: Dimitrije Pavlov <Dimitrije.Pavlov@arm.com>
Reviewed-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Reviewed-by: Sunny Wang <sunny.wang@arm.com>
18 months agoCryptoPkg: Add new Tls APIs to DXE and protocol
Yi Li [Sun, 25 Sep 2022 16:13:05 +0000 (00:13 +0800)]
CryptoPkg: Add new Tls APIs to DXE and protocol

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

The implementation provides new Tls library functions
for Crypto EFI Driver and 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>
18 months agoCryptoPkg: Extend Tls function library
Yi Li [Sun, 25 Sep 2022 09:14:06 +0000 (17:14 +0800)]
CryptoPkg: Extend Tls function library

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

1. TlsSetSignatureAlgoList(): Configure the list of TLS signature algorithms
that should be used as part of the TLS session establishment.
This is needed for some WLAN Supplicant connection establishment flows
that allow only specific TLS signature algorithms to be used, e.g.,
Authenticate and Key Managmenet (AKM) suites that are SUITE-B compliant.

2. TlsSetEcCurve(): Configure the Elliptic Curve that should be used for
TLS flows the use cipher suite with EC,
e.g., TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384.
This is needed for some WLAN Supplicant connection establishment flows
that allow only specific TLS signature algorithms to be used,
e.g., Authenticate and Key Managmenet (AKM) suites that are SUITE-B compliant.

3. TlsShutdown():
Shutdown the TLS connection without releasing the resources,
meaning a new connection can be started without calling TlsNew() and
without setting certificates etc.

4. TlsGetExportKey(): Derive keying material from a TLS connection using the
mechanism described in RFC 5705 and export the key material (needed
by EAP methods such as EAP-TTLS and EAP-PEAP).

5. TlsSetHostPrivateKeyEx(): This function adds the local private key
(PEM-encoded or PKCS#8 or DER-encoded private key) into the specified
TLS object for TLS negotiation. There is already a similar function
TlsSetHostPrivateKey(), the new Ex function introduces a new parameter
Password, set Password to NULL when useless.

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>
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>