summaryrefslogtreecommitdiffstats
path: root/ArmVirtPkg/ArmVirtPkg.dec
Commit message (Collapse)AuthorAgeFilesLines
* ArmVirtPkg: Move two PCD variables into OvmfPkgChao Li2024-02-061-13/+0
| | | | | | | | | | | | | | | | | | Move the PcdTerminalTypeGuidBuffer and PcdUninstallMemAttrProtocol into OvmfPkg so other ARCH can easily use it. Build-tested only (with "ArmVirtQemu.dsc and OvmfPkgX64.dsc"). BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Chao Li <lichao@loongson.cn> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: Move the FdtSerialPortAddressLib to OvmfPkgChao Li2024-02-061-1/+0
| | | | | | | | | | | | | | | | | | Move the FdtSerialPortAddressLib to Ovmfpkg so that other ARCH can easily use it. Build-tested only (with "ArmVirtQemu.dsc and OvmfPkgX64.dsc"). BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Chao Li <lichao@loongson.cn> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: Move PCD of FDT base address and FDT padding to OvmfPkgChao Li2024-02-061-14/+0
| | | | | | | | | | | | | | | | | | | | | Moved PcdDeviceTreeInitialBaseAddress and PcdDeviceTreeAllocationPadding to OvmfPkg for easier use by other architectures. Build-tested only (with "ArmVirtQemu.dsc"). BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Chao Li <lichao@loongson.cn> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtQemu: Allow EFI memory attributes protocol to be disabledArd Biesheuvel2023-12-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | | Shim's PE loader uses the EFI memory attributes protocol in a way that results in an immediate crash when invoking the loaded image, unless the base and size of its executable segment are both aligned to 4k. If this is not the case, it will strip the memory allocation of its executable permissions, but fail to add them back for the executable region, resulting in non-executable code. Unfortunately, the PE loader does not even bother invoking the protocol in this case (as it notices the misalignment), making it very hard for system firmware to work around this by attempting to infer the intent of the caller. So let's introduce a QEMU command line option to indicate that the protocol should not be exposed at all, and a PCD to set the default for this option when it is omitted. Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://gitlab.com/qemu-project/qemu/-/issues/1990 Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
* ArmVirtPkg: introduce FdtSerialPortAddressLibLaszlo Ersek2023-10-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new library class + instance for: - collecting serial port base addresses from the device tree, - collecting the /chosen stdout-path serial port base address from the device tree. The logic is loosely based on the following functions: - SerialPortGetBaseAddress() [ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c] - PlatformPeim() [ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.c] - GetSerialConsolePortAddress() [ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.c] which are going to be converted to clients of the new library later. Copyright notices from those other files are preserved. The new library fixes the following warts, found by reading the existent code: - Neither of the three functions check whether the "reg" property exists. (This may be implicitly checked when they compare the property size to 16.) - GetSerialConsolePortAddress() uses ScanMem8() for locating a colon (":") node path separator in "stdout-path", when AsciiStrStr() could work just as fine. While ScanMem8() is likely faster, "stdout-path" is presumably very short, and ScanMem8() introduces an extra lib class dependency (namely BaseMemoryLib). - If ScanMem8() fails to locate a colon in "stdout-path", then GetSerialConsolePortAddress() re-measures the length of the whole "stdout-path" property. This is conceptually (if not performance-wise) disturbing, because we know the whole size of the "stdout-path" property from the property lookup just before, so we only need to subtract the NUL-terminator for learning the length. - GetSerialConsolePortAddress() does not check if the first (or only) node path inside the "stdout-path" property is empty. (Not a big deal, the subsequent alias resolution should simply fail.) - GetSerialConsolePortAddress() does not verify if the node path retrieved (and potentially alias-resolved) from "stdout-path" can be located in the device tree; it assumes it. - Code is duplicated (of course) between SerialPortGetBaseAddress() and PlatformPeim(), but more surprisingly, all three functions embed the same code for verifying the "status" property of the serial port node, and for checking and reading its "reg" property. Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20231008153912.175941-2-lersek@redhat.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4577 [lersek@redhat.com: add TianoCore BZ reference]
* ArmVirtPkg/PlatformHasAcpiDtDxe: Move to OvmfPkgSunil V L2023-02-161-9/+0
| | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4076 This module is required by other architectures like RISC-V. Hence, move this to OvmfPkg. Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Sunil V L <sunilvl@ventanamicro.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Andrei Warkentin <andrei.warkentin@intel.com>
* ArmVirtPkg/QemuVirtMemInfoLib: use HOB not PCD to record the memory sizeArd Biesheuvel2022-10-261-0/+1
| | | | | | | | | | | Due to the way we inherited the formerly fixed PCDs to describe the system memory base and size from ArmPlatformPkg, we ended up with a MemoryInit PEIM that relies on dynamic PCDs to communicate the size of system memory between the constructor of one of its library dependencies and the core module. This is unnecessary, and forces us to incorporate the PCD PEIM as well, for no good reason. So instead, let's use a HOB. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
* ArmVirtPkg/FdtClintDxe: Move FdtClientDxe to EmbeddedPkgAbner Chang2021-10-141-3/+0
| | | | | | | | | | | | | | | | | This is one of the series patches to restructure the location of modules under ArmVirtPkg for RiscVVirtPkg. RiscVVirtPkg leverage FDT Client protocol to parse FDT nodes. Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Daniel Schaefer <daniel.schaefer@hpe.com> Cc: Sunil V L <sunilvl@ventanamicro.com> Reviewed-by: Daniel Schaefer <daniel.schaefer@hpe.com> Reviewed-by: Sunil V L <sunilvl@ventanamicro.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
* ArmVirtPkg: Install Acpi tables for Cloud HypervisorJianyong Wu2021-07-071-0/+6
| | | | | | | | | | | | | | | | | | There is no device like Fw-cfg in Qemu in Cloud Hypervisor, so a specific Acpi handler is introduced here. The handler implemented here is in a very simple way: 1. acquire the RSDP from the PCD variable in the top ".dsc"; 2. get the XSDT address from RSDP structure; 3. get the ACPI tables following the XSDT structure and install them one by one; 4. get DSDT address from FADT and install DSDT table. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Jianyong Wu <jianyong.wu@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmVirtPkg: GUID Hob for 16550 UART base addressSami Mujawar2020-10-161-0/+2
| | | | | | | | | | Introduce a new GUID Hob gEarly16550UartBaseAddressGuid to cache the base address of the 16550 UART, for when PCD access is not available. Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Ard Biesheuvel <Ard.Biesheuvel@arm.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/PlatformPeiLib: discover the TPM base address from the DTArd Biesheuvel2020-03-041-0/+6
| | | | | | | | | | | | | | | | | Introduce a boolean PCD that tells us whether TPM support is enabled in the build, and if it is, record the TPM base address in the existing routine that traverses the device tree in the platform PEIM. If a TPM is found, install the gOvmfTpmDiscoveredPpiGuid signalling PPI that will unlock the dispatch of OvmfPkg's Tcg2ConfigPei. If TPM2 support is enabled in the build but no TPM2 device is found, install the gPeiTpmInitializationDonePpiGuid PPI, which is normally installed by Tcg2ConfigPei if no TPM2 is found, but in our case Tcg2ConfigPei will never run so let's do it here instead. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2560 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-091-7/+1
| | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: introduce ArmVirtMemInfoLib library classArd Biesheuvel2017-11-231-0/+3
| | | | | | | | | | | | | As part of the effort to get rid of ArmPlatformLib (which incorporates far too many duties in a single library), introduce ArmVirtMemInfoLib which will be invoked by our ArmVirtMemoryInitPeiLib implementation to get a description of the virtual address space. This will allow us to remove this functionality from ArmPlatformLib later, or, in the case of ArmVirtXen and ArmVirtQemuKernel, drop ArmPlatformLib altogether. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/PlatformHasAcpiDtDxe: allow guest level ACPI disable overrideArd Biesheuvel2017-03-311-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | In general, we should not present two separate (and inevitably different) hardware descriptions to the OS, in the form of ACPI tables and a device tree blob. For this reason, we recently added the logic to ArmVirtQemu to only expose the ACPI 2.0 entry point if no DT binary is being passed, and vice versa. However, this is arguably a regression for those who relied on DT descriptions being available, even if the former behavior can be restored by passing the -no-acpi switch to QEMU. So allow a secret handshake with the UEFI Shell, to set a variable that will result in ACPI to be disabled on subsequent boots even if -no-acpi was not passed on the QEMU command line. setvar -nv -bs -guid 50bea1e5-a2c5-46e9-9b3a-59596516b00a ForceNoAcpi =01 To delete the variable and revert to the old situation, simply omit the value after the = setvar -nv -bs -guid 50bea1e5-a2c5-46e9-9b3a-59596516b00a ForceNoAcpi = Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Marc Zyngier <marc.zyngier@arm.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com>
* ArmVirtPkg: remove PURE_ACPI_BOOT_ENABLE and PcdPureAcpiBootLaszlo Ersek2017-03-281-10/+0
| | | | | | | | | | The build flag and the FeaturePCD have no effect any longer, remove them. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Leif Lindholm <leif.lindholm@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* Revert "ArmVirtPkg/FdtClientDxe: make DT table installation !ACPI dependent"Laszlo Ersek2017-03-281-0/+10
| | | | | | | | | | | | | | | | | | | This reverts commit 78c41ff519b187d8979cda7074f007a6323f9acd. We realized that DXE drivers that are independent of AcpiPlatformDxe (that is, independent of QEMU's ACPI generation), such as RamDiskDxe and BootGraphicsResourceTableDxe, may produce and/or manipulate ACPI tables, at driver dispatch or even at Ready To Boot. This makes it unsafe for us to check for ACPI presence in the UEFI system config table in a Ready To Boot callback, in order to decide about exposing the DT. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Leif Lindholm <leif.lindholm@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg/FdtClientDxe: make DT table installation !ACPI dependentArd Biesheuvel2017-03-091-10/+0
| | | | | | | | | | | | Instead of having a build time switch to prevent the FDT configuration table from being installed, make this behavior dependent on whether we are passing ACPI tables to the OS. This is done by looking for the ACPI 2.0 configuration table, and only installing the FDT one if the ACPI one cannot be found. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: remove PcdKludgeMapPciMmioAsCachedLaszlo Ersek2016-09-011-24/+0
| | | | | | | | | | | | | | In ARM/AARCH64 guests that run on KVM, we can now use virtio-gpu-pci, so PcdKludgeMapPciMmioAsCached is no longer necessary. Standard VGA continues to work on TCG without the kludge. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Ref: https://tianocore.acgmultimedia.com/show_bug.cgi?id=66 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* ArmVirtPkg/VirtFdtDxe: remove handling of fw_cfg DT nodeArd Biesheuvel2016-04-121-5/+0
| | | | | | | | | | | | Remove the handling of the fw_cfg DT node from VirtFdtDxe now that the fw_cfg client library has been moved to the FDT client protocol, and no longer relies on VirtFdtDxe to pass this information via dynamic PCDs. Since the PCDs in question are now no longer used, remove them from the various DEC and DSC files as well. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/VirtFdtDxe: drop detection of PSCI methodArd Biesheuvel2016-04-111-8/+0
| | | | | | | | | | The detection of the PSCI method has been moved to the EfiResetSystemLib implementation, so drop the handling from VirtFdtDxe. Since no users remain of gArmVirtTokenSpaceGuid.PcdArmPsciMethod, remove that as well. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/VirtFdtDxe: remove GIC discoveryArd Biesheuvel2016-04-111-5/+0
| | | | | | | | | | | Now that we moved the GIC discovery to our ArmGicArchLib implementation, we can remove it from VirtFdtDxe, since it is no longer used. Remove the PcdArmGicRevision declaration and definitions as well: VirtFdtDxe no longer sets it, and no other drivers consume its value. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: introduce FdtClientProtocolArd Biesheuvel2016-04-111-0/+3
| | | | | | | | | This introduces the FdtClientProtocol, which will be used to expose the device tree provided by the host to other DXE drivers. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/VirtFdtDxe: make installation of FDT as config table optionalArd Biesheuvel2016-03-311-0/+9
| | | | | | | | | | | | The arm64 kernel is hardwired to prefer DT over ACPI, unless 'acpi=force' is passed on the kernel command line. The only other way to force the kernel to use ACPI is not to pass an FDT to it in the first place. So introduce a PCD that inhibits the installation of the QEMU supplied FDT as a configuration table. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: VirtFdtDxe: detect fw-cfg DMA interface from the DTBLaszlo Ersek2015-09-241-0/+1
| | | | | | | | | | | | | | | | A DMA-like transfer interface has recently been implemented in QEMU for fw-cfg. For ARM and AARCH64 virtual machines, the binding prescribes a new 8-byte wide register at offset 0x10 in the register block. Make VirtFdtDxe expose this register if it is present. Please see "docs/specs/fw_cfg.txt" in the QEMU tree for more information. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18544 6f19259b-4bc3-4df7-8a09-765794883524
* ArmVirtPkg: record GIC revision in dynamic PCDArd Biesheuvel2015-07-281-0/+5
| | | | | | | | | | | | | | In order to allow a ArmGicArchLib to be implemented that returns the supported GIC revision based on the device tree, add handling to VirtFdtDxe to record the GIC revision at DT parsing time. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Tested-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18101 6f19259b-4bc3-4df7-8a09-765794883524
* Add PCD for selecting terminal type at build timeLaszlo Ersek2015-07-091-0/+7
| | | | | | | | | | | | | | | | Add a fixed pointer PCD to allow build-time selection of VT100 or TTY terminal type. The default remains VT100 emulation. Add support for building the ARM QEMU platforms with the TTY terminal with the "-D TTY_TERMINAL" build option. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> [Roy Franz: minor edits: add TtyTerminal GUID, rename LINUX_TERMINAL to TTY_TERMINAL] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Roy Franz <roy.franz@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17898 6f19259b-4bc3-4df7-8a09-765794883524
* Renamed ArmPlatformPkg/ArmVirtualizationPkg into ArmVirtPkgOlivier Martin2015-05-291-0/+87
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17537 6f19259b-4bc3-4df7-8a09-765794883524