On 12/02/2016 15:45, Peter Maydell wrote:
> Add a new function load_image_mr(), which behaves like
> load_image_targphys() except that it loads the ROM image to
> a specified MemoryRegion rather than to a specified physical
> address. This is useful when a ROM blob needs to be loaded
> to a particular flash or ROM device but the address of that
> device in the machine's address space is not known. (For
> instance, ROMs in devices, or ROMs which might exist in
> a different address space to the system address space.)
> 
> Signed-off-by: Peter Maydell <peter.mayd...@linaro.org>

The patch looks good, in particular it should be fine for the non-fw_cfg
uses of rom->mr.

The fw_cfg interface to loader.c indeed should be turned upside-down so
that the knowledge moves outside rom_add_file (to a rom_add_fwcfg
function for example) and rom_add_file doesn't need to call rom_set_mr.
 Your patch is at least a step in the right direction, because it adds
memory region support in the !fw_cfg case.

So,

Reviewed-by: Paolo Bonzini <pbonz...@redhat.com>

Thanks,

Paolo

Reply via email to