6453 Commits

Author SHA1 Message Date
vit9696
d61b269edf MdeModulePkg/EbcDxe: Fix Xcode compilation due to bad type conversion 2025-04-07 15:08:42 +03:00
Mikhail Krichanov
709984a981 Fixed compilation of all packages tracked by CI after rebasing upon edk2-stable202502 tag. 2025-04-07 13:54:15 +03:00
Mike Beaton
9cdba17a1a IntrinsicLib: Move from CryptoPkg to MdePkg 2025-04-07 12:32:50 +03:00
vit9696
19ca216533 MdeModulePkg/EhciDxe: Fix legacy handoff logic
references acidanthera/bugtracker#2436
2025-04-07 12:32:50 +03:00
Mikhail Krichanov
ba561ef7ff Fixed compilation of all packages tracked by CI after rebasing upon edk2-stable202405 tag. 2025-04-07 12:32:50 +03:00
Mikhail Krichanov
0d9d6f987b Fixed compilation of all packages tracked by CI after rebasing upon edk2-stable202311. 2025-04-07 12:32:50 +03:00
Mikhail Krichanov
992385e15e SecurePE: Defined new PcdImageProtectionPolicy. 2025-04-07 12:30:28 +03:00
Mikhail Krichanov
48b806f46f UE: Support UE generation and consumption. 2025-04-07 12:24:28 +03:00
Mikhail Krichanov
1fef202932 MdePkg/UefiImageLib: Introduce DebugAddress
Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
2025-04-07 12:24:27 +03:00
Mikhail Krichanov
e46d356fc9 MdePkg/UefiImageLib: Support multi-format and multi-source architecture
Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
2025-04-07 12:24:27 +03:00
Marvin Häuser
ec35a44c1e MdeModulePkg/DxeCore: Re-use ImageIsFromFv for memory protection 2025-04-07 12:24:27 +03:00
Mikhail Krichanov
51c4b78146 Revert "MdeModulePkg: Enable forward edge CFI in mem attributes table"
This reverts commit e4ef609319236a018c60b84f68d9d923c4ba383e.
2025-04-07 12:24:27 +03:00
Mikhail Krichanov
20dd836214 MdeModulePkg/Core/Dxe: Integrate CPU Architectural producer
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3223

