Skip to content

Commit 603ee84

Browse files
Apply SMP config to all ARM boards
Signed-off-by: Ivan Velickovic <i.velickovic@unsw.edu.au>
1 parent 67903dd commit 603ee84

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

build_sdk.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ class ConfigInfo:
135135
arch=KernelArch.AARCH64,
136136
gcc_cpu="cortex-a35",
137137
loader_link_address=0x80280000,
138+
smp_cores=4,
138139
kernel_options={
139140
"KernelPlatform": "tqma8xqp1gb",
140141
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
@@ -144,6 +145,7 @@ class ConfigInfo:
144145
arch=KernelArch.AARCH64,
145146
gcc_cpu="cortex-a53",
146147
loader_link_address=0x40000000,
148+
smp_cores=4,
147149
kernel_options={
148150
"KernelPlatform": "zynqmp",
149151
"KernelARMPlatform": "zcu102",
@@ -154,16 +156,17 @@ class ConfigInfo:
154156
arch=KernelArch.AARCH64,
155157
gcc_cpu="cortex-a53",
156158
loader_link_address=0x50000000,
159+
smp_cores=4,
157160
kernel_options={
158161
"KernelPlatform": "maaxboard",
159162
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
160-
smp_cores=4,
161163
),
162164
BoardInfo(
163165
name="imx8mm_evk",
164166
arch=KernelArch.AARCH64,
165167
gcc_cpu="cortex-a53",
166168
loader_link_address=0x41000000,
169+
smp_cores=4,
167170
kernel_options={
168171
"KernelPlatform": "imx8mm-evk",
169172
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
@@ -173,6 +176,7 @@ class ConfigInfo:
173176
arch=KernelArch.AARCH64,
174177
gcc_cpu="cortex-a53",
175178
loader_link_address=0x41000000,
179+
smp_cores=4,
176180
kernel_options={
177181
"KernelPlatform": "imx8mp-evk",
178182
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
@@ -182,6 +186,7 @@ class ConfigInfo:
182186
arch=KernelArch.AARCH64,
183187
gcc_cpu="cortex-a53",
184188
loader_link_address=0x41000000,
189+
smp_cores=4,
185190
kernel_options={
186191
"KernelPlatform": "imx8mq-evk",
187192
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
@@ -191,6 +196,7 @@ class ConfigInfo:
191196
arch=KernelArch.AARCH64,
192197
gcc_cpu="cortex-a53",
193198
loader_link_address=0x50000000,
199+
smp_cores=4,
194200
kernel_options={
195201
"KernelPlatform": "imx8mp-evk",
196202
"KernelCustomDTS": "custom_dts/iot-gate.dts",
@@ -202,6 +208,7 @@ class ConfigInfo:
202208
arch=KernelArch.AARCH64,
203209
gcc_cpu="cortex-a53",
204210
loader_link_address=0x20000000,
211+
smp_cores=4,
205212
kernel_options={
206213
"KernelPlatform": "odroidc2",
207214
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
@@ -221,6 +228,7 @@ class ConfigInfo:
221228
arch=KernelArch.AARCH64,
222229
gcc_cpu="cortex-a53",
223230
loader_link_address=0x40000000,
231+
smp_cores=4,
224232
kernel_options={
225233
"KernelPlatform": "zynqmp",
226234
"KernelARMPlatform": "ultra96v2",
@@ -256,6 +264,7 @@ class ConfigInfo:
256264
arch=KernelArch.AARCH64,
257265
gcc_cpu="cortex-a72",
258266
loader_link_address=0x10000000,
267+
smp_cores=4,
259268
kernel_options={
260269
"KernelPlatform": "bcm2711",
261270
"RPI4_MEMORY": 1024,
@@ -266,6 +275,7 @@ class ConfigInfo:
266275
arch=KernelArch.AARCH64,
267276
gcc_cpu="cortex-a72",
268277
loader_link_address=0x10000000,
278+
smp_cores=4,
269279
kernel_options={
270280
"KernelPlatform": "bcm2711",
271281
"RPI4_MEMORY": 2048,
@@ -276,6 +286,7 @@ class ConfigInfo:
276286
arch=KernelArch.AARCH64,
277287
gcc_cpu="cortex-a72",
278288
loader_link_address=0x10000000,
289+
smp_cores=4,
279290
kernel_options={
280291
"KernelPlatform": "bcm2711",
281292
"RPI4_MEMORY": 4096,
@@ -286,6 +297,7 @@ class ConfigInfo:
286297
arch=KernelArch.AARCH64,
287298
gcc_cpu="cortex-a72",
288299
loader_link_address=0x10000000,
300+
smp_cores=4,
289301
kernel_options={
290302
"KernelPlatform": "bcm2711",
291303
"RPI4_MEMORY": 8192,
@@ -296,6 +308,9 @@ class ConfigInfo:
296308
arch=KernelArch.AARCH64,
297309
gcc_cpu="cortex-a53",
298310
loader_link_address=0x30000000,
311+
# ROCKPRO64 has 4 Cortex-A53 cores and 2 Cortex-A72 cores,
312+
# we always run on the Cortex-A53s.
313+
smp_cores=4,
299314
kernel_options={
300315
"KernelPlatform": "rockpro64",
301316
} | DEFAULT_KERNEL_OPTIONS_AARCH64,

loader/src/aarch64/cpus.c

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,26 @@ uint64_t plat_get_hw_id(int logical_cpu)
3838
* from the device tree (cpu's <reg> argument), which is what Linux uses.
3939
**/
4040

41-
#if defined(CONFIG_PLAT_MAAXBOARD)
41+
#if defined(CONFIG_PLAT_TQMA8XQP1GB)
42+
static const size_t psci_target_cpus[4] = {0x00, 0x01, 0x02, 0x03};
43+
#elif defined(CONFIG_PLAT_ZYNQMP_ZCU102)
44+
static const size_t psci_target_cpus[4] = {0x00, 0x01, 0x02, 0x03};
45+
#elif defined(CONFIG_PLAT_IMX8MM_EVK)
46+
static const size_t psci_target_cpus[4] = {0x00, 0x01, 0x02, 0x03};
47+
#elif defined(CONFIG_PLAT_IMX8MQ_EVK) || defined(CONFIG_PLAT_MAAXBOARD)
48+
static const size_t psci_target_cpus[4] = {0x00, 0x01, 0x02, 0x03};
49+
#elif defined(CONFIG_PLAT_IMX8MP_EVK)
50+
static const size_t psci_target_cpus[4] = {0x00, 0x01, 0x02, 0x03};
51+
#elif defined(CONFIG_PLAT_ZYNQMP_ULTRA96V2)
52+
static const size_t psci_target_cpus[4] = {0x00, 0x01, 0x02, 0x03};
53+
#elif defined(CONFIG_PLAT_ODROIDC2)
4254
static const size_t psci_target_cpus[4] = {0x00, 0x01, 0x02, 0x03};
4355
#elif defined(CONFIG_PLAT_ODROIDC4)
4456
static const size_t psci_target_cpus[4] = {0x00, 0x01, 0x02, 0x03};
57+
#elif defined(CONFIG_PLAT_BCM2711)
58+
static const size_t psci_target_cpus[4] = {0x00, 0x01, 0x02, 0x03};
59+
#elif defined(CONFIG_PLAT_ROCKPRO64)
60+
static const size_t psci_target_cpus[4] = {0x00, 0x01, 0x02, 0x03};
4561
#elif defined(CONFIG_PLAT_QEMU_ARM_VIRT)
4662
/* QEMU is special and can have arbitrary numbers of cores */
4763
// TODO.

0 commit comments

Comments
 (0)