On Sun, 16 Aug 2026 at 15:54, Philippe Mathieu-Daudé
<[email protected]> wrote:
>
> On 16/8/26 15:12, Bin Meng wrote:
> > arm_load_kernel() keeps a pointer to the boot info struct for the
> > lifetime of the VM, so the struct logically belongs to the machine
> > rather than to a file scoped static object.
> >
> > Move the boot info into the existing AspeedMachineState.

> > -    aspeed_board_binfo.ram_size = machine->ram_size;
> > -    aspeed_board_binfo.loader_start = sc->memmap[ASPEED_DEV_SDRAM];
> > +    bmc->bootinfo.board_id = -1; /* device-tree-only board */
>
> Should #define a self-explanatory BOARD_ID_DEVICE_TREE?

> > @@ -42,6 +43,7 @@ struct AspeedMachineState {
> >       char *fmc_model;
> >       char *spi_model;
> >       uint32_t hw_strap1;
> > +    struct arm_boot_info bootinfo;
> >   };
>
> Maybe time to add a typedef to be style-consistent.

Mmm, and if we're adding a typedef then fixing the capitalization
style to ArmBootInfo is what matches our style guide.

I think these are both good ideas but in the interests of not
delaying this touch-lots-of-files patchset too much longer
I think we can do them as separate patches afterwards.

(Interestingly the kernel does not bother to define a
name for the -1 value -- it just hardcodes ~0 in its
DT_MACHINE_START macro.)

thanks
-- PMM

Reply via email to