1. 19 Nov, 2020 1 commit
  2. 28 Oct, 2020 4 commits
    • David Horstmann's avatar
      Use constant stack size with RECLAIM_INIT_CODE · 3ed5606b
      David Horstmann authored
      
      
      Currently, when RECLAIM_INIT_CODE is set, the
      stacks are scaled to ensure that the entirety
      of the init section can be reclaimed as stack.
      
      This causes an issue in lib/psci/aarch64/psci_helpers.S,
      where the stack size is used for cache operations in
      psci_do_pwrdown_cache_maintenance(). If the stacks
      are scaled, then the PSCI code may fail to invalidate
      some of the stack memory before power down.
      
      Resizing stacks is also not good for stability in general,
      since code that works with a small number of cores may
      overflow the stack when the number of cores is increased.
      
      Change to make every stack be PLATFORM_STACK_SIZE big,
      and allow the total stack to be smaller than the
      init section.
      
      Any pages of the init section not reclaimed as
      stack will be set to read-only and execute-never,
      for security.
      
      Change-Id: I10b3884981006431f2fcbec3864c81d4a8c246e8
      Signed-off-by: default avatarDavid Horstmann <david.horstmann@arm.com>
      3ed5606b
    • Dehui Sun's avatar
      mediatek: mt8192: add timer support · 4a128018
      Dehui Sun authored
      
      
      add timer driver.
      Signed-off-by: default avatarDehui Sun <dehui.sun@mediatek.com>
      Change-Id: I07448d85a15bb14577b05e4f302860d609420ba7
      4a128018
    • Nina Wu's avatar
      mediatek: mt8192: Add reboot function for PSCI · 0f408247
      Nina Wu authored
      
      
      Add system_reset function in psci ops
      
      Change-Id: If85be70b8ae9d6487e02626356f0ff1e78b76de9
      Signed-off-by: default avatarNina Wu <nina-cm.wu@mediatek.com>
      0f408247
    • gtk_pangao's avatar
      mediatek: mt8192: add sys_cirq driver · b6cec337
      gtk_pangao authored
      
      
      1.add sys_cirq driver
      2.add gic api for cirq
      
      Change-Id: Ie6802d6ddcf7dde3412a050736dfdc85f97cb51b
      Signed-off-by: default avatargtk_pangao <gtk_pangao@mediatek.com>
      b6cec337
  3. 27 Oct, 2020 9 commits
  4. 26 Oct, 2020 1 commit
  5. 24 Oct, 2020 6 commits
  6. 21 Oct, 2020 3 commits
    • Olivier Deprez's avatar
      SPMC: adjust device region for first secure partition · d0d63afe
      Olivier Deprez authored
      
      
      For the first partition, mark first 2GB as device memory excluding
      the Trusted DRAM region reserved for the SPMC.
      Signed-off-by: default avatarOlivier Deprez <olivier.deprez@arm.com>
      Change-Id: I3ff110b3facf5b6d41ac2519ff6ca5e30a0a502b
      d0d63afe
    • Tomas Pilar's avatar
      plat/qemu_sbsa: Remove cortex_a53 and aem_generic · d1ff30d7
      Tomas Pilar authored
      
      
      The qemu_sbsa platform uses 42bit address size but
      the cortex-a53 only supports 40bit addressing, the
      cpu is incompatible with the platform.
      
      The aem_generic is also not used with qemu_sbsa, in
      fact, the platform currently only properly supports
      the cortex-a57 cpu.
      
      Change-Id: I91c92533116f1c3451d01ca99824e91d3d58df14
      Signed-off-by: default avatarTomas Pilar <tomas@nuviateam.com>
      d1ff30d7
    • 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
  7. 20 Oct, 2020 5 commits
  8. 19 Oct, 2020 1 commit
    • Pali Rohár's avatar
      plat: marvell: armada: Fix including plat/marvell/marvell.mk file · 0412b732
      Pali Rohár authored
      
      
      Include file plat/marvell/marvell.mk for platform A3700 was included two
      times. Once from file plat/marvell/armada/a3k/common/a3700_common.mk and
      second time from common file plat/marvell/armada/common/marvell_common.mk.
      
      It caused following warning every time was make called:
      
          plat/marvell/marvell.mk:51: warning: overriding recipe for target 'mrvl_clean'
          plat/marvell/marvell.mk:51: warning: ignoring old recipe for target 'mrvl_clean'
      
      Change in this commit removes inclusion of plat/marvell/marvell.mk file in
      common file plat/marvell/armada/common/marvell_common.mk. As a80x0 platform
      needs this include file, add it also into a80x0 platform specific include
      file lat/marvell/armada/a8k/common/a8k_common.mk.
      
      Also moves inclusion of plat/marvell/marvell.mk file in a3700 platform file
      plat/marvell/armada/a3k/common/a3700_common.mk at correct place. Global
      plat/marvell/marvell.mk expects that variables DOIMAGEPATH and DOIMAGETOOL
      are already defined, but it defines MARVELL_SECURE_BOOT variable which is
      needed by plat/marvell/armada/a3k/common/a3700_common.mk.
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: I5cbbd7eb8a3376924419f9850516b2a4924be5aa
      0412b732
  9. 16 Oct, 2020 1 commit
    • Pali Rohár's avatar
      plat: marvell: armada: Fix dependences for target fip · fb28d525
      Pali Rohár authored
      
      
      For building fip image it is not needed to build target mrvl_flash. This
      fip image contains only bl2, bl31 and bl33 (u-boot.bin) images and
      therefore it does not depend on Marvell wtmi and wtp A3700-utils.
      
      So remove mrvl_flash dependency for fip target to allow building fip image
      without need to build mrvl_flash and therefore specify and provide Marvell
      wmi and wtp A3700-utils.
      
      This changes fixes compilation of fip image for A3700 platform by command:
      
          make CROSS_COMPILE=aarch64-linux-gnu- BL33=/path/u-boot/u-boot.bin \
               DEBUG=0 LOG_LEVEL=0 USE_COHERENT_MEM=0 PLAT=a3700 fip
      
      Marvell boot image can be still build by 'mrvl_flash' target.
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: Iba9a9da5be6fd1da23407fc2d490aedcb1a292c9
      fb28d525
  10. 15 Oct, 2020 2 commits
    • Saurabh Gorecha's avatar
      plat:qti Mandate SMC implementaion and bug fix · 4b918452
      Saurabh Gorecha authored
      
      
      implementation of SMC call SMCCC_ARCH_SOC_ID
      adding debugging logs in mem assign call.
      Checking range of param in mem_assign call is from CB_MEM_RAM
      or CB_MEM_RESERVED.
      
      Change-Id: Iba51bff154df01e02dcb7715582ffaff7beba26e
      Signed-off-by: default avatarSaurabh Gorecha <sgorecha@codeaurora.org>
      4b918452
    • Pali Rohár's avatar
      plat: marvell: armada: a3k: When WTP is empty do not define variables and... · c5e1b061
      Pali Rohár authored
      
      plat: marvell: armada: a3k: When WTP is empty do not define variables and targets which depends on it
      
      Some of targets (e.g. mrvl_flash) depends on WTP build option. Other
      targets (e.g. fip) can be build also without WTP build option as they do
      not depend on it.
      
      This change put all A3720 variables and targets which depends on WTP into
      conditional if-endif section, so they are not defined when user has not
      supplied WTP build option.
      
      Target mrvl_flash is defined also when WTP was not specified and in this
      case it just print error message to help user.
      
      Variables which do not depend on WTP are moved to the top of
      a3700_common.mk file.
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: Idb3892233586a0afca3e0e6564279641d2e4b960
      c5e1b061
  11. 13 Oct, 2020 6 commits
  12. 12 Oct, 2020 1 commit
    • Jimmy Brisson's avatar
      Increase type widths to satisfy width requirements · d7b5f408
      Jimmy Brisson authored
      
      
      Usually, C has no problem up-converting types to larger bit sizes. MISRA
      rule 10.7 requires that you not do this, or be very explicit about this.
      This resolves the following required rule:
      
          bl1/aarch64/bl1_context_mgmt.c:81:[MISRA C-2012 Rule 10.7 (required)]<None>
          The width of the composite expression "0U | ((mode & 3U) << 2U) | 1U |
          0x3c0U" (32 bits) is less that the right hand operand
          "18446744073709547519ULL" (64 bits).
      
      This also resolves MISRA defects such as:
      
          bl2/aarch64/bl2arch_setup.c:18:[MISRA C-2012 Rule 12.2 (required)]
          In the expression "3U << 20", shifting more than 7 bits, the number
          of bits in the essential type of the left expression, "3U", is
          not allowed.
      
      Further, MISRA requires that all shifts don't overflow. The definition of
      PAGE_SIZE was (1U << 12), and 1U is 8 bits. This caused about 50 issues.
      This fixes the violation by changing the definition to 1UL << 12. Since
      this uses 32bits, it should not create any issues for aarch32.
      
      This patch also contains a fix for a build failure in the sun50i_a64
      platform. Specifically, these misra fixes removed a single and
      instruction,
      
          92407e73        and     x19, x19, #0xffffffff
      
      from the cm_setup_context function caused a relocation in
      psci_cpus_on_start to require a linker-generated stub. This increased the
      size of the .text section and caused an alignment later on to go over a
      page boundary and round up to the end of RAM before placing the .data
      section. This sectionn is of non-zero size and therefore causes a link
      error.
      
      The fix included in this reorders the functions during link time
      without changing their ording with respect to alignment.
      
      Change-Id: I76b4b662c3d262296728a8b9aab7a33b02087f16
      Signed-off-by: default avatarJimmy Brisson <jimmy.brisson@arm.com>
      d7b5f408