603 Commits

Author SHA1 Message Date
Mikhail Krichanov
229824f009 ArmVirtPkg/ArmPlatformLibQemu: Disabled EL2&0 translation regime
to fix Windows 10 boot.
2025-04-07 13:55:29 +03:00
Mike Beaton
9cdba17a1a IntrinsicLib: Move from CryptoPkg to MdePkg 2025-04-07 12:32:50 +03:00
Mikhail Krichanov
992385e15e SecurePE: Defined new PcdImageProtectionPolicy. 2025-04-07 12:30:28 +03:00
Mikhail Krichanov
48b806f46f UE: Support UE generation and consumption. 2025-04-07 12:24:28 +03:00
Mikhail Krichanov
e46d356fc9 MdePkg/UefiImageLib: Support multi-format and multi-source architecture
Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
2025-04-07 12:24:27 +03:00
Mikhail Krichanov
63b9e567e5 Build: Replaced GCC5 toolchain with GCC. 2025-04-07 12:24:27 +03:00
Mikhail Krichanov
20dd836214 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>
2025-04-07 12:23:28 +03:00
Mikhail Krichanov
bc87d7b430 Drop support for the TE format 2025-04-07 12:18:22 +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
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
Oliver Smith-Denny
1f1182c396 ArmVirtPkg: ArmVirtQemu: Add Custom Stack Cookies
In order to provide an example and test out dynamic stack
cookies in edk2, dynamic stack cookies are added to ArmVirtPkg
platforms using ArmVirt.dsc.inc, per maintainer request.

This does require moving the ArmVirt.dsc.inc to be included
before MdeLibs.dsc.inc as the BaseTools does not expand all
the Defines sections before processing.

Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
2025-02-07 02:23:11 +00:00
Oliver Smith-Denny
861b91d975 ArmVirtPkg: Add RNDR Support to QEMU
In order to use dynamic stack cookies in ArmVirtQemu, we need
RNDR support. This is added by using the neoverse-n2 cpu.

Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
2025-02-07 02:23:11 +00:00
Oliver Smith-Denny
efbf5ed08c MdePkg: Move StackCheckLibStaticInit to StackCheckLib
This commit oves StackCheckLib from a NULL lib to an instance of
StackCheckLib. This requires every entry point to add a library
dependency on StackCheckLib. It also requires every SEC module
to have a dependency on StackCheckLib because there is no
standard SEC entry point.

It allows for greater flexibility for a platform to apply stack
cookies and simplifies DSC logic.

Continuous-integration-options: PatchCheck.ignore-multi-package

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-02-07 02:23:11 +00:00
Gerd Hoffmann
fbe19844e0 Revert "ArmVirtPkg/ArmVirtQemu: Reduce MMIO region mapped by default"
This reverts commit 43233ff9f88e5c9b88228810f7725bade4cdfecf.

The TPM code (and possibly others too) must be fixed to also
map their MMIO ranges before we can do this cleanup.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2025-01-31 12:22:21 +00:00
Gerd Hoffmann
4dd8b9e0f7 ArmVirtPkg: turn off debug logging for VirtioSerialDxe
When running the verbose builds on arm for development and testing
it is quite convenient to use virtio serial to interact with the
system because console and logging are separated then.  Except that
the virtio serial driver spams the debug log in that case.  Set the
debug level for the driver to zero to avoid that.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2025-01-31 10:38:57 +00:00
Ard Biesheuvel
87f14322da ArmVirtPkg: Drop reference to ArmDisassemblerLib
ArmDisassemblerLib is going away ...

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-01-30 16:01:56 +00:00
Ard Biesheuvel
43233ff9f8 ArmVirtPkg/ArmVirtQemu: Reduce MMIO region mapped by default
Currently, the ArmVirtQemu startup code maps a 128 MiB of MMIO space, as
it knows that the UART, GIC and RTC live there. Now that the GIC driver
maps its MMIO registers itself, there is no need for this region to
cover its MMIO space. And there are other regions here that don't need
to be mapped by default: the only ones that need to be mapped are the
UARTS, the RTC, the fw_cfg MMIO interface and the virtio-mmio regions,
all of which live in a 32 MiB window starting at address 0x900_0000.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-01-30 13:07:05 +00:00
Gerd Hoffmann
2f5db44fdd ArmVirtPkg/ArmVirtQemu.dsc: use OvmfDisplayPcds.dsc.inc
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2025-01-20 11:43:58 +00:00
Ard Biesheuvel
81e2cd329e ArmPkg/ArmGic: Rename directory to ArmGicDxe
Now that ArmPkg/Drivers/ArmGic no longer carries a combination of
libraries and DXE drivers, rename the directory to the more idiomatic
ArmPkg/Drivers/ArmGicDxe

