mirror of https://github.com/xemu-project/xemu.git
hw/arm_boot.c: Consistently use ram_size from arm_boot_info struct
Clean up the mix of getting the RAM size from the global ram_size and from the ram_size field in the arm_boot_info structure, so that we always use the structure field. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
This commit is contained in:
parent
de841dea59
commit
0b94438480
|
@ -357,7 +357,7 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info)
|
||||||
if (kernel_size < 0) {
|
if (kernel_size < 0) {
|
||||||
entry = info->loader_start + KERNEL_LOAD_ADDR;
|
entry = info->loader_start + KERNEL_LOAD_ADDR;
|
||||||
kernel_size = load_image_targphys(info->kernel_filename, entry,
|
kernel_size = load_image_targphys(info->kernel_filename, entry,
|
||||||
ram_size - KERNEL_LOAD_ADDR);
|
info->ram_size - KERNEL_LOAD_ADDR);
|
||||||
is_linux = 1;
|
is_linux = 1;
|
||||||
}
|
}
|
||||||
if (kernel_size < 0) {
|
if (kernel_size < 0) {
|
||||||
|
@ -371,7 +371,8 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info)
|
||||||
initrd_size = load_image_targphys(info->initrd_filename,
|
initrd_size = load_image_targphys(info->initrd_filename,
|
||||||
info->loader_start
|
info->loader_start
|
||||||
+ INITRD_LOAD_ADDR,
|
+ INITRD_LOAD_ADDR,
|
||||||
ram_size - INITRD_LOAD_ADDR);
|
info->ram_size
|
||||||
|
- INITRD_LOAD_ADDR);
|
||||||
if (initrd_size < 0) {
|
if (initrd_size < 0) {
|
||||||
fprintf(stderr, "qemu: could not load initrd '%s'\n",
|
fprintf(stderr, "qemu: could not load initrd '%s'\n",
|
||||||
info->initrd_filename);
|
info->initrd_filename);
|
||||||
|
|
Loading…
Reference in New Issue