Arm Community
Arm Community
  • Site
  • User
  • Site
  • Search
  • User
Open Source Software and Platforms
Open Source Software and Platforms
Wiki Modifying CPU nodes in Device Tree
  • Help
  • Jump...
  • Cancel
  • About this wiki
  • Supported platforms
  • Obtaining support
  • +Arm Reference Platforms deliverables
  • +A-class platforms
  • +M-class platforms
  • +R-class platforms
  • +FPGA prototyping boards
  • -Open source software
    • -Linux/Android
      • ------- Power management -------
      • cpufreq (DVFS)
      • cpuidle (hotplug)
      • +Energy Aware Scheduling (EAS)
      • System Suspend to RAM
      • ------- Configuration -------
      • -Device Tree
        • Modifying CPU nodes in Device Tree
      • Modify Linux kernel config flags in the Arm Platforms deliverables
      • ----- Virtualization -----
      • Spawn a Linux virtual machine on Arm using QEMU (KVM)
      • ------- User-space -------
      • Android
      • Debian
      • Fedora Server
      • OpenEmbedded
      • Build a Buildroot user-space
      • Build an ILP32 user-space
      • BusyBox
    • +Trusted Firmware-A
    • Trusted Firmware-M
    • +EDK II UEFI
    • OP-TEE
    • +U-Boot
    • Robotics
    • Mbed OS
    • +SCP

You are currently reviewing an older revision of this page.

  • History View current version

Modifying CPU nodes in Device Tree

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.

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:

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.

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