diff options
author | BALATON Zoltan <balaton@eik.bme.hu> | 2021-07-09 15:19:13 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2021-07-13 10:04:30 +1000 |
commit | a312aaeb4d137a1e7781c9d79c1e7c3f65921eb8 (patch) | |
tree | 51f4ec001e84c2a340833dbef1c963f958dba88b /hw | |
parent | 57e28d34c0cb04abf7683ac6a12c87ede447c320 (diff) |
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 <balaton@eik.bme.hu>
Message-Id: <20210709132920.6544E7457EF@zero.eik.bme.hu>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ppc/pegasos2.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/ppc/pegasos2.c b/hw/ppc/pegasos2.c index 9a6ae867e4..9fad1854b1 100644 --- a/hw/ppc/pegasos2.c +++ b/hw/ppc/pegasos2.c @@ -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 }, { } }, }; |