MVME5100 and bugboot fails
A message that is not in the archive (sent off-list or not yet received): [email protected]
I tried that and I was unable to relocate just the initrd. Right now, I just tested to see:
if ((zImage_start >= 0xf0000000) || (zImage_start <= 0x00800000))
That seems to work for now, but I'll take a peek at the gemeni and see how they do it.
Quoted 15 lines · you
Quoted 1 line · Brian Waite
I am playing with the MVME5100 and I am having a bit of trouble with
booting
Quoted 1 line
using bugboot and an initrd. I get a message at bootup saying initrd > 16
MB
Quoted 1 line
and then as it is booting it gets an oops in
mem_init.[snip]
Quoted 1 line
My question is is the failure due to the bootloader not relocating the
Quoted 8 lines
initrd
Quoted 2 lines
or is it that
ClearPageReserved()is being called when the initrd is in FLASH? Any ideas?Right now, we only see if we need to relocate the initrd if we need to relocate
the kernel. I'll go and fix this (I think gemini has the right idea).
--
Thanks
Brian
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 6 lines · Brian Waite
I tried that and I was unable to relocate just the initrd. Right now, I just tested to see:
if ((zImage_start>=0xf0000000) || (zImage_start<=0x00800000))That seems to work for now, but I'll take a peek at the gemeni and see how they do it.
Er, after re-reading, it's wrong too. I'll send you a patch privately, if you can test it.
--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 7 lines · Tom Rini
Quoted 4 lines · Brian Waite
I tried that and I was unable to relocate just the initrd. Right now, I just tested to see:
if ((zImage_start>=0xf0000000) || (zImage_start<=0x00800000))
Quoted 5 lines
Quoted 2 lines
That seems to work for now, but I'll take a peek at the gemeni and see how they do it.
Er, after re-reading, it's wrong too. I'll send you a patch privately, if you can test it.
This location checking logic is all a hack...I've already stared at this a while to make it work for someone. I recommend we _always_ relocate both zImage and initrd (if present).
See the attached patch to misc-simple.c (this is versus 2.4.2ish, but should apply cleanly) which gets the initrd relocated properly...it's tested with bugboot.
--
Matt Porter
MontaVista Software, Inc.
[email protected]
arch/ppc/boot/common/misc-simple.c renamed from arch/ppc/boot/common/misc-simple.c.orig +17 -29
@@ -97,39 +97,27 @@ initrd_start =0 ; initrd_end =INITRD_SIZE + initrd_start; -/* -* Find a place to stick the zimage and initrd and -* relocate them if we have to. -- Cort -*/ +/* relocate zimage */ avail_ram = (char *)PAGE_ALIGN ((unsigned long )_end);puts ("zimage at: " );puthex ((unsigned long )zimage_start);puts (" " );puthex ((unsigned long )(zimage_size+zimage_start));puts ("\n" ); -if ( (unsigned long )zimage_start <=0x00800000 ) - { -memcpy ( (void *)avail_ram, (void *)zimage_start, zimage_size ); - zimage_start = (char *)avail_ram; -puts ("relocated to: " );puthex ((unsigned long )zimage_start); -puts (" " ); -puthex ((unsigned long )zimage_size+(unsigned long )zimage_start); -puts ("\n" ); +memcpy ( (void *)avail_ram, (void *)zimage_start, zimage_size ); + zimage_start = (char *)avail_ram; +puts ("relocated to: " );puthex ((unsigned long )zimage_start); +puts (" " ); +puthex ((unsigned long )zimage_size+(unsigned long )zimage_start); +puts ("\n" ); -/* relocate initrd */ -if ( initrd_start ) - { -puts ("initrd at: " );puthex (initrd_start); -puts (" " );puthex (initrd_end);puts ("\n" ); - avail_ram = (char *)PAGE_ALIGN ( - (unsigned long )zimage_size+(unsigned long )zimage_start); -memcpy ((void *)avail_ram, (void *)initrd_start,INITRD_SIZE ); - initrd_start = (unsigned long )avail_ram; - initrd_end = initrd_start +INITRD_SIZE ; -puts ("relocated to: " );puthex (initrd_start); -puts (" " );puthex (initrd_end);puts ("\n" ); - } - }else if ( initrd_start ) { -puts ("initrd at: " );puthex (initrd_start); -puts (" " );puthex (initrd_end);puts ("\n" ); - } +/* relocate initrd */ +puts ("initrd at: " );puthex (initrd_start); +puts (" " );puthex (initrd_end);puts ("\n" ); + avail_ram = (char *)PAGE_ALIGN ( + (unsigned long )zimage_size+(unsigned long )zimage_start); +memcpy ((void *)avail_ram, (void *)initrd_start,INITRD_SIZE ); + initrd_start = (unsigned long )avail_ram; + initrd_end = initrd_start +INITRD_SIZE ; +puts ("relocated to: " );puthex (initrd_start); +puts (" " );puthex (initrd_end);puts ("\n" ); avail_ram = (char *)0x00400000 ; end_avail = (char *)0x00800000 ;
Quoted 11 lines · Matt Porter
Quoted 10 lines · Tom Rini
Quoted 6 lines · Brian Waite
I tried that and I was unable to relocate just the initrd. Right now, I just tested to see:
if ((zImage_start>=0xf0000000) || (zImage_start<=0x00800000))That seems to work for now, but I'll take a peek at the gemeni and see how they do it.
Quoted 6 lines
Quoted 2 lines
Er, after re-reading, it's wrong too. I'll send you a patch privately, if you can test it.
This location checking logic is all a hack...I've already stared at this a while to make it work for someone. I recommend we _always_ relocate both zImage and initrd (if present).
Right, but if the initrd happens to start off at below the 16 mb barrier, why do it? For example anyhow, my PowerStack doesn't need to relocate the zimage (and if I can make it happily netboot, I'll test initrd, but that might need it..)
--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 15 lines · Tom Rini
Quoted 14 lines · Matt Porter
Quoted 12 lines · Tom Rini
Quoted 6 lines · Brian Waite
I tried that and I was unable to relocate just the initrd. Right now, I just tested to see:
if ((zImage_start>=0xf0000000) || (zImage_start<=0x00800000))That seems to work for now, but I'll take a peek at the gemeni and see how they do it.
Er, after re-reading, it's wrong too. I'll send you a patch privately, if you can test it.
Quoted 8 lines
Quoted 3 lines
This location checking logic is all a hack...I've already stared at this a while to make it work for someone. I recommend we _always_ relocate both zImage and initrd (if present).
Right, but if the initrd happens to start off at below the 16 mb barrier, why do it? For example anyhow, my PowerStack doesn't need to relocate the zimage (and if I can make it happily netboot, I'll test initrd, but that might need it..)
Because it's simpler than having a lot of checks. Also, it doesn't really waste noticeable time in the memcpy since the bootloader has to timeout at the load: prompt anyway.
BTW, try pbooting a zImage.initrd from a block device and you'll see that PPCBUG locates the images from top of memory down I believe. Only when netbooting (with PReP netboot enabled) does it load staticly at 0x5000.
If you want the checks that's fine as long as it works. Just don't doing anything board specific like in the patch above.
--
Matt Porter
MontaVista Software, Inc.
[email protected]
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 20 lines · Matt Porter
Quoted 19 lines · Tom Rini
Quoted 17 lines · Matt Porter
Quoted 7 lines · Tom Rini
Quoted 4 lines · Brian Waite
I tried that and I was unable to relocate just the initrd. Right now, I just tested to see:
if ((zImage_start>=0xf0000000) || (zImage_start<=0x00800000))Quoted 5 lines
Quoted 2 lines
That seems to work for now, but I'll take a peek at the gemeni and see how they do it.
Er, after re-reading, it's wrong too. I'll send you a patch privately, if you can test it.
This location checking logic is all a hack...I've already stared at this a while to make it work for someone. I recommend we _always_ relocate both zImage and initrd (if present).
Quoted 8 lines
Quoted 4 lines
Right, but if the initrd happens to start off at below the 16 mb barrier, why do it? For example anyhow, my PowerStack doesn't need to relocate the zimage (and if I can make it happily netboot, I'll test initrd, but that might need it..)
Because it's simpler than having a lot of checks. Also, it doesn't really waste noticeable time in the memcpy since the bootloader has to timeout at the load: prompt anyway.
The timeout will (maybe) be configurable later on. Does checking if the initrd is above 16mb and then relocating it, at least on 'prep' make sense? Always relocating sounds like it'll fix other problems (like FLASH). I guess I'll try and see if I can notice a difference here w/ just a zImage on 'prep', just so to keep the code consistant..
--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/