Commit Graph

795 Commits

Author SHA1 Message Date
Ard Biesheuvel 926059304e ArmPlatformPkg/ArmPlatformStackLib: switch to ASM_FUNC() asm macro
Annotate functions with ASM_FUNC() so that they are emitted into
separate sections.

While we're at it, replace some inefficient uses of LoadConstantToReg(),
and remove the workaround that was added to allow conditional branches
to functions with external linkage.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-08-11 13:25:06 +02:00
Ard Biesheuvel c17ae4cf8e ArmPlatformPkg/ArmPlatformLibNull: switch to ASM_FUNC() asm macro
Annotate functions with ASM_FUNC() so that they are emitted into
separate sections.

While we're at it, replace some inefficient uses of LoadConstantToReg()

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-08-11 13:25:05 +02:00
Ard Biesheuvel 04209b5354 ArmPlatformPkg/ArmVExpressPkg: switch to ASM_FUNC() asm macro
Annotate functions with ASM_FUNC() so that they are emitted into
separate sections.

While we're at it, replace some inefficient uses of LoadConstantToReg()

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-08-11 13:25:05 +02:00
Ard Biesheuvel 13dc7fa5a0 ArmPlatformPkg/PrePeiCore: switch to ASM_FUNC() asm macro
Annotate functions with ASM_FUNC() so that they are emitted into
separate sections.

While we're at it, replace some inefficient uses of LoadConstantToReg()

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-08-11 13:25:05 +02:00
Ard Biesheuvel d2fa09a134 ArmPlatformPkg/PrePi: switch to ASM_FUNC() asm macro
Annotate functions with ASM_FUNC() so that they are emitted into
separate sections.

While we're at it, replace some inefficient uses of LoadConstantToReg()

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-08-11 13:25:05 +02:00
Ard Biesheuvel a0f56915a0 ArmPlatformPkg/ArmJunoLib: switch to ASM_FUNC() asm macro
Annotate functions with ASM_FUNC() so that they are emitted into
separate sections.

While we're at it, replace some inefficient uses of LoadConstantToReg()

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-08-11 13:25:04 +02:00
Ard Biesheuvel 66edb631f8 ArmPlatformPkg RVCT: drop dependency on GCC macro library
The RVCT .asm files include AsmMacroIoLib.h only for the definition of
LoadConstantToReg (), which makes it tedious to make change to that file
without the risk of making the RVCT assembler unhappy. So simply replace
LoadConstantToReg() with mov32, which does the right thing in all cases.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-08-11 12:29:31 +02:00
Daniil Egranov afd6b28915 ArmPlatformPkg: change PcdBdsLinuxSupport default value
The built-in Linux Loader is obsolete and not included in most builds.
The patch sets the PcdBdsLinuxSupport default value to FALSE and prevents
ArmBds from looking for built-in Linux Loader by default and ASSERTing
when it cannot be found. Platforms which still using built-in loader have
to set this PCD in their platform description file.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daniil Egranov <daniil.egranov@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-08-04 14:32:19 +01:00
Jeremy Linton 58a4bff071 ArmPlatformPkg: Convert ArmJunoDxe to use common juno revision code
Now that the code to detect the Juno revision is in
the header go ahead and covert the ArmJunoDxe to use it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-07-28 15:29:35 +01:00
Jeremy Linton 7ac29b544f ArmPlatformPkg: break out juno revision detection
The code to detect what juno revision we are running on
is fairly small put it in a common header where it may be
used in a couple places.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-07-28 15:29:35 +01:00
Jeremy Linton 77d172b76d ArmPlatformPkg/ArmJuno: Correct AXI->PCIe translation comments
The AXI<->PCIe translation comments are out of date with
respect to the code. In the first case the AXI master port
is incorrectly called a slave. In the second case the the
translation direction indicated for the slave port is the
wrong direction.

