1. 12 12月, 2017 1 次提交
    • S
      arm64: Add software workaround for Falkor erratum 1041 · 932b50c7
      Shanker Donthineni 提交于
      The ARM architecture defines the memory locations that are permitted
      to be accessed as the result of a speculative instruction fetch from
      an exception level for which all stages of translation are disabled.
      Specifically, the core is permitted to speculatively fetch from the
      4KB region containing the current program counter 4K and next 4K.
      
      When translation is changed from enabled to disabled for the running
      exception level (SCTLR_ELn[M] changed from a value of 1 to 0), the
      Falkor core may errantly speculatively access memory locations outside
      of the 4KB region permitted by the architecture. The errant memory
      access may lead to one of the following unexpected behaviors.
      
      1) A System Error Interrupt (SEI) being raised by the Falkor core due
         to the errant memory access attempting to access a region of memory
         that is protected by a slave-side memory protection unit.
      2) Unpredictable device behavior due to a speculative read from device
         memory. This behavior may only occur if the instruction cache is
         disabled prior to or coincident with translation being changed from
         enabled to disabled.
      
      The conditions leading to this erratum will not occur when either of the
      following occur:
       1) A higher exception level disables translation of a lower exception level
         (e.g. EL2 changing SCTLR_EL1[M] from a value of 1 to 0).
       2) An exception level disabling its stage-1 translation if its stage-2
          translation is enabled (e.g. EL1 changing SCTLR_EL1[M] from a value of 1
          to 0 when HCR_EL2[VM] has a value of 1).
      
      To avoid the errant behavior, software must execute an ISB immediately
      prior to executing the MSR that will change SCTLR_ELn[M] from 1 to 0.
      Signed-off-by: NShanker Donthineni <shankerd@codeaurora.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      932b50c7
  2. 27 6月, 2016 1 次提交
    • G
      arm64: Add back cpu reset routines · f9076ecf
      Geoff Levand 提交于
      Commit 68234df4 ("arm64: kill flush_cache_all()") removed the global
      arm64 routines cpu_reset() and cpu_soft_restart() needed by the arm64
      kexec and kdump support.  Add back a simplified version of
      cpu_soft_restart() with some changes needed for kexec in the new files
      cpu_reset.S, and cpu_reset.h.
      
      When a CPU is reset it needs to be put into the exception level it had when
      it entered the kernel. Update cpu_soft_restart() to accept an argument
      which signals if the reset address should be entered at EL1 or EL2, and
      add a new hypercall HVC_SOFT_RESTART which is used for the EL2 switch.
      Signed-off-by: NGeoff Levand <geoff@infradead.org>
      Reviewed-by: NJames Morse <james.morse@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      f9076ecf