1. 23 Dec, 2020 5 commits
    • Suman Anna's avatar
      ti: k3: drivers: ti_sci: Update ti_sci_msg_req_reboot to include domain · 22b7a229
      Suman Anna authored
      
      
      The ti_sci_msg_req_reboot message payload has been extended to include
      a domain field, and this should be zero to reset the entire SoC with
      System Firmwares newer than v2020.04. Add the domain field to the
      ti_sci_msg_req_reboot message structure for completeness. Set it up
      to zero to fix the reboot issues with newer firmwares.
      
      This takes care of the specific ABI that changed and has an impact on
      ATF function.
      Signed-off-by: default avatarSuman Anna <s-anna@ti.com>
      Signed-off-by: default avatarDave Gerlach <d-gerlach@ti.com>
      Signed-off-by: default avatarNishanth Menon <nm@ti.com>
      Change-Id: I4f8064b9d6555687822dc2b2b8ec97609286fa0b
      22b7a229
    • Nishanth Menon's avatar
      ti: k3: common: sec_proxy: Fill non-message data fields with 0x0 · f577388a
      Nishanth Menon authored
      
      
      Sec proxy data buffer is 60 bytes with the last of the registers
      indicating transmission completion. This however poses a bit
      of a challenge.
      
      The backing memory for sec_proxy is regular memory, and all sec proxy
      does is to trigger a burst of all 60 bytes of data over to the target
      thread backing ring accelerator. It doesn't do a memory scrub when
      it moves data out in the burst. When we transmit multiple messages,
      remnants of previous message is also transmitted which results in
      some random data being set in TISCI fields of messages that have been
      expanded forward.
      
      The entire concept of backward compatibility hinges on the fact that
      the unused message fields remain 0x0 allowing for 0x0 value to be
      specially considered when backward compatibility of message extension
      is done.
      
      So, instead of just writing the completion register, we continue
      to fill the message buffer up with 0x0 (note: for partial message
      involving completion, we already do this).
      
      This allows us to scale and introduce ABI changes back into TF-A only
      as needed.
      Signed-off-by: default avatarNishanth Menon <nm@ti.com>
      Change-Id: Ie22cb2a319f4aa80aef23ffc7e059207e5d4c640
      f577388a
    • Nishanth Menon's avatar
      ti: k3: common: Make plat_get_syscnt_freq2 check CNT_FID0 GTC reg · 6a22d9ea
      Nishanth Menon authored
      ARM's generic timer[1] picks up it's graycode from GTC. However, the
      frequency of the GTC is supposed to be programmed in CNTFID0[2]
      register.
      
      In K3, architecture, GTC provides a central time to many parts of the
      SoC including graycode to the generic timer in the ARMv8 subsystem.
      However, due to the central nature and the need to enable the counter
      early in the boot process, the R5 based bootloader enables GTC and
      programs it's frequency based on central needs of the system. This
      may not be a constant 200MHz based on the system. The bootloader is
      supposed to program the FID0 register with the correct frequency it
      has sourced for GTC from the central system controller, and TF-A is
      supposed to use that as the frequency for it's local timer.
      
      A mismatch in programmed frequency and what we program for generic
      timer will, as we can imagine, all kind of weird mayhem.
      
      So, check the CNTFID0 register, if it is 0, warn and use the default
      frequency to continue the boot process.
      
      While at it, we can also check CNTCR register to provide some basic
      diagnostics to make sure that we don't have OS folks scratch their
      heads. Even though this is used during cpu online operations, the cost
      of this additional check is minimal enough for us not to use #ifdeffery
      with DEBUG flags.
      
      [1] https://developer.arm.com/documentation/100095/0002/generic-timer/generic-timer-register-summary/aarch64-generic-timer-register-summary
      [2] https://developer.arm.com/docs/ddi0595/h/external-system-registers/cntfid0
      [3] https://developer.arm.com/docs/ddi0595/h/external-system-registers/cntcr
      
      Signed-off-by: default avatarNishanth Menon <nm@ti.com>
      Change-Id: Ib03e06788580f3540dcb1a11677d0d6d398b2c9f
      6a22d9ea
    • Nishanth Menon's avatar
      ti: k3: common: Enable A72 erratum 1319367 · 60fba7c8
      Nishanth Menon authored
      The CatB erratum ARM_ERRATA_A72_1319367 applies to all TI A72
      platforms as well.
      
      See the following for further information:
      https://developer.arm.com/documentation/epm012079/11/
      
      Signed-off-by: default avatarNishanth Menon <nm@ti.com>
      Change-Id: I80c6262b9cdadcb12f6dfd5a21272989ba257719
      60fba7c8
    • Nishanth Menon's avatar
      ti: k3: common: Enable A53 erratum 1530924 · c3e23332
      Nishanth Menon authored
      The CatB erratum ARM_ERRATA_A53_1530924 applies to all TI A53
      platforms as well.
      
      See the following for further information:
      https://developer.arm.com/documentation/epm048406/2100
      
      Signed-off-by: default avatarNishanth Menon <nm@ti.com>
      Change-Id: Ic095424ce510139e060b38cfb84509d2cc573cad
      c3e23332
  2. 09 Oct, 2020 1 commit
    • Jimmy Brisson's avatar
      Don't return error information from console_flush · 831b0e98
      Jimmy Brisson authored
      
      
      And from crash_console_flush.
      
      We ignore the error information return by console_flush in _every_
      place where we call it, and casting the return type to void does not
      work around the MISRA violation that this causes. Instead, we collect
      the error information from the driver (to avoid changing that API), and
      don't return it to the caller.
      
      Change-Id: I1e35afe01764d5c8f0efd04f8949d333ffb688c1
      Signed-off-by: default avatarJimmy Brisson <jimmy.brisson@arm.com>
      831b0e98
  3. 01 Jun, 2020 1 commit
  4. 25 May, 2020 1 commit
    • Jan Kiszka's avatar
      ti: k3: common: Implement stub system_off · 42d9b3aa
      Jan Kiszka authored
      
      
      PSCI demands that SYSTEM_OFF must not return. While it seems like a
      generic ATF bug that this is possible when a platform does not Implement
      a corresponding handler, let's do that here until it's addressed
      differently.
      Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
      Change-Id: I4c08948b18bbfdc3a24214f2ae0fbad9e017ada1
      42d9b3aa
  5. 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
  6. 10 Mar, 2020 1 commit
  7. 25 Feb, 2020 1 commit
  8. 28 Jan, 2020 1 commit
  9. 27 Jan, 2020 4 commits
  10. 29 Oct, 2019 1 commit
    • Andrew F. Davis's avatar
      ti: k3: common: Add PIE support · ff835a9a
      Andrew F. Davis authored
      
      
      Running TF-A from non-standard location such as DRAM is useful for some
      SRAM heavy use-cases. Allow the TF-A binary to be executed from an
      arbitrary memory location.
      Signed-off-by: default avatarAndrew F. Davis <afd@ti.com>
      Change-Id: Icd97926e4d97f37d7cde4a92758a52f57d569111
      ff835a9a
  11. 04 Jul, 2019 1 commit
    • Andrew F. Davis's avatar
      ti: k3: common: Trap all asynchronous bus errors to EL3 · 93d5e141
      Andrew F. Davis authored
      
      
      These errors are asynchronous and cannot be directly correlated with the
      exact current running software, so handling them in the same EL is not
      critical. Handling them in TF-A allows for more platform specific
      decoding of the implementation defined exception registers
      Signed-off-by: default avatarAndrew F. Davis <afd@ti.com>
      Change-Id: Iee7a38c9fc9c698fa0ad42dafa598bcbed6a4fda
      93d5e141
  12. 28 Jun, 2019 1 commit
  13. 06 Jun, 2019 2 commits
    • Andrew F. Davis's avatar
      ti: k3: common: Remove coherency workaround for AM65x · 48d6b264
      Andrew F. Davis authored
      
      
      We previously left our caches on during power-down to prevent any
      non-caching accesses to memory that is cached by other cores. Now with
      the last accessed areas all being marked as non-cached by
      USE_COHERENT_MEM we can rely on that to workaround our interconnect
      issues. Remove the old workaround.
      
      Change-Id: Idadb7696d1449499d1edff4f6f62ab3b99d1efb7
      Signed-off-by: default avatarAndrew F. Davis <afd@ti.com>
      48d6b264
    • Andrew F. Davis's avatar
      ti: k3: common: Use coherent memory for shared data · 65f7b817
      Andrew F. Davis authored
      
      
      HW_ASSISTED_COHERENCY implies something stronger than just hardware
      coherent interconnect, specifically a DynamIQ capable ARM core.
      
      For K3, lets use WARMBOOT_ENABLE_DCACHE_EARLY to enable caches early
      and then let the caches get shut off on powerdown, to prevent data
      corruption we also need to USE_COHERENT_MEM so that any accesses to
      shared memory after this point is only to memory that is set as
      non-cached for all cores.
      
      Change-Id: Ib9337f012df0e0388237942607c501b6f3e2a949
      Signed-off-by: default avatarAndrew F. Davis <afd@ti.com>
      65f7b817
  14. 22 May, 2019 2 commits
  15. 30 Apr, 2019 1 commit
    • Andrew F. Davis's avatar
      ti: k3: common: Remove MSMC port definitions · a82bf5ad
      Andrew F. Davis authored
      
      
      The MSMC port defines were added to help in the case when some ports
      are not connected and have no cores attached. We can get the same
      functionality by defined the number of cores on that port to zero.
      This simplifies several code paths, do this here.
      Signed-off-by: default avatarAndrew F. Davis <afd@ti.com>
      Change-Id: I3247fe37af7b86c3227e647b4f617fab70c8ee8a
      a82bf5ad
  16. 26 Apr, 2019 4 commits
  17. 23 Apr, 2019 4 commits
    • Andrew F. Davis's avatar
      ti: k3: drivers: ti_sci: Retry message receive on bad sequence ID · 71a35273
      Andrew F. Davis authored
      
      
      When we get a sequence ID that does not match what we expect then the we
      are looking at is not the one we are expecting and so we error out. We
      can also assume this message is a stale message left in the queue, in
      this case we can read in the next message and check again for our
      message. Switch to doing that here. We only retry a set number of times
      so we don't lock the system if our message is actually lost and will
      never show up.
      Signed-off-by: default avatarAndrew F. Davis <afd@ti.com>
      Change-Id: I6c8186ccc45e646d3ba9d431f7d4c451dcd70c5c
      71a35273
    • Andrew F. Davis's avatar
      ti: k3: drivers: ti_sci: Cleanup sequence ID usage · 7a469035
      Andrew F. Davis authored
      
      
      The sequence ID can be set with a message to identify it when it is
      responded to in the response queue. We assign each message a number and
      check for this same number to detect response mismatches.
      
      Start this at 0 and increase it by one for each message sent, even ones
      that do not request or wait for a response as one may still be delivered
      in some cases and we want to detect this.
      Signed-off-by: default avatarAndrew F. Davis <afd@ti.com>
      Change-Id: I72b4d1ef98bf1c1409d9db9db074af8dfbcd83ea
      7a469035
    • Andrew F. Davis's avatar
      ti: k3: drivers: sec_proxy: Use direction definitions · fb98ca5a
      Andrew F. Davis authored
      
      
      The direction of a thread should be explicitly compared to avoid
      confusion. Also fixup message wording based on this direction.
      Signed-off-by: default avatarAndrew F. Davis <afd@ti.com>
      Change-Id: Ia3cf9413cd23af476bb5d2e6d70bee15234cbd11
      fb98ca5a
    • Andrew F. Davis's avatar
      ti: k3: drivers: sec_proxy: Fix printf format specifiers · 6c30baee
      Andrew F. Davis authored
      
      
      The ID of a thread is not used outside for printing it out when
      something goes wrong. The specifier used is also not consistent.
      Instead of storing the thread ID, store its name and print that.
      Signed-off-by: default avatarAndrew F. Davis <afd@ti.com>
      Change-Id: Id137c2f8dfdd5c599e220193344ece903f80af7b
      6c30baee
  18. 19 Apr, 2019 4 commits
  19. 11 Feb, 2019 4 commits