Commit Graph

33707 Commits

Author SHA1 Message Date
Chao Li 2ece0790f7 UefiCpuPkg: Add dump interrupt type on LoongArch64
If the exception type is INT, we need to know which interrupt could not
be handled, so we added a method to dump them.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Dun Tan <dun.tan@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
2024-12-23 03:18:13 +00:00
Chao Li 0fdffb71df UefiCpuPkg: Adjust the exception handler logic on LoongArch64
There is a problem with LoongArch64 exception handler, it returns a
unhandled value when we get an exception type, the correct value should
be right shifted 16 bits, so fix it.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Dun Tan <dun.tan@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
2024-12-23 03:18:13 +00:00
Henz, Patrick fbbf4206c1 MdeModulePkg/XhciDxe: Non-zero start/stop values in XhcGetElapsedTicks
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4578

The implementation of XhcGetElapsedTicks did not account for
non-zero start and stop values for the performance counter
timer, potentially resulting in an incorrect elapsed tick
count getting returned to the caller. Account for non-zero
start and stop values when calculating the elapsed tick
count.

Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Patrick Henz <patrick.henz@hpe.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Hao A Wu <hao.a.wu@intel.com>
Message-ID: <c3038878c4d30c54e60cce7192cf1aa60c30ad2e.1698770394.git.patrick.henz@hpe.com>

