1. 20 Apr, 2021 8 commits
  2. 25 Feb, 2021 2 commits
  3. 24 Feb, 2021 1 commit
  4. 11 Feb, 2021 2 commits
  5. 29 Jan, 2021 10 commits
  6. 28 Jan, 2021 1 commit
  7. 11 Jan, 2021 1 commit
    • Marek Behún's avatar
      plat: marvell: armada: a3k: improve 4GB DRAM usage from 3.375 GB to 3.75 GB · b04921f7
      Marek Behún authored
      
      
      The current configuration of CPU windows on Armada 37x0 with 4 GB DRAM
      can only utilize 3.375 GB of memory. This is because there are only 5
      configuration windows, configured as such (in hexadecimal, also showing
      ranges not configurable by CPU windows):
      
               0 - 80000000 |   2 GB | DDR  | CPU window 0
        80000000 - C0000000 |   1 GB | DDR  | CPU window 1
        C0000000 - D0000000 | 256 MB | DDR  | CPU window 2
        D0000000 - D2000000 |  32 MB |      | Internal regs
            empty space     |        |      |
        D8000000 - D8010000 |  64 KB |      | CCI regs
            empty space     |        |      |
        E0000000 - E8000000 | 128 MB | DDR  | CPU window 3
        E8000000 - F0000000 | 128 MB | PCIe | CPU window 4
            empty space     |        |      |
        FFF00000 - end      |  64 KB |      | Boot ROM
      
      This can be improved by taking into account that:
      - CCI window can be moved (the base address is only hardcoded in TF-A;
        U-Boot and Linux will not break with changing of this address)
      - PCIe window can be moved (upstream U-Boot can change device-tree
        ranges of PCIe if PCIe window is moved)
      
      Change the layout after the Internal regs as such:
      
        D2000000 - F2000000 | 512 MB | DDR  | CPU window 3
        F2000000 - FA000000 | 128 MB | PCIe | CPU window 4
            empty space     |        |      |
        FE000000 - FE010000 |  64 KB |      | CCI regs
            empty space     |        |      |
        FFF00000 - end      |  64 KB |      | Boot ROM
      
      (Note that CCI regs base address is moved from D8000000 to FE000000 in
       all cases, not only for the configuration with 4 GB of DRAM. This is
       because TF-A is built with this address as a constant, so we cannot
       change this address at runtime only on some boards.)
      
      This yields 3.75 GB of usable RAM.
      
      Moreover U-Boot can theoretically reconfigure the PCIe window to DDR if
      it discovers that no PCIe card is connected. This can add another 128 MB
      of DRAM (resulting only in 128 MB of DRAM not being used).
      Signed-off-by: default avatarMarek Behún <marek.behun@nic.cz>
      Change-Id: I4ca1999f852f90055fac8b2c4f7e80275a13ad7e
      b04921f7
  8. 07 Jan, 2021 1 commit
    • Pali Rohár's avatar
      Makefile: Do not mark file targets as .PHONY target · a9812206
      Pali Rohár authored
      
      
      Only non-file targets should be set a .PHONY. Otherwise if file target is
      set as .PHONY then targets which depends on those file .PHONY targets would
      be always rebuilt even when their prerequisites are not changed.
      
      File target which needs to be always rebuilt can be specified in Make
      system via having a prerequisite on some .PHONY target, instead of marking
      whole target as .PHONY. In Makefile projects it is common to create empty
      .PHONY target named FORCE for this purpose.
      
      This patch changes all file targets which are set as .PHONY to depends on
      new .PHONY target FORCE, to ensure that these file targets are always
      rebuilt (as before). Basically they are those targets which calls external
      make subprocess.
      
      After FORCE target is specified in main Makefile, remove it from other
      Makefile files to prevent duplicate definitions.
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: Iee3b4e0de93879b95eb29a1745a041538412e69e
      a9812206
  9. 05 Jan, 2021 1 commit
    • Marek Behún's avatar
      plat: marvell: armada: a3k: support doing system reset via CM3 secure coprocessor · d9243f26
      Marek Behún authored
      
      
      Introduce a new build option CM3_SYSTEM_RESET for A3700 platform, which,
      when enabled, adds code to the PSCI reset handler to try to do system
      reset by the WTMI firmware running on the Cortex-M3 secure coprocessor.
      (This function is exposed via the mailbox interface.)
      
      The reason is that the Turris MOX board has a HW bug which causes reset
      to hang unpredictably. This issue can be solved by putting the board in
      a specific state before reset.
      Signed-off-by: default avatarMarek Behún <marek.behun@nic.cz>
      Change-Id: I3f60b9f244f334adcd33d6db6a361fbc8b8d209f
      d9243f26
  10. 07 Dec, 2020 9 commits
  11. 19 Nov, 2020 3 commits
    • Pali Rohár's avatar
      plat: marvell: Update SUBVERSION to match Marvell's forked version · d22db1b0
      Pali Rohár authored
      
      
      Marvell's TF-A fork has SUBVERSION set to devel-18.12.2.
      
      The only differences between Marvell's devel-18.12.0 and devel-18.12.2
      versions are documentation updates and cherry-picked patches from TF-A
      upstream repository.
      
      So upstream TF-A has already all changes from Marvell's TF-A devel-18.12.2
      fork and therefore update SUBVERSION to reflect this state.
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: I5ce946a5176a5cbf124acd8037392463d586b072
      d22db1b0
    • Pali Rohár's avatar
      plat: marvell: armada: Add new target mrvl_bootimage · 91bc2da7
      Pali Rohár authored
      
      
      This new target builds boot-image.bin binary as described in documentation.
      This image does not contain WTMI image and therefore WTP repository is not
      required for building.
      
      Having ability to build just this boot-image.bin binary without full
      flash-image.bin is useful for A3720 Turris MOX board which does not use
      Marvell's WTP and a3700_utils.
      
      To reduce duplicity between a8k and a3k code, define this new target and
      also definitions for $(BUILD_PLAT)/$(BOOT_IMAGE) in common include file
      marvell_common.mk.
      
      For this purpose it is needed to include plat/marvell/marvell.mk file from
      a3700_common.mk unconditionally (and not only when WTP is defined). Now
      when common file plat/marvell/marvell.mk does not contain definition for
      building $(DOIMAGETOOL), it is possible to move its inclusion at the top of
      the a3700_common.mk file.
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: Ic58303b37a1601be9a06ff83b7a279cb7cfc8280
      91bc2da7
    • Pali Rohár's avatar
      plat: marvell: armada: a3k: Add support for building $(DOIMAGETOOL) · c6a7ab77
      Pali Rohár authored
      Current binary wtptp/linux/tbb_linux which is specified in $(DOIMAGETOOL)
      variable points to external pre-compiled Marvell x86_64 ELF linux binary
      from A3700-utils-marvell WTP repository.
      
      It means that currently it is not possible to compile TF-A for A3720 on
      other host platform then linux x86_64.
      
      Part of the A3700-utils-marvell WTP repository is also source code of
      $(DOIMAGETOOL) TBB_Linux tool.
      
      This change adds support for building $(DOIMAGETOOL) also for a3k platform.
      
      After running $(MAKE) at appropriate subdirectory of A3700-utils-marvell
      WTP repository, compiled TBB_linux tool will appear in WTP subdirectory
      wtptp/src/TBB_Linux/release/. So update also $(DOIMAGETOOL) variable to
      point to the correct location where TBB_linux was built.
      
      To build TBB_linux it is required to compile external Crypto++ library
      which is available at: https://github.com/weidai11/cryptopp.git
      
      
      
      User needs to set CRYPTOPP_PATH option to specify path to that library.
      
      After this change it is now possible to build whole firmware for A3720
      platform without requirement to use pre-compiled/proprietary x86_64
      executable binaries from Marvell.
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: I6f26bd4356778a2f8f730a223067a2e550e6c8e0
      c6a7ab77
  12. 21 Oct, 2020 1 commit
    • Pali Rohár's avatar
      plat: marvell: armada: Building ${DOIMAGETOOL} is only for a8k · b5e3d540
      Pali Rohár authored
      
      
      Currently a3k target is misusing ${DOIMAGETOOL} target for building flash
      and UART images. It is not used for building image tool.
      
      So move ${DOIMAGETOOL} target from common marvell include file into a8k
      include file and add correct invocation of ${MAKE} into a3k for building
      flash and UART images.
      
      Part of this change is also checks that MV_DDR_PATH for a3k was specified
      by user as this option is required for building a3k flash and UART images.
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: I5ae9d08b8505460933f17836c9b6435fd6e51bb6
      b5e3d540