Linus Walleij | 23b5877 | 2015-03-09 10:53:21 +0100 | [diff] [blame] | 1 | if ARM64 |
| 2 | |
Andre Przywara | 1416e2d | 2018-07-25 00:57:01 +0100 | [diff] [blame] | 3 | config ARMV8_SPL_EXCEPTION_VECTORS |
| 4 | bool "Install crash dump exception vectors" |
| 5 | depends on SPL |
Andre Przywara | 1416e2d | 2018-07-25 00:57:01 +0100 | [diff] [blame] | 6 | help |
| 7 | The default exception vector table is only used for the crash |
| 8 | dump, but still takes quite a lot of space in the image size. |
| 9 | |
| 10 | Say N here if you are running out of code space in the image |
| 11 | and want to save some space at the cost of less debugging info. |
| 12 | |
Linus Walleij | 23b5877 | 2015-03-09 10:53:21 +0100 | [diff] [blame] | 13 | config ARMV8_MULTIENTRY |
Masahiro Yamada | ab65006 | 2016-08-12 10:26:50 +0900 | [diff] [blame] | 14 | bool "Enable multiple CPUs to enter into U-Boot" |
Linus Walleij | 23b5877 | 2015-03-09 10:53:21 +0100 | [diff] [blame] | 15 | |
Mingkai Hu | 3aec452 | 2017-01-06 17:41:10 +0800 | [diff] [blame] | 16 | config ARMV8_SET_SMPEN |
| 17 | bool "Enable data coherency with other cores in cluster" |
| 18 | help |
| 19 | Say Y here if there is not any trust firmware to set |
| 20 | CPUECTLR_EL1.SMPEN bit before U-Boot. |
| 21 | |
| 22 | For A53, it enables data coherency with other cores in the |
| 23 | cluster, and for A57/A72, it enables receiving of instruction |
| 24 | cache and TLB maintenance operations. |
| 25 | Cortex A53/57/72 cores require CPUECTLR_EL1.SMPEN set even |
| 26 | for single core systems. Unfortunately write access to this |
| 27 | register may be controlled by EL3/EL2 firmware. To be more |
| 28 | precise, by default (if there is EL2/EL3 firmware running) |
| 29 | this register is RO for NS EL1. |
| 30 | This switch can be used to avoid writing to CPUECTLR_EL1, |
| 31 | it can be safely enabled when EL2/EL3 initialized SMPEN bit |
| 32 | or when CPU implementation doesn't include that register. |
| 33 | |
Tom Rini | b53a280 | 2022-03-11 09:11:58 -0500 | [diff] [blame] | 34 | config ARMV8_SWITCH_TO_EL1 |
| 35 | bool "Enable switching to running in EL1" |
| 36 | help |
| 37 | In some circumstances we need to switch to running in EL1. |
| 38 | Enable this option to have U-Boot switch to EL1. |
| 39 | |
Masahiro Yamada | 6b6024e | 2016-06-27 19:31:05 +0900 | [diff] [blame] | 40 | config ARMV8_SPIN_TABLE |
| 41 | bool "Support spin-table enable method" |
| 42 | depends on ARMV8_MULTIENTRY && OF_LIBFDT |
| 43 | help |
| 44 | Say Y here to support "spin-table" enable method for booting Linux. |
| 45 | |
| 46 | To use this feature, you must do: |
| 47 | - Specify enable-method = "spin-table" in each CPU node in the |
| 48 | Device Tree you are using to boot the kernel |
Masahiro Yamada | 65f3219 | 2017-01-20 18:04:43 +0900 | [diff] [blame] | 49 | - Bring secondary CPUs into U-Boot proper in a board specific |
| 50 | manner. This must be done *after* relocation. Otherwise, the |
| 51 | secondary CPUs will spin in unprotected memory area because the |
| 52 | master CPU protects the relocated spin code. |
Masahiro Yamada | 6b6024e | 2016-06-27 19:31:05 +0900 | [diff] [blame] | 53 | |
| 54 | U-Boot automatically does: |
| 55 | - Set "cpu-release-addr" property of each CPU node |
| 56 | (overwrites it if already exists). |
| 57 | - Reserve the code for the spin-table and the release address |
| 58 | via a /memreserve/ region in the Device Tree. |
| 59 | |
Hou Zhiqiang | 0897eb2 | 2017-01-16 17:31:47 +0800 | [diff] [blame] | 60 | menu "ARMv8 secure monitor firmware" |
| 61 | config ARMV8_SEC_FIRMWARE_SUPPORT |
| 62 | bool "Enable ARMv8 secure monitor firmware framework support" |
Hou Zhiqiang | 0897eb2 | 2017-01-16 17:31:47 +0800 | [diff] [blame] | 63 | select FIT |
Michal Simek | 58008cb | 2018-07-23 15:55:15 +0200 | [diff] [blame] | 64 | select OF_LIBFDT |
Hou Zhiqiang | 0897eb2 | 2017-01-16 17:31:47 +0800 | [diff] [blame] | 65 | help |
| 66 | This framework is aimed at making secure monitor firmware load |
| 67 | process brief. |
| 68 | Note: Only FIT format image is supported. |
| 69 | You should prepare and provide the below information: |
| 70 | - Address of secure firmware. |
| 71 | - Address to hold the return address from secure firmware. |
| 72 | - Secure firmware FIT image related information. |
Thomas Hebb | 9f67b56 | 2019-11-10 08:23:15 -0800 | [diff] [blame] | 73 | Such as: SEC_FIRMWARE_FIT_IMAGE and SEC_FIRMWARE_FIT_CNF_NAME |
Hou Zhiqiang | 0897eb2 | 2017-01-16 17:31:47 +0800 | [diff] [blame] | 74 | - The target exception level that secure monitor firmware will |
| 75 | return to. |
| 76 | |
| 77 | config SPL_ARMV8_SEC_FIRMWARE_SUPPORT |
| 78 | bool "Enable ARMv8 secure monitor firmware framework support for SPL" |
Hou Zhiqiang | 0897eb2 | 2017-01-16 17:31:47 +0800 | [diff] [blame] | 79 | select SPL_FIT |
Michal Simek | 58008cb | 2018-07-23 15:55:15 +0200 | [diff] [blame] | 80 | select SPL_OF_LIBFDT |
Hou Zhiqiang | 0897eb2 | 2017-01-16 17:31:47 +0800 | [diff] [blame] | 81 | help |
| 82 | Say Y here to support this framework in SPL phase. |
| 83 | |
Peng Fan | 6aead23 | 2020-05-05 20:28:41 +0800 | [diff] [blame] | 84 | config SPL_RECOVER_DATA_SECTION |
| 85 | bool "save/restore SPL data section" |
| 86 | help |
| 87 | Say Y here to save SPL data section for cold boot, and restore |
| 88 | at warm boot in SPL phase. |
| 89 | |
Hou Zhiqiang | daa9264 | 2017-01-16 17:31:48 +0800 | [diff] [blame] | 90 | config SEC_FIRMWARE_ARMV8_PSCI |
| 91 | bool "PSCI implementation in secure monitor firmware" |
| 92 | depends on ARMV8_SEC_FIRMWARE_SUPPORT || SPL_ARMV8_SEC_FIRMWARE_SUPPORT |
Michael Walle | 49bb245 | 2022-02-28 13:48:40 +0100 | [diff] [blame] | 93 | depends on ARMV8_PSCI=n |
Hou Zhiqiang | daa9264 | 2017-01-16 17:31:48 +0800 | [diff] [blame] | 94 | help |
| 95 | This config enables the ARMv8 PSCI implementation in secure monitor |
| 96 | firmware. This is a private PSCI implementation and different from |
| 97 | those implemented under the common ARMv8 PSCI framework. |
| 98 | |
Hou Zhiqiang | 0897eb2 | 2017-01-16 17:31:47 +0800 | [diff] [blame] | 99 | config ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT |
| 100 | bool "ARMv8 secure monitor firmware ERET address byteorder swap" |
| 101 | depends on ARMV8_SEC_FIRMWARE_SUPPORT || SPL_ARMV8_SEC_FIRMWARE_SUPPORT |
| 102 | help |
| 103 | Say Y here when the endianness of the register or memory holding the |
| 104 | Secure firmware exception return address is different with core's. |
| 105 | |
| 106 | endmenu |
| 107 | |
Alexander Graf | 8069821 | 2016-08-16 21:08:48 +0200 | [diff] [blame] | 108 | config PSCI_RESET |
| 109 | bool "Use PSCI for reset and shutdown" |
| 110 | default y |
Heinrich Schuchardt | 81ea008 | 2018-10-18 12:29:40 +0200 | [diff] [blame] | 111 | select ARM_SMCCC if OF_CONTROL |
Mark Kettenis | 3cdfa31 | 2021-12-21 17:31:50 +0100 | [diff] [blame] | 112 | depends on !ARCH_APPLE && !ARCH_BCM283X && !ARCH_EXYNOS7 && \ |
Tom Rini | 2ce7b65 | 2021-02-09 08:03:10 -0500 | [diff] [blame] | 113 | !TARGET_LS2080AQDS && \ |
Bhaskar Upadhaya | bdc48ec | 2018-01-11 20:03:30 +0530 | [diff] [blame] | 114 | !TARGET_LS2080ARDB && !TARGET_LS2080A_EMU && \ |
Ashish Kumar | 7769776 | 2017-08-31 16:12:55 +0530 | [diff] [blame] | 115 | !TARGET_LS1088ARDB && !TARGET_LS1088AQDS && \ |
Alexander Graf | 8069821 | 2016-08-16 21:08:48 +0200 | [diff] [blame] | 116 | !TARGET_LS1012ARDB && !TARGET_LS1012AFRDM && \ |
Bhaskar Upadhaya | b0ce187 | 2018-01-11 20:03:31 +0530 | [diff] [blame] | 117 | !TARGET_LS1012A2G5RDB && !TARGET_LS1012AQDS && \ |
Bhaskar Upadhaya | 9629ccd | 2018-05-23 11:03:30 +0530 | [diff] [blame] | 118 | !TARGET_LS1012AFRWY && \ |
Yuantian Tang | f278a21 | 2019-04-10 16:43:35 +0800 | [diff] [blame] | 119 | !TARGET_LS1028ARDB && !TARGET_LS1028AQDS && \ |
Alexander Graf | 441a230 | 2016-11-17 01:02:55 +0100 | [diff] [blame] | 120 | !TARGET_LS1043ARDB && !TARGET_LS1043AQDS && \ |
| 121 | !TARGET_LS1046ARDB && !TARGET_LS1046AQDS && \ |
Vabhav Sharma | d90c7ac | 2019-06-06 12:35:28 +0000 | [diff] [blame] | 122 | !TARGET_LS1046AFRWY && \ |
Priyanka Jain | 58c3e62 | 2018-11-28 13:04:27 +0000 | [diff] [blame] | 123 | !TARGET_LS2081ARDB && !TARGET_LX2160ARDB && \ |
Meenakshi Aggarwal | 3a187cf | 2020-10-29 19:16:16 +0530 | [diff] [blame] | 124 | !TARGET_LX2160AQDS && !TARGET_LX2162AQDS && \ |
Tom Rini | 9ac8368 | 2021-02-20 20:05:49 -0500 | [diff] [blame] | 125 | !ARCH_UNIPHIER |
Alexander Graf | 8069821 | 2016-08-16 21:08:48 +0200 | [diff] [blame] | 126 | help |
| 127 | Most armv8 systems have PSCI support enabled in EL3, either through |
| 128 | ARM Trusted Firmware or other firmware. |
| 129 | |
| 130 | On these systems, we do not need to implement system reset manually, |
| 131 | but can instead rely on higher level firmware to deal with it. |
| 132 | |
| 133 | Select Y here to make use of PSCI calls for system reset |
| 134 | |
Michael Walle | 49bb245 | 2022-02-28 13:48:40 +0100 | [diff] [blame] | 135 | config SYS_HAS_ARMV8_SECURE_BASE |
| 136 | bool |
| 137 | |
macro.wave.z@gmail.com | df88cb3 | 2016-12-08 11:58:22 +0800 | [diff] [blame] | 138 | config ARMV8_PSCI |
| 139 | bool "Enable PSCI support" if EXPERT |
macro.wave.z@gmail.com | df88cb3 | 2016-12-08 11:58:22 +0800 | [diff] [blame] | 140 | help |
| 141 | PSCI is Power State Coordination Interface defined by ARM. |
| 142 | The PSCI in U-boot provides a general framework and each platform |
| 143 | can implement their own specific PSCI functions. |
| 144 | Say Y here to enable PSCI support on ARMv8 platform. |
| 145 | |
| 146 | config ARMV8_PSCI_NR_CPUS |
| 147 | int "Maximum supported CPUs for PSCI" |
| 148 | depends on ARMV8_PSCI |
| 149 | default 4 |
| 150 | help |
| 151 | The maximum number of CPUs supported in the PSCI firmware. |
| 152 | It is no problem to set a larger value than the number of CPUs in |
| 153 | the actual hardware implementation. |
| 154 | |
macro.wave.z@gmail.com | 14bf25d | 2016-12-08 11:58:24 +0800 | [diff] [blame] | 155 | config ARMV8_PSCI_CPUS_PER_CLUSTER |
| 156 | int "Number of CPUs per cluster" |
| 157 | depends on ARMV8_PSCI |
| 158 | default 0 |
| 159 | help |
| 160 | The number of CPUs per cluster, suppose each cluster has same number |
| 161 | of CPU cores, platforms with asymmetric clusters don't apply here. |
| 162 | A value 0 or no definition of it works for single cluster system. |
| 163 | System with multi-cluster should difine their own exact value. |
| 164 | |
Michael Walle | 49bb245 | 2022-02-28 13:48:40 +0100 | [diff] [blame] | 165 | config ARMV8_PSCI_RELOCATE |
| 166 | bool "Relocate PSCI code" |
| 167 | depends on ARMV8_PSCI |
| 168 | depends on SYS_HAS_ARMV8_SECURE_BASE |
| 169 | help |
| 170 | Relocate PSCI code, for example to a secure memory on the SoC. If not |
| 171 | set, the PSCI sections are placed together with the u-boot and the |
| 172 | regions will be marked as reserved before linux is started. |
| 173 | |
| 174 | config ARMV8_SECURE_BASE |
| 175 | hex "Secure address for PSCI image" |
| 176 | depends on ARMV8_PSCI_RELOCATE |
| 177 | default 0x18000000 if ARCH_LS1028A |
| 178 | help |
| 179 | Address for placing the PSCI text, data and stack sections. |
| 180 | |
| 181 | |
Chee Hong Ang | c0f3296 | 2018-08-20 10:57:35 -0700 | [diff] [blame] | 182 | config ARMV8_EA_EL3_FIRST |
| 183 | bool "External aborts and SError interrupt exception are taken in EL3" |
Chee Hong Ang | c0f3296 | 2018-08-20 10:57:35 -0700 | [diff] [blame] | 184 | help |
| 185 | Exception handling at all exception levels for External Abort and |
| 186 | SError interrupt exception are taken in EL3. |
| 187 | |
Loic Poulain | 084d8e6 | 2022-06-01 20:26:29 +0200 | [diff] [blame] | 188 | menuconfig ARMV8_CRYPTO |
| 189 | bool "ARM64 Accelerated Cryptographic Algorithms" |
| 190 | |
| 191 | if ARMV8_CRYPTO |
| 192 | |
| 193 | config ARMV8_CE_SHA1 |
| 194 | bool "SHA-1 digest algorithm (ARMv8 Crypto Extensions)" |
| 195 | default y if SHA1 |
| 196 | |
Loic Poulain | 0fcc1c7 | 2022-06-01 20:26:31 +0200 | [diff] [blame^] | 197 | config ARMV8_CE_SHA256 |
| 198 | bool "SHA-256 digest algorithm (ARMv8 Crypto Extensions)" |
| 199 | default y if SHA256 |
| 200 | |
Loic Poulain | 084d8e6 | 2022-06-01 20:26:29 +0200 | [diff] [blame] | 201 | endif |
| 202 | |
Linus Walleij | 23b5877 | 2015-03-09 10:53:21 +0100 | [diff] [blame] | 203 | endif |