On 26 March 2011 11:41, Blue Swirl <blauwir...@gmail.com> wrote: > On Mon, Mar 21, 2011 at 7:47 PM, Peter Maydell <peter.mayd...@linaro.org> > wrote: >> This fairly simple patchset adds a new 'max_ram' field to the QEMUMachine >> structure so that a board model can specify the maximum RAM it will accept. >> We can then produce a friendly diagnostic message when the user tries to >> start qemu with a '-m' option asking for more RAM than that. (Currently >> most of the ARM devboard models respond with an obscure guest crash when >> the guest tries to access RAM and finds device registers instead.)
> This could replace the field max_mem in hwdef structures in sun4m.c. I've had a go at this, and it's revealed a flaw in this patchset, which is that the max_ram field needs to be type target_physaddr_t rather than ram_addr_t. I'll post another patchset including a sun4m cleanup(*) once I've done some testing on it. (*) includes combining the QEMUMachine struct into the sun4*_hwdef struct, which is necessary so the init fn can get at it and also I think neater. -- PMM