ppc/pegasos2: Allow setprop in VOF
PATCH 1/1 ppc/pegasos2: Allow setprop in VOF
Linux needs setprop to fix up the device tree, otherwise it's not finding devices and cannot boot. Since recent VOF change now we need to add a callback to allow this which is what this patch does.
Signed-off-by BALATON Zoltan <[email protected]>
--- hw/ppc/pegasos2.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
hw/ppc/pegasos2.c +10 -0
@@ -443,10 +443,17 @@ static target_ulong vhyp_encode_hpt_for_kvm_pr(PPCVirtualHypervisor *vhyp)return POWERPC_CPU (current_cpu)->env.spr[SPR_SDR1 ]; } +static bool pegasos2_setprop (MachineState *ms,const char *path, +const char *propname,void *val,int vallen) +{ +return true; +} +static void pegasos2_machine_class_init (ObjectClass *oc,void *data) {MachineClass *mc =MACHINE_CLASS (oc);PPCVirtualHypervisorClass *vhc =PPC_VIRTUAL_HYPERVISOR_CLASS (oc); +VofMachineIfClass *vmc =VOF_MACHINE_CLASS (oc); mc->desc ="Genesi/bPlan Pegasos II" ; mc->init = pegasos2_init;
@@ -462,6 +469,8 @@ static void pegasos2_machine_class_init(ObjectClass *oc, void *data) vhc->cpu_exec_enter = vhyp_nop; vhc->cpu_exec_exit = vhyp_nop; vhc->encode_hpt_for_kvm_pr = vhyp_encode_hpt_for_kvm_pr; + + vmc->setprop = pegasos2_setprop; }static const TypeInfo pegasos2_machine_info = {
@@ -471,6 +480,7 @@ static const TypeInfo pegasos2_machine_info = { .instance_size = sizeof(Pegasos2MachineState), .interfaces = (InterfaceInfo []) { {TYPE_PPC_VIRTUAL_HYPERVISOR }, + {TYPE_VOF_MACHINE_IF }, { } }, };
Signature · 1 line
2.21.4
David Gibson
AppliedQuoted 5 lines · BALATON Zoltan
Linux needs setprop to fix up the device tree, otherwise it's not finding devices and cannot boot. Since recent VOF change now we need to add a callback to allow this which is what this patch does.
Signed-off-by BALATON Zoltan <[email protected]>
Applied to ppc-for-6.1.
Quoted 43 lines
--- hw/ppc/pegasos2.c | 10 ++++++++++ 1 file changed, 10 insertions(+)hw/ppc/pegasos2.c +10
-0@@ -443,10 +443,17 @@ static target_ulong vhyp_encode_hpt_for_kvm_pr(PPCVirtualHypervisor *vhyp)return POWERPC_CPU (current_cpu)->env.spr[SPR_SDR1 ]; } +static bool pegasos2_setprop (MachineState *ms,const char *path, +const char *propname,void *val,int vallen) +{ +return true; +} +static void pegasos2_machine_class_init (ObjectClass *oc,void *data) {MachineClass *mc =MACHINE_CLASS (oc);PPCVirtualHypervisorClass *vhc =PPC_VIRTUAL_HYPERVISOR_CLASS (oc); +VofMachineIfClass *vmc =VOF_MACHINE_CLASS (oc); mc->desc ="Genesi/bPlan Pegasos II" ; mc->init = pegasos2_init;@@ -462,6 +469,8 @@ static void pegasos2_machine_class_init(ObjectClass *oc, void *data) vhc->cpu_exec_enter = vhyp_nop; vhc->cpu_exec_exit = vhyp_nop; vhc->encode_hpt_for_kvm_pr = vhyp_encode_hpt_for_kvm_pr; + + vmc->setprop = pegasos2_setprop; }static const TypeInfo pegasos2_machine_info = {@@ -471,6 +480,7 @@ static const TypeInfo pegasos2_machine_info = { .instance_size = sizeof(Pegasos2MachineState), .interfaces = (InterfaceInfo []) { {TYPE_PPC_VIRTUAL_HYPERVISOR }, + {TYPE_VOF_MACHINE_IF }, { } }, };
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