1. 28 Sep, 2018 1 commit
    • Antonio Nino Diaz's avatar
      rockchip: Migrate to new interfaces · 2d6f1f01
      Antonio Nino Diaz authored
      
      
      - Migrate to new GIC interfaces.
      - Migrate to bl31_early_platform_setup2().
      - Use bl31_warm_entrypoint() instead of psci_entrypoint().
      - Use PLAT_VIRT_ADDR_SPACE_SIZE and PLAT_PHY_ADDR_SPACE_SIZE.
      - Update Makefile paths.
      - Remove references to removed build options.
      - Use private definition of bl31_params_t.
      
      Change-Id: I860341594b5c868b2fcaa59d23957ee718472ef1
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      2d6f1f01
  2. 22 Aug, 2018 1 commit
  3. 15 Aug, 2018 1 commit
  4. 20 Jul, 2018 1 commit
  5. 11 Jul, 2018 1 commit
  6. 14 Jun, 2018 1 commit
    • Roberto Vargas's avatar
      Make TF UUID RFC 4122 compliant · 03364865
      Roberto Vargas authored
      
      
      RFC4122 defines that fields are stored in network order (big endian),
      but TF-A stores them in machine order (little endian by default in TF-A).
      We cannot change the future UUIDs that are already generated, but we can store
      all the bytes using arrays and modify fiptool to generate the UUIDs with
      the correct byte order.
      
      Change-Id: I97be2d3168d91f4dee7ccfafc533ea55ff33e46f
      Signed-off-by: default avatarRoberto Vargas <roberto.vargas@arm.com>
      03364865
  7. 13 Jun, 2018 1 commit
    • Paul Kocialkowski's avatar
      rockchip: Move stdint header to the offending header file · fb83888b
      Paul Kocialkowski authored
      
      
      The stdint header was introduced to rk3399's plat_sip_calls.c in order
      to fix missing stdint definitions. However, ordering headers
      alphabetically caused the fix to be ineffective, as stint was then
      included after the offending header file (dfs.h).
      
      Move the stdint include to that header to properly fix the issue.
      
      Change-Id: Ieaad37a7932786971488ab58fc5b169bfa79e197
      Signed-off-by: default avatarPaul Kocialkowski <contact@paulk.fr>
      fb83888b
  8. 15 May, 2018 3 commits
    • Derek Basehore's avatar
      rockchip/rk3399: Add watchdog support in pmusram · 5b886432
      Derek Basehore authored
      
      
      To catch early hangs in resume, this sets up the watchdog before
      anything else in the pmusram code (ignoring setting up the stack...).
      This uses hard coded settings for the watchdog until the proper
      watchdog restore later on in the firmware/kernel.
      
      This also restores the old watchdog register values before the PLLs
      are restored to make sure we don't temporarily switch over to a 1/3s
      timeout on the watchdog when the pclk_wdt goes from 4MHz to 100MHz.
      
      Change-Id: I8f7652089a88783271b17482117b4609330abe80
      Signed-off-by: default avatarDerek Basehore <dbasehore@chromium.org>
      5b886432
    • Lin Huang's avatar
      rockchip/rk3399: Split M0 binary into two · ff4735cf
      Lin Huang authored
      
      
      All the m0 code run in SRAM before, but we need to watch PMU_POWER_ST
      when SOC enter into FSM, and SRAM will shutdown during this time, so
      this code need run in PMUSRAM. But PMUSRAM only 8K space, we can not
      put all the m0 binary into PMUSRAM, Split the M0 binary into two, dram
      part still run in SRAM, and suspend part run in PMUSRAM.
      
      Change-Id: Ie08bdf3e2b8838f12b9297fe60ab0aad219684b1
      Signed-off-by: default avatarLin Huang <hl@rock-chips.com>
      ff4735cf
    • Lin Huang's avatar
      rockchip/rk3399: improve pmu powermode configure when suspend · 133598cb
      Lin Huang authored
      
      
      we need to enable PMU_WKUP_RST_EN for pmu powermode configure, since
      enable wakeup reset will hold the soc status, so the SOC will not affect
      by some power or other single glitch when resume, and keep the soc in the
      right status. And it not need to enable DDRIO_RET_HW_DE_REQ, the ddr resume
      will do it manual.
      
      Change-Id: Ib4af897ffb3cb63dc2aa9a6002e5d9ef86ee4a49
      Signed-off-by: default avatarLin Huang <hl@rock-chips.com>
      133598cb
  9. 27 Apr, 2018 2 commits
    • Masahiro Yamada's avatar
      types: use int-ll64 for both aarch32 and aarch64 · 0a2d5b43
      Masahiro Yamada authored
      Since commit 031dbb12
      
       ("AArch32: Add essential Arch helpers"),
      it is difficult to use consistent format strings for printf() family
      between aarch32 and aarch64.
      
      For example, uint64_t is defined as 'unsigned long long' for aarch32
      and as 'unsigned long' for aarch64.  Likewise, uintptr_t is defined
      as 'unsigned int' for aarch32, and as 'unsigned long' for aarch64.
      
      A problem typically arises when you use printf() in common code.
      
      One solution could be, to cast the arguments to a type long enough
      for both architectures.  For example, if 'val' is uint64_t type,
      like this:
      
        printf("val = %llx\n", (unsigned long long)val);
      
      Or, somebody may suggest to use a macro provided by <inttypes.h>,
      like this:
      
        printf("val = %" PRIx64 "\n", val);
      
      But, both would make the code ugly.
      
      The solution adopted in Linux kernel is to use the same typedefs for
      all architectures.  The fixed integer types in the kernel-space have
      been unified into int-ll64, like follows:
      
          typedef signed char           int8_t;
          typedef unsigned char         uint8_t;
      
          typedef signed short          int16_t;
          typedef unsigned short        uint16_t;
      
          typedef signed int            int32_t;
          typedef unsigned int          uint32_t;
      
          typedef signed long long      int64_t;
          typedef unsigned long long    uint64_t;
      
      [ Linux commit: 0c79a8e29b5fcbcbfd611daf9d500cfad8370fcf ]
      
      This gets along with the codebase shared between 32 bit and 64 bit,
      with the data model called ILP32, LP64, respectively.
      
      The width for primitive types is defined as follows:
      
                         ILP32           LP64
          int            32              32
          long           32              64
          long long      64              64
          pointer        32              64
      
      'long long' is 64 bit for both, so it is used for defining uint64_t.
      'long' has the same width as pointer, so for uintptr_t.
      
      We still need an ifdef conditional for (s)size_t.
      
      All 64 bit architectures use "unsigned long" size_t, and most 32 bit
      architectures use "unsigned int" size_t.  H8/300, S/390 are known as
      exceptions; they use "unsigned long" size_t despite their architecture
      is 32 bit.
      
      One idea for simplification might be to define size_t as 'unsigned long'
      across architectures, then forbid the use of "%z" string format.
      However, this would cause a distortion between size_t and sizeof()
      operator.  We have unknowledge about the native type of sizeof(), so
      we need a guess of it anyway.  I want the following formula to always
      return 1:
      
        __builtin_types_compatible_p(size_t, typeof(sizeof(int)))
      
      Fortunately, ARM is probably a majority case.  As far as I know, all
      32 bit ARM compilers use "unsigned int" size_t.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      0a2d5b43
    • Masahiro Yamada's avatar
      Fix pointer type mismatch of handlers · 57d1e5fa
      Masahiro Yamada authored
      Commit 4c0d0390
      
       ("Rework type usage in Trusted Firmware") changed
      the type usage in struct declarations, but did not touch the definition
      side.  Fix the type mismatch.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      57d1e5fa
  10. 07 Apr, 2018 1 commit
  11. 27 Mar, 2018 1 commit
    • Joel Hutton's avatar
      Clean usage of void pointers to access symbols · 9f85f9e3
      Joel Hutton authored
      
      
      Void pointers have been used to access linker symbols, by declaring an
      extern pointer, then taking the address of it. This limits symbols
      values to aligned pointer values. To remove this restriction an
      IMPORT_SYM macro has been introduced, which declares it as a char
      pointer and casts it to the required type.
      
      Change-Id: I89877fc3b13ed311817bb8ba79d4872b89bfd3b0
      Signed-off-by: default avatarJoel Hutton <Joel.Hutton@Arm.com>
      9f85f9e3
  12. 26 Mar, 2018 1 commit
  13. 21 Mar, 2018 1 commit
    • Antonio Nino Diaz's avatar
      Rename 'smcc' to 'smccc' · 085e80ec
      Antonio Nino Diaz authored
      
      
      When the source code says 'SMCC' it is talking about the SMC Calling
      Convention. The correct acronym is SMCCC. This affects a few definitions
      and file names.
      
      Some files have been renamed (smcc.h, smcc_helpers.h and smcc_macros.S)
      but the old files have been kept for compatibility, they include the
      new ones with an ERROR_DEPRECATED guard.
      
      Change-Id: I78f94052a502436fdd97ca32c0fe86bd58173f2f
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      085e80ec
  14. 20 Mar, 2018 1 commit
    • Lin Huang's avatar
      rockchip/rk3399: save/restore watchdog register correctly · 56bf9407
      Lin Huang authored
      
      
      there are two fix for save/restore watchdog register:
      1. watchdog plck will shutdown after secure_watchdog_disable(), so need
         to save register before it and restore after secure_watchdog_enable().
      2. need write 0x76 to cnt_restart to keep watchdog alive when restore
         watchdog register.
      
      Change-Id: I1f6fbceae22186e3b72a87df6332a110adf37479
      Signed-off-by: default avatarLin Huang <hl@rock-chips.com>
      56bf9407
  15. 27 Feb, 2018 1 commit
  16. 21 Feb, 2018 1 commit
  17. 30 Jan, 2018 1 commit
    • Caesar Wang's avatar
      rockchip/rk3399: Fix memory corruptions or illegal memory access · de3c3007
      Caesar Wang authored
      
      
      Coverity scan done for the coreboot project found the issue:
      Coverity (*** CID 1385418: Memory - illegal accesses (OVERRUN))
      Coverity (*** CID 1385419: Memory - corruptions  (OVERRUN))
      
      Fix the Converity error issue with store_cru[] loop needs to be one
      element bigger.
      
      Fixes: ARM-software/tf-issues#544
      
      Change-Id: I420f0a660b24baaa5fc5e78fca242cf750c9bbc7
      Signed-off-by: default avatarCaesar Wang <wxt@rock-chips.com>
      de3c3007
  18. 29 Jan, 2018 1 commit
  19. 26 Jan, 2018 1 commit
  20. 24 Jan, 2018 4 commits
  21. 19 Jan, 2018 2 commits
    • Julius Werner's avatar
      rockchip: Move to MULTI_CONSOLE_API · 890abc33
      Julius Werner authored
      
      
      This patch changes all Rockchip platforms to use the new
      MULTI_CONSOLE_API. The platform-specific plat_crash_console
      implementations are removed so that the platform can use the ones from
      the common platform code instead.
      
      Also change the registers used in plat_crash_print_regs. The existing
      use of x16 and x17 has always been illegal, since those registers are
      reserved for use by the linker as a temporary scratch registers in
      intra-procedure-call veneers and can never be expected to maintain their
      values across a function call.
      
      Change-Id: I8249424150be8d5543ed4af93b56756795a5288f
      Signed-off-by: default avatarJulius Werner <jwerner@chromium.org>
      890abc33
    • Julius Werner's avatar
      rockchip: Use coreboot-supplied serial console on coreboot systems · 3c250b9a
      Julius Werner authored
      
      
      This patch changes all Rockchip platforms to initialize the serial
      console with information supplied by coreboot rather than hardcoded
      base address and divisor values if BL31 is run on top of coreboot.
      Moving the BL2-to-BL31 parameter parsing as early as possible to ensure
      that the console is available for all following code.
      
      Also update the Rockchip platform to use MULTI_CONSOLE_API.
      
      Change-Id: I670d350fa2f8b8133539f91ac14977ab47db60d9
      Signed-off-by: default avatarJulius Werner <jwerner@chromium.org>
      3c250b9a
  22. 12 Dec, 2017 1 commit
    • Julius Werner's avatar
      rockchip: Implement a panic handler that will reboot the system · a33e763c
      Julius Werner authored
      
      
      The current Rockchip platform code retains the "common" default panic
      handler which simply hangs the system (until the watchdog kicks in, if
      enabled). This is usually not a great user experience.
      
      This patch implements a Rockchip-specific panic handler that calls the
      platform's reboot implementation to reset the system.
      
      Change-Id: I4cbe09c48f1b3f86ebdfc0108c186565f9ffc119
      Signed-off-by: default avatarJulius Werner <jwerner@chromium.org>
      a33e763c
  23. 02 Dec, 2017 1 commit
  24. 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
  25. 29 Nov, 2017 1 commit
    • Antonio Nino Diaz's avatar
      Replace magic numbers in linkerscripts by PAGE_SIZE · a2aedac2
      Antonio Nino Diaz authored
      
      
      When defining different sections in linker scripts it is needed to align
      them to multiples of the page size. In most linker scripts this is done
      by aligning to the hardcoded value 4096 instead of PAGE_SIZE.
      
      This may be confusing when taking a look at all the codebase, as 4096
      is used in some parts that aren't meant to be a multiple of the page
      size.
      
      Change-Id: I36c6f461c7782437a58d13d37ec8b822a1663ec1
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      a2aedac2
  26. 06 Nov, 2017 1 commit
  27. 01 Nov, 2017 1 commit
  28. 29 Aug, 2017 6 commits