diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-03-02 10:45:35 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-03-02 11:03:45 +0000 |
commit | 97df5feee3fe8b0e4e1a2cd3105ec476eb84cf42 (patch) | |
tree | 19b96c2643c9a1f8932c551c097224866efb7388 /hw | |
parent | 768055980b5f4a65d1bc2b6a7c1ece98adf7e262 (diff) | |
download | qemu-97df5feee3fe8b0e4e1a2cd3105ec476eb84cf42.zip qemu-97df5feee3fe8b0e4e1a2cd3105ec476eb84cf42.tar.gz qemu-97df5feee3fe8b0e4e1a2cd3105ec476eb84cf42.tar.bz2 |
loader: Add new load_ramdisk_as()
Add a function load_ramdisk_as() which behaves like the existing
load_ramdisk() but allows the caller to specify the AddressSpace
to use. This matches the pattern we have already for various
other loader functions.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180220180325.29818-2-peter.maydell@linaro.org
Diffstat (limited to 'hw')
-rw-r--r-- | hw/core/loader.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/core/loader.c b/hw/core/loader.c index c08f130..76b244c 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -730,8 +730,14 @@ int load_uimage_as(const char *filename, hwaddr *ep, hwaddr *loadaddr, /* Load a ramdisk. */ int load_ramdisk(const char *filename, hwaddr addr, uint64_t max_sz) { + return load_ramdisk_as(filename, addr, max_sz, NULL); +} + +int load_ramdisk_as(const char *filename, hwaddr addr, uint64_t max_sz, + AddressSpace *as) +{ return load_uboot_image(filename, NULL, &addr, NULL, IH_TYPE_RAMDISK, - NULL, NULL, NULL); + NULL, NULL, as); } /* Load a gzip-compressed kernel to a dynamically allocated buffer. */ |