-M virt,dumpdtb is missing information from the device tree
Host environment
- QEMU flavor: qemu-system-riscv64
- QEMU version: v10.0.0-rc1
- QEMU command line:
qemu-system-riscv64 -machine virt,dumpdtb=test.dtb
Description of problem
dumpdtb no longer produces a device tree with the full system described.
$ dtc -I dtb -O dts test.dtb
<stdout>: Warning (unit_address_vs_reg): /soc/pci@30000000: node has a unit name, but no reg or ranges property
<stdout>: Warning (simple_bus_reg): /soc/pci@30000000: missing or empty reg/ranges property
/dts-v1/;
/ {
#address-cells = <0x02>;
#size-cells = <0x02>;
compatible = "riscv-virtio";
model = "riscv-virtio,qemu";
pmu {
riscv,event-to-mhpmcounters = <0x01 0x01 0x7fff9 0x02 0x02 0x7fffc 0x10019 0x10019 0x7fff8 0x1001b 0x1001b 0x7fff8 0x10021 0x10021 0x7fff8>;
compatible = "riscv,pmu";
};
fw-cfg@10100000 {
dma-coherent;
reg = <0x00 0x10100000 0x00 0x18>;
compatible = "qemu,fw-cfg-mmio";
};
flash@20000000 {
bank-width = <0x04>;
reg = <0x00 0x20000000 0x00 0x2000000 0x00 0x22000000 0x00 0x2000000>;
compatible = "cfi-flash";
};
aliases {
};
chosen {
rng-seed = <0xd4266784 0xc7a7c66f 0xd5b7347d 0x862188f3 0x78065a8e 0xebdedae5 0xd77c47b0 0x34d31eff>;
};
soc {
#address-cells = <0x02>;
#size-cells = <0x02>;
compatible = "simple-bus";
ranges;
pci@30000000 {
};
};
};
Steps to reproduce
- qemu-system-riscv64 -machine virt,dumpdtb=test.dtb
- dtc -I dtb -O dts test.dtb
Additional information
The regression was introduced in 8fd2518e. If this commit is reverted, the expected behavior returns.
dtc -I dtb -O dts test.dtb | grep "@"
platform-bus@4000000 {
memory@80000000 {
cpu@0 {
fw-cfg@10100000 {
flash@20000000 {
serial0 = "/soc/serial@10000000";
stdout-path = "/soc/serial@10000000";
rtc@101000 {
serial@10000000 {
clock-frequency = "", "8@";
test@100000 {
virtio_mmio@10008000 {
virtio_mmio@10007000 {
virtio_mmio@10006000 {
virtio_mmio@10005000 {
virtio_mmio@10004000 {
virtio_mmio@10003000 {
virtio_mmio@10002000 {
virtio_mmio@10001000 {
plic@c000000 {
clint@2000000 {
pci@30000000 {
Other machines are affected to a lesser degree. The arm virt machine:
qemu-system-arm -machine virt,dumpdtb=test.dtb
@@ -8,28 +8,6 @@
#address-cells = <0x02>;
compatible = "linux,dummy-virt";
- psci {
- migrate = <0x84000005>;
- cpu_on = <0x84000003>;
- cpu_off = <0x84000002>;
- cpu_suspend = <0x84000001>;
- method = "hvc";
- compatible = "arm,psci-1.0", "arm,psci-0.2", "arm,psci";
- };
-
- memory@40000000 {
- reg = <0x00 0x40000000 0x00 0x8000000>;
- device_type = "memory";
- };
-
- platform-bus@c000000 {
- interrupt-parent = <0x8002>;
- ranges = <0x00 0x00 0xc000000 0x2000000>;
- #address-cells = <0x01>;
- #size-cells = <0x01>;
- compatible = "qemu,platform", "simple-bus";
- };
-