1. 28 Jan, 2020 2 commits
  2. 27 Jan, 2020 1 commit
  3. 24 Jan, 2020 1 commit
    • Masahiro Yamada's avatar
      bl_common: add BL_END macro · 2c74a29d
      Masahiro Yamada authored
      
      
      Currently, the end address macros are defined per BL, like BL2_END,
      BL31_END, BL32_END. They are not handy in the common code shared
      between multiple BL stages.
      
      This commit introduces BL_END, which is equivalent to BL{2,31,32}_END,
      and will be useful for the BL-common code.
      
      Change-Id: I3c39bf6096d99ce920a5b9fa21c0f65456fbfe8a
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      2c74a29d
  4. 23 Jan, 2020 2 commits
  5. 22 Jan, 2020 2 commits
  6. 20 Jan, 2020 8 commits
  7. 15 Jan, 2020 1 commit
    • Luka Kovacic's avatar
      a8k: Implement platform specific power off · 8c11ebfc
      Luka Kovacic authored
      
      
      Implements a way to add platform specific power off code to a
      Marvell Armada 8K platform.
      
      Marvell Armada 8K boards can now add a board/system_power.c file
      that contains a system_power_off() function.
      This function can now send a command to a power management MCU or
      other board periferals before shutting the board down.
      Signed-off-by: default avatarLuka Kovacic <luka.kovacic@sartura.hr>
      Cc: Luka Perkov <luka.perkov@sartura.hr>
      Change-Id: Iaba20bc2f603195679c54ad12c0c18962dd8e3db
      ---
      I am working on a device that will be ported later, which has a
      custom power management MCU that handles LEDs, board power and fans
      and requires this separation.
      8c11ebfc
  8. 10 Jan, 2020 2 commits
    • Yann Gautier's avatar
      io: change seek offset to signed long long · 70cb0bff
      Yann Gautier authored
      
      
      IO seek offset can be set to values above UINT32_MAX, this change
      changes the seek offset argument from 'ssize_t' to 'signed long long'.
      Fixing platform seek functions to match the new interface update.
      
      Change-Id: I25de83b3b7abe5f52a7b0fee36f71e60cac9cfcb
      Signed-off-by: default avatarYann Gautier <yann.gautier@st.com>
      Signed-off-by: default avatarEtienne Carriere <etienne.carriere@st.com>
      Signed-off-by: default avatarLionel Debieve <lionel.debieve@st.com>
      70cb0bff
    • Deepika Bhavnani's avatar
      Unify type of "cpu_idx" across PSCI module. · 5b33ad17
      Deepika Bhavnani authored
      
      
      NOTE for platform integrators:
         API `plat_psci_stat_get_residency()` third argument
         `last_cpu_idx` is changed from "signed int" to the
         "unsigned int" type.
      
      Issue / Trouble points
      1. cpu_idx is used as mix of `unsigned int` and `signed int` in code
      with typecasting at some places leading to coverity issues.
      
      2. Underlying platform API's return cpu_idx as `unsigned int`
      and comparison is performed with platform specific defines
      `PLAFORM_xxx` which is not consistent
      
      Misra Rule 10.4:
      The value of a complex expression of integer type may only be cast to
      a type that is narrower and of the same signedness as the underlying
      type of the expression.
      
      Based on above points, cpu_idx is kept as `unsigned int` to match
      the API's and low-level functions and platform defines are updated
      where ever required
      Signed-off-by: default avatarDeepika Bhavnani <deepika.bhavnani@arm.com>
      Change-Id: Ib26fd16e420c35527204b126b9b91e8babcc3a5c
      5b33ad17
  9. 09 Jan, 2020 2 commits
  10. 03 Jan, 2020 1 commit
    • Vishnu Banavath's avatar
      drivers: add a driver for snoop control unit · c20c0525
      Vishnu Banavath authored
      
      
      The SCU connects one to four Cortex-A5/Cortex-A9 processors
      to the memory system through the AXI interfaces.
      
      The SCU functions are to:
      - maintain data cache coherency between the Cortex-A5/Cortex-A9
        processors
      - initiate L2 AXI memory accesses
      - arbitrate between Cortex-A5/Cortex-A9 processors requesting
        L2 accesses
      - manage ACP accesses.
      
      Snoop Control Unit will enable to snoop on other CPUs caches.
      This is very important when it comes to synchronizing data between
      CPUs. As an example, there is a high chance that data might be
      cache'd and other CPUs can't see the change. In such cases,
      if snoop control unit is enabled, data is synchoronized immediately
      between CPUs and the changes are visible to other CPUs.
      
      This driver provides functionality to enable SCU as well as enabling
      user to know the following
      - number of CPUs present
      - is a particular CPU operating in SMP mode or AMP mode
      - data cache size of a particular CPU
      - does SCU has ACP port
      - is L2CPRESENT
      
      Change-Id: I0d977970154fa60df57caf449200d471f02312a0
      Signed-off-by: default avatarVishnu Banavath <vishnu.banavath@arm.com>
      c20c0525
  11. 30 Dec, 2019 1 commit
    • Andre Przywara's avatar
      console: 16550: Prepare for skipping initialisation · cd50ffd2
      Andre Przywara authored
      
      
      On some platforms the UART might have already been initialised, for
      instance by firmware running before TF-A or by a separate management
      processor. In this case it would not be need to initialise it again
      (doing so could create spurious characters). But more importantly this
      saves us from knowing the right baudrate and the right base clock rate
      for the UART. This can lead to more robust and versatile firmware builds.
      
      Allow to skip the 16550 UART initialisation and baud rate divisor
      programming, by interpreting an input clock rate of "0" to signify this
      case. This will just skip the call to console_16550_core_init, but still
      will register the console properly.
      
      Users should just pass 0 as the second parameter, the baudrate (third
      parameter) will then be ignored as well.
      
      Fix copy & paste typos in comments for the console_16550_register()
      function on the way.
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      Change-Id: I9f8fca5b358f878fac0f31dc411358fd160786ee
      cd50ffd2
  12. 29 Dec, 2019 1 commit
    • Samuel Holland's avatar
      bl31: Split into two separate memory regions · f8578e64
      Samuel Holland authored
      
      
      Some platforms are extremely memory constrained and must split BL31
      between multiple non-contiguous areas in SRAM. Allow the NOBITS
      sections (.bss, stacks, page tables, and coherent memory) to be placed
      in a separate region of RAM from the loaded firmware image.
      
      Because the NOBITS region may be at a lower address than the rest of
      BL31, __RW_{START,END}__ and __BL31_{START,END}__ cannot include this
      region, or el3_entrypoint_common would attempt to invalidate the dcache
      for the entire address space. New symbols __NOBITS_{START,END}__ are
      added when SEPARATE_NOBITS_REGION is enabled, and the dcached for the
      NOBITS region is invalidated separately.
      Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
      Change-Id: Idedfec5e4dbee77e94f2fdd356e6ae6f4dc79d37
      f8578e64
  13. 23 Dec, 2019 2 commits
  14. 20 Dec, 2019 5 commits
    • Paul Beesley's avatar
      spm-mm: Remove mm_svc.h header · 962c44e7
      Paul Beesley authored
      
      
      The contents of this header have been merged into the spm_mm_svc.h
      header file.
      
      Change-Id: I01530b2e4ec1b4c091ce339758025e2216e740a4
      Signed-off-by: default avatarPaul Beesley <paul.beesley@arm.com>
      962c44e7
    • Paul Beesley's avatar
      spm-mm: Refactor spm_svc.h and its contents · 0bf9f567
      Paul Beesley authored
      
      
      Change-Id: I91c192924433226b54d33e57d56d146c1c6df81b
      Signed-off-by: default avatarPaul Beesley <paul.beesley@arm.com>
      0bf9f567
    • Paul Beesley's avatar
      spm-mm: Refactor secure_partition.h and its contents · aeaa225c
      Paul Beesley authored
      
      
      Before adding any new SPM-related components we should first do
      some cleanup around the existing SPM-MM implementation. The aim
      is to make sure that any SPM-MM components have names that clearly
      indicate that they are MM-related. Otherwise, when adding new SPM
      code, it could quickly become confusing as it would be unclear to
      which component the code belongs.
      
      The secure_partition.h header is a clear example of this, as the
      name is generic so it could easily apply to any SPM-related code,
      when it is in fact SPM-MM specific.
      
      This patch renames the file and the two structures defined within
      it, and then modifies any references in files that use the header.
      
      Change-Id: I44bd95fab774c358178b3e81262a16da500fda26
      Signed-off-by: default avatarPaul Beesley <paul.beesley@arm.com>
      aeaa225c
    • Paul Beesley's avatar
      spm: Remove SPM Alpha 1 prototype and support files · 538b0020
      Paul Beesley authored
      
      
      The Secure Partition Manager (SPM) prototype implementation is
      being removed. This is preparatory work for putting in place a
      dispatcher component that, in turn, enables partition managers
      at S-EL2 / S-EL1.
      
      This patch removes:
      
      - The core service files (std_svc/spm)
      - The Resource Descriptor headers (include/services)
      - SPRT protocol support and service definitions
      - SPCI protocol support and service definitions
      
      Change-Id: Iaade6f6422eaf9a71187b1e2a4dffd7fb8766426
      Signed-off-by: default avatarPaul Beesley <paul.beesley@arm.com>
      Signed-off-by: default avatarArtsem Artsemenka <artsem.artsemenka@arm.com>
      538b0020
    • Paul Beesley's avatar
      Remove dependency between SPM_MM and ENABLE_SPM build flags · 3f3c341a
      Paul Beesley authored
      
      
      There are two different implementations of Secure Partition
      management in TF-A. One is based on the "Management Mode" (MM)
      design, the other is based on the Secure Partition Client Interface
      (SPCI) specification. Currently there is a dependency between their
      build flags that shouldn't exist, making further development
      harder than it should be. This patch removes that
      dependency, making the two flags function independently.
      
      Before: ENABLE_SPM=1 is required for using either implementation.
              By default, the SPCI-based implementation is enabled and
              this is overridden if SPM_MM=1.
      
      After: ENABLE_SPM=1 enables the SPCI-based implementation.
             SPM_MM=1 enables the MM-based implementation.
             The two build flags are mutually exclusive.
      
      Note that the name of the ENABLE_SPM flag remains a bit
      ambiguous - this will be improved in a subsequent patch. For this
      patch the intention was to leave the name as-is so that it is
      easier to track the changes that were made.
      
      Change-Id: I8e64ee545d811c7000f27e8dc8ebb977d670608a
      Signed-off-by: default avatarPaul Beesley <paul.beesley@arm.com>
      3f3c341a
  15. 18 Dec, 2019 1 commit
  16. 17 Dec, 2019 2 commits
  17. 16 Dec, 2019 1 commit
    • Bence Szépkúti's avatar
      libc: Fix SIZE_MAX on AArch32 · ae4a90f2
      Bence Szépkúti authored
      
      
      SIZE_MAX was mistakenly redefined from UINT32_MAX to UINT64_MAX
      on AArch32 when the arch-specific headers were merged.
      
      This value is not currently used by upstream TF-A source code,
      so no functionality should be affected.
      
      Change-Id: I2acf7f8736423697c7377e8ed4b08843ced26e66
      Signed-off-by: default avatarBence Szépkúti <bence.szepkuti@arm.com>
      ae4a90f2
  18. 14 Dec, 2019 2 commits
    • Samuel Holland's avatar
      allwinner: Convert AXP803 regulator setup code into a driver · 0bc752c9
      Samuel Holland authored
      
      
      Previously, the A64/H5 and H6 platforms' PMIC setup code was entirely
      independent. However, some H6 boards also need early regulator setup.
      
      Most of the register interface and all of the device tree traversal code
      can be reused between the AXP803 and AXP805. The main difference is the
      hardware bus interface, so that part is left to the platforms. The
      remainder is moved into a driver.
      
      I factored out the bits that were obviously specific to the AXP803;
      additional changes for compatibility with other PMICs can be made as
      needed.
      
      The only functional change is that rsb_init() now checks the PMIC's chip
      ID register against the expected value. This was already being done in
      the H6 version of the code.
      Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
      Change-Id: Icdcf9edd6565f78cccc503922405129ac27e08a2
      0bc752c9
    • Samuel Holland's avatar
      drivers: allwinner: axp: Add AXP805 support · f6d9c4ca
      Samuel Holland authored
      
      
      This adds the new regulator list, as well as changes to make the switch
      (equivalent to DC1SW on the AXP803) work on both PMICs.
      Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
      Change-Id: I9a1eac8ddfc54b27096c10a8eebdd51aaf9b8311
      f6d9c4ca
  19. 12 Dec, 2019 1 commit
    • Manish Pandey's avatar
      PIE: make call to GDT relocation fixup generalized · da90359b
      Manish Pandey authored
      When a Firmware is complied as Position Independent Executable it needs
      to request GDT fixup by passing size of the memory region to
      el3_entrypoint_common macro.
      The Global descriptor table fixup will be done early on during cold boot
      process of primary core.
      
      Currently only BL31 supports PIE, but in future when BL2_AT_EL3 will be
      compiled as PIE, it can simply pass fixup size to the common el3
      entrypoint macro to fixup GDT.
      
      The reason for this patch was to overcome the bug introduced by SHA
      330ead80
      
       which called fixup routine for each core causing
      re-initializing of global pointers thus overwriting any changes
      done by the previous core.
      
      Change-Id: I55c792cc3ea9e7eef34c2e4653afd04572c4f055
      Signed-off-by: default avatarManish Pandey <manish.pandey2@arm.com>
      da90359b
  20. 11 Dec, 2019 2 commits