aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2012-08-22 14:55:41 +0000
committerAlexander Graf <agraf@suse.de>2012-10-05 02:35:11 +0200
commit7e7ec2d290ca5b1bdd555da9852dc5ee60232fe5 (patch)
tree73bfab0e7fca669a1649aa209457a9a4e9314070
parent9dd5eba1bc69bccbd83885d157d84e2514799a22 (diff)
PPC: e500: calculate initrd_base like dt_base
While investigating dtb pad issues, I noticed that initrd_base wasn't taking loadaddr into account the way dt_base was. This seems wrong. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
-rw-r--r--hw/ppc/e500.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index fc3fde0b66..feb712e5a9 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -540,7 +540,8 @@ void ppce500_init(PPCE500Params *params)
/* Load initrd. */
if (params->initrd_filename) {
- initrd_base = (kernel_size + INITRD_LOAD_PAD) & ~INITRD_PAD_MASK;
+ initrd_base = (loadaddr + kernel_size + INITRD_LOAD_PAD) &
+ ~INITRD_PAD_MASK;
initrd_size = load_image_targphys(params->initrd_filename, initrd_base,
ram_size - initrd_base);