30748 Commits

Author SHA1 Message Date
Mikhail Krichanov
ec2ea092ed BaseTools: Moved .rodata into a separate section, enforced appropriate .rodata names for different toolchains. 2023-02-10 14:00:28 +03:00
Mikhail Krichanov
464cf15edb BaseTools: United GCC and CLANG linker scripts, set default 4K alignment for all toolchains. 2023-02-10 14:00:28 +03:00
Mikhail Krichanov
46de80ddd2 OvmfPkg: Removed useless DEFINE. 2023-02-10 14:00:28 +03:00
Savva Mitrofanov
d8e2a00f61
UefiPayloadPkg: Increase FD_SIZE for NOOPT target
Fixes recent NOOPT builds using MSVC toolchain

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>4
2023-02-08 18:28:08 +06:00
Savva Mitrofanov
087ef41f7e
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>
2023-02-08 18:27:40 +06:00
Savva Mitrofanov
ff658eb1a2
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>
2023-02-06 16:20:09 +06:00
Savva Mitrofanov
be5e5b1f99
BaseTools: 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>
2023-02-06 16:20:08 +06:00
Savva Mitrofanov
d004754540
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>
2023-02-06 16:20:07 +06:00
Savva Mitrofanov
13a2066023
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>
2023-02-03 14:25:18 +06:00
Savva Mitrofanov
97cef440fc
UefiPayloadPkg: Increase FD_SIZE for NOOPT target
Fixes recent NOOPT builds using MSVC toolchain

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2023-02-03 12:40:07 +06:00
Savva Mitrofanov
91789af684
BaseTools/Conf: Fixes CLANGPDB and CLANGDWARF build
Corrects llvm-rc arguments

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2023-02-03 12:40:06 +06:00
Savva Mitrofanov
57b8f6746f
Ext4Pkg: Fixes build on MSVC
Using UINT64 index while accessing array item makes MSVC compiler to
include `__allmul` function in NOOPT which is not referenced in IA32.
So we null-terminates string using ReadSize, which should be equal to
SymlinkSizeTmp after correct reading. Also adds missing MultU64x32
in Ext4Read.

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2023-02-03 12:40:05 +06:00
Mike Beaton
c87d7fa06b 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`.
2023-01-30 23:35:04 +03:00
Mikhail Krichanov
6ba140a6b5 BaseTools: Fixed VS2019 build. 2023-01-18 17:14:34 +03:00
Savva Mitrofanov
86005c4c0c
.github/workflows: Don't install Python twice in CodeQL
Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2023-01-18 18:12:01 +06:00
Savva Mitrofanov
0764246038
MdePkg/Include: Corrects ALIGNOF macro in Base.h for MSVC
This change should correct compatibility with MSVC if the compiler flags undefines _MSC_VER, for example, like OpensslLib

Signed-off-by: Savva Mitrofanov
2023-01-18 16:19:38 +06:00
Savva Mitrofanov
e6fee961af
UefiCpuPkg/SecCore: Corrects build by adding missing SecurePe libraries
Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2023-01-18 16:19:37 +06:00
Savva Mitrofanov
7f5dbfa5f9
MdeModulePkg/DebugSupportDxe: Corrects MSVC build
Fixes 6c974ab21e212c1867c871f989f6f1df5786e99e by supressing type cast
warning for MSVC

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2023-01-18 16:19:36 +06:00
Savva Mitrofanov
763413cc8c
.github/workflows: Use efibuild.sh instead of stuart pytools for CodeQL
Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2023-01-18 16:19:35 +06:00
Savva Mitrofanov
58f816c0db
.github/workflows: Adds nested udk package warning workaround for CodeQL 2023-01-17 22:12:41 +06:00
Savva Mitrofanov
60f85a3683
.pytool: Drop OpenCorePkg from supported pkg list for stuart
Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2023-01-17 21:42:27 +06:00
Savva Mitrofanov
648c4f33cc
OvmfPkg/OvmfPkgIa32X64: Increase PEIFV size
The NOOPT build target produces greater overall size of PEI modules than available inside firmware volume, which leads to GenFv invalid size
error

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2023-01-17 20:59:29 +06:00
Savva Mitrofanov
40b67dcb57
.pytool: Add OpenCorePkg package into stuart_build CISetting.py
This commit corrects CodeQL workflow by adding missing submodule
OpenCorePkg for BaseTools

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2023-01-17 20:59:21 +06:00
Savva Mitrofanov
f335cf23f1
Revert "Ext4Pkg: Add comparison between Position and FileSize in Ext4SetPosition"
This reverts commit f21c8083753d667815d2719a9e7417dd4f1277c5.
We don't need to perform this check in SetPosition because by spec this
check done in read operation

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2023-01-13 12:57:46 +03:00
vit9696
8b6e67bcd9 Ext4Pkg: Filter out file names containing \0 as invalid
This patch improves checks added in 74135485.

Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com>
2023-01-12 13:31:47 +03:00
vit9696
6349385d72 OpenCorePkg: Sync with upstream for the new PCD 2023-01-04 21:57:56 +03:00
Vitaly Cheptsov
39d0ce7013 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>
2023-01-04 20:03:26 +03:00
Mikhail Krichanov
1ddbcf7ccf Build: Updated OpenCore submodule to current master branch. 2022-12-29 11:03:38 +03:00
Savva Mitrofanov
122531754a
UefiPayloadPkg/UefiPayloadEntry: Fixes universal payload build
Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2022-12-29 00:19:53 +06:00
Mikhail Krichanov
cf92e9f7d7 BaseTools: Replaced GenFw with ImageTool and MicroTool. 2022-12-28 17:21:20 +03:00
Mikhail Krichanov
ef68b89fbc SecurePE: Replaced old PE loader with Secure one. 2022-12-28 17:08:53 +03:00
Savva Mitrofanov
f625249b1e
MdeModulePkg/CapsuleApp: Add missing EFIAPI modifier in CapsuleDump
Fixes calling conventions by defining CompareFileNameInAlphabet with
ms_abi

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2022-12-28 13:12:09 +06:00
Savva Mitrofanov
6c974ab21e
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>
2022-12-28 13:12:03 +06:00
Savva Mitrofanov
d9a6e6736c
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>
2022-12-28 13:11:52 +06:00
Savva Mitrofanov
a0e8bd78ac
NetworkPkg/WifiConnectionManagerDxe: Removes unused variable
Removes unused variable in WifiMgrRefreshNetworkList routine to correct
build

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2022-12-26 17:44:35 +06:00
Savva Mitrofanov
a6d2c4b981
CryptoPkg/BaseCryptLib: Removes unused variable in CryptX509
Removes unused local variable in X509ConstructCertificateStackV

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2022-12-26 17:44:18 +06:00
Savva Mitrofanov
25ce5524c9
MdeModulePkg/RegularExpressionDxe: Corrects onigurama build with LLVM 15
Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2022-12-26 16:37:58 +06:00
Savva Mitrofanov
2b7d183551
MdeModulePkg/VarCheckHiiLib: Remove unused variable FfsIndex
Corrects compiler warning due to unused variable in VarCheckHiiGenFromFv

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2022-12-26 16:34:27 +06:00
Marvin Häuser
acac38949d BaseTools/tools_def: Disable PIE generation for IA32 CLANGDWARF
Commit c25d390 disabled PIE generation for GCC49 and GCC5 as the GCC toolchains
at the time started enabling it by default. LLVM 15 has now done the same thing
for all Linux targets [1]. This causes the emission of a GOT with relocations
that GenFw does not currently support.

As such, disable PIC and PIE for the CLANGDWARF toolchain for IA32 targets, as
already done for GCC49 and GCC5, to support LLVM 15.

[1] ca68038d12

Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
2022-12-24 17:14:25 +01:00
Savva Mitrofanov
849db11550
CryptoPkg/OpensslLib: Fix build for XCODE5 compiler on macOS
REF: https://edk2.groups.io/g/devel/message/88179

Add missing corrections for 504558b4ef29d6637df05a31a07ec67711e71544.
A build of CryptoPkg with XCODE5 on macOS is now trying to include
Availability.h, which isn't found. Seems the problem is in condition
logic inside openssl/include/crypto/rand.h

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2022-12-23 22:53:27 +06:00
Savva Mitrofanov
a18c196866
MdeModulePkg/SmbiosMeasurementDxe: Removes unused local variable
Removes unused local variable Size in GetSmbiosStringById

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2022-12-23 22:53:26 +06:00
Savva Mitrofanov
bc19befe04
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>
2022-12-23 22:53:25 +06:00
Savva Mitrofanov
19528eb6ec
.gitignore: Add compile_flags.txt
Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2022-12-23 22:53:24 +06:00
Marvin Häuser
6e4e45eb38 MdePkg/PerformanceLib: Fix "unused-but-set-variable" warning
The current definitions of PERF_CODE_BEGIN() and PERF_CODE_END() use the local
variable __PerformanceCodeLocal as an attempt to track parity. If
PERF_CODE_END() is used without a preceding PERF_CODE_BEGIN(),
__PerformanceCodeLocal will not have been declared and a compilation error will
be issued. The mutations of the variable are not used to track nesting or such.
As the value of this variable is never actually used, recent Clang versions
issue a "unused-but-set-variable" warning for it.

To solve this, re-define __PerformanceCodeLocal as a BOOLEAN that is always
FALSE and use it in a do-while loop condition as done explicitly in many places.
Like the previous solution, PERF_CODE_END() cannot be used without
PERF_CODE_BEGIN(), as __PerformanceCodeLocal will be not have been defined.

Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
2022-12-23 15:21:02 +01:00
Marvin Häuser
4f19426aec MdePkg/DebugLib: Fix "unused-but-set-variable" warning
The current definitions of DEBUG_CODE_BEGIN() and DEBUG_CODE_END() use the local
variable __DebugCodeLocal as an attempt to track parity. If DEBUG_CODE_END() is
used without a preceding DEBUG_CODE_BEGIN(), __DebugCodeLocal will not have been
declared and a compilation error will be issued. The mutations of the variable
are not used to track nesting or such. As the value of this variable is never
actually used, recent Clang versions issue a "unused-but-set-variable" warning
for it.

To solve this, re-define __DebugCodeLocal as a BOOLEAN that is always FALSE and
use it in a do-while loop condition as done explicitly in many places. Like the
previous solution, DEBUG_CODE_END() cannot be used without DEBUG_CODE_BEGIN(),
as __DebugCodeLocal will be not have been defined.

Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
2022-12-23 15:20:20 +01:00
Mikhail Krichanov
76b839a71f Build: Previous fix update. 2022-12-21 12:45:25 +03:00
Mikhail Krichanov
aea03cb7b9 Build: Fixed missing HII for X64, IA32 CLANGDWARF DEBUG, NOOPT. 2022-12-21 12:35:26 +03:00
Mikhail Krichanov
075bf6c35e
MdePkg/X64/ProcessorBind.h: Fixes CLANGDWARF X64 compilation
Corrects typedef redefinition, in particular for openssl e_os2.h

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2022-12-14 16:51:08 +06:00
Savva Mitrofanov
57f8489c5a
OvmfPkg/PlatformInitLib: Corrects initializers to fix NOOPT build
Fixes OvmfPkg build using XCODE5, CLANGPDB and CLANGDWARF toolchains
for NOOPT target

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2022-12-14 16:29:41 +06:00
Savva Mitrofanov
dc249ba42d
UefiCpuPkg/CpuExceptionHandlerLib: Increase mBuffer size
Add missing GDT alignment into mBuffer to prevent possible memory
corruption on ALIGN_POINTER operation on NewGdtTable
in ArchExceptionHandler

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2022-12-09 16:46:50 +06:00