Commit Graph

925 Commits

Author SHA1 Message Date
Laszlo Ersek e4fbd18f58 ArmVirtualizationPkg: PlatformIntelBdsLib: beautify source
This patch introduces no functional changes. It sorts #include directives,
sorts INF file sections, and reformats license blocks.

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: Olivier Martin <olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16922 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-25 17:53:44 +00:00
Laszlo Ersek e17b1db501 ArmVirtualizationPkg/ArmVirtualizationQemu: add USB keyboard input
Similarly to the previous patch, we can now multiplex input from the USB
keyboard.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16914 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-23 16:04:30 +00:00
Laszlo Ersek d01c77bb47 ArmVirtualizationPkg/ArmVirtualizationQemu: add VGA console output
Alex Graf's QEMU patchset enables "-device VGA" for the virt machtype as
well. We can now include OvmfPkg/QemuVideoDxe in the firmware, and set
PcdDefaultConOutPaths such that the console output is multiplexed to the
video window as well. (Our platform BDS lib doesn't (yet) locate the VGA
device automatically.)

OvmfPkg/PlatformDxe is included too; it allows users to select a video
resolution. (Note that PcdSetupVideoHorizontalResolution and
PcdSetupVideoVerticalResolution are independent; see git commit 848834cb
(SVN r16311) for explanation.)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16913 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-23 16:04:25 +00:00
Laszlo Ersek a8c2de1d7d ArmVirtualizationPkg: PlatformIntelBdsLib: fix multiconsole setup
In the following call chain:

PlatformBdsPolicyBehavior()
  PlatformBdsConnectConsole()
    InitializeConsolePipe() x 3
      BdsConnectDevicePath() [ArmPkg/Library/BdsLib/BdsFilePath.c]

the three InitializeConsolePipe() function calls pass through
- (&gST->ConsoleOutHandle, &gST->ConOut),
- (&gST->ConsoleInHandle, &gST->ConIn),
- (&gST->StandardErrorHandle, &gST->StdErr)

to BdsConnectDevicePath(), in ArmPkg's BdsLib.

At least when more than one console device paths are specified in the
ConIn / ConOut / ErrOut variables, the above resuls in:
- unchanged protocol interfaces (ConOut, ConIn, StdErr) in the system
  table (because ConSplitterDxe installs its non-NULL interfaces first),
- but, changed handles in the system table.

