34030 Commits

Author SHA1 Message Date
Marvin Häuser
c24587e6bf MdeModulePkg/ExtendedFirmwarePerformance: Fix FPDT struct alignment 2025-04-07 12:18:22 +03:00
Marvin Häuser
c4c7783b5c UefiPayloadPkg/UefiPayloadEntry: Return image destination size as UINT32 2025-04-07 12:18:22 +03:00
Mikhail Krichanov
27ffa568f5 UefiCpuPkg/CpuExceptionHandlerLib: Creates unified ExceptionHandlerAsm
This change removes Xcode5ExceptionHandlerAsm and merge it's
functionality into ExceptionHandlerAsm.
Also decreases number of vectors to 32 for:
- 64-bit PeiCpuExceptionHandlerLib
- 32-bit PeiCpuExceptionHandlerLib, SecPeiCpuExceptionHandlerLib

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2025-04-07 12:18:22 +03:00
Mikhail Krichanov
f60f34fabf BaseTools/CommonLib: Consume MemoryAllocationLib 2025-04-07 12:18:22 +03:00
Marvin Häuser
0a18e628ca EmbeddedPkg/PrePiLib: Deduplicate MemoryAllocationLib declarations 2025-04-07 12:18:22 +03:00
Marvin Häuser
7fb834ffac EmbeddedPkg/NonCoherentDmaLib: Utilize AllocateAlignedPagesEx 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
Marvin Häuser
cd0db29940 EmulatorPkg/Host: Consume MemoryAllocationLib 2025-04-07 12:13:58 +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
78c65024de MdePkg/Base.h: Introduce ALIGN_VALUE_SUBTRAHEND 2025-04-07 12:13:58 +03:00
Marvin Häuser
97a45f4633 EmulatorPkg/Host: Remove orphaned GetImageReadFunction() 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
473ab07302 BaseTools/GenFvInternalLib: Remove unused BaseOfCode parameter 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
Marvin Häuser
91526b5ef2 EmulatorPkg: Fix Thunk PPI/Protocol library types 2025-04-07 12:13:58 +03:00
Marvin Häuser
a52b6a8d8e EmulatorPkg/Host: Remove orphaned SecImageRead() 2025-04-07 12:13:58 +03:00
Marvin Häuser
607095f8f4 BaseTools/GenFv: Remove duplicated alignment macros 2025-04-07 12:13:58 +03:00
Marvin Häuser
8acad7450a EmulatorPkg/Host: Fix XCODE5 build 2025-04-07 12:13:58 +03:00
Marvin Häuser
48e9d4282c BaseTools/DevicePath: Consume MdePkg/UefiDevicePathLib
BaseTools has been duplicating and adapting code that is defined in
MdePkg and MdeModulePkg. This leads to desync issues where the same
symbols may be backed by different functions with slightly different
semantics and also fixes that apply only to BaseTools or only to MdePkg
and MdeModulePkg.

To address these issues, update BaseTools/Source/C to utilize the code
from MdePkg and MdeModulePkg.

Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
2025-04-07 12:13:58 +03:00
Marvin Häuser
2f61ab9f51 BaseTools/CommonLib: Consume MdePkg and MdeModulePkg
BaseTools has been duplicating and adapting code that is defined in
MdePkg and MdeModulePkg. This leads to desync issues where the same
symbols may be backed by different functions with slightly different
semantics and also fixes that apply only to BaseTools or only to MdePkg
and MdeModulePkg.

