30880 Commits

Author SHA1 Message Date
Marvin Häuser
0bfa467344 ImageTool: Use realloc() for IR segment enlarging 2023-04-10 22:39:42 +02:00
Marvin Häuser
2f91fddf99 Drop premature UE support 2023-04-10 22:21:15 +02:00
Marvin Häuser
cd0e8aa6ad MdeModulePkg/ExtendedFirmwarePerformance: Fix FPDT struct alignment 2023-04-10 17:39:25 +02:00
Marvin Häuser
7b022c46d0 MdePkg/BasePeCoffLib2: Only validate ExeHdrOffset when non-zero 2023-04-10 10:57:28 +02:00
Marvin Häuser
42ef8c795c UefiPayloadPkg/UefiPayloadEntry: Return image destination size as UINT32 2023-04-10 10:57:27 +02:00
Mikhail Krichanov
d58d5c1bc3 ImageTool: Extended debug printings. 2023-04-10 10:31:53 +02:00
Mikhail Krichanov
7abc3faeec ImageTool: Made compilation of EFI_IMAGE_MACHINE selection conditional. 2023-04-10 10:31:53 +02:00
Marvin Häuser
373bb081ee ImageTool: Fix ARM image generation 2023-04-10 10:31:53 +02:00
Marvin Häuser
7b210acbc6 ArmVirtPkg: Use max-page-size 2023-04-10 10:31:53 +02:00
Mikhail Krichanov
f0ca8ef0cb ArmPkg/RvdUefiImageExtraActionLib: Fix build 2023-04-10 10:31:53 +02:00
Mikhail Krichanov
60e0471175 MdePkg/BasePeCoffLib2: Fix ARM Thumb apply relocation routine
Thumb instructions are either 16-bit or 32-bit, and are aligned on
a two-byte boundary

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2023-04-10 10:31:53 +02:00
Marvin Häuser
a07a2ce546 MdeModulePkg/DxeCore: Fix MAT generation 2023-04-10 10:31:53 +02:00
Marvin Häuser
53f2af3ad5 ArmPkg/ArmMmuLib: Fix ArmReplaceLiveTranslationEntry alignment 2023-04-10 10:31:48 +02:00
Mikhail Krichanov
d477fd49b1 MdeModulePkg/DxeCore: Use correct type for alignment mask
The page allocator code in CoreFindFreePagesI() uses a mask derived from
    its UINTN Alignment argument to align the descriptor end address of a
    MEMORY_MAP entry to the requested alignment, in order to check whether
    the descriptor covers enough sufficiently aligned area to satisfy the
    request.

    However, on 32-bit architectures, 'Alignment' is a 32-bit type, whereas
    DescEnd is a 64-bit type, and so the resulting operation performed on
    the end address comes down to masking with 0xfffff000 instead of the
    intended 0xffffffff_fffff000. Given the -1 at the end of the expression,
    the resulting address is 0xffffffff_fffffffff for any descriptor that
    ends on a 4G aligned boundary, and this is certainly not what was
    intended.

    So cast Alignment to UINT64 to ensure that the mask has the right size.

    Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
    Reported-by: Nathan Chancellor <nathan@kernel.org>
    Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
