xref: /OK3568_Linux_fs/u-boot/arch/arm/cpu/armv8/Kconfig (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyunif ARM64
2*4882a593Smuzhiyun
3*4882a593Smuzhiyunconfig ARMV8_MULTIENTRY
4*4882a593Smuzhiyun        bool "Enable multiple CPUs to enter into U-Boot"
5*4882a593Smuzhiyun
6*4882a593Smuzhiyunconfig ARMV8_SET_SMPEN
7*4882a593Smuzhiyun        bool "Enable data coherency with other cores in cluster"
8*4882a593Smuzhiyun        help
9*4882a593Smuzhiyun	  Say Y here if there is not any trust firmware to set
10*4882a593Smuzhiyun	  CPUECTLR_EL1.SMPEN bit before U-Boot.
11*4882a593Smuzhiyun
12*4882a593Smuzhiyun	  For A53, it enables data coherency with other cores in the
13*4882a593Smuzhiyun	  cluster, and for A57/A72, it enables receiving of instruction
14*4882a593Smuzhiyun	  cache and TLB maintenance operations.
15*4882a593Smuzhiyun	  Cortex A53/57/72 cores require CPUECTLR_EL1.SMPEN set even
16*4882a593Smuzhiyun	  for single core systems. Unfortunately write access to this
17*4882a593Smuzhiyun	  register may be controlled by EL3/EL2 firmware. To be more
18*4882a593Smuzhiyun	  precise, by default (if there is EL2/EL3 firmware running)
19*4882a593Smuzhiyun	  this register is RO for NS EL1.
20*4882a593Smuzhiyun	  This switch can be used to avoid writing to CPUECTLR_EL1,
21*4882a593Smuzhiyun	  it can be safely enabled when EL2/EL3 initialized SMPEN bit
22*4882a593Smuzhiyun	  or when CPU implementation doesn't include that register.
23*4882a593Smuzhiyun
24*4882a593Smuzhiyunconfig ARMV8_SPIN_TABLE
25*4882a593Smuzhiyun	bool "Support spin-table enable method"
26*4882a593Smuzhiyun	depends on ARMV8_MULTIENTRY && OF_LIBFDT
27*4882a593Smuzhiyun	help
28*4882a593Smuzhiyun	  Say Y here to support "spin-table" enable method for booting Linux.
29*4882a593Smuzhiyun
30*4882a593Smuzhiyun	  To use this feature, you must do:
31*4882a593Smuzhiyun	    - Specify enable-method = "spin-table" in each CPU node in the
32*4882a593Smuzhiyun	      Device Tree you are using to boot the kernel
33*4882a593Smuzhiyun	    - Bring secondary CPUs into U-Boot proper in a board specific
34*4882a593Smuzhiyun	      manner.  This must be done *after* relocation.  Otherwise, the
35*4882a593Smuzhiyun	      secondary CPUs will spin in unprotected memory area because the
36*4882a593Smuzhiyun	      master CPU protects the relocated spin code.
37*4882a593Smuzhiyun
38*4882a593Smuzhiyun	  U-Boot automatically does:
39*4882a593Smuzhiyun	    - Set "cpu-release-addr" property of each CPU node
40*4882a593Smuzhiyun	      (overwrites it if already exists).
41*4882a593Smuzhiyun	    - Reserve the code for the spin-table and the release address
42*4882a593Smuzhiyun	      via a /memreserve/ region in the Device Tree.
43*4882a593Smuzhiyun
44*4882a593Smuzhiyunmenu "ARMv8 secure monitor firmware"
45*4882a593Smuzhiyunconfig ARMV8_SEC_FIRMWARE_SUPPORT
46*4882a593Smuzhiyun	bool "Enable ARMv8 secure monitor firmware framework support"
47*4882a593Smuzhiyun	select OF_LIBFDT
48*4882a593Smuzhiyun	select FIT
49*4882a593Smuzhiyun	help
50*4882a593Smuzhiyun	  This framework is aimed at making secure monitor firmware load
51*4882a593Smuzhiyun	  process brief.
52*4882a593Smuzhiyun	  Note: Only FIT format image is supported.
53*4882a593Smuzhiyun	  You should prepare and provide the below information:
54*4882a593Smuzhiyun	    - Address of secure firmware.
55*4882a593Smuzhiyun	    - Address to hold the return address from secure firmware.
56*4882a593Smuzhiyun	    - Secure firmware FIT image related information.
57*4882a593Smuzhiyun	      Such as: SEC_FIRMWARE_FIT_IMAGE and SEC_FIRMEWARE_FIT_CNF_NAME
58*4882a593Smuzhiyun	    - The target exception level that secure monitor firmware will
59*4882a593Smuzhiyun	      return to.
60*4882a593Smuzhiyun
61*4882a593Smuzhiyunconfig SPL_ARMV8_SEC_FIRMWARE_SUPPORT
62*4882a593Smuzhiyun	bool "Enable ARMv8 secure monitor firmware framework support for SPL"
63*4882a593Smuzhiyun	select SPL_OF_LIBFDT
64*4882a593Smuzhiyun	select SPL_FIT
65*4882a593Smuzhiyun	help
66*4882a593Smuzhiyun	  Say Y here to support this framework in SPL phase.
67*4882a593Smuzhiyun
68*4882a593Smuzhiyunconfig SEC_FIRMWARE_ARMV8_PSCI
69*4882a593Smuzhiyun	bool "PSCI implementation in secure monitor firmware"
70*4882a593Smuzhiyun	depends on ARMV8_SEC_FIRMWARE_SUPPORT || SPL_ARMV8_SEC_FIRMWARE_SUPPORT
71*4882a593Smuzhiyun	help
72*4882a593Smuzhiyun	  This config enables the ARMv8 PSCI implementation in secure monitor
73*4882a593Smuzhiyun	  firmware. This is a private PSCI implementation and different from
74*4882a593Smuzhiyun	  those implemented under the common ARMv8 PSCI framework.
75*4882a593Smuzhiyun
76*4882a593Smuzhiyunconfig ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT
77*4882a593Smuzhiyun	bool "ARMv8 secure monitor firmware ERET address byteorder swap"
78*4882a593Smuzhiyun	depends on ARMV8_SEC_FIRMWARE_SUPPORT || SPL_ARMV8_SEC_FIRMWARE_SUPPORT
79*4882a593Smuzhiyun	help
80*4882a593Smuzhiyun	  Say Y here when the endianness of the register or memory holding the
81*4882a593Smuzhiyun	  Secure firmware exception return address is different with core's.
82*4882a593Smuzhiyun
83*4882a593Smuzhiyunendmenu
84*4882a593Smuzhiyun
85*4882a593Smuzhiyunconfig PSCI_RESET
86*4882a593Smuzhiyun	bool "Use PSCI for reset and shutdown"
87*4882a593Smuzhiyun	default y
88*4882a593Smuzhiyun	depends on !ARCH_EXYNOS7 && !ARCH_BCM283X && !TARGET_LS2080A_EMU && \
89*4882a593Smuzhiyun		   !TARGET_LS2080A_SIMU && !TARGET_LS2080AQDS && \
90*4882a593Smuzhiyun		   !TARGET_LS2080ARDB && !TARGET_LS1012AQDS && \
91*4882a593Smuzhiyun		   !TARGET_LS1012ARDB && !TARGET_LS1012AFRDM && \
92*4882a593Smuzhiyun		   !TARGET_LS1043ARDB && !TARGET_LS1043AQDS && \
93*4882a593Smuzhiyun		   !TARGET_LS1046ARDB && !TARGET_LS1046AQDS && \
94*4882a593Smuzhiyun		   !TARGET_LS2081ARDB && \
95*4882a593Smuzhiyun		   !ARCH_UNIPHIER && !TARGET_S32V234EVB
96*4882a593Smuzhiyun	help
97*4882a593Smuzhiyun	  Most armv8 systems have PSCI support enabled in EL3, either through
98*4882a593Smuzhiyun	  ARM Trusted Firmware or other firmware.
99*4882a593Smuzhiyun
100*4882a593Smuzhiyun	  On these systems, we do not need to implement system reset manually,
101*4882a593Smuzhiyun	  but can instead rely on higher level firmware to deal with it.
102*4882a593Smuzhiyun
103*4882a593Smuzhiyun	  Select Y here to make use of PSCI calls for system reset
104*4882a593Smuzhiyun
105*4882a593Smuzhiyunconfig ARMV8_PSCI
106*4882a593Smuzhiyun	bool "Enable PSCI support" if EXPERT
107*4882a593Smuzhiyun	default n
108*4882a593Smuzhiyun	help
109*4882a593Smuzhiyun	  PSCI is Power State Coordination Interface defined by ARM.
110*4882a593Smuzhiyun	  The PSCI in U-boot provides a general framework and each platform
111*4882a593Smuzhiyun	  can implement their own specific PSCI functions.
112*4882a593Smuzhiyun	  Say Y here to enable PSCI support on ARMv8 platform.
113*4882a593Smuzhiyun
114*4882a593Smuzhiyunconfig ARMV8_PSCI_NR_CPUS
115*4882a593Smuzhiyun	int "Maximum supported CPUs for PSCI"
116*4882a593Smuzhiyun	depends on ARMV8_PSCI
117*4882a593Smuzhiyun	default 4
118*4882a593Smuzhiyun	help
119*4882a593Smuzhiyun	  The maximum number of CPUs supported in the PSCI firmware.
120*4882a593Smuzhiyun	  It is no problem to set a larger value than the number of CPUs in
121*4882a593Smuzhiyun	  the actual hardware implementation.
122*4882a593Smuzhiyun
123*4882a593Smuzhiyunconfig ARMV8_PSCI_CPUS_PER_CLUSTER
124*4882a593Smuzhiyun	int "Number of CPUs per cluster"
125*4882a593Smuzhiyun	depends on ARMV8_PSCI
126*4882a593Smuzhiyun	default 0
127*4882a593Smuzhiyun	help
128*4882a593Smuzhiyun	  The number of CPUs per cluster, suppose each cluster has same number
129*4882a593Smuzhiyun	  of CPU cores, platforms with asymmetric clusters don't apply here.
130*4882a593Smuzhiyun	  A value 0 or no definition of it works for single cluster system.
131*4882a593Smuzhiyun	  System with multi-cluster should difine their own exact value.
132*4882a593Smuzhiyun
133*4882a593Smuzhiyunif SYS_HAS_ARMV8_SECURE_BASE
134*4882a593Smuzhiyun
135*4882a593Smuzhiyunconfig ARMV8_SECURE_BASE
136*4882a593Smuzhiyun	hex "Secure address for PSCI image"
137*4882a593Smuzhiyun	depends on ARMV8_PSCI
138*4882a593Smuzhiyun	help
139*4882a593Smuzhiyun	  Address for placing the PSCI text, data and stack sections.
140*4882a593Smuzhiyun	  If not defined, the PSCI sections are placed together with the u-boot
141*4882a593Smuzhiyun	  but platform can choose to place PSCI code image separately in other
142*4882a593Smuzhiyun	  places such as some secure RAM built-in SOC etc.
143*4882a593Smuzhiyun
144*4882a593Smuzhiyunendif
145*4882a593Smuzhiyun
146*4882a593Smuzhiyunmenuconfig ARMV8_CRYPTO
147*4882a593Smuzhiyun	bool "ARM64 Accelerated Cryptographic Algorithms"
148*4882a593Smuzhiyun
149*4882a593Smuzhiyunif ARMV8_CRYPTO
150*4882a593Smuzhiyun
151*4882a593Smuzhiyunconfig ARMV8_CE_SHA1
152*4882a593Smuzhiyun	bool "SHA-1 digest algorithm (ARMv8 Crypto Extensions)"
153*4882a593Smuzhiyun	default y if SHA1
154*4882a593Smuzhiyun
155*4882a593Smuzhiyunconfig ARMV8_CE_SHA256
156*4882a593Smuzhiyun	bool "SHA-256 digest algorithm (ARMv8 Crypto Extensions)"
157*4882a593Smuzhiyun	default y if SHA256
158*4882a593Smuzhiyun
159*4882a593Smuzhiyunendif
160*4882a593Smuzhiyun
161*4882a593Smuzhiyunendif
162