On Sun, 25 Oct 2020 17:03:43 +0000 Peter Maydell <peter.mayd...@linaro.org> wrote:
> On Fri, 23 Oct 2020 at 20:04, Igor Mammedov <imamm...@redhat.com> wrote: > > > > On Fri, 23 Oct 2020 19:39:16 +0200 > > Philippe Mathieu-Daudé <f4...@amsat.org> wrote: > > > Are you saying arm_boot_info should hold a pointer to MachineState* > > > instead of duplicating? > > > > yep, some parts of it (fdt related) already use MachineState* so it's > > complete rewrite. The same probably applies to the fields you've just > > quoted. > > Hmm, maybe, maybe not. The original design idea here was that > the boot loader code took a structure defining only the things > that the bootloader needed to know. It doesn't really need to > know about all the stuff that's in MachineState, which is > the state structure for the machine. Yep It doesn't need all data the MachineState contains, but then we end up with this kind of bugs which could be avoided if duplication were not there. And some of the fields in MachineState are pure bootloader data. > > thanks > -- PMM >