To address these issues, update BaseTools/Source/C to utilize the code
from MdePkg and MdeModulePkg.

Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
2025-04-07 12:13:58 +03:00
Marvin Häuser
72aa61ce91 UefiCpuPkg/MtrrLib: Add missing PcdLib.h include
MtrrLib does not include PcdLib.h despite explicitly using its
definitions. Add the include to fix compilation for modules that do not
utilize AutoGen.

Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
2025-04-07 12:13:58 +03:00
Marvin Häuser
c4ec3c100b MdePkg/Base.h: Add support for C++ alignof
In preparation of including Base.h in C++ BaseTools programs, support
the C++ 11 alignof operator. The C _Alignof operator is not universally
supported in C++ mode across compiler toolchains and thus the current
definition may lead to compilation errors with said programs.

Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
2025-04-07 12:13:58 +03:00
Marvin Häuser
70dd7f8309 MdePkg/Base.h: Only use C++ static_assert when supported
To support GoogleTest, 933b4c3 added support for C++ static_assert.
However, this is not a mandatory or universally supported C++ feature.
Guard its usage by the __cpp_static_assert support flag.

Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
2025-04-07 12:13:58 +03:00
Mikhail Krichanov
f1cd030972 FatPkg: Adds support for read-only mode
Implements gEfiFatPkgTokenSpaceGuid token space and adds token which
disables write operations. By default driver still supports read-write
mode

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2025-04-07 12:13:58 +03:00
Savva Mitrofanov
85d905ee56 UefiCpuPkg/CpuPageTableLib: Add intrinsic lib to fix MSVC build
For the bitfield access, MSVC apparently uses a right shift of the base type of the bitfield member. In our case, is is cased by IA32_PTE_4K and
IA32_PAGE_LEAF_ENTRY_BIG_PAGESIZE and other structures which uses uint64
bitfields and 32-bit x86 doesn't have a 64-bit integer shift (except using MMX or SSE2). With -Od (NOOPT) even for constant counts it puts
the data in EDX:EAX, the shift count in cl and calls __aullshr.

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2025-04-07 12:13:58 +03:00
Savva Mitrofanov
bf04e15d55 CryptoPkg/IntrinsicLib: Corrects __ashrdi3 and adds __lshrdi3
The ashrdi3 function should do arithmetic shift instead of logic using
sar instruction. Also adds __lshrdi3 implementation to correct build
using LLVM

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2025-04-07 12:13:58 +03:00
Mike Beaton
850cf3b628 GenSec: Support TianoCompress
Allows .fdf files to define a compressed .ffs section which can be read
by legacy EFI firmware (such as found on Apple Mac).
Use `COMPRESS TIANO`.
2025-04-07 12:13:58 +03:00
Mikhail Krichanov
a5fc3d111f CI: Constructed separate workflows for common, arm, x86 packages and CodeQL.
Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2025-04-07 12:13:58 +03:00
Mikhail Krichanov
f75d7e9fca MdePkg: Add PCD to remove X perm from image sections with WX perms
This feature is useful for images created by old Apple mtoc utility.

Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com>
2025-04-07 12:13:58 +03:00
Mikhail Krichanov
7b30f78411 Build: Renamed XIPFLAGS as SECPEIFLAGS, added comment in build_rule.template on its usage. 2025-04-07 12:13:58 +03:00
Mikhail Krichanov
4d4dcbe71f BaseTools: Removed GCC48/49 toolchains, refactored tools_def.template. 2025-04-07 12:13:58 +03:00
Savva Mitrofanov
9429976185 UnitTestFrameworkPkg/UnitTest: Fixes CLANGPDB build
Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2025-04-07 12:13:57 +03:00
Savva Mitrofanov
292e5ed762 UefiCpuPkg/UnitTest: Fixes CLANGDWARF build
Adds missing EFIAPI modifiers. Fixes calling conventions by defining as
ms_abi

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2025-04-07 12:13:57 +03:00
Savva Mitrofanov
66470c302a MdePkg/UnitTest: Fixes CLANGPDB build
Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2025-04-07 12:13:57 +03:00
Savva Mitrofanov
f8ef5b77e1 IntelFsp2WrapperPkg/FspWrapperMultiPhaseProcessLib: Fix CLANGPDB build
Silences "sometimes-uninitialized" warning by initializing the variable FspMultiPhaseApiOffset and corrects build using LLVM 15 toolchain

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2025-04-07 12:13:57 +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
d172035ede MdePkg: Defined DEBUG_RAISE() to facilitate fuzzing. 2025-04-07 12:13:57 +03:00
Mikhail Krichanov
84c6f4ae1a MdePkg: Added BaseOverflowLib library. 2025-04-07 12:13:57 +03:00
Mikhail Krichanov
5d894921a3 BaseTools: Replaced GenFw with ImageTool and MicroTool. 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
Savva Mitrofanov
4835188975 NetworkPkg/WifiConnectionManagerDxe: Removes unused variable
Removes unused variable in WifiMgrRefreshNetworkList routine to correct
build

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
Savva Mitrofanov
7c5ce259d9 .gitignore: Add compile_flags.txt
Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2025-04-07 12:02:07 +03:00