Continuous-integration-options: PatchCheck.ignore-multi-package

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-01-17 18:37:27 +00:00
Ard Biesheuvel
0bb40c79be ArmPkg: Retire ArmGicLib implementations
Retire all implementations of the ArmGicLib library class, which are no
longer used. For now, retain the library header and library class
declaration: the header file only contains pre-processor defines derived
from the GIC architecture spec, and so this code should probably move
into MdePkg at a later moment.

Continuous-integration-options: PatchCheck.ignore-multi-package

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-01-17 18:37:27 +00:00
Ard Biesheuvel
e663b79f74 ArmVirtPkg: Convert ArmVirtGicArchLib to NULL class library
Before retiring ArmGicArchLib entirely, convert the existing
implementation in ArmVirtPkg into a NULL class library and inject it
into ArmGicDxe on all ARM virtual platforms. This ensures that the PCDs
describing the GIC are intialized correctly before ArmGicDxe is
dispatched.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-01-17 18:37:27 +00:00
Mike Beaton
cb672a8eb1 ArmVirtPkg: Use OvmfPkg/Include/*/Shell*.inc
While fixing https://github.com/tianocore/edk2/pull/6092 (the
fact that some OvmfPkg and ArmVirtPkg platforms included residual
NetworkPkg components even when compiled with -D NETWORK_ENABLE=0),
it was noted that OvmfPkg/Include/*/Shell*.inc files which apply
the required fix logic are available and already used in some
OvmfPkg platforms.

A previous commit applied these files consistently within OvmfPkg.
This commit applies these files within ArmVirtPkg.

This has the side effect that some platforms now include one or
more of HttpDynamicCommand, VariablePolicyDynamicCommand and
LinuxInitrdDynamicShellCommand when they previously did not.
This fixes unintentional drift between platforms, and provides
additional shell commands which may be useful in some cases.

Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
2025-01-16 23:06:40 +00:00
Mike Beaton
7d958e55a4 ArmVirtPkg/CI: Copy shell to virtual drive
Place the EFI shell as EFI/BOOT/BOOT{ARCH}.EFI on the virtual drive.
This allows the "Run to shell" CI test case to work even in case the
shell is not included in the firmware image.

This is needed because a follow up patch will exclude the shell from
secure boot enabled firmware images.

The same update was previously applied to OvmfPkg by
6862b9d538d96363635677198899e1669e591259.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
2025-01-16 23:06:40 +00:00
Mike Beaton
e8de471660 ArmVirtPkg: Include no network components with -D NETWORK_ENABLE=0
This issue showed up when addressing
https://bugzilla.tianocore.org/show_bug.cgi?id=4829
in https://github.com/tianocore/edk2/pull/6087 .

Various OvmfPkg and ArmVirtPkg platforms include some residual NetworkPkg
components when compiled with -D NETWORK_ENABLE=0, even though they use
NetworkPkg includes intended to allow all NetworkPkg components to be
disabled on this flag.

