1. 06 Apr, 2017 1 commit
  2. 04 Apr, 2017 1 commit
  3. 03 Apr, 2017 1 commit
    • Douglas Raillard's avatar
      Fix ARM_BL31_IN_DRAM build · f9608bc8
      Douglas Raillard authored
      
      
      Some header files using the ULL() macro were not directly including
      utils.h where the macro definition resides. As a consequence, a linker
      script with values using this macro did not see the macro definition
      and kept the "ULL(<value>)" call in the preprocessed file, which lead to
      link error.
      
      Files using ULL() macro now include utils.h directly.
      
      Change-Id: I433a7f36bd21a156c20e69bc2a2bb406140ebdf9
      Signed-off-by: default avatarDouglas Raillard <douglas.raillard@arm.com>
      f9608bc8
  4. 31 Mar, 2017 3 commits
    • dp-arm's avatar
      Juno: Initialize stack protector canary from the trusted entropy source · e6d2aea1
      dp-arm authored
      
      
      Change-Id: I7f3e4bfd46613c6311ba4015d56705414fd6feab
      Signed-off-by: default avatardp-arm <dimitris.papastamos@arm.com>
      e6d2aea1
    • dp-arm's avatar
      Juno: Introduce juno_getentropy(void *buf, size_t len) · df9a39ea
      dp-arm authored
      
      
      This function fills the buffer (first argument) with the specified
      number of bytes (second argument) from the trusted entropy source.
      
      This function will be used to initialize the stack protector canary.
      
      Change-Id: Iff15aaf4778c13fa883ecb5528fcf9b8479d4489
      Signed-off-by: default avatardp-arm <dimitris.papastamos@arm.com>
      df9a39ea
    • Douglas Raillard's avatar
      Add support for GCC stack protection · 51faada7
      Douglas Raillard authored
      
      
      Introduce new build option ENABLE_STACK_PROTECTOR. It enables
      compilation of all BL images with one of the GCC -fstack-protector-*
      options.
      
      A new platform function plat_get_stack_protector_canary() is introduced.
      It returns a value that is used to initialize the canary for stack
      corruption detection. Returning a random value will prevent an attacker
      from predicting the value and greatly increase the effectiveness of the
      protection.
      
      A message is printed at the ERROR level when a stack corruption is
      detected.
      
      To be effective, the global data must be stored at an address
      lower than the base of the stacks. Failure to do so would allow an
      attacker to overwrite the canary as part of an attack which would void
      the protection.
      
      FVP implementation of plat_get_stack_protector_canary is weak as
      there is no real source of entropy on the FVP. It therefore relies on a
      timer's value, which could be predictable.
      
      Change-Id: Icaaee96392733b721fa7c86a81d03660d3c1bc06
      Signed-off-by: default avatarDouglas Raillard <douglas.raillard@arm.com>
      51faada7
  5. 30 Mar, 2017 15 commits
  6. 27 Mar, 2017 4 commits
  7. 23 Mar, 2017 12 commits
    • Varun Wadekar's avatar
      Tegra: memctrl_v2: program Video Memory carveout size in MBs · 3b52fc1f
      Varun Wadekar authored
      
      
      This patch fixes the programming logic for the Video memory carveout's
      size. The Memory Controller expects the size in terms of MBs instead
      of bytes.
      
      Change-Id: Ia8261b737448bae9a435fe21ab336126785d4279
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      3b52fc1f
    • Varun Wadekar's avatar
      Tegra: memctrl_v2: no stream ID override for Security Engine · 99ef4a5c
      Varun Wadekar authored
      
      
      This patch removes stream ID override for the Security Engine
      hardware block as its stream ID is programmed by the NS world
      driver.
      
      Original change by Mallikarjun Kasoju <mkasoju@nvidia.com>
      
      Change-Id: Ia6523c1a1bb0a82bdeb878feb55670813899bdac
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      99ef4a5c
    • Varun Wadekar's avatar
      Tegra186: reset power state info during CPU_ON · b46ac6dc
      Varun Wadekar authored
      
      
      This patch resets the power state info for CPUs when onlining,
      as we set deepest power when offlining a core but that may not
      be requested by non-secure sw which controls idle states. It
      will re-init this info from non-secure software when the core
      come online.
      
      Original change by Prashant Gaikwad <pgaikwad@nvidia.com>
      
      Change-Id: Id6c2fa2b821c7705aafbb561a62348c36fd3abd8
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      b46ac6dc
    • Varun Wadekar's avatar
      Tegra186: enable support for simulation environment · abd3a91d
      Varun Wadekar authored
      
      
      The Tegra simulation environment has limited capabilities. This patch
      checks the chip's major and minor versions to decide the features to
      enable/disable - MCE firmware version checking is disabled and limited
      Memory Controller settings are enabled
      
      Change-Id: I258a807cc3b83cdff14a9975b4ab4f9d1a9d7dcf
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      abd3a91d
    • Varun Wadekar's avatar
      Tegra186: check MCE firmware version during boot · 5cb89c56
      Varun Wadekar authored
      
      
      This patch checks that the system is running with the supported MCE
      firmware during boot. In case the firmware version does not match the
      interface header version, then the system halts.
      
      Change-Id: Ib82013fd1c1668efd6f0e4f36cd3662d339ac076
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      5cb89c56
    • Varun Wadekar's avatar
      Tegra186: fix programming sequence for SC7/SC8 entry · 50f38a4a
      Varun Wadekar authored
      
      
      This patch fixes the programming sequence for 'System Suspend' and
      'Quasi power down' state entry. The device needs to update the
      required power state before querying the MCE firmware to see the
      entry to that power state is allowed.
      
      Original change by Allen Yu <alleny@nvidia.com>
      
      Change-Id: I65e03754322188af913fabf41f29d1c3595afd85
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      50f38a4a
    • Varun Wadekar's avatar
      Tegra186: program default core wake mask during CPU_SUSPEND · 1b9ab054
      Varun Wadekar authored
      
      
      This patch programs the default CPU wake mask during CPU_SUSPEND. This
      reduces the CPU_SUSPEND latency as the system has to send one less SMC
      before issuing the actual suspend request.
      
      Original change by Krishna Sitaraman <ksitaraman@nvidia.com>
      
      Change-Id: I1f9351dde4ab30936070e9f42c2882fa691cbe46
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      1b9ab054
    • Varun Wadekar's avatar
      Tegra186: clear the system cstate for offline core · c60f58ef
      Varun Wadekar authored
      
      
      This patch clears the system cstate when offlining a CPU core as we
      need to update the sytem cstate to SC7 only when we enter system
      suspend.
      
      Original change by Prashant Gaikwad <pgaikwad@nvidia.com>
      
      Change-Id: I1cff9bbab4db7d390a491c8939aea5db6c6b5c59
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      c60f58ef
    • Varun Wadekar's avatar
      Tegra: memctrl_v2: enable APE overrides for chip verification · e8ebf0cb
      Varun Wadekar authored
      
      
      This patch enables overrides for APE domains to allow the chip verification
      software harness (MODS) to execute its test cases.
      
      Original change by Harvey Hsieh <hhsieh@nvidia.com>
      
      Change-Id: I09b22376068c5b65d89c2a53154ccb2c60d955bd
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      e8ebf0cb
    • Varun Wadekar's avatar
      Tegra186: mce: enable LATIC for chip verification · 66ec1125
      Varun Wadekar authored
      
      
      This patch adds a new interface to allow for making an ARI call that
      will enable LATIC for the chip verification software harness.
      
      LATIC allows some MINI ISMs to be read in the CCPLEX. The ISMs are
      used for various measurements relevant ot particular locations in
      Silicon. They are small counters which can be polled to determine
      how fast a particular location in the Silicon is.
      
      Original change by Guy Sotomayor <gsotomayor@nvidia.com>
      
      Change-Id: Ifb49b8863a009d4cdd5d1ba38a23b5374500a4b3
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      66ec1125
    • Varun Wadekar's avatar
      Tegra186: save/restore BL31 context to/from TZDRAM · 68c7de6f
      Varun Wadekar authored
      
      
      This patch adds support to save the BL31 state to the TZDRAM
      before entering system suspend. The TZRAM loses state during
      system suspend and so we need to copy the entire BL31 code to
      TZDRAM before entering the state.
      
      In order to restore the state on exiting system suspend, a new
      CPU reset handler is implemented which gets copied to TZDRAM
      during boot. TO keep things simple we use this same reset handler
      for booting secondary CPUs too.
      
      Change-Id: I770f799c255d22279b5cdb9b4d587d3a4c54fad7
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      68c7de6f
    • Varun Wadekar's avatar
      Tegra186: re-configure MSS' client settings · e64ce3ab
      Varun Wadekar authored
      
      
      This patch reprograms MSS to make ROC deal with ordering of
      MC traffic after boot and system suspend exit. This is needed
      as device boots with MSS having all control but POR wants ROC
      to deal with the ordering. Performance is expected to improve
      with ROC but since no one has really tested the performance,
      keep the option configurable for now by introducing a platform
      level makefile variable.
      
      Change-Id: I2e782fea138ccf9d281eb043a6b2c3bb97c839a7
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      e64ce3ab
  8. 22 Mar, 2017 3 commits
    • Varun Wadekar's avatar
      Tegra186: implement support for System Suspend · 50402b17
      Varun Wadekar authored
      
      
      This patch adds the chip level support for System Suspend entry
      and exit. As part of the entry sequence we first query the MCE
      firmware to check if it is safe to enter system suspend. Once
      we get a green light, we save hardware block settings and enter
      the power state. As expected, all the hardware settings are
      restored once we exit the power state.
      
      Change-Id: I6d192d7568d6a555eb10efdfd45f6d79c20f74ea
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      50402b17
    • Varun Wadekar's avatar
      Tegra186: memctrl_v2: restore video memory settings · ea96ac17
      Varun Wadekar authored
      
      
      The memory controller loses its settings when the device enters system
      suspend state.
      
      This patch adds a handler to restore the Video Memory settings in the
      memory controller, which would be called after exiting the system suspend
      state.
      
      Change-Id: I1ac12426d7290ac1452983d3c9e05fabbf3327fa
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      ea96ac17
    • Varun Wadekar's avatar
      Tegra186: smmu: driver for the smmu hardware block · 4122151f
      Varun Wadekar authored
      
      
      This patch adds a device driver for the SMMU hardware block on
      Tegra186 SoCs. We use the generic ARM SMMU-500 IP block on
      Tegra186. The driver only supports saving the SMMU settings
      before entering system suspend. The MC driver and the NS world
      clients take care of programming their own settings.
      
      Change-Id: Iab5a90310ee10f6bc8745451ce50952ab3de7188
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      4122151f