Commit Graph

25 Commits

Author SHA1 Message Date
Ard Biesheuvel 9940a80492 ArmVirtPkg: ArmVirtQemuKernel: make ACPI support AARCH64 only
The reasoning of patch 8e2efec6b206:

  No ARM support for ACPI is planned under any OS we intend to run under
  ArmVirtQemu-ARM, so remove the drivers from the ARM build.

applies equally to ArmVirtQemuKernel, so apply the same change there.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2016-07-12 15:19:42 +02:00
Ard Biesheuvel 5db1cce145 ArmPkg ArmVirtPkg MdeModulePkg: switch to separate ArmMmuLib
Switch all users of ArmLib that depend on the MMU routines to the new,
separate ArmMmuLib. This needs to occur in one go, since the MMU
routines are removed from ArmLib build at the same time, to prevent
conflicting symbols.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
2016-07-07 14:33:47 +02:00
Bruce Cran 9852838576 ArmVirtPkg: Re-add the Driver Health Manager
The Driver Health HII menu is not an integral part of the MdeModulePkg BDS
driver / UI app. Because we abandoned the IntelFrameworkModulePkg BDS in
the QEMU builds, now we have to get the same functionality explicitly from
DriverHealthManagerDxe.

Suggested-by: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Bruce Cran <bruce@cran.org.uk>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
[lersek@redhat.com: update commit message, drop Xen changes]
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
2016-06-28 23:23:05 +02:00
Ard Biesheuvel bf57a42a0e ArmVirtPkg: add FDF definition for empty varstore
Similar to how OVMF implements this, add a FD definition for the varstore
firmware volume and the FTW areas. The template was taken from the file
OvmfPkg/VarStore.fdf.inc, and subsequently modified to accommodate the
differences in NOR flash layout. This affects the FvLength, Checksum and
BlockMap[0] fields in the FV header, the Size field of the varstore header,
and the Crc and WriteQueueSize fields of the FTW header. The event log
region is not used by ArmVirtQemu, so it has been omitted.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2016-06-23 16:07:38 +02:00
Ard Biesheuvel 1469619378 ArmVirtPkg/ArmVirtQemu: switch secure boot build to NorFlashDxe
There is no longer a reason to use a different implementation of
NorFlashDxe for secure boot builds now that the varstore FV header can
carry either gEfiVariableGuid or gEfiAuthenticatedVariableGuid, and the
dependent code has been updated to deal with that. So move the secure
boot capable builds to the common NorFlashDxe.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2016-06-22 16:52:40 +02:00
Laszlo Ersek 2c8805bc95 ArmVirtPkg/PlatformBootManagerLib: rebase boot logo display to BootLogoLib
In the course of porting ArmVirtPkg to the MdeModulePkg BDS, commit
1f73aef50c

  ArmVirtPkg/PlatformBootManagerLib: add EnableQuietBoot & DisableQuietBoot

open-coded the EnableQuietBoot() function (and its dependencies / friends)
from IntelFrameworkModulePkg BDS.

This code duplication can be avoided; the functionality is available from
the following three libraries in MdeModulePkg:

- BootLogoLib: provides the BootLogoEnableLogo() function. It does not
  provide the internal ConvertBmpToGopBlt() function -- that one is
  delegated to ImageDecoderLib (function DecodeImage()).

- ImageDecoderLib: a general library that registers decoder plugins for
  specific image formats, and provides the generic DecodeImage() on top.

- BmpImageDecoderLib: one of said decoder plugins, for handling BMP images
  (which is the format of our logo).

In this patch, we revert 1f73aef50c, and atomically incorporate the
above libraries. This is inspired by Nt32Pkg commit 859e75c4fc42:

  Nt32Pkg: Use BootLogoLib for logo and progress bar drawing.

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: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2016-06-06 17:06:49 +02:00
Laszlo Ersek d85c5e31ed OvmfPkg, ArmVirtPkg: rename QemuNewBootOrderLib to QemuBootOrderLib
This completes the transition to the new BDS.

The FILE_GUID in "QemuBootOrderLib.inf" is intentionally not changed.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Gary Ching-Pang Lin <glin@suse.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
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>
2016-05-25 12:25:28 +02:00
Linn Crosetto 2d063646b9 ArmVirtPkg: set PcdMaxVariableSize and PcdMaxAuthVariableSize
To support UEFI Secure Boot and the Linux persistent store with UEFI
variables, set PcdMaxVariableSize to 0x2000 bytes as is done in OvmfPkg.
For reference, the related Ovmf commits: 8cee3de7 2d441ca9