In the current design, memory protection is not available till CpuDxe
is loaded. To resolve this, introduce CpuArchLib to move the
CPU Architectural initialization to DxeCore.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Vitaly Cheptsov <vit9696@protonmail.com>
Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
2025-04-07 12:23:28 +03:00
Mikhail Krichanov
7193c4e313 BaseTools: Introduce new HII section design 2025-04-07 12:18:23 +03:00
Marvin Häuser
f7146c7ae7 Remove hacks related to former lack of XCODE5 .hii support 2025-04-07 12:18:23 +03:00
Mikhail Krichanov
bc87d7b430 Drop support for the TE format 2025-04-07 12:18:22 +03:00
Marvin Häuser
c24587e6bf MdeModulePkg/ExtendedFirmwarePerformance: Fix FPDT struct alignment 2025-04-07 12:18:22 +03:00
Mikhail Krichanov
f60f34fabf BaseTools/CommonLib: Consume MemoryAllocationLib 2025-04-07 12:18:22 +03:00
Mikhail Krichanov
6b652ab025 MdePkg/MemoryAllocationLib: Add Allocate(Aligned)CodePages 2025-04-07 12:16:51 +03:00
Mikhail Krichanov
a52efcc86a MdePkg: Introduce CommonMemoryAllocationLib 2025-04-07 12:13:58 +03:00
Marvin Häuser
3cad7a6524 MdeModulePkg: Manage MemoryProfileLib separately 2025-04-07 12:13:58 +03:00
Marvin Häuser
d11ca287c5 MdeModulePkg/CorePei: Remove unused ShadowedImageRead member 2025-04-07 12:13:58 +03:00
Marvin Häuser
f4778d6fdd EmulatorPkg: Fix some image loader related issues 2025-04-07 12:13:58 +03:00
Savva Mitrofanov
09b751e80a MdeModulePkg/BrotliCustomDecompressLib: Disable C4559 MSVC warning
Disables redefinition warning due to win 10 sdk to fix build using MSVC
toolchain

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2025-04-07 12:13:57 +03:00
Mikhail Krichanov
011411a38e BaseTools, MdeModulePkg: Update brotli submodule
Update the brotli submodule to the latest commit (ed1995b6bda1)
so that the build isn't broken in GCC 12 compilers.

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2025-04-07 12:13:57 +03:00
Mikhail Krichanov
09a0c067d0 SecurePE: Replaced old PE loader with Secure one. 2025-04-07 12:12:35 +03:00
Mikhail Krichanov
37c4db9e29 MdeModulePkg/DebugSupportDxe: Adds callback function prototypes in caller
Adds EFI_EXCEPTION_CALLBACK and EFI_PERIODIC_CALLBACK casts to
RegisteredCallback call in InterruptDistributionHub to suppress
deprecated non-prototype LLVM 15 warning

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2025-04-07 12:02:07 +03:00
Savva Mitrofanov
4778567e82 MdeModulePkg/CapsuleOnDiskLoadPei: Removes unused Index variable
Removes unused Index local variable in RetrieveRelocatedCapsule to
suppress compiler warning in LLVM 15

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2025-04-07 12:02:07 +03:00
Mikhail Krichanov
c8ac8c004a MdeModulePkg/RegularExpressionDxe: Corrects onigurama build with LLVM 15
Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2025-04-07 12:02:07 +03:00
Savva Mitrofanov
e8d34602f0 MdeModulePkg/VarCheckHiiLib: Remove unused variable FfsIndex
Corrects compiler warning due to unused variable in VarCheckHiiGenFromFv

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2025-04-07 12:02:07 +03:00
Savva Mitrofanov
6ae449abe4 MdeModulePkg/SmbiosMeasurementDxe: Removes unused local variable
Removes unused local variable Size in GetSmbiosStringById

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2025-04-07 12:02:07 +03:00
Savva Mitrofanov
bef4387f56 MdeModulePkg/BrotliCustomDecompressLib: Correct BrotliDecompress
We need to pass DestSize as pointer, because we assign this output var
to TotalOut value inside BrotliDecompress routine

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2025-04-07 12:02:07 +03:00
Vitaly Cheptsov
28045e5b49 ShellPkg: Add support for input with separately reported modifiers
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2510

Some firmwares:
- Report Shift modifier even when they report upper-case unicode letter.
- Report Ctrl modifier with "shifted" UniChar (i.e. X - 'A' + 1).

This change provides support for these firmwares preserving the compatibility
with the previous input handling.

Signed-off-by: Michael Belyaev <usrsse2@icloud.com>
Reviewed-by: Vitaly Cheptsov <vit9696@protonmail.com>
2025-04-07 12:02:07 +03:00
Longhaox Lee
fbe0805b20 MdeModulePkg/HiiDatabaseDxe: Remove buffer error for string default.
Remove efivarstore IFR buffer error when string load default.
In the case of varstore type IFR, it will be NULL,
just break into next opcode process.

Resolve issue from commit cbe8a09dbac5c39d24ce5c4b9e7d44607f6c23da
varstore type IFR string might return status error
while execute ExtractConfig function.

Signed-off-by: Longhao Lee <longhaox.lee@intel.com>
2025-02-21 08:50:36 +08:00
Phil Noh
0192f2d7cb MdeModulePkg/UsbBusPei: Improve PEI USB enumeration
Unlike DXE USB enumeration that enumerates all changed ports on timer
interrupt, PEI USB Enumeration runs once at the driver entry point.
USB3.x devices initially appear in USB2.0 ports. When the USB2.0 port is
reset, the USB3.x device disappears from the USB2.0 port and appears on the
USB3.0 port. The USB3.x device won't be enumerated if the USB2.0 port
number is greater than the USB3.0 port number. Re-enumerate USB to make
sure USB3.x devices in this case.

Signed-off-by: Phil Noh <Phil.Noh@amd.com>
2025-02-19 10:21:00 +08:00
Kane Chen
0d61f52fe3 Add MockVariablePolicyHelperLib
Signed-off-by: Kane Chen <kane.chen@microsoft.com>
2025-02-07 18:43:32 +00:00
Oliver Smith-Denny
efbf5ed08c MdePkg: Move StackCheckLibStaticInit to StackCheckLib
This commit oves StackCheckLib from a NULL lib to an instance of
StackCheckLib. This requires every entry point to add a library
dependency on StackCheckLib. It also requires every SEC module
to have a dependency on StackCheckLib because there is no
standard SEC entry point.