For the OvmfPkg Intel platforms only, commit
d933ec115bdf9be1d8dfe6a818414a14973cc0d3 started
the change of not including these residual NetworkPkg
components, and commit
7f17a155640a2a9e1f7b0f3522628ee2c6f62624 completed it.

This commit rolls these changes out to the ArmVirtPkg platforms where
they make sense in the same way.

Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
2025-01-16 23:06:40 +00:00
Paweł Poławski
573057cb1d ArmVirtPkg: Enable virtio keyboard driver for ARM OVMF platform
Signed-off-by: Paweł Poławski <ppolawsk@redhat.com>
2024-12-29 19:19:59 +01:00
Alexander Gryanko
9e0c46efb0 ArmVirtPkg: PXE boot option build flag
The first step is to add an option to disable PXE loading. The patch is
divided into 3 parts. This part adds the NETWORK_PXE_BOOT_ENABLE flag
to the ArmVirtPkg module. At the current stage the flag is not functional.

Signed-off-by: Alexander Gryanko <xpahos@gmail.com>
2024-12-06 18:26:01 +00:00
Ard Biesheuvel
47e28a6d44 ArmVirtPkg/ArmPlatformLibQemu: Enable early ID map on EL2+VHE
When booting at EL2, enable VHE if available so that the early ID map
can be enabled as well. This gets rid of any memory accesses (reads or
writes) before the MMU and caches are enabled.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-12-05 10:50:48 +00:00
Yang Gang
4928851899 ArmVirtPkg: Report an error if NETWORK_TLS_ENABLE is TRUE on ARM
Signed-off-by: Yang Gang <yanggang@byosoft.com.cn>
2024-11-27 20:57:03 +00:00
Ard Biesheuvel
ae8ab7190c ArmVirtPkg/ArmVirtKvmTool: Use PSCI/SMCCC conduit from FDT
ArmVirtKvmTool might execute at EL2 when running under nested
virtualization, and in this case, it should not use HVC but SMC to
invoke PSCI and SMCCC services.

Like QEMU, kvmtool provides the PSCI conduit via a node in the FDT, and
as per the SMCCC, the PSCI conduit and the SMCCC conduit are guaranteed
to be the same. So switch to the ArmMonitorLib implementation that
selects the conduit based on this FDT node.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-11-26 23:53:16 +00:00
Ard Biesheuvel
f9f4164af9 ArmVirtPkg: Rename ArmVirtQemuMonitorLib to ArmVirtMonitorLib
The implementation of ArmMonitorLib that selects the conduit (SMC or
HVC) based on the PSCI FDT node is suitable for other VMMs as well, so
rename it more appropriately.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-11-26 23:53:16 +00:00
Ard Biesheuvel
91171b6b94 ArmVirtPkg/PrePi: Don't clear HCR_EL2 fields when setting TGE
HCR_EL2 may contain fields that should be preserved (such as E2H, which
may be RES1 for all intents and purposes other than reading back the
register). So preserve the existing value when setting the TGE bit.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-11-26 23:53:16 +00:00
Ard Biesheuvel
e54794bcc6 Remove all ArmSoftFloatLib library class resolutions
ArmSoftFloatLib is going away, so remove all residual references to it.

Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-11-26 22:00:36 +00:00
Oliver Smith-Denny
ef4f3aa3f7 MdePkg: MdeLibs.dsc.inc: Apply StackCheckLibNull to All Module Types
Now that the ResetVectors are USER_DEFINED modules, they will not
be linked against StackCheckLibNull, which were the only modules
causing issues. So, we can now remove the kludge we had before
and the requirement for every DSC to include StackCheckLibNull
for SEC modules and just apply StackCheckLibNull globally.

This also changes every DSC to drop the SEC definition of
StackCheckLibNull.

