Skip to contentSkip to conversation

ppc/pnv: Add a "/qemu" device tree node

PATCH Applied Cédric Le Goater 2 participants 2 messages Nov 6, 2019 – Nov 7, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc/pnv: Add a "/qemu" device tree node

It helps skiboot identifying that is running on a QEMU platform. The compatible string will define the POWERPC processor version.

---
 hw/ppc/pnv.c | 3 +++
 1 file changed, 3 insertions(+)
hw/ppc/pnv.c +3 -0
index 627c08e5b985..4c3d5184126a 100644
@@ -479,6 +479,9 @@ static void *pnv_dt_create(MachineState *machine)
     fdt = g_malloc0(FDT_MAX_SIZE);
     _FDT((fdt_create_empty_tree(fdt, FDT_MAX_SIZE)));
 
+    /* /qemu node */
+    _FDT((fdt_add_subnode(fdt, 0, "qemu")));
+
     /* Root node */
     _FDT((fdt_setprop_cell(fdt, 0, "#address-cells", 0x2)));
     _FDT((fdt_setprop_cell(fdt, 0, "#size-cells", 0x2)));
Signature · 1 line
2.21.0
Applied
#1 lore raw
Quoted 4 lines · Cédric Le Goater

It helps skiboot identifying that is running on a QEMU platform. The compatible string will define the POWERPC processor version.

Applied to ppc-for-4.3.

Quoted 18 lines
---
 hw/ppc/pnv.c | 3 +++
 1 file changed, 3 insertions(+)
hw/ppc/pnv.c +3 -0
index 627c08e5b985..4c3d5184126a 100644
@@ -479,6 +479,9 @@ static void *pnv_dt_create(MachineState *machine)
     fdt = g_malloc0(FDT_MAX_SIZE);
     _FDT((fdt_create_empty_tree(fdt, FDT_MAX_SIZE)));
 
+    /* /qemu node */
+    _FDT((fdt_add_subnode(fdt, 0, "qemu")));
+
     /* Root node */
     _FDT((fdt_setprop_cell(fdt, 0, "#address-cells", 0x2)));
     _FDT((fdt_setprop_cell(fdt, 0, "#size-cells", 0x2)));
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson