OSDN Git Service

loader: Add load_image_mr() to load ROM image to a MemoryRegion
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 4 Mar 2016 11:30:17 +0000 (11:30 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 4 Mar 2016 11:30:17 +0000 (11:30 +0000)
commit76151cacfe956248a25b38b5e8429465584f47bb
tree561d5889e038a446d9ff60c9bd5ea8f457004bc8
parent83ec1923cdc794de7a782e99e26daa1d91ca14e9
loader: Add load_image_mr() to load ROM image to a MemoryRegion

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.maydell@linaro.org>
Message-id: 1455288361-30117-3-git-send-email-peter.maydell@linaro.org
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
hw/core/loader.c
include/hw/loader.h