Commit Graph

653 Commits

Author SHA1 Message Date
Star Zeng ad7a56e519 ArmPlatformPkg: Use the merged Variable driver
Remove gVariableAuthenticatedRuntimeDxeFileGuid definition in
ArmPlatformPkg.dec and use gVariableRuntimeDxeFileGuid in
NorFlashAuthenticatedDxe.inf as auth Variable driver in SecurityPkg
and Variable driver in MdeModulePkg have been merged.

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@17768 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01 03:10:01 +00:00
Star Zeng e860f74e5a ArmPlatformPkg: Add TpmMeasurementLib and AuthVariableLib library mapping
These library classes are now linked with
MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
to optionally support secure variables.

For ArmPlatformPkg, secure boot is not currently enabled,
so we map these libraries to the NULL versions that don't support secure variables.

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@17762 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01 03:06:39 +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
Olivier Martin b5ec7f3c32 ArmPlatformPkg/ArmJunoDxe: Fixed PCI Root bridge device path
The PCI Root bridge is defined by PciRoot(0x0)/Pci(0x0,0x0).

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@17528 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-27 15:12:25 +00:00
Heyi Guo 9507640c62 EmbeddedPkg: Fix Ebl dumpgcd bug with memory type and IO type
1. Data type for GcdMemoryType and GcdIoType is enumeration type
rather than bit field, so we need to use strict equation "=="
instead of bit-and "&";
2. Testing for GcdIoType should use EfiGcdIoType*** constants
rather than EfiGcdMemoryType***;
3. As we are going to use strict equation, it is clearer to use
switch-case than if-else.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
Reviewed-by: Olivier Martin <Olivier.Martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17527 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-27 15:11:19 +00:00
Olivier Martin 44a35695d0 ArmPlatformPkg/ArmJunoPkg/Madt.aslc: Added GIC MSI Frame Table
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@17524 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-27 15:07:55 +00:00
Olivier Martin e0ae276139 ArmPlatformPkg/ArmJunoPkg: ACPI PCI Support
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@17522 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-27 15:06:11 +00:00
Olivier Martin db1b9ea0b4 ArmPlaformPkg: Replaced gArmPlatformTokenSpaceGuid.PcdPlatformBootTimeOut
... since gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut has recently
been introduced.
 
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@17443 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-13 18:25:47 +00:00
Olivier Martin 439a53216b ArmPlatformPkg/ArmRealViewEb: Added FvSimpleFileSystemDxe
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@17442 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-13 18:24:45 +00:00
Olivier Martin b51cffe12f ArmPlatformPkg/Bds: Clarify assert message with debug information
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@17439 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-13 18:20:58 +00:00
Olivier Martin 30cfc3d0ee ArmPlatformPkg/ArmJunoDxe: Fix build
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@17420 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-12 10:42:46 +00:00
Olivier Martin ad7d95ea48 ArmPlatformPkg/ArmJunoPkg: Only enable PCI support on Juno R1
PCI support is only present on Juno R1.

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@17415 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-11 17:53:20 +00:00
Olivier Martin 1bb1f35f2e ArmPlatformPkg/ArmJunoPkg: Enable PCI and SATA support
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@17414 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-11 17:52:03 +00:00
Olivier Martin 4595449b3e ArmPlatformPkg/ArmJunoPkg: Added PCI support
Added driver for the Juno R1 root complex.

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@17412 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-11 17:48:39 +00:00
Olivier Martin f66eab9b9c ArmPlatformPkg/ArmVExpressPkg: Fixed line endings to be CRLF
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@17411 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-11 17:39:56 +00:00
Ard Biesheuvel 459823d9b2 ArmPkg: update BdsLib to updated definition of EFI_LOAD_OPTION
Since there is now a formal definition of EFI_LOAD_OPTION, we can no
longer typedef it as a UINT8*. So update the code to use the common
definition, which is not a pointer type, hence the additional changes
to the C code.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
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@17410 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-11 17:37:24 +00:00
Olivier Martin c8ed578786 ArmPlatformPkg/ArmVExpressDxe: Fixed build after changing ARM_VEXPRESS_PLATFORM struct
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@17409 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-11 17:36:09 +00:00
Ard Biesheuvel ee171cce9b ArmVExpressPkg: restrict ArmVExpressSysConfigLib to SEC and DXE_DRIVER
Since ArmVExpressSysConfigLib cannot be supported at runtime, restrict
its use to the types of modules that are currently using it legally.

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@17382 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-08 12:08:24 +00:00
Ard Biesheuvel c889bf28ca ArmVExpressPkg: avoid the use of ArmVExpressSysConfigLib at runtime
The ArmVExpressSysConfigLib library does not (and cannot) runtime
remap its MMIO registers, so use a NULL implementation of the
ArmPlatformSysConfigLib library class for DXE_RUNTIME_DRIVER
type modules.

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@17381 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-08 12:07:20 +00:00
Ard Biesheuvel 7b99da9b6d ArmVExpressPkg: use PSCI for system reset at runtime
Since the default EfiResetSystemLib for VExpress cannot be used at
runtime (due to the fact that its MMIO registers need to be owned
by the OS and so cannot be runtime remapped), instead use PSCI calls
into EL3 at runtime.

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@17380 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-08 12:06:09 +00:00
Ard Biesheuvel 0ee59fd7d0 ArmVExpressPkg: add support for embedding DTBs for AArch64 variants
If DTB_DIR=<path> is set during the build, incorporate DTBs from
that path for all AArch64 FVP platform variants so that they can
be loaded straight from the firmware image instead of from a file
system. This relieves a user of having to keep a DTB file with the
right name in the working directory of the model.

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@17360 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-07 15:40:31 +00:00
Ard Biesheuvel 35eabda773 ArmPlatformPkg: add support for FV embedded device tree blobs
This adds support to the ArmVExpressPkg platforms to load their
device tree binary from a Firmware Volume if one is found that
matches the current platform. If none is found, the existing
logic to find a FDT by name from a file system is retained as
a fallback.

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@17359 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-07 15:39:23 +00:00
Ard Biesheuvel 5af5259c43 ArmVExpressPkg: use named GUIDs for all VExpress variants
Instead of using open coded GUIDs, define them only once, and refer
to them by name everywhere else.

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@17358 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-07 15:38:25 +00:00
Ard Biesheuvel 80f882abd9 ArmVirtualizationPkg: Enable secure boot for ArmVirtualizationQemu
This adds all the required modules and library dependencies so that
the ArmVirtualizationQemu platform can be built with support for
UEFI Secure Boot. This support consists of the OpenSSL crypto
library (whose source needs to be downloaded separately), the
authenticated variable store, and authentication of executables
before launching them.

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@17356 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-07 15:22:31 +00:00
Ard Biesheuvel 6cf1269d95 ArmPlatformPkg: enable use of authenticated variables in NorFlashDxe
The NorFlashDxe uses an explicit 'BEFORE xxx' Depex declaration to
ensure that it is dispatched before VariableRuntimeDxe, and uses the
file GUID of the latter as 'xxx' explicitly to accomplish that.

