You are currently reviewing an older revision of this page.
See here for an introduction to Device Tree syntax.
Generally speaking, we would advise against modifying the Device Tree.
With that said a valid use case is for completely removing CPUs from the system without using runtime hotplugging, which may be of interest for those developing bare metal software or wishing to disable the Cortex-A53 cluster on Juno r1.
This document assumes we are modifying the Juno's device tree.
These are the CPUs that are available by default:
# ls /sys/devices/system/cpu cpu0 cpu1 cpu2 cpu3 cpu4 cpu5
Decompiling the device tree blob shows two cluster nodes, with `cluster0' corresponding to the Cortex-A57 cluster and `cluster1` corresponding to the Cortex-A53 cluster.
`cluster0'
`cluster1`
Here's the `cluster0' node:
cluster 0 { core 0 { cpu = <0x2>; }; core 1 { cpu = <0x3>; }; };
The cluster nodes are followed by a number of CPU nodes, such as `cpu0' below which corresponds to Cortex-A57_0 (the `reg' property corresponds to the CPU's MPIDR_EL1 multi-processor affinity system register:
`cpu0'
`reg'
MPIDR_EL1
cpu@0 { compatible = "arm,cortex-a57", "arm,armv8"; reg = ; device_type = "cpu"; enable-method = "psci"; next-level-cache = ; clocks = ; cpu-idle-states = ; linux,phandle = ; phandle = ; };
To remove the Cortex-A53 cluster we need to delete the `cluster1`, `cpu2`, `cpu3`, `cpu4`, and `cpu5` nodes.
`cpu2`
`cpu3`
`cpu4`
`cpu5`
Booting the Linux kernel with this modified device tree shows only the Cortex-A57 cluster as being available:
# ls /sys/devices/system/cpu cpu0 cpu1