Add ArmTransferListLib as a library to platforms using
ArmVirtCloudHv.dsc and ArmVirtQemu.dsc.
Signed-off-by: Prachotan Bathi <prachotan.bathi@arm.com>
These libraries required dependency on EmbeddedPkg for the
FdtHob which has been moved to MdePkg. This dependency is not
needed anymore and can now be removed.
Signed-off-by: Akshay Behl <cap2k4@rivosinc.com>
Co-authored-by: Dhaval Sharma <dhaval@rivosinc.com>
The Universal Graphics Adapter (UGA) is a graphic abstraction.
The UGA I/O and Draw protocols are deprecated since UEFI 2.0 was
introduced. Cf. the UEFI spec v2.9:
"Appendix L - EFI 1.10 Protocol Changes and Deprecation List"
section L.2 "Deprecated Protocols"
Remove the UGA support.
Signed-off-by: GuoMinJ <newexplorerj@gmail.com>
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Move ArmMmuLib from ArmPkg to UefiCpuPkg for easy maintaining.
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Ajan Zhong <ajan.zhong@newfw.com>
Since ArmMmuLib.h has been moved to UefiCpuPkg, add corresponding dec
file to AcceptableDependencies to ArmPkg, ArmPlatformPkg and ArmVirtPkg.
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Ajan Zhong <ajan.zhong@newfw.com>
Move the ArmMmuLib interface definition to UefiCpuPkg, with this change,
MMU libraries for ARM, AARCH64, RiscV, LongArch64 architectures all
reside in UefiCpuPkg.
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Ajan Zhong <ajan.zhong@newfw.com>
Since VirtNorFlashDxe now depends on the new VirtNorFlashDeviceLib,
all related targets should be linked against this library.
Signed-off-by: Tuan Phan <tphan@ventanamicro.com>
When booting under Xen/Arm64 with a flattened devicetree, XenioFdtDxe.c
performs a runtime assert on the size of the hypervisor node. At some
point the hypervisor devicetree node changed size in upstream Xen, which
makes booting under Xen impossible because the assertion fails:
ASSERT [XenioFdtDxe] XenioFdtDxe.c(64): RegSize == 2 * sizeof (UINT64)
By putting a debug print in InitializeXenioFdtDxe we can see the value
of RegSize is 48, instead of 2 * sizeof (UINT64)=16.
Change the equality check to equal or greater than (>=).
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Fix the issue caused by ordering change in dsc include files
while enabling dynamic stack check.
Signed-off-by: Ashish Singhal <ashishsingha@nvidia.com>
Migrate these packages to use the up-to-date BaseFdtLib instead
of the EmbeddedPkg relic that is going away.
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
Add an explicit dependency on a previously accidentally resolved one,
tripped over while excising the EmbeddedPkg libfdt.
Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
Add config option to use qemu variable service,
via VirtMmCommunicationDxe. Default is FALSE,
build using '-D QEMU_PV_VARS=TRUE' to enable.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Details about a particular pipeline change over time - such as the
specific Linux distro or toolchain version. At the same time, the
pipeline files are directly referenced in Azure Pipelines to run the
pipeline and few users have access to change those details.
To make the files less likely to refer to outdated information over
time and reduce the need for an Azure Pipeline administrator to get
involved, the files are updated to drop specific details apart from
the host OS environment used in the pipeline.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
This commit is to add two new APIs in ArmVirtDxeHobLib:
1.The GetNextMemoryAllocationGuidHob () returns the next
instance of the Memory Allocation HOB with the matched
GUID from a starting HOB pointer.
2.The TagMemoryAllocationHobWithGuid () searchs the HOB
list for the Memory Allocation HOB with a matching base
address and set the Name GUID. Then the instance of the
tagged Memory Allocation HOB with matched base address is
returned.
Signed-off-by: Dun Tan <dun.tan@intel.com>
AArch64 no longer uses PcdVFPEnabled, so make the definition ARM-specific
and stop explicitly setting it for AArch64 platforms.
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
UEFI defines that FP support is required on AArch64, whereas ArmVirtPkg
enables it anyway on Arm. But when it's enabled, C code can generate
instructions targeting FP registers, so:
- move ArmEnableVFP call to asm
- make it unconditional on AArch64
Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
As an implementation of an industry specification-defined interface,
ArmSmcLib is more appropriately placed in MdePkg.
This update relocates both the header definition and the implementation
of ArmSmcLib to MdePkg, thereby supporting the monitor call primitives
for all other packages that depend on this interface.
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
Kvmtool always generates a PCI host device tree node. Thus PCI related
ACPI tables are always generated. Rely on the presence of PCI devices
in the interrupt-map information instead.
Reported-by: Sarah Walker <sarah.walker2@arm.com>
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
kvmtool advertises 4 serial ports. The DynamicTablesPkg advertises:
- the first port as the console port / SPCR table
- the second port as the debug port / DBG2 table
- the other ports are currently ignored
Advertise the last 2 serial port to the OS by describing them in SSDT
tables. New serial devices can be seen at:
Before patch:
$ ls /sys/devices/pnp0
00:00 00:01 00:02 power uevent
After patch:
$ ls /sys/devices/pnp0
00:00 00:01 00:02 00:03 00:04 power uevent
The EStdAcpiTableIdSsdtSerialPort entry is placed before the
last 3 PCI related tables as they might be dynamically removed
depending on kvmtool parameters.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
This is part of the effort to enable/disable firmware configuration
(UiApp) from the QEMU CLI.
Because the UiApp can be disabled at runtime and it's currently the
default BootManagerMenu, change the default from UiApp to
BootManagerMenuApp.
Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
Add BootManagerMenuApp to all OvmfPkg dependencies.
To make UiApp optional, switch from UiApp to BootManagerMenuApp
as default BootManagerMenu.
Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
Add PlatformBootManagerCommonLib to ArmVirtQemu and ArmVirtQemuKernel in
ArmVirtPkg.
This is part of the effort to remove code present in both
PlatformBootManagerLib and PlatformBootManagerLibLight.
Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
Use `UsbComponents.dsc.inc` for the USB driver configuration to simplify
changes across all DSC files. This also allows selective enabling or
disabling of `UsbMassStorage` through `fw_cfg`.
Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
Use `NetworkComponents.dsc.inc` for the network driver configuration to
simplify changes across all DSC files. This also allows selective
enabling or disabling the support for IPv4, IPv6, VirtioNet and ISCSI
through `fw_cfg`.
Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
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>
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>
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>
This reverts commit 43233ff9f8.
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>
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>
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>
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>
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>
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>
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>
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
6862b9d538.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
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
d933ec115b started
the change of not including these residual NetworkPkg
components, and commit
7f17a15564 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>
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>
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>
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>
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>
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>
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>
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>
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>