However, when enabling UEFI Secure Boot, this breaks down since the
authenticated VariableRuntimeDxe is a completely separate driver, with
a different GUID. Also, the hardcoded dependency on gEfiVariableGuid,
which is not used under UEFI Secure Boot, needs to be factored out in
order to allow this driver to be used.

So clone NorFlashDxe.inf into NorFlashAuthenticatedDxe.inf, and fix
up the dependencies so they refer to gEfiAuthenticatedVariableGuid and
SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableRuntimeDxe.inf
instead.

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@17355 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-07 15:18:14 +00:00
Olivier Martin 2ff41466ef ArmPlatformPkg/ArmJunoDxe: Use different UID for PCI Emulation
We keep UID=0 for the 'real' PCI root complex on the Juno board.

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@17342 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-06 11:14:28 +00:00
Ruiyu Ni 66b43839b0 ArmPlatformPkg: Use the new PCDs defined in MdePkg and MdeModulePkg.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17324 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-06 04:44:43 +00:00
Olivier Martin c8ff082794 ArmPlatformPkg: Removed duplicate PCD settings
PcdOverridePlatformFdt was set with its default value.

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@17306 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-05 15:45:20 +00:00
Olivier Martin f066ab4e87 ArmPlatformPkg: Move the FDT platform driver at the end of the driver list
The Fdt platform driver has been moved at the end of the list
of the DXE/UEFI drivers to ensure the device drivers have been
dispatched prior to load the FDT platform driver.

