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>
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>
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>
Silences "sometimes-uninitialized" warning by initializing the variable FspMultiPhaseApiOffset and corrects build using LLVM 15 toolchain
Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
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>
This change should correct compatibility with MSVC if the compiler flags undefines _MSC_VER, for example, like OpensslLib
Signed-off-by: Savva Mitrofanov
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>
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>
Removes unused Index local variable in RetrieveRelocatedCapsule to
suppress compiler warning in LLVM 15
Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
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>
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>
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>
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>
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>
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>