It allows for greater flexibility for a platform to apply stack
cookies and simplifies DSC logic.

Continuous-integration-options: PatchCheck.ignore-multi-package

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-02-07 02:23:11 +00:00
Mike Maslenkin
c58501aa1a MdeModulePkg: NvmExpressDxe: fix warning about uninitialized variable
NvmExpressMediaSanitize.c: In function 'NvmExpressMediaClear':
NvmExpressMediaSanitize.c:337:29: error: 'Status' may be used uninitialized
  in this function [-Werror=maybe-uninitialized]

   EFI_STATUS                Status;
                             ^~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
2025-01-29 17:20:57 +01:00
Mike Maslenkin
0f12a5f722 MdeModulePkg: fix warning about uninitialized variable
Handle.c:1302:24: error: 'Prot' may be used uninitialized
  in this function [-Werror=maybe-uninitialized]

       *Interface = Prot->Interface;
                    ~~~~^~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
2025-01-29 17:20:57 +01:00
Mike Maslenkin
a5cb67fb8d MdeModulePkg: PeiMain: fix warning about uninitialized variable
Dispatcher.c:1639:34: error: 'FvMigrationFlags' may be used uninitialized
  in this function [-Werror=maybe-uninitialized]
(((FvMigrationFlags & FLAGS_FV_MIGRATE_BEFORE_PEI_CORE_REENTRY) == 0) ||
                ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
2025-01-29 17:20:57 +01:00
Star Zeng
7c5ec51175 MdeModulePkg PeiMain: Remove return for PeiCoreBuildHobHandoffInfoTable()
PeiCoreBuildHobHandoffInfoTable() always returns EFI_SUCCESS, and also
its return is not consumed at all, so this patch removes return for
PeiCoreBuildHobHandoffInfoTable().

Signed-off-by: Star Zeng <star.zeng@intel.com>
2025-01-26 18:35:08 +00:00
Dionna Glaze
f35d3a5bd3 MdeModulePkg: Make noisy log DEBUG_VERBOSE
For bootup of VMs with multiple accelerators, these logging instructions
flood the logs for a good 30 seconds.
Originally found by Gary Zibrat.

Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
2025-01-15 03:02:00 +00:00
Longhaox Lee
cbe8a09dba MdeModulePkg/HiiDatabaseDxe: Add string question load default support.
Add string question load default support.
load default data from PCD PcdNvStoreDefaultValueBuffer.

Signed-off-by: Longhao Lee <longhaox.lee@intel.com>
2025-01-14 18:00:29 +08:00
INDIA\sachinganesh
1a23fe7472 MdeModulePkg: Update AtaPassThru to UEFI 2.10A
UEFI 2.10A Specification has added a new error case to
EFI_ATA_PASS_THRU_PROTOCOL.GetNextDevice API which handles
port multiplier not being connected to the Port.

Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
2025-01-09 12:40:45 +08: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 ff4c49a5ee38 ("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
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
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
Yang Gang
e02c7848af MdeModulePkg SmbiosMeasurementDxe: Release TableAddress after use
Signed-off-by: Yang Gang <yanggang@byosoft.com.cn>
2024-12-11 09:51:45 +08:00
Yang Gang
58c7517228 MdeModulePkg DriverHealthManagerDxe: Display HealthStatus as TextTwo
When PcdBrowserGrayOutTextStatement is TRUE, TextOpCode will be GrayOut.
HealthStatus cannot be displayed in help area, use TextTwo to display it.

Signed-off-by: Yang Gang <yanggang@byosoft.com.cn>
2024-12-11 09:02:08 +08:00
Phil Noh
1bb10a479f MdeModulePkg/BrotliCustomDecompressLib: Make the library buildable
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4877

Brotli decompression library is supported in EDK2 core. Currently it is
not buildable when linking it to DxeIpl driver. The result is also checked
on edk2 master branch. It could be related to updating Brotli submodule
(v1.0.9) on the previous commit (1193aa2). The update makes the library
buildable. It was verified for the functional status.

Signed-off-by: Phil Noh <Phil.Noh@amd.com>
2024-12-11 08:38:27 +08:00