On 25/02/26 13:40, Shivang Upadhyay wrote:
The '-machine dumpdtb' command line option stopped working on
PowerPC/pnv systems after recent design change [1].
Fixing this by generating fdt blob in `pnv_init`.
Thanks for fixing this Shivang.
The generated dtb is same as the dtb qemu passes to OPAL, which is good:
# diff original.dts dumpdtb.dts
Files original.dts and dumpdtb.dts are identical
Reviewed-by: Aditya Gupta <[email protected]>
Thanks,
- Aditya G
[1]
https://lore.kernel.org/qemu-devel/[email protected]/
Cc: Aditya Gupta <[email protected]>
Cc: Harsh Prateek Bora <[email protected]>
Signed-off-by: Shivang Upadhyay <[email protected]>
---
hw/ppc/pnv.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 1513575b8f..9861714ad5 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -1261,6 +1261,10 @@ static void pnv_init(MachineState *machine)
if (pmc->i2c_init) {
pmc->i2c_init(pnv);
}
+
+ if (!machine->fdt) {
+ machine->fdt = pnv_dt_create(machine);
+ }
}
/*