Continuous-integration-options: PatchCheck.ignore-multi-package

Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
2024-11-13 21:01:46 +00:00
Michael Kubacki
d1372720a8 ArmVirtPkg/MemoryInitPei: Remove Non-RT Types from Mem Type Info HOB
Removes the following types from the memory type information HOBs
produced in the MemoryInitPei PEIM:

- `EfiBootServicesCode`
- `EfiBootServicesData`
- `EfiLoaderCode`
- `EfiLoaderData`

Our platform has a memory type information validation routine that
currently expects those types to be excluded as they would not impact
the UEFI memory map since they are not runtime memory types.

This follows the guidance in the whitepaper "A Tour Beyond BIOS
Memory Map and Practices in UEFI BIOS".

https://github.com/tianocore-docs/Docs/raw/master/White_Papers/A_Tour_Beyond_BIOS_Memory_Map_And_Practices_in_UEFI_BIOS_V2.pdf

"NOTE: We recommend a platform only define the ReservedMemory,
ACPINvs, ACPIReclaim,  RuntimeCode, RuntimeData in Memory Type
Information table, because OSes only request  these regions to be
consistent. There is no need to add BootServicesCode,
BootServicesData, LoaderCode, LoaderData in memory type information
table, because these regions will not be reserved during S4 resume."

Since these memory types are not tracked in memory type information
any longer it also reduces the number of resets that may need to
occur to update memory type buckets that are not needed.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2024-11-11 16:45:29 +00:00
Aleksandr Goncharov
d8984e86c7 ArmVirtPkg: mark fixed network PCDs
Rename `NetworkPcds` to `NetworkFixedPcds` to avoid confusion with
dynamic PCDs.

Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Aleksandr Goncharov <chat@joursoir.net>
2024-11-11 13:38:51 +00:00
Aleksandr Goncharov
9cab9905af ArmVirtPkg: use NetworkDynamicPcds include file
Start using the include file in the ArmVirtPkg package to manage
dynamic network-related PCDs. This change removes the manual addition
of `PcdIPv4PXESupport` and `PcdIPv6PXESupport` from the DSC file,
relying instead on the centralized include file introduced in
NetworkPkg.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Aleksandr Goncharov <chat@joursoir.net>
2024-11-11 13:38:51 +00:00
Sudeep Holla
7327089f63 ArmVirtPkg: KvmTool: Fix clang linker error
Clang build for ArmVirtPkg/ArmVirtKvmTool.dsc fails with the below
warning:

  |  ld.lld: error: duplicate symbol: PciExpressRegisterForRuntimeAccess
  |  ld.lld: error: duplicate symbol: GetPciExpressBaseAddress
  |  ld.lld: error: duplicate symbol: PciExpressRead8
  |  ld.lld: error: duplicate symbol: PciExpressWrite8
  |  ld.lld: error: duplicate symbol: PciExpressOr8
  |  ld.lld: error: duplicate symbol: PciExpressAnd8
  |  ld.lld: error: duplicate symbol: PciExpressAndThenOr8
  |  ld.lld: error: duplicate symbol: PciExpressBitFieldRead8
  |  ld.lld: error: duplicate symbol: PciExpressBitFieldWrite8
  |  ld.lld: error: duplicate symbol: PciExpressBitFieldOr8
  |  ld.lld: error: duplicate symbol: PciExpressBitFieldAnd8
  |  ld.lld: error: duplicate symbol: PciExpressBitFieldAndThenOr8
  |  ld.lld: error: duplicate symbol: PciExpressRead16
  |  ld.lld: error: duplicate symbol: PciExpressWrite16
  |  ld.lld: error: duplicate symbol: PciExpressOr16
  |  ld.lld: error: duplicate symbol: PciExpressAnd16
  |  ld.lld: error: duplicate symbol: PciExpressAndThenOr16
  |  ld.lld: error: duplicate symbol: PciExpressBitFieldRead16
  |  ld.lld: error: duplicate symbol: PciExpressBitFieldWrite16
  |  ld.lld: error: duplicate symbol: PciExpressBitFieldOr16
  |  >>> defined in MdePkg/Library/BasePciExpressLib/BasePciExpressLib/OUTPUT/BasePciExpressLib.lib(PciExpressLib.obj)
  |  >>> defined in OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib/OUTPUT/BaseCachingPciExpressLib.lib(PciExpressLib.obj)
  |
  |  ld.lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
  |  clang: error: linker command failed with exit code 1 (use -v to see invocation)

OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf is
getting linked as NULL library in these pacakges:
1. UefiCpuPkg/CpuMmio2Dxe/CpuMmio2Dxe.inf
2. MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
3. MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
which results in duplicate symbols shown in the warning above as
MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf is not properly replaced
by OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf
as PciExpressLib library.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-10-30 17:37:55 +00:00
Leif Lindholm
cac73c45c4 ArmVirtPkg/ArmVirtQemu: avoid unnecessary use of $(ARCH) conditional
ARCH as set by "build" command is not really useful for
conditionals, so move AArch64-specific Pcd to
[PcdsFixedAtBuild.AARCH64].

Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
2024-10-02 07:45:03 +00:00
Leif Lindholm
dab548a51b ArmVirtPkg: add QemuVirtMemInfoLib missing dependency/includes
QemuVirtMemInfoLib makes use of BaseLib but never declared the
dependency or included the header. The code still built by
luck and by including the EmbeddedPkg FdtLib. Which is going
away, so add the missing stanzas in preparation.

Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
2024-09-27 12:42:07 +00:00
Heinrich Schuchardt
2936b7d162 ArmVirtPkg: Correct PcdDxeNxMemoryProtectionPolicy comment
Since commit 2997ae387397 ("ArmVirtPkg: make EFI_LOADER_DATA
non-executable") the comment for PcdDxeNxMemoryProtectionPolicy is
incorrect.

* Remove the incorrect part of the description.
* Describe overriding NX protection by passing a pcd parameter on the
  build command line.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-09-26 13:46:45 +00:00
Oliver Smith-Denny
02e6c73a99 ArmVirtPkg: Add Null Stack Check Lib
Remove the old stack check lib now that MdeLibs.inc includes
the new one.

Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
2024-09-13 03:58:46 +00:00
Mike Beaton
bb403511d4 ArmVirtPkg: Fix unable to build with -D NETWORK_ENABLE=0
https://bugzilla.tianocore.org/show_bug.cgi?id=4829

7f17a15 (2024/02/22)
"OvmfPkg: Shell*.inc: allow building without network support"
breaks building OVMF with `-D NETWORK_ENABLE=0`.

Before this commit we could build OVMF e.g. with the following
command in the OvmfPkg directory:

./build.sh -D NETWORK_ENABLE=0

After the commit the same command fails early with:

/home/user/OpenSource/edk2/OvmfPkg/OvmfPkgX64.dsc(15):
error F001: Pcd (gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections)
defined in DSC is not declared in DEC files referenced in INF files in
FDF. Arch: ['X64']

This problem also applies in the ArmVirtPkg
platforms which are modified here, but is currently
masked by another issue, namely that these platforms
incorrectly still include some network packages when
most are disabled. (A fix for this was previously applied,
for OvmfPkg Intel platforms only, by
d933ec1 followed by
7f17a15 .)

This commit was created at the same time as the
commits resolving this issue in NetworkPkg and
OvmfPkg. It makes conditional the Pcd references
in ArmVirtPkg platforms which will become references to
undefined Pcds as and when the other issue mentioned
above is fixed.

Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
2024-09-12 21:34:33 +00:00
Oliver Smith-Denny
8f74b95a21 MdePkg: Move CompilerIntrinsicsLib from ArmPkg
As per the emailed RFC in
https://edk2.groups.io/g/devel/topic/rfc_move/107675828,
this patch moves CompilerIntrinsicsLib from ArmPkg to
MdePkg as this library provides compiler intrinsics, which
are industry standard.

This aligns with the goal of integrating ArmPkg into existing
packages: https://bugzilla.tianocore.org/show_bug.cgi?id=4121.

The newly placed CompilerIntrinsicsLib is added to MdeLibs.dsc.inc
as every DSC that builds ARM/AARCH64 needs this library added. The
old location is removed from every DSC in edk2 in this commit also
to not break bisectability with minimal hoop jumping.

Continuous-integration-options: PatchCheck.ignore-multi-package

Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
2024-09-12 19:36:59 +00:00
Oliver Smith-Denny
734e71f428 MdePkg: Move AsmMacroIoLib*.h from ArmPkg
AsmMacroIoLib.h and AsmMacroIoLibV8.h are used by the
CompilerIntrinsicsLib, which is moving to MdePkg. These
functions provide standard definitions for ARM/AARCH64
assembly code, respectively, and so are moved to the arch
directories in MdePkg to avoid MdePkg having a
dependency on ArmPkg.

Now that the files are in Arm/ and AArch64/ directories,
the filenames are changed to AsmMacroLib.h as we can
distinguish the architecture from the path.

AsmMacroIoLib.inc is unused and so is removed.

Continuous-integration-options: PatchCheck.ignore-multi-package

Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
2024-09-12 19:36:59 +00:00
Ard Biesheuvel
99d60cbd39 ArmVirtPkg ARM: Move to MbedTls for crypto
Move all BaseCryptLib resolutions for 32-bit ARM to MbedTls, which does
not require a softfloat library, which can therefore be dropped from
EDK2 entirely going forward.

Note that this implies no TLS networking for 32-bit ARM, as this code
has a direct dependency on OpenSSL, so move the TlsLib resolution to a
AARCH64-only section to force the build to fail early when attempting to
build 32-bit ARM targets with NETWORK_TLS_ENABLE set.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-09-04 10:22:35 +00:00
Ard Biesheuvel
afba5358c8 ArmVirtPkg: Resolve RngLib via RngDxe for TRNG support
Gerd reports that ArmVirtQemu running under KVM lost network boot
support on systems that do not implement the RNDR/RNDRRS system
registers, which provide an architectural, CPU-based source of random
numbers. Under KVM, the TRNG SMCCC is available as a fallback, which is
exposed via RngDxe but not via the base RngLib library. This means that
direct users of RngLib, such as OpensslLib, have no access to the TRNG
based entropy source.

Let's fix this by resolving RngLib dependencies for UEFI_DRIVER type
drivers via DxeRngLib, which uses the protocol exposed by RngDxe
internally.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-09-03 22:47:09 +00:00
Ard Biesheuvel
a63a7dbf85 ArmVirtPkg: Drop incorrect reference to LzmaDecompressLib
LzmaDecompressLib does not exist as a library class, and the library
implementation that is usually referenced in this context is intended to
be incorporated using NULL library class resolution.

Let's fix this so that we can drop the reference to LzmaDecompressLib.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Sami Mujawar <sami.mujawar@arm.com>
2024-08-30 09:57:24 +00:00
Ard Biesheuvel
5c566abb12 ArmVirtPkg/ArmPlatformLib: Drop unused MPCore routines
Some of the boilerplate in ArmPlatformLib is only relevant when entering
UEFI on multiple cores, and this is no longer supported. So retire the
associated helper routines.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-08-30 08:01:28 +00:00
Rebecca Cran
394cbc4ab2 ArmVirtPkg: Fix some spelling mistakes found by cspell
When cspell is installed (via `npm install cspell`), CI checks for
spelling mistakes. There are currently a very large number of them: some
are genuine mistakes while others are words or acryonyms that cspell
doesn't know.

Fix a few of the misspellings in ArmVirtPkg.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
2024-08-01 19:53:47 +00:00