Message ID | 1345683341-8236-2-git-send-email-scottwood@freescale.com |
---|---|
State | New |
Headers | show |
On 23.08.2012, at 02:55, Scott Wood wrote: > 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> Ah, all the images I tested start off from address 0. But yes, we should add the kernel load offset as well. Thanks, applied to ppc-next. Alex > --- > hw/ppc/e500.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c > index 1ccfd7c..60ddd85 100644 > --- a/hw/ppc/e500.c > +++ b/hw/ppc/e500.c > @@ -553,7 +553,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); > > -- > 1.7.9.5 > >
On Tue, Sep 25, 2012 at 09:49:08AM +0200, Alexander Graf wrote: > > 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> > > Ah, all the images I tested start off from address 0. But yes, we should add the kernel load offset as well. > Thanks, applied to ppc-next. Isn't the aix kernel starting at offset 16384? Folkert van Heusden
On 09/28/2012 02:52:15 PM, folkert wrote: > On Tue, Sep 25, 2012 at 09:49:08AM +0200, Alexander Graf wrote: > > > 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> > > > > Ah, all the images I tested start off from address 0. But yes, we > should add the kernel load offset as well. > > Thanks, applied to ppc-next. > > Isn't the aix kernel starting at offset 16384? I doubt the AIX kernel will run on e500. :-) -Scott
On 28.09.2012, at 21:52, folkert <folkert@vanheusden.com> wrote: > On Tue, Sep 25, 2012 at 09:49:08AM +0200, Alexander Graf wrote: >>> 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> >> >> Ah, all the images I tested start off from address 0. But yes, we should add the kernel load offset as well. >> Thanks, applied to ppc-next. > > Isn't the aix kernel starting at offset 16384? AIX does not run on e500 style cores :) Alex > > > Folkert van Heusden > > -- > MultiTail na wan makriki wrokosani fu tan luku den logfile nanga san > den commando spiti puru. Piki puru spesrutu sani, wroko nanga difrenti > kroru, tya kon makandra, nanga wan lo moro. > http://www.vanheusden.com/multitail/ > ---------------------------------------------------------------------- > Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 1ccfd7c..60ddd85 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -553,7 +553,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);
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> --- hw/ppc/e500.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)