Commit Graph

33 Commits

Author SHA1 Message Date
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
Ard Biesheuvel 31583f9a8b ArmVirtPkg: drop bogus ArmPlatformSecExtraActionLib resolution
Nothing we use on any of the ArmVirtPkg platforms depends on the
ArmPlatformSecExtraActionLib library class, so drop the resolution
from ArmVirt.dsc.inc

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Suggested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2016-04-07 14:35:20 +02:00
Laszlo Ersek 6a238fa88f ArmVirtPkg: disable PcdHiiOsRuntimeSupport
Edk2 commit 8a45f80eda ("MdeModulePkg: Make HII configuration settings
available to OS runtime") implements the optional UEFI feature described
in "31.2.11.1 OS Runtime Utilization" in UEFI v2.6.

While this feature might show benefits down the road even in QEMU virtual
machines, at the moment it only presents drawbacks:
- it increases the EfiRuntimeServicesData footprint,
- it triggers HII compatibility problems between edk2 and external drivers
  unconditionally, even if the end-user is not interested in HII and/or in
  configuring said drivers (see
  <https://www.redhat.com/archives/vfio-users/2016-March/msg00153.html>
  and <http://thread.gmane.org/gmane.comp.bios.edk2.devel/9894> for an
  example).

While the feature was being introduced, popular demand for a controlling
Feature PCD rose (see
<http://thread.gmane.org/gmane.comp.bios.edk2.devel/7626>), which is why
we can set it now to FALSE.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2016-04-01 16:34:00 +02:00
Ard Biesheuvel 9fa5260311 ArmVirtPkg/ArmVirtQemu: move to ARM version of CpuExceptionHandlerLib
Change our resolution for the previously unused CpuExceptionHandlerLib
from the null implementation to the newly added implementation specific
to AARCH64 and ARM. This is needed since our CpuDxe will start using it
in a subsequent patch.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
2016-03-17 09:14:13 +01:00
Laszlo Ersek ba4bcd7ede ArmVirtPkg: sync log level comments to DebugLib.h
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>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-03-02 06:47:25 +01:00
Ard Biesheuvel cd625ae90e ArmVirtPkg RVCT: build DXE_RUNTIME_DRIVER modules with 4 KB alignment
This adds the RVCT armlink command line switches to build modules of type
DXE_RUNTIME_DRIVER with 4 KB PE/COFF section alignment, allowing the OS
to apply stricter permissions to the .text and .data sections.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19237 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-14 07:56:19 +00:00
Ard Biesheuvel 2c96024436 ArmVirtPkg: add secure boot support to 32-bit ARM targets
Building the 32-bit ARM targets with secure boot enabled requires
a library resolution for the ArmSoftfloatLib dependency of
OpenSslLib. So provide one.

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>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19032 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-30 08:57:12 +00:00
Ard Biesheuvel 94904a8477 ArmVirtPkg: drop ArmPlatformGlobalVariableLib dependency
Now that all PeiServicesTablePointerLib and PrePiHobListPointerLib
library dependencies in both ArmVirtQemu and ArmVirtXen are satisfied
by implementations that do not depend on ArmPlatformGlobalVariableLib,
we can remove all mention of it from the various .dsc files.

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>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18986 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-27 17:05:47 +00:00
Ard Biesheuvel b761e8c2c5 ArmVirtPkg/ArmVirtQemu: move to ArmPkg version of PeiServicesTablePointerLib
As pointed out by Eugene, the ArmPlatformPkg implementation of
PeiServicesTablePointerLib violates the PI sec, since it uses
ArmPlatformGlobalVariableLib to store the PEI services table pointer
rather than the thread ID cpu registers as the spec requires.

So instead, move to the ArmPkg version of this library, which does
adhere to the PI spec.

Reported-by: Eugene Cohen <eugene@hp.com>
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>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18985 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-27 17:05:36 +00:00
Star Zeng ad7f6bc2e1 ArmVirtPkg: Use SerialDxe in MdeModulePkg instead of EmbeddedPkg
Beyond just changing the directly related lines in the FDF and DSC files,
we have to adapt the EarlyFdtPL011SerialPortLib and FdtPL011SerialPortLib
instances as well, in the same patch. This is because the EmbeddedPkg
driver expects the SerialPortSetAttributes(),
SerialPortSetControl() and SerialPortGetControl() functions from
SerialPortExtLib, while the MdeModulePkg driver expects them from
SerialPortLib itself.

We cannot implement these functions in ArmVirtPkg's SerialPortLib
instances *before* flipping the driver, because it would cause double
function definitions in the EmbeddedPkg driver. We also can't implement
the functions *after* flipping the driver, because it would cause
unresolved function references in the MdeModulePkg driver. Therefore
we have to implement the functions simultaneously with the driver
replacement.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18973 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-26 08:52:12 +00:00
Mark Rutland f813662589 ArmVirtPkg: include BaseStackCheckLib also for AARCH64
Some AArch64 toolchains also invoke the software stack checker
functions on certain code - so include BaseStackCheckLib for
AARCH64 as well as for ARM. Since this was the only difference
between [LibraryClasses.ARM] and [LibraryClasses.AARCH64],
merge the two into the existing [LibraryClasses.common].

At the same time, fix the grammar for the related comments.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18617 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-16 15:23:46 +00:00
Ard Biesheuvel 955b4946f9 ArmVirtPkg: use 4 KB section alignment for ARM DXE_RUNTIME_DRIVER modules
In order to support the Properties Table memory protection feature
on 32-bit ARM, build DXE_RUNTIME_DRIVER type binaries with 4 KB section
alignment by setting the common-page-size linker command line option.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Michael Zimmermann <sigmaepsilon92@gmail.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18566 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-01 14:01:16 +00:00
Laszlo Ersek 5236e09cde ArmVirtPkg: build the TFTP command into the UEFI shell
The TFTP command is easy to use, it has very nice documentation
(accessible with "HELP TFTP" in the shell), and it's a very versatile
tool for downloading files from the host to the guest, via virtual
network, while the guest is in the UEFI shell.

Even better, enabling this command in the shell increases the
uncompressed FVMAIN size only by 8192 bytes, in my AARCH64 build of
VirtArmQemu.dsc, and the final size increase (after LZMA compression)
that is visible in the FVMAIN_COMPACT volume is merely 1976 bytes.

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>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18555 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-25 17:23:03 +00:00
Ard Biesheuvel 2f71ad11d6 ArmVirtPkg: reduce preallocation of boot services data pages
Commit SVN r18503 ("MdeModulePkg DxeCore: Take the range in resource
HOB for PHIT as higher priority") changed the GCD init logic to take
the sum of the region sizes in gMemoryTypeInformation[] into account
when estimating the minimal amount of memory needed to boot the system.

Unfortunately, as an unintended side effect, this change results in boot
failures of ArmVirtQemu when running with QEMU's default memory size of
128 MB. The reason is that the sum of the gMemoryTypeInformation region
sizes plus the size of the inital PEI region exceeds 128 MB. Since we do
not actually need to preallocate 20,000 pages' worth of BootServicesData
memory, reduce this figure to the more reasonable 12,000.

Reported-by: Mark Rutland <mark.rutland@arm.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18533 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-22 15:50:30 +00:00
Ard Biesheuvel 5f6ed4681f ArmVirtPkg: set max physical address width to 40 bits
When executing on a LPAE capable 32-bit ARM platform, we support
up to 40 bits of physical address space so set PcdPrePiCpuMemorySize
accordingly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18428 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-09 14:48:41 +00:00
Ard Biesheuvel 218ea6c164 ArmVirtPkg: revert unintended change to ArmVirt.dsc.inc
The recent changes to ArmVExpress-FVP-AArch64 in SVN r18309
contained a hunk to ArmVirt.dsc.inc which was included in
error. So remove it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18321 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-26 12:09:39 +00:00
Ard Biesheuvel 0ad3e6d4a6 ArmPlatformPkg/FVP: unify support for Foundation and Base models
Now that the PL180 and PL111 drivers know how to behave when executed
on the Foundation model (which does not emulate the hardware), we can
remove the ARM_FOUNDATION_FVP ifdefs and produce a single build that
runs on both the Foundation model and the Base model.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18309 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-25 13:11:25 +00:00
Star Zeng 0bdbaadee1 ArmVirtPkg: Add VarCheckLib library mapping
Since Variable driver has been updated to consume the separated VarCheckLib.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18283 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-25 03:00:20 +00:00
Ard Biesheuvel 9038538b3c ArmVirtPkg/ArmVirtQemu: add LinuxLoader UEFI app to ARM build
The ARM build still needs an intermediate loader to boot Linux,
since ARM/Linux has no builtin UEFI boot stub (yet).

So add the LinuxLoader UEFI application to the FV, and enable
the FvSimpleFileSystemDxe driver so that we can invoke the
Linux loader from the shell, e.g.,

  Shell> linuxloader fs2:zImage -c console=ttyAMA0

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18155 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-04 18:41:45 +00:00
Ard Biesheuvel 1c51e601a0 ArmVirtPkg/ArmVirtQemu: drop ARM BDS and make Intel BDS the default
ARM BDS support in ArmVirtQemu has been broken since SVN r17969
("ArmPkg/BdsLib: Remove Linux loader from BdsLib") dated July 14th.

Instead of fixing this, let's get rid of the ARM BDS and LinuxLoader
altogether: they violate both the UEFI spec and the arm64 Linux boot
protocol, and lack the level of integration with the QEMU command
line that the Intel BDS has when running under ArmVirtPkg or OvmfPkg.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18153 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-04 18:41:19 +00:00
Ard Biesheuvel 5670dd5e99 ArmVirtPkg: move to unified GCC linker script
Move to the parametrised generic GCC linker script and set 64 KB
alignment, instead of using the AARCH64 specific incremental linker
script for 64 KB alignment which is about to be removed.

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: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18140 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-03 08:23:26 +00:00
Ard Biesheuvel 15c9b25e5d ArmVirtPkg: implement DT-based ArmGicArchLib
Since it is arguably incorrect to infer the GIC revision from CPU
ID and GIC feature registers on platforms that describe the GIC in
the device tree, this implements the library class ArmGicArchLib
tailored for such platforms.

The supported GIC revision is retrieved from the dynamic PCD that
is set based on the GIC DT node.

This means this library can only execute post DXE core, but this is
not a problem for any of the virt platforms.

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@18102 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-28 20:45:36 +00:00
Ard Biesheuvel 8d13298b80 ArmPkg: split off ArmGicArchLib from ArmGicLib
The current implementation of ArmGicGetSupportedArchRevision ()
that is used by all ARM platforms is entirely stateless (in order
to support being executed from flash) so it needs to interrogate
the hardware for the supported GIC revision upon each invocation.

However, this statelessness is only needed for SEC type modules;
in all other cases, we could easily determine the GIC revision once,
and store the result in a global variable.

In preparation of having separate early and normal versions, this patch
introduces the ArmGicArchLib library class and default implementation,
and moves the existing ArmGicGetSupportedArchRevision () into it.

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: 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@18098 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-28 20:44:44 +00:00
Jiaxin Wu a68a598f0c ArmVirtPkg: Remove Ip4ConfigDxe module from ArmVirtPkg
Ip4ConfigDxe driver is deprecated in UEFI 2.5, so we will not support original Ip4Config Protocol, 
which is replace by Ip4Config2 Protocol integrated in Ip4Dxe driver(git commit 1f6729ff (SVN r17853)).
Therefore we can remove Ip4ConfigDxe driver from this build.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17912 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-10 05:43:35 +00:00
Laszlo Ersek a51c1699c0 Add PCD for selecting terminal type at build time
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
2015-07-09 06:24:25 +00:00
Olivier Martin e109e3fec9 ArmVirtPkg/ArmVirt.dsc.inc: Fixed BuildOptions
The linker script is specific to GCC toolchain.
So, this script will not work with other linkers
(eg: ARM Toolchain Linker, Microsoft Linker, etc).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <Olivier.Martin@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17865 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-07 15:49:16 +00:00
Ard Biesheuvel 093b7c8769 ArmVirtPkg: build runtime drivers with 64 KB section alignment
This adds the 64 KB alignment overlay linker script to the linker
command line of DXE_RUNTIME_DRIVER modules. This makes these modules
compatible with the new Properties Table feature by aligning the .text
and .data sections to 64 KB.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-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@17825 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-06 15:58:00 +00:00
Jordan Justen 288ed59079 Revert tree to r17801
Revert r17802 "BaseTools: AArch64: use explicit linker scripts"
Revert r17803 "ArmVirtPkg: build runtime drivers with 64 KB section alignment"
Revert r17804 "IntelFrameworkModulePkg: AcpiS3SaveDxe: prepare for End-of-Dxe callback"
Revert r17805 "IntelFrameworkModulePkg: AcpiS3SaveDxe: call S3Ready() at End-of-Dxe"
Revert r17806 "OvmfPkg: AcpiS3SaveDxe: prepare for End-of-Dxe callback"

Requested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17807 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-02 07:23:33 +00:00
Ard Biesheuvel 226d10c357 ArmVirtPkg: build runtime drivers with 64 KB section alignment
This adds the 64 KB alignment overlay linker script to the linker
command line of DXE_RUNTIME_DRIVER modules. This makes these modules
compatible with the new Properties Table feature by aligning the .text
and .data sections to 64 KB.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17803 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-02 06:36:10 +00:00
Star Zeng 31c0338e93 ArmVirtPkg: Link AuthVariableLib for following merged variable driver deploy
AuthVariableLib and TpmMeasurementLib library classes are now linked with
MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
to optionally support secure variables.

For ArmVirtPkg,
link AuthVariableLib and DxeTpmMeasurementLib in SecurityPkg
when SECURE_BOOT_ENABLE = TRUE,
and link AuthVariableLibNull and TpmMeasurementLibNull in MdeModulePkg
when SECURE_BOOT_ENABLE = FALSE.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.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@17763 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01 03:07:02 +00:00
Ard Biesheuvel e0bb8ad944 ArmVirtPkg: increase memory preallocations for secure build
This is a followup to r17554 ("ArmVirtPkg: increase memory
preallocations to reduce region count") that increases the sizes
of the preallocated regions to account for the footprint of the
crypto and authentication libraries. This is only done if secure
boot is enabled at build time, to prevent imposing a larger minimum
RAM size on non-secure builds.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Olivier Martin <Olivier.Martin@arm.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17646 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-16 14:27:18 +00:00
Ard Biesheuvel c1993157bd ArmVirtPkg: increase memory preallocations to reduce region count
This updates the sizes of the preallocated regions so that the number
of distinct regions that exists is minimal at the time we exit boot
services.

For a typical run of the ArmVirtQemu platform, we get the following
utilization numbers:

  Reserved  :              4 Pages (16,384 Bytes)
  LoaderCode:            210 Pages (860,160 Bytes)
  LoaderData:              0 Pages (0 Bytes)
  BS_Code   :            355 Pages (1,454,080 Bytes)
  BS_Data   :          6,807 Pages (27,881,472 Bytes)
  RT_Code   :            112 Pages (458,752 Bytes)
  RT_Data   :            288 Pages (1,179,648 Bytes)
  ACPI_Recl :             32 Pages (131,072 Bytes)
  ACPI_NVS  :              0 Pages (0 Bytes)
  MMIO      :         16,385 Pages (67,112,960 Bytes)
  MMIO_Port :              0 Pages (0 Bytes)
  PalCode   :              0 Pages (0 Bytes)
  Available :        123,264 Pages (504,889,344 Bytes)
              --------------
Total Memory:            511 MB (536,854,528 Bytes)

Strangely enough, the allocation count of 20,000 pages for BS_Data
does not result in those regions being merged. For BS_Code, RT_Code
and RT_Data, the increased preallocation results in the following
reduction in the number of regions.

   0x000040000000-0x00004000ffff [Loader Data        |   |  |  |  |   |WB|WT|WC|UC]
-  0x000040010000-0x0000b66bbfff [Conventional Memory|   |  |  |  |   |WB|WT|WC|UC]
-  0x0000b66bc000-0x0000b66d0fff [Loader Data        |   |  |  |  |   |WB|WT|WC|UC]
-  0x0000b66d1000-0x0000b6f6bfff [Loader Code        |   |  |  |  |   |WB|WT|WC|UC]
-  0x0000b6f6c000-0x0000b6f6ffff [Reserved           |   |  |  |  |   |WB|WT|WC|UC]*
-  0x0000b6f70000-0x0000b6f8ffff [Runtime Code       |RUN|  |  |  |   |WB|WT|WC|UC]*
-  0x0000b6f90000-0x0000b6faffff [ACPI Reclaim Memory|   |  |  |  |   |WB|WT|WC|UC]*
-  0x0000b6fb0000-0x0000b6fcffff [Runtime Code       |RUN|  |  |  |   |WB|WT|WC|UC]*
-  0x0000b6fd0000-0x0000b701ffff [Runtime Data       |RUN|  |  |  |   |WB|WT|WC|UC]*
-  0x0000b7020000-0x0000b702ffff [Runtime Code       |RUN|  |  |  |   |WB|WT|WC|UC]*
-  0x0000b7030000-0x0000b70cffff [Runtime Data       |RUN|  |  |  |   |WB|WT|WC|UC]*
-  0x0000b70d0000-0x0000b70dffff [Runtime Code       |RUN|  |  |  |   |WB|WT|WC|UC]*
+  0x000040010000-0x0000b680bfff [Conventional Memory|   |  |  |  |   |WB|WT|WC|UC]
+  0x0000b680c000-0x0000b6820fff [Loader Data        |   |  |  |  |   |WB|WT|WC|UC]
+  0x0000b6821000-0x0000b70bbfff [Loader Code        |   |  |  |  |   |WB|WT|WC|UC]
+  0x0000b70bc000-0x0000b70bffff [Reserved           |   |  |  |  |   |WB|WT|WC|UC]*
+  0x0000b70c0000-0x0000b70dffff [ACPI Reclaim Memory|   |  |  |  |   |WB|WT|WC|UC]*
   0x0000b70e0000-0x0000b9f87fff [Conventional Memory|   |  |  |  |   |WB|WT|WC|UC]
   0x0000b9f88000-0x0000bb921fff [Boot Data          |   |  |  |  |   |WB|WT|WC|UC]
   0x0000bb922000-0x0000bb9bffff [Conventional Memory|   |  |  |  |   |WB|WT|WC|UC]
   0x0000bb9c0000-0x0000bbbb0fff [Boot Data          |   |  |  |  |   |WB|WT|WC|UC]
   0x0000bbbb1000-0x0000bbbeffff [Conventional Memory|   |  |  |  |   |WB|WT|WC|UC]
   0x0000bbbf0000-0x0000bbf1ffff [Boot Data          |   |  |  |  |   |WB|WT|WC|UC]
-  0x0000bbf20000-0x0000bedfffff [Conventional Memory|   |  |  |  |   |WB|WT|WC|UC]
-  0x0000bee00000-0x0000bf71ffff [Loader Data        |   |  |  |  |   |WB|WT|WC|UC]
-  0x0000bf720000-0x0000bf7ccfff [Conventional Memory|   |  |  |  |   |WB|WT|WC|UC]
-  0x0000bf7cd000-0x0000bf92ffff [Boot Code          |   |  |  |  |   |WB|WT|WC|UC]
-  0x0000bf930000-0x0000bf93ffff [Runtime Code       |RUN|  |  |  |   |WB|WT|WC|UC]*
-  0x0000bf940000-0x0000bf95ffff [Conventional Memory|   |  |  |  |   |WB|WT|WC|UC]
-  0x0000bf960000-0x0000bf97ffff [Runtime Data       |RUN|  |  |  |   |WB|WT|WC|UC]*
+  0x0000bbf20000-0x0000bebfffff [Conventional Memory|   |  |  |  |   |WB|WT|WC|UC]
+  0x0000bec00000-0x0000bf51ffff [Loader Data        |   |  |  |  |   |WB|WT|WC|UC]
+  0x0000bf520000-0x0000bf65cfff [Conventional Memory|   |  |  |  |   |WB|WT|WC|UC]
+  0x0000bf65d000-0x0000bf7bffff [Boot Code          |   |  |  |  |   |WB|WT|WC|UC]
+  0x0000bf7c0000-0x0000bf84ffff [Runtime Code       |RUN|  |  |  |   |WB|WT|WC|UC]*
+  0x0000bf850000-0x0000bf86ffff [Conventional Memory|   |  |  |  |   |WB|WT|WC|UC]
+  0x0000bf870000-0x0000bf97ffff [Runtime Data       |RUN|  |  |  |   |WB|WT|WC|UC]*
   0x0000bf980000-0x0000bf997fff [Conventional Memory|   |  |  |  |   |WB|WT|WC|UC]
   0x0000bf998000-0x0000bf99afff [Boot Data          |   |  |  |  |   |WB|WT|WC|UC]
   0x0000bf99b000-0x0000bf9aefff [Conventional Memory|   |  |  |  |   |WB|WT|WC|UC]

Contributed-under: TianoCore Contribution Agreement 1.0
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@17554 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-03 16:11:47 +00:00
Olivier Martin 7fbd1eb231 Renamed ArmPlatformPkg/ArmVirtualizationPkg into ArmVirtPkg
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
2015-05-29 13:50:43 +00:00