xref: /xnu-8020.101.4/pexpert/pexpert/arm64/board_config.h (revision e7776783b89a353188416a9a346c6cdb4928faad) !
1 /*
2  * Copyright (c) 2007-2021 Apple Inc. All rights reserved.
3  * Copyright (c) 2005-2006 Apple Computer, Inc. All rights reserved.
4  */
5 #ifndef _PEXPERT_ARM_BOARD_CONFIG_H
6 #define _PEXPERT_ARM_BOARD_CONFIG_H
7 
8 #include <mach/machine.h>
9 
10 /*
11  * Per-SoC configuration.  General order is:
12  *
13  * CPU type
14  * CPU configuration
15  * CPU feature disables / workarounds
16  * CPU topology
17  * Other platform configuration (e.g. DARTs, PPL)
18  *
19  * This should answer the question: "what's unique about this SoC?"
20  *
21  * arm64/H*.h should answer the question: "what's unique about this CPU core?"
22  *
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.
26  */
27 
28 #ifdef ARM64_BOARD_CONFIG_T6000
29 #include <pexpert/arm64/H13.h>
30 
31 
32 #define MAX_L2_CLINE                   7
33 #define MAX_CPUS                       10
34 #define MAX_CPU_CLUSTERS               3
35 #define MAX_CPU_CLUSTER_PHY_ID         10
36 #define HAS_IOA                        1
37 
38 #define XNU_MONITOR                    1 /* Secure pmap runtime */
39 #define __ARM_42BIT_PA_SPACE__         1
40 #define USE_APPLEARMSMP                1
41 #endif  /* ARM64_BOARD_CONFIG_T6000 */
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 #ifdef ARM64_BOARD_CONFIG_T8101_T8103
52 #include <pexpert/arm64/H13.h>
53 
54 #define MAX_L2_CLINE                   7
55 #define MAX_CPUS                       8
56 #define MAX_CPU_CLUSTERS               2
57 
58 #define XNU_MONITOR                    1 /* Secure pmap runtime */
59 #endif  /* ARM64_BOARD_CONFIG_T8101_T8103 */
60 
61 
62 
63 
64 
65 #ifdef ARM64_BOARD_CONFIG_BCM2837
66 #include <pexpert/arm64/BCM2837.h>
67 
68 #define MAX_L2_CLINE                   6
69 #define MAX_CPUS                       4
70 #define MAX_CPU_CLUSTERS               1
71 
72 #define CORE_NCTRS                     8 /* Placeholder; KPC is not enabled for this target */
73 #endif  /* ARM64_BOARD_CONFIG_BCM2837 */
74 
75 #ifdef ARM64_BOARD_CONFIG_VMAPPLE
76 #include <pexpert/arm64/VMAPPLE.h>
77 
78 #define MAX_L2_CLINE                   7
79 #define MAX_CPUS                       32 /* limited by CPU copy window size and cpu checkin mask */
80 #define MAX_CPU_CLUSTERS               1
81 
82 #define CORE_NCTRS                     2
83 
84 #define USE_APPLEARMSMP                1
85 
86 #endif  /* ARM64_BOARD_CONFIG_VMAPPLE */
87 
88 
89 #ifndef HAS_UNCORE_CTRS
90 #undef UNCORE_VERSION
91 #undef UNCORE_PER_CLUSTER
92 #undef UNCORE_NCTRS
93 #endif
94 
95 #if MAX_CPU_CLUSTERS == 1
96 #undef __ARM_AMP__
97 #endif
98 
99 #ifndef MAX_CPU_CLUSTER_PHY_ID
100 #define MAX_CPU_CLUSTER_PHY_ID (MAX_CPU_CLUSTERS - 1)
101 #endif
102 
103 #ifdef PREFER_ARM64_32_BINARIES
104 #define PREFERRED_USER_CPU_TYPE CPU_TYPE_ARM64_32
105 #define PREFERRED_USER_CPU_SUBTYPE CPU_SUBTYPE_ARM64_32_V8
106 #endif
107 
108 #endif /* ! _PEXPERT_ARM_BOARD_CONFIG_H */
109