]>
git.saurik.com Git - apple/xnu.git/blob - pexpert/pexpert/arm64/board_config.h
2d4d6690d7f3bcb53e93da6d596f19745f1e5128
2 * Copyright (c) 2007-2020 Apple Inc. All rights reserved.
3 * Copyright (c) 2005-2006 Apple Computer, Inc. All rights reserved.
5 #ifndef _PEXPERT_ARM_BOARD_CONFIG_H
6 #define _PEXPERT_ARM_BOARD_CONFIG_H
8 #include <mach/machine.h>
11 * Per-SoC configuration. General order is:
15 * CPU feature disables / workarounds
17 * Other platform configuration (e.g. DARTs, PPL)
19 * This should answer the question: "what's unique about this SoC?"
21 * arm64/H*.h should answer the question: "what's unique about this CPU core?"
23 * For __ARM_AMP__ systems that have different cache line sizes on different
24 * clusters, MAX_L2_CLINE must reflect the largest L2 cache line size
25 * across all clusters.
29 #ifdef ARM64_BOARD_CONFIG_T7000
30 #include <pexpert/arm64/H7.h>
32 #define MAX_L2_CLINE 6
34 #define MAX_CPU_CLUSTERS 1
35 #endif /* ARM64_BOARD_CONFIG_T7000 */
37 #ifdef ARM64_BOARD_CONFIG_T7001
38 #include <pexpert/arm64/H7.h>
40 #define MAX_L2_CLINE 6
42 #define MAX_CPU_CLUSTERS 1
43 #endif /* ARM64_BOARD_CONFIG_T7001 */
45 #ifdef ARM64_BOARD_CONFIG_S8000
46 #include <pexpert/arm64/H8.h>
48 #define MAX_CPU_CLUSTERS 1
50 * The L2 size for twister is in fact 3MB, not 4MB; we round up due
51 * to the code being architected for power of 2 cache sizes, and rely
52 * on the expected behavior that out of bounds operations will be
55 #define MAX_L2_CLINE 6
56 #endif /* ARM64_BOARD_CONFIG_S8000 */
58 #ifdef ARM64_BOARD_CONFIG_S8001
59 #include <pexpert/arm64/H8.h>
61 #define MAX_CPU_CLUSTERS 1
63 * The L2 size for twister is in fact 3MB, not 4MB; we round up due
64 * to the code being architected for power of 2 cache sizes, and rely
65 * on the expect behavior that out of bounds operations will be
68 #define MAX_L2_CLINE 6
69 #endif /* ARM64_BOARD_CONFIG_S8001 */
71 #ifdef ARM64_BOARD_CONFIG_T8010
72 #include <pexpert/arm64/H9.h>
74 #define MAX_CPU_CLUSTERS 1
76 * The L2 size for hurricane/zephyr is in fact 3MB, not 4MB; we round up due
77 * to the code being architected for power of 2 cache sizes, and rely
78 * on the expect behavior that out of bounds operations will be
81 #define MAX_L2_CLINE 7
83 #if DEVELOPMENT || DEBUG
85 #define PMAP_CS_ENABLE 0
87 #endif /* ARM64_BOARD_CONFIG_T8010 */
89 #ifdef ARM64_BOARD_CONFIG_T8011
90 #include <pexpert/arm64/H9.h>
92 #define MAX_L2_CLINE 7
94 #define MAX_CPU_CLUSTERS 1
96 #if DEVELOPMENT || DEBUG
98 #define PMAP_CS_ENABLE 0
100 #endif /* ARM64_BOARD_CONFIG_T8011 */
102 #ifdef ARM64_BOARD_CONFIG_T8015
103 #include <pexpert/arm64/H10.h>
105 #define MAX_L2_CLINE 7
107 #define MAX_CPU_CLUSTERS 2
109 #define BROKEN_FRIGGING_SLEEP 1 /* Spurious wake: See rdar://problem/29762505 */
111 #if DEVELOPMENT || DEBUG
113 #define PMAP_CS_ENABLE 0
115 #endif /* ARM64_BOARD_CONFIG_T8015 */
117 #ifdef ARM64_BOARD_CONFIG_T8020
118 #include <pexpert/arm64/H11.h>
120 #define MAX_L2_CLINE 7
122 #define MAX_CPU_CLUSTERS 2
124 #define XNU_MONITOR 1 /* Secure pmap runtime */
125 #endif /* ARM64_BOARD_CONFIG_T8020 */
127 #ifdef ARM64_BOARD_CONFIG_T8006
129 * The T8006 consists of 2 Tempest cores (i.e. T8020 eCores) and for most
130 * of our purposes here may be considered a functional subset of T8020.
132 #include <pexpert/arm64/H11.h>
134 #undef HAS_UNCORE_CTRS
135 #ifdef XNU_TARGET_OS_WATCH // This check might be redundant
136 #undef __APRR_SHADOW_SUPPORTED__
139 #define MAX_L2_CLINE 7
141 #define MAX_CPU_CLUSTERS 1
143 #define XNU_MONITOR 1 /* Secure pmap runtime */
144 #define XNU_MONITOR_T8020_DART 1 /* T8020 DART plugin for secure pmap runtime */
145 #define T8020_DART_ALLOW_BYPASS (1 << 1) /* DART allows translation bypass in certain cases */
146 #define XNU_MONITOR_NVME_PPL 1 /* NVMe PPL plugin for secure pmap runtime */
147 #define XNU_MONITOR_ANS2_SART 1 /* ANS2 SART plugin for secure pmap runtime */
149 #define PMAP_CS_ENABLE 1
150 #define PREFER_ARM64_32_BINARIES
151 #define PEXPERT_NO_3X_IMAGES 1
152 #endif /* ARM64_BOARD_CONFIG_T8006 */
154 #ifdef ARM64_BOARD_CONFIG_T8027
155 #include <pexpert/arm64/H11.h>
157 #define MAX_L2_CLINE 7
159 #define MAX_CPU_CLUSTERS 2
161 #define XNU_MONITOR 1 /* Secure pmap runtime */
162 #define XNU_MONITOR_T8020_DART 1 /* T8020 DART plugin for secure pmap runtime */
163 #define T8020_DART_ALLOW_BYPASS (1 << 1) /* DART allows translation bypass in certain cases */
164 #define XNU_MONITOR_NVME_PPL 1 /* NVMe PPL plugin for secure pmap runtime */
165 #define XNU_MONITOR_ANS2_SART 1 /* ANS2 SART plugin for secure pmap runtime */
167 #define PMAP_CS_ENABLE 1
168 #endif /* ARM64_BOARD_CONFIG_T8027 */
170 #ifdef ARM64_BOARD_CONFIG_T8028
171 #include <pexpert/arm64/H11.h>
173 #define MAX_L2_CLINE 7
175 #define MAX_CPU_CLUSTERS 2
177 #define XNU_MONITOR 1 /* Secure pmap runtime */
178 #define XNU_MONITOR_T8020_DART 1 /* T8020 DART plugin for secure pmap runtime */
179 #define T8020_DART_ALLOW_BYPASS (1 << 1) /* DART allows translation bypass in certain cases */
180 #define XNU_MONITOR_NVME_PPL 1 /* NVMe PPL plugin for secure pmap runtime */
181 #define XNU_MONITOR_ANS2_SART 1 /* ANS2 SART plugin for secure pmap runtime */
183 #define PMAP_CS_ENABLE 1
184 #endif /* ARM64_BOARD_CONFIG_T8028 */
186 #ifdef ARM64_BOARD_CONFIG_T8030
187 #include <pexpert/arm64/H12.h>
189 #define MAX_L2_CLINE 7
191 #define MAX_CPU_CLUSTERS 2
193 #define XNU_MONITOR 1 /* Secure pmap runtime */
194 #define XNU_MONITOR_T8020_DART 1 /* T8020 DART plugin for secure pmap runtime */
195 #define T8020_DART_ALLOW_BYPASS (1 << 1) /* DART allows translation bypass in certain cases */
196 #define XNU_MONITOR_NVME_PPL 1 /* NVMe PPL plugin for secure pmap runtime */
197 #define XNU_MONITOR_ANS2_SART 1 /* ANS2 SART plugin for secure pmap runtime */
198 #define XNU_MONITOR_UAT_PPL 1 /* UAT PPL plugin for secure pmap runtime */
200 #define PMAP_CS_ENABLE 1
201 #endif /* ARM64_BOARD_CONFIG_T8030 */
203 #ifdef ARM64_BOARD_CONFIG_T8101
204 #include <pexpert/arm64/H13.h>
205 #include <pexpert/arm64/spr_locks.h>
207 #define MAX_L2_CLINE 7
209 #define MAX_CPU_CLUSTERS 2
211 #define XNU_MONITOR 1 /* Secure pmap runtime */
212 #endif /* ARM64_BOARD_CONFIG_T8101 */
214 #ifdef ARM64_BOARD_CONFIG_T8103
215 #include <pexpert/arm64/H13.h>
216 #include <pexpert/arm64/spr_locks.h>
218 #define MAX_L2_CLINE 7
220 #define MAX_CPU_CLUSTERS 2
222 #define XNU_MONITOR 1 /* Secure pmap runtime */
223 #endif /* ARM64_BOARD_CONFIG_T8103 */
228 #ifdef ARM64_BOARD_CONFIG_BCM2837
229 #include <pexpert/arm64/BCM2837.h>
231 #define MAX_L2_CLINE 6
233 #define MAX_CPU_CLUSTERS 1
235 #define CORE_NCTRS 8 /* Placeholder; KPC is not enabled for this target */
236 #endif /* ARM64_BOARD_CONFIG_BCM2837 */
238 #ifndef HAS_UNCORE_CTRS
239 #undef UNCORE_VERSION
240 #undef UNCORE_PER_CLUSTER
244 #if MAX_CPU_CLUSTERS == 1
248 #ifndef MAX_CPU_CLUSTER_PHY_ID
249 #define MAX_CPU_CLUSTER_PHY_ID (MAX_CPU_CLUSTERS - 1)
252 #ifdef PREFER_ARM64_32_BINARIES
253 #define PREFERRED_USER_CPU_TYPE CPU_TYPE_ARM64_32
254 #define PREFERRED_USER_CPU_SUBTYPE CPU_SUBTYPE_ARM64_32_V8
257 #endif /* ! _PEXPERT_ARM_BOARD_CONFIG_H */