1. 24 Aug, 2020 5 commits
  2. 21 Aug, 2020 1 commit
  3. 19 Aug, 2020 1 commit
    • Alexei Fedorov's avatar
      libc/memset: Implement function in assembler · e7d344de
      Alexei Fedorov authored
      
      
      Trace analysis of FVP_Base_AEMv8A model running in
      Aarch32 mode with the build options listed below:
      TRUSTED_BOARD_BOOT=1 GENERATE_COT=1
      ARM_ROTPK_LOCATION=devel_ecdsa KEY_ALG=ecdsa
      ROT_KEY=plat/arm/board/common/rotpk/arm_rotprivk_ecdsa.pem
      shows that when auth_signature() gets called
      71.84% of CPU execution time is spent in memset() function
      written in C using single byte write operations,
      see lib\libc\memset.c.
      This patch replaces C memset() implementation with assembler
      version giving the following results:
      - for Aarch32 in auth_signature() call memset() CPU time
      reduced to 24.84%.
      - Number of CPU instructions executed during TF-A
      boot stage before start of BL33 in RELEASE builds:
      ----------------------------------------------
      |  Arch   |     C      |  assembler |    %   |
      ----------------------------------------------
      | Aarch32 | 2073275460 | 1487400003 | -28.25 |
      | Aarch64 | 2056807158 | 1244898303 | -39.47 |
      ----------------------------------------------
      The patch also replaces memset.c with aarch64/memset.S
      in plat\nvidia\tegra\platform.mk.
      
      Change-Id: Ifbf085a2f577a25491e2d28446ee95a4ac891597
      Signed-off-by: default avatarAlexei Fedorov <Alexei.Fedorov@arm.com>
      e7d344de
  4. 18 Aug, 2020 2 commits
  5. 09 Aug, 2020 2 commits
  6. 04 Aug, 2020 1 commit
    • Grant Likely's avatar
      Use abspath to dereference $BUILD_BASE · 29214e95
      Grant Likely authored
      
      
      If the user tries to change BUILD_BASE to put the build products outside
      the build tree the compile will fail due to hard coded assumptions that
      $BUILD_BASE is a relative path. Fix by using $(abspath $(BUILD_BASE))
      to rationalize to an absolute path every time and remove the relative
      path assumptions.
      
      This patch also adds documentation that BUILD_BASE can be specified by
      the user.
      Signed-off-by: default avatarGrant Likely <grant.likely@arm.com>
      Signed-off-by: default avatarManish Pandey <manish.pandey2@arm.com>
      Change-Id: Ib1af874de658484aaffc672f30029b852d2489c8
      29214e95
  7. 26 Jul, 2020 1 commit
  8. 20 Jul, 2020 1 commit
    • Alexei Fedorov's avatar
      TF-A GICv2 driver: Introduce makefile · 1322dc94
      Alexei Fedorov authored
      
      
      This patch moves all GICv2 driver files into new added
      'gicv2.mk' makefile for the benefit of the generic driver
      which can evolve in the future without affecting platforms.
      
      NOTE: Usage of 'drivers/arm/gic/common/gic_common.c' file
      is now deprecated and platforms with GICv2 driver need to
      be modified to include 'drivers/arm/gic/v2/gicv2.mk' in
      their makefiles.
      
      Change-Id: Ib10e71bdda0e5c7e80a049ddce2de1dd839602d1
      Signed-off-by: default avatarAlexei Fedorov <Alexei.Fedorov@arm.com>
      1322dc94
  9. 21 Jun, 2020 1 commit
    • Varun Wadekar's avatar
      Tegra: sanity check NS address and size before use · 685e5609
      Varun Wadekar authored
      
      
      This patch updates the 'bl31_check_ns_address()' helper function to
      check that the memory address and size passed by the NS world are not
      zero.
      
      The helper fucntion also returns the error code as soon as it detects
      inconsistencies, to avoid multiple error paths from kicking in for the
      same input parameters.
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      
      Change-Id: I46264f913954614bedcbde12e47ea0c70cd19be0
      685e5609
  10. 19 Jun, 2020 2 commits
    • Varun Wadekar's avatar
      Tegra: introduce support for GICv3 · 5e1b83aa
      Varun Wadekar authored
      
      
      This patch provides the platform level support to enable GICv3
      drivers on future Tegra platforms.
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      Change-Id: I966a4502b2a4a7bd1ce66da843997c9ed605c59f
      5e1b83aa
    • Varun Wadekar's avatar
      Tegra: memctrl_v2: fixup sequence to resize video memory · a7749acc
      Varun Wadekar authored
      
      
      The previous sequence used by the driver to program the new memory
      aperture settings and clear the non-overlapping memory was faulty.
      The sequence locked the non-overlapping regions twice, leading to
      faults when trying to clear it.
      
      This patch modifies the sequence to follow these steps:
      
      * move the previous memory region to a new firewall register
      * program the new memory aperture settings
      * clean the non-overlapping memory
      
      This patch also maps the non-overlapping memory as Device memory to
      follow guidance from the arch. team.
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      Change-Id: I7cf6e05b2dd372103dc7229e37b1b3fc269a57ae
      a7749acc
  11. 12 Jun, 2020 3 commits
  12. 20 May, 2020 1 commit
    • Varun Wadekar's avatar
      Tegra: enable SDEI handling · d886628d
      Varun Wadekar authored
      
      
      This patch enables SDEI support for all Tegra platforms, with
      the following configuration settings.
      
      * SGI 8 as the source IRQ
      * Special Private Event 0
      * Three private, dynamic events
      * Three shared, dynamic events
      * Twelve general purpose explicit events
      
      Verified using TFTF SDEI test suite.
      
      ******************************* Summary *******************************
       Test suite 'SDEI'                                               Passed
       =================================
       Tests Skipped : 0
       Tests Passed  : 5
       Tests Failed  : 0
       Tests Crashed : 0
       Total tests   : 5
       =================================
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      Change-Id: I1922069931a7876a4594e53260ee09f2e4f09390
      d886628d
  13. 17 May, 2020 1 commit
  14. 12 May, 2020 1 commit
    • Varun Wadekar's avatar
      Tegra: introduce support for SMCCC_ARCH_SOC_ID · b5b2923d
      Varun Wadekar authored
      
      
      This patch returns the SOC version and revision values from
      the 'plat_get_soc_version' and 'plat_get_soc_revision' handlers.
      
      Verified using TFTF SMCCC_ARCH_SOC_ID test.
      
      <snip>
      > Executing 'SMCCC_ARCH_SOC_ID test'
        TEST COMPLETE                                                 Passed
      SOC Rev = 0x102
      SOC Ver = 0x36b0019
      <snip>
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      Change-Id: Ibd7101619143b74f6f6660732daeac1a8bca3e44
      b5b2923d
  15. 06 May, 2020 2 commits
  16. 01 Apr, 2020 1 commit
  17. 25 Mar, 2020 1 commit
  18. 23 Mar, 2020 1 commit
  19. 22 Mar, 2020 12 commits
    • Varun Wadekar's avatar
      Tegra: fixup GIC init from the 'on_finish' handler · 2a3dd384
      Varun Wadekar authored
      Commit e9e19fb2
      
       accidentally removed the
      GIC init routine required to initialze the distributor on system resume.
      
      This patch fixes this anomaly and initializes the distributor on system
      resume.
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      Change-Id: I3fdc694404faa509952f2d90b1f16541165e583e
      2a3dd384
    • Anthony Zhou's avatar
      Tegra194: move cluster and CPU counter to header file. · 9aaa8882
      Anthony Zhou authored
      
      
      MISRA rules request that the cluster and CPU counter be unsigned
      values and have a suffix 'U'. If the define located in the makefile,
      this cannot be done.
      
      This patch moves the PLATFORM_CLUSTER_COUNT and PLATFORM_MAX_CPUS_PER_CLUSTER
      macros to tegra_def.h as a result.
      
      Change-Id: I9ef0beb29485729de204b4ffbb5241b039690e5a
      Signed-off-by: default avatarAnthony Zhou <anzhou@nvidia.com>
      9aaa8882
    • Varun Wadekar's avatar
      Tegra: gicv2: initialize target masks · 7644e2aa
      Varun Wadekar authored
      
      
      This patch initializes the target masks in the GICv2 driver
      data, for all PEs. This will allow platforms to set the PE
      target for SPIs.
      
      Change-Id: I7bf2ad79c04c2555ab310acba17823fb157327a3
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      7644e2aa
    • sumitg's avatar
      Tegra210: trigger CPU0 hotplug power on using FC · a45c3e9d
      sumitg authored
      
      
      Hotplug poweron is not working for boot CPU as it's being
      triggerred using PMC and not with Flow Controller. This is
      happening because "cpu_powergate_mask" is only getting set
      for non-boot CPU's as the boot CPU's first bootup follows
      different code path. The patch is marking a CPU as ON within
      "cpu_powergate_mask" when turning its power domain on
      during power on. This will ensure only first bootup on all
      CPU's is using PMC and subsequent hotplug poweron will be
      using Flow Controller.
      
      Change-Id: Ie9e86e6f9a777d41508a93d2ce286f31307932c2
      Signed-off-by: default avatarsumitg <sumitg@nvidia.com>
      a45c3e9d
    • Pritesh Raithatha's avatar
      Tegra: memctrl: cleanup streamid override registers · 36e26375
      Pritesh Raithatha authored
      
      
      Streamid override registers are passed to memctrl to program bypass
      streamid for all the registers. There is no reason to bypass SMMU
      for any of the client so need to remove register list and do not
      set streamid_override_cfg.
      
      Some Tegra186 platforms don't boot due to SDMMC failure so keep SDMMC
      bypass as of now. Will revisit once these issues are fixed.
      
      Change-Id: I3f67e2a0e1b53160e2218f3acace7da45532f934
      Signed-off-by: default avatarPritesh Raithatha <praithatha@nvidia.com>
      36e26375
    • Varun Wadekar's avatar
      Tegra: memctrl_v2: remove support to secure TZSRAM · 71376951
      Varun Wadekar authored
      
      
      This patch removes support to secure the on-chip TZSRAM memory for
      Tegra186 and Tegra194 platforms as the previous bootloader does that
      for them.
      
      Change-Id: I50c7b7f9694285fe31135ada09baed1cfedaaf07
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      71376951
    • Varun Wadekar's avatar
      Tegra: include platform headers from individual makefiles · eeb1b5e3
      Varun Wadekar authored
      
      
      This patch modifies PLAT_INCLUDES to include individual Tegra SoC
      headers from the platform's makefile.
      
      Change-Id: If5248667f4e58ac18727d37a18fbba8e53f2d7b5
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      eeb1b5e3
    • Varun Wadekar's avatar
      Tegra210: rename ENABLE_WDT_LEGACY_FIQ_HANDLING macro · ebe076da
      Varun Wadekar authored
      
      
      This patch renames 'ENABLE_WDT_LEGACY_FIQ_HANDLING' macro to
      'ENABLE_TEGRA_WDT_LEGACY_FIQ_HANDLING', to indicate that this
      is a Tegra feature.
      
      Change-Id: I5c4431e662223ee80efbfd5ec2513f8b1cadfc50
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      ebe076da
    • Varun Wadekar's avatar
      Tegra194: SiP function ID to read SMMU_PER registers · 8f0e22d5
      Varun Wadekar authored
      
      
      This patch introduces SiP function ID, 0xC200FF00, to read SMMU_PER
      error records from all supported SMMU blocks.
      
      The register values are passed over to the client via CPU registers
      X1 - X3, where
      
      X1 = SMMU_PER[instance #1] | SMMU_PER[instance #0]
      X2 = SMMU_PER[instance #3] | SMMU_PER[instance #2]
      X3 = SMMU_PER[instance #5] | SMMU_PER[instance #4]
      
      Change-Id: Id56263f558838ad05f6021f8432e618e99e190fc
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      8f0e22d5
    • Ken Chang's avatar
      Tegra: memctrl: map video memory as uncached · 9b51aa87
      Ken Chang authored
      
      
      Memmap video memory as uncached normal memory by adding flag
      'MT_NON_CACHEABLE' in mmap_add_dynamic_region().
      This improves the time taken for clearing the non-overlapping video
      memory:
      
      test conditions: 32MB memory size, EMC running at 1866MHz, t186
      1) without MT_NON_CACHEABLE: 30ms ~ 40ms
      <3>[  133.852885]  vpr-heap: update vpr base to 0x00000000c6000000, size=e000000
      <3>[  133.860471] _tegra_set_vpr_params[120]: begin
      <3>[  133.896481] _tegra_set_vpr_params[123]: end
      <3>[  133.908944]  vpr-heap: update vpr base to 0x00000000c6000000, size=c000000
      <3>[  133.916397] _tegra_set_vpr_params[120]: begin
      <3>[  133.956369] _tegra_set_vpr_params[123]: end
      <3>[  133.970394]  vpr-heap: update vpr base to 0x00000000c6000000, size=a000000
      <3>[  133.977934] _tegra_set_vpr_params[120]: begin
      <3>[  134.013874] _tegra_set_vpr_params[123]: end
      <3>[  134.025666]  vpr-heap: update vpr base to 0x00000000c6000000, size=8000000
      <3>[  134.033512] _tegra_set_vpr_params[120]: begin
      <3>[  134.065996] _tegra_set_vpr_params[123]: end
      <3>[  134.075465]  vpr-heap: update vpr base to 0x00000000c6000000, size=6000000
      <3>[  134.082923] _tegra_set_vpr_params[120]: begin
      <3>[  134.113119] _tegra_set_vpr_params[123]: end
      <3>[  134.123448]  vpr-heap: update vpr base to 0x00000000c6000000, size=4000000
      <3>[  134.130790] _tegra_set_vpr_params[120]: begin
      <3>[  134.162523] _tegra_set_vpr_params[123]: end
      <3>[  134.172413]  vpr-heap: update vpr base to 0x00000000c6000000, size=2000000
      <3>[  134.179772] _tegra_set_vpr_params[120]: begin
      <3>[  134.209142] _tegra_set_vpr_params[123]: end
      
      2) with MT_NON_CACHEABLE: 10ms ~ 18ms
      <3>[  102.108702]  vpr-heap: update vpr base to 0x00000000c6000000, size=e000000
      <3>[  102.116296] _tegra_set_vpr_params[120]: begin
      <3>[  102.134272] _tegra_set_vpr_params[123]: end
      <3>[  102.145839]  vpr-heap: update vpr base to 0x00000000c6000000, size=c000000
      <3>[  102.153226] _tegra_set_vpr_params[120]: begin
      <3>[  102.164201] _tegra_set_vpr_params[123]: end
      <3>[  102.172275]  vpr-heap: update vpr base to 0x00000000c6000000, size=a000000
      <3>[  102.179638] _tegra_set_vpr_params[120]: begin
      <3>[  102.190342] _tegra_set_vpr_params[123]: end
      <3>[  102.197524]  vpr-heap: update vpr base to 0x00000000c6000000, size=8000000
      <3>[  102.205085] _tegra_set_vpr_params[120]: begin
      <3>[  102.216112] _tegra_set_vpr_params[123]: end
      <3>[  102.224080]  vpr-heap: update vpr base to 0x00000000c6000000, size=6000000
      <3>[  102.231387] _tegra_set_vpr_params[120]: begin
      <3>[  102.241775] _tegra_set_vpr_params[123]: end
      <3>[  102.248825]  vpr-heap: update vpr base to 0x00000000c6000000, size=4000000
      <3>[  102.256069] _tegra_set_vpr_params[120]: begin
      <3>[  102.266368] _tegra_set_vpr_params[123]: end
      <3>[  102.273400]  vpr-heap: update vpr base to 0x00000000c6000000, size=2000000
      <3>[  102.280672] _tegra_set_vpr_params[120]: begin
      <3>[  102.290929] _tegra_set_vpr_params[123]: end
      
      Change-Id: I5f604064ce7b8b73ea9ad5860156ae5e2c6cc42a
      Signed-off-by: default avatarKen Chang <kenc@nvidia.com>
      9b51aa87
    • Kalyani Chidambaram's avatar
      Tegra: remove support for USE_COHERENT_MEM · aba5dddc
      Kalyani Chidambaram authored
      
      
      This patch removes the support for 'USE_COHERENT_MEM' as
      Tegra platforms no longer support the feature.
      
      Change-Id: If1c80fc4e5974412572b3bc1fdf9e70b1ee5d4ec
      Signed-off-by: default avatarKalyani Chidambaram <kalyanic@nvidia.com>
      aba5dddc
    • Varun Wadekar's avatar
      Tegra: remove circular dependency with common_def.h · 42080d48
      Varun Wadekar authored
      
      
      This patch stops including common_def.h from platform_def.h to
      fix a circular depoendency between them.
      
      This means platform_def.h now has to define the linker macros:
      * PLATFORM_LINKER_FORMAT
      * PLATFORM_LINKER_ARCH
      
      Change-Id: Icd540b1bd32fb37e0e455e9146c8b7f4b314e012
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      42080d48