On 26/06/23 12:01PM, Shivang Upadhyay wrote:
> Signed-off-by: Shivang Upadhyay <[email protected]>
> ---
> hw/ppc/pnv.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
> index 62812f22f8..6a636b5192 100644
> --- a/hw/ppc/pnv.c
> +++ b/hw/ppc/pnv.c
> @@ -803,8 +803,14 @@ static void pnv_reset(MachineState *machine, ResetType
> type)
> mpipl_write_succeeded = do_mpipl_write(pnv);
> }
>
> - /* Regenerate device tree */
> - fdt = pnv_dt_create(machine);
> + if (machine->dtb) {
> + int file_size; /* discard */
> + fdt = load_device_tree(machine->dtb, &file_size);
> + } else {
> + /* Regenerate device tree */
> + fdt = pnv_dt_create(machine);
> + }
> +
load_device_tree is being done in pnv_init also, how about this ?
/* only create new dt if -dtb wasn't explicity passed */
if (!machine->dtb) {
pnv_dt_create
fdt_pack
}
also, keep this before the mpipl block, ie. after qemu_devices_reset ?
Thanks,
- Aditya G