1. 07 Nov, 2018 1 commit
    • Sandrine Bailleux's avatar
      Arm platforms: Fix DRAM address macros · 3d449de0
      Sandrine Bailleux authored
      
      
      On AArch32, ARM_DRAM1_BASE and ARM_DRAM1_SIZE constants are currently
      32-bit values (because they are suffixed with UL and the value
      0x80000000 fits in a unsigned long int, i.e. a 32-bit value). When
      summing them up, the result overflows the maximum value that can be
      encoded in a 32-bit value so it wraps around and does not result in
      the expected value.
      
      This patch changes the suffix of these constants into ULL so that they
      always are 64-bit values.
      
      Change-Id: I3b19b1805e35cc7e43050458df379081b1e882d5
      Signed-off-by: default avatarSandrine Bailleux <sandrine.bailleux@arm.com>
      3d449de0
  2. 02 Nov, 2018 3 commits
  3. 01 Nov, 2018 4 commits
  4. 31 Oct, 2018 1 commit
    • Konstantin Porotchkin's avatar
      plat: marvell: Add support for Armada-37xx SoC platform · 1e66bacb
      Konstantin Porotchkin authored
      
      
      Add supprot for Marvell platforms based on Armada-37xx SoC.
      This includes support for the official Armada-3720 modular
      development board and EspressoBin community board.
      The Armada-37xx SoC contains dual Cortex-A53 Application CPU,
      single secure CPU (Cortex-M3) and the following interfaces:
      - SATA 3.0
      - USB 3.0 and USB 2.0
      - PCIe
      - SDIO (supports boot from eMMC)
      - SPI
      - UART
      - I2c
      - Gigabit Ethernet
      Signed-off-by: default avatarKonstantin Porotchkin <kostap@marvell.com>
      1e66bacb
  5. 30 Oct, 2018 1 commit
    • Antonio Nino Diaz's avatar
      libfdt: Downgrade to version 1.4.6-9 · 00f588bf
      Antonio Nino Diaz authored
      
      
      Version 1.4.7 introduces a big performance hit to functions that access
      the FDT. Downgrade the library to version 1.4.6-9, before the changes
      that introduce the problem. Version 1.4.6 isn't used because one of the
      libfdt files (fdt_overlay.c) is missing the license header. This
      problem is also fixed in 1.4.6-9.
      
      This version corresponds to commit <aadd0b65c987> checks: centralize
      printing of property names in failure messages.
      
      Fixes ARM-software/tf-issues#643
      
      Change-Id: I73c05f2b1f994bcdcc4366131ce0647553cdcfb8
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      00f588bf
  6. 29 Oct, 2018 8 commits
    • Antonio Nino Diaz's avatar
      Fix MISRA defects in PMF · 195e363f
      Antonio Nino Diaz authored
      
      
      No functional changes.
      
      Change-Id: I64abd72026082218a40b1a4b8f7dc26ff2478ba6
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      195e363f
    • Antonio Nino Diaz's avatar
      Fix MISRA defects in workaround and errata framework · 43534997
      Antonio Nino Diaz authored
      
      
      No functional changes.
      
      Change-Id: Iaab0310848be587b635ce5339726e92a50f534e0
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      43534997
    • Antonio Nino Diaz's avatar
      plat/arm: Fix MISRA defects in SiP SVC handler · 15b94cc1
      Antonio Nino Diaz authored
      
      
      No functional changes.
      
      Change-Id: I9b9f8d3dfde08d57706ad5450de6ff858a55ac01
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      15b94cc1
    • Antonio Nino Diaz's avatar
      Fix MISRA defects in extension libs · 40daecc1
      Antonio Nino Diaz authored
      
      
      No functional changes.
      
      Change-Id: I2f28f20944f552447ac4e9e755493cd7c0ea1192
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      40daecc1
    • Soby Mathew's avatar
      PIE: Position Independant Executable support for BL31 · 931f7c61
      Soby Mathew authored
      
      
      This patch introduces Position Independant Executable(PIE) support
      in TF-A. As a initial prototype, only BL31 can support PIE. A trivial
      dynamic linker is implemented which supports fixing up Global Offset
      Table(GOT) and Dynamic relocations(.rela.dyn). The fixup_gdt_reloc()
      helper function implements this linker and this needs to be called
      early in the boot sequence prior to invoking C functions. The GOT is
      placed in the RO section of BL31 binary for improved security and the
      BL31 linker script is modified to export the appropriate symbols
      required for the dynamic linker.
      
      The C compiler always generates PC relative addresses to linker symbols
      and hence referencing symbols exporting constants are a problem when
      relocating the binary. Hence the reference to the
      `__PERCPU_TIMESTAMP_SIZE__` symbol in PMF is removed and is now calculated
      at runtime based on start and end addresses.
      
      Change-Id: I1228583ff92cf432963b7cef052e95d995cca93d
      Signed-off-by: default avatarSoby Mathew <soby.mathew@arm.com>
      931f7c61
    • Soby Mathew's avatar
      Make errata reporting mandatory for CPU files · 12af5ed4
      Soby Mathew authored
      
      
      Previously the errata reporting was optional for CPU operation
      files and this was achieved by making use of weak reference to
      resolve to 0 if the symbol is not defined. This is error prone
      when adding new CPU operation files and weak references are
      problematic when fixing up dynamic relocations. Hence this patch
      removes the weak reference and makes it mandatory for the CPU
      operation files to define the errata reporting function.
      
      Change-Id: I8af192e19b85b7cd8c7579e52f8f05a4294e5396
      Signed-off-by: default avatarSoby Mathew <soby.mathew@arm.com>
      12af5ed4
    • Soby Mathew's avatar
      PIE: Use PC relative adrp/adr for symbol reference · f1722b69
      Soby Mathew authored
      
      
      This patch fixes up the AArch64 assembly code to use
      adrp/adr instructions instead of ldr instruction for
      reference to symbols. This allows these assembly
      sequences to be Position Independant. Note that the
      the reference to sizes have been replaced with
      calculation of size at runtime. This is because size
      is a constant value and does not depend on execution
      address and using PC relative instructions for loading
      them makes them relative to execution address. Also
      we cannot use `ldr` instruction to load size as it
      generates a dynamic relocation entry which must *not*
      be fixed up and it is difficult for a dynamic loader
      to differentiate which entries need to be skipped.
      
      Change-Id: I8bf4ed5c58a9703629e5498a27624500ef40a836
      Signed-off-by: default avatarSoby Mathew <soby.mathew@arm.com>
      f1722b69
    • Soby Mathew's avatar
      Add helper to return reference to a symbol · 6a7b3005
      Soby Mathew authored
      
      
      This patch adds a utility function to return
      the address of a symbol. By default, the compiler
      generates adr/adrp instruction pair to return
      the reference and this utility is used to override
      this compiler generated to code and use `ldr`
      instruction.
      
      This is needed for Position Independent Executable
      when it needs to reference a symbol which is constant
      and does not depend on the execute address of the
      binary.
      
      For example, on the FVP, the GICv3 register context is
      stored in a secure carveout (arm_el3_tzc_dram) within
      DDR and does not relocate with the BL image. Now if
      BL31 is executing at a different address other than
      the compiled address, using adrp/adr instructions to
      reference this memory will not work as they generate an
      address that is PC relative. The way to get around this
      problem is to reference it as non-PC relative (i.e
      non-relocatable location) via `ldr` instruction.
      
      Change-Id: I5008a951b007144258121690afb68dc8e12ee6f7
      Signed-off-by: default avatarSoby Mathew <soby.mathew@arm.com>
      6a7b3005
  7. 26 Oct, 2018 4 commits
  8. 23 Oct, 2018 4 commits
  9. 20 Oct, 2018 1 commit
    • Andre Przywara's avatar
      allwinner: Add RSB driver · 103f19f0
      Andre Przywara authored
      
      
      The "Reduced Serial Bus" is an Allwinner specific bus, bearing many
      similarities with I2C. It sports a much higher bus frequency, though,
      (typically 3 MHz) and requires much less handholding for the typical
      task of manipulating slave registers (fire-and-forget).
      On most A64 boards this bus is used to connect the PMIC to the SoC.
      
      This driver provides basic primitives to read and write slave registers,
      it will be later used by the PMIC code.
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      103f19f0
  10. 19 Oct, 2018 1 commit
    • Soby Mathew's avatar
      Multi-console: Deprecate the `finish_console_register` macro · cc5859ca
      Soby Mathew authored
      
      
      The `finish_console_register` macro is used by the multi console
      framework to register the `console_t` driver callbacks. It relied
      on weak references to the `ldr` instruction to populate 0 to the
      callback in case the driver has not defined the appropriate
      function. Use of `ldr` instruction to load absolute address to a
      reference makes the binary position dependant. These instructions
      should be replaced with adrp/adr instruction for position independant
      executable(PIE). But adrp/adr instructions don't work well with weak
      references as described in GNU ld bugzilla issue 22589.
      
      This patch defines a new version of `finish_console_register` macro
      which can spcify which driver callbacks are valid and deprecates the
      old one. If any of the argument is not specified, then the macro
      populates 0 for that callback. Hence the functionality of the previous
      deprecated macro is preserved. The USE_FINISH_CONSOLE_REG_2 define
      is used to select the new variant of the macro and will be removed
      once the deprecated variant is removed.
      
      All the upstream console drivers have been migrated to use the new
      macro in this patch.
      
      NOTE: Platforms be aware that the new variant of the
      `finish_console_register` should be used and the old variant is
      deprecated.
      
      Change-Id: Ia6a67aaf2aa3ba93932992d683587bbd0ad25259
      Signed-off-by: default avatarSoby Mathew <soby.mathew@arm.com>
      cc5859ca
  11. 18 Oct, 2018 2 commits
  12. 16 Oct, 2018 2 commits
  13. 15 Oct, 2018 5 commits
  14. 11 Oct, 2018 3 commits
    • Sathees Balya's avatar
      plat/arm: Fix misra warnings in platform code · 89509904
      Sathees Balya authored
      
      
      Change-Id: Ica944acc474a099219d50b041cfaeabd4f3d362f
      Signed-off-by: default avatarSathees Balya <sathees.balya@arm.com>
      89509904
    • Sandrine Bailleux's avatar
      Introduce object pool allocator · 9cc4651c
      Sandrine Bailleux authored
      
      
      The object pool allocator provides a simplistic interface to manage
      allocation in a fixed-size static array. The caller creates a static
      "object pool" out of such an array and may then call pool_alloc() to
      get the next available object within the pool. There is also a variant
      to get multiple consecutive objects: pool_alloc_n().
      
      Note that this interface does not provide any way to free the objects
      afterwards. This is by design and it is not a limitation. We do not
      want to introduce complexity induced by memory freeing, such as
      use-after-free bugs, memory fragmentation and so on.
      
      Change-Id: Iefc2e153767851fbde5841a295f92ae48adda71f
      Signed-off-by: default avatarSandrine Bailleux <sandrine.bailleux@arm.com>
      9cc4651c
    • Antonio Nino Diaz's avatar
      plat/arm: Remove file arm_board_def.h · 0f58d4f2
      Antonio Nino Diaz authored
      
      
      This file is shared between FVP and all CSS platforms. While it may be
      true that some definitions can be common, it doesn't make sense
      conceptually. For example, the stack size depends on the platform and so
      does the SRAM size.
      
      After removing them, there are not enough common definitions to justify
      having this header, so the other definitions have been moved to the
      platform_def.h of FVP, board_css_def.h and arm_def.h.
      
      Change-Id: Ifbf4b017227f9dfefa1a430f67d7d6baae6a4ba1
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      0f58d4f2