Cannot boot reliably vxWorks on PPC44x
Hi
I am trying to boot a vxWorks image (version 6.4) on my Yosemite board (PPC440EP) using the amcc440ep BSP. Booting from a vxWorks bootrom worked without problems.
Booting vxWorks from u-boot (more or less git HEAD) failed. After uncommenting in the vxWorks amcc440ep/config.h the following four lines
#undef INCLUDE_440X5_DCACHE_RECOVERY
#undef INCLUDE_440X5_TLB_RECOVERY
#undef INCLUDE_440X5_PARITY_RECOVERY
#undef INCLUDE_440X5_TLB_RECOVERY_MAX
#undef INCLUDE_440X5_MCH_LOGGER
vxWorks boots sometimes if I reset the the board using our BDI. It seems that it never boots after the first reset, but often after the second reset. It never boots without an attached BDI.
vxWorks and BDI initialize the TLB quite differently, but the vxWorks startup seems to have already initialised the TLB, but more or less around the time it activates it.
Has anybody seen a similar problem?
Has anybody successfully booted a vxWorks image on a PPC44x processor? Has anybody an idea where this problem could stem from? (I use the BDI config 4xxep440.cfg from ftp://ftp.denx.de/pub/BDI2000/).
BTW, the boot cmd of vxWorks expects a parameter, therefore I think it would make sense to apply a patch like
common/cmd_elf.c +0 -0
@@ -213,7 +213,7 @@ int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char
*argv[])
(char *) bootaddr);
printf ("## Starting vxWorks at 0x%08lx ...\n", addr);- ((void (*)(void)) addr) ();
+ ((void (*)(int)) addr) (2); /* 0 => BOOT_NORMAL 2=> BOOT_CLEAR */
puts ("## vxWorks terminated\n");
return 1;Best regards
Niklaus Giger
Hi Niklaus,
Quoted 17 lines · Niklaus Giger
BTW, the boot cmd of vxWorks expects a parameter, therefore I think it would make sense to apply a patch like
common/cmd_elf.c +1
-1@@ -213,7 +213,7 @@ int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) (char *) bootaddr);printf ("## Starting vxWorks at 0x%08lx ...\n" , addr); - ((void (*)(void )) addr) (); + ((void (*)(int )) addr) (2 );/* 0 => BOOT_NORMAL 2=> BOOT_CLEAR */ puts ("## vxWorks terminated\n" );
Quoted 1 line
return 1;
Are you sure that this parameter is supported. A quick "googling" only showed this parameter in the VxWorks function reboot(), and I don't think this is the entry point of the VxWorks image.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office: Kirchenstr. 5, D-82194 Groebenzell, Germany
=====================================================================
Quoted 22 lines
Quoted 3 lines
Quoted 3 lines
Stefan Roese<[email protected]> 04.04.07 15:19:53 >>>
Hi Niklaus,
Quoted 16 lines · Niklaus Giger
BTW, the boot cmd of vxWorks expects a parameter, therefore I think it would make sense to apply a patch like
common/cmd_elf.c +1
-1@@ -213,7 +213,7 @@ int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) (char *) bootaddr);printf ("## Starting vxWorks at 0x%08lx ...\n" , addr); - ((void (*)(void )) addr) (); + ((void (*)(int )) addr) (2 );/* 0 => BOOT_NORMAL 2=> BOOT_CLEAR */
Quoted 6 lines
Quoted 2 lines
common/cmd_elf.c +0
-0puts ("## vxWorks terminated\n" );return 1;Are you sure that this parameter is supported. A quick "googling" only showed this parameter in the VxWorks function
reboot(), and I don't think this is the entry point of the VxWorks image.
It is also used by the function void usrInit (int startType) and gets passed afterward to various init functions, e.g. usrBootLineInit. My board specific code tested its value, which made me discover this bug.
Best regards
Niklaus
Hi Niklaus,
Quoted 16 lines · Niklaus Giger
Quoted 9 lines
Quoted 9 lines
(quoted diff) +1
-1@@ -213,7 +213,7 @@ int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) (char *) bootaddr); printf ("## Starting vxWorks at 0x%08lx ...\n", addr); - ((void (*)(void)) addr) (); + ((void (*)(int)) addr) (2); /* 0 => BOOT_NORMAL 2=> BOOT_CLEAR */Quoted 6 lines
Quoted 2 lines
puts ("## vxWorks terminated\n"); return 1;Are you sure that this parameter is supported. A quick "googling" only showed this parameter in the VxWorks function
reboot(), and I don't think this is the entry point of the VxWorks image.
Quoted 3 lines
It is also used by the function void usrInit (int startType) and gets passed afterward to various init functions, e.g. usrBootLineInit. My board specific code tested its value, which made me discover this bug.
OK, thanks for clarifying.
Could you then please resubmit a new patch with a poper git commit description and a signed-off line. And please don't use "2" (BOOT_CLEAR) as default here. Default should be "0" (BOOT_NORMAL). Perhaps you could make it configurable via an env variable?
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office: Kirchenstr. 5, D-82194 Groebenzell, Germany
=====================================================================