On 09/16/20 11:52, Laszlo Ersek wrote: > (5) In my opinion (which could be wrong of course), we shouldn't > introduce a new command line option for this, but a new PC machine type > property called "x-firmware-max-size". > > Please look at the object_class_property_add() calls in > pc_machine_class_init() [hw/i386/pc.c]. > > I think the PC_MACHINE_MAX_RAM_BELOW_4G property is a good example to > imitate: > > - It has type "size". > > - It comes with a getter and a setter, and an associated field in > PCMachineState ("max_ram_below_4g"). > > - It has a nice description. > > Then in pc_system_flash_map() [hw/i386/pc_sysfw.c], I suggest replacing > FLASH_SIZE_LIMIT with "pcms->firmware_max_size".
The default value (8MB) should be set in pc_machine_initfn() [hw/i386/pc.c]. Thanks Laszlo