For instance, if we want to load FDT from TFTP we must have
the ethernet driver to be already loaded.

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@17305 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-05 15:43:48 +00:00
Olivier Martin cc053ee6da ArmPkg/BdsLib: Exposed ShutdownUefiBootServices() in the BdsLib interface
Other libraries/modules could use it (eg: EFI Shell command `runaxf`).

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@17297 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-05 14:58:57 +00:00
Olivier Martin b330087bab ArmPlatformPkg/Scripts/Makefile: Added support to automatically update the FIP
Some ARM development platforms use ARM Trusted Firmware to boot.
ARM Trusted Firmware encapsulates UEFI into the FIP (Firmware
Image Package) binary.
This change allows to update the FIP binary after building UEFI.

Example to build UEFI for FVP Base model:
$ make -f ArmPlatformPkg/Scripts/Makefile \
   EDK2_DSC=ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc \
   EDK2_ARCH=AARCH64 EDK2_TOOLCHAIN=GCC49 \
   FIP_BIN=~/arm-trusted-firmware/build/fvp/release/fip.bin

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@17296 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-05 14:56:51 +00:00
Ard Biesheuvel c9e5618f84 ArmVirtualizationPkg: Xen: shuffle init order to deal with incoherency
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-14 11:56:56 +00:00
Ard Biesheuvel e1d5299099 ArmVirtualizationPkg: invalidate PEI memory region by VA
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-14 11:55:42 +00:00
Ard Biesheuvel d94a48c71a ArmPlatformPkg: do not fulfil MemoryInitPeiLib dependency directly via .c file
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-14 11:52:55 +00:00
Ard Biesheuvel 15f7a89f77 ArmVirtualizationPkg: make ArmVirtualizationMemoryInitPeiLib the default
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-14 11:51:38 +00:00
Olivier Martin 9435a57e51 ArmPlatformPkg: Use LzmaDecompress support from MdeModulePkg
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-08 19:58:50 +00:00
Olivier Martin 8debfa0c45 ArmPlatformPkg/ArmJunoDxe: Fixed returned value
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-01 14:50:04 +00:00
Olivier Martin 372865e1cd ArmPlatformPkg/ArmJunoPkg/ArmJuno.dec: Update Juno R0 Device Tree default name
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-01 14:49:18 +00:00
Olivier Martin 1667d2e1d5 ArmJunoPkg: Upate Juno R1 Device Tree names to be 8 characters long
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-01 14:48:03 +00:00
Ronald Cron c1fee786c1 ArmPlatformPkg/ArmJunoDxe: Add PCI GBE MAC address to Juno R1 boot options
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-01 14:46:52 +00:00
Olivier Martin 58bc40654e ArmPlatformPkg/ArmXenRelocatablePlatformLib: Replaced tabulation by spaces
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-01 11:21:10 +00:00
Olivier Martin df22e1fd50 ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe: Removed unreachable 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-01 11:20:05 +00:00
Olivier Martin d1c561f9d3 ArmPlatformPkg/ArmVirtualizationPkg: Removed trailing spaces
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-04-01 11:18:56 +00:00
Ard Biesheuvel 3a2b37f0d4 ArmPlatformPkg: fix two instances of FreePool () on NULL value
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-27 17:27:24 +00:00
Laszlo Ersek eee326024e ArmVirtualizationPkg/ArmVirtualizationQemu: include XHCI driver
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-16 19:57:06 +00:00
Laszlo Ersek da1ce6f886 ArmVirtualizationPkg: build UEFI shell from source
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-16 19:56:54 +00:00
Laszlo Ersek df040c00ae OvmfPkg, ArmVirtualizationPkg: clean up XenHypercallLib names
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-03 08:13:09 +00:00
Laszlo Ersek d301991cbc ArmVirtualizationPkg: expose debug message bitmask on build command line
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-02 16:19:41 +00:00
Laszlo Ersek 7602900aba ArmVirtualizationPkg: PlatformIntelBdsLib: lack of QEMU kernel is no error
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-02 16:19:36 +00:00
Laszlo Ersek 3d5cf3726e ArmPlatformPkg: PEIM startup is not an error
"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-03-02 16:19:32 +00:00