xref: /openbmc/u-boot/arch/arm/cpu/armv8/Kconfig (revision 58c3e620)
123b5877cSLinus Walleijif ARM64
223b5877cSLinus Walleij
31416e2d2SAndre Przywaraconfig ARMV8_SPL_EXCEPTION_VECTORS
41416e2d2SAndre Przywara	bool "Install crash dump exception vectors"
51416e2d2SAndre Przywara	depends on SPL
61416e2d2SAndre Przywara	default y
71416e2d2SAndre Przywara	help
81416e2d2SAndre Przywara	  The default exception vector table is only used for the crash
91416e2d2SAndre Przywara	  dump, but still takes quite a lot of space in the image size.
101416e2d2SAndre Przywara
111416e2d2SAndre Przywara	  Say N here if you are running out of code space in the image
121416e2d2SAndre Przywara	  and want to save some space at the cost of less debugging info.
131416e2d2SAndre Przywara
1423b5877cSLinus Walleijconfig ARMV8_MULTIENTRY
15ab65006bSMasahiro Yamada        bool "Enable multiple CPUs to enter into U-Boot"
1623b5877cSLinus Walleij
173aec452eSMingkai Huconfig ARMV8_SET_SMPEN
183aec452eSMingkai Hu        bool "Enable data coherency with other cores in cluster"
193aec452eSMingkai Hu        help
203aec452eSMingkai Hu	  Say Y here if there is not any trust firmware to set
213aec452eSMingkai Hu	  CPUECTLR_EL1.SMPEN bit before U-Boot.
223aec452eSMingkai Hu
233aec452eSMingkai Hu	  For A53, it enables data coherency with other cores in the
243aec452eSMingkai Hu	  cluster, and for A57/A72, it enables receiving of instruction
253aec452eSMingkai Hu	  cache and TLB maintenance operations.
263aec452eSMingkai Hu	  Cortex A53/57/72 cores require CPUECTLR_EL1.SMPEN set even
273aec452eSMingkai Hu	  for single core systems. Unfortunately write access to this
283aec452eSMingkai Hu	  register may be controlled by EL3/EL2 firmware. To be more
293aec452eSMingkai Hu	  precise, by default (if there is EL2/EL3 firmware running)
303aec452eSMingkai Hu	  this register is RO for NS EL1.
313aec452eSMingkai Hu	  This switch can be used to avoid writing to CPUECTLR_EL1,
323aec452eSMingkai Hu	  it can be safely enabled when EL2/EL3 initialized SMPEN bit
333aec452eSMingkai Hu	  or when CPU implementation doesn't include that register.
343aec452eSMingkai Hu
356b6024eaSMasahiro Yamadaconfig ARMV8_SPIN_TABLE
366b6024eaSMasahiro Yamada	bool "Support spin-table enable method"
376b6024eaSMasahiro Yamada	depends on ARMV8_MULTIENTRY && OF_LIBFDT
386b6024eaSMasahiro Yamada	help
396b6024eaSMasahiro Yamada	  Say Y here to support "spin-table" enable method for booting Linux.
406b6024eaSMasahiro Yamada
416b6024eaSMasahiro Yamada	  To use this feature, you must do:
426b6024eaSMasahiro Yamada	    - Specify enable-method = "spin-table" in each CPU node in the
436b6024eaSMasahiro Yamada	      Device Tree you are using to boot the kernel
4465f32196SMasahiro Yamada	    - Bring secondary CPUs into U-Boot proper in a board specific
4565f32196SMasahiro Yamada	      manner.  This must be done *after* relocation.  Otherwise, the
4665f32196SMasahiro Yamada	      secondary CPUs will spin in unprotected memory area because the
4765f32196SMasahiro Yamada	      master CPU protects the relocated spin code.
486b6024eaSMasahiro Yamada
496b6024eaSMasahiro Yamada	  U-Boot automatically does:
506b6024eaSMasahiro Yamada	    - Set "cpu-release-addr" property of each CPU node
516b6024eaSMasahiro Yamada	      (overwrites it if already exists).
526b6024eaSMasahiro Yamada	    - Reserve the code for the spin-table and the release address
536b6024eaSMasahiro Yamada	      via a /memreserve/ region in the Device Tree.
546b6024eaSMasahiro Yamada
550897eb2cSHou Zhiqiangmenu "ARMv8 secure monitor firmware"
560897eb2cSHou Zhiqiangconfig ARMV8_SEC_FIRMWARE_SUPPORT
570897eb2cSHou Zhiqiang	bool "Enable ARMv8 secure monitor firmware framework support"
580897eb2cSHou Zhiqiang	select FIT
5958008cbaSMichal Simek	select OF_LIBFDT
600897eb2cSHou Zhiqiang	help
610897eb2cSHou Zhiqiang	  This framework is aimed at making secure monitor firmware load
620897eb2cSHou Zhiqiang	  process brief.
630897eb2cSHou Zhiqiang	  Note: Only FIT format image is supported.
640897eb2cSHou Zhiqiang	  You should prepare and provide the below information:
650897eb2cSHou Zhiqiang	    - Address of secure firmware.
660897eb2cSHou Zhiqiang	    - Address to hold the return address from secure firmware.
670897eb2cSHou Zhiqiang	    - Secure firmware FIT image related information.
680897eb2cSHou Zhiqiang	      Such as: SEC_FIRMWARE_FIT_IMAGE and SEC_FIRMEWARE_FIT_CNF_NAME
690897eb2cSHou Zhiqiang	    - The target exception level that secure monitor firmware will
700897eb2cSHou Zhiqiang	      return to.
710897eb2cSHou Zhiqiang
720897eb2cSHou Zhiqiangconfig SPL_ARMV8_SEC_FIRMWARE_SUPPORT
730897eb2cSHou Zhiqiang	bool "Enable ARMv8 secure monitor firmware framework support for SPL"
740897eb2cSHou Zhiqiang	select SPL_FIT
7558008cbaSMichal Simek	select SPL_OF_LIBFDT
760897eb2cSHou Zhiqiang	help
770897eb2cSHou Zhiqiang	  Say Y here to support this framework in SPL phase.
780897eb2cSHou Zhiqiang
79daa92644SHou Zhiqiangconfig SEC_FIRMWARE_ARMV8_PSCI
80daa92644SHou Zhiqiang	bool "PSCI implementation in secure monitor firmware"
81daa92644SHou Zhiqiang	depends on ARMV8_SEC_FIRMWARE_SUPPORT || SPL_ARMV8_SEC_FIRMWARE_SUPPORT
82daa92644SHou Zhiqiang	help
83daa92644SHou Zhiqiang	  This config enables the ARMv8 PSCI implementation in secure monitor
84daa92644SHou Zhiqiang	  firmware. This is a private PSCI implementation and different from
85daa92644SHou Zhiqiang	  those implemented under the common ARMv8 PSCI framework.
86daa92644SHou Zhiqiang
870897eb2cSHou Zhiqiangconfig ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT
880897eb2cSHou Zhiqiang	bool "ARMv8 secure monitor firmware ERET address byteorder swap"
890897eb2cSHou Zhiqiang	depends on ARMV8_SEC_FIRMWARE_SUPPORT || SPL_ARMV8_SEC_FIRMWARE_SUPPORT
900897eb2cSHou Zhiqiang	help
910897eb2cSHou Zhiqiang	  Say Y here when the endianness of the register or memory holding the
920897eb2cSHou Zhiqiang	  Secure firmware exception return address is different with core's.
930897eb2cSHou Zhiqiang
940897eb2cSHou Zhiqiangendmenu
950897eb2cSHou Zhiqiang
968069821fSAlexander Grafconfig PSCI_RESET
978069821fSAlexander Graf	bool "Use PSCI for reset and shutdown"
988069821fSAlexander Graf	default y
9981ea0083SHeinrich Schuchardt	select ARM_SMCCC if OF_CONTROL
100bdc48ec6SBhaskar Upadhaya	depends on !ARCH_EXYNOS7 && !ARCH_BCM283X && \
1018069821fSAlexander Graf		   !TARGET_LS2080A_SIMU && !TARGET_LS2080AQDS && \
102bdc48ec6SBhaskar Upadhaya		   !TARGET_LS2080ARDB && !TARGET_LS2080A_EMU && \
1037769776aSAshish Kumar		   !TARGET_LS1088ARDB && !TARGET_LS1088AQDS && \
1048069821fSAlexander Graf		   !TARGET_LS1012ARDB && !TARGET_LS1012AFRDM && \
105b0ce187bSBhaskar Upadhaya		   !TARGET_LS1012A2G5RDB && !TARGET_LS1012AQDS && \
1069629ccddSBhaskar Upadhaya		   !TARGET_LS1012AFRWY && \
107441a2306SAlexander Graf		   !TARGET_LS1043ARDB && !TARGET_LS1043AQDS && \
108441a2306SAlexander Graf		   !TARGET_LS1046ARDB && !TARGET_LS1046AQDS && \
109*58c3e620SPriyanka Jain		   !TARGET_LS2081ARDB && !TARGET_LX2160ARDB && \
1108bf5c1e1SRob Clark		   !ARCH_UNIPHIER && !TARGET_S32V234EVB
1118069821fSAlexander Graf	help
1128069821fSAlexander Graf	  Most armv8 systems have PSCI support enabled in EL3, either through
1138069821fSAlexander Graf	  ARM Trusted Firmware or other firmware.
1148069821fSAlexander Graf
1158069821fSAlexander Graf	  On these systems, we do not need to implement system reset manually,
1168069821fSAlexander Graf	  but can instead rely on higher level firmware to deal with it.
1178069821fSAlexander Graf
1188069821fSAlexander Graf	  Select Y here to make use of PSCI calls for system reset
1198069821fSAlexander Graf
120df88cb3bSmacro.wave.z@gmail.comconfig ARMV8_PSCI
121df88cb3bSmacro.wave.z@gmail.com	bool "Enable PSCI support" if EXPERT
122df88cb3bSmacro.wave.z@gmail.com	default n
123df88cb3bSmacro.wave.z@gmail.com	help
124df88cb3bSmacro.wave.z@gmail.com	  PSCI is Power State Coordination Interface defined by ARM.
125df88cb3bSmacro.wave.z@gmail.com	  The PSCI in U-boot provides a general framework and each platform
126df88cb3bSmacro.wave.z@gmail.com	  can implement their own specific PSCI functions.
127df88cb3bSmacro.wave.z@gmail.com	  Say Y here to enable PSCI support on ARMv8 platform.
128df88cb3bSmacro.wave.z@gmail.com
129df88cb3bSmacro.wave.z@gmail.comconfig ARMV8_PSCI_NR_CPUS
130df88cb3bSmacro.wave.z@gmail.com	int "Maximum supported CPUs for PSCI"
131df88cb3bSmacro.wave.z@gmail.com	depends on ARMV8_PSCI
132df88cb3bSmacro.wave.z@gmail.com	default 4
133df88cb3bSmacro.wave.z@gmail.com	help
134df88cb3bSmacro.wave.z@gmail.com	  The maximum number of CPUs supported in the PSCI firmware.
135df88cb3bSmacro.wave.z@gmail.com	  It is no problem to set a larger value than the number of CPUs in
136df88cb3bSmacro.wave.z@gmail.com	  the actual hardware implementation.
137df88cb3bSmacro.wave.z@gmail.com
13814bf25d5Smacro.wave.z@gmail.comconfig ARMV8_PSCI_CPUS_PER_CLUSTER
13914bf25d5Smacro.wave.z@gmail.com	int "Number of CPUs per cluster"
14014bf25d5Smacro.wave.z@gmail.com	depends on ARMV8_PSCI
14114bf25d5Smacro.wave.z@gmail.com	default 0
14214bf25d5Smacro.wave.z@gmail.com	help
14314bf25d5Smacro.wave.z@gmail.com	  The number of CPUs per cluster, suppose each cluster has same number
14414bf25d5Smacro.wave.z@gmail.com	  of CPU cores, platforms with asymmetric clusters don't apply here.
14514bf25d5Smacro.wave.z@gmail.com	  A value 0 or no definition of it works for single cluster system.
14614bf25d5Smacro.wave.z@gmail.com	  System with multi-cluster should difine their own exact value.
14714bf25d5Smacro.wave.z@gmail.com
148c0f3296fSChee Hong Angconfig ARMV8_EA_EL3_FIRST
149c0f3296fSChee Hong Ang	bool "External aborts and SError interrupt exception are taken in EL3"
150c0f3296fSChee Hong Ang	default n
151c0f3296fSChee Hong Ang	help
152c0f3296fSChee Hong Ang	  Exception handling at all exception levels for External Abort and
153c0f3296fSChee Hong Ang	  SError interrupt exception are taken in EL3.
154c0f3296fSChee Hong Ang
155df88cb3bSmacro.wave.z@gmail.comif SYS_HAS_ARMV8_SECURE_BASE
156df88cb3bSmacro.wave.z@gmail.com
157df88cb3bSmacro.wave.z@gmail.comconfig ARMV8_SECURE_BASE
158df88cb3bSmacro.wave.z@gmail.com	hex "Secure address for PSCI image"
159df88cb3bSmacro.wave.z@gmail.com	depends on ARMV8_PSCI
160df88cb3bSmacro.wave.z@gmail.com	help
161df88cb3bSmacro.wave.z@gmail.com	  Address for placing the PSCI text, data and stack sections.
162df88cb3bSmacro.wave.z@gmail.com	  If not defined, the PSCI sections are placed together with the u-boot
163df88cb3bSmacro.wave.z@gmail.com	  but platform can choose to place PSCI code image separately in other
164df88cb3bSmacro.wave.z@gmail.com	  places such as some secure RAM built-in SOC etc.
165df88cb3bSmacro.wave.z@gmail.com
166df88cb3bSmacro.wave.z@gmail.comendif
167df88cb3bSmacro.wave.z@gmail.com
16823b5877cSLinus Walleijendif
169