summaryrefslogtreecommitdiffstats
path: root/ArmVirtPkg
Commit message (Collapse)AuthorAgeFilesLines
* ArmVirtPkg: Removing ipf which is no longer supported from edk2.chenc22018-06-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing rules for Ipf sources file: * Remove the source file which path with "ipf" and also listed in [Sources.IPF] section of INF file. * Remove the source file which listed in [Components.IPF] section of DSC file and not listed in any other [Components] section. * Remove the embedded Ipf code for MDE_CPU_IPF. Removing rules for Inf file: * Remove IPF from VALID_ARCHITECTURES comments. * Remove DXE_SAL_DRIVER from LIBRARY_CLASS in [Defines] section. * Remove the INF which only listed in [Components.IPF] section in DSC. * Remove statements from [BuildOptions] that provide IPF specific flags. * Remove any IPF sepcific sections. Removing rules for Dec file: * Remove [Includes.IPF] section from Dec. Removing rules for Dsc file: * Remove IPF from SUPPORTED_ARCHITECTURES in [Defines] section of DSC. * Remove any IPF specific sections. * Remove statements from [BuildOptions] that provide IPF specific flags. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg: add QemuRamfbDxeGerd Hoffmann2018-06-143-0/+5
| | | | | | | | | Add QemuRamfbDxe to dsc and fdf files for ArmVirt package. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: switch to KVM safe IoLib implementationArd Biesheuvel2018-06-111-1/+1
| | | | | | | | | | Switch to the new IoLib implementation that will only use KVM safe instructions to perform MMIO memory accesses. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/PlatformBootManagerLib: add missing report status code callArd Biesheuvel2018-05-292-0/+5
| | | | | | | | | | | Consumers of status code reports may rely on a status code to be reported when the ReadyToBoot event is signalled. For instance, FirmwarePerformanceDxe will fail to install the FPDT ACPI table in this case. So add the missing call. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: resolve PciCapLib, PciCapPciSegmentLib, PciCapPciIoLibLaszlo Ersek2018-05-241-0/+3
| | | | | | | | | | | | Resolve the PciCapLib, PciCapPciSegmentLib, and PciCapPciIoLib classes to their single respective instances under OvmfPkg. Later patches will use those lib classes in OvmfPkg drivers, some of which are included in ArmVirt platforms. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg/PlatformBootManagerLib: connect Virtio RNG devices againLaszlo Ersek2018-05-182-0/+130
| | | | | | | | | | | | | | | | | | Virtio RNG devices are never boot devices, so in commit ff1d0fbfbaec we stopped connecting them. This is a problem because an OS boot loader may depend on EFI_RNG_PROTOCOL to seed the OS's RNG. Connect Virtio RNG devices again. And, while commit ff1d0fbfbaec removed that from PlatformBootManagerAfterConsole(), reintroduce it now to PlatformBootManagerBeforeConsole() -- this way Driver#### options launched between both functions may access EFI_RNG_PROTOCOL too. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Fixes: ff1d0fbfbaec55038ccf888759588fa4e21516f4 Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1579518 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg: use protocol-based DevicePathLib instance for most DXE modulesLaszlo Ersek2018-04-304-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port OvmfPkg commit 5c3481b0b611e to ArmVirtPkg. Some explanation should be in order (because 5c3481b0b611e doesn't offer any): - The UefiDevicePathLibDevicePathProtocol instance uses the Device Path Utilities Protocol, produced by DevicePathDxe, for formatting and parsing the textual device path representation. This allows for a lighter weight lib instance that gets linked into several DXE modules. In comparison, the more standalone UefiDevicePathLib instance includes the formatting and parsing routines in every client module. - The DXE core needs DevicePathLib before it dispatches DevicePathDxe, so it needs to stick with the standalone instance. - DevicePathDxe itself also needs the standalone instance, for implementing the protocol. - The DXE-phase PCD driver, "MdeModulePkg/Universal/PCD/Dxe/Pcd.inf", depends on DevicePathLib via UefiLib and DxeServicesLib at the least; so with this update, it inherits a dependency on the protocol. In reverse, DevicePathDxe depends on the PCD Protocol, via PcdLib. The cycle is broken by using BasePcdLibNull in DevicePathDxe. That restricts it to FixedAtBuild, Patch, and FeatureFlag PCDs, but that's fine. Example space savings (using ArmVirtQemu and the GCC5 toolchain): - NOOPT: 187KB in FVMAIN, 12KB in FVMAIN_COMPACT - DEBUG: 147KB in FVMAIN, 20KB in FVMAIN_COMPACT - RELEASE: 123KB in FVMAIN, 17KB in FVMAIN_COMPACT Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=940 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg: reinstate timer unmask quirk for XenArd Biesheuvel2018-04-263-0/+180
| | | | | | | | | | | | | | | | | | | | Commit 411a373ed642 ("ArmPkg/TimerDxe: remove workaround for KVM timer handling") removed the virtual timer handling quirk that cleared the mask bit in the control register when enabling the timer, under the assumption that only ancient KVM host implementations required it. However, Julien reports that Xen also masks the timer interrupt in the guest view of the timer control register, and therefore needs the same quirk. So let's reinstate it, but using a Xen specific implementation of the timer support library, so that other virt platforms remain unchanged. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Julien Grall <julien.grall@arm.com> Acked-by: Julien Grall <julien.grall@arm.com>
* ArmVirtPkg/ArmVirtQemu: hook NvVarStoreFormattedLib into VariableRuntimeDxeLaszlo Ersek2018-04-122-0/+2
| | | | | | | | | | | | | | | In spite of both ArmVirtQemu and ArmVirtQemuKernel formatting the variable store template at build time, link NvVarStoreFormattedLib into VariableRuntimeDxe via NULL class resolution on both platforms. This lets us test the depexes implemented in the previous patches. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Steve Capper <steve.capper@linaro.org> Cc: Supreeth Venkatesh <Supreeth.Venkatesh@arm.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg/PlatformHasAcpiDtDxe: depend on gEfiVariableArchProtocolGuidLaszlo Ersek2018-04-121-1/+1
| | | | | | | | | | | | | | | | | | PlatformHasAcpiDtDxe consumes the DynamicHii PCD called "gArmVirtTokenSpaceGuid.PcdForceNoAcpi". The PcdGetBool() library call terminates in gRT->GetVariable(), in the MdeModulePkg/Universal/PCD/Dxe driver. Put "gEfiVariableArchProtocolGuid" on PlatformHasAcpiDtDxe's DEPEX so that we not attempt the call before the PCD driver can successfully read non-volatile variables. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Steve Capper <steve.capper@linaro.org> Cc: Supreeth Venkatesh <Supreeth.Venkatesh@arm.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmVirtPkg/PlatformBootManagerLib: return to "-kernel before boot devices"Laszlo Ersek2018-03-161-8/+8
| | | | | | | | | | | | | | | | | Move the TryRunningQemuKernel() call back to its original place. This improves the UEFI boot time for VMs that have "-kernel", many disks or NICs, and no "bootindex" properties. A well-known example is guestfish/libguestfs. For more info on the TryRunningQemuKernel() location, see the following commits: 23d04b58e27b, a78c4836ea0b, 158990b941e4. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Xiang Zheng <xiang.zheng@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Richard W.M. Jones <rjones@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg/PlatformBootManagerLib: minimize the set of connected devicesLaszlo Ersek2018-03-141-2/+10
| | | | | | | | | | | | | | Prefer ConnectDevicesFromQemu() to EfiBootManagerConnectAll(). Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Shannon Zhao <zhaoshenglong@huawei.com> Cc: Xiang Zheng <xiang.zheng@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> # ArmVirtQemu Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Xiang Zheng <xiang.zheng@linaro.org>
* ArmVirtPkg/ArmVirtPrePiUniCoreRelocatable: list "PrePi.h" in INF fileLaszlo Ersek2018-03-131-0/+1
| | | | | | | | | | | | | | | Among other things, the header file declares the ArchInitialize() function, which is called from "PrePi.c", and implemented (dependent on architecture) in "AArch64/ArchPrePi.c" and "Arm/ArchPrePi.c". Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Suggested-by: Michael Kinney <michael.d.kinney@intel.com> Ref: http://mid.mail-archive.com/E92EE9817A31E24EB0585FDF735412F56327F7D3@ORSMSX113.amr.corp.intel.com Contributed-under: TianoCore Contribution Agreement 1.1 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/ArmVirtPrePiUniCoreRelocatable: sort [Sources*] sections in INFLaszlo Ersek2018-03-131-1/+1
| | | | | | | | | | | This makes it easier to insert future source files. No functional changes. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 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/PlatformBootManagerLib: list "PlatformBm.h" in INF fileLaszlo Ersek2018-03-131-0/+1
| | | | | | | | | | | | | The header file declares TryRunningQemuKernel(), defined in "QemuKernel.c" and called from "PlatformBm.c". Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Suggested-by: Michael Kinney <michael.d.kinney@intel.com> Ref: http://mid.mail-archive.com/E92EE9817A31E24EB0585FDF735412F56327F7D3@ORSMSX113.amr.corp.intel.com Contributed-under: TianoCore Contribution Agreement 1.1 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: switch to DXE runtime version of DebugLib where appropriateArd Biesheuvel2018-02-241-0/+3
| | | | | | | | | | Switch all users of ArmVirt.dsc.inc to the new DebugLib implementation that was created especially for DXE_RUNTIME_DRIVER modules, ensuring that DEBUG() calls do not touch the UART at runtime. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: Add SafeIntLib and BmpSupportLib to DSC filesMichael D Kinney2018-02-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=800 Based on content from the following branch/commits: https://github.com/Microsoft/MS_UEFI/tree/share/MsCapsuleSupport https://github.com/Microsoft/MS_UEFI/commit/33bab4031a417d7d5a7d356c15a14c2e60302b2d https://github.com/Microsoft/MS_UEFI/commit/ca516b1a61315c2d823f453e12d2135098f53d61 https://github.com/Microsoft/MS_UEFI/commit/2b9f111f2e74a4c2ef4c4e32379e111f016dbd9b The BootGraphicsResourceTableDxe module uses the BmpSupportLib and SafeIntLib to convert a GOP BLT buffer to a BMP graphics image. Add library mappings for these new library classes. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> 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> Reviewed-by: Bret Barkelew <Bret.Barkelew@microsoft.com>
* ArmVirtPkg: drop unused PcdCacheEnableLeif Lindholm2018-02-061-2/+0
| | | | | | | | | ArmVirt.dsc.inc sets gEmbeddedTokenSpaceGuid.PcdCacheEnable, which is unused and about to be deleted. Drop it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg: add NOOPT target to platform .DSCsArd Biesheuvel2017-12-063-3/+3
| | | | | | | | | In order to allow the ArmVirtPkg platforms to be built using the NOOPT target, add it explicitly to the BUILD_TARGETS define. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/ArmVirtXen: move from Intel to generic BDSArd Biesheuvel2017-12-042-4/+20
| | | | | | | | | | | | ArmVirtXen is the only remaining consumer of ArmPlatformPkg's PlatformIntelBdsLib implementation, which is tightly coupled to the deprecated Intel BDS. So move ArmVirtXen to the generic BDS as well, allowing us to get rid of PlatformIntelBdsLib entirely. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Julien Grall <julien.grall@linaro.org>
* ArmVirtPkg: Fix build failure due to Tftp library removalRuiyu Ni2017-11-303-6/+11
| | | | | | | | | | | | | | | | | | | | The TFTP command was converted from a NULL class library instance to a dynamic shell command in commit 0961002352e9. The ShellLib and FileHandleLib resolutions are moved from [LibraryClasses.common.UEFI_APPLICATION] to [LibraryClasses.common] because dynamic shell commands are implemented as DXE_DRIVER modules. PcdShellLibAutoInitialize must be set to FALSE for both the shell app itself and the dynamic shell command modules. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> [lersek@redhat.com: extend commit message] Reviewed-by: Laszlo Ersek <lersek@redhat.com> Build-tested-by: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org>
* ArmVirtPkg/PrePi: don't export PE/COFF and LZMA libraries via HOBsArd Biesheuvel2017-11-273-115/+0
| | | | | | | | | | | | | | | | | | | The PrePi code we inherited from ArmPlatformPkg contains a rather obscure optimization, where entry points of the PE/COFF and LZMA handling routines are recorded in special HOBs, allowing DXE core to call into that code directly rather than carry its own copy of these libraries. Given that no ArmVirtPkg platforms actually include the library resolutions* that take advantage of these optimizations, let's not bother with them, and remove the associated code. * EmbeddedPkg/Library/LzmaHobCustomDecompressLib/LzmaHobCustomDecompressLib.inf EmbeddedPkg/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: remove ArmPlatformLib implementationsArd Biesheuvel2017-11-2320-1687/+0
| | | | | | | | These libraries are no longer used, so remove them from the tree. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/ArmVirtMemoryInitPeiLib: move to ArmVirtMemInfoLibArd Biesheuvel2017-11-233-4/+5
| | | | | | | | | Move to the new ArmVirtMemInfoLib library to retrieve DRAM information from the platform, so that we can phase out ArmPlatformLib going forward. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: create QemuVirtMemInfoLib version for ArmVirtQemuArd Biesheuvel2017-11-233-0/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QemuVirtMemInfoLib ArmVirtMemInfoLib implementation created for ArmVirtQemuKernel does exactly what we need for ArmVirtQemu, the only difference being that the latter is PrePeiCore based, and so it uses a different method to ensure that PcdSystemMemorySize is set when ArmVirtGetMemoryMap() is called. On ArmVirtQemu, we currently abuse the implied ordering guarantees provided by ArmPlatformLib, by implementing this as follows: ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf [ArmVirtPkg/ArmVirtQemu.dsc] InitializeMemory() [ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c] ArmPlatformInitializeSystemMemory() [ArmVirtPkg/Library/ArmVirtPlatformLib/Virt.c] // // set PcdSystemMemorySize from the DT // MemoryPeim() [ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c] InitMmu() [ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c] ArmPlatformGetVirtualMemoryMap() [ArmVirtPkg/Library/ArmVirtPlatformLib/VirtMem.c] // // consume PcdSystemMemorySize // Given that we are trying to get rid of ArmPlatformLib, or at least remove some of these API functions that are never used for their original purpose by any platforms, we need to move the PCD assignment elsewhere. So create a PEIM-only version of QemuVirtMemInfoLib especially for ArmVirtQemu, and add the PCD assignment code to its constructor. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/ArmVirtQemu: add ArmVirtMemInfoLib implementationArd Biesheuvel2017-11-235-0/+218
| | | | | | | | | | | | | | | | | | | Create a new ArmVirtMemInfoLib for ArmVirtQemuKernel by cloning the existing ArmPlatformGetVirtualMemoryMap () for this platform, (ArmQemuRelocatablePlatformLib *not* ArmVirtPlatformLib), and cleaning it up: - remove support for uncached DRAM mappings - replace EFI_D_xxx with DEBUG_xxx throughout - use a temp variable to hold the top of the physical address space - use AllocatePool () instead of AllocatePages (), given that we use 160 bytes only, and the memory is never freed. In a future patch, we will add this library to the ordinary ArmVirtQemu platform as well. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/ArmVirtXen: add ArmVirtMemInfoLib implementationArd Biesheuvel2017-11-235-0/+168
| | | | | | | | | | | | Clone the existing ArmPlatformGetVirtualMemoryMap () for this platform, clean it up slightly (by using a static buffer rather than a heap allocation, and removing the support for uncached DRAM mappings), and turn it into a new ArmVirtMemInfoLib implementation. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Julien Grall <julien.grall@linaro.org>
* ArmVirtPkg: introduce ArmVirtMemInfoLib library classArd Biesheuvel2017-11-232-0/+44
| | | | | | | | | | | | | 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/ArmVirtPlatformLib: remove support for uncached mappingsArd Biesheuvel2017-11-231-13/+2
| | | | | | | | | | QEMU/KVM has very little tolerance for using anything except writeback cacheable mappings of DRAM, so let's remove the 'feature' that allows us to select uncached mappings at build time. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/PrePi: remove bogus IntelFrameworkModulePkg.dec dependencyArd Biesheuvel2017-11-231-1/+0
| | | | | | | | | PrePi doesn't use anything defined by this package so drop the bogus dependency. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/PrePi: remove ArmPlatformStackLib dependencyArd Biesheuvel2017-11-234-26/+4
| | | | | | | | | | | ArmPlatformStackLib has hooks into primary/secondary core PCDs and other ArmPlatformLib related junk, so let's simply set the stack pointer directly. This is trivial given that our PrePi is unicore only. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/PrePi: remove dependency on ArmPlatformLibArd Biesheuvel2017-11-233-6/+2
| | | | | | | | | Remove the pointless dependency on ArmPlatformLib: none of the code we call from it actually does anything useful. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/PrePi: move DRAM discovery code into PrePiArd Biesheuvel2017-11-234-2/+238
| | | | | | | | | | | | | ArmVirtQemuKernel and ArmVirtXen use essentially the same code to retrieve DRAM information from the DT /memory node at early boot, and invoke it via the ArmPlatformPeiBootAction () hook exposed by ArmPlatformLib. Let's move this code into the PrePi implementation these platforms share between them (and not with any other platforms) so we can eliminate another dependency on the messy ArmPlatformLib. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/PrePi: remove bogus primary core checkArd Biesheuvel2017-11-232-14/+0
| | | | | | | | | | | | QEMU and KVM based ARM/AARCH64 virtual machines only enter UEFI on a single core, so ArmPlatformIsPrimaryCore() always returns true. And even if it didn't, our code does absolutely nothing meaningful based on its return value, so don't bother calling it, and remove another frivolous dependency on ArmPlatformLib. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/PrePi: remove unused GetPlatformPpi() functionArd Biesheuvel2017-11-232-30/+0
| | | | | | | | Remove GetPlatformPpi() from PrePi: it is not used anywhere. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/PrePi: run all library constructors by handArd Biesheuvel2017-11-231-10/+3
| | | | | | | | | | Instead of invoking the library constructors of some libraries by hand, invoke the generated function ProcessLibraryConstructorList in AutoGen.c so all constructors are executed. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: switch to new PL011UartLib implementationArd Biesheuvel2017-11-173-5/+3
| | | | | | | | | | Switch to the new, cleaned up PL011UartLib implementation so we will be able to remove the old one. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: remove ArmPlatformSysConfigLib dependencyArd Biesheuvel2017-11-1611-59/+6
| | | | | | | | | | | | | Now that the PL031 RTC driver library no longer depends on the ARM platform specific ArmPlatformSysConfigLib, we no longer need to implement ArmPlatform.h or have a resolution for that library. This allows us to get rid of a rather dodgy practice of including platform headers using compiler flags, which is a bad idea at various levels. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/ArmVirtQemu: use non-accelerated CopyMem for VariableRuntimeDxeArd Biesheuvel2017-11-162-0/+4
| | | | | | | | | | | | | | | | | | | | | | | The VariableRuntimeDxe driver may use CopyMem () on NOR flash regions, assuming such regions always have full memory semantics. Given that those regions cannot be mapped as ordinary memory on ARM (due to the fact that the NOR flash requires device semantics while in write mode) this prevents us from using BaseMemoryLibOptDxe in VariableRuntimeDxe, since it may use unaligned accesses and/or DC ZVA instructions, both of which are incompatible with mappings using device semantics. Note that there is no way we can work around this by changing the mapping type between 'memory' and 'device' when switching from read to write mode and back, because the runtime mapping is created by the OS, and cannot be changed at will. So let's just switch to the unaccelerated version of BaseMemoryLib which does not have the same problem. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Shannon Zhao <zhaoshenglong@huawei.com>
* ArmVirtPkg ArmVirtDxeHobLib: Implement BuildFv3HobStar Zeng2017-10-101-1/+35
| | | | | | | | | Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/ArmVirtQemu: include UsbMassStorageDxeLaszlo Ersek2017-09-123-0/+3
| | | | | | | | | This is needed for recognizing QEMU's "usb-storage" device model. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg/ArmVirtQemu: port HTTP_BOOT_ENABLE from OvmfPkgLaszlo Ersek2017-09-123-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * From commit ab44a6e833fa ("OvmfPkg: Add HttpBoot support", 2015-08-23): - introduce HTTP_BOOT_ENABLE build define - resolve HttpLib class - include NetworkPkg drivers DnsDxe, HttpDxe, HttpBootDxe * From commit 1a85139d9eac ("OvmfPkg: Build HTTP utilities driver", 2015-08-28): - include NetworkPkg driver HttpUtilitiesDxe * From commit 4b2fb7986d57 ("OvmfPkg: Allow HTTP connections if HTTP Boot enabled", 2017-01-19): - set PcdAllowHttpConnections to TRUE > ## Indicates whether HTTP connections (i.e., unsecured) are permitted or > ## not. > # TRUE - HTTP connections are allowed. Both the "https://" and > # "http://" URI schemes are permitted. > # FALSE - HTTP connections are denied. Only the "https://" URI scheme is > # permitted. > # @Prompt Indicates whether HTTP connections are permitted or not. > gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|FALSE|BOOLEAN|... TLS_ENABLE (for HTTPS) is not ported for the time being. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg: don't build the network stack uselessly for XenLaszlo Ersek2017-09-123-15/+30
| | | | | | | | | | | | | | | | | "ArmVirtXen.fdf" pulls in none of the drivers from "MdeModulePkg/Universal/Network", therefore building them in "ArmVirtXen.dsc", via "ArmVirt.dsc.inc", is wasted work. Move the "MdeModulePkg/Universal/Network" drivers from "ArmVirt.dsc.inc" to "ArmVirtQemu.dsc" and "ArmVirtQemuKernel.dsc". Place the new block between the "Bds" and "SCSI Bus and Disk Driver" blocks, similarly to its context in "ArmVirtQemuFvMain.fdf.inc". Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg: Enable UDF file system supportPaulo Alcantara2017-09-085-4/+9
| | | | | | | | | | | | This patch enables UDF file system support by default. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Paulo Alcantara <pcacjr@zytor.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* ArmVirtPkg: remove DmaLib library class resolutionArd Biesheuvel2017-08-301-1/+0
| | | | | | | | | | The virt targets never use non-coherent DMA, so there is no point in having a shared DmaLib library class resolution pointing to ArmDmaLib. So drop it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: drop unused Pcds from ArmVirt.dsc.incLeif Lindholm2017-08-241-12/+0
| | | | | | | | | | A block of settings has been copied around ARM platforms for years. These are consumed only by Ebl, and since none of the ArmVirtPkg platforms use that, drop them. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg: remove QemuVideoDxe from ArmVirtQemu and ArmVirtQemuKernelArd Biesheuvel2017-08-243-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One of the reasons for introducing virtio-gpu support to OvmfPkg and ArmVirtpkg was the fact that under KVM virtualization on ARM, the legacy VGA cannot be used reliably. This is due to an implementation detail of QEMU+KVM, which remaps cached host memory into the guest address space as a framebuffer behind a PCI BAR. Given that the purpose of a memory mapped framebuffer is its side effects, such BARs should never be mapped cacheable in the guest, and the mismatched attributes between host and guest result in a loss of coherency, visible as corruption in the framebuffer image. This issue does not occur under TCG emulation, nor did we expect it to actually bring down the guest under KVM, and so it was deemed harmless to keep support for the VGA device as well. However, as it turns out, the fact that the framebuffer BAR is mapped using device semantics by default may result in unalignment faults when we use the ordinary string copy routines on the contents. In theory, we could work around this by remapping the BAR as write combining, but it appears the generic PCI bus driver does not actually implement this. So let's remove the QemuVideoDxe driver altogether. This may result in loss of functionality for use cases that rely on the framebuffer to be directly addressable (such as EFIFB), but given that this never worked reliably under KVM in the first place, let's not let that stop us from dropping support for it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmVirtPkg/FdtPL011SerialPortLib: call PL011UartLib in all SerialPortLib APIsLaszlo Ersek2017-08-171-3/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the SerialDxe change in commit 4cf3f37c87ba ("MdeModulePkg SerialDxe: Process timeout consistently in SerialRead", 2017-07-18), setting EFI_SERIAL_INPUT_BUFFER_EMPTY in the "Control" output parameter, in the GetControl() SerialPortLib function, is no longer a "small optimization". Namely, due to the SerialDxe change, the GetOneKeyFromSerial() call in TerminalDxe's TerminalConInTimerHandler() can take very long if the input queue is empty, even if GetOneKeyFromSerial()'s return value causes the loop to be exited right after, in the first iteration. This issue causes a boot hang in ArmVirtQemu: with the input queue empty, TerminalConInTimerHandler() takes so long to return that, by the time it returns, there's another execution queued already (due to the associated timer event being signaled meanwhile). The boot process is stuck in the timer event handler. Therefore even the first GetOneKeyFromSerial() iteration must be prevented in TerminalConInTimerHandler() if the input queue is empty, and that requires implementing GetControl() for real. Implement the SetAttributes(), SetControl() and GetControl() APIs (of SerialPortExtLib origin) in FdtPL011SerialPortLib with calls to matching PL011UartLib functions. This follows the example of "ArmPlatformPkg/Library/PL011SerialPortLib" and also matches Star's original idea under [1]. The patch can be considered a continuation of commit ad7f6bc2e116 ("ArmVirtPkg: Use SerialDxe in MdeModulePkg instead of EmbeddedPkg", 2015-11-26), based on the mailing list threads [1] [2] [3]. [1] http://mid.mail-archive.com/1447752930-32880-12-git-send-email-star.zeng@intel.com [2] http://mid.mail-archive.com/1448243067-1880-12-git-send-email-star.zeng@intel.com [3] http://mid.mail-archive.com/b748580c-cb51-32c9-acf9-780841ef15da@redhat.com Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Heyi Guo <guoheyi@huawei.com> Cc: Star Zeng <star.zeng@intel.com> Originally-suggested-by: Star Zeng <star.zeng@intel.com> Reported-by: Brijesh Singh <brijesh.singh@amd.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Brijesh Singh <brijesh.singh@amd.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* edk2: Move License.txt file to rootMichael D Kinney2017-08-031-29/+0
| | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=642 Add top level License.txt file with the BSD 2-Clause License that is used by the majority of the EKD II open source project content. Merge copyright statements from the BSD 2-Clause License files in each package directory and remove the duplication License.txt file from package directories. Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Andrew Fish <afish@apple.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* edk2: Move TianoCore Contribution Agreement to rootMichael D Kinney2017-08-031-218/+0
| | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=629 Move Contributions.txt that contains the TianoCore Contribution Agreement 1.0 to the root of the edk2 repository and remove the duplicate Contributions.txt files from all packages. Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Andrew Fish <afish@apple.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>