summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg
AgeCommit message (Collapse)Author
2015-04-14ArmVirtualizationPkg: Xen: shuffle init order to deal with incoherencyArd Biesheuvel
In order to prevent memory corruption issues caused by the fact that, under virtualization, the guest is incoherent with the hypervisor's view of memory until it enables its caches and MMU, this patch reshuffles the init sequence so that the Xen shared memory regions are not touched before the caches and MMU are enabled. In addition, the loaded image itself is invalidated by virtual address, to ensure that any runtime changes (such as the applied relocations) will not suddenly become invisible once we turn the caches on. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Olivier Martin <Olivier.Martin@arm.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17178 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-14ArmVirtualizationPkg: invalidate PEI memory region by VAArd Biesheuvel
This updates ArmVirtualizationMemoryInitPeiLib so that the PEI memory region, i.e., the region that is used both before and after the MMU and caches are enabled, is invalidated by virtual address before enabling the MMU. This prevents issues where data we modified with the caches and MMU off may be shadowed by clean cachelines in system caches or in lower level caches on other CPUs, resulting in the this data to become invisible once we turn the MMU and caches on. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Olivier Martin <Olivier.Martin@arm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17177 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-14ArmPlatformPkg: do not fulfil MemoryInitPeiLib dependency directly via .c fileArd Biesheuvel
MemoryInitPeim short-circuits its MemoryInitPeiLib dependency by including the .c file directly. This prevents us from having a special implementation for ArmVirtualizationPkg that performs additional cache maintenance before enabling the MMU. So instead, make it depend on the library class. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17175 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-14ArmVirtualizationPkg: make ArmVirtualizationMemoryInitPeiLib the defaultArd Biesheuvel
This updates ArmVirtualization.dsc.inc to use the MemoryInitPeiLib implementation for virt targets. The only difference between that one and the original one is that the original one removes memory from the available list if it overlaps the FD region (which may be the case when shadowing NOR flash with system RAM). This is never the case for the Qemu target, which is the only platform affected by this change, since the Xen target already uses this library explicitly. This allows us to remove the Xen-specific declaration of this library dependency. For the Qemu target, this change will not take effect until after the MemoryInitPeim<->MemoryInitPeiLib dependency resolution is fixed in a subsequent patch. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17174 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-08ArmPlatformPkg: Use LzmaDecompress support from MdeModulePkgOlivier Martin
LzmaDecompress support is moving from IntelFrameworkPkg to MdeModulePkg. This change ensures ArmPlatformPkg reflects this future change. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> Reviewed-by: Ronald Cron <ronald.cron@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17133 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-01ArmPlatformPkg/ArmJunoDxe: Fixed returned valueOlivier Martin
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17098 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-01ArmPlatformPkg/ArmJunoPkg/ArmJuno.dec: Update Juno R0 Device Tree default nameOlivier Martin
The default name should match the legacy Juno R0 name (ie: juno.dtb) to ensure the updated UEFI firmware still works on the deployed Juno R0 board. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17097 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-01ArmJunoPkg: Upate Juno R1 Device Tree names to be 8 characters longOlivier Martin
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17096 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-01ArmPlatformPkg/ArmJunoDxe: Add PCI GBE MAC address to Juno R1 boot optionsRonald Cron
On Juno R1, the MAC address assigned to the PCI Gigabyte Ethernet device as to be passed to the Linux Kernel. The MAC address is passed to the Linux Kernel by means of the boot argument "sky2.mac_address". This patch adds this boot argument to the lists of boot arguments of the two Juno R1 default boot options. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ronald Cron <ronald.cron@arm.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17095 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-01ArmPlatformPkg/ArmXenRelocatablePlatformLib: Replaced tabulation by spacesOlivier Martin
EDK2 coding style requires to use 2 spaces instead of tabulation in source code files. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17094 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-01ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe: Removed unreachable ↵Olivier Martin
statement ... raised by ARM toolchain. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17093 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-01ArmPlatformPkg/ArmVirtualizationPkg: Removed trailing spacesOlivier Martin
Trailing spaces causes warnings when generating patches. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17092 6f19259b-4bc3-4df7-8a09-765794883524
2015-03-27ArmPlatformPkg: fix two instances of FreePool () on NULL valueArd Biesheuvel
This is a copy/paste of the exact same code in both cases: Buffer should only be freed on the success path, otherwise it will be NULL Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Ronald Cron <Ronald.Cron@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17078 6f19259b-4bc3-4df7-8a09-765794883524
2015-03-16ArmVirtualizationPkg/ArmVirtualizationQemu: include XHCI driverLaszlo Ersek
The "virt" machine type of qemu-system-(arm|aarch64) had no PCIe support prior to qemu commit 4ab29b82 arm: Add PCIe host bridge in virt machine With that commit, the "virt" board acquired the capability to expose an XHCI controller. Using a USB keyboard as example, the command line options were -device nec-usb-xhci -device usb-kbd However, due to a slight XHCI emulation bug in QEMU -- dating back to several years earlier -- edk2's XHCI driver would encounter a failed ASSERT(). This emulation problem has been fixed in QEMU commit aa685789 xhci: generate a Transfer Event for each Transfer TRB with the IOC bit set and now edk2's XHCI driver works well on QEMU's "nec-usb-xhci" device. Let's enable the driver in ArmVirtualizationQemu, as XHCI emulation is reportedly more virtualization-friendly than EHCI, consuming less CPU. (ArmVirtualizationXen is not modified because it includes no USB-related drivers at all.) This patch should not regress existing QEMU command lines (ie. expose the failed ASSERT()) because QEMU's "-device nec-usb-xhci" has never before resulted in USB devices that worked with edk2 firmware builds, hence users have never had a reason to add that option. Now that they learn about XHCI support in ArmVirtualizationQemu by reading this commit message, they (or their packagers) will also know to update qemu to aa685789 or later (in practice that means the upcoming 2.3 release), at least if they want to use '-device nec-usb-xhci' with edk2, for the first time ever. Cc: Leif Lindholm <Leif.Lindholm@arm.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Alexander Graf <agraf@suse.de> 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: Leif Lindholm <leif.lindholm@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17053 6f19259b-4bc3-4df7-8a09-765794883524
2015-03-16ArmVirtualizationPkg: build UEFI shell from sourceLaszlo Ersek
Including a prebuilt shell executable in the firmware binary is suboptimal practice, especially given that the source code of the UEFI shell resides in the same edk2 tree. Benefits of building the shell from source are partly technical (a developer patching the shell can actually see the results), partly ideological (the nominally built-from-source firmware is actually built from source). "Security" might be worth a mention too. The stanza for the [Components.common] section of "ArmVirtualization.dsc.inc" originates from under OvmfPkg. Cc: Leif Lindholm <Leif.Lindholm@arm.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17052 6f19259b-4bc3-4df7-8a09-765794883524
2015-03-03OvmfPkg, ArmVirtualizationPkg: clean up XenHypercallLib namesLaszlo Ersek
Perform the following renames in order to stick with edk2 tradition more closely: XenHypercallLibArm, XenHypercallLibIntel -> XenHypercallLib XenHypercallIntel -> X86XenHypercall In addition, we unify the INF files. This patch modifies ArmVirtualizationPkg and OvmfPkg at once, in order to keep both bisectable (client code shouldn't break). Suggested-by: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16998 6f19259b-4bc3-4df7-8a09-765794883524
2015-03-02ArmVirtualizationPkg: expose debug message bitmask on build command lineLaszlo Ersek
This enables -D DEBUG_PRINT_ERROR_LEVEL=0x8040004F style command line options. Since we're massaging the debug message bitmask anyway, let's update the description of the individual bits too in the comments, so that they match "MdePkg/Include/Library/DebugLib.h". 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: Leif Lindholm <leif.lindholm@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16986 6f19259b-4bc3-4df7-8a09-765794883524
2015-03-02ArmVirtualizationPkg: PlatformIntelBdsLib: lack of QEMU kernel is no errorLaszlo Ersek
When the user doesn't pass a kernel with QEMU's "-kernel" switch, the firmware sees a zero-sized kernel blob via the QemuFwCfgItemKernelSize key; there's no way to distinguish "no kernel" from "zero sized kernel". In both cases TryRunningQemuKernel() proceeds as far as gBS->LoadImage(), which then rejects the zero sized synthetic file with EFI_UNSUPPORTED. This is known and works fully as expected; however we should rather catch the much more frequent "no kernel" case earlier, in order to avoid the EFI_D_ERROR message TryRunningQemuKernel: LoadImage(): Unsupported which is arguably meaningless noise for the "no kernel" case. 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: Leif Lindholm <leif.lindholm@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16985 6f19259b-4bc3-4df7-8a09-765794883524
2015-03-02ArmPlatformPkg: PEIM startup is not an errorLaszlo Ersek
"MemoryInitPeim.c" and "PlatformPeim.c" log startup messages on the EFI_D_ERROR level. This clutters a strictly EFI_D_ERROR level log needlessly; change the log bitmask of these messages to EFI_D_LOAD | EFI_D_INFO. 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: Leif Lindholm <leif.lindholm@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16984 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-28ArmVirtualizationPkg: add platform description for Xen guestsArd Biesheuvel
This adds the .dsc and .fdf descriptions to build a UEFI image that is bootable by a Xen guest on 64-bit ARM (AArch64) Contributed-under: TianoCore Contribution Agreement 1.0 Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16981 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-28ArmVirtualizationPkg/VirtFdtDxe: wire up XenBusDxe to "xen,xen" DT nodeArd Biesheuvel
This patchs adds support to VirtFdtDxe for the Xen DT node which contains the base address of the Grant Table. This data is communicated to XenBusDxe using a XENIO_PROTOCOL instance. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16980 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-28ArmVirtualizationPkg: implement dummy RealTimeClockLib for XenArd Biesheuvel
This implements a dummy RealTimeClockLib for Xen, as there is no guest interface to access the time kept by Xen that can be shared between UEFI and the OS. Contributed-under: TianoCore Contribution Agreement 1.0 Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16977 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-28ArmVirtualizationPkg: Xen/PV relocatable platformlib instanceArd Biesheuvel
Add a ArmPlatformLib instance that can deal with the self relocation and truly dynamic discovery of system RAM base and size. Contributed-under: TianoCore Contribution Agreement 1.0 Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16964 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-28ArmVirtualizationPkg: allow patchable PCD for FV and DT base addressesArd Biesheuvel
Allow the use of patchable PCDs for gArmTokenSpaceGuid.PcdFvBaseAddress and gArmVirtualizationTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress by moving them from the [FixedPcd] to the [Pcd] section in the INF file of PlatformPeiLib. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16963 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-28ArmVirtualizationPkg: implement custom MemoryInitPeiLibArd Biesheuvel
This implements a MemoryInitPeiLib instance that differs from the stock ArmPlatformPkg version only in the fact that it does not remove the memory used by the flash device (FD). The reason is that, when using PrePi, the DXE core is started immediately and never returns so there is no reason to preserve any of the memory that the flash device occupied originally, and it is preferable to release is so that the OS loader can reuse it. This is especially important for the relocatable PrePi configuration, which is aimed at being launched from a boot loader that itself adheres to the Linux arm64 boot protocol. Contributed-under: TianoCore Contribution Agreement 1.0 Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Olivier Martin <olivier.martn@arm.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16962 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-28ArmVirtualizationPkg: add a relocatable version of PrePiArd Biesheuvel
This patch introduces a relocatable PrePi, which can execute from arbitrary offsets in RAM. This is intendend to be run from a boot loader which passes a description of the actual platform in a device tree, for instance. This module is based on the PrePi implementations residing under ArmPlatformPkg. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Olivier Martin <olivier.martin@arm.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16961 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-28ArmVirtualizationPkg: add padding to FDT allocationArd Biesheuvel
Our primary user QEMU/mach-virt presents us with a FDT blob padded to 64 KB with plenty of room to set additional properties. However, in the general case, we should only add properties after making sure there is enough room available. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16960 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-28ArmVirtualizationPkg: use a HOB to store device tree blobArd Biesheuvel
Instead of using a dynamic PCD, store the device tree address in a HOB so that we can also run under a configuration that does not support dynamic PCDs. This also adds MemoryAllocationLib to the [LibraryClasses] section of ArmVirtualizationPlatformLib/ArmVirtualizationPlatformLib.inf, as this dependency was formerly satisfied transitively through one of the library dependencies that were dropped. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16959 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-28ArmVirtualizationPkg: move early UART discovery to PlatformPeimArd Biesheuvel
This is partially motivated by the desire to use PrePi in a virt environment, and in that configuration, ArmPlatformInitializeSystemMemory() is never called. But actually, this is a more suitable place anyway. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16958 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-28ArmVirtualizationPkg: allow patchable PCD for device tree base addressArd Biesheuvel
To allow a runtime self relocating PrePi instance to discover the base address of the device tree at runtime, allow the use of a patchable PCD for gArmVirtualizationTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress. We will not be using the build time patch tool in this case, but using a patchable PCD will make the build system aware that its value is not a compile time constant. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Olivier Martin <olivier.martin@arm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16957 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-28ArmVirtualizationPkg: add GICv3 detection to VirtFdtDxeArd Biesheuvel
This adds support for detecting the presence of a GICv3 interrupt controller from the device tree, and recording its distributor and redistributor base addresses in their respective PCDs. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Olivier Martin <olivier.martin@arm.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16956 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-28ArmPlatformPkg: allow patchable PCD for FD base addressArd Biesheuvel
This moves the reference to gArmTokenSpaceGuid.PcdFdBaseAddress from the [FixedPcd] to the [Pcd] section in the INF file of PrePiArmPlatformGlobalVariableLib so that its users may choose to use a patchable PCD instead. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Olivier Martin <olivier.martin@arm.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16955 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-28ArmPkg: allow HYP timer interrupt to be omittedArd Biesheuvel
The DT binding for the ARM generic timer describes the secure, non-secure, virtual and hypervisor timer interrupts, respectively. However, under virtualization, only the virtual timer is usable, and the device tree may omit the hypervisor timer interrupt. (Other timer interrupts cannot be omitted simply due to the fact that the virtual timer is listed third) Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Olivier Martin <olivier.martin@arm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16953 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-26ArmPlatformPkg/ArmJunoPkg: Create two default boot entries on first boot on ↵Olivier Martin
Juno R1 Juno R1 can run in two configurations: - A57x2 - A57x2-A53x4 The Device Tree tell Linux which configuration has been selected. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16942 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-26ArmPlatformPkg/ArmJunoPkg: Update with Juno R1 device tree namesOlivier Martin
Juno R1 support two configurations: - A57x2 - A57x2-A53x4 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16941 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-26ArmPlatformPkg/Bds: Remove any use of the "Fdt" UEFI variableRonald Cron
Remove the option to update the "Fdt" UEFI variable in the ARM BDS as the "setfdt" EFI Shell command provides this service from now. Remove the use of this variable in the legacy kernel boot loader and use the FDT installed in the configuration table instead. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ronald Cron <Ronald.Cron@arm.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16940 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-26ArmPlatformPkg/ArmJunoDxe: Set the platform dependent FDT device pathRonald Cron
The MIDR register of the CPU on which the UEFI firmware is running on is used to infer if the platform is a Juno r0 or a Juno r1. The right device path to the platform FDT is then stored in the "gEmbeddedTokenSpaceGuid.PcdFdtDevicePaths" dynamic PCD. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ronald Cron <Ronald.Cron@arm.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16939 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-26ArmPlatformPkg/ArmJunoPkg : Use FdtPlatformDxe driver to install the FDTRonald Cron
Remove the installation of the FDT for Juno into the UEFI Configuration Table from the Juno specific DXE driver. Use the FdtPlatformDxe driver to do it instead. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ronald Cron <Ronald.Cron@arm.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16938 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-26ArmPlatformPkg/ArmVExpressDxe: Load FDT into the EFI Configuration TableRonald Cron
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ronald Cron <Ronald.Cron@arm.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16937 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-25ArmPlatformPkg/ArmVExpressPkg: Added support to differentiate ARMv8 FVP variantsOlivier Martin
There are three FVP variants for the Base and Foundation models: - model with GICv2 legacy memory map (same location as the Versatile Express model) - model with GICv2 and Base model memory map - model with GICv3 and Base model memory map The new code detects the variants to load the appropriate device tree. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16932 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-25ArmPlatformPkg/ArmVExpressDxe: Identify the current platformOlivier Martin
Add a function to ArmVExpressDxe to identify the current platform we are running on. This includes ARM32 and AArch64 models and hardware. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16931 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-25ArmPlatformPkg/ArmVExpress-FVP-AArch64.dsc: Switch to Linux kernel with EFI ↵Olivier Martin
stub by default Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16929 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-25ArmPlatformPkg/ArmJuno: Use EFI Stub and updated the command lineOlivier Martin
- 'earlycon' is the new name for 'earlyprintk' - Support Linux EFI stub by default - The command line is expected to be in unicode when booting an EFI application. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16928 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-25ArmVirtualizationPkg/QemuFwCfgLib: Fixed build errorOlivier Martin
ARM toolchain raises the build error: Error #188-D: enumerated type mixed with another type Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16927 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-25ArmVirtualizationPkg: PlatformIntelBdsLib: display TianoCore logoLaszlo Ersek
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16925 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-25ArmVirtualizationPkg: PlatformIntelBdsLib: detect consoles dynamicallyLaszlo Ersek
Detect the video displays dynamically, and add them to the console and error output variables. Add a short-form, "wild card" USB_CLASS_DEVICE_PATH to the console input variable, which causes the USB keyboard to be handled automatically. Add the fixed location serial console to all of the console input, console output, and error output variables. This patch enables QEMU users to drop "addr=..." PCI address specifications from the -device options (or to use whatever addresses they like). For example, the following works: -device VGA \ \ -device ich9-usb-ehci1,multifunction=on,id=ehci \ -device ich9-usb-uhci1,multifunction=on,masterbus=ehci.0,firstport=0 \ -device ich9-usb-uhci2,multifunction=on,masterbus=ehci.0,firstport=2 \ -device ich9-usb-uhci3,multifunction=on,masterbus=ehci.0,firstport=4 \ -device usb-kbd,bus=ehci.0 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16924 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-25ArmVirtualizationPkg: PlatformIntelBdsLib: remove ties to ARM BDSLaszlo Ersek
In this patch we remove all dependencies on ARM BDS libraries. We also remove empty and/or unneeded functions, includes, etc. PlatformIntelBdsLib "goes back to basics" temporarily -- there are no consoles configured, and it's practically not possible to interact with the user interface. Bisection remains available in the sense that "ArmVirtualizationQemu.dsc" continues to build and should boot preexistent boot options, but user interaction does regress temporarily. The reason for this is that it's preferable to keep this patch and the next one separate for readability's sake -- they amount to a rewrite from scratch. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16923 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-25ArmVirtualizationPkg: PlatformIntelBdsLib: beautify sourceLaszlo Ersek
This patch introduces no functional changes. It sorts #include directives, sorts INF file sections, and reformats license blocks. 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: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16922 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-23ArmVirtualizationPkg/ArmVirtualizationQemu: add USB keyboard inputLaszlo Ersek
Similarly to the previous patch, we can now multiplex input from the USB keyboard. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Olivier Martin <Olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16914 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-23ArmVirtualizationPkg/ArmVirtualizationQemu: add VGA console outputLaszlo Ersek
Alex Graf's QEMU patchset enables "-device VGA" for the virt machtype as well. We can now include OvmfPkg/QemuVideoDxe in the firmware, and set PcdDefaultConOutPaths such that the console output is multiplexed to the video window as well. (Our platform BDS lib doesn't (yet) locate the VGA device automatically.) OvmfPkg/PlatformDxe is included too; it allows users to select a video resolution. (Note that PcdSetupVideoHorizontalResolution and PcdSetupVideoVerticalResolution are independent; see git commit 848834cb (SVN r16311) for explanation.) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Olivier Martin <Olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16913 6f19259b-4bc3-4df7-8a09-765794883524