Resolve rebase conflict from commit ff4c49a5ee ("MdeModulePkg/Bus: Fix
XhciDxe Linker Issues", 2023-12-06): rename "mPerformanceCounter*" to
"mXhciPerformanceCounter*".

Signed-off-by: Laszlo Ersek <laszlo.ersek@posteo.net>
2024-12-22 22:10:54 +00:00
Michael Kubacki 896930edc9 .github: Add issue automation workflows
REF: https://github.com/tianocore/edk2/discussions/5926

Adds workflows to manage labels on issues based on issue content.

Workflows:

- `issue-assignment` - Performs actions when an issue is assigned.
  - Currently, removed the `state:needs-owner` label.
- `issue-triage` - Assigns initial labels to the issue based on data
  entered when the issue was created.
  - The policies for applying labels are defined in
    - `advanced-issue-labeler.yml`
	- Note: Based on https://github.com/marketplace/actions/advanced-issue-labeler
- `scheduled-maintenance` - Runs every hour to perform clean up work
  need on issues.
  - Currently, closes issues that have had the `state:wont-fix` label
    applied.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2024-12-21 01:30:20 +00:00
kuqin12 3c8016b302 BaseTools: Support custom library build for base tools on Linux ARM
This change added the build script to cross compile the base tool
binaries for Linux ARM/AARCH64 systems.

The needed libuuid system library is pulled from source file and rebuilt
to support the corresponding library dependencies. Individual tools'
makefiles are also updated to link the cross compiled library as well.

The EDK2 base tool build script was also updated to support such change.

This was tested functional on Linux ARM host system.

Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2024-12-20 22:57:04 +00:00
Kun Qin 74bf7f55c1 BaseTools: Adding cross compilation of BaseTool for Windows ARM/ARM64
This change adds the support of crossbuilding basetool for Windows ARM/
ARM64 systems, which will enable the generally available pipeline agents
to build binary tools and make releases as they see fit.

The EDK2 base tools build script is also updated to support cross
compilation using this script.

The crossbuilt binary output is tested on Windows ARM based hardware
systems.

Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2024-12-20 22:57:04 +00:00
kuqin12 4b2f964749 BaseTools: Adding support of building BaseTool on Windows ARM/ARM64
This change focuses on the support of building basetool natively for
Windows ARM/ARM64 host system, which will enable the ARM based platforms
to build UEFI and unit tests.

Note that the warnings due to integer conversions are suppressed for
this specific target to avoid too much local changes carried in MU. The
formal change should drop all these binaries and move to pythonic
scripts.

The binary output is tested on Windows ARM based hardware systems.

Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2024-12-20 22:57:04 +00:00
Wei6 Xu 79a64e73f7 StandaloneMmPkg/Core: Support to dispatch multiple standalone MM FVs
Add support to dispatch multiple standalone MM FVs for StandaloneMmCore.
Set the maximum supported FV count to 2.

Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
2024-12-20 10:16:16 +00:00
Michael Kubacki 40df344b54 .github: Add GitHub issue templates
REF:https://github.com/tianocore/edk2/discussions/5926

Adds GitHub form isssue templates for bugs, documentation requests,
and feature requests.

These files define the form structure in YAML to be rendered by
GitHub in the edk2 repo issues area.

See the referenced RFC for additional details.

Future changes will add automation tasks described in the RFC.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2024-12-20 09:28:51 +00:00
Hongbin1 Zhang 124ed0f6d8 IntelFsp2Pkg : Add FSP-I arch config PPI
Add FSP-I arch config PPI header file and GUID for supporting FSP-I
to get Bootloader MM FV address and length, Bootloader MM FV context
Data address and length under dispatch mode

Signed-off-by: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Duggapu Chinni B <chinni.b.duggapu@intel.com>
Cc: Ted Kuo <ted.kuo@intel.com>
Cc: Ashraf Ali S <ashraf.ali.s@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
2024-12-20 07:40:28 +00:00
Hongbin1 Zhang 1d1e0474d7 IntelFsp2WrapperPkg/FspiWrapperPeim : Support FSP-I measurement
Add code to support FSP-I binary measurement.

Signed-off-by: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Duggapu Chinni B <chinni.b.duggapu@intel.com>
Cc: Chen Gang C <gang.c.chen@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Ted Kuo <ted.kuo@intel.com>
Cc: Ashraf Ali S <ashraf.ali.s@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
2024-12-20 06:29:58 +00:00
Hongbin1 Zhang df1726a65e IntelFsp2WrapperPkg/FspiWrapperPeim : Support API mode
Add fspsmm init interface for API mode.

Signed-off-by: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Duggapu Chinni B <chinni.b.duggapu@intel.com>
Cc: Chen Gang C <gang.c.chen@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Ted Kuo <ted.kuo@intel.com>
Cc: Ashraf Ali S <ashraf.ali.s@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
2024-12-20 06:29:58 +00:00
Hongbin1 Zhang 4ffa8810af IntelFsp2Pkg : Add fsp status code for fspsmm init
Add fsp status code for fspsmm init interface.

Signed-off-by: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Duggapu Chinni B <chinni.b.duggapu@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Ted Kuo <ted.kuo@intel.com>
Cc: Ashraf Ali S <ashraf.ali.s@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
2024-12-20 06:29:58 +00:00
Hongbin1 Zhang e374edc180 IntelFsp2WrapperPkg/FspiWrapperPeim : Support dispatch mode
Add FSP-SMM code for dispatch mode.

Signed-off-by: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Duggapu Chinni B <chinni.b.duggapu@intel.com>
Cc: Chen Gang C <gang.c.chen@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Ted Kuo <ted.kuo@intel.com>
Cc: Ashraf Ali S <ashraf.ali.s@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
2024-12-20 06:29:58 +00:00
Hongbin1 Zhang 6fd8533b62 IntelFsp2WrapperPkg/FspiWrapperPeim : FSP-I wrapper PEIM entrypoint
FSP-I wrapper PEIM entrypoint is for including FSP-SMM code for both
dispatch and API mode.

Signed-off-by: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Duggapu Chinni B <chinni.b.duggapu@intel.com>
Cc: Chen Gang C <gang.c.chen@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Ted Kuo <ted.kuo@intel.com>
Cc: Ashraf Ali S <ashraf.ali.s@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
2024-12-20 06:29:58 +00:00
Hongbin1 Zhang 816a02cb3b StandaloneMmPkg/MmIpl : Add MM core fv location PPI support
MmIpl should locate MM core FV location PPI to find current MM
FV location.

Signed-off-by: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Wei6 Xu <wei6.xu@intel.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
2024-12-20 05:44:54 +00:00
Hongbin1 Zhang 47cb080ca4 StandaloneMmPkg : Add MM core fv location PPI
Add MM core FV location PPI, it will include
MM core FV location which could be in FSP-I
or Bootloader MM FV.

Signed-off-by: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Wei6 Xu <wei6.xu@intel.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
2024-12-20 05:44:54 +00:00
Hongbin1 Zhang 8279e49aae StandaloneMmPkg/MmIpl : Check if MM FV HOB was built
Skip MM FV HOB build if MM platform HOB list already has
the HOB.

Signed-off-by: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Wei6 Xu <wei6.xu@intel.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
2024-12-20 04:22:06 +00:00
Zhao,Yanxin e8ce6c5189 UefiPkg/PiSmmCpuDxeSmm: Set SmmProfile Variable only for DXE SMM
Some platforms plan to move the Standalone MM CPU driver into the FSP.
However, there is no variable service support in FSP. Therefore, the
SetVariable logic for the Standalone MM CPU will be removed. With this
change, users can dump the SmmProfile data from the Memory Allocation
HOB: gMmProfileDataHobGuid.
This change does not impact the DXE SMM, which will still retrieve the
SmmProfile data from the variable service.

Signed-off-by: Yanxin Zhao <yanxin.zhao@intel.com>
2024-12-20 02:17:40 +00:00
Guo Dong 4af5849556 UefiPayloadPkg: Fix the issue detected by Uncrustify
Signed-off-by: Guo Dong <guo.dong@intel.com>
2024-12-19 02:25:24 +00:00
Guo Dong c5811ef1b3 UefiPayloadPkg: Enhance universal payload build
If there is no relocation in the payload it would build failure.
This will fix the build failure.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2024-12-19 02:25:24 +00:00
Guo Dong 72b65146bf UefiPayloadPkg: Enhance Universal payload serial port node
Current implementation only supports serial port sub-node under
PCI root bridge node.

This enhancement support serial port node regardless it is under
root node or PCI root bridge node using a single FDT passing function.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2024-12-19 02:25:24 +00:00
Michael Kubacki 7e7492fa12 .pytool/EccCheck: Open files in utf-8
The EccCheck plugin currently fails if a file contains characters
outside the platform-dependent encoding returned from
locale.getencoding().

This change updates the encoding to utf-8 so the plugin is more
robust while continuing to support backward compatibility with the
ASCII range.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2024-12-19 00:19:13 +00:00
Michael Kubacki 260d36484d .pytool/LicenseCheck: Open files in utf-8
The LicenseCheck plugin currently fails if a file contains characters
outside the platform-dependent encoding returned from
locale.getencoding().

This change updates the encoding to utf-8 so the plugin is more
robust while continuing to support backward compatibility with the
ASCII range.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2024-12-19 00:19:13 +00:00
Phil Noh b8602d8fee NetworkPkg/WifiConnectionManagerDxe: Keep Setup page on no Wi-Fi module
With the driver, "Wi-Fi Configuration" Setup page is available regardless
of Wi-Fi module existence. When there is no Wi-Fi module, it is found that
entering the page causes exiting Setup browser. User would think the result
as an error. For better user experience, the update enables the page to
report the module status like a blank page. It prevents exiting Setup.

Signed-off-by: Phil Noh <Phil.Noh@amd.com>
2024-12-18 21:04:51 +00:00
Doug Cook (WINDOWS) d1fccbf494 EmulatorPkg: spurious failure in WriteBlocks on X64
WinNtBlockIoWriteBlocks can spuriously fail on X64. This occurs because
&BytesWritten is a `UINTN*` (i.e. `UINT64*`) but is cast to `LPDWORD`
(i.e. `UINT32*`). Only the low 32 bits are initialized by WriteFile, so
the high 32 bits are uninitialized. This means we will spuriously fail
the `BytesWritten != BufferSize` test.

This doesn't occur on X86-32 since UINTN is the same as DWORD in that
case.

Fix is to declare BytesWritten as DWORD to match the type expected by
WriteFile. This also makes the cast unnecessary.

Signed-off-by: Doug Cook <idigdoug@gmail.com>
2024-12-17 19:01:48 +00:00
Phil Noh 30c8a73850 SecurityPkg/SecureBootConfigDxe: Enhance help in Delete Signature page
Currently "Delete Signature" Setup page lists enrolled signatures and each
signature is shown with signature GUID (prompt) and type (help). It is
possible for some signatures to be shown with same signature GUID and
type. In this case, it is difficult to identify the target signature to
delete. The update enhances help information to distinguish signatures.

Signed-off-by: Phil Noh <Phil.Noh@amd.com>
2024-12-17 16:46:29 +00:00
Pierre Gondois 2c07ab6256 Maintainers.txt: Add myself as ShellPkg reviewer
Add myself as a reviewer for the ShellPkg to help with the
reviewing effort.

Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2024-12-17 12:45:38 +01:00
Gerd Hoffmann 9ef348350a OvmfPkg: document runtime config options
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-12-17 12:44:11 +01:00
Oliver Smith-Denny 924780f2cc UefiCpuPkg: x86 CpuDxe: Allocate AP Exception Stack Below 4GB
When setting up the APs' exception stacks, the x86 CpuDxe allocates
any range and then copies over the existing GDT and IDT and adds the
appropriate new entries for this AP, then installs them.

This can cause an issue if the allocated buffer is over 4GB because
the next time the AP is started, it goes through an INIT-SIPI-SIPI,
stepping through real mode -> protected mode -> long mode and when it
is in protected mode it needs a 32 code segment descriptor or else it
will fault when trying to execute. If the GDT lives above 4GB, it
cannot be accessed by the protected mode code and the triple fault
is seen.

This patch updates CpuDxe's MP management code to allocate the
exception stacks for all APs below 4GB explicitly to avoid this
problem, such as it does with the BSP's GDT that first gets
populated to the APs.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2024-12-17 10:55:59 +00:00
Chris Fernald cef65b2e93 MdePkg BootManagerPolicy.h: Define GUID for connecting storage devices.
Some platforms require connecting storage media while booting to
network, or require enumerating storage protocols that were not initially
enumerated during BDS. This change adds a GUID to allow implementation
of boot manager's ConnectDeviceClass to connect storage media.

Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
2024-12-17 04:15:46 +00:00
Carsten Haitzler b38180effe ShellPkg/AcpiView: RAS2 Parser - check validity of PCC Count
This checks the number of PCC descriptor entries provided match the
count set in the table, and if they don't indicate a warning.

Signed-off-by: Carsten Haitzler <carsten.haitzler@foss.arm.com>
2024-12-17 02:43:05 +00:00
Aaron Pop 35216819b5 SourceLevelDebugPkg DxeDebugAgent: Handle additional initialize cases.
Handle both DEBUG_AGENT_INIT_REINITIALIZE and
DEBUG_AGENT_INIT_DXE_CORE_LATE InitFlags to prevent an assert.

No additional initlization takes place for these cases.

Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
2024-12-16 20:49:45 +00:00
Chris Fernald 17e67d26d9 MdeModulePkg DxeMain: Add late initialization for Debug Agent.
Add a late initialize in DxeMain for the debug agent. This is required
for the debug agent to be able to setup events to handle image loads,
exit boot services, and other important callbacks.

Define a reinitialize debug agent.

Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
2024-12-16 20:49:45 +00:00
Tormod Volden e99d532fd7 ShellPkg/UefiShellLib: Accept "0 " as valid numeric string
InternalShellIsHexOrDecimalNumber() would fail to interpret e.g. "0 " or
"00 " as valid numeric strings. After skipping the "0" digits as
leading zeroes, it would check if the next character is a valid hex or
decimal digit, which would then fail on the terminating character.

Therefore return success if "leading" zeroes have been consumed and
there are no more characters.

InternalShellStrHexToUint64() would fail to interpret e.g. "0 " or "00 "
as valid numeric strings. After skipping the "0" digits as leading
zeroes, it would find itself surprised by the following space.

Restrict the "bad space" check to the case where it had just consumed
the "x" or "X" marker. Otherwise the space is fine (depending on
StopAtSpace either end of number or interspersed space) since there
were only zeroes so far.

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

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2024-12-16 18:34:43 +00:00
Tormod Volden d63d5884d7 ShellPkg/UefiShellLib: Only write value if successful conversion
The ShellConvertStringToUint64() function documentation says:
"Upon a successful return the value of the conversion."

So do not write any value if the conversion failed.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2024-12-16 18:34:43 +00:00
Tormod Volden f34a945a80 ShellPkg/UefiShellLib: Simplify check for empty string
StrSize() uses StrLen() which counts until the terminating NULL
character.

For checking for an empty string it is more efficient to directly check
for the NULL terminator instead of calling StrSize().

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2024-12-16 18:34:43 +00:00
Tormod Volden e11a912aa3 ShellPkg/UefiShellLib: Correct check for empty string
StrSize() will never return zero since it counts the terminating NULL
character.

An empty string will have the storage size of the terminator.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2024-12-16 18:34:43 +00:00
Tormod Volden ef3a1ef397 ShellPkg/UefiShellLib: Prevent out-of-bounds access
If InternalShellStrHexToUint64() is passed a string that starts with 'X'
or 'x' it would try to read the byte before the start of the string
buffer.

Instead check if leading zeroes have been consumed.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2024-12-16 18:34:43 +00:00
Christopher Zurcher 7936ffa1e6 MdePkg/Ufs.h: Update to UFS 4.0
Signed-off-by: Christopher Zurcher <christopher.zurcher@microsoft.com>
2024-12-16 15:39:35 +08:00
Christopher Zurcher 59cfc13139 MdeModulePkg/Bus/Ufs: Use IndustryStandard headers
Remove duplicate private header files and reference UFS spec definitions
from the IndustryStandard folder.

Signed-off-by: Christopher Zurcher <christopher.zurcher@microsoft.com>
2024-12-16 15:39:35 +08:00
Christopher Zurcher 29ebe5ee5a MdePkg/IndustryStandard: Add UFS definitions
These files are direct ports from the (identical) files:
MdeModulePkg\Bus\Ufs\UfsBlockIoPei\UfsHci.h
MdeModulePkg\Bus\Ufs\UfsPassThruDxe\UfsPassThruHci.h

Signed-off-by: Christopher Zurcher <christopher.zurcher@microsoft.com>
2024-12-16 15:39:35 +08:00
Laszlo Ersek 89b527df17 CryptoPkg: revert BUFSIZ macro definition from commit 456dd8b99f
OpenSSL ticket <https://github.com/openssl/openssl/issues/8904> has been
fixed in OpenSSL commit 2e9d61ecd81a ("crypto/evp/evp_key.c: #define
BUFSIZ if <stdio.h> doesn't #define it", 2019-05-27).

We should simplify "CryptoPkg/Library/Include/CrtLibSupport.h" and back
out the change made to that file by edk2 commit 456dd8b99f ("CryptoPkg:
Upgrade OpenSSL to 1.1.1b", 2019-06-03).

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1897
Signed-off-by: Laszlo Ersek <laszlo.ersek@posteo.net>
2024-12-16 02:22:36 +00:00
Oleg Ilyasov 1a440d9638 Retrieve the USB class specific data from the configuration descriptor
If USB device reports class specific descriptors, it is currently the job of
device driver to parse the configuration to find the class specific data.
The new library functions parse the configuration descriptor and return class
specific interface and class specific endpoint descriptors.
Also, these new functions allow to retrieve the data from non-default alternate
settings without performing a switch to this setting. Switching to the
alternate setting currently implies the execution of UsbSetInterface function
that performs USB control trnasfer.
In some cases this switch is not desirable so the new functions
UsbGetInterfaceDescriptorSetting and UsbGetEndpointDescriptorSetting come
in handy.

Signed-off-by: Oleg Ilyasov <olegi@ami.com>
2024-12-13 23:56:10 +00:00
Michael Kubacki c7354e9c84 OvmfPkg: Add minimum Python version for CI badge
The Python version used for build and CI should always be at least
the minimum version supported by edk2-pytool-extensions. A badge
is added that keeps this information dynamically up-to-date based
on the minimum version specified in edk2-pytool-extensions
pyproject.toml file.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2024-12-13 22:05:02 +00:00
Michael Kubacki 4274bcf146 EmulatorPkg: Add minimum Python version for CI badge
The Python version used for build and CI should always be at least
the minimum version supported by edk2-pytool-extensions. A badge
is added that keeps this information dynamically up-to-date based
on the minimum version specified in edk2-pytool-extensions
pyproject.toml file.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2024-12-13 22:05:02 +00:00
Michael Kubacki ff003faabe ReadMe.rst: Add minimum Python version badge
The Python version used for build and CI should always be at least
the minimum version supported by edk2-pytool-extensions. A badge
is added that keeps this information dynamically up-to-date based
on the minimum version specified in edk2-pytool-extensions
pyproject.toml file.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2024-12-13 22:05:02 +00:00
Ceping Sun c1eb477e06 OvmfPkg/TdxDxe: Clear GPR Mask for RBX
Refer to intel-tdx-module-api spec section 5.5.21, GPR mask
(TDVMCALL_EXPOSE_REGS_MASK) is a bitmap that controls which
part of the guest TD GPR and XMM state is passed as-is to
the VMM and back.
- A bit value of 0 indicates that the corresponding register
   is saved by the Intel TDX module and not passed as-is to
   Host VMM.
- A bit value of 1 indicates that the corresponding register
   is passed as-is to the host VMM.

Currently, RBX is used as the mailbox address in ApRunLoop.nasm,
the corresponding bit value of RBX in MASK(Bit 3) is set as 1 which
means the value is passed to Host VMM as-is and it can be changed by
Host VMM.

So the bitmask shall be set as 0 to avoid this situation.

Reference:
[TDX-API]: intel-tdx-module-abi-spec
https://cdrdv2.intel.com/v1/dl/getContent/733579

Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Hunter Adrian <adrian.hunter@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
2024-12-13 13:29:27 +00:00
Chao Li 3022bab164 OvmfPkg: Remove macro MAX_LOONGARCH_EXCEPTION
Since the UEFI 2.11 has been released, the macro
MAX_LOONGARCH_EXCEPTION has been added in MdePkg, so it is deleted in
LoongArchVirt/Sec/LoongArch64/Start.S

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
2024-12-12 04:57:03 +00:00
Chao Li 9537f8ce67 UefiCpuPkg: Remove macro MAX_LOONGARCH_EXCEPTION
Since the UEFI 2.11 has been released, the macro
MAX_LOONGARCH_EXCEPTION has been added in MdePkg, so it is deleted in
LoongArch folder header file.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Dun Tan <dun.tan@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
2024-12-12 04:57:03 +00:00