Correct both of these comments to reflect what the code is
doing.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-07-14 15:26:49 +01:00
Jeremy Linton 162e789178 ArmPlatformPkg/ArmJuno: fix Juno PIO host bridge mapping
The Juno PIO mapping is 8M, so it should be using a 32-bit
PIO address translation. Further, PIO addresses should start
at 0 and be translated to/from the ARM MMIO region.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-07-14 15:26:29 +01:00
Evan Lloyd 0312b14df6 ArmPlatformPkg: Set Juno debug serial port defaults
Juno has several serial ports, one of which may be used for a remote
debug interface (e.g. gdb, WinDbg).  The debug serial port needs to
be distinct from that used for UEFI trace to prevent corruption of
debugger protocol messaging.
The UEFI spec requires that serial devices be initialised to default
settings. (11.8 Serial I/O Protocol - "The default attributes for all
UART-style serial device interfaces are: 115,200 baud, ..."
and 17.3.3 EFI Debugport Variable - "These defaults must be used in the
absence of a DEBUGPORT variable...")

This change adds initialization of the serial device reported in the
ACPI DBG2 table.  The initialisation is done early in the boot to allow
the possibility of remote debug of UEFI itself.

NOTE: This is functionally dependent on the DBG2 table being updated in
OpenPlatformPkg, but is required as a precursor to that change.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-07-07 17:55:34 +01: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
Ard Biesheuvel 3460c75dfe ArmPlatformPkg/NorFlashAuthenticatedDxe: remove this obsolete module
This module is now identical in functionality to NorFlashDxe, and is no
longer used, so remove it altogether.

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>
2016-06-22 16:52:41 +02:00
Ard Biesheuvel 8753858f84 ArmPlatformPkg/NorFlashDxe: accept both non-secure and secure varstore GUIDs
Now that the generic Variable Runtime DXE code no longer distinguishes
between gEfiVariableGuid and gEfiAuthenticatedVariableGuid in the varstore
FV header, we can relax the check in the NOR flash driver to accept either
GUID regardless of whether we are running a secure boot capable build or not.

This also means we can always use gEfiAuthenticatedVariableGuid when we
encounter an empty NOR flash that needs to be initialized before use. So
remove the mNorFlashVariableGuid global from the shared code and from both
versions of NorFlashDxe.inf. This essentially collapses the two drivers into
a single one, which means we can remove NorFlashAuthenticatedDxe entirely
in a subsequent patch.

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>
2016-06-22 16:52:40 +02:00
Evan Lloyd 16146b984d ArmPlatformPkg: Fix PL011 Glitches.
This change corrects 3 problems in the PL011 driver.
1. The TRM states "The UARTLCR_H, UARTIBRD, and UARTFBRD registers must
   not be changed:...when the UART is enabled"
2. The TRM (3.3.8) describes logic requiring the UART to be disabled and
   flushed before adjusting UARTCR.
3. Several redundant calls get made to PL011UartInitializePort, where
   the characteristics do not change, but updating the registers can
   cause glitches in the output stream.

The parameters are compared to the current state and no action taken if
no change of state is required.
Where an update is required, the specified logic is followed, and the
register updates only made when the UART is disabled.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
2016-06-15 16:17:10 +02:00
Evan Lloyd f63005282c ArmPlatformPkg: Add support to configure PL011 UART clock
On some platforms the UART clock is not the same for all the serial
ports. The PL011 driver must be capable of handling serial ports with
different clock rates, so must not rely on a PCD for the clock rate.

This patch allows the UART clock rate to be passed as a parameter
to PL011UartInitializePort(), which is called from the serial port
library. This patch also contains the corresponding changes in the
serial port library.

The PCD in Drivers/PL011Uart is replaced by an extra parameter for
PL011UartInitializePort.  The PCD is moved to Library/PL011SerialPortLib
to supply the value to pass.

A corresponding patch to ArmVirtPkg is included in the same bundle to
align that with these changes.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
2016-06-15 16:15:50 +02:00
Evan Lloyd ca0aad6982 ArmPlatformPkg: Remove double write in PL011
The variable LineControl was initialised to zero, then updated in a
condition.  This change converts that to a write in each branch of the
condition, removing the Write/Read/Modify/Write sequence.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
2016-06-15 16:15:40 +02:00
Evan Lloyd aadc64e6a1 ArmPlatformPkg: Update PL011 Serial PCDs to Fixed PCDs
The PCDs used in the PL011 UART Driver and Serial Port Library are
inherently "fixed at build".  This change updates the source to use
Fixed PCDs for these values.  This improves clarity and efficiency.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
2016-06-15 16:15:19 +02:00
Evan Lloyd 9f08a052a3 ArmPlatformPkg: Tidy PL011 UART driver
This cosmetic change only tidies things up in preparation for actual
updates. (This reflects responses to a previously submitted patch,
which has been split into several discrete changes.)
There are no functional changes in this commit.
Changes comprise:
  Minor corrections to comment typos.
  Minor formatting mods.
  Expansion of function comments.
  Remove OUT from UartBase parameter.
  Addition of #define for "magic mumbers".

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
2016-06-15 16:15:08 +02:00
Ard Biesheuvel fca117fd3f ArmPlatformPkg/PL031RealTimeClockLib: remove local copy of gRT pointer
Since the only reason for keeping a local copy mRT of the gRT pointer
is to be able to call GetVariable/SetVariable at runtime, use the
UefiRuntimeLib helpers instead, so that we can drop mRT altogether.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-05-11 16:57:23 +02:00
Ard Biesheuvel 3ad72779aa ArmPlatformPkg/PL031RealTimeClockLib: don't clobber gRT table
PL031RealTimeClockLib is a base library that could potentially (although
unlikely) be incorporated into other modules than the DXE_RUNTIME_DRIVER
module that it was intended to complement.

This means the library has no business whatsoever setting the Runtime
Service table pointers directly (since we have no way of knowing which
instance will 'win', and the pointers may end up referring to a module
that is not a DXE_RUNTIME_DRIVER). So remove the assignment altogether.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-05-11 16:57:09 +02:00
Ard Biesheuvel c4cc609dc8 ArmPlatformPkg/PrePi: allow unicore version to be used on MP hardware
When combining UEFI firmware built from Tianocore with ARM Trusted
Firmware running in EL3, it is the responsibility of ATF that only
a single core enters the UEFI firmware in EL2, and the remaining cores
are released directly to the OS via PSCI SMC calls.

In this case, we don't need the MpCore flavor of PrePi or PrePeiCore,
but the UniCore flavor currently checks the CPU identification registers
directly, and refuses to proceed if the boot CPU is part of a MpCore
system.

So drop the ASSERT()'s that implement this check.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-04-29 18:12:52 +02:00
Ard Biesheuvel d7c06eb030 ArmPlatformPkg: move PCI related PCD definitions to ArmPkg
The PCI related PCDs are not platform specific, and architectural
protocols such as CpuIo2 are based on PCI provided MMIO to IO
translation, so these PCDs belong in ArmPkg not ArmPlatformPkg.

NOTE: this *WILL* break some out-of-tree platforms, the fix is changing
all consumers of gArmPlatformTokenSpaceGuid.PcdPci* to
gArmTokenSpaceGuid.PcdPci*

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-04-29 18:04:21 +02:00
Ard Biesheuvel a8c39ba298 ArmPlatformPkg/DS-5: fix 64-bit PE/COFF header parsing bug
The 64-bit version of the DS-5 debug script that retrieves the debug file
path from the PE/COFF image in memory assumes that the PE/COFF header is
packed, and that the debug directory entry in the optional header appears
at a fixed offset into the file. This is no longer true, now that we pad
between the file header and the PE header if the section alignment exceeds
the size of the header (which may be the case when the module contains a
vector table or small model code, which requires 2 KB or 4 KB section
alignment, respectively), to allow this padding to be emitted if the image
is subsequently converted to TE format.

So replace the fixed offset with a dereference of the appropriate header
field.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reported-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com>
2016-04-18 10:18:14 +02:00
Sami Mujawar 7dfe93097c ArmPlatformPkg: Add PCD for Pl011 UART Interrupt
This patch adds a PCD for the PL011 UART Interrupt as this is needed by
the Serial Port Console Redirection Table.

Code at: 68f26f23a2

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2016-04-01 16:45:54 +02:00
Leendert van Doorn 91673dfdfe ArmPlatformPkg: fixups for 64-bit pointers
This retypes some stack base PCD as 64-bit, and fixes up a number of references
to 64-bit PCDs (including the retypes ones), to use the correct PcdGet64()
accessors. Note that, in the case of FixedPcdGet64, this does not actually
caused any problems, since that resolves to an immediate value. But the
generic PcdGetxx accessors should be typed according to the size of the PCD.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leo Duran <leo.duran@amd.com>
[ard.biesheuvel: fixed up some instances in the 32-bit ARM code]
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2016-03-25 07:17:28 +01:00
Haojian Zhuang 727894d5c9 ArmPlatformPkg: PL061: support multiple controller
Support multiple PL061 controllers. If platform gpio driver couldn't be
found, PL061 gpio driver will continue to load PcdPL061GpioBase as the
register base.

It could be compatible with the use case of current PL061 gpio driver.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-03-14 13:17:34 +00:00
Ryan Harkin d777442bb4 ArmPlatformPkg/PL180MciDxe: don't check ID_REG3
TC2 reads 0x02 for the PL180 ID3 register instead of 0x00 as defined in
the spec.

However, the spec [1] states that the contents of ID3 register represent
the "configuration option of the peripheral" and thus not part of the
Prime Cell identification.

For this patch, we drop checking the value in MCI_PERIPH_ID_REG3.

[1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0172a/index.html

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-03-01 18:06:24 +00:00
Ryan Harkin b5ffaf7d70 ArmPlatformPkg/PL180MciDxe: warn on probe fail
If the PL180 fails to probe, issue a warning on debug builds.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-03-01 18:06:16 +00:00
Ryan Harkin cde024957b ArmPlatformPkg/PL180MciDxe: fix Depex for TC2
PL180 on TC2 has a dependency on gEfiCpuArchProtocolGuid.  Without
adding the dependency, TC2 will crash in the PL180 driver.

This problem has been present since d340ef7 when TC2 stopped booting.
However, it was masked by 300fc77 which prevented PL180 from running on
TC2 due to TC2 using a version on PL180 newer than that documented
publicly.

[1] https://github.com/tianocore/edk2/commit/d340ef7
2014-08-26
ArmPkg/ArmArchTimerLib: Remove non required [depex] and IoLib
[2] https://github.com/tianocore/edk2/commit/300fc77
2015-08-25
ArmPlatformPkg/PL180MciDxe: check PrimeCell ID before initializing

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-03-01 18:04:36 +00:00
Leif Lindholm 5f67844615 ArmPlatformPkg: delete orphaned ArmVExpress.dsc.inc
In the recent migration of the ARM Ltd. platforms to
https://git.linaro.org/uefi/OpenPlatformPkg.git, this file unfortunately
got left behind. Delete it to reduce confusion and (further) risk of
duplication of effort.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2016-03-01 10:25:30 +00:00
Leif Lindholm 328d8cfa62 ArmPlatformPkg: PL061 - rewrite the hardware interaction
The PL061 GPIO controller is a bit of an anachronism, and the existing
driver does nothing to hide this - leading to it being very tricky to
read.

Rewrite it to document (in comments and code) what is actually
happening, and fix some bugs in the process.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
2016-02-26 16:50:27 +00:00
Leif Lindholm 41501f18fd ArmPlatformPkg: PL061 - drop pointless initialize function
PL061Initialize() did not actually do anything other than call
PL061Identify() - so cut out the middle man.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
2016-02-26 16:50:22 +00:00
Leif Lindholm 2a77a37ea4 ArmPlatformPkg: PL061 - only initialize on protocol load
For whatever reason, every single operation on the PL061 looked for an
"Initialized" flag, and manually called the initialization function if
not set. Move this to a single call on protocol installation.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
2016-02-26 16:50:17 +00:00
Leif Lindholm fe28290e97 ArmPlatformPkg: PL061 - reformat copyright statement.
The copyright statement in PL061Gpio.c would not fit on a normal terminal
screen. Break lines at <= 80 characters.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
2016-02-26 16:50:09 +00:00
Leif Lindholm 50e8d3936c ArmPlatformPkg/IntelBds: call BdsLibConnectAll()
Currently, we don't pick up removable media (USB drives) or storage
devices connected via plug-in cards. Take the sledge hammer approach
for now.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2016-02-24 10:35:51 +00:00
Leif Lindholm 1bb53955a2 ArmPlatformPkg: Remove orphaned Juno Makefile
The Juno .dsc and .fdf files were recently deleted (currently held
in OpenPlatformPkg), but a spurious Makefile for building using it
was left in place. Drop the Makefile to complete the cleanup.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
2016-02-18 11:21:37 +00:00
Leif Lindholm 46a9bc0175 ArmPlatformPkg: remove obsolete/outdated AArch64 bootstrap
Harking back to the earliest days of software development for AArch64,
this piece of code abstracted away "early setup stuff" when the
software model came out of reset.
However, it is unmaintained and has been superseded by ARM Trusted
Firmware. So drop it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
2016-02-18 11:21:37 +00:00
Leif Lindholm 868d614a85 ArmPlatformPkg: delete Juno ACPI tables
Juno is now managed in OpenPlatformPkg, including the ACPI
tables - so delete this unmaintained copy.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Ryan Harkin <ryan.harkin@linaro.org>
2016-02-16 10:45:07 +00:00
Ryan Harkin 1f40f53526 ArmPlatformPkg/ArmJunoPkg: only have 1 PCD for the FDT
Juno doesn't have lots of DTB files in NOR flash, it only has 1 file,
called "board.dtb" and the motherboard configuration makes the right
choice about which DTB file gets written as board.dtb in NOR.

The code attempts to select which DTB it should use based on the board
variant or configuration.  And this doesn't work because those DTB files
aren't present in NOR flash.

So remove the DTB variants and only load board.dtb.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-02-12 17:47:08 +00:00
Ryan Harkin ca7efae2c6 ArmPlatformPkg/ArmJunoPkg: don't create default boot entries
Code was inserted to create default boot entries for Juno R1.  These
don't work, but they are also preventing the board from booting into the
default options that Intel BDS would otherwise boot.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-02-12 17:46:55 +00:00
Supreeth Venkatesh 776086ce30 ArmPlatformPkg/Bds: Early Console Initialization
Setup the EFI System Table with information about the
Console Devices early, so that error messages in bds
are printed on the console earlier.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-02-09 18:23:57 +00:00
Ryan Harkin 9a8f6fb407 ArmPlatformPkg: remove unused Sec library
The Sec library was built by the AARCH64 FVP models, but the binary was
unused because it was part of a legacy booting strategy from before ARM
Trusted Firmware came along.

This change requires changes in OpenPlatformPkg to remove the Sec binary
from the FVP build.

Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
2016-02-09 13:33:10 +00:00
Ryan Harkin bfc7793bd2 ArmPlatformPkg: remove ArmVExpress-RTSM-A15_MPCore.dsc/fdf
This platform is untested and no longer supported, so remove it from the
tree.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
2016-02-09 13:33:10 +00:00
Ryan Harkin f6795d0b89 ArmPlatformPkg: remove ArmJuno.dsc/fdf
ARM Ltd Platform support is migrating to use OpenPlatformPkg [1].

Currently, Juno exists both in EDK2's ArmPlatformPkg and in
OpenPlatformPkg [2].  And they are starting to diverge, with
OpenPlatformPkg being the most up-to-date with current developments.
To prevent this divergence, remove the .dsc and .fdf files from
ArmPlatformPkg and leave OpenPlatformPkg as the master.

We can't remove ArmJuno.dec yet because ACPI still uses it to set the
include path to ArmPlatform.h.

[1] https://git.linaro.org/uefi/OpenPlatformPkg.git
[2] https://git.linaro.org/uefi/OpenPlatformPkg.git/tree/master:/Platforms/ARM/Juno

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
2016-02-09 13:33:09 +00:00
Ryan Harkin 9a7c894a46 ArmPlatformPkg: remove ArmVExpress-FVP-AArch64.dsc/fdf
ARM Ltd Platform support is migrating to use OpenPlatformPkg [1].

Currently, FVP exists both in EDK2's ArmPlatformPkg and in
OpenPlatformPkg [2].  And they are starting to diverge, with
OpenPlatformPkg being the most up-to-date with current developments.
To prevent this divergence, remove the .dsc and .fdf files from
ArmPlatformPkg and leave OpenPlatformPkg as the master.

[1] https://git.linaro.org/uefi/OpenPlatformPkg.git
[2] https://git.linaro.org/uefi/OpenPlatformPkg.git/tree/master:/Platforms/ARM/VExpress

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
2016-02-09 13:33:09 +00:00
Ryan Harkin 4d3948d9cc ArmPlatformPkg: remove ArmVExpress-CTA15-A7.dsc/fdf
ARM Ltd Platform support is migrating to use OpenPlatformPkg [1].

Currently, TC2 exists both in EDK2's ArmPlatformPkg and in
OpenPlatformPkg [2].  And they are starting to diverge, with
OpenPlatformPkg being the most up-to-date with current developments.
To prevent this divergence, remove the .dsc and .fdf files from
ArmPlatformPkg and leave OpenPlatformPkg as the master.

[1] https://git.linaro.org/uefi/OpenPlatformPkg.git

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
2016-02-09 13:33:09 +00:00
Ryan Harkin 34077963d9 ArmPlatformPkg: remove unused .dsc and .fdf files
The .dsc and .fdf files in ArmPlatformPkg are unused.  Remove them as
part of a general cleanup of ArmPlatformPkg.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2016-02-05 12:16:18 +01:00