Also increase the maximum size for Authenticated variables in order to
handle a larger Signature List size as is done in OvmfPkg. Related Ovmf
commit: f5404a3e

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Linn Crosetto <linn@hpe.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2016-05-10 20:32:26 +02:00
Laszlo Ersek 1946faa710 ArmVirtPkg/ArmVirtQemu: use MdeModulePkg/BDS
Based on OvmfPkg commit 79c098b6d2.

Unlike in OVMF, no USE_OLD_BDS fallback is introduced; I think that
ArmVirtPkg is less widely used by non-developers than OvmfPkg.

ArmVirtXen is not modified, as it uses PlatformIntelBdsLib from
ArmPlatformPkg.

About this patch:

- DxeServicesLib and SortLib are resolved generally (they have broad
  client module type lists).

- ReportStatusCodeLib is resolved for UEFI_APPLICATION modules.

- GenericBdsLib and PlatformBdsLib are replaced with UefiBootManagerLib
  and PlatformBootManagerLib, and resolved from under MdeModulePkg and
  ArmVirtPkg, respectively.

- QemuBootOrderLib is pointed to the QemuNewBootOrderLib instance.

- FileExplorerLib no longer depends on SECURE_BOOT_ENABLE, it is nedeed by
  BootMaintenanceManagerUiLib, which we link into UiApp.

- PcdBootManagerMenuFile carries the FILE_GUID of
  "MdeModulePkg/Application/UiApp/UiApp.inf". The default PCD value from
  "MdeModulePkg/MdeModulePkg.dec" points to
  "MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf",
  which, according to the commit that introduced it (a382952f82), only
  'provides a very simple UI showing all the boot options recorded by
  "BootOrder" and user can select any of them to boot'.

- Include the new core BDS driver, and include the boot manager
  application, with the usual main menu entries.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Fixes: https://github.com/tianocore/edk2/issues/83
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: Ruiyu Ni <ruiyu.ni@Intel.com>
2016-05-06 10:04:50 +02:00
Laszlo Ersek 48799ab2d9 ArmVirtPkg/PlatformBootManagerLib: don't launch the Boot Manager Menu
MdeModulePkg/BDS doesn't launch the UI (Boot Manager Menu) from the
platform side. The platform is expected to store the boot timeout only, in
PcdPlatformBootTimeOut. This is usually done in
PlatformBootManagerBeforeConsole().

(ArmVirtXen is not modified, as it uses PlatformIntelBdsLib from
ArmPlatformPkg, not ArmVirtPkg.)

The patch parallels OvmfPkg commit 8dc0f0a6aa.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
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: Ruiyu Ni <ruiyu.ni@Intel.com>
2016-05-06 10:04:49 +02:00
Ard Biesheuvel 57b6122f99 ArmVirtPkg/VirtFdtDxe: remove Xenio handling and rename to VirtioFdtDxe
Now that we have moved the handling of the xen,xen DT node to XenioFdtDxe,
remove its handling from VirtFdtDxe. Since the only functionality that
remains is handling the virtio,mmio DT node, rename VirtFdtDxe to
VirtioFdtDxe to reflect that. Also update the platforms that use this
driver.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2016-04-13 17:26:07 +02:00
Ard Biesheuvel 7fba5299eb ArmVirtPkg: move QEMU based platforms to ArmVirtPL031FdtClientLib
This moves QEMU based platforms to ArmVirtPL031FdtClientLib, so that we no
longer have to rely on VirtFdtDxe to execute first and set the PL031 base
address in a dynamic PCD.

The only driver which [transitively] depends on this PcdPL031RtcBase PCD is
EmbeddedPkg/RealTimeClockRuntimeDxe, so this conversion cannot affect any
other users and is thus safe.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2016-04-13 17:25:37 +02:00
Ard Biesheuvel ffea0a2ce2 ArmVirtPkg/VirtFdtDxe: drop PCI host bridge handling
Now that the PCI host bridge driver parses the DT node that describes
the PCI host bridge directly via the FDT client protocol, we can drop the
handling from VirtFdtDxe completely.

