Re: [PATCH v2 1/1] hw/arm: do not free machine->fdt in arm_load_dtb()

2023-03-28 Thread Markus Armbruster
Daniel Henrique Barboza writes: > On 3/28/23 06:53, Markus Armbruster wrote: >> Daniel Henrique Barboza writes: [...] >>> I believe we can improve the ARM boot code to not create ms->fdt at init(), >>> leaving it unassigned, and make get_dtb() return the machine FDT on a common >>> "void *"

Re: [PATCH v2 1/1] hw/arm: do not free machine->fdt in arm_load_dtb()

2023-03-28 Thread Daniel Henrique Barboza
On 3/28/23 06:53, Markus Armbruster wrote: Daniel Henrique Barboza writes: On 3/28/23 04:01, Markus Armbruster wrote: Daniel Henrique Barboza writes: At this moment, arm_load_dtb() can free machine->fdt when binfo->dtb_filename is NULL. If there's no 'dtb_filename', 'fdt' will be

Re: [PATCH v2 1/1] hw/arm: do not free machine->fdt in arm_load_dtb()

2023-03-28 Thread Markus Armbruster
Daniel Henrique Barboza writes: > On 3/28/23 04:01, Markus Armbruster wrote: >> Daniel Henrique Barboza writes: >> >>> At this moment, arm_load_dtb() can free machine->fdt when >>> binfo->dtb_filename is NULL. If there's no 'dtb_filename', 'fdt' will be >>> retrieved by binfo->get_dtb(). If

Re: [PATCH v2 1/1] hw/arm: do not free machine->fdt in arm_load_dtb()

2023-03-28 Thread Daniel Henrique Barboza
On 3/28/23 04:01, Markus Armbruster wrote: Daniel Henrique Barboza writes: At this moment, arm_load_dtb() can free machine->fdt when binfo->dtb_filename is NULL. If there's no 'dtb_filename', 'fdt' will be retrieved by binfo->get_dtb(). If get_dtb() returns machine->fdt, as is the case of

Re: [PATCH v2 1/1] hw/arm: do not free machine->fdt in arm_load_dtb()

2023-03-28 Thread Markus Armbruster
Daniel Henrique Barboza writes: > At this moment, arm_load_dtb() can free machine->fdt when > binfo->dtb_filename is NULL. If there's no 'dtb_filename', 'fdt' will be > retrieved by binfo->get_dtb(). If get_dtb() returns machine->fdt, as is > the case of machvirt_dtb() from hw/arm/virt.c, fdt

[PATCH v2 1/1] hw/arm: do not free machine->fdt in arm_load_dtb()

2023-03-23 Thread Daniel Henrique Barboza
At this moment, arm_load_dtb() can free machine->fdt when binfo->dtb_filename is NULL. If there's no 'dtb_filename', 'fdt' will be retrieved by binfo->get_dtb(). If get_dtb() returns machine->fdt, as is the case of machvirt_dtb() from hw/arm/virt.c, fdt now has a pointer to machine->fdt. And, in