This effectively separates the handle fields in the system table from the
protocol interfaces in the same that should always be associated with the
handles. The end result is that clients using the handles break (splitting
/ multiplexing doesn't work for them), while clients directly using the
protocol interfaces work.

Therefore, do not attempt to connect consoles separately. ConSplitterDxe
is dispatched before PlatformBdsPolicyBehavior() is called (the latter
happens in the BDS phase), and ConSplitterDxe installs virtual handles and
protocol interfaces for input / output / error.

BdsLibConnectAll() covers all devices, including consoles; as those
consoles are connected, ConPlatformDxe and ConSplitterDxe pick them up
nicely as "slaves". We just need to make sure that the variables are set
first, for the variables -> ConPlatformDxe -> ConSplitterDxe dependency
chain.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16912 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-23 16:04:21 +00:00
Laszlo Ersek a78c4836ea ArmVirtualizationPkg: PlatformIntelBdsLib: kernel boot should provide ACPI
If there is a PCI host, then PCI enumeration (which happens inside
BdsLibConnectAll()) blocks ACPI table installation (correctly). Make sure
we install ACPI tables before trying to direct-boot a QEMU kernel.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16911 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-23 16:04:16 +00:00
Laszlo Ersek 10233c9e6e ArmVirtualizationPkg/ArmVirtualizationQemu: enable PCI support
Beyond including the foundational drivers in the DSC and FDF files, we
enable virtio-over-PCI, and turn on QemuBootOrderLib's OFW-to-UEFI device
path translation for PCI devices.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16910 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-23 16:04:11 +00:00
Laszlo Ersek ad3359eb43 ArmVirtualizationPkg: clone BasePciExpressLib, cache PCIe config base
The BarExisted() function in
"MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c" raises the TPL to
TPL_HIGH_LEVEL before accessing PCI config space.

The PciExpressLib instance under "MdePkg/Library/BasePciExpressLib" --
serving the PCI config space access -- calls
PcdGet64(PcdPciExpressBaseAddress) in turn, for each such call.

The PcdGet64() function, when issued at TPL_HIGH_LEVEL, triggers an
ASSERT(). PcdGet64() is based on a protocol in this UEFI phase, and
protocol handler services are not allowed above TPL_NOTIFY (see Table 23
"TPL Restrictions" in the UEFI spec).

Clone the library, and in a new constructor, cache the PCD in a global
variable.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16909 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-23 16:04:07 +00:00
Laszlo Ersek e5ceb6c9d3 ArmVirtualizationPkg/PciHostBridgeDxe: handle 0 in GetProposedResources()
When there are no devices connected to the root bridge, no resources are
needed. GetProposedResources() currently considers this an invalid
condition (the PI spec doesn't regulate it).

Emitting an empty set of EFI_ACPI_ADDRESS_SPACE_DESCRIPTORs, followed by
the required EFI_ACPI_END_TAG_DESCRIPTOR, allows
PciHostBridgeResourceAllocator() [MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c]
to advance.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16908 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-23 16:04:00 +00:00
Laszlo Ersek 1a1d637695 ArmVirtualizationPkg/PciHostBridgeDxe: skip 0 AddrLen in SubmitResources()
According to Volume 5 of the PI spec, 10.8.2 PCI Host Bridge Resource
Allocation Protocol, SubmitResources(),

  It is considered an error if no resource requests are submitted for a
  PCI root bridge. If a PCI root bridge does not require any resources, a
  zero-length resource request must explicitly be submitted.

Under MdeModulePkg/Bus/Pci/PciBusDxe/, we have:

  PciHostBridgeResourceAllocator()                   [PciLib.c]
    ConstructAcpiResourceRequestor(..., &AcpiConfig) [PciEnumerator.c]
    PciResAlloc->SubmitResources(..., &AcpiConfig)
    ASSERT_EFI_ERROR ()

If ConstructAcpiResourceRequestor() finds no resources to request (for
example because no PCI devices are on the root bridge), it places a
zero-length EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR followed by an
EFI_ACPI_END_TAG_DESCRIPTOR in "AcpiConfig"; satisfying the PI spec.

However, PciHostBridgeDxe's SubmitResources() function does not expect
such input; the following part of the code rejects it:

        switch (Ptr->ResType) {

        case 0:

          //
          // Check invalid Address Sapce Granularity
          //
          if (Ptr->AddrSpaceGranularity != 32) {
            return EFI_INVALID_PARAMETER;
          }

Skip EFI_ACPI_ADDRESS_SPACE_DESCRIPTORs with zero AddrLen early. Also,
allow PciHostBridgeResourceAllocator() to proceed to the AllocateResources
phase by setting "ResourceSubmited" to TRUE.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16907 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-23 16:03:56 +00:00
Laszlo Ersek b9a44dcae3 ArmVirtualizationPkg/PciHostBridgeDxe: get MMIO BARs from our own aperture
This is our MMIO space map:

> GCD:AddMemorySpace(Base=0000000010000000,Length=000000002EFF0000)
>   GcdMemoryType   = MMIO
>   Capabilities    = 0000000000000001
>   Status = Success
> GCDMemType Range                             Capabilities     Attributes
> ========== ================================= ================ ================
> NonExist   0000000000000000-0000000003FFFFFF 0000000000000000 0000000000000000
> MMIO       0000000004000000-0000000007FFFFFF C000000000000001 8000000000000001

NorFlashDxe adds this, but does not allocate it.

> NonExist   0000000008000000-000000000900FFFF 0000000000000000 0000000000000000
> MMIO       0000000009010000-0000000009010FFF C000000000000001 8000000000000001

Added by RealTimeClockRuntimeDxe, but also not allocated.

> NonExist   0000000009011000-000000000FFFFFFF 0000000000000000 0000000000000000
> MMIO       0000000010000000-000000003EFEFFFF C000000000000001 0000000000000000

Added by ourselves.

> NonExist   000000003EFF0000-000000003FFFFFFF 0000000000000000 0000000000000000
> SystemMem  0000000040000000-00000000BFFFFFFF 800000000000000F 0000000000000008*
> NonExist   00000000C0000000-0000FFFFFFFFFFFF 0000000000000000 0000000000000000

In the EfiPciHostBridgeAllocateResources phase, we allocate memory BARs
bottom up, from whichever MMIO range comes first and has room left.
Unfortunately, this places memory BARs into MMIO ranges that belong to
other devices. (Arguably, their respective drivers should not just add,
but immediately allocate those ranges as well.)

(

  This problem is not seen in OVMF / PcAtChipsetPkg, because there we
  allocate bottom-up from the range

    [max(2GB, top-of-low-RAM), 0xFC000000).

  (See the MMIO resource descriptor HOB created in MemMapInitialization()
  [OvmfPkg/PlatformPei/Platform.c].)

  That MMIO range fits in the static [2GB, 4GB) aperture given in
  "mResAperture" in PcAtChipsetPkg/PciHostBridgeDxe; plus other MMIO
  ranges (IO-APIC, HPET, LAPIC, flash chip) are higher than 0xFC000000.
  Hence the bottom-up BAR allocation in OvmfPkg always finds the right
  MMIO range first.

)

In ArmVirtualizationPkg/PciHostBridgeDxe we can solve the problem by
working our way downwards from the top of our own aperture.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16906 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-23 16:03:51 +00:00
Laszlo Ersek ef8dba7da3 ArmVirtualizationPkg/PciHostBridgeDxe: allocate IO BARs top-down
Currently we allocate IO BARs bottom-up in the
EfiPciHostBridgeAllocateResources phase of the enumeration.

> GCD:AddIoSpace(Base=0000000000000000,Length=0000000000010000)
>   GcdIoType    = I/O
>   Status = Success
> GCDIoType  Range
> ========== =================================
> I/O        0000000000000000-000000000000FFFF

Because the IO aperture is based at zero, the first allocation happens to
get the zero address. However, a zero address for a PCI BAR is considered
unmapped; see eg.:

- <http://www.pcisig.com/reflector/msg00459.html>,

- the (new_addr == 0) part in QEMU, pci_bar_address() [hw/pci/pci.c]:

    new_addr = pci_get_long(d->config + bar) & ~(size - 1);
    last_addr = new_addr + size - 1;
    /* Check if 32 bit BAR wraps around explicitly.
     * TODO: make priorities correct and remove this work around.
     */
    if (last_addr <= new_addr || new_addr == 0 || last_addr >= UINT32_MAX)
    {
        return PCI_BAR_UNMAPPED;
    }

We can avoid this problem by allocating top-down in the IO aperture.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16905 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-23 16:03:46 +00:00
Laszlo Ersek f9a8be423c ArmVirtualizationPkg/PciHostBridgeDxe: MMIO aperture must not be uncached
Quite non-intuitively, we must allow guest-side writes to emulated PCI
MMIO regions to go through the CPU cache, otherwise QEMU, whose accesses
always go through the cache, may see stale data in the region.

This change makes no difference for QEMU/TCG, but it is important for
QEMU/KVM, at the moment.

Because gDS->SetMemorySpaceAttributes() is ultimately implemented by
EFI_CPU_ARCH_PROTOCOL.SetMemoryAttributes() -- see
"MdeModulePkg/Core/Dxe/Gcd/Gcd.c" and "ArmPkg/Drivers/CpuDxe/" -- we add
the CPU architectural protocol to the module's DepEx.

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: Olivier Martin <olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16904 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-23 16:03:42 +00:00
Laszlo Ersek 807c26d306 ArmVirtualizationPkg/PciHostBridgeDxe: add room for PCI resource allocation
VirtFdtDxe parses the following address space properties from the DTB (and
saves them in PCDs) :

  ProcessPciHost: Config[0x3F000000+0x1000000)
                  Bus[0x0..0xF]
                  Io[0x0+0x10000)@0x3EFF0000
                  Mem[0x10000000+0x2EFF0000)@0x0

In order to allow PCI enumeration to allocate IO and MMIO resources from
the above ranges for devices, we must add the ranges to the Global
Coherency Domain.

There are two ways for that:
- building resource descriptor HOBs in the HOB producer phase (basically,
  PEI), and letting the DXE core process them,
- calling gDS->AddIoSpace() and gDS->AddMemorySpace() during DXE.

We opt for the second method for simplicity.

In the address space maps, the corresponding ranges change from
"nonexistent" to "IO" and "MMIO", from which the gDS->AllocateIoSpace()
and gDS->AllocateMemorySpace() services can later allocate PCI BARs.

   GCD:AddIoSpace(Base=0000000000000000,Length=0000000000010000)
     GcdIoType    = I/O
     Status = Success
   GCDIoType  Range
   ========== =================================
-> I/O        0000000000000000-000000000000FFFF

   GCD:AddMemorySpace(Base=0000000010000000,Length=000000002EFF0000)
     GcdMemoryType   = MMIO
     Capabilities    = 0000000000000001
     Status = Success
   GCDMemType Range                             Capabilities     Attributes
   ========== ================================= ================ ================
   NonExist   0000000000000000-0000000003FFFFFF 0000000000000000 0000000000000000
   MMIO       0000000004000000-0000000007FFFFFF C000000000000001 8000000000000001
   NonExist   0000000008000000-000000000900FFFF 0000000000000000 0000000000000000
   MMIO       0000000009010000-0000000009010FFF C000000000000001 8000000000000001
   NonExist   0000000009011000-000000000FFFFFFF 0000000000000000 0000000000000000
-> MMIO       0000000010000000-000000003EFEFFFF C000000000000001 0000000000000000
   NonExist   000000003EFF0000-000000003FFFFFFF 0000000000000000 0000000000000000
   SystemMem  0000000040000000-00000000BFFFFFFF 800000000000000F 0000000000000008*
   NonExist   00000000C0000000-0000FFFFFFFFFFFF 0000000000000000 0000000000000000

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16903 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-23 16:03:37 +00:00
Laszlo Ersek 1ff2b5a833 ArmVirtualizationPkg/ArmVirtualizationQemu: enable IO addressing
Set gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize to 16, which determines the
maximum "I/O address width".

This ensures, through the BuildCpuHob() call in
"ArmPkg/Drivers/CpuPei/CpuPei.c", that the inital I/O Space Map will
consist of a 16-bit wide "splittable" entry, when the DXE core starts (see
CoreInitializeGcdServices() in "MdeModulePkg/Core/Dxe/Gcd/Gcd.c"):

  GCD:Initial GCD I/O Space Map
  GCDIoType  Range
  ========== =================================
  NonExist   0000000000000000-000000000000FFFF

Otherwise this range would have size 0, and (since it could not be split)
any gDS->AddIoSpace() calls would fail.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16902 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-23 16:03:32 +00:00
Laszlo Ersek 286c88bcce ArmVirtualizationPkg/PciHostBridgeDxe: accommodate general address spaces
The RootBridgeIoCheckParameter() function currently relies on the range
limit being of the form (2^n - 1). This assumption is not necessarily
true; handle the general case.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16901 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-23 16:03:28 +00:00
Laszlo Ersek 1cfa1957bb ArmVirtualizationPkg/PciHostBridgeDxe: IO space is emulated with MMIO
There is no IO space on ARM, and there are no special instructions that
access it. QEMU emulates the IO space for PCI devices with a special MMIO
range. We're ready to use it at this point, we just have to switch the
Io(Read|Write)(8|16|32) primitives to their MMIO counterparts, because in
"MdePkg/Library/BaseIoLibIntrinsic/IoLibArm.c", the IO primitives
correctly ASSERT (FALSE).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16900 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-23 16:03:21 +00:00
Laszlo Ersek 1275aaf430 ArmVirtualizationPkg/PciHostBridgeDxe: translate addresses for IO
Unlike the one in PcAtChipsetPkg, our PciHostBridgeDxe module must handle
address space translation. IO addresses expressed in the respective
aperture are mapped to a different base in CPU address space.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16899 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-23 16:03:16 +00:00
Laszlo Ersek 120a25c287 ArmVirtualizationPkg/PciHostBridgeDxe: abort if there's no PCI host bridge
If VirtFdtDxe found no PCI host in the DTB, then the config space base
address will be left at zero -- the default is set in the DSC --, and we
should exit PciHostBridgeDxe immediately.

This causes gEfiPciRootBridgeIoProtocolGuid not to be installed, which in
turn prevents MdeModulePkg/Bus/Pci/PciBusDxe from binding (see
PciBusDriverBindingSupported()).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16898 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-23 16:03:11 +00:00
Laszlo Ersek aca7e8b6d4 ArmVirtualizationPkg/PciHostBridgeDxe: set Root Bridge apertures from PCDs
Our PciHostBridgeDxe module creates one root bridge on the one and only
host bridge. The resource apertures of the root bridge (bus range, IO
space, MMIO space) are configured with the "mResAperture" array, which at
the moment carries static values inherited from PcAtChipsetPkg.

Set the array as first thing from the PCDs that we parsed from the device
tree.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16897 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-23 16:03:06 +00:00
Laszlo Ersek e1ec934cc3 ArmVirtualizationPkg/PciHostBridgeDxe: ECAM enables 4KB config space
The Enhanced Configuration Access Mechanism provides access to 4096
register bytes per PCIe B/D/F. The MAX_PCI_REG_ADDRESS macro that we're
changing here is used by RootBridgeIoCheckParameter() for verifying config
space boundaries in EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.Pci.Read() and
.Write().

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16896 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-23 16:03:02 +00:00
Laszlo Ersek 9595e3cd51 ArmVirtualizationPkg/PciHostBridgeDxe: clone from PcAtChipsetPkg
MdeModulePkg/Bus/Pci/PciBusDxe depends on
EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL and
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. Here we clone the driver that produces
these from PcAtChipsetPkg, with the following immediate changes:

- a new FILE_GUID is generated;

- the assembly-language Ia32 / X64 specific IoFifo "accelerators" are not
  copied, and their client code (which would be dead code anyway) is
  removed;

- UNI files are not copied: they are used in conjunction with the UEFI
  Packaging Tool (UPT), but the driver under ArmVirtualizationPkg will not
  be part of UDK.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16895 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-23 16:02:55 +00:00
Laszlo Ersek 65bb13b0fd ArmVirtualizationPkg/VirtFdtDxe: parse "pci-host-ecam-generic" properties
In the Linux kernel tree,
"Documentation/devicetree/bindings/pci/host-generic-pci.txt" describes the
device tree bindings of a Generic PCI host controller.

Recent QEMU patches from Alexander Graf implement such a controller on the
"virt" machine type of qemu-system-(aarch64|arm):

  pcie@10000000 {
    //
    //                    (devfn<<8, 0, 0)  PCI irq
    //                    ----------------  -------
    interrupt-map-mask = <0x1800 0x0 0x0    0x7>;

    //                                        gic      irq
    //               (devfn<<8, 0, 0)  pin+1  phandle  (type, nr, level)
    //               ----------------  -----  -------- -----------------
    interrupt-map = <   0x0 0x0 0x0    0x1    0x8001   0x0 0x3 0x4
                        0x0 0x0 0x0    0x2    0x8001   0x0 0x4 0x4
                        0x0 0x0 0x0    0x3    0x8001   0x0 0x5 0x4
                        0x0 0x0 0x0    0x4    0x8001   0x0 0x6 0x4
                      0x800 0x0 0x0    0x1    0x8001   0x0 0x4 0x4
                      0x800 0x0 0x0    0x2    0x8001   0x0 0x5 0x4
                      0x800 0x0 0x0    0x3    0x8001   0x0 0x6 0x4
                      0x800 0x0 0x0    0x4    0x8001   0x0 0x3 0x4
                     0x1000 0x0 0x0    0x1    0x8001   0x0 0x5 0x4
                     0x1000 0x0 0x0    0x2    0x8001   0x0 0x6 0x4
                     0x1000 0x0 0x0    0x3    0x8001   0x0 0x3 0x4
                     0x1000 0x0 0x0    0x4    0x8001   0x0 0x4 0x4
                     0x1800 0x0 0x0    0x1    0x8001   0x0 0x6 0x4
                     0x1800 0x0 0x0    0x2    0x8001   0x0 0x3 0x4
                     0x1800 0x0 0x0    0x3    0x8001   0x0 0x4 0x4
                     0x1800 0x0 0x0    0x4    0x8001   0x0 0x5 0x4>;

    #interrupt-cells = <0x1>;

    //
    //                   child base      cpu base
    //        type       address         address         size
    //        ---------  --------------  --------------  --------------
    ranges = <0x1000000  0x0        0x0  0x0 0x3eff0000  0x0    0x10000
              0x2000000  0x0 0x10000000  0x0 0x10000000  0x0 0x2eff0000>;

    //
    //     PCIe config     PCIe config
    //     space base      space size
    //     --------------  -------------
    reg = <0x0 0x3f000000  0x0 0x1000000>;

    //
    // allowed bus numbers; inclusive range
    //
    bus-range = <0x0 0xf>;

    #size-cells = <0x2>;
    #address-cells = <0x3>;
    device_type = "pci";
    compatible = "pci-host-ecam-generic";
  };

Parse those properties of the compatible="pci-host-ecam-generic" node into
PCDs that are relevant for PCI enumeration in edk2:

- gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress controls
  MdePkg/Library/BasePciExpressLib,

- gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration controls
  OvmfPkg/AcpiPlatformDxe at this point,

- the rest have been introduced earlier in this patchset, and will control
  PCI range checks and translation.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16894 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-23 16:02:50 +00:00
Laszlo Ersek e48f1f15b0 ArmPlatformPkg: introduce PCDs for describing PCI address spaces
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16893 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-23 16:02:44 +00:00
Jordan Justen 2c3ce49110 ArmVirtualizationPkg: Set PcdPciDisableBusEnumeration to TRUE
This setting makes OvmfPkg/AcpiPlatformDxe not wait for PCI
enumeration to complete before installing ACPI tables.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
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@16886 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-19 23:46:13 +00:00
Olivier Martin 460e1e0dab ArmPlatformPkg/ArmVExpress-FVP-AArch64.dsc: Fixed build
The FeaturePcd gArmTokenSpaceGuid.PcdArmGicV3WithV2Legacy was not
defined in the correct section.

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@16881 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-17 13:11:34 +00:00
Olivier Martin 085cfdf2be ArmPlatformPkg/ArmVExpress-FVP-AArch64: Force GICv3 into GICv2 legacy mode
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Tested-by: Ard Biesheuvel <ard@linaro.org>
Reviewed-by: Ard Biesheuvel <ard@linaro.org>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16876 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-16 10:27:52 +00:00
Olivier Martin 919697ae6c ArmPkg/ArmGic: Added GICv3 specific definitions
ARM GICv3 specification introduces some new components and registers.
This patch adds their definitions.

The most important GICv3 component is the GIC Redistributor. It supports
LPIs (Locality-specific peripheral Interrupt), 8+ CPU configuration.
Some GIC distributor registers have moved to the GIC redistributor.

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



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16872 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-16 10:21:06 +00:00
Olivier Martin 21a763326a ArmPlatformPkg/ArmJunoDxe: Added missing header
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@16756 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-04 13:06:13 +00:00
Jordan Justen 3f3c4895da */Contributions.txt: Update example email address
Use the example.com domain as recommended in RFC 2606.

NOTE: This does not modify the wording of the "TianoCore Contribution
      Agreement 1.0" section

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Bruce Cran <bruce.cran@gmail.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16724 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-03 17:29:14 +00:00
Laszlo Ersek 1c5adbef63 ArmVirtualizationPkg: add simple ACPI Platform Driver to the QEMU platform
Introduce an ACPI platform driver for ARM / AARCH64 virtual machines.
"OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf" downloads ACPI
blobs from QEMU over fw_cfg, processes them, and installs the resultant
ACPI tables.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16698 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-02 19:09:07 +00:00
Laszlo Ersek ab879e4cb3 ArmVirtualizationQemu: ask the hardware for the timer frequency
Roughly, there are two ways to "measure ticks" in UEFI:

- the SetTimer() boot service, which sets up a one-shot or periodic event
  callback, and takes the interval length in units of 100ns,

- the Stall() boot service, which stalls the caller (but does not yield
  the CPU) for the interval specified. The interval is taken as a number
  of microseconds.

If the platform in question also follows the PI (Platform Init)
specification, then it is recommended to implement the above UEFI services
on top of the following DXE Architectural Protocols (described in PI
Volume 2):

- Timer Architectural Protocol:

  "Used to set up a periodic timer interrupt using a platform specific
  timer, and a processor-specific interrupt vector. This protocol enables
  the use of the SetTimer() Boot Service. [...]"

- Metronome Architectural Protocol:

  "Used to wait for ticks from a known time source in a platform. This
  protocol may be used to implement a simple version of the Stall() Boot
  Service. [...]"

Edk2 in general, and ArmVirtualizationQemu in particular, follow the above
pattern.

SetTimer() works correctly. The underlying Timer Architectural Protocol is
provided by "ArmPkg/Drivers/TimerDxe", and that driver calls the internal
function ArmGenericTimerGetTimerFreq() to retrieve the timer frequency.
Ultimately it boils down to reading the CNTFRQ_EL0 register.

The correct behavior of SetTimer() can be observed for example:
- in the grub-efi countdown ("grub-core/kern/arm/efi/init.c"),
- in the Intel BDS front page countdown
  ("IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c").

However, Stall() doesn't work correctly. The underlying Metronome
Architectural Protocol is provided by "EmbeddedPkg/MetronomeDxe", which
further delegates the job to the TimerLib library class. That in turn is
resolved to the "ArmPkg/Library/ArmArchTimerLib" instance, which
(finally!) takes the timer frequency from "PcdArmArchTimerFreqInHz".

In ArmVirtualizationQemu we currently specify 100MHz for this PCD. Alas,
that's incorect for:
- both QEMU/TCG (which emulates 62.5MHz, see GTIMER_SCALE in
  "target-arm/internals.h"),
- and KVM (where the host's virtualized timer can tick at 50 MHz, for
  example).

Set the PCD to 0, asking ArmArchTimerLib to interrogate CNTFRQ_EL0 as
well.

The change can be tested with eg. the following callers of Stall():
- the UEFI Shell's countdown -- before it runs "startup.nsh" -- relies on
  Stall(),
- the UEFI shell command "stall" also uses Stall(). (Time it with a
  stopwatch.)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16692 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-02 12:01:58 +00:00
Leif Lindholm 48edf6be7f ArmPlatformPkg: detect correct pl011 fifo depth
pl011 releases earlier than r1p5 has a fifo depth of 16 bytes, whereas
version r1p5 upwards has a fifo depth of 32 bytes. The pl011 driver was
hardwired to 32 byte depth, causing dropped characters on some platforms
(including default settings on FVP Base and Foundation models).
Update driver to select 16 or 32 on port initialization by checking the
component revision.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16656 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-23 16:10:00 +00:00
Ronald Cron ac83357a43 ArmPkg/NorFlashDxe : Fix the check of flash addresses
Fix the check to prevent any reading past the end of the nor flash.

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@16655 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-23 16:09:07 +00:00
Olivier Martin 2596e61a9b ArmPlatformPkg/ArmJunoPkg/AcpiTables: Updated with new ACPI 5.1 Tables & Definitions
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Graeme Gregory <graeme.gregory@linaro.org>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16654 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-23 16:07:38 +00:00
Olivier Martin 3399d5beb8 ArmPlatformPkg/ArmJunoPkg: Added the ACPI 5.0 Tables
These tables are:
- Differentiated System Description Table Fields (DSDT)
- Firmware ACPI Control Structure (FACS)
- Fixed ACPI Description Table (FADT)
- Generic Timer Description Table (GTDT)
- Multiple APIC Description Table (MADT)
- Secondary System Description Table Fields (SSDT)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Graeme Gregory <graeme.gregory@linaro.org>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16652 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-23 16:03:09 +00:00
Olivier Martin 05e56470cd ArmPlatformPkg/ArmJunoPkg: Added ACPI support
This support makes the Juno UEFI Firmware to look into the Firmware Volume
for the ACPI Tables. But it does not provide the ACPI Tables.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Graeme Gregory <graeme.gregory@linaro.org>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16651 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-23 16:01:11 +00:00
Laszlo Ersek 9aaf441c84 ArmVirtualizationPkg: PlatformIntelBdsLib: get front page timeout from QEMU
Put QemuBootOrderLib's GetFrontPageTimeoutFromQemu() to use, so that
ArmVirtualizationPkg's Platform BDS policy can consume QEMU's command line
option

    -boot menu=on,splash-time=N

RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1172756

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16612 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-14 16:26:04 +00:00
Olivier Martin fa14cfc927 ArmPlatformPkg: Fixed builds after some ShellPkg libraries have moved
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@16605 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-13 18:58:00 +00:00
Olivier Martin 5c2d456b96 ArmPlatformPkg/Bds: Signal when the variable 'Fdt' has been updated
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@16589 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-06 15:54:12 +00:00
Olivier Martin f2c730d312 ArmPlatformPkg/Bds: Retrieve the Status when calling RT.SetVariable
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@16588 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-06 15:52:52 +00:00
Ronald Cron 6e8b37f1f6 ArmPlatformPkg: PCI emulation - Define a vendor and device id
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@16587 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-06 15:51:54 +00:00
Ronald Cron f98f9d9808 ArmPlatformPkg/ArmJunoDxe: Close the FDT file
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@16585 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-06 15:49:51 +00:00
Ronald Cron f38d0dfbef ArmJunoDxe/InstallFdt.c: Fix the closing of the simple file system protocol
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@16584 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-06 15:48:19 +00:00
Ronald Cron 8a8641b564 ArmPlatformPkg: Make PCI emulation more compliant with the UEFI spec
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@16583 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-06 15:47:25 +00:00
Olivier Martin 901b45162a ArmPlatformPkg/ArmVExpressPkg: Add support for FV filesystems to ARM platforms
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@16581 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-06 15:41:59 +00:00
Laszlo Ersek 23d04b58e2 ArmVirtualizationPkg: Intel BDS: load EFI-stubbed Linux kernel from fw_cfg
A number of tools depend on passing the kernel image, the initial ramdisk,
and the kernel command line to the guest on the QEMU command line (options
-kernel, -initrd, -append, respectively). At the moment, these QEMU
options  work, but the guest kernel loaded this way is launched by a
minimal binary firmware that is dynamically composed by QEMU. As a
consequence, such a kernel has no UEFI environment.

This patch enables -kernel, -initrd, -append to work on top of the
ArmVirtualizationQemu firmware build. The approach it takes is different
from how the same functionality is implemented in OvmfPkg.

OvmfPkg contains a full-fledged Linux boot loader (see
"OvmfPkg/Library/PlatformBdsLib/QemuKernel.c" and
"OvmfPkg/Library/LoadLinuxLib/"). OVMF's LoadLinuxLib sets up the required
kernel environment in a sophisticated way (including x86-specific
artifacts like the GDT), calls ExitBootServices() itself (for legacy
kernels without EFI handover protocol), and jumps to the kernel (using x86
assembly).

In ArmVirtualizationPkg's PlatformIntelBdsLib, we require the kernel being
loaded to have an EFI stub -- that is, to be a genuine UEFI application.

(The EFI stub is not an additional burden for guest kernels -- the EFI
stub is a hard requirement anyway because it needs to process the DTB
heavily:
- it removes memory nodes,
- it removes memreserve entries,
- it adds UEFI properties to the "chosen" node,
- it calculates and installs virt-to-phys mappings with
  SetVirtualAddressMap() in a way that enables kexec [planned].

Kudos to Ard Biesheuvel for summarizing the above.)

An EFI-stubbed Linux guest kernel can be loaded with plain
gBS->LoadImage(). The EFI stub will look up its own
EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL instance (ie. the device path where
it has been loaded from), and it will locate the initial ramdisk named by
the "initrd" command line parameter as a *sibling file* on the same
device.

The initrd file is then loaded using the EFI_SIMPLE_FILE_SYSTEM_PROTOCOL.

This approach enables the EFI stub to load the initial ramdisk from normal
EFI System Partitions, from remote PXE/TFTP directories -- and it enables
us to provide the initrd from memory as well.

In this patch:

- We download the kernel image, the initrd image, and the kernel command
  line, using QEMU's fw_cfg interface.

- We create a read-only EFI_SIMPLE_FILE_SYSTEM_PROTOCOL instance that has
  just a root directory, with the three downloaded files in it.

- The handle that carries the simple file system has a single-node
  VenHw(...) device path (not counting the terminator node).

- We load the EFI-stubbed kernel (which is a UEFI application) with
  gBS->LoadImage(), passing "VenHw(...)/kernel" as device path. This
  causes gBS->LoadImage() to call back into our filesystem.

- Appended to the downloaded command line, we pass "initrd=initrd" to the
  EFI stub.

- Once the EFI stub is running, it loads the initial ramdisk from the
  "sibling" device path "VenHw(...)/initrd", also calling back into our
  filesystem.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16578 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-02 12:08:33 +00:00
Laszlo Ersek b49ed62df1 ArmVirtualizationPkg: identify "new shell" as builtin shell for Intel BDS
The default value of this PCD (in "IntelFrameworkModulePkg.dec")
identifies the "old shell" from EdkShellBinPkg. Our build includes the
"new" shell from ShellBinPkg/UefiShell/UefiShell.inf; let's specify the
FILE_GUID of that.

Otherwise, no boot option will be generated for the Shell application.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16577 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-02 12:08:28 +00:00
Laszlo Ersek 274b4a8d79 ArmVirtualizationPkg: PlatformIntelBdsLib: adhere to QEMU's boot order
We have all the required pieces in place. Let's call
SetBootOrderFromQemu() in PlatformBdsPolicyBehavior().

We disable OFW-to-UEFI device path fragment translation for virtio-pci,
and enable it only virtio-mmio at this time.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16576 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-02 12:08:24 +00:00
Laszlo Ersek 73bb8e6895 ArmVirtualizationPkg: VirtFdtDxe: use dedicated VIRTIO_MMIO_TRANSPORT_GUID
Installing VenHw() device paths with this GUID, for the virtio-mmio
transports that we detect, enables other modules to recognize those
VenHw() nodes. (Note that the actual value doesn't change.)

In addition, to avoid reusing GUIDs in unrelated contexts, detach the
driver's FILE_GUID from its previous value.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16573 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-02 12:08:11 +00:00
Laszlo Ersek 1b610ac255 ArmVirtualizationPkg: PlatformIntelBdsLib: add basic policy
In PlatformBdsPolicyBehavior() we should follow the same pattern as in
OvmfPkg's: after the consoles are connected,
- connect all drivers and devices,
- enumerate all boot options,
- enter the Intel BDS FrontPage if the user presses a key different from
  Enter.

We set the countdown to 3 seconds, similarly to the timeout that we
specify for ARM BDS.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16569 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-02 12:07:52 +00:00
Laszlo Ersek be8afe14f1 ArmVirtualizationPkg: clone PlatformIntelBdsLib from ArmPlatformPkg
In the next patch(es) we'll customize the PlatformBdsLib instance used by
ArmVirtualizationQemu.dsc. Let's clone it first verbatim from
ArmPlatformPkg/Library/PlatformIntelBdsLib, changing only its FILE_GUID.

(Also, coding style errors like "missing space before open parenthesis"
and "missing space after comma or semicolon" have been cleaned up.)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16568 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-02 12:04:25 +00:00
Laszlo Ersek 6e2543b01d ArmVirtualizationPkg: introduce QemuFwCfgLib instance for DXE drivers
After reviewing OvmfPkg's use of its own QemuFwCfgLib instances, it is
clear that its only pre-DXE fw_cfg dependency concerns S3 support (the
QemuFwCfgS3Enabled() call in "PlatformPei/Platform.c").

For ARM guests, S3 is in the distant future, but we can see several
shorter term applications for fw_cfg that all reside in DXE:
- controlling boot order (to be implemented in PlatformBdsLib for Intel
  BDS),
- supporting -kernel / -initrd / -append boot on QEMU (to be implemented
  in PlatformBdsLib for Intel BDS, similarly),
- loading and linking ACPI tables,
- installing SMBIOS tables.

Therefore it makes sense to add a simple MMIO-based fw_cfg client library
to ArmVirtualizationPkg that for the moment is only available to
DXE_DRIVER modules.

Because MMIO accesses are costly on KVM/ARM, InternalQemuFwCfgReadBytes()
accesses the fw_cfg data register in full words. This speeds up transfers
almost linearly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16567 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-02 12:04:15 +00:00
Laszlo Ersek ad652d4694 ArmVirtualizationPkg: VirtFdtDxe: forward FwCfg addresses from DTB to PCDs
Qemu's firmware configuration interface for ARM consists of two MMIO
registers, a 16-bit selector, and a 64-bit data register that allows the
guest to transfer data with 8, 16, 32, and 64-bit wide accesses. Parse the
base address from the DTB, and expose the registers to the rest of DXE via
dynamic PCDs.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16566 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-02 12:04:05 +00:00
Olivier Martin 9d956ea230 ArmPlatformPkg: Fixed build
The original patch was assuming PathLib moved to MdeModulePkg.

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@16522 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-15 11:13:44 +00:00
Ronald Cron 061568e2d5 ArmPkg/BdsLib: Rework TFTP boot
Rework the downloading of an image from a TFTP server to do not
depend on any "PXE specific" setting of the DHCP server.

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@16516 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-12 19:14:22 +00:00
Olivier Martin b4c222655c ArmPlatformPkg/Bds: Test if OptionalData is NULL before using it
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@16515 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-12 19:13:04 +00:00
Olivier Martin 830e5b8c0f ArmPlatformPkg/Bds: Fixed memory leak
Device Paths were not freed after calling
BDS_LOAD_OPTION_SUPPORT.CreateDevicePathNode()

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@16514 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-12 19:11:56 +00:00
Ronald Cron 0b4d97a0ea ArmPlatformPkg/ArmJunoPkg: Move the watchdog generic driver to ArmPkg/Drivers
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@16512 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-12 19:09:24 +00:00
Ronald Cron 95204533ad ArmPlatformPkg/BootMonFs: Fix the setting of information about a file
Rework the setting of information about a file, in particular
file resizing, file renaming and the returned error codes in case
of error. This rework has implied a rework of the read, write, close
and flush functions.

To strickly separate what has been actually written to the media (flushed)
from what has not been written when a file is open, an "Info" field has
been added to the description of a file.

The field is used to store the modifications done to the file by the
means of SetInfo() like the change of the name or of the size. Such
changes are written to the media only when a flush occurs.

When a file is open, the information pointed to by the "Info" field is
always up-to-date. This is not the case of the information stored in
the "HwDescription" of the file description which from now is just a
mirror of what is written on the media.

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@16511 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-12 19:06:10 +00:00
Ronald Cron fb08c45511 ArmPlatformPkg/BootMonFs: Fix error codes returned by Open() and Read()
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@16510 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-12 19:03:30 +00:00
Olivier Martin a40ff4578d ArmPlatformPkg/ArmVirtualizationPkg: Removed compiler family to the AArch64 assembly files
LLVM/ARMCC6 supports GNU assembly language.

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@16509 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-12 19:00:37 +00:00
Olivier Martin 4a8fa966d3 ArmPlatformPkg: The toolchain family name can be omitted if the options are common
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@16508 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-12 18:58:47 +00:00
Scott Duplichan a23eb77b45 ArmPlatformPkg: fix undefined reference to memcpy
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Scott Duplichan <scott@notabs.org>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16340 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-12 10:01:41 +00:00
Leif Lindholm bb5420bb2b ArmPlatformPkg: Increase more ARM address Pcd entries to 64-bit.
Some AArch64 platforms have RAM and flash devices >4GB.
Update some additional Pcd entries to 64-bit, and change
the corresponding PcdGet32 calls to PcdGet64.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16325 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-11 00:43:03 +00:00
Jordan Justen 26830e8579 EDK II Contributions.txt: Update patch format information
Update to show what the patch looks like in email form.

NOTE: This does not modify the wording of the "TianoCore Contribution
      Agreement 1.0" section

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16297 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-31 22:05:50 +00:00
Olivier Martin b07ae3d607 ArmPlatformPkg/Documentation: Removed BaseTools-Pending-Patches.patch
All the required pending BaseTools patches have been merged.
This patch is not required anymore.

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@16275 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-29 18:55:29 +00:00
Olivier Martin 8dd618d211 ArmPkg/ArmLib: Removed duplicated invalidate TLB function
ArmInvalidateInstructionAndDataTlb() was doing the same thing as
ArmInvalidateTlb().
Both invalidate Data and Instruction TLBs.

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@16253 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-27 15:38:55 +00:00
Ronald Cron d2e7e385fc EmbeddedPkg: Clarify the declaration of SerialPortGetControl()
Rework the PL011UartGetControl() function removing a TODO by the way.
Update of the header comment blocks of (PL011Uart|SerialPort)GetControl() functions.

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@16252 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-27 15:38:20 +00:00
Ronald Cron ab71619108 EmbeddedPkg: Clarify the declaration of SerialPortSetControl()
Rework of PL011UartSetControl() as a consequence as well as update of
function header comment blocks.

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@16251 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-27 15:37:37 +00:00
Olivier Martin 9f38945fea ArmPlatformPkg/ArmJunoPkg: Added Juno development board support
ARM 64bit development platform.

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@16249 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-27 15:28:07 +00:00
Harry Liebel cfdab71f92 ArmPlatformPkg/ArmShellCmdRunAxf: Added 'runaxf' cmd to shell (..cont)
Added missing file from the previous commit.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16248 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-27 11:13:26 +00:00
Harry Liebel ced216f8b9 ArmPlatformPkg/ArmShellCmdRunAxf: Added 'runaxf' cmd to shell
Use the command to load and start a ARM Executable File from mass storage.
This is basically just an ELF file. The program is copied to memory and
the Entrypoint is called. Control is not expected to return back to the
Shell. This has only been tested on AArch64 with a limited set of AXF
binaries.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16247 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-27 10:52:11 +00:00
Olivier Martin 53ae06f50d ArmPlatformPkg/ArmVExpressDxe: Fixed duplicated GUID
ArmFvpDxe.inf was using the same file guid as ArmHwDxe.inf.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reported-By: Leif Lindholm <leif.lindholm@linaro.org>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16246 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-27 10:46:16 +00:00
Laszlo Ersek edb5073413 ArmVirtualizationPkg: FdtPL011SerialPortLib: support UEFI_APPLICATION
The library already supports UEFI_DRIVER, we just need to relax the
restriction list.

This allows ArmVirtualizationPkg platforms to build applications, like the
UEFI shell.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-By:  Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16219 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-15 14:15:21 +00:00
Leif Lindholm 0b7c06072e ArmPlatformPkg/ArmVExpressPkg: Enable specifying firmware version string on build
If FIRMWARE_VER is defined on the build command line, set
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString based on it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-By:  Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16212 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-14 14:46:32 +00:00
Olivier Martin 43ac100ee4 ArmPlatformPkg/ArmVirtualizationPkg: Added support for Intel BDS
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@16208 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-13 10:55:38 +00:00
Olivier Martin 9180ab73e6 ArmPkg/ArmPsciResetSystemLib: Made the library only using SMC
Only ArmVirtualizationPkg based platforms are expected to use
the dynamic method to choose between SMC and HVC to invoke PSCI.

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@16204 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-10 11:22:50 +00:00
Harry Liebel 3a0e4800a3 ArmPlatformPkg/Bds: Reduce boot device entries
If a storage device is used for Variable storage or access is provided
by the Simple Filesystem Protocol do not list it again for RAW memory
map access in the 'Add Boot device' menu.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16203 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-10 10:39:36 +00:00
Olivier Martin 601e360786 ArmPlatformPkg: Introduced ArmPlatformSysConfigLib NULL library
Some platforms do not have SysConfig controller used by the ARM
Versatile Express.
Some peripheral drivers currently rely on SysConfigLib (eg: PL031
RTC driver, LCD driver).

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@16143 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-18 21:15:29 +00:00
Michael Casadevall 6f5872b1f4 ArmPlatformPkg/ArmVirtualizationPkg: Add ArmVirtualizationQemu platform
This adds support for executing UEFI in a QEMU/mach-virt emulated environment.
The following assumptions are made about the target:
- DRAM base at 0x4000_0000, containing the device tree blob
- DRAM size at least 1 MB
- device tree uses 64-bit physical base addresses and sizes
- ARM architected timer
- Cortex-A15 CPU (if built for 32-bit)

The following information is retrieved from the device tree:
- PL011 UART base address
- GIC base addresses
- virtual timer interrupt
- PL031 RTC base address
- DRAM size, must be at least 128 MB
- virtio MMIO transports
- PSCI 0.2 availability (for reset and poweroff)

The device tree image is relocated and installed as a configuration table
so an EFI stub enabled kernel can be booted directly without the need for
a bootloader.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Casadevall <michael.casadevall@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-By: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16141 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-18 18:11:24 +00:00
Laszlo Ersek f1f0ba19f9 ArmVirtualizationPkg: add device tree based PL011 SerialPortLib
This adds 2 implementations of SerialPortLib for device tree based platforms
using a PL011 UART:
- an 'early' one which is completely stateless and uses only fixed PCDs
- a normal one which takes its base address from a HOB containing the base
  address discovered in the PEI phase

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-with-remarks-by: Laszlo Ersek <lersek@redhat.com>
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@16140 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-18 18:07:52 +00:00
Laszlo Ersek de5f5e9344 ArmPlatformPkg/ArmVirtualizationPkg: introduce gEarlyPL011BaseAddressGuid
This GUID will identify a customized HOB that carries the base address of
the PL011 serial port, for clients that cannot access PCDs.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16139 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-18 18:06:22 +00:00
Michael Casadevall a36d531f5d ArmPlatformPkg/ArmVirtualizationPkg: add ArmVirtualizationPlatformLib library
This is an implementation of ArmPlatformLib that discovers the size of system
DRAM from a device tree blob located at the address passed in
gArmTokenSpaceGuid.PcdDeviceTreeBaseAddress, which should equal the value in
gArmTokenSpaceGuid.PcdSystemMemoryBase.

As the device tree blob is passed in system DRAM, this library can only be used
if sufficient DRAM is available (>= 128 MB) and if not using shadowed NOR. The
reason for this is that it makes it easier to guarantee that such a device tree
blob at base of DRAM will not be clobbered before we get a chance to preserve it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Casadevall <michael.casadevall@linaro.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-By: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16138 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-18 18:05:03 +00:00
Ard Biesheuvel ad10693231 ArmPlatformPkg/ArmVirtualizationPkg: Add VirtFdtDxe driver
This driver enumerates the device nodes in the device tree located at the
base address passed in gArmTokenSpaceGuid.PcdDeviceTreeBaseAddress, and
installs drivers for devices it cares about (GIC interrupt controller, RTC,
architected timer interrupt)

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



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16137 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-18 17:59:58 +00:00
Ard Biesheuvel 433b31ddee ArmPlatformPkg/ArmVirtualizationPkg: Add PlatformPeiLib library
This is a fork of the ARM PlatformPeiLib for virtual machines. The main
purpose of having this specific implementation is that it allows us to
preserve the device tree blob if it was passed to us in system DRAM.

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
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@16136 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-18 17:58:01 +00:00
Ard Biesheuvel ad6f3dafb8 ArmPlatformPkg/ArmVirtualizationPkg: introduce PCDs for device tree base address
Introduce gArmVirtualizationTokenSpaceGuid.PcdDeviceTreeBaseAddress and
PcdDeviceTreeInitialBaseAddress, which will be used by virtual machine ports
that discover the system configuration from a flattened device tree DTB image.

The latter is FixedPcd only, and should contain the initial offset of the DTB,
the former may be declared as dynamic, and updated at runtime if the DTB is
relocated before the DXE phase.

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
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@16135 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-18 17:56:44 +00:00
Ard Biesheuvel ad90df8ac0 ArmPlatformPkg/ArmVirtualizationPkg: Add private HobLib implementation for DXE phase
To allow a dynamically discovered UART base address, we parse the device
tree early and store the base address in a HOB. To prevent circular
constructor dependencies from interfering with bringing up the serial port
using this dynamic base address, use our own private HobLib with no
dependencies on DebugLib either directly or indirectly through UefiLib.

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
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@16134 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-18 17:55:17 +00:00
Ard Biesheuvel 86d96aef47 ArmVirtualizationPkg: add driver for QEMU's NOR flash
This adds an implementation of NorFlashPlatformLib that exposes the
two 64 MB NOR flash banks that are provided by QEMU's mach-virt
emulation both in 32-bit and 64-bit mode.

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



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16133 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-18 17:53:36 +00:00
Ard Biesheuvel 85dddd220d ArmVirtualizationPkg: add Include/ArmPlatform.h
This include file contains platform specific defines, and is shared by
various modules.

Contributed-under: TianoCore Contribution Agreement 1.0
Acked-by: Laszlo Ersek <lersek@redhat.com>
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@16132 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-18 17:52:37 +00:00
Ard Biesheuvel e0a1413d6c ArmPlatformPkg: separate PlatformPei and PlatformPeiLib
This separates PlatformPei and PlatformPeiLib so the latter can be
overridden by a specific platform.

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
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@16110 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-16 00:56:50 +00:00
Ard Biesheuvel 2efbf710e2 ArmPlatformPkg/NorFlashDxe: use MmioWrite () not memory stores
When writing to the flash, make sure to use MmioWrite () wrappers instead
of letting the compiler generate the store instructions. This is needed
because under virtualization, store instructions with multiple outputs
(i.e., store pair or store with writeback) cannot be emulated efficiently
when operating on MMIO ranges.

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@16107 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-16 00:41:45 +00:00
Ard Biesheuvel 259ea52b19 ArmPlatformPkg/PL031RealTimeClockLib: use virtual address of runtime services
This library accesses SystemTable->RuntimeServices at runtime,
which means it should take care to use its updated value after
SetVirtualAddressMap () is called.

Replace references to gRT with mRT, which we initialize to gRT
and update to its virtual value on a virtual address change event.

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
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@16091 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-10 18:49:43 +00:00
Ard Biesheuvel f8d7d6e151 ArmPkg,ArmPlatformPkg: Allow dynamic PCDs for memory base and size
This changes the definition and a bunch of references to
gArmTokenSpaceGuid.PcdSystemMemoryBase and
gArmTokenSpaceGuid.PcdSystemMemorySize so they can be declared as dynamic PCDs
by the platform. Also, move the non-SEC call to
ArmPlatformInitializeSystemMemory() earlier, so a platform has a chance to set
these PCDs before they are first referenced.

The purpose is allowing dynamically instantiated virtual machines to declare
the system memory by passing a device tree.

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
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@16079 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-09 16:11:30 +00:00
Ard Biesheuvel 4f6d34b434 ArmPkg: Move TimerDxe and ArmArchTimerLib to new ArmGenericTimerCounterLib
Move TimerDxe and ArmArchTimerLib to ArmGenericTimerCounterLib, and update all
platforms to select the physical counter instance they have been using
implicitly all along.

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



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16078 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-09 16:10:18 +00:00
Harry Liebel c41bffd380 ArmPlatformPkg/Bds: Fix delete boot option
- We need to delete the boot option variable from storage not just
  adjust the BootOrder variable.
- The Linux tool 'efibootmgr' still showed the previously removed boot
  options.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16070 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-09 15:58:33 +00:00
Olivier Martin 18744a5f61 ARM Packages: Removed unused PcdArmPrimaryCore
This PCD has been replaced by ArmPlatformIsPrimaryCore() function.
Althrough this PCD is still used in some occasions.

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@16026 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-01 17:41:38 +00:00
Ard Biesheuvel b4e2799be1 ArmPlatformPkg: allow dynamically discovered PL031 RTC
Allow the PCDs gArmPlatformTokenSpaceGuid.PcdPL031RtcBase and
gArmPlatformTokenSpaceGuid.PcdPL031RtcPpmAccuracy PCDs to be
declared as PcdsDynamic by the platform so they can be overridden
during boot.

Contributed-under: TianoCore Contribution Agreement 1.0
Acked-by: Laszlo Ersek <lersek@redhat.com>
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@16015 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-01 15:58:51 +00:00
Ard Biesheuvel f6f0612bec ArmPlatformPkg/PrePeiCore: remove GIC related PCDs from unicore
Remove the PCDs gArmTokenSpaceGuid.PcdGicDistributorBase and
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase from PrePeiCoreUniCore.inf,
as they are not in fact used by the module.

Contributed-under: TianoCore Contribution Agreement 1.0
Acked-by: Laszlo Ersek <lersek@redhat.com>
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@16014 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-01 15:57:51 +00:00
Ronald Cron 947a10b155 ArmPlatformPkg/Bds: Corrected a bug in IsPrintableString()
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@16010 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-01 13:19:43 +00:00
Ronald Cron 4477336d05 ArmPlatformPkg/Bds: Correct copy of an unaligned Unicode string
When a Unicode string is not stored in a 2-byte aligned memory area,
the StrnCpy() or StrCpy() functions can not be used to copy the string.
The string is now copied using CopyMem().

In the same function, a copy with "AsciiStrnCpy()" has also be replaced
with a copy using "CopyMem()" as the size of the string to copy is in
normal cases known. Another copy using "AsciiStrnCpy()" has been corrected
in order not to run off the array the string is copied into and to ensure
that the copied string has a final zero.

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@16009 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-01 13:17:23 +00:00
Olivier Martin 22044caa2c ArmPlatformPkg/NorFlashDxe: Clean the driver
- Marked some functions as STATIC
- Simplified some conditions

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@15907 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-26 10:20:47 +00:00
Harry Liebel bcb53c42d0 ArmPlatformPkg: Provide mechanism to get BootMonFS file information (cont.)
Add additional structure to get file meta-data information from BootMonFS
based files. AXF files are processed by the Flash loader and the ELF header
stripped. The relevant information is stored in the file-system.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15906 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-26 10:19:52 +00:00
Harry Liebel 749d91f7aa ArmPlatformPkg/Bds: Fix compiler warning
- Fix RVCT warning: 'SecondEntry' may be uninitialised.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15904 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-26 10:17:05 +00:00
Harry Liebel da5daf369f ArmPlatformPkg/BootMonFs: Provide mechanism to get BootMonFS file information
Add additional structure to get file meta-data information from BootMonFS
based files. AXF files are processed by the Flash loader and the ELF header
stripped. The relevant information is stored in the file-system.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15902 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-26 10:15:21 +00:00
Ronald Cron 91c38d4e94 ARM Packages: Replace tabs by spaces for indentation
Replace tabs by spaces for indentation to comply to EDK2 coding standards.
Done in files with extension ".S", ".c", ".h", ".asm", ".dsc", ".inc", "*.inf",
 "*.dec" or ".fdf" and located in ArmPkg, ArmPlatformPkg, EmbeddedPkg,
BeagleBoardPkg or Omap35xxPkg.

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@15901 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-26 10:14:17 +00:00
Olivier Martin 5c670b2119 ArmPlatformPkg/Bds: Fixed condition on LOAD_OPTION_CATEGORY_BOOT
The condition tries to identify if we were starting a EFI
OS Loader or EFI Application.
But LOAD_OPTION_CATEGORY_BOOT was used as a mask to check the
attributes of the boot options while it is not a mask.

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@15900 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-26 10:12:06 +00:00
Jordan Justen fad213a3db EDK II Contributions.txt: Note acceptable contribution licenses
We strongly prefer that contribtions be offered using the same license
as the project/module. But, we should document other acceptable
licenses for contributions.

This will allow package owners to more easily know if they can accept
a contribution under a different source license.

NOTE: This does not modify the wording of the "TianoCore Contribution
      Agreement 1.0" section

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Mark Doran <mark.doran@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15892 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-25 23:10:18 +00:00
Olivier Martin olivier.martin bd1d062820 ARM Packages: Added support for GCC stack protector
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@15853 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-20 18:01:50 +00:00
Olivier Martin febad023bf ARM Packages: Removed malicious trailing spaces
Some trailing spaces were missing from the previous patch.

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@15849 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-20 11:38:45 +00:00
Olivier Martin 743a2a550c ArmPlatformPkg/Scripts: Update the profiling script to work on AArch64 with the latest DS-5
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@15836 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-19 13:36:00 +00:00
Olivier Martin 5e6322a530 ArmPlatformPkg/Bds: Fixed typo issue
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@15834 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-19 13:34:12 +00:00
Ronald Cron 3402aac7d9 ARM Packages: Removed trailing spaces
Trailing spaces create issue/warning when generating/applying patches.

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@15833 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-19 13:29:52 +00:00
Ronald Cron 62d441fb17 ARM Packages: Corrected non-DOS line endings
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@15832 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-19 13:22:20 +00:00
Olivier Martin ae19003981 ArmPlatformPkg/Bds: Signal EndOfDxe PI Event
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@15739 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-01 18:35:29 +00:00
Olivier Martin c3b6d97563 ArmPlatformPkg: Removed the global ImageHandle when UefiBootServicesTableLib is included
UefiBootServicesTableLib already defines gImageHandle that has been initialized with
the value of ImageHandle.

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@15737 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-01 18:33:17 +00:00
Harry Liebel f9e420d5d2 ArmPlatformPkg/ArmVExpressPkg: Fix armcc warning causing build failure
- Variable may be used before being set

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15719 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-29 14:21:05 +00:00
Ronald Cron 019680b3dc ArmPlatformPkg/Bds: Added boot options reordering
Added the reordering of the boot options feature to the boot manager.
The BootMenuSelectBootOption() has been split into
DisplayBootOptions() that only displays the boot options and
SelectBootOptions() that asks to select one.

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@15718 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-29 14:19:57 +00:00
Ronald Cron 22a50a13e5 ArmPlatformPkg/Bds: Corrected boot type detection
Corrected the detection of file system and memory map boot option types.
 
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@15717 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-29 14:19:02 +00:00
Olivier Martin 66982010ed ArmPlatformPkg/Bds: Do not ignore the error code in DefineDefaultBootEntries()
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@15716 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-29 14:18:03 +00:00
Ronald Cron 152286cea5 ArmPlatformPkg/Bds: Added TFTP boot option update
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@15715 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-29 14:17:05 +00:00
Ronald Cron cf30b996d5 ArmPlatformPkg/Bds: Change the GetHIInput/EditHIInput to always return a valid IP address
The new functions never return a invalid IP address.
The user would be asked again if the IP address is mal-formed.
	
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@15714 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-29 14:16:10 +00:00
Ronald Cron 889ac6a8b7 ArmPlatformPkg/Bds: Got rid of RequestBootType argument
Removed "RequestBootType" argument of the "*CreateDevicePathNode()" and
"*UpdateDevicePathNode()" functions. A boolean field "Request
BootType" has been added to the BDS_LOAD_OPTION_SUPPORT structure and
is used by the "BootMenuAddBootOption()" and "BootMenuUpdateBootOption()"
functions instead.

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@15713 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-29 14:15:15 +00:00
Ronald Cron f53da37ad0 ArmPkg/ArmLib.h: Removed GET_CORE_POS macro
The platform independant GET_CORE_POS has been replaced by the platform
dependent function ArmPlatformGetCorePosition().

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@15661 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-15 09:26:53 +00:00
Ronald Cron 8bf4ad4475 ArmPlatformPkg/Bds: Getting and editing IP addresses
Reworked GetHIInputIP() function to use "NetLibStrToIp4()" library
function to parse the IPv4 address instead of doing it by itself.

Added function EditHIInputIP() in BdsHelper.c to edit an IPv4 address.
To be used when updating a tftp boot option.

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@15660 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-15 09:25:57 +00:00
Olivier Martin 6d0ca2577c ARM Packages: Force the SEC modules to be 2K aligned for AArch64
The AArch64 Vector Table must be aligned on a 2K boundary.
The FDF specification does not support 2K alignment but support 4K.

A clear comment has been added to help integrator to understand why the
assertion fails when porting to a new AArch64 platform.

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@15659 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-15 09:24:25 +00:00
Olivier Martin 9232ee5338 ArmPkg/BdsLib: Removed PSCI discoverability from the Linux loader
Some platforms might decide to not support PSCI in their FDT-aware Linux
system even if their firmware supports it.
It is the responsibility of the platform engineer to provide the appropriate FDT.

The PCD gArmTokenSpaceGuid.PcdArmPsciSupport is not required anymore.

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@15658 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-15 09:21:41 +00:00
Olivier Martin 6913a68302 ArmPlatformPkg/ArmPlatformLib.h: Added documentation for ArmPlatformPeiBootAction()
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@15657 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-15 09:18:44 +00:00
Ronald Cron 2db16368d1 ArmPlatformPkg/Bds: Added update of Pxe boot option
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@15656 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-15 09:17:36 +00:00
Ronald Cron 42de09370f ArmPlatformPkg/Bds: Added boot timeout setting
Added boot timeout setting in UEFI boot manager menu

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@15629 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-04 14:46:21 +00:00
Olivier Martin 1b0ac0dedf ArmPkg/ArmGic: Returned the InterruptId in ArmGicAcknowledgeInterrupt()
The InterruptId has a different width for GicV2 and GicV3 (respectively
10bit and 24bit).
The function prototype has been changed to return this value to make the
caller GIC architecture version independent. Otherwise, we would have need
to expose a different mask to allow the caller to retrieve this value from
the read register.

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@15628 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-04 14:41:30 +00:00
Olivier Martin e700a1fc91 ArmPkg/ArmGic: Introduced helper functions to access the GIC controller
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@15621 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-04 11:16:48 +00:00
Olivier Martin 2ca815a495 ArmPkg/ArmGic: Move out the EndOfInterrupt from the interrupt acknowledgement
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@15619 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-04 11:13:27 +00:00
Olivier Martin b0fdce95f7 ARM Packages: Fixed missing braces (the warning was disabled by GCC)
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@15578 6f19259b-4bc3-4df7-8a09-765794883524
2014-06-20 18:24:51 +00:00
Olivier Martin ec6b8eda8f ArmPlatformPkg/SP804TimerLib: Checked both Metronome and Performance timers are initialized
Prior to this change if Metronome timer was already initialized the initialization of the
Performance timer was skipped.

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@15577 6f19259b-4bc3-4df7-8a09-765794883524
2014-06-20 18:23:37 +00:00
Olivier Martin b4a6629fd9 ArmPlatformPkg/ArmVExpressPkg: Set CNTFRQ to 100Mhz for the Fast Models
The timer frequency for the FVP Architectural Timers have been aligned to 100Mhz.

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@15555 6f19259b-4bc3-4df7-8a09-765794883524
2014-06-03 16:44:09 +00:00
Olivier Martin 8b7f930a14 ArmPlatformPkg/Ds5: Added script to profile EDK2 with ARM DSTREAM
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@15550 6f19259b-4bc3-4df7-8a09-765794883524
2014-06-03 16:35:32 +00:00
Olivier Martin 36d66acf27 ArmPlatformPkg/NorFlashDxe: Fixed LBA for FVB
FVB (for instance for UEFI Variable) might not be at the
start of the NOR Flash. 'Lba' needs to be fixed up for it.

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@15532 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-14 22:11:04 +00:00
Olivier Martin 7c794bf4a0 ArmPlatformPkg/ArmVExpress-CTA15-A7.dsc: Fixed LAN controller name
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@15531 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-14 17:23:32 +00:00
Brendan Jackman 79e12331ef ArmPlatformPkg/BootMonFs: Cache the HW Description address
This fixes a bug whereby the image description is written over file data when
the file's size is close to a multiple of the block size.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15517 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-08 15:08:39 +00:00
Brendan Jackman e29771bb6e ArmPlatformPkg/BootMonFs: Fix flushing new files
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15516 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-08 15:06:06 +00:00
Brendan Jackman bf6091a95a ArmPlatformPkg/BootMonFs: Fix finding space for new files
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15515 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-08 15:05:10 +00:00
Brendan Jackman dcaf7c9012 ArmPlatformPkg/BootMonFs: Don't write file header to media until Flush
This prevents writing to a garbage location if the file has not been flushed
before, as its BlockStart and BlockEnd are not set.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15514 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-08 15:04:16 +00:00
Brendan Jackman 35d3b52ddd ArmPlatformPkg/BootMonFs: Fix permission check in SetFileInfo
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15513 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-08 15:03:05 +00:00
Brendan Jackman a9185e7618 ArmPlatformPkg/BootMonFs: Use DiskIO to read image descriptions
Now that NorFlashDxe implements DiskIo directly and at a fine granularity
this significantly improves performance.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>




git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15512 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-08 15:02:18 +00:00
Olivier Martin cc135144b9 ArmPlatformPkg/ArmVExpressPkg: Remove the last 16MB of the 32bit DRAM region
Trusted Firmware will declare this region of DRAM as secure.
There is no way for the non-secure world to access this memory region.

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@15511 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-08 15:00:42 +00:00
Brendan Jackman f8a9910c9b ARM Packages: Use .8byte instead of .dword for pointers
Clang doesn't recognise .dword

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15510 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-08 14:59:50 +00:00
Brendan Jackman 73ca50096e ARM Packages: Use AND instead of BIC instruction with immediate
AARCH64 does not have a BIC-with-immediate instruction. GAS assembles it as a
AND with the immediate inverted, but Clang's integrated assembler emits an
error.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15509 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-08 14:59:04 +00:00
Brendan Jackman 919a3a026c ARM Packages: use GCC_ASM_EXPORT to export functions
This ensures the .type directive is used to mark them as function symbols

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15506 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-08 14:55:52 +00:00
Brendan Jackman ef7b378605 ARM Packages: Remove GCC filter for AARCH64 assembly files
Some non-GCC toolchain might support the GNU assembly language.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15504 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-08 14:54:11 +00:00
Olivier Martin 5382a857be ArmPlatformPkg/Bds: Fix setting kernel command line
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@15503 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-08 14:53:02 +00:00
Brendan Jackman 452a9ee1a6 ArmPlatformPkg/Drivers/NorFlashDxe: Directly implement DiskIO protocol
This improves performance by accessing NOR with the fine granularity that
the hardware permits, rather than the coarse granularity assumed by DiskIoDxe.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15502 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-08 14:52:12 +00:00
Brendan Jackman e691183822 ArmPlatformPkg/ArmVExpressSecLibRTSM: Only use extended name of system registers for GCC
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15501 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-08 14:50:44 +00:00
Harry Liebel 518c243d42 ArmPlatformPkg/NorFlashDxe: Optimise FVB protocol
- Only read what needs reading, don't read the whole block.
- Don't write back buffers containing no data after an erase.
- Reduce number of NOR erases when writing data. Only erase the block
  when required.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15500 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-08 14:48:55 +00:00
Olivier Martin 6add2be583 ArmPlatformPkg/ArmVExpress-CTA15-A7.fdf: Increased the size of FV after adding the Lan9118 driver
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@15487 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-24 19:31:53 +00:00
Olivier Martin 02944eb70e ArmPlatformPkg: Added Lan9118 support
This is the on board Versatile Express Ethernet controller.
 
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@15486 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-24 19:30:11 +00:00
Olivier Martin 5aecd34325 ArmPlatformPkg/Bds: Do not print garbage if the command line argument is empty
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@15478 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-22 10:13:38 +00:00
Olivier Martin 0aa39d2840 ArmPlatformPkg/Bds: Do not free NULL pointer
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@15473 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-16 09:31:01 +00:00
Olivier Martin a78167a641 ArmPlatformPkg/ArmVExpressPkg: Update the Runtime Code and Data number of pages
This information give a hint to reserve some contiguous pages for runtime
regions.

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@15466 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-14 10:25:08 +00:00
Olivier Martin 214698e700 ArmPlatformPkg/ArmVExpressLibRTSM: Added support for the additional 6GB memory of DRAM on Foundation Model
The FVP Foundation model has additional DRAM regions at 0x08_8000_0000.

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@15464 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-14 09:04:31 +00:00
Olivier Martin df44112bda ArmPlatformPkg/ArmVExpressLibRTSM: Added support for the additional 2GB memory of DRAM on FVP
The FVP Base and Foundation models have additional DRAM regions at
0x08_8000_0000.

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@15461 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-11 15:58:54 +00:00
Olivier Martin 3e8ddb4a03 ArmPlatformPkg/ArmVExpressLibRTSM: Removed unused dead code
This code is only specific to the ARM Versatile Express hardware board.
There is no concept of logic tile on the FVP model.

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@15460 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-11 15:58:13 +00:00
Harry Liebel 13354807d4 ArmPlatformPkg/Bds: Fix loading Timeout from NV storage
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15459 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-11 15:57:06 +00:00
Olivier Martin 4c8bb1eb3b ArmPlatformPkg/Bds: Do not start all devices when starting an OS loader
EFI OS Loader application will be responsible to start their needed drivers.
While other EFI applications (eg: EFI Shell) expect to have all their drivers
started when they run.

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@15458 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-11 11:02:59 +00:00
Olivier Martin 3b3b72d62b ArmPlatformPkg/Bds: Allow to update EFI application boot entries
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@15457 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-11 11:01:56 +00:00
Olivier Martin 5389972a63 ArmPlatformPkg: Print arguments for EFI Application
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@15456 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-11 11:00:47 +00:00
Olivier Martin 135b09a2c2 ArmPlatformPkg/Bds: Introduced helper function to detect if an Ascii/Unicode string is printable
Some limitations:
 - it only supports unicode string that use ASCII character (< 0x100)
 - single character ASCII strings are interpreted as Unicode string
 - string cannot be longer than 2 x BOOT_DEVICE_OPTION_MAX (600 bytes)

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@15455 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-11 10:59:48 +00:00
Olivier Martin 6bcedcecb5 ArmPlatformPkg: Set PcdDefaultBootArgument to an empty unicode string
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@15454 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-11 10:59:06 +00:00
Olivier Martin 55a9f75d14 ArmPlatformPkg/Bds: Added support to detect if the binary is a EFI image
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@15453 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-11 10:57:47 +00:00
Olivier Martin 06044819bb ArmPlatformPkg/Bds: Added support to pass parameters to EFI applications
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@15452 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-11 10:57:00 +00:00
Olivier Martin 90a44ec4d8 ArmPlatformPkg/Bds: Decoupled OptionalData for the EFI application boot entry from the Linux loader
OptionalData for EFI Application does not contain any more specific information about the ArmPlatformPkg/Bds.
OptionalData now only contains the data pass to the EFI application.

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@15451 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-11 10:56:02 +00:00
Olivier Martin 9fc9aa46cc ArmPlatformPkg/Bds: Add support to handle Unicode parameters
Most UEFI applications expect unicode string parameter.
This change is allows to support Ascii or Unicode strings.

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@15450 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-11 10:55:02 +00:00
Olivier Martin 734b6c33ba ArmPlatformPkg/Bds: Check OptionalData is not NULL before accessing it
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@15439 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-08 18:05:48 +00:00
Olivier Martin 1dbbfc176f ArmPlatformPkg/NorFlashDxe: Fixed driver to support UEFI Runtime mode
- Added the NOR Flash region to the Runtime UEFI Memory Mapped IO
- Caught the gEfiEventVirtualAddressChangeGuid event to fixup the NOR Flash pointers

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@15438 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-08 18:03:25 +00:00
Olivier Martin 2dff0c1ab2 ArmPlatformPkg/NorFlashDxe: Fix coding mistakes that would prevent Runtime mode
- No allocation during Runtime mode (post ExitBootServices())
- Allocate all the persistent data into runtime space
- Do not access BootServices API during Runtime mode

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@15437 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-08 18:02:32 +00:00
Olivier Martin 000f80f77b ArmPlatformPkg/NorFlashDxe: Declare the driver as a UEFI Runtime driver
NorFlash driver is required by UEFI Variable services to read/write
Non-Volatile UEFI variables.

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@15436 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-08 18:01:32 +00:00
Olivier Martin 18ee5b6d78 ArmPlatformPkg/PL031RealTimeClock: Fixed driver to support UEFI Runtime Services
- Removed PCD base address from the macro definition. The base address needs to be fixup when the driver runs in UEFI Runtime mode
- Added the PL031 controller memory region to the Runtime UEFI Memory Mapped IO
- Caught the gEfiEventVirtualAddressChangeGuid event to fixup the PL031 Base address

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@15435 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-08 17:59:00 +00:00
Olivier Martin 81514a8ad0 ArmPlatformPkg/PrePi: Use the same calculation to declare the stack size as in the entrypoint
The stack size in the entrypoint (ie: $ARCH/ModuleEntryPoint.S) is calculated such as
StackSize = PrimaryCoreStack + (core_count - 1) * SecondaryCoreStack

While we were declaring the stacksize into the stack hob as:
StackSize = PrimaryCoreStack + (cluster * 8) * SecondaryCoreStack

If the number of cluster (ie: PcdClusterCount) were not defined correctly then
the stack size declaration were not correct.
It could cause stack corruption if the allocator allocates memory in this range.

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@15431 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-03 20:05:30 +00:00
Olivier Martin cddd490b23 ArmPlatformPkg/ArmVExpress-FVP-AArch64: Fixed number of cores and cluster for Base and Foundation models
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@15430 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-03 20:04:39 +00:00
Olivier Martin 79480c8d7c ArmPlatformPkg: Fixed memory leak after calling GetEnvironmentVariable()
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@15428 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-02 17:33:44 +00:00
Olivier Martin ffcf178215 ArmPlatformPkg/ArmVExpressPkg: Add processor identifiers for Cortex A12/A7
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@15394 6f19259b-4bc3-4df7-8a09-765794883524
2014-03-26 19:28:35 +00:00
Ryan Harkin 7ffa9c616d ArmPlatformPkg/Bds: stop inputting more characters when string is full
If EditHIInputStr() is called, say with a MaxCmdLine of 2, the user is
currently allowed to enter 2 characters.

If the second character is a carriage return/line feed, this is
substituted with a NULL and the function returns.

If the second character is a regular character, the loop terminated and
the function returns.  However, the buffer has not been NULL terminated.

This patch prevents the user from entering a regular character as the
final character and ensures that the only way out of the input is by
pressing ESC or ENTER (or equivalent).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15325 6f19259b-4bc3-4df7-8a09-765794883524
2014-03-12 17:24:48 +00:00
Olivier Martin cb77b48ad9 ArmPlatformPkg/BootMonFs: Added support for new revision of the NOR Flash file system
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@15324 6f19259b-4bc3-4df7-8a09-765794883524
2014-03-12 17:23:33 +00:00
Olivier Martin 81f2915669 ArmPlatformPkg/ArmVExpressPkg: Added Android FastBoot support
That includes an implementation of FASTBOOT_PLATFORM_PROTOCOL for
ARM Versatile Express.

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@15317 6f19259b-4bc3-4df7-8a09-765794883524
2014-03-05 04:52:33 +00:00
Olivier Martin 4257aa4d4b ArmPlatformPkg/ArmVExpressPkg: Added Isp1761 USB OTG driver
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@15315 6f19259b-4bc3-4df7-8a09-765794883524
2014-03-05 04:33:37 +00:00
Olivier Martin a4ab7df48f ArmPlatformPkg/ArmVExpressDxe: Platform specific driver for ARM VExpress based platform
This driver should be used when adding code specific to a platform based on
ARM VExpress based board.

ArmFvpDxe driver has been renamed into ArmVExpressDxe driver to support the hardware
based platforms and the model based platforms.

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@15279 6f19259b-4bc3-4df7-8a09-765794883524
2014-03-01 11:05:44 +00:00
Olivier Martin 27995cd5d6 ArmPkg: Tidy assembler code
- Fixed typo
- Removed unreachable 'dead' loop

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@15277 6f19259b-4bc3-4df7-8a09-765794883524
2014-03-01 11:01:00 +00:00
Olivier Martin eaa84fd553 ArmPkg: Replace single dead loop.
Several assembler macros use a loop at the label "dead" to trap an error.
This is difficult to debug as there is no indication of how one arrived at the loop.
This change replaces dead with distinct loops locally in the macro,
which means the cause of the hang is detectable to the debugger.

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@15273 6f19259b-4bc3-4df7-8a09-765794883524
2014-03-01 10:57:55 +00:00
Olivier Martin 51ad04cbd1 ARM Packages: Include 'AsmMacroIoLibV8.h' instead of the 32bit version
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@15256 6f19259b-4bc3-4df7-8a09-765794883524
2014-02-24 19:20:16 +00:00
Olivier Martin ebddddadff ArmPlatformPkg/ArmRealViewEbPkg: Fixed assertion in RuntimeDxe
An assertion that was comparing the block size with the size of
the storage was failing.

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@15249 6f19259b-4bc3-4df7-8a09-765794883524
2014-02-18 18:32:31 +00:00
Olivier Martin b082496893 ArmPlatformPkg/ArmRealViewEbPkg: Added MMC support
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@15248 6f19259b-4bc3-4df7-8a09-765794883524
2014-02-18 18:31:11 +00:00
Olivier Martin da5ae569b9 Add flag to make UEFI run from DRAM or FLASH for FVPs
- By setting the 'ARM_FVP_RUN_NORFLASH' flag at compile time UEFI will
  be linked to run from NOR FLASH0 on FVPs.
- The RAM load location is currently set to 128MB from base of DRAM.

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@15245 6f19259b-4bc3-4df7-8a09-765794883524
2014-02-17 16:01:41 +00:00
Leif Lindholm e6f3ed4340 ARM Packages: CRLF fixup
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15241 6f19259b-4bc3-4df7-8a09-765794883524
2014-02-12 15:30:34 +00:00
Olivier Martin abc0e1072d ArmPkg: Removed unused header 'BdsUnixLib.h'
This header contains a function that does not exist.

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@15238 6f19259b-4bc3-4df7-8a09-765794883524
2014-02-12 15:12:41 +00:00
Olivier Martin e30acb47ce ArmPlatformPkg/BdsLib: Let the user press enter when inputting booleans
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@15236 6f19259b-4bc3-4df7-8a09-765794883524
2014-02-12 15:09:58 +00:00
Olivier Martin 3f3659e2f7 ArmPlatformPkg/Scripts/Makefile: Update after edksetup.sh changes
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@15211 6f19259b-4bc3-4df7-8a09-765794883524
2014-02-05 12:55:27 +00:00
Olivier Martin 80ae629190 ArmPlatformPkg/ArmVExpress.dsc.inc: Exposed the 2 NOR Flash filesystem to UEFI
BootMonFs (file system used on the VExpress NOR Flash) is now supported on
both NOR Flash regions.

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@15209 6f19259b-4bc3-4df7-8a09-765794883524
2014-02-05 12:54:03 +00:00
Olivier Martin 5a78d29cb8 ArmPlatformPkg/ArmVExpress-CTA15-A7.fdf: Move UEFI image above the first 128MB of DRAM
Linux and its DTB required to be loaded in the first 128MB of the system memory.
Moving UEFI firmware above this limit ensures some XIP runtime code (part of the
UEFI firmware) are not overwritten when loading Linux kernel.

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@15168 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-23 01:01:08 +00:00
Olivier Martin c2d87a49f7 ArmPlatformPkg/PrePi: Fixed register corruption
The commit on Fri Dec 6 2013: "ArmPlatformPkg/ArmPlatformStackLib:
Do not directly use PcdArmPrimaryCore" has made the function
ArmPlatformStackSet() overwrites the registers r6 and r7.
These registers are used by PrePi to store the MPIDR and the the base
of the system memory region used by UEFI.

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@15167 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-23 00:59:08 +00:00
Olivier Martin eb98fc6de8 ArmPlatformPkg: Removed the hardware floating point build flags
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@15166 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-23 00:57:56 +00:00
Gao, Liming d91e3ba5e7 Add VOID MigratePeiServicesTablePointer() to fix'Deprecated declaration'.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gao, Liming <liming.gao@intel.com>
Reviewed-By: Olivier Martin <Olivier.Martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15139 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-17 06:07:01 +00:00
Laszlo Ersek 974d61171f ArmPlatformPkg/ArmVExpressPkg: Clean line endings
The edk2 tree mandates CRLF line terminators. Earlier patches added some
lines with LF terminators. Clean them up.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15132 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-16 10:35:55 +00:00
Reece R. Pollack 9ad8d7d012 ArmPlatformPkg/ArmVExpress-RTSM-A15_MPCore.fdf: Added Generic Network drivers
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Reece R. Pollack <reece.pollack@linaro.org>
Signed-off-by: Steven Kinney <steven.kinney@linaro.org>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15131 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-16 10:31:14 +00:00
Reece R. Pollack 5c20c0c37a ArmPlatformPkg/ArmVExpress-RTSM-A15.fdf: Added the generic Network drivers
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Reece R. Pollack <reece.pollack@linaro.org>
Signed-off-by: Steven Kinney <steven.kinney@linaro.org>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15130 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-16 10:28:23 +00:00
Ryan Harkin 1eee8f3789 ArmPlatformPkg/ArmVExpressPkg: Add the core network components needed for networking and PXE boot.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15129 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-16 10:25:00 +00:00
Olivier Martin 94e0955d3e ArmPlatformPkg/BootMonFs: Added support for the NorFlash File System of the ARM Development Boards
This is the filesystem created by the microcontroller on NOR Flash of the ARM Versatile
Express Development 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@15126 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-16 00:06:13 +00:00
Roy Franz 33fc8b0fec ArmPlatformPkg/ArmVExpressPkg: Add build option to support VExpress A15 QEMU emulation
This patch adds an EDK2_ARMVE_SUPPORT_QEMU macro that can be defined at build
time to build an image that supports QEMU.  The default build is unchanged and
builds the RTSM configuration.

QEMU only models fixed size blocks within a flash device, and the RTSM
configuration stores EFI variables in the smaller boot blocks of the
flash.  When built for QEMU the larger blocks are used that QEMU properly
emulates.

Signed-off-by: Roy Franz <roy.franz@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-By: Olivier Martin <olivier.martin@arm.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15125 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-15 16:24:00 +00:00
Ryan Harkin 92720fe9c9 ArmPlatformPkg/ArmVExpressPkg: add virtio to RTSM A9 BSP
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15123 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-15 12:22:06 +00:00
Ryan Harkin bdf67cd688 ArmPlatformPkg/ArmVExpressPkg: add virtio to RTSM A15 BSP
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15122 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-15 12:19:29 +00:00
Ryan Harkin 4b128e5d4d ArmPlatformPkg/ArmVExpressPkg: Add virtio to RTSM A15 MPCore BSP
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15121 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-15 12:18:29 +00:00
Gao, Liming 382e45e7fd ArmPlatformPkg/PeiServicesTablePointerLib: Update PeiServicesTablePointerLib instance to add new API MigratePeiServicesTablePointer()
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gao, Liming <liming.gao@intel.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15120 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-15 11:51:38 +00:00
Olivier Martin c357fd6a1f ArmPkg/ArmPkg.dec: Redefined PcdSystemMemory(Base|Size) as UINT64
The System Memory region might be out of the 32-bit memory space.

This change has been validated on the FVP AArch64 model using 4GB
of DRAM at 0x8_0000_0000:

-  # System Memory (2GB)
-  gArmTokenSpaceGuid.PcdSystemMemoryBase|0x80000000
-  gArmTokenSpaceGuid.PcdSystemMemorySize|0x80000000
+  # System Memory (4GB)
+  gArmTokenSpaceGuid.PcdSystemMemoryBase|0x800000000
+  gArmTokenSpaceGuid.PcdSystemMemorySize|0x100000000

EFI Shell and Linux kernel boot successfully.

Note: This change has not been validated on AArch32. I expect some
early assembly code to not work.

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@15093 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-10 11:27:31 +00:00
oliviermartin 94caa81c35 ArmPlatformPkg/ArmFvpDxe: Fixed the line endings
The line endings for EDK2 source files should be CRLF.



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15057 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-07 11:20:14 +00:00
Olivier Martin e94784c68d ArmPlatformPkg/ArmFvpDxe: Added Virtio Block support
Right now the ARM Platform driver does not do much, but
I expect to move most platform specific code into platform
specific driver in the future.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>

v5:
- ensure / document that the VIRTIO_BLK_DEVICE_PATH structure must be
  packed
- fix whitespace damage in definition of "mVirtioBlockDevicePath"
- the platform driver is added to all platform DSC and FDF files in the
  previous patch; this patch focuses on virtio only

Change-Id: I3505bfc5b31085b8017bd9e6895a155bd7a2eee9
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14981 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-13 12:05:01 +00:00
Olivier Martin 1e69576f53 ArmPlatformPkg/ArmVExpressPkg: Added the empty 'ArmFvpDxe' platform UEFI driver
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>

v5:
- For uniformity, add the empty driver to
  ArmVExpress-RTSM-AEMv8Ax4-foundation.* too in this patch, not just
  ArmVExpress-RTSM-AEMv8Ax4.*. V4 added the empty driver to
  ArmVExpress-RTSM-AEMv8Ax4-foundation.* not sooner than the next patch,
  fusing it with other (= virtio) functionality. Let's split these changes
  cleanly.

Change-Id: I7d635011c8d3ac59097c728b7c7786d8677c80cb
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14980 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-13 12:03:55 +00:00
Olivier Martin b2ce4a3961 ARM Packages: Removed 'inline' keyword
'inline' keyword is not supported by the C89 (version used by EDK2).

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@14957 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-10 16:39:54 +00:00
Olivier Martin 7cf1a5b328 ArmPlatformPkg/ArmVExpress-RTSM-AEMv8Ax4-foundation.dsc: Remove the Monitor stacks PCDs
We do not have (Secure) Monitor mode on AArch64.

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@14939 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-06 16:13:13 +00:00
Olivier Martin 8a25bd7c54 ArmPlatformPkg/ArmPlatformStackLib: Do not directly use PcdArmPrimaryCore
To make the code platform independent we should not use PcdArmPrimaryCore
in libraries other than the platform specific libraries.
Some platforms allow to change the primary core with external registers.
These platforms do not use PcdArmPrimaryCore to identify the primary CPU.

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@14938 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-06 16:12:24 +00:00
Olivier Martin 99267097f3 ArmPlatformPkg: Fix and Implement ArmPlatformGetPrimaryCoreMpId
- Used correct PCD
- Implement the function for AArch64, BeagleBoard, CTA15A7

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@14937 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-06 16:11:34 +00:00
Olivier Martin 34b292fa9e EmbeddedPkg/EmbeddedPkg.dec: Defined default values for PcdPrePiCpuMemorySize & PcdPrePiCpuIoSize
This change introduces default values for the PCDs PcdPrePiCpuMemorySize & PcdPrePiCpuIoSize.
These values are for the architectures ARM, AARCH64, IA32 and X64.

The redefinition of these PCDs (with the same default values) have been removed from the DSC files.

Note: the default value for AARCH64 was 32. It was preventing to allocate buffer above the 32bit
address space.

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@14914 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-28 21:40:14 +00:00
Olivier Martin ace8987748 ArmPlatformPkg/Ds5: Update script to support System Memory above the 32bit space on AArch64
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@14912 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-28 21:39:23 +00:00
Olivier Martin d4c92adef7 ArmPlatformPkg/ArmVExpressLibCTA9x4: Fixed the initial secondary core bringup when remapping DRAM at 0x0
If the DRAM is remapped at 0x0 then we need to wake up the secondary cores from wfe
(waiting for the memory to be initialized) as the instruction is still in the remapped
flash region at 0x0 to make them jumping into the C-code which lives in the NOR1 at 0x44000000 before
the region 0x0 is remapped as DRAM.

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@14910 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-28 21:38:32 +00:00
Olivier Martin 6cc28dc4c0 ARM Packages: Removed 'Chipset/ArmV7.h' inclusion from the non-ARMv7 specific 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@14909 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-28 21:38:06 +00:00
Olivier Martin 54ed21dbbb ArmPlatformPkg/ArmVExpressPkg: Removed unused PCDs declaration from INF file
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@14907 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-28 21:37:10 +00:00
Olivier Martin 8c6ab85790 ArmPlatformPkg/ArmVExpressPkg: Fixed when EDK2_ARMVE_STANDALONE is set to zero
If EDK2_ARMVE_STANDALONE is not defined then the value is set to 1.
The developer has to explicit set the macro to zero to build a non standalone build.
It means this macro is always defined.

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@14906 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-28 21:36:17 +00:00
Olivier Martin 75f630347c ArmPlatformPkg: Added initial support for the FVP Base and Foundation Models
The FVP Base Model has GICv3 support.
UEFI SEC does limited configuration of GICv3 if present. This is required for Linux to use GICv3.
UEFI itself uses the GICv3 in legacy mode (GICv2).

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@14824 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-05 18:10:36 +00:00
Olivier Martin 017baa1cf3 ARM Packages: Renamed PL390Gic driver into ArmGic driver
The aim is to make this driver follows the ARM GIC specifications and
be implementation independent.

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@14810 6f19259b-4bc3-4df7-8a09-765794883524
2013-10-29 06:36:34 +00:00
Olivier Martin cc104d19a9 ArmPlatformPkg/PL031RealTimeClockLib: Fixed the conditions in LibSetTime()
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@14794 6f19259b-4bc3-4df7-8a09-765794883524
2013-10-21 11:12:21 +00:00
Olivier Martin 4f8c9ae05d ArmPlatformPkg/PL180MciDxe: Fixed check for space in transmit FIFO
This patch prevents a buffer underrun error on the Versatile Express

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@14793 6f19259b-4bc3-4df7-8a09-765794883524
2013-10-21 11:06:51 +00:00
Roy Franz ae26789a50 ArmPlatformPkg/NorFlashDxe: Fix checking of return value of NorFlashWriteBlocks()
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Roy Franz <roy.franz@linaro.org>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14792 6f19259b-4bc3-4df7-8a09-765794883524
2013-10-21 10:29:56 +00:00
Olivier Martin 1d7b547e69 LcdGraphicsOutputDxe: Update FrameBufferSize as per UEFI spec section 11.9
The shift by 1 on the left was expected. It eases the access to CSSELR and set/way operations
where the cache level field is at the BIT1 position.

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@14705 6f19259b-4bc3-4df7-8a09-765794883524
2013-09-23 09:42:53 +00:00
Olivier Martin d8c4bb9afa ArmPlatformPkg/LcdGraphicsOutputDxe: Call LcdShutdown() on ExitBootServices() if PcdGopDisableOnExitBootServices
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@14702 6f19259b-4bc3-4df7-8a09-765794883524
2013-09-23 09:40:27 +00:00
Olivier Martin 64669acab3 LcdGraphicsOutputDxe: Fix BltVideoFill for non-32-bit architectures
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@14701 6f19259b-4bc3-4df7-8a09-765794883524
2013-09-23 09:39:40 +00:00
Garrett Kirkendall 2a414cd3c3 ArmPlatformPkg/MemoryInitPei: AARCH64 fix memory address calculations
At least for AARCH64 currently, SystemMemoryTop and FdTop can overflow
while adding the 32-bit PCDs together.  The resulting value loses the
upper 32-bits.  Cast each of the values to EFI_PHYSICAL_ADDRESS size
before doing the addition to prevent erroneous overflow.  There is currently
no 32-bit platform in EDKII open source that will overflow and this change
would not fix that problem anyway.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Garrett Kirkendall <garrett.kirkendall@amd.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14675 6f19259b-4bc3-4df7-8a09-765794883524
2013-09-16 09:29:52 +00:00
Olivier Martin c683aa9cd1 ArmPlatformPkg/patches: Updated BaseTools-Pending-Patches.patch
This updated patch contains the patch:
- Fixed calculation of BaseOfCode in GenFw when the first code section is aligned:
    Fixes the calculation of the PE/COFF header attribute .BaseOfCode. when the first ..text. section is aligned.
    In the current code base, the alignment of the first code section is not taken into account for the calculation of BaseOfCode.

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@14628 6f19259b-4bc3-4df7-8a09-765794883524
2013-09-04 10:30:27 +00:00
Olivier Martin 0171906d10 ArmPlatformPkg: Update AArch64 models to match the binaries generated by the AArch64 Linux kernel
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@14627 6f19259b-4bc3-4df7-8a09-765794883524
2013-09-04 09:38:53 +00:00
Olivier Martin 55b0a24ad2 ARM Package: Increase FV file size for some EDK2 firmware
GCC47 generates bigger binaries in Debug build than GCC46.

This large increase is considered as a regression.
It will require some investigation to understand the reason
of this increase in size.

The size of the FV has been increased to allow developers to
build these images with the current BaseTools.

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@14611 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-30 11:50:36 +00:00
Girish K S 98fed08f9f SCR_EL3 is the control register for setting the security state
modified the comment which can mislead.

The "ldr r0, [r1]" is overrided with a immediate "mov ro, #3"
instruction. This mov instruction will over write the contents
of the ro register. So replacing 'mov' by 'orr' instruction would
prevent to override the original value.

This patch assumes mov is the right instruction to be retained

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Girish K S <ks.giri@samsung.com>
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14606 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-27 09:17:20 +00:00
Olivier Martin 18e44b07d4 ArmPlatformPkg/ArmVExpressPkg: Added 'EfiResetPlatformSpecific' to ResetSystemLib
This value was missing from the switch on 'ResetType'.

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@14583 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-21 14:45:02 +00:00
Olivier Martin 5232a5e2af ArmPlatformPkg/Sec: Removed SetupExceptionLevel3()
This function only does the GIC initialization that is always taken care by Sec.c.

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@14581 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-21 12:07:01 +00:00
Olivier Martin cc93554486 ArmPlatformPkg/Sec: Remove SCR and CPTR initialization from SetupExceptionLevel3
This is already taken care by Sec when PcdTrustzoneSupport = TRUE.

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@14580 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-21 12:05:44 +00:00
Olivier Martin a639401d2f ArmPlatformPkg/ArmVExpressPkg: Set PcdTrustzoneSupport to TRUE on the AArch64 platforms
This PCD ensures the transition from EL3 to EL2 in ArmPlatformPkg/Sec.

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@14579 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-21 12:04:57 +00:00
Olivier Martin 48999d26c5 ArmPlatformPkg/ArmVExpressPkg: Add System ID of FVP models to VE LCD driver.
- Setting DVI fails on VE models. The FVP models behave the same.
  These have updated SYS ID numbers and they need to be added to the
  driver.

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@14564 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-19 17:35:18 +00:00
Olivier Martin 4ca88ec73f ArmPlatformPkg/ArmVExpress.dsc.inc: Added DEBUG_GCD & DEBUG_CACHE values to the list of DEBUG_*
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@14563 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-19 17:34:17 +00:00
Olivier Martin 6dafb3030d ArmPlatformPkg: PrePei Cache disable and invalidate.
- Disable data cache on all cores.
- Do not clean caches as there might be junk in them, invalidate only.

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@14527 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-06 17:41:53 +00:00
Olivier Martin bb058bcdfb ArmPlatformPkg/PL180MciDxe: Increased the TPL at the highest priority to disable interrupts
This change prevent any interrupt to disturb the PL180 data transfer.
If the data transfer is not fast enough, we get UNDERRUN error.

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@14526 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-06 12:11:13 +00:00
Olivier Martin d6dc67ba1b ARM: Remove NSACR from the common code
NSACR (Non-Secure Access Control Register) is AArch32 specific.

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@14522 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-06 10:59:19 +00:00
Olivier Martin 5b53eaffe8 ArmPkg,ArmPlatformPkg: Free memory allocated by Get.*SpaceMap()
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@14507 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-26 17:12:12 +00:00
Harry Liebel f9cec5f1d9 ArmPlatformPkg: Added Aarch64 Foundation Model
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14495 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-19 00:07:16 +00:00
Harry Liebel e3d495e1b9 ArmPlatformPkg/Ds5: Added Aarch64 support
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14491 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-18 21:32:43 +00:00
Harry Liebel 27be3601d2 ArmPlatformPkg: Added support for Aarch64 AEM RTSM model
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Signed-off-by: Olivier Martin <olivier.martin@arm.com>




git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14490 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-18 19:53:43 +00:00
Harry Liebel 1bc8326695 ArmPlatformPkg: Added Aarch64 support
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14489 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-18 19:06:52 +00:00
Olivier Martin da275244e3 ArmPkg: Removed the non-used PCD PcdGicPrimaryCoreId
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@14480 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-17 06:26:10 +00:00
Olivier Martin f93f248a78 ArmPlatformPkg: Removed the check on the CpuId to release the secondary cores from their mailbox spinning
The idea is to remove the PCD PcdGicPrimaryCoreId to make the port easier (and also to allow changing
the primary boot CPU without adding more platform specific code to UEFI).

There is a risk the mailboxes contain garbage at boot time. But it should be easy enough to clear the
mailboxes when starting UEFI to workaround this limitation.

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@14477 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-17 06:23:07 +00:00
Olivier Martin e8ee4b2d43 ArmPlatformPkg/ArmVExpressLibCTA15-A7: Mapped the extra 1GB of DRAM in the MMU
ARM Versatile Express TC2 Core Tile has two profiles: the 1GB DRAM core tile or
the 2GB DRAM core tile profiles.
By default UEFI assumes, it is the 1GB core tile. In case of 2GB DRAM it declares
this additional 1GB resource system memory to UEFI. But the previous code did
not map this memory in the MMU Page Table.
So, the memory was allocatable by UEFI modules, but was not accessible by the CPU
(because not mapped).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Leif Lindholm <Leif.Lindholm@linaro.org>




git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14449 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-01 14:14:37 +00:00
Olivier Martin 6f050ad6bf ArmPkg: Made ArmConfigureMmu() returns a status code
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@14445 6f19259b-4bc3-4df7-8a09-765794883524
2013-06-27 18:16:06 +00:00
Olivier Martin e7c578c902 ArmPlatformPkg: Fixed deprecated ifdef syntax in DSC files
The syntax '!ifdef $(MACRO)' is deprecated and should be replaced by '!ifdef MACRO'.

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@14440 6f19259b-4bc3-4df7-8a09-765794883524
2013-06-21 11:08:17 +00:00
Ryan Harkin cae32cfeb2 ArmPlatformPkg/ArmVExpressPkg: CTA9x4: Default to EDK2_ARMVE_STANDALONE=1
This patch changes the Versatile Express A9 BSP to build with
EDK2_ARMVE_STANDALONE=1 as the default option.

The user may then specify zero if they wish to build the non-standalone
version.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14439 6f19259b-4bc3-4df7-8a09-765794883524
2013-06-21 10:59:53 +00:00
Ryan Harkin e375b7e0bd ArmPlatformPkg/ArmVExpressPkg: Add Shutdown support
LibResetSystem was performing a cold reboot for both reboot and
shutdown.

This patch updates LibResetSystem to pass SYS_CFG_SHUTDOWN to the
microcontroller when called wit EfiResetShutdown.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14438 6f19259b-4bc3-4df7-8a09-765794883524
2013-06-21 10:09:50 +00:00
Leif Lindholm 0d304bef4b ArmPlatformPkg/Bds: Make ".EFI" files recognizable as EFI applications
Currently, only ".efi" files are recognized as valid ARM UEFI
applications by BDS. This patch also makes ".EFI" files recognised.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14437 6f19259b-4bc3-4df7-8a09-765794883524
2013-06-21 10:01:27 +00:00
Olivier Martin ec6b73d7a6 ArmPlatformPkg/PL011Uart: Ignore BAUD rate if Integral non-zero
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@14432 6f19259b-4bc3-4df7-8a09-765794883524
2013-06-19 18:06:12 +00:00
Olivier Martin c57482d11c ArmPlatformPkg/PL011Uart: Fixed condition
The aim of the condition is to check if we should use the default BaudRate
value (case when *BaudRate == 0).

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@14431 6f19259b-4bc3-4df7-8a09-765794883524
2013-06-19 18:03:12 +00:00
Olivier Martin 4076165359 ArmPlatformPkg/Bds: Moved the PrintLib() after forcing the last character to be null
That should prevent the risk of buffer overflow.

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@14430 6f19259b-4bc3-4df7-8a09-765794883524
2013-06-19 18:00:46 +00:00
Olivier Martin 9d94fa2da2 ArmPlatformPkg/ArmVExpressLibCTA15-A7: Fixed ARM Toolchain build
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@14429 6f19259b-4bc3-4df7-8a09-765794883524
2013-06-19 17:58:26 +00:00
Olivier Martin 9e2e89f013 ArmPlatformPkg: Fixed size of RTSM FDs
The size of the FDs did not match the FD layout.

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@14426 6f19259b-4bc3-4df7-8a09-765794883524
2013-06-17 09:52:51 +00:00
Ryan Harkin 7ff3b9494d ArmPlatformPkg/Bds: Fixed potential overflow in EditHIInputStr()
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Signed-off: Olivier Martin <olivier.martin@arm.com>




git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14393 6f19259b-4bc3-4df7-8a09-765794883524
2013-05-29 14:56:35 +00:00
oliviermartin 15e277d5ac EmbeddedPkg/SerialPortExtLib.h: Changed SerialPortSetAttributes() prototype to return the set value(s)
To be compliant with the UEFI specification it is required to update SERIAL_IO_MODE with the values set.
This prototype change allows to get the value used inside SerialPortSetAttributes().

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <Olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14365 6f19259b-4bc3-4df7-8a09-765794883524
2013-05-15 08:44:59 +00:00
oliviermartin 1cb7c11957 ArmPlatformPkg/ArmVExpressPkg: Switch from ATAG to FDT for VExpress RTSM
The FDT name are the one from Linaro release.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14348 6f19259b-4bc3-4df7-8a09-765794883524
2013-05-12 23:46:47 +00:00
oliviermartin b5a572238d ArmPlatform/ArmPlatformLib: Introduced ArmPlatformPeiBootAction()
This function allows platform to do any specific actions prior to
the start the PEI phase.
For instance, this function could be used by some platforms to initialize clocks that
are required at the early stage of the PEI phase.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Acked-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14347 6f19259b-4bc3-4df7-8a09-765794883524
2013-05-10 12:49:10 +00:00
oliviermartin 2d45f194d9 ARM Packages: Replaced the macro GetCorePositionFromMpId() by the ArmPlatformGetCorePosition()
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Acked-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14346 6f19259b-4bc3-4df7-8a09-765794883524
2013-05-10 12:46:11 +00:00
oliviermartin d05ca26cb8 ArmPlatformPkg/ArmPlatformLib: Added ArmPlatformGetPrimaryCoreMpId()
ArmPlatformGetPrimaryCoreMpId returns the MPID of the primary core.
The primary core might not be known at build time (eg: the platform allows
the boot CPU to be changed through board config).

This function is used during the secondary core stack initialization to know
the position of the secondary core in the SoC.
A secondary core that is at the position N, with N greater than the primary
core position, will be at the position N-1 in the list of secondary stacks
(the primary core has its own separate bigger stack).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Acked-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14345 6f19259b-4bc3-4df7-8a09-765794883524
2013-05-10 12:44:30 +00:00
oliviermartin bebda7ceec ArmPlatformPkg/ArmPlatformLib: Added support for ArmPlatformIsPrimaryCore()
Checking if a core if the primary/boot core used to be done with the macro
IS_PRIMARY_CORE().
Some platforms exposes configuration registers to change the primary core.
Replacing the macro IS_PRIMARY_CORE() by ArmPlatformIsPrimaryCore() allows
some flexibility in the way to check the primary core.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Acked-by: Ryan Harkin <ryan.harkin@linaro.org>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14344 6f19259b-4bc3-4df7-8a09-765794883524
2013-05-10 12:41:27 +00:00
oliviermartin bc7b889a03 ArmPlatformPkg/ArmPlatformLib.h: Removed non-required header file
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14343 6f19259b-4bc3-4df7-8a09-765794883524
2013-05-10 12:34:36 +00:00
oliviermartin 6271d8c5df ArmPlatformPkg/Sec: Replaced non-required 'blx' by 'bl'
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14342 6f19259b-4bc3-4df7-8a09-765794883524
2013-05-10 12:33:26 +00:00
oliviermartin 72647f1901 ArmPlatformPkg: Remove an unused function.
ArmPlatformGetAdditionalSystemMemory() function wasn't used anywhere in UEFI.
This patch deletes it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14270 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-14 09:32:45 +00:00
oliviermartin faf74130d6 Remove unused L2 controller PCD from platform files.
Only the Cortex A9 based platforms have an external L2 controller.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14269 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-14 09:31:47 +00:00
oliviermartin 53cba4fea4 ArmPlatformPkg/Bds: Missing CRC32 update
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14266 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-14 09:28:11 +00:00
oliviermartin 3d783074e1 ArmPlatformPkg/NorFlashDxe: Make the driver more compliant with the UEFI specification
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14263 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-14 09:25:34 +00:00
oliviermartin 6bc77e7a21 ArmPlatformPkg/PL011Uart: Added support for default BaudRate
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14261 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-14 09:23:30 +00:00
oliviermartin ecc62d1390 ArmPlatformPkg/Bds: Fixed adding support for new boot entry when the generated DevicePath is bigger than one node
The initial support was only considering the added Device Path will be a single node.
TFTP for instance requires two new nodes on the top of the ethernet Device Path; a first
one for the IP address of the server and a second one for the file to download.

This change replace the return argument from a DevicePath node by a DevicePath.
It means the End Device Path node is now required.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14194 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-12 01:03:23 +00:00
oliviermartin 4d83284aee ArmPlatformPkg/LcdGraphicsOutputDxe: The structure signature is a 32 bit value
The signature was declared as UINTN.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14190 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-12 01:00:30 +00:00
oliviermartin bc87b5075a ArmPkg/BdsLib: Added support to declare Power State Coordination Interface (PSCI) to the Flat Device Tree (FDT)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14185 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-12 00:56:37 +00:00
oliviermartin a9d7090fc2 ArmPlatformPkg: Moved ARMv7 specific files to a 'Arm' subdirectory
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14182 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-12 00:54:02 +00:00
oliviermartin 6f711615ba ARM Packages: Fixed coding style and typos
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14179 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-12 00:45:29 +00:00
oliviermartin 8274521330 ArmPlatformPkg/NorFlashDxe: Fixed BufferSize calculation in NorFlashWriteSingleBlock()
Needed to convert Word into Byte.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14178 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-12 00:44:30 +00:00
oliviermartin 9f5c60c38b ArmPlatformPkg/CTA15-A7: Add a convenient way to restore default values in NOR flash.
Setting bit4 of SCC register 48 now triggers the erasing of the memory region
reserved for variable storage in NOR flash and the restoration of the default
headers in flash.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14177 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-12 00:43:58 +00:00
oliviermartin c0b2e4775d ArmPkg: Introduce GetGlobalEnvironmentVariable() function.
Rename GetEnvironmentVariable() function into GetGlobalEnvironmentVariable().
GetEnvironmentVariable() function sill exists but caller must now pass a Guid.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14176 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-12 00:42:59 +00:00
oliviermartin 7135d76d56 ArmPlatformPkg/BootMenu.c: Print loader type in a more friendly way.
In debug mode, the loader type (EFI application or linux kernel with
FDT/ATAG support) is displayed in UEFI boot menu.

Before this patch it was printed as a decimal number which is
meaningful to the user only if he knows the values of the
ARM_BDS_LOADER_TYPE enumeration type in the source code...

This patch modifies the boot menu so that it also prints a
user-friendly string describing the loader type.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14175 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-12 00:41:52 +00:00
oliviermartin b9ee70610b ArmPlatformPkg/ArmPlatformLibNull: Fixed build
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14174 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-12 00:41:05 +00:00
oliviermartin d38c35f9f7 EmbeddedPkg: Introduced a separate SerialPortExtLib library
Formerly only the header was defined and it was expecting the SerialPortExtLib
interface to be implemented by SerialPortLib if supported. This behaviour was
not conform to the EDK2 framework.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14173 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-12 00:40:11 +00:00
oliviermartin 166c01fbc2 ArmPkg: Move ArmSmcLib from ArmPlatformLib to ArmPkg
A ArmSmcLib Null implementation has also been added for CPU without the ARM Security
Extension (Trustzone support).

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14164 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-06 00:01:49 +00:00
oliviermartin 1e43cdfdd4 ArmPlatformPkg/PL031RealTimeClockLib: Set PL031_{TimeZone,Daylight} UEFI variables as local
PL031_TimeZone and PL031_Daylight are not global variables as defined by UEFI specification

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14107 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-28 11:59:37 +00:00
oliviermartin d5cd447b1f ArmPlatformPkg: Fixed unsigned type to be architecture independent
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14106 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-28 11:56:33 +00:00
oliviermartin e7072e04e4 ArmPlatformPkg/ArmPlatformLibNull: Added template for ArmPlatformGetCorePosition()
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14105 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-28 11:51:15 +00:00
oliviermartin aeaf64d64d ArmPlatformPkg/Bds/BootMenu.c: Set "Fdt" UEFI variable as local
"Fdt" UEFI variable is not a global variable as defined by UEFI specification.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14104 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-28 11:44:50 +00:00
oliviermartin 72efe0271f ArmPlatformPkg/Scripts: Added '--verbose' support to DS-5 scripts
Verbose mode can also be enabled by the shorter argument '-v'

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14100 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-25 12:14:09 +00:00
oliviermartin 063ad84e20 ArmPlatformPkg/PrePi: Removed magic values
Introduced CPSR (Coprocessor Status Register) definitions

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14097 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-25 12:05:17 +00:00
oliviermartin c3adcc9755 ArmPlatformPkg: Fixed ArmPlatformPkg/ArmPlatform(-2ndstage).dsc builds
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14096 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-25 12:02:59 +00:00
oliviermartin 67fb865cbd ArmPlatformPkg: Replaced FatPkg source package by the pre-built FatPkg binary
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14095 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-25 12:00:33 +00:00
oliviermartin 9127a094fd ArmPlatformPkg/Bds: Fixed the deletion of boot option entries
When deleting a boot entry from the boot menu all next entries must
be copied one entry up to rearrange the BootOrder list.

This patch fixes the copy: each boot entry is 16 bits, not 8 bits.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14090 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-25 11:50:59 +00:00
oliviermartin 1e57a46299 ARM Packages: Fixed line endings
This large code change only modifies the line endings to be CRLF to be
compliant with the EDK2 coding convention document.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14088 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-25 11:28:06 +00:00
oliviermartin 25328e4354 ArmPlatformPkg/Scripts: Fixed the Makefile for Windows
This is the Makefile for the Windows version of Eclipse (use
MingW for Unix 'emulation').

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13886 6f19259b-4bc3-4df7-8a09-765794883524
2012-10-29 14:54:21 +00:00
oliviermartin d5c5ad419e ArmPlatformPkg/Scripts/Ds5: Added missing package declarations in Python scripts
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13876 6f19259b-4bc3-4df7-8a09-765794883524
2012-10-22 15:45:10 +00:00
oliviermartin 6e9ed5b80d ArmPlatformPkg/Scripts/Ds5: Updated DS-5 scripts to be used by DS-5 v5.12
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13875 6f19259b-4bc3-4df7-8a09-765794883524
2012-10-22 14:04:47 +00:00
oliviermartin a8e812dea5 ArmPlatformPkg/Scripts: Added ARM DS-5 scripts to debug UEFI
These scripts allow to automatically load the symbols using either the
report file created by the BaseTools or using the memory regions
defined in the arguments.

This is the scripts for DS-5 prior to DS5 v5.12.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13874 6f19259b-4bc3-4df7-8a09-765794883524
2012-10-22 14:01:38 +00:00
oliviermartin 74418fe963 ArmPlatformPkg/BaseTools-Pending-Patches.patch: Added latest ARMGCC & ARMLINUXGCC updated flags
All these changes are already in BaseTools subversion repository.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>




git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13865 6f19259b-4bc3-4df7-8a09-765794883524
2012-10-18 16:27:14 +00:00
oliviermartin deb8a0615d ArmPlatformPkg/LcdPlatformLib.h: Updated HD mode settings to produce a 60Hz frame rate
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13777 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-28 11:12:13 +00:00
oliviermartin beeb44f425 ArmPlatformPkg/LcdPlatformLib.h: Added support for 'WSXGA+ Mode: 1680 x 1050'
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13776 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-28 11:11:00 +00:00
oliviermartin 295c2eb804 ArmPlatformPkg/ArmVExpress-CTA15-A7: Added support for CoreTile Express A15x2_A7x3
This is the big.LITTLE test chip for ARM Versatile Express Motherboard.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13775 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-28 11:09:36 +00:00
oliviermartin 17839a45b8 ArmPlatformPkg/ArmPlatformStackLib: Introduced helper library to initialize stacks
The new functions are:
- ArmPlatformStackSet(IN UINTN StackBase, IN UINTN MpId, IN UINTN PrimaryStackSize, IN UINTN SecondaryStackSize);
- ArmPlatformStackSetPrimary(IN UINTN StackBase, IN UINTN MpId, IN UINTN PrimaryStackSize, IN UINTN SecondaryStackSize);
- ArmPlatformStackSetSecondary(IN UINTN StackBase, IN UINTN MpId, IN UINTN PrimaryStackSize, IN UINTN SecondaryStackSize);

The stack topology can be changed by implementing a new ArmPlatformStackLib

Signed-off-by: Olivier Martin <olivier.martin@arm.com>




git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13774 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-28 11:01:36 +00:00
oliviermartin 7d49ced0cf EmbeddedPkg: Introduced 'SerialPortExtLib.h'
EmbeddedPkg/SerialDxe was not allowing to set/get the control of the
Serial connection because the needed functions were not exposed in
SerialPortLib.h.
This commit introduces an additional library to extend the SerialPort
features.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13773 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-28 10:56:12 +00:00
oliviermartin 21de944e03 ARM Packages: Moved ARM assembly files to 'Arm' subdirectory
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13772 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-28 10:52:16 +00:00
oliviermartin 145292e4c8 ArmPlatformPkg/EblCmdLib: Added the command 'dumpfdt'
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13771 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-28 10:48:35 +00:00
oliviermartin 0657689b29 ArmPlatformPkg/ArmPlatformLib.h: Introduced ArmPlatformGetCorePosition()
The MP ID Register is not enough to know the position of the core in the SoC.
We could have SoC with multi cluster of CPUs that do not contain the
same number of CPUs.
This function should return the position of the CPU in the SoC.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13770 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-28 10:46:28 +00:00
oliviermartin 695df8ba90 ArmPlatformPkg: Introduction of gArmPlatformTokenSpaceGuid.PcdCoreCount
On ARM PLatforms, there is no standard way to know how many cores are
available on the platform.
This PCD is expected to contain this number.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13769 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-28 10:43:28 +00:00
oliviermartin 0a6653bc2a ArmPkg/BdsLib: Added FDT support for BdsLib
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13768 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-28 09:58:42 +00:00
oliviermartin 619b399888 ArmPkg/DefaultExceptionHandlerLib: Added support to the BASE-type library
This library could be used before the UEFI phases to expose the CPU state
when an unexpected exception interrupt the firmware.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13767 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-28 09:55:48 +00:00
oliviermartin fb47559347 ArmPlatformPkg/PrePi: Moved Exception Vector Table to ArmPkg/DebugAgentBaseLib
In case a DebugAgent library is supported for a specific debugger, we would
expect the exception be caught by DebugAgentLib.
The DebugAgentBaseLib exposes the cause of the exception to the user in the
Serial Terminal.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13766 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-28 09:54:13 +00:00
oliviermartin 9d6b024ded ArmPlatformPkg/Sec: Moved Exception Vector Table to ArmPkg/DebugAgentBaseLib
In case a DebugAgent library is supported for a specific debugger, we would
expect the exception be caught by DebugAgentLib.
The DebugAgentBaseLib exposes the cause of the exception to the user in the
Serial Terminal.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13765 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-28 09:52:11 +00:00
oliviermartin 751915bcd9 ArmPlatformPkg/ArmVExpress-CTA9x4.dsc: Fixed build
Removed unavailable driver.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13761 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-27 22:25:56 +00:00
oliviermartin fa4a706338 EmbeddedPkg: Added support to libfdt
Use the library libdt from the Device Tree Compiler project.
The used version is from Wednesday 22nd August 2012 (commit: 8716901d2215a3)

The Device Tree Compiler project is under dual BSD/GPL license (it means the
license is either BSD or GPL). The BSD license is the license that fits to the
Tianocore contribution requirements.
The use of libfdt into Tianocore has been authorised by David Gibson the
author of libfdt and its current maintainer Jon Loeliger (email thread on 7th
September 2011).

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13760 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-27 16:53:57 +00:00
oliviermartin 8213627ef7 ArmPlatformPkg/Bds: Replaced 'EBL' by 'UEFI Shell' as the default shell on ARM Platforms
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13759 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-27 15:33:10 +00:00
oliviermartin e1772adfef ARM Packages: Replaced the build of Fat driver and EBL by the binaries of Fat driver and UEFI Shell
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13758 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-27 15:31:54 +00:00
oliviermartin b34e4db382 ARM Packages: Minor typo, mispellings and coding style changes
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13752 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-27 13:39:40 +00:00
oliviermartin 68978a52ae ArmPlatformPkg/EblCmdLib: Fixed 'performance' command
Added support for performance counter that counts up or down

Signed-off-by: Olivier Martin <olivier.martin@arm.com>




git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13747 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-26 20:24:10 +00:00
oliviermartin ba8bd8ce71 ArmPlatformPkg/VExpressMotherBoard.h: Added more motherboard definitions
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13746 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-26 20:22:37 +00:00
oliviermartin 554451b2de ArmPlatformPkg/PL011Uart: The PL011 UART fractional part does not need to be zero
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13745 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-26 20:21:20 +00:00
oliviermartin e349327f1a ArmPlatformPkg: Added 'Makefile' to build EDK2 from Makefile based IDE
This makefile can be used to build EDK2 from Eclipse CDT plug-in.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13743 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-26 20:12:55 +00:00
oliviermartin 30d1bcd131 ArmPlatformPkg/Bds: Fixed device path of the default error output device
Replaced 'ConErr' by 'ErrOut'.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13600 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-08 16:47:51 +00:00
oliviermartin cdd3f03236 ArmPlatformPkg/Drivers/PL011Uart: Fixed PL011UartWrite()
Forget to increment pointer.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13591 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-03 17:38:17 +00:00
oliviermartin f2e6099a35 ArmPlatformPkg: Fixed ArmRealViewEb & BeagleBoard builds
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13589 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-02 18:21:16 +00:00
oliviermartin dad28de188 ArmPlatformPkg/PL180MciDxe: Clean code
- Removed duplicated code
- Removed unreachable code

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13588 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-02 14:25:17 +00:00
oliviermartin ebef1b7421 ArmPlatformPkg/PL011Uart: PL011UartWrite() stop to transmit if the buffer is full
Before we were waiting the buffer to be empty before to continue to send data.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13587 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-02 14:22:51 +00:00
oliviermartin 93b429fc21 ArmPlatformPkg/PL180MciDxe: Fixed coding style
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13586 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-02 11:20:37 +00:00
oliviermartin a08dcb2ab1 ArmPlatformPkg/ArmVExpressPkg: Fixed build issue
ConSpillter now requires DxeServicesLib.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13578 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-01 10:07:33 +00:00
oliviermartin b113ddc3d8 ArmPlatformPkg/ArmVExpressLibCTA9x4: Fixed build
Signed-off-by: Olivier Martin <olivier.martin@arm.com>




git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13523 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-11 18:57:31 +00:00
oliviermartin ce88684e2a ARM Packages: Fixed mispellings
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13502 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-04 20:23:21 +00:00
oliviermartin 8cfd2e2457 ArmPlatformPkg/Sec: Fixed Primary Non-Cold Boot Path
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13499 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-04 20:20:21 +00:00
oliviermartin 0dbbacdf18 ArmPlatformPkg/PrePi: Declared the ARM MP Core Info
Registered the gArmMpCoreInfoGuid Data Hob.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13497 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-04 20:17:46 +00:00
oliviermartin 92034e14da ARM Packages: Clean code (Remove unused PCDs, ...)
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13494 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-04 20:12:29 +00:00
oliviermartin a32dae4878 ArmPkg/AsmMacroIoLib: Renamed 'GetCorePositionInStack' macro into 'GetCorePositionFromMpId'
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13493 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-04 20:10:18 +00:00
oliviermartin a75568e9c9 ArmPlatformPkg/Sec: Added support for Non Cold Boot Paths
For instance, in case of CpuHotPlug boot path the platform has already been
initialized. The CPU core should not execute any of the platform initialization
in this case.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13492 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-04 20:08:54 +00:00
oliviermartin 2575b72620 ArmPkg: Fixed RVCT compiler warnings
Signed-off-by: Olivier Martin <olivier.martin@arm.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13490 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-04 20:06:23 +00:00
oliviermartin f8181c90f4 ArmPlatformPkg: Replaced 'ArmGicSecLib' by 'ArmGicLib'
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13265 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 20:19:00 +00:00
oliviermartin 14238a61c8 ArmPlatformPkg/Bds: Fixed Memory Corruption when updating the path of a Linux initrd
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13264 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 20:17:36 +00:00
oliviermartin cfe1bb1765 ArmPlatformPkg/DebugSecExtraActionLib: Added Warning comment to signal the DRAM must be inititalized at this stage
Since the System Memory initialization has been moved inside ArmPlatformSecLib
on some platforms, the use of this library could crash if the firmware engineer
forgot to initialize the DRAM.
This library 'patches' the DRAM to add an infinite loop.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13262 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 20:15:49 +00:00
oliviermartin e314d564db ArmPlatformPkg: Introduced 'ArmPlatformSecLib'
The function only used in Secure Firmware used to be mixed with
the Non-Secure/Normal functions in ArmPlatformLib.
When the Secure Firmware was not required for some platforms (eg:
BeagleBoard), these functions were empty functions.
This new interface has been created to clean the ArmPlatformLib
interface between the SEC and PEI phases.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13260 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 20:13:32 +00:00
oliviermartin 315649cda2 ArmPkg/ArmGicLib: Replaced 'ArmGicAcknowledgeSgiFrom' by 'ArmGicAcknowledgeInterrupt'
The function 'ArmGicAcknowledgeSgiFrom' was actually acknowledging Interrupts (and not only SGIs).


ArmPkg/ArmGicLib: Introduced the PCD PcdGicPrimaryCoreId

This PCD defines the Id of the primary core in the GIC.


Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13259 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 20:09:16 +00:00
oliviermartin 4c19ece32a ArmPkg/ArmGicLib: Changed ArmGicSendSgiTo() to allow to send a specific SGI
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13258 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 20:08:03 +00:00
oliviermartin 40ab42ddca EmbeddedPkg/SerialDxe: Do not block UART when no data is available on the port
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13255 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 20:04:42 +00:00
oliviermartin c54de82204 ArmPlatformPkg/PL35xSmc: Added function PL35xSmcSetRefresh
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13254 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 20:04:00 +00:00
oliviermartin 836c350061 ArmPkg/ArmLib: Added new functions to access ARM coprocessors
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13253 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 20:02:39 +00:00
oliviermartin 7fffeef9be ARM Packages: Fixed th 'NS' (Non Secure) bit in the MMU page Table Descriptor
The 'NS' bit must only be set in Secure world to define the Non-Secure region
of the Non-Secure World.
This bit must not be set in Non-Secure World.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13252 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 20:00:54 +00:00
oliviermartin 96a8bc1150 ArmPkg/PeCoffExtraActionLib: Enabled DS-5 command line when using ARM Toolchain v5
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13251 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 19:58:46 +00:00
oliviermartin b1d41be7c9 ArmPkg/ArmCpuLib: Replaced complex functions ArmCpuSynchronizeWait & ArmCpuSynchronizeSignal by sev & wfe
Previsouly the synchronization of MpCore was using the SGI (Software
Generated Interrupt) to synchronize MpCore during the early boot.
This commit replaced this mechanism by the more appropriate SEV/WFE
instructions (Send/Wait Event instructions).
That also eases the port to a new cpu/platform.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13249 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 19:55:32 +00:00
oliviermartin f463bb00ad ArmPlatformPkg/ArmPlatformGlobalVariableLib: Fixed calculation of GlobalVariableBase
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13248 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 19:54:21 +00:00
oliviermartin 3f305c063a ArmPlatformPkg: Removed the 'Identify' functions
This function was introduced in some drivers to check if the ARM controller
was present in the memory map.
It was using a 8 bit access to get the value from the Identification registers.
These accesses could generate access error on some buses. Instead of replacing
the 8bit access by a 32bit access, these fcuntions have been removed because
they are only useful when the boot firmware is ported on a new platform.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13247 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 19:52:49 +00:00
oliviermartin d9efd68ef5 ArmPlatformPkg/ArmPlatformGlobalVariableLib: Added new function ArmPlatformGetGlobalVariableAddress()
This function returns the address of a Global Variable in the Global Variable Region.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13246 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 19:51:08 +00:00
oliviermartin f437141a9c ArmPlatformPkg: Renamed and Invoked earlier ArmPlatformNormalInitialize()
- ArmPlatformNormalInitialize() has been renamed into ArmPlatformInitialize()
- Make the function be called at the early stage of the PEI phase as some
  platforms require their interconnects or clocks to be initialize before any
  access to Timers or UARTs.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13245 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 19:49:35 +00:00
oliviermartin e9f7c58f25 ArmPkg: Replaced gArmTokenSpaceGuid.PcdGicNumInterrupts by ArmGicGetMaxNumInterrupts()
The maximum number of interrupts can be retrieve through the GIC distributor.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13244 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 19:48:00 +00:00
oliviermartin 82325f95c5 ARM Packages: Minor changes (fixed mispelling, line endings, incorrect comments)
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13243 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 19:46:40 +00:00
oliviermartin ff4d6bb315 ArmPlatformPkg: Fixed build after latest BaseTools syncup
BaseTools now raises an error when a PCD is not declared in a DEC.
This change:
- Remove undeclared PCDs
- Add PCD declaration to DEC file

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13195 6f19259b-4bc3-4df7-8a09-765794883524
2012-04-13 10:17:39 +00:00
oliviermartin 84cf376245 EDK II Packages: Added License.txt files
License.txt is a per-project document showing the license terms
used by that project.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>




git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13194 6f19259b-4bc3-4df7-8a09-765794883524
2012-04-12 16:40:32 +00:00
jljusten ea4ee7ac38 EDK II Packages: Add Contributions.txt and License.txt files
Contributions.txt documents the contribution process for all
tianocore projects. The conents of Contributions.txt should
match in all cases.

License.txt is a per-project document showing the license terms
used by that project.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13187 6f19259b-4bc3-4df7-8a09-765794883524
2012-04-11 23:19:46 +00:00
oliviermartin 37363dff65 ArmPlatformPkg/PrePi: Added Firmware Version String to the 'welcome' statement
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13139 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-26 11:08:32 +00:00
oliviermartin 99744d5219 ArmPlatformPkg/Sec: Change initial 'welcome' string from 'UEFI Firmware' to 'Secure/Boot Firmware'
The 'SEC' component is not part of the UEFI software stack.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13138 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-26 11:06:29 +00:00
oliviermartin e28e0ad9d7 ArmPlatformPkg/SP805WatchdogDxe: Removed late initialization capability from the watchdog
The watchdog driver is a UEFI architectural driver. The watchdog controller
is always going to be intialized.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13137 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-26 11:05:25 +00:00
oliviermartin 8dd9e159b9 ArmPlatformPkg: Fixed gcc build (minor change)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13136 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-26 11:04:25 +00:00
oliviermartin 5e7731443c ArmPlatformPkg/Sec: Allowed the Secondary Cores to set the Secure/Non Secure bits to their PPIs
The GICD_IGROUPR0 is banked for each connected processor. It means the
Non-Secure bits for the PPIs (Private Peripheral Interrupts) must be
configured for every processor.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13135 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-26 11:03:36 +00:00
oliviermartin eac42a514b ArmPlatformPkg/ArmSmcLib: Added helper library to make SMC call to the Secure World
This library adds C-wrapper around the SMC instruction and allows to pass
parameters to the Secure World.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13133 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-26 10:59:50 +00:00
oliviermartin a12da33bc1 ArmPlatformPkg/SP805Watchdog.h: Removed the DXE function declarations from the header
The DXE functions are local to the DXE driver.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13132 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-26 10:58:06 +00:00
oliviermartin 80dfbc1122 ArmPlatformPkg/Sec: Move ArmGicSetupNonSecure() prior to initialize platform-specific security bit
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13127 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-26 10:51:43 +00:00
oliviermartin 59a2b365ea ArmPlatformPkg/Sec: Fixed monitor stack setup
The Secure Monitor stack was not when a stack base was not provided by the Secure SVC world.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13126 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-26 10:49:58 +00:00
oliviermartin 7defe7b354 ArmPlatformPkg/PrePi: Fix comment (minor change)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13125 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-26 10:48:45 +00:00
oliviermartin f15f91a22f ArmPlatformPkg/ArmPlatformGlobalVariableLib: Fixed incorrect type casting
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13121 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-26 10:41:50 +00:00
oliviermartin 793ae6eeb3 ARM Packages: Added the NULL implementation of CpuExceptionHandlerLib
This NULL implementation should not affect the existing code flow and
avoid the builds to be broken by a missing dependency.
In a longer term, an implementation of CpuExceptionHandlerLib should
be provided for ARM architecture.

Signed-off-by: oliviermartin



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13103 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-15 16:03:41 +00:00
oliviermartin af0283b82b ArmPlatformPkg/ArmPlatformSysConfigLib: Removed dependency on Uefi.h since it is a Base Library
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13072 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-29 17:21:17 +00:00
oliviermartin 051e63bb55 ArmPlatformPkg/PL011Uart: Allowed to change UART settings in its initialization function
Because this driver can be used for different purposes (Terminal, Debug port, communication),
its initialization function has been extended to accept additional settings.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13071 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-29 17:19:52 +00:00
oliviermartin 911da88693 ArmPlatformPkg/ArmPlatformSysConfigLib: Add function 'ArmPlatformSysConfigGetValues'
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13066 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-28 17:35:03 +00:00
oliviermartin 68dda854c6 ArmPlatformPkg/NorFlashDxe: Fixed CFI NOR Flash driver
CFI Flash differentiates DeviceBaseAddress with BlockAddress in
its protocol. The DeviceBaseAddress was not considered in the
previous version of this driver.
This version also fixes some bugs in the implementation of the
CFI protocol.

This new version also uses the Boot Mode Hob to reinitialized the
FVB when Boot Mode is equal to BOOT_WITH_DEFAULT_SETTINGS.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13064 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-28 17:32:47 +00:00
oliviermartin e34114ea3f ArmPlatformPkg/Bds: Fixed the size of the unicode string use to represent hexadecimal memory address
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13063 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-28 17:31:17 +00:00
oliviermartin d9c69d99ff ArmPlatformPkg/Sec: Add ASSERT() for checking the Secure Monitor Stack PCD values
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13062 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-28 17:30:20 +00:00
oliviermartin 3d93aeaef8 ArmPlatformPkg/Sec: Move 'ArmPlatformSecExtraAction' before we set NSACR & SCR
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13061 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-28 17:29:41 +00:00
oliviermartin a853088911 ArmPlatformPkg/Sec: Fix transition to Trusted Monitor World with ARMGCC
The enter_monitor_world() function was trashing r0/r1/r2 registers and then
was returning back to 'C'. The compiler might have used these registers in the C code.
These new design prevents register corruptions.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13060 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-28 17:28:44 +00:00
oliviermartin 8cc852f791 ArmPlatformPkg: Move the Secure Monitor initialization into a separate 'ArmTrustedMonitorLib' library
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13059 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-28 17:27:15 +00:00
oliviermartin 1377db63ff ArmPlatformPkg: Updated the stack setup to have the same geometry between the Secure and Normal World
Having a similar setup reduces the error during the MPCore stack setup.
The stack setup is described on this wikipage:
https://sourceforge.net/apps/mediawiki/tianocore/index.php?title=ArmPlatformPkg/Stack



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13058 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-28 17:23:53 +00:00
oliviermartin 2569b06868 ArmPlatformPkg/PrePi: Fixed stack setup when System Memory is mapped upto 0xFFFFFFFF
The stacks must be 32-bit aligned (which is not the case of 0xFFFFFFFF).
This change ensures the stacks are setup properperly in case the system
memory is available at 0xFFFFFFFF.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13057 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-28 17:22:13 +00:00
oliviermartin 65acd8e7b3 ArmPlatformPkg: Moved 'ArmTrustZoneLib' from ArmPkg/Library to ArmPlatformPkg/Drivers
This library is really the driver for the ARM Trustzone controllers (TZPC and TZASC).



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13054 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-28 17:16:58 +00:00
oliviermartin f8c9f1c18c ArmPlatformPkg/LcdGraphicsOutputDxe: Added support for ARM HDLCD controller (2)
... Forgot the new files



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13053 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-28 17:13:30 +00:00
oliviermartin 0db25ccc6c ArmPlatformPkg: Minor code changes (comments, misspellings, coding stylei, line endings)
- Fixed misspellings
- Updated Copyright
- Remove unused sections in INF file
- Fixed incorrect commentsi
- Fixed coding style
- Fixed line endings (CRLR)



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13052 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-28 17:11:42 +00:00
oliviermartin 986223907f ArmPlatformPkg/LcdGraphicsOutputDxe: Added support for ARM HDLCD controller
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13051 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-28 17:09:16 +00:00
oliviermartin 3222e7b1ef ArmPlatformPkg/PrePeiCore: Ensured the size is 8-byte aligned
Once divided by 2, the size should be 4-byte aligned to ensure the
stack pointer is 4-byte aligned.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13044 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-27 10:27:10 +00:00
oliviermartin 782d45d1e3 ArmPlatformPkg/ArmPlatformGlobalVariableLib: Added an assert to ensure the 'VariableOffset' belongs to the GlobalVariable region
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13043 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-27 10:26:16 +00:00
oliviermartin 8ddaf4710c ArmPlatformPkg/SP804TimerDxe: Move 'gVector' initialization earlier in the code
The global variable 'gVector' is also used by the function TimerDriverSetTimerPeriod().



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13042 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-27 10:25:20 +00:00
oliviermartin 91213ad3dd ArmPlatformPkg/Bds: Add support for 'BootCurrent'
The UEFI variable 'BootCurrent' defines the EFI application started by the Boot Manager.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13000 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-09 15:34:16 +00:00
oliviermartin 49a25d8490 ArmPlatformPkg/Bds: Fixed update of boot entries
There were some incorrect pointer calculations.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12999 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-09 15:33:02 +00:00
oliviermartin 0e29bf5c91 ArmPlatformPkg/Bds: Fixed 'BootNext' support
The 'BootNext' environment variable should only contain the index of the 'next' boot entry.
It was containing a complete Boot Option.




git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12998 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-09 15:30:19 +00:00
oliviermartin b148591a8c ArmPlatformPkg/Bds: Fixed memory leak
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12997 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-09 15:29:35 +00:00
oliviermartin 947a14a0a8 ArmPlatformPkg: Fix ARM EB and VE builds
The EDID protocol defintions were missing from their ArmPlatformLcdLib.inf INF files.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12878 6f19259b-4bc3-4df7-8a09-765794883524
2011-12-15 18:54:18 +00:00
oliviermartin 53f39c6c9a ArmPlatformPkg/ArmVExpressPkg: Add PL180 MCI support to ARM RTSM
The MMC controller is accessible through the ARM RTSM model.
A filesystem can be added on a MMC file to be accessible through the 
UEFI firmware running on RTSM.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12862 6f19259b-4bc3-4df7-8a09-765794883524
2011-12-14 10:43:36 +00:00
oliviermartin c7b7c44598 ArmPlatformPkg: Renamed 'DebugSecExtraActionLib' into 'ArmPlatformSecExtraActionLib'
This library interface is not related to adding extra action to debug support.
But it adds extra action to the ArmPlatform/Sec component.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12861 6f19259b-4bc3-4df7-8a09-765794883524
2011-12-14 10:39:07 +00:00