[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 54/60] hw/arm_boot.c: Consistently use ram_size fro
From: |
Michael Tokarev |
Subject: |
[Qemu-stable] [PATCH 54/60] hw/arm_boot.c: Consistently use ram_size from arm_boot_info struct |
Date: |
Mon, 4 Feb 2013 14:41:04 +0400 |
From: Peter Maydell <address@hidden>
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 <address@hidden>
Reviewed-by: Peter A. G. Crosthwaite <address@hidden>
(cherry picked from commit 0b94438480c8f52cc9e22b1038e6ba5096245c4e)
This patch is needed for the subsequent patch:
arm_boot: Change initrd load address to "halfway through RAM"
Signed-off-by: Michael Tokarev <address@hidden>
---
hw/arm_boot.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/arm_boot.c b/hw/arm_boot.c
index 7447f5c..05701b2 100644
--- a/hw/arm_boot.c
+++ b/hw/arm_boot.c
@@ -351,7 +351,7 @@ void arm_load_kernel(CPUARMState *env, struct arm_boot_info
*info)
if (kernel_size < 0) {
entry = info->loader_start + KERNEL_LOAD_ADDR;
kernel_size = load_image_targphys(info->kernel_filename, entry,
- ram_size - KERNEL_LOAD_ADDR);
+ info->ram_size - KERNEL_LOAD_ADDR);
is_linux = 1;
}
if (kernel_size < 0) {
@@ -365,7 +365,8 @@ void arm_load_kernel(CPUARMState *env, struct arm_boot_info
*info)
initrd_size = load_image_targphys(info->initrd_filename,
info->loader_start
+ INITRD_LOAD_ADDR,
- ram_size - INITRD_LOAD_ADDR);
+ info->ram_size
+ - INITRD_LOAD_ADDR);
if (initrd_size < 0) {
fprintf(stderr, "qemu: could not load initrd '%s'\n",
info->initrd_filename);
--
1.7.10.4
- [Qemu-stable] Patch queue for qemu-1.1.3 stable release, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 02/60] qemu-char: BUGFIX, don't call FD_ISSET with negative fd, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 03/60] use --libexecdir instead of ignoring it first and reinventing it later, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 01/60] tcg/s390: fix ld/st with CONFIG_TCG_PASS_AREG0, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 05/60] fix CONFIG_QEMU_HELPERDIR generation again, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 04/60] configure: Fix CONFIG_QEMU_HELPERDIR generation, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 23/60] hw/qxl: qxl_dirty_surfaces: use uintptr_t, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 54/60] hw/arm_boot.c: Consistently use ram_size from arm_boot_info struct,
Michael Tokarev <=
- [Qemu-stable] [PATCH 29/60] usb-storage: fix SYNCHRONIZE_CACHE, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 41/60] mips/malta: fix CBUS UART interrupt pin, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 10/60] pcie_aer: clear cmask for Advanced Error Interrupt Message Number, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 22/60] uhci: Raise interrupt when requested even for non active tds, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 35/60] s390x: fix -initrd in virtio machine, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 16/60] blockdev: preserve readonly and snapshot states across media changes, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 32/60] qed: refuse unaligned zero writes with a backing file, Michael Tokarev, 2013/02/04