The 32-bit DT parser in Linux doesn't understand 'reg' properties with
two cells, in a CPU node. Since the boot-wrapper always sets the upper
bits to 0, we can restrict that size to one cell.
The parser also requires the device_type property to be present. This is
the case for arm64 as well, but it only fails when the patched device-tree
doesn't have any CPU node to begin with. Add device_type unconditionally.
Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
CPU_IDS=$1;
CPU_IDS_NO_HEX=$(echo $CPU_IDS | sed s/0x//g);
CPU_IDS_NO_HEX=$(echo $CPU_IDS_NO_HEX | sed s/\,/\ /g);
+
+echo '#address-cells = <0x1>;'
+echo '#size-cells = <0>;'
+
for id in $CPU_IDS_NO_HEX;
do
- echo "cpu@$id {";
- echo ' enable-method = \"psci\";';
- echo " reg = <0 0x$id>;";
- echo "};";
+ echo "cpu@$id {"
+ echo ' device_type = \"cpu\";'
+ echo ' enable-method = \"psci\";'
+ echo " reg = <0x$id>;"
+ echo "};"
done