This means some PCI related PCDs are no longer set, such as PcdPciBusMin,
PcdPciBusMax, PcdPciIoBase, PcdPciIoSize, PcdPciIoTranslation,
PcdPciMmio32Base and PcdPciMmio32Size. Since these PCDs are specific to
ARM (and declared in ArmPlatformPkg), and not used anywhere else by the
ArmVirtPkg platforms, we can simply stop populating them, and drop all
references to them.

It also means that we can no longer rely on PcdPciDisableBusEnumeration
to be set before it is consumed by PciBusDxe and QemuFwCfgAcpiPlatformDxe,
so make those depend on FdtPciPcdProducerLib explicitly via NULL library
class resolution.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2016-04-12 18:26:47 +02:00
Ard Biesheuvel a06d0bb58e ArmVirtPkg/BaseCachingPciExpressLib: depend on PciPcdProducerLib
Make BaseCachingPciExpressLib depend on PciPcdProducerLib, so that we
have a chance to populate PcdPciExpressBaseAddress based on the contents
of the device tree.

Also update the platforms under ArmVirtPkg that support PCI to use the
special MAX_UINT64 value as the build time default for
PcdPciExpressBaseAddress.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2016-04-12 16:57:20 +02:00
Ard Biesheuvel ba83f7e397 ArmVirtPkg/VirtFdtDxe: remove handling of fw_cfg DT node
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>
2016-04-12 11:07:36 +02:00
Ard Biesheuvel ffced38546 ArmVirtPkg: move TimerDxe to FDT client library
Move to the new dedicated ArmVirtTimerFdtClientLib to populate the
various timer related PCDs at driver load time rather than relying on
VirtFdtDxe to do it. Since ArmPkg/TimerDxe is the only consumer of these
PCDs, which is the DXE driver ArmVirtTimerFdtClientLib is intended to
complement, this conversion is guaranteed to be safe.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2016-04-11 18:12:22 +02:00
Ard Biesheuvel a372110b9f ArmVirtPkg/VirtFdtDxe: drop detection of PSCI method
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>
2016-04-11 18:12:21 +02:00
Ard Biesheuvel 6c6ac050d9 ArmVirtPkg/VirtFdtDxe: remove GIC discovery
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>
2016-04-11 18:12:21 +02:00
Ard Biesheuvel 44b9e6152e ArmVirtPkg: add FdtClientDxe to the ArmVirtPkg platforms
Add FdtClientDxe to the various platforms under ArmVirtPkg, so that the
drivers we will update to depend on the FDT client protocol in subsequent
patches will remain in working order.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2016-04-11 18:12:21 +02:00
Jordan Justen 42e3d9ebd3 ArmVirtPkg: Convert to build FatPkg from source
Now that FatPkg is open source (and therefore can be included in the
EDK II tree) we build and use it directly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2016-04-07 20:45:36 +02:00
Ard Biesheuvel 31b3b02aca ArmVirtPkg: drop dependency on DxePcdLib for DXE Pcd.inf
The PcdDxe dynamic PCD driver is dispatched explicitly via an 'A PRIORI'
declaration in the platform DSC. Without that declaration, the DXE driver
can never be dispatched since it transitively (via DxePcdLib) depends on
protocols it produces itself. So use the NULL PcdLib explicitly only for
this driver.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2016-04-07 18:16:24 +02:00
Ard Biesheuvel e008d2ff99 ArmVirtPkg: remove linux loader from ARM builds
The built in Linux loader was a temporary solution to boot ARM Linux
without EFI support in the OS. Now that EFI support is merged in the
upstream v4.5 release, we no longer need it. So drop it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2016-04-07 14:35:08 +02:00
Laszlo Ersek 3898f49228 ArmVirtPkg: include Virtio10Dxe from OvmfPkg
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>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-04-06 19:21:51 +02:00
Dandan Bi 2ff39d58e2 ArmVirtPkg: Add FileExplorerLib.inf to the QEMU dsc files
Because SecureBootConfigDxe use FileExplorerLib now, but
FileExplorerLib is not in the dsc files of the package
that use SecureBootConfigDxe. Now add it to pass build.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
2016-02-26 16:52:49 +08:00
Ard Biesheuvel 8de84d4242 ArmVirtPkg: implement ArmVirtQemuKernel
This implements a version of ArmVirtQemu that does not execute in place from
emulated NOR flash, but implements the Linux kernel boot protocol, and executes
from DRAM instead. This allows UEFI to be loaded as a payload by a previous
bootloader stage such as ARM Trusted Firmware/OP-TEE.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
2016-02-05 17:10:17 +01:00