2023-04-09 17:33:52 +02:00
Savva Mitrofanov
5a084dafde
.github/workflow: Split build workflow into multiple and add ARM targets
Adds new workflow for building and testing ARM targets. Also, it splits
previous build workflow into multiple parts: common packages,
x86 firmwares, ARM firmwares. In addition, it adds Windows PE tests.

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2023-04-05 14:48:09 +06:00
Savva Mitrofanov
b4167ccdd4
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-04-05 14:48:08 +06:00
Savva Mitrofanov
6c9cb4f420
EmbeddedPkg/PrePiMemoryAllocationLib: Correct missing function argument
Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2023-04-05 12:56:49 +06:00
Savva Mitrofanov
b877d75f50
EmbeddedPkg/PrePiLib: Correct function prototype
Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2023-04-02 21:33:58 +06:00
vit9696
950de0d6fe MdePkg: Fix uninitialised access in SafeString 2023-04-02 15:50:10 +03:00
Marvin Häuser
b137c5414d MdePkg/BasePeCoffLib2: Read debug directory from the image memory 2023-04-02 00:04:47 +02:00
Marvin Häuser
94af9da84b MdePkg/BasePeCoffLib2: Distinguish between unsupported and corrupted 2023-04-02 00:04:47 +02:00
Marvin Häuser
35731d9829 UefiImageLib: Ensure consistently passing the full buffer size 2023-04-02 00:04:47 +02:00
Marvin Häuser
e15d23ca81 MdeModulePkg/RegularExpressionDxe: Fix XCODE5 build 2023-04-02 00:04:46 +02:00
Marvin Häuser
23e0a765a5 BaseTools/tools_def: Declare -Wno-unknown-warning-option for XCODE5 2023-04-02 00:04:46 +02:00
Marvin Häuser
b1851ef38d BaseTools/ImageTool: Fix PeScan error handling 2023-04-02 00:04:46 +02:00
Marvin Häuser
d5eecc2e2d BaseTools/ImageTool: Use AllocateAlignedCodePages() for images 2023-04-02 00:04:28 +02:00
Marvin Häuser
240e920841 BaseTools/ImageTool: Consume CommonMemoryAllocationLib 2023-04-01 23:59:10 +02:00
Marvin Häuser
f3fedad22d BaseTools/CommonLib: Guarantee 8-byte alignment for AllocatePool() 2023-04-01 19:17:12 +02:00
Marvin Häuser
c382e9c571 BaseTools/CommonLib: Consume MemoryAllocationLib 2023-03-30 17:15:19 +02:00
Marvin Häuser
7506a40c12 EmbeddedPkg/PrePiLib: Deduplicate MemoryAllocationLib declarations 2023-03-30 17:15:19 +02:00
Marvin Häuser
db85482684 EmbeddedPkg/NonCoherentDmaLib: Utilize AllocateAlignedPagesEx 2023-03-30 17:15:19 +02:00
Marvin Häuser
eea8ba4030 MdePkg/UefiImageLib: Require callers to allocate aligned memory 2023-03-30 17:15:14 +02:00
Marvin Häuser
227871ad94 MdePkg/MemoryAllocationLib: Add Allocate(Aligned)CodePages 2023-03-30 16:18:09 +02:00
Marvin Häuser
31979d701f EmulatorPkg/Host: Consume MemoryAllocationLib 2023-03-30 16:18:09 +02:00
Marvin Häuser
b5b858f990 MdePkg: Introduce CommonMemoryAllocationLib 2023-03-30 16:18:09 +02:00
Marvin Häuser
cc4427d20c MdeModulePkg: Manage MemoryProfileLib separately 2023-03-30 16:18:09 +02:00
Marvin Häuser
0d53d302de MdePkg/Base.h: Introduce ALIGN_VALUE_SUBTRAHEND 2023-03-30 16:18:09 +02:00
Marvin Häuser
2a12deda9b EmulatorPkg/Host: Remove orphaned GetImageReadFunction() 2023-03-30 00:18:29 +02:00
Marvin Häuser
dff189ca49 MdeModulePkg/DxeCore: Remove orphaned CoreReadImageFile() 2023-03-30 00:18:28 +02:00
Marvin Häuser
059e6ecef9 MdeModulePkg/CorePei: Remove unused ShadowedImageRead member 2023-03-30 00:18:28 +02:00
Marvin Häuser
b74a1336a5 MdePkg/BasePeCoffLib2: Move ExtraAction to UefiImageLib 2023-03-30 00:18:28 +02:00
Marvin Häuser
0cd5908c7f BaseTools/ImageTool: Rename PreferredAddress to BaseAddress 2023-03-30 00:18:28 +02:00
Marvin Häuser
6ececb9b0c BaseTools/GenFvInternalLib: Remove unused BaseOfCode parameter 2023-03-29 21:37:14 +02:00
Marvin Häuser
2428dcb8c9 MdeModulePkg/DxeCore: Fix RelocationData type 2023-03-29 21:37:14 +02:00
Marvin Häuser
4e4c413daa UefiCpuPkg/CpuExceptionHandlerLib: Fix ImageContext type 2023-03-29 21:36:28 +02:00
Marvin Häuser
0725fe2554 MdePkg/BaseOverflowLib: Add missing Base.h includes 2023-03-29 21:36:28 +02:00
Marvin Häuser
46a55a1dc4 MdePkg/BasePeCoffLib2: Fix call to RelocateExtraAction 2023-03-29 19:57:39 +02:00
Marvin Häuser
f5fe05bccc EmulatorPkg: Fix some image loader related issues 2023-03-29 19:57:33 +02:00
Marvin Häuser
dc58fd4c5f EmulatorPkg: Fix Thunk PPI/Protocol library types 2023-03-28 23:52:27 +02:00
Marvin Häuser
7c28bde9dc EmulatorPkg/Host: Remove orphaned SecImageRead() 2023-03-28 23:52:27 +02:00