Jayanth Dodderi Chidanand | 9461a89 | 2022-01-17 18:57:17 +0000 | [diff] [blame] | 1 | # |
Govindraj Raja | 24d3a4e | 2023-12-21 13:57:49 -0600 | [diff] [blame] | 2 | # Copyright (c) 2022-2024, Arm Limited. All rights reserved. |
Jayanth Dodderi Chidanand | 9461a89 | 2022-01-17 18:57:17 +0000 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 7 | # This file lists all of the architectural features, and initializes |
| 8 | # and enables them based on the configured architecture version. |
| 9 | |
| 10 | # This file follows the following format: |
Govindraj Raja | f7676dd | 2024-01-24 11:42:40 -0600 | [diff] [blame] | 11 | # - Enable mandatory feature if not updated, as applicable to an Arch Version. |
Govindraj Raja | 16b1137 | 2023-10-09 13:56:06 -0500 | [diff] [blame] | 12 | # - By default disable any mandatory features if they have not been defined yet. |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 13 | # - Disable or enable any optional feature this would be enabled/disabled if needed by platform. |
| 14 | |
| 15 | # |
| 16 | ################################################################################ |
Govindraj Raja | f7676dd | 2024-01-24 11:42:40 -0600 | [diff] [blame] | 17 | # Enable Mandatory features if not updated yet, based on Arch versions. |
Govindraj Raja | 16b1137 | 2023-10-09 13:56:06 -0500 | [diff] [blame] | 18 | ################################################################################ |
| 19 | # |
| 20 | |
| 21 | # Enable the features which are mandatory from ARCH version 8.1 and upwards. |
| 22 | ifeq "8.1" "$(word 1, $(sort 8.1 $(ARM_ARCH_MAJOR).$(ARM_ARCH_MINOR)))" |
Govindraj Raja | 7dc5f1b | 2024-01-23 14:20:52 -0600 | [diff] [blame] | 23 | armv8-1-a-feats := ENABLE_FEAT_PAN ENABLE_FEAT_VHE |
| 24 | |
| 25 | FEAT_LIST := ${armv8-1-a-feats} |
Govindraj Raja | 16b1137 | 2023-10-09 13:56:06 -0500 | [diff] [blame] | 26 | endif |
| 27 | |
| 28 | # Enable the features which are mandatory from ARCH version 8.2 and upwards. |
| 29 | ifeq "8.2" "$(word 1, $(sort 8.2 $(ARM_ARCH_MAJOR).$(ARM_ARCH_MINOR)))" |
Govindraj Raja | 7dc5f1b | 2024-01-23 14:20:52 -0600 | [diff] [blame] | 30 | armv8-2-a-feats := ENABLE_FEAT_RAS |
| 31 | # 8.1 Compliant |
| 32 | armv8-2-a-feats += ${armv8-1-a-feats} |
| 33 | |
| 34 | FEAT_LIST := ${armv8-2-a-feats} |
| 35 | endif |
| 36 | |
| 37 | # Enable the features which are mandatory from ARCH version 8.3 and upwards. |
| 38 | ifeq "8.3" "$(word 1, $(sort 8.3 $(ARM_ARCH_MAJOR).$(ARM_ARCH_MINOR)))" |
| 39 | # 8.2 Compliant |
| 40 | armv8-3-a-feats += ${armv8-2-a-feats} |
| 41 | |
| 42 | FEAT_LIST := ${armv8-3-a-feats} |
Govindraj Raja | 16b1137 | 2023-10-09 13:56:06 -0500 | [diff] [blame] | 43 | endif |
| 44 | |
| 45 | # Enable the features which are mandatory from ARCH version 8.4 and upwards. |
| 46 | ifeq "8.4" "$(word 1, $(sort 8.4 $(ARM_ARCH_MAJOR).$(ARM_ARCH_MINOR)))" |
Govindraj Raja | 7dc5f1b | 2024-01-23 14:20:52 -0600 | [diff] [blame] | 47 | armv8-4-a-feats := ENABLE_FEAT_SEL2 ENABLE_TRF_FOR_NS ENABLE_FEAT_DIT |
| 48 | # 8.3 Compliant |
| 49 | armv8-4-a-feats += ${armv8-3-a-feats} |
| 50 | |
| 51 | FEAT_LIST := ${armv8-4-a-feats} |
Govindraj Raja | 16b1137 | 2023-10-09 13:56:06 -0500 | [diff] [blame] | 52 | endif |
| 53 | |
| 54 | # Enable the features which are mandatory from ARCH version 8.5 and upwards. |
| 55 | ifeq "8.5" "$(word 1, $(sort 8.5 $(ARM_ARCH_MAJOR).$(ARM_ARCH_MINOR)))" |
Govindraj Raja | 7dc5f1b | 2024-01-23 14:20:52 -0600 | [diff] [blame] | 56 | armv8-5-a-feats := ENABLE_FEAT_RNG ENABLE_FEAT_SB |
| 57 | # 8.4 Compliant |
| 58 | armv8-5-a-feats += ${armv8-4-a-feats} |
Govindraj Raja | 16b1137 | 2023-10-09 13:56:06 -0500 | [diff] [blame] | 59 | |
Govindraj Raja | 7dc5f1b | 2024-01-23 14:20:52 -0600 | [diff] [blame] | 60 | FEAT_LIST := ${armv8-5-a-feats} |
Govindraj Raja | 16b1137 | 2023-10-09 13:56:06 -0500 | [diff] [blame] | 61 | # Enable Memory tagging, Branch Target Identification for aarch64 only. |
| 62 | ifeq ($(ARCH), aarch64) |
Govindraj Raja | 01f9701 | 2024-01-11 13:56:40 -0600 | [diff] [blame] | 63 | mem_tag_arch_support ?= yes |
Govindraj Raja | 16b1137 | 2023-10-09 13:56:06 -0500 | [diff] [blame] | 64 | endif #(ARCH=aarch64) |
| 65 | |
| 66 | endif |
| 67 | |
| 68 | # Enable the features which are mandatory from ARCH version 8.6 and upwards. |
| 69 | ifeq "8.6" "$(word 1, $(sort 8.6 $(ARM_ARCH_MAJOR).$(ARM_ARCH_MINOR)))" |
Govindraj Raja | 7dc5f1b | 2024-01-23 14:20:52 -0600 | [diff] [blame] | 70 | armv8-6-a-feats := ENABLE_FEAT_ECV ENABLE_FEAT_FGT |
| 71 | # 8.5 Compliant |
| 72 | armv8-6-a-feats += ${armv8-5-a-feats} |
| 73 | FEAT_LIST := ${armv8-6-a-feats} |
Govindraj Raja | 16b1137 | 2023-10-09 13:56:06 -0500 | [diff] [blame] | 74 | endif |
| 75 | |
| 76 | # Enable the features which are mandatory from ARCH version 8.7 and upwards. |
| 77 | ifeq "8.7" "$(word 1, $(sort 8.7 $(ARM_ARCH_MAJOR).$(ARM_ARCH_MINOR)))" |
Govindraj Raja | 7dc5f1b | 2024-01-23 14:20:52 -0600 | [diff] [blame] | 78 | armv8-7-a-feats := ENABLE_FEAT_HCX |
| 79 | # 8.6 Compliant |
| 80 | armv8-7-a-feats += ${armv8-6-a-feats} |
| 81 | FEAT_LIST := ${armv8-7-a-feats} |
| 82 | endif |
| 83 | |
| 84 | # Enable the features which are mandatory from ARCH version 8.8 and upwards. |
| 85 | ifeq "8.8" "$(word 1, $(sort 8.8 $(ARM_ARCH_MAJOR).$(ARM_ARCH_MINOR)))" |
| 86 | # 8.7 Compliant |
| 87 | armv8-7-a-feats += ${armv8-7-a-feats} |
| 88 | FEAT_LIST := ${armv8-8-a-feats} |
Govindraj Raja | 16b1137 | 2023-10-09 13:56:06 -0500 | [diff] [blame] | 89 | endif |
| 90 | |
| 91 | # Enable the features which are mandatory from ARCH version 8.9 and upwards. |
| 92 | ifeq "8.9" "$(word 1, $(sort 8.9 $(ARM_ARCH_MAJOR).$(ARM_ARCH_MINOR)))" |
Govindraj Raja | 7dc5f1b | 2024-01-23 14:20:52 -0600 | [diff] [blame] | 93 | armv8-9-a-feats := ENABLE_FEAT_TCR2 |
| 94 | # 8.8 Compliant |
| 95 | armv8-9-a-feats += ${armv8-8-a-feats} |
| 96 | FEAT_LIST := ${armv8-9-a-feats} |
Govindraj Raja | 16b1137 | 2023-10-09 13:56:06 -0500 | [diff] [blame] | 97 | endif |
| 98 | |
Govindraj Raja | 7dc5f1b | 2024-01-23 14:20:52 -0600 | [diff] [blame] | 99 | # Enable the features which are mandatory from ARCH version 9.0 and upwards. |
| 100 | ifeq "9.0" "$(word 1, $(sort 9.0 $(ARM_ARCH_MAJOR).$(ARM_ARCH_MINOR)))" |
| 101 | # 8.5 Compliant |
| 102 | armv9-0-a-feats += ${armv8-5-a-feats} |
| 103 | FEAT_LIST := ${armv9-0-a-feats} |
| 104 | endif |
| 105 | |
| 106 | # Enable the features which are mandatory from ARCH version 9.1 and upwards. |
| 107 | ifeq "9.1" "$(word 1, $(sort 9.1 $(ARM_ARCH_MAJOR).$(ARM_ARCH_MINOR)))" |
| 108 | # 8.6 and 9.0 Compliant |
| 109 | armv9-1-a-feats += ${armv8-6-a-feats} ${armv9-0-a-feats} |
| 110 | FEAT_LIST := ${armv9-1-a-feats} |
| 111 | endif |
| 112 | |
| 113 | # Enable the features which are mandatory from ARCH version 9.2 and upwards. |
| 114 | ifeq "9.2" "$(word 1, $(sort 9.2 $(ARM_ARCH_MAJOR).$(ARM_ARCH_MINOR)))" |
| 115 | # 8.7 and 9.1 Compliant |
| 116 | armv9-2-a-feats += ${armv8-7-a-feats} ${armv9-1-a-feats} |
| 117 | FEAT_LIST := ${armv9-2-a-feats} |
| 118 | endif |
| 119 | |
| 120 | # Enable the features which are mandatory from ARCH version 9.3 and upwards. |
| 121 | ifeq "9.3" "$(word 1, $(sort 9.3 $(ARM_ARCH_MAJOR).$(ARM_ARCH_MINOR)))" |
| 122 | # 8.8 and 9.2 Compliant |
| 123 | armv9-3-a-feats += ${armv8-8-a-feats} ${armv9-2-a-feats} |
| 124 | FEAT_LIST := ${armv9-3-a-feats} |
| 125 | endif |
| 126 | |
| 127 | # Set all FEAT_* in FEAT_LIST to '1' if they are not yet defined or set |
| 128 | # from build commandline options or platform makefile. |
| 129 | $(eval $(call default_ones, ${sort ${FEAT_LIST}})) |
| 130 | |
Govindraj Raja | 16b1137 | 2023-10-09 13:56:06 -0500 | [diff] [blame] | 131 | # |
| 132 | ################################################################################ |
Govindraj Raja | f7676dd | 2024-01-24 11:42:40 -0600 | [diff] [blame] | 133 | # Set mandatory features by default to zero, if they are not already updated. |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 134 | ################################################################################ |
| 135 | # |
| 136 | |
| 137 | #---- |
| 138 | # 8.1 |
| 139 | #---- |
| 140 | |
| 141 | # Flag to enable access to Privileged Access Never bit of PSTATE. |
Govindraj Raja | 16b1137 | 2023-10-09 13:56:06 -0500 | [diff] [blame] | 142 | ENABLE_FEAT_PAN ?= 0 |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 143 | |
| 144 | # Flag to enable Virtualization Host Extensions. |
Govindraj Raja | 16b1137 | 2023-10-09 13:56:06 -0500 | [diff] [blame] | 145 | ENABLE_FEAT_VHE ?= 0 |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 146 | |
| 147 | #---- |
| 148 | # 8.2 |
| 149 | #---- |
| 150 | |
| 151 | # Enable RAS Support. |
Govindraj Raja | 16b1137 | 2023-10-09 13:56:06 -0500 | [diff] [blame] | 152 | ENABLE_FEAT_RAS ?= 0 |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 153 | |
| 154 | #---- |
Govindraj Raja | 16b1137 | 2023-10-09 13:56:06 -0500 | [diff] [blame] | 155 | # 8.3 |
| 156 | #---- |
| 157 | |
| 158 | # Flag to enable Pointer Authentication. Internal flag not meant for |
| 159 | # direct setting. Use BRANCH_PROTECTION to enable PAUTH. |
| 160 | ENABLE_PAUTH ?= 0 |
| 161 | |
| 162 | # Include pointer authentication (ARMv8.3-PAuth) registers in cpu context. This |
| 163 | # must be set to 1 if the platform wants to use this feature in the Secure |
| 164 | # world. It is not necessary for use in the Non-secure world. |
| 165 | CTX_INCLUDE_PAUTH_REGS ?= 0 |
| 166 | |
| 167 | |
| 168 | #---- |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 169 | # 8.4 |
| 170 | #---- |
| 171 | |
| 172 | # Flag to enable Secure EL-2 feature. |
Govindraj Raja | 16b1137 | 2023-10-09 13:56:06 -0500 | [diff] [blame] | 173 | ENABLE_FEAT_SEL2 ?= 0 |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 174 | |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 175 | # By default, disable trace filter control register access to lower non-secure |
| 176 | # exception levels, i.e. NS-EL2, or NS-EL1 if NS-EL2 is implemented, but |
| 177 | # trace filter control register access is unused if FEAT_TRF is implemented. |
Govindraj Raja | 16b1137 | 2023-10-09 13:56:06 -0500 | [diff] [blame] | 178 | ENABLE_TRF_FOR_NS ?= 0 |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 179 | |
| 180 | # Flag to enable Data Independent Timing instructions. |
Govindraj Raja | 16b1137 | 2023-10-09 13:56:06 -0500 | [diff] [blame] | 181 | ENABLE_FEAT_DIT ?= 0 |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 182 | |
| 183 | #---- |
| 184 | # 8.5 |
| 185 | #---- |
| 186 | |
Govindraj Raja | 16b1137 | 2023-10-09 13:56:06 -0500 | [diff] [blame] | 187 | # Flag to enable Branch Target Identification. |
| 188 | # Internal flag not meant for direct setting. |
| 189 | # Use BRANCH_PROTECTION to enable BTI. |
| 190 | ENABLE_BTI ?= 0 |
| 191 | |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 192 | # Flag to enable access to the Random Number Generator registers. |
Govindraj Raja | 16b1137 | 2023-10-09 13:56:06 -0500 | [diff] [blame] | 193 | ENABLE_FEAT_RNG ?= 0 |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 194 | |
| 195 | # Flag to enable Speculation Barrier Instruction. |
Govindraj Raja | 16b1137 | 2023-10-09 13:56:06 -0500 | [diff] [blame] | 196 | ENABLE_FEAT_SB ?= 0 |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 197 | |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 198 | #---- |
| 199 | # 8.6 |
| 200 | #---- |
| 201 | |
| 202 | # Flag to enable access to the CNTPOFF_EL2 register. |
Govindraj Raja | 16b1137 | 2023-10-09 13:56:06 -0500 | [diff] [blame] | 203 | ENABLE_FEAT_ECV ?= 0 |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 204 | |
| 205 | # Flag to enable access to the HDFGRTR_EL2 register. |
Govindraj Raja | 16b1137 | 2023-10-09 13:56:06 -0500 | [diff] [blame] | 206 | ENABLE_FEAT_FGT ?= 0 |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 207 | |
| 208 | #---- |
| 209 | # 8.7 |
| 210 | #---- |
| 211 | |
| 212 | # Flag to enable access to the HCRX_EL2 register by setting SCR_EL3.HXEn. |
Govindraj Raja | 16b1137 | 2023-10-09 13:56:06 -0500 | [diff] [blame] | 213 | ENABLE_FEAT_HCX ?= 0 |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 214 | |
| 215 | #---- |
| 216 | # 8.9 |
| 217 | #---- |
| 218 | |
| 219 | # Flag to enable access to TCR2 (FEAT_TCR2). |
Govindraj Raja | 16b1137 | 2023-10-09 13:56:06 -0500 | [diff] [blame] | 220 | ENABLE_FEAT_TCR2 ?= 0 |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 221 | |
| 222 | # |
| 223 | ################################################################################ |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 224 | # Optional Features defaulted to 0 or 2, if they are not enabled from |
| 225 | # build option. Can also be disabled or enabled by platform if needed. |
| 226 | ################################################################################ |
| 227 | # |
| 228 | |
| 229 | #---- |
| 230 | # 8.0 |
| 231 | #---- |
| 232 | |
| 233 | # Flag to enable CSV2_2 extension. |
| 234 | ENABLE_FEAT_CSV2_2 ?= 0 |
| 235 | |
Sona Mathew | 3b84c96 | 2023-10-25 16:48:19 -0500 | [diff] [blame] | 236 | # Flag to enable CSV2_3 extension. FEAT_CSV2_3 enables access to the |
| 237 | # SCXTNUM_ELx register. |
| 238 | ENABLE_FEAT_CSV2_3 ?= 0 |
| 239 | |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 240 | # By default, disable access of trace system registers from NS lower |
| 241 | # ELs i.e. NS-EL2, or NS-EL1 if NS-EL2 implemented but unused if |
| 242 | # system register trace is implemented. This feature is available if |
| 243 | # trace unit such as ETMv4.x, This feature is OPTIONAL and is only |
| 244 | # permitted in Armv8 implementations. |
| 245 | ENABLE_SYS_REG_TRACE_FOR_NS ?= 0 |
| 246 | |
| 247 | #---- |
| 248 | # 8.2 |
| 249 | #---- |
| 250 | |
| 251 | # Build option to enable/disable the Statistical Profiling Extension, |
| 252 | # keep it enabled by default for AArch64. |
| 253 | ifeq (${ARCH},aarch64) |
Govindraj Raja | 28b525c | 2023-09-20 15:31:45 -0500 | [diff] [blame] | 254 | ENABLE_SPE_FOR_NS ?= 2 |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 255 | else ifeq (${ARCH},aarch32) |
Govindraj Raja | 399541a | 2023-10-17 08:13:03 -0500 | [diff] [blame] | 256 | ifneq ($(or $(ENABLE_SPE_FOR_NS),0),0) |
Govindraj Raja | 28b525c | 2023-09-20 15:31:45 -0500 | [diff] [blame] | 257 | $(error ENABLE_SPE_FOR_NS is not supported for AArch32) |
| 258 | else |
| 259 | ENABLE_SPE_FOR_NS := 0 |
| 260 | endif |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 261 | endif |
| 262 | |
| 263 | # Enable SVE for non-secure world by default. |
| 264 | ifeq (${ARCH},aarch64) |
Govindraj Raja | 28b525c | 2023-09-20 15:31:45 -0500 | [diff] [blame] | 265 | ENABLE_SVE_FOR_NS ?= 2 |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 266 | # SVE is only supported on AArch64 so disable it on AArch32. |
| 267 | else ifeq (${ARCH},aarch32) |
Govindraj Raja | 399541a | 2023-10-17 08:13:03 -0500 | [diff] [blame] | 268 | ifneq ($(or $(ENABLE_SVE_FOR_NS),0),0) |
Govindraj Raja | 28b525c | 2023-09-20 15:31:45 -0500 | [diff] [blame] | 269 | $(error ENABLE_SVE_FOR_NS is not supported for AArch32) |
| 270 | else |
| 271 | ENABLE_SVE_FOR_NS := 0 |
| 272 | endif |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 273 | endif |
| 274 | |
| 275 | #---- |
| 276 | # 8.4 |
| 277 | #---- |
| 278 | |
| 279 | # Feature flags for supporting Activity monitor extensions. |
| 280 | ENABLE_FEAT_AMU ?= 0 |
| 281 | ENABLE_AMU_AUXILIARY_COUNTERS ?= 0 |
| 282 | ENABLE_AMU_FCONF ?= 0 |
| 283 | AMU_RESTRICT_COUNTERS ?= 0 |
| 284 | |
| 285 | # Build option to enable MPAM for lower ELs. |
Arvind Ram Prakash | ab28d4b | 2023-10-11 12:10:56 -0500 | [diff] [blame] | 286 | # Enabling it by default |
| 287 | ifeq (${ARCH},aarch64) |
Harrison Mutai | bb75e4f | 2023-10-31 10:15:41 +0000 | [diff] [blame] | 288 | ENABLE_FEAT_MPAM ?= 2 |
Arvind Ram Prakash | ab28d4b | 2023-10-11 12:10:56 -0500 | [diff] [blame] | 289 | else ifeq (${ARCH},aarch32) |
Harrison Mutai | bb75e4f | 2023-10-31 10:15:41 +0000 | [diff] [blame] | 290 | ifneq ($(or $(ENABLE_FEAT_MPAM),0),0) |
| 291 | $(error ENABLE_FEAT_MPAM is not supported for AArch32) |
| 292 | else |
| 293 | ENABLE_FEAT_MPAM := 0 |
| 294 | endif |
Arvind Ram Prakash | ab28d4b | 2023-10-11 12:10:56 -0500 | [diff] [blame] | 295 | endif |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 296 | |
Govindraj Raja | 3748d90 | 2023-09-19 08:43:16 -0500 | [diff] [blame] | 297 | # Include nested virtualization control (Armv8.4-NV) registers in cpu context. |
| 298 | # This must be set to 1 if architecture implements Nested Virtualization |
| 299 | # Extension and platform wants to use this feature in the Secure world. |
| 300 | CTX_INCLUDE_NEVE_REGS ?= 0 |
| 301 | |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 302 | #---- |
| 303 | # 8.5 |
| 304 | #---- |
| 305 | |
| 306 | # Flag to enable support for EL3 trapping of reads of the RNDR and RNDRRS |
| 307 | # registers, by setting SCR_EL3.TRNDR. |
| 308 | ENABLE_FEAT_RNG_TRAP ?= 0 |
| 309 | |
Govindraj Raja | 24d3a4e | 2023-12-21 13:57:49 -0600 | [diff] [blame] | 310 | ifeq ($(CTX_INCLUDE_MTE_REGS),1) |
Govindraj Raja | c1be66f | 2024-03-07 14:42:20 -0600 | [diff] [blame] | 311 | $(warning CTX_INCLUDE_MTE_REGS option is deprecated, Check ENABLE_FEAT_MTE2 usage) |
Govindraj Raja | 24d3a4e | 2023-12-21 13:57:49 -0600 | [diff] [blame] | 312 | endif |
Govindraj Raja | c1be66f | 2024-03-07 14:42:20 -0600 | [diff] [blame] | 313 | ifeq ($(ENABLE_FEAT_MTE),1) |
| 314 | $(warning ENABLE_FEAT_MTE option is deprecated, Check ENABLE_FEAT_MTE2 usage) |
Govindraj Raja | 24d3a4e | 2023-12-21 13:57:49 -0600 | [diff] [blame] | 315 | endif |
Govindraj Raja | d7b63ac | 2024-01-26 10:08:37 -0600 | [diff] [blame] | 316 | |
Govindraj Raja | c1be66f | 2024-03-07 14:42:20 -0600 | [diff] [blame] | 317 | # Enable FEAT_MTE2. This must be set to 1 if the platform wants |
| 318 | # to use this feature and is enabled at ELX. |
| 319 | ENABLE_FEAT_MTE2 ?= 0 |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 320 | |
| 321 | #---- |
| 322 | # 8.6 |
| 323 | #---- |
| 324 | |
| 325 | # Flag to enable AMUv1p1 extension. |
| 326 | ENABLE_FEAT_AMUv1p1 ?= 0 |
| 327 | |
| 328 | # Flag to enable delayed trapping of WFE instruction (FEAT_TWED). |
| 329 | ENABLE_FEAT_TWED ?= 0 |
| 330 | |
| 331 | # In v8.6+ platforms with delayed trapping of WFE being supported |
| 332 | # via FEAT_TWED, this flag takes the delay value to be set in the |
| 333 | # SCR_EL3.TWEDEL(4bit) field, when FEAT_TWED is implemented. |
| 334 | # By default it takes 0, and need to be updated by the platforms. |
| 335 | TWED_DELAY ?= 0 |
| 336 | |
| 337 | # Disable MTPMU if FEAT_MTPMU is supported. |
| 338 | DISABLE_MTPMU ?= 0 |
| 339 | |
| 340 | #---- |
| 341 | # 8.9 |
| 342 | #---- |
| 343 | |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 344 | # Flag to enable access to Stage 2 Permission Indirection (FEAT_S2PIE). |
| 345 | ENABLE_FEAT_S2PIE ?= 0 |
| 346 | |
| 347 | # Flag to enable access to Stage 1 Permission Indirection (FEAT_S1PIE). |
| 348 | ENABLE_FEAT_S1PIE ?= 0 |
| 349 | |
| 350 | # Flag to enable access to Stage 2 Permission Overlay (FEAT_S2POE). |
| 351 | ENABLE_FEAT_S2POE ?= 0 |
| 352 | |
| 353 | # Flag to enable access to Stage 1 Permission Overlay (FEAT_S1POE). |
| 354 | ENABLE_FEAT_S1POE ?= 0 |
| 355 | |
| 356 | #---- |
| 357 | # 9.0 |
| 358 | #---- |
| 359 | |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 360 | # Scalable Matrix Extension for non-secure world. |
| 361 | ENABLE_SME_FOR_NS ?= 0 |
| 362 | |
| 363 | # Scalable Vector Extension for secure world. |
| 364 | ENABLE_SVE_FOR_SWD ?= 0 |
| 365 | |
| 366 | # By default, disable access of trace buffer control registers from NS |
| 367 | # lower ELs i.e. NS-EL2, or NS-EL1 if NS-EL2 implemented but unused |
| 368 | # if FEAT_TRBE is implemented. |
| 369 | # Note FEAT_TRBE is only supported on AArch64 - therefore do not enable in |
| 370 | # AArch32. |
| 371 | ifeq (${ARCH},aarch64) |
Govindraj Raja | 28b525c | 2023-09-20 15:31:45 -0500 | [diff] [blame] | 372 | ENABLE_TRBE_FOR_NS ?= 0 |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 373 | else ifeq (${ARCH},aarch32) |
Govindraj Raja | 399541a | 2023-10-17 08:13:03 -0500 | [diff] [blame] | 374 | ifneq ($(or $(ENABLE_TRBE_FOR_NS),0),0) |
| 375 | $(error ENABLE_TRBE_FOR_NS is not supported for AArch32) |
Govindraj Raja | 28b525c | 2023-09-20 15:31:45 -0500 | [diff] [blame] | 376 | else |
Govindraj Raja | 399541a | 2023-10-17 08:13:03 -0500 | [diff] [blame] | 377 | ENABLE_TRBE_FOR_NS := 0 |
Govindraj Raja | 28b525c | 2023-09-20 15:31:45 -0500 | [diff] [blame] | 378 | endif |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 379 | endif |
| 380 | |
| 381 | #---- |
| 382 | # 9.2 |
| 383 | #---- |
| 384 | |
Govindraj Raja | f7676dd | 2024-01-24 11:42:40 -0600 | [diff] [blame] | 385 | # Flag to enable Realm Management Extension (FEAT_RME). |
| 386 | ENABLE_RME ?= 0 |
| 387 | |
Govindraj Raja | 0386e31 | 2023-08-17 10:41:48 -0500 | [diff] [blame] | 388 | # Scalable Matrix Extension version 2 for non-secure world. |
| 389 | ENABLE_SME2_FOR_NS ?= 0 |
| 390 | |
| 391 | # Scalable Matrix Extension for secure world. |
| 392 | ENABLE_SME_FOR_SWD ?= 0 |
| 393 | |
| 394 | # By default, disable access to branch record buffer control registers from NS |
| 395 | # lower ELs i.e. NS-EL2, or NS-EL1 if NS-EL2 implemented but unused |
| 396 | # if FEAT_BRBE is implemented. |
| 397 | ENABLE_BRBE_FOR_NS ?= 0 |
| 398 | |
| 399 | #---- |
| 400 | #9.4 |
| 401 | #---- |
| 402 | |
| 403 | # Flag to enable access to Guarded Control Stack (FEAT_GCS). |
| 404 | ENABLE_FEAT_GCS ?= 0 |