1. 12 Feb, 2018 1 commit
  2. 09 Feb, 2018 2 commits
  3. 08 Feb, 2018 3 commits
  4. 07 Feb, 2018 8 commits
  5. 06 Feb, 2018 7 commits
  6. 05 Feb, 2018 2 commits
    • Etienne Carriere's avatar
      qemu: support ARMv7/Cortex-A15 · 765ed9fc
      Etienne Carriere authored
      
      
      Define Qemu AArch32 implementation for some platform functions
      (core position, secondary boot cores, crash console). These are
      derived from the AArch64 implementation.
      
      BL31 on Qemu is needed only for ARMv8 and later. On ARMv7, BL32 is
      the first executable image after BL2.
      
      Support SP_MIN and OP-TEE as BL32: create a sp_min make script target
      in Qemu, define mapping for IMAGE_BL32
      
      Minor fix Qemu return value type for plat_get_ns_image_entrypoint().
      
      Qemu model for the Cortex-A15 does not support the virtualization
      extension although the core expects it. To overcome the issue, Qemu
      ARMv7 configuration set ARCH_SUPPORTS_VIRTUALIZATION to 0.
      
      Add missing AArch32 assembly macro arm_print_gic_regs from ARM platform
      used by the Qemu platform.
      
      Qemu Cortex-A15 model integrates a single cluster with up to 4 cores.
      
      Change-Id: I65b44399071d6f5aa40d5183be11422b9ee9ca15
      Signed-off-by: default avatarEtienne Carriere <etienne.carriere@linaro.org>
      765ed9fc
    • Etienne Carriere's avatar
      aarch32: optee: define the OP-TEE secure payload · 10c66958
      Etienne Carriere authored
      
      
      AArch32 only platforms can boot the OP-TEE secure firmware as
      a BL32 secure payload. Such configuration can be defined through
      AARCH32_SP=optee.
      
      The source files can rely on AARCH32_SP_OPTEE to condition
      OP-TEE boot specific instruction sequences.
      
      OP-TEE does not expect ARM Trusted Firmware formatted structure
      as boot argument. Load sequence is expected to have already loaded
      to OP-TEE boot arguments into the bl32 entrypoint info structure.
      
      Last, AArch32 platform can only boot AArch32 OP-TEE images.
      
      Change-Id: Ic28eec5004315fc9111051add6bb1a1d607fc815
      Signed-off-by: default avatarEtienne Carriere <etienne.carriere@linaro.org>
      10c66958
  7. 02 Feb, 2018 6 commits
  8. 01 Feb, 2018 11 commits
    • davidcunado-arm's avatar
      Merge pull request #1247 from rockchip-linux/rk3399/fixes-memory-corruptions · 956defc7
      davidcunado-arm authored
      rockchip/rk3399: Fix memory corruptions or illegal memory access
      956defc7
    • davidcunado-arm's avatar
      Merge pull request #1245 from antonio-nino-diaz-arm/an/checkpatch · 693e278e
      davidcunado-arm authored
      Analyze coding style of patches individually
      693e278e
    • Masahiro Yamada's avatar
      uniphier: support GZIP-compressed images · 8951b058
      Masahiro Yamada authored
      
      
      Allow to handle GZIP-compressed images by giving FIP_GZIP=1 from the
      command line.
      
      - Images are GZIP-compressed, then packed into FIP.  If Trusted Board
        Boot is enabled, certificates are generated based on the compressed
        images.
      
      - GZIP decompressor is linked into BL2 to decompress images at
        run-time.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      8951b058
    • Masahiro Yamada's avatar
      uniphier: add a helper to get image_info · 0ac60c08
      Masahiro Yamada authored
      
      
      In the next commit, I will have more usecases to get struct image_info
      from image ID.  It is better to make a helper function at a different
      layer.  I do not need the current uniphier_image_descs_fixup() since
      the code is small enough to be squashed into the caller side.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      0ac60c08
    • Masahiro Yamada's avatar
      image_decompress: add APIs for decompressing images · 2e379d2f
      Masahiro Yamada authored
      
      
      These APIs are used by platforms that need to decompress images.
      
      image_decompress_init():
        This registers a temporary buffer and a decompressor callback.
        This should be called from platform init code.
      
      image_decompress_prepare():
        This should be called before each compressed image is loaded.  The
        best location to call this will be bl*_plat_handle_pre_image_load().
      
      image_decompress():
        This should be called after each compressed image is loaded.  The
        best location to call this will be bl*_plat_handle_post_image_load().
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      2e379d2f
    • Masahiro Yamada's avatar
      bl1: add bl1_plat_handle_{pre,post}_image_load() · 11f001cb
      Masahiro Yamada authored
      
      
      Just like bl2_, add pre/post image load handlers for BL1.  No argument
      is needed since BL2 is the only image loaded by BL1.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      11f001cb
    • Masahiro Yamada's avatar
      bl2: add bl2_plat_handle_pre_image_load() · ba68ef55
      Masahiro Yamada authored
      
      
      There are cases where we need to manipulate image information before
      the load.  For example, for decompressing data, we cannot load the
      compressed images to their final destination.  Instead, we need to
      load them to the temporary buffer for the decompressor.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      ba68ef55
    • Masahiro Yamada's avatar
      plat/common: move arch-agnostic fallback functions to C file · 0fc50a86
      Masahiro Yamada authored
      
      
      When we add a new callback, we need to duplicate fallbacks among
      plat/common/{aarch32,aarch64}/platform_helpers.S  This is tedious.
      
      I created a new C file, then moved 3 functions:
        plat_error_handler
        bl2_plat_preload_setup
        plat_try_next_boot_source
      
      They are called from C, so I do not see a good reason to implement
      them in assembly.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      0fc50a86
    • Masahiro Yamada's avatar
      zlib: add gunzip() support · c43d6851
      Masahiro Yamada authored
      
      
      This commit adds some more files to use zlib from TF.
      
      To use zlib, ->zalloc and ->zfree hooks are needed.  The implementation
      depends on the system.  For user-space, the libc provides malloc() and
      friends.  Unfortunately, ARM Trusted Firmware does not provide malloc()
      or any concept of dynamic memory allocation.
      
      I implemented very simple calloc() and free() for this.  Stupidly,
      zfree() never frees memory, but it works enough for this.
      
      The purpose of using zlib is to implement gunzip() - this function
      takes compressed data from in_buf, then dumps the decompressed data
      to oub_buf.  The work_buf is used for memory allocation during the
      decompress.  Upon exit, it updates in_buf and out_buf.  If successful,
      in_buf points to the end of input data, out_buf to the end of the
      decompressed data.
      
      To use this feature, you need to do:
      
       - include lib/zlib/zlib.mk from your platform.mk
      
       - add $(ZLIB_SOURCES) to your BL*_SOURCES
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      c43d6851
    • Masahiro Yamada's avatar
      zlib: import zlib files from zlib 1.2.11 · 221b1638
      Masahiro Yamada authored
      Import the following files from zlib 1.2.11:
      
         adler32.c
         crc32.c
         crc32.h
         inffast.c
         inffast.h
         inffixed.h
         inflate.c
         inflate.h
         inftrees.c
         inftrees.h
         zconf.h
         zlib.h
         zutil.c
         zutil.h
      
      The original tarball is available from http://zlib.net/
      
      The zlib is free software, distributed under the zlib license.  The
      license text is included in the "zlib.h" file.  It should be compatible
      with BSD-3-Clause.
      
      The zlib license is included in the SPDX license list available at
      https://spdx.org/licenses/
      
      , but I did not add the SPDX license tag to
      the imported files above, to keep them as they are in the upstream
      project.  This seems the general policy for ARM Trusted Firmware, as
      SPDX License Identifier was not added to files imported from FreeBSD.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      221b1638
    • Masahiro Yamada's avatar
      Build: add GZIP compression filter · 14db8908
      Masahiro Yamada authored
      
      
      One typical usage of the pre-tool image filter is data compression,
      and GZIP is one of the most commonly used compression methods.
      I guess this is generic enough to be put in the common script instead
      of platform.mk.
      
      If you want to use this, you can add something like follows to your
      platform.mk:
      
          BL32_PRE_TOOL_FILTER := GZIP
          BL33_PRE_TOOL_FILTER := GZIP
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      14db8908