1. 02 Apr, 2020 1 commit
    • Masahiro Yamada's avatar
      Pass more -D options to BL*_CPPFLAGS instead of BL*_CFLAGS · 9cefb4b1
      Masahiro Yamada authored
      Commit d5e97a1d ("Build: define IMAGE_AT_EL1 or IMAGE_AT_EL3
      globally for C files") does not have commit 848a7e8c ("Build:
      introduce per-BL CPPFLAGS and ASFLAGS") as an ancestor because
      they were pulled almost at the same time.
      
      This is a follow-up conversion to be consistent with commit
      11a3c5ee
      
       ("plat: pass -D option to BL*_CPPFLAGS instead of
      BL*_CFLAGS").
      
      With this change, the command line option, IMAGE_AT_EL3, will be
      passed to .S files as well.
      
      I remove the definition in include/lib/cpus/aarch64/cpu_macros.S
      
      Otherwise, the following error would happen.
      
        include/lib/cpus/aarch64/cpu_macros.S:29:0: error: "IMAGE_AT_EL3" redefined [-Werror]
      
      Change-Id: I943c8f22356483c2ae3c57b515c69243a8fa6889
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      9cefb4b1
  2. 01 Apr, 2020 1 commit
  3. 30 Mar, 2020 1 commit
    • Alexei Fedorov's avatar
      TF-A GICv3 driver: Introduce makefile · a6ea06f5
      Alexei Fedorov authored
      
      
      This patch moves all GICv3 driver files into new added
      'gicv3.mk' makefile for the benefit of the generic driver
      which can evolve in the future without affecting platforms.
      The patch adds GICv3 driver configuration flags
      'GICV3_IMPL', 'GICV3_IMPL_GIC600_MULTICHIP' and
      'GICV3_OVERRIDE_DISTIF_PWR_OPS' described in
      'GICv3 driver options' section of 'build-option.rst'
      document.
      
      NOTE: Platforms with GICv3 driver need to be modified to
      include 'drivers/arm/gic/v3/gicv3.mk' in their makefiles.
      
      Change-Id: If055f6770ff20f5dee5a3c99ae7ced7cdcac5c44
      Signed-off-by: default avatarAlexei Fedorov <Alexei.Fedorov@arm.com>
      a6ea06f5
  4. 10 Mar, 2020 1 commit
  5. 24 Jan, 2020 2 commits
    • Masahiro Yamada's avatar
      uniphier: make all BL images completely position-independent · 7af21317
      Masahiro Yamada authored
      
      
      This platform supports multiple SoCs. The next SoC will still keep
      quite similar architecture, but the memory base will be changed.
      
      The ENABLE_PIE improves the maintainability and usability. You can reuse
      a single set of BL images for other SoC/board without re-compiling TF-A
      at all. This will also keep the code cleaner because it avoids #ifdef
      around various base addresses.
      
      By defining ENABLE_PIE, BL2_AT_EL3, BL31, and BL32 (TSP) are really
      position-independent now. You can load them anywhere irrespective of
      their link address.
      
      Change-Id: I8d5e3124ee30012f5b3bfa278b0baff8efd2fff7
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      7af21317
    • Masahiro Yamada's avatar
      uniphier: turn on ENABLE_PIE · 66b9d889
      Masahiro Yamada authored
      
      
      Now that various issues in the PIE support have been fixed,
      this platform can enable ENABLE_PIE.
      
      I tested BL2_AT_EL3, BL31, TSP, and all of them worked.
      
      Change-Id: Ibc499c6bad30b7f81a42bfa7e435ce25f820bd9c
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      66b9d889
  6. 25 Dec, 2019 1 commit
  7. 05 Jul, 2019 1 commit
    • Masahiro Yamada's avatar
      uniphier: support console based on multi-console · ac9f1b55
      Masahiro Yamada authored
      
      
      The legacy console is gone. Re-add the console support based on the
      multi-console framework.
      
      I am still keeping the putc, getc, and flush callbacks in
      uniphier_console.S to use plat/common/aarch64/crash_console_helpers.S
      
      The console registration code already relies on that C environment
      has been set up. So, I just filled the struct console fields with the
      callback pointers, then called console_register() directly. I also
      re-implemented the init function in C to improve the readability.
      
      Removing the custom crash console implementation has one disadvantage;
      we cannot use the crash console on very early crashes because
      crash_console_helpers.S works only after the console is registered.
      I can live with this limitation.
      
      Tested on my boards, and confirmed this worked like before.
      
      Change-Id: Ieab9c849853ff6c525c15ea894a85944f257db59
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      ac9f1b55
  8. 01 Feb, 2019 1 commit
  9. 28 Sep, 2018 1 commit
  10. 01 Feb, 2018 1 commit
  11. 24 Jan, 2018 2 commits
  12. 22 Jan, 2018 1 commit
  13. 04 Jan, 2018 1 commit
  14. 20 Dec, 2017 1 commit
  15. 30 Nov, 2017 1 commit
    • David Cunado's avatar
      Do not enable SVE on pre-v8.2 platforms · 3872fc2d
      David Cunado authored
      
      
      Pre-v8.2 platforms such as the Juno platform does not have
      the Scalable Vector Extensions implemented and so the build
      option ENABLE_SVE is set to zero.
      
      This has a minor performance improvement with no functional
      impact.
      
      Change-Id: Ib072735db7a0247406f8b60e325b7e28b1e04ad1
      Signed-off-by: default avatarDavid Cunado <david.cunado@arm.com>
      3872fc2d
  16. 06 Nov, 2017 1 commit
    • Masahiro Yamada's avatar
      uniphier: make sure to create build directory before ROT key · 3c946152
      Masahiro Yamada authored
      
      
      Building the UniPhier platform in parallel with TRUSTED_BOARD_BOOT=1
      could fail due to non-existing directory.  It might be difficult to
      reproduce, but here is an easier way to trigger the problem:
      
      $ make PLAT=uniphier TRUSTED_BOARD_BOOT=1 MBEDTLS_DIR=mbedtls certificates
        OPENSSL build/uniphier/release/rot_key.pem
      /bin/sh: 1: cannot create build/uniphier/release/rot_key.pem: Directory nonexistent
      make: *** [build/uniphier/release/rot_key.pem] Error 2
      
      The $(ROT_KEY) must depend on $(BUILD_PLAT) so that the build directory
      is created before the key.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      3c946152
  17. 27 Sep, 2017 1 commit
  18. 26 Jul, 2017 1 commit
    • Sandrine Bailleux's avatar
      xlat lib v2: Expose *_ctx() APIs · a9ad848c
      Sandrine Bailleux authored
      
      
      In a previous patch, the xlat_ctx_t type has been made public.
      This patch now makes the *_ctx() APIs public.
      
      Each API now has a *_ctx() variant. Most of them were already implemented
      and this patch just makes them public. However, some of them were missing
      so this patch introduces them.
      
      Now that all these APIs are public, there's no good reason for splitting
      them accross 2 files (xlat_tables_internal.c and xlat_tables_common.c).
      Therefore, this patch moves all code into xlat_tables_internal.c and
      removes xlat_tables_common.c. It removes it from the library's makefile
      as well.
      
      This last change introduces a compatibility break for platform ports
      that specifically include the xlat_tables_common.c file instead of
      including the library's Makefile. The UniPhier platform makefile has
      been updated to now omit this file from the list of source files.
      
      The prototype of mmap_add_region_ctx() has been slightly changed. The
      mmap_region_t passed in argument needs to be constant because it gets
      called from map_add(), which receives a constant region. The former
      implementation of mmap_add() used to cast the const qualifier away,
      which is not a good practice.
      
      Also remove init_xlation_table(), which was a sub-function of
      init_xlat_tables(). Now there's just init_xlat_tables() (and
      init_xlat_tables_ctx()). Both names were too similar, which was
      confusing. Besides, now that all the code is in a single file,
      it's no longer needed to have 2 functions for that.
      
      Change-Id: I4ed88c68e44561c3902fbebb89cb197279c5293b
      Signed-off-by: default avatarSandrine Bailleux <sandrine.bailleux@arm.com>
      a9ad848c
  19. 20 Jun, 2017 1 commit
    • Masahiro Yamada's avatar
      uniphier: embed ROTPK hash into BL1/BL2 · 63634800
      Masahiro Yamada authored
      
      
      Currently, ROTPK_NOT_DEPLOYED flag is set in plat_get_rotpk_info().
      It is up to users how to retrieve ROTPK if the ROT verification is
      desired.  This is not nice.
      
      This commit improves plat_get_rotpk_info() implementation and automates
      the ROTPK deployment.  UniPhier platform has no ROTPK storage, so it
      should be embedded in BL1/BL2, like ARM_ROTPK_LOCATION=devel_rsa case.
      This makes sense because UniPhier platform implements its internal ROM
      i.e. BL1 is used as updatable pseudo ROM.
      
      Things work like this:
      
      - ROT_KEY (default: $(BUILD_PLAT)/rot_key.pem) is created if missing.
        Users can override ROT_KEY from the command line if they want to
        use a specific ROT key.
      
      - ROTPK_HASH is generated based on ROT_KEY.
      
      - ROTPK_HASH is included by uniphier_rotpk.S and compiled into BL1/BL2.
      
      - ROT_KEY is input to cert_create tool.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      63634800
  20. 12 Jun, 2017 1 commit