31534 Commits

Author SHA1 Message Date
Savva Mitrofanov
517e906518 CI: Remove Dependabot configuration 2023-07-07 10:51:30 +03:00
Pedro Falcato
609600b7ee Ext4Pkg: Skip zero-sized extents
Zero-sized extents should not be cached nor considered valid, as they
have no meaning. As such, reject them outright when caching extents.
This makes it so callers do not need to check for ee_len = 0 before
using the result, which, if not done, can result in possible infinite
loops.

Cc: Marvin Häuser <mhaeuser@posteo.de>
Fixes: d9ceedca6c8f ("Ext4Pkg: Add Ext4Dxe driver.")
Reported-by: Savva Mitrofanov <savvamtr@gmail.com>
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
2023-07-07 10:51:30 +03:00
Savva Mitrofanov
b84aa16df8 Ext4Pkg: Fix GdtCsum calculation for block group descriptor
Doesn't take into account the empty checksum field and passes the correct initial value of 0xFFFF into the CRC16-ANSI function

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2023-07-07 10:51:30 +03:00
Savva Mitrofanov
71cbd3cb57 MdePkg/BaseLib: Correct CRC-16-ANSI implementation
The ANSI implementation assumes that initial value should be 0xFFFF and
the result shouldn't be inverted

Fixes: 92288f4 ("MdePkg/BaseLib: Add CRC16-ANSI and CRC32c implementations")
Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2023-07-07 10:51:30 +03:00
Mikhail Krichanov
43134dc60f CI: Added tests for NOLTO builds. 2023-07-07 10:51:30 +03:00
Mikhail Krichanov
0303f6c239 BaseTools/Conf: Added EDK2_GCC_NOLTO build option. 2023-07-07 10:51:30 +03:00
Mikhail Krichanov
2f0285fa75 Build: Replaced GCC5 toolchain with GCC. 2023-07-07 10:51:02 +03:00
Mikhail Krichanov
de7ca36a15 Fixed compilation of all packages tracked by CI after rebasing upon edk2-stable202305. 2023-07-07 09:47:25 +03:00
Mikhail Krichanov
810bae60d1 Revert "MdeModulePkg: Enable forward edge CFI in mem attributes table"
This reverts commit e4ef609319236a018c60b84f68d9d923c4ba383e.
2023-07-07 09:46:08 +03:00
Mikhail Krichanov
a3d73d44ee 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>
2023-07-07 09:46:08 +03:00
Savva Mitrofanov
edf7f64f14 Build: Upgrade OpenCorePkg
Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2023-07-07 09:46:08 +03:00
Mikhail Krichanov
42c5cd67d2 OvmfPkg, BaseTools: Fixed Amaranth compilation for gcc-12.3.0. 2023-07-07 09:46:08 +03:00
Mikhail Krichanov
6190e6380f BaseTools: Introduce new HII section design 2023-07-07 09:46:08 +03:00
Marvin Häuser
b74b98d4c3 BaseTools/C: Consume UefiImageLib and ImageToolEmit 2023-07-07 09:46:08 +03:00
Marvin Häuser
1957edbf01 BaseTools/GenFv: Remove .text and .data from FV map 2023-07-07 09:46:08 +03:00
Marvin Häuser
212716a1c4 Remove hacks related to former lack of XCODE5 .hii support 2023-07-07 09:46:08 +03:00
Mikhail Krichanov
86283f1f8b Added .md file summarizing current states of packages. 2023-07-07 09:46:08 +03:00
Marvin Häuser
e80ae38879 BaseTools/build_rule: Drop deprecated ASM16 definition 2023-07-07 09:44:53 +03:00
Mikhail Krichanov
49eba86f69 Drop support for the TE format 2023-07-07 09:44:53 +03:00
Marvin Häuser
b6eac1a574 ArmPkg/ArmMmuLib: ASSERT ArmReplaceLiveTranslationEntry alignment 2023-07-07 09:44:53 +03:00
Marvin Häuser
9c43408450 MdeModulePkg/ExtendedFirmwarePerformance: Fix FPDT struct alignment 2023-07-07 09:44:53 +03:00
Marvin Häuser
b3150e51ab UefiPayloadPkg/UefiPayloadEntry: Return image destination size as UINT32 2023-07-07 09:44:53 +03:00
Savva Mitrofanov
cd4dd49a12 ArmVirtPkg/ArmVirtQemu: Disable PcdPrePiProduceMemoryTypeInformationHob for ARM
The PcdPrePiProduceMemoryTypeInformationHob on ARM breaks Linux efistub
boot. The efistub for arm32 uncompresses Linux kernel into memory ranges
which occupied by DXE-phase drivers which leads to
'permission denied'-error during page write. So as a temporary solution
we use PcdPrePiProduceMemoryTypeInformationHob only for AARCH64

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2023-07-07 09:44:53 +03:00
Mikhail Krichanov
789888e652 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>
2023-07-07 09:44:53 +03:00
Mikhail Krichanov
2c38c37510 UefiImageLib: Ensure consistently passing the full buffer size 2023-07-07 09:44:53 +03:00
Mikhail Krichanov
96ec1c3f4b BaseTools/CommonLib: Consume MemoryAllocationLib 2023-07-07 09:44:53 +03:00
Marvin Häuser
bff9ccd041 EmbeddedPkg/PrePiLib: Deduplicate MemoryAllocationLib declarations 2023-07-07 09:44:52 +03:00
Marvin Häuser
43fff71ccd EmbeddedPkg/NonCoherentDmaLib: Utilize AllocateAlignedPagesEx 2023-07-07 09:44:52 +03:00
Marvin Häuser
4b17f3031c MdePkg/UefiImageLib: Require callers to allocate aligned memory 2023-07-07 09:44:52 +03:00
Mikhail Krichanov
000ec64cbb MdePkg/MemoryAllocationLib: Add Allocate(Aligned)CodePages 2023-07-07 09:41:57 +03:00
Marvin Häuser
d8d1594eab EmulatorPkg/Host: Consume MemoryAllocationLib 2023-07-07 09:40:00 +03:00
Mikhail Krichanov
7887a8a2e7 MdePkg: Introduce CommonMemoryAllocationLib 2023-07-07 09:39:09 +03:00
Marvin Häuser
574dc7aa64 MdeModulePkg: Manage MemoryProfileLib separately 2023-07-07 09:38:00 +03:00
Marvin Häuser
8cd1fcbfe4 MdePkg/Base.h: Introduce ALIGN_VALUE_SUBTRAHEND 2023-07-07 09:38:00 +03:00
Marvin Häuser
c2a1aba688 EmulatorPkg/Host: Remove orphaned GetImageReadFunction() 2023-07-07 09:38:00 +03:00
Marvin Häuser
9449729dba MdeModulePkg/CorePei: Remove unused ShadowedImageRead member 2023-07-07 09:38:00 +03:00
Marvin Häuser
adf1673ece BaseTools/GenFvInternalLib: Remove unused BaseOfCode parameter 2023-07-07 09:38:00 +03:00
Marvin Häuser
64a6723cdc EmulatorPkg: Fix some image loader related issues 2023-07-07 09:38:00 +03:00
Marvin Häuser
b44e3da5ea EmulatorPkg: Fix Thunk PPI/Protocol library types 2023-07-07 09:38:00 +03:00
Marvin Häuser
405799494f EmulatorPkg/Host: Remove orphaned SecImageRead() 2023-07-07 09:38:00 +03:00
Marvin Häuser
ee9d30f774 BaseTools/GenFv: Remove duplicated alignment macros 2023-07-07 09:38:00 +03:00
Marvin Häuser
d7eb301e17 MdeModulePkg/PiSmmCore: Fix fixed address loading 2023-07-07 09:38:00 +03:00
Marvin Häuser
3a5ff7daee EmulatorPkg/Host: Fix XCODE5 build 2023-07-07 09:38:00 +03:00
Marvin Häuser
7a3d964d6b 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>
2023-07-07 09:38:00 +03:00
Marvin Häuser
6dcbb98d37 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>
2023-07-07 09:37:59 +03:00
Marvin Häuser
d82181f8c6 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>
2023-07-07 09:37:59 +03:00
Marvin Häuser
2fbf070521 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>
2023-07-07 09:37:59 +03:00
Marvin Häuser
635c09d6cb 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>
2023-07-07 09:37:59 +03:00
Mikhail Krichanov
671ee277b0 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>
2023-07-07 09:37:59 +03:00
Savva Mitrofanov
2849e25902 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>
2023-07-07 09:37:59 +03:00