1. 03 9月, 2021 1 次提交
    • T
      Revert most of the series for adding vexpress_aemv8r support · 00179319
      Tom Rini 提交于
      Per a request from Andre Przywara and agreed with by Peter Hoyes, the
      vexpress aemv8r support wasn't quite ready to be merged, but the
      discussion had moved off list.  We should keep the first patch in the
      series for now, but revert the rest.  This reverts the following
      commits:
      
      e0bd6f31 doc: Add documentation for the Arm vexpress board configs
      30e5a449 arm: Use armv8_switch_to_el1 env to switch to EL1
      b53bbca6 vexpress64: Add BASER_FVP vexpress board variant
      2f5b7b74 armv8: Add ARMv8 MPU configuration logic
      37a757e2 armv8: Ensure EL1&0 VMSA is enabled
      Signed-off-by: NTom Rini <trini@konsulko.com>
      00179319
  2. 02 9月, 2021 3 次提交
    • O
      psci: fix double declaration · 7befc849
      Oleksandr Suvorov 提交于
      The prototype of psci_features() duplicated. Remove extra declaration.
      
      Fixed: e21e3ffd ("psci: Fix warnings when compiling with W=1")
      Reported-by: NMichael Scott <mike@foundries.io>
      Signed-off-by: NOleksandr Suvorov <oleksandr.suvorov@foundries.io>
      7befc849
    • P
      armv8: Ensure EL1&0 VMSA is enabled · 37a757e2
      Peter Hoyes 提交于
      On Armv8-R, the EL1&0 memory system architecture is configurable as a
      VMSA or PMSA, and resets to an "architecturally unknown" value.
      
      Add code to armv8_switch_to_el1_m which detects whether the MSA at
      EL1&0 is configurable using the id_aa64mmfr0_el1 register MSA fields.
      If it is we must ensure the VMSA is enabled so that a rich OS can boot.
      
      The MSA and MSA_FRAC fields are described in the Armv8-R architecture
      profile supplement (section G1.3.7):
      https://developer.arm.com/documentation/ddi0600/latest/Signed-off-by: NPeter Hoyes <Peter.Hoyes@arm.com>
      37a757e2
    • P
      armv8: Disable pointer authentication traps for EL1 · 53b40e8d
      Peter Hoyes 提交于
      The use of ARMv8.3 pointer authentication (PAuth) is governed by fields
      in HCR_EL2, which trigger a 'trap to EL2' if not enabled. The reset
      value of these fields is 'architecturally unknown' so we must ensure
      that the fields are enabled (to disable the traps) if we are entering
      the kernel at EL1.
      
      The APK field disables PAuth instruction traps and the API field
      disables PAuth register traps
      
      Add code to disable the traps in armv8_switch_to_el1_m. Prior to doing
      so, it checks fields in the ID_AA64ISAR1_EL1 register to ensure pointer
      authentication is supported by the hardware.
      
      The runtime checks require a second temporary register, so add this to
      the EL1 transition macro signature and update 2 call sites.
      Signed-off-by: NPeter Hoyes <Peter.Hoyes@arm.com>
      53b40e8d
  3. 24 7月, 2021 1 次提交
    • P
      armv8: Initialize CNTFRQ if at highest exception level · c48fec6e
      Peter Hoyes 提交于
      CNTFRQ_EL0 is only writable from the highest supported exception
      level on the platform. For Armv8-A, this is typically EL3, but
      technically EL2 and EL3 are optional so it may need to be
      initialized at EL2 or EL1. For Armv8-R, the highest exception
      level is always EL2.
      
      This patch moves the initialization outside of the switch_el
      block and uses a new macro branch_if_not_highest_el which
      dynamically detects whether it is at the highest supported
      exception level.
      
      Linux's docs state that CNTFRQ_EL0 should be initialized by the
      bootloader. If not set, the the U-Boot prompt countdown hangs.
      Signed-off-by: NPeter Hoyes <Peter.Hoyes@arm.com>
      c48fec6e
  4. 03 3月, 2021 3 次提交
  5. 16 1月, 2021 1 次提交
  6. 29 7月, 2020 1 次提交
  7. 11 7月, 2020 2 次提交
  8. 08 7月, 2020 1 次提交
    • H
      arm: use correct argument size of special registers · 22a4e006
      Heinrich Schuchardt 提交于
      Compiling with clang on ARMv8 shows errors like:
      
      ./arch/arm/include/asm/system.h:162:32: note: use constraint modifier "w"
                      asm volatile("msr sctlr_el1, %0" : : "r" (val) : "cc");
                                                   ^~
                                                   %w0
      
      These errors are due to using an incorrect size for the variables used
      for writing to and reading from special registers which have 64 bits on
      ARMv8.
      
      Mask off reserved bits when reading the exception level.
      Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
      22a4e006
  9. 03 6月, 2020 1 次提交
  10. 19 5月, 2020 1 次提交
    • S
      arm: Don't include common.h in header files · c3dc39a2
      Simon Glass 提交于
      It is bad practice to include common.h in other header files since it can
      bring in any number of superfluous definitions. It implies that some C
      files don't include it and thus may be missing CONFIG options that are set
      up by that file. The C files should include these themselves.
      
      Update some header files in arch/arm to drop this.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      c3dc39a2
  11. 01 5月, 2020 1 次提交
    • P
      arm: caches: add DCACHE_DEFAULT_OPTION · 2e8d68e2
      Patrick Delaunay 提交于
      Add the new flags DCACHE_DEFAULT_OPTION to define the default
      option to use according the compilation flags
      CONFIG_SYS_ARM_CACHE_*.
      
      This new compilation flag allows to simplify dram_bank_mmu_setup()
      and can be used as third parameter (option=dcache option to select)
      of mmu_set_region_dcache_behaviour function.
      Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com>
      2e8d68e2
  12. 11 1月, 2020 1 次提交
  13. 25 7月, 2019 1 次提交
    • P
      psci: Fix warnings when compiling with W=1 · e21e3ffd
      Patrick Delaunay 提交于
      This patch solves the following warnings:
      arch/arm/mach-stm32mp/psci.c:
      
      warning: no previous prototype for ‘psci_set_state’ [-Wmissing-prototypes]
      warning: no previous prototype for ‘psci_arch_cpu_entry’ [-Wmissing-prototypes]
      warning: no previous prototype for ‘psci_features’ [-Wmissing-prototypes]
      warning: no previous prototype for ‘psci_version’ [-Wmissing-prototypes]
      warning: no previous prototype for ‘psci_affinity_info’ [-Wmissing-prototypes]
      warning: no previous prototype for ‘psci_migrate_info_type’ [-Wmissing-prototypes]
      warning: no previous prototype for ‘psci_cpu_on’ [-Wmissing-prototypes]
      warning: no previous prototype for ‘psci_cpu_off’ [-Wmissing-prototypes]
      warning: no previous prototype for ‘psci_system_reset’ [-Wmissing-prototypes]
      warning: no previous prototype for ‘psci_system_off’ [-Wmissing-prototypes]
      Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com>
      e21e3ffd
  14. 17 11月, 2018 1 次提交
  15. 08 5月, 2018 1 次提交
  16. 22 11月, 2017 1 次提交
  17. 09 10月, 2017 1 次提交
  18. 12 5月, 2017 1 次提交
  19. 14 3月, 2017 1 次提交
  20. 19 1月, 2017 1 次提交
  21. 16 12月, 2016 1 次提交
  22. 23 11月, 2016 2 次提交
  23. 14 11月, 2016 1 次提交
    • K
      arm: Set TTB XN bit in case DCACHE_OFF for LPAE mode · 06d43c80
      Keerthy 提交于
      While we setup the mmu initially we mark set_section_dcache with
      DCACHE_OFF flag. In case of non-LPAE mode the DCACHE_OFF macro
      is rightly defined with TTB_SECT_XN_MASK set so as to mark all the
      4GB XN. In case of LPAE mode  XN(Execute-never) bit is not set with
      DCACHE_OFF. Hence XN bit is not set by default for DCACHE_OFF which
      keeps all the regions execute okay and this leads to random speculative
      fetches in random memory regions which was eventually caught by kernel
      omap-l3-noc driver.
      
      Fix this to mark the regions as XN by default.
      Signed-off-by: NKeerthy <j-keerthy@ti.com>
      Reviewed-by: NAlexander Graf <agraf@suse.de>
      Reviewed-by: NTom Rini <trini@konsulko.com>
      06d43c80
  24. 08 11月, 2016 1 次提交
  25. 18 10月, 2016 2 次提交
  26. 07 10月, 2016 1 次提交
  27. 05 8月, 2016 1 次提交
    • T
      ARM: Rework and correct barrier definitions · a78cd861
      Tom Rini 提交于
      As part of testing booting Linux kernels on Rockchip devices, it was
      discovered by Ziyuan Xu and Sandy Patterson that we had multiple and for
      some cases incomplete isb definitions.  This was causing a failure to
      boot of the Linux kernel.
      
      In order to solve this problem as well as cover any corner cases that we
      may also have had a number of changes are made in order to consolidate
      things.  First, <asm/barriers.h> now becomes the source of isb/dsb/dmb
      definitions.  This however introduces another complexity.  Due to
      needing to build SPL for 32bit tegra with -march=armv4 we need to borrow
      the __LINUX_ARM_ARCH__ logic from the Linux Kernel in a more complete
      form.  Move this from arch/arm/lib/Makefile to arch/arm/Makefile and add
      a comment about it.  Now that we can always know what the target CPU is
      capable off we can get always do the correct thing for the barrier.  The
      final part of this is that need to be consistent everywhere and call
      isb()/dsb()/dmb() and NOT call ISB/DSB/DMB in some cases and the
      function names in others.
      Reviewed-by: NStephen Warren <swarren@nvidia.com>
      Tested-by: NStephen Warren <swarren@nvidia.com>
      Acked-by: NZiyuan Xu <xzy.xu@rock-chips.com>
      Acked-by: NSandy Patterson <apatterson@sightlogix.com>
      Reported-by: NZiyuan Xu <xzy.xu@rock-chips.com>
      Reported-by: NSandy Patterson <apatterson@sightlogix.com>
      Signed-off-by: NTom Rini <trini@konsulko.com>
      a78cd861
  28. 28 5月, 2016 1 次提交
  29. 27 3月, 2016 2 次提交
    • A
      arm: Add support for HYP mode and LPAE page tables · d990f5c8
      Alexander Graf 提交于
      We currently always modify the SVC versions of registers and only support
      the short descriptor PTE format.
      
      Some boards however (like the RPi2) run in HYP mode. There, we need to modify
      the HYP version of system registers and HYP mode only supports the long
      descriptor PTE format.
      
      So this patch introduces support for both long descriptor PTEs and HYP mode
      registers.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      d990f5c8
    • A
      arm64: Add 32bit arm compatible dcache definitions · 53eb45ef
      Alexander Graf 提交于
      We want to be able to reuse device drivers from 32bit code, so let's add
      definitions for all the dcache options that 32bit code has.
      
      While at it, fix up the DCACHE_OFF configuration. That was setting the bits
      to declare a PTE a PTE and left the MAIR index bit at 0. Drop the useless
      bits and make the index explicit.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      53eb45ef
  30. 16 3月, 2016 2 次提交
    • A
      arm64: Remove non-full-va map code · 7985cdf7
      Alexander Graf 提交于
      By now the code to only have a single page table level with 64k page
      size and 42 bit address space is no longer used by any board in tree,
      so we can safely remove it.
      
      To clean up code, move the layerscape mmu code to the new defines,
      removing redundant field definitions.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      7985cdf7
    • A
      arm64: Make full va map code more dynamic · 5e2ec773
      Alexander Graf 提交于
      The idea to generate our pages tables from an array of memory ranges
      is very sound. However, instead of hard coding the code to create up
      to 2 levels of 64k granule page tables, we really should just create
      normal 4k page tables that allow us to set caching attributes on 2M
      or 4k level later on.
      
      So this patch moves the full_va mapping code to 4k page size and
      makes it fully flexible to dynamically create as many levels as
      necessary for a map (including dynamic 1G/2M pages). It also adds
      support to dynamically split a large map into smaller ones when
      some code wants to set dcache attributes.
      
      With all this in place, there is very little reason to create your
      own page tables in board specific files.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      5e2ec773
  31. 31 1月, 2016 1 次提交