MIPS: TXx9: Make firmware parameter passing more robust
authorGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Mon, 27 Oct 2008 14:25:49 +0000 (15:25 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 27 Oct 2008 16:18:31 +0000 (16:18 +0000)
When booting Linux on a txx9 board with VxWorks boot loader, it crashes in
prom_getenv(), as VxWorks doesn't pass firmware parameters in a0-a3 (in my
case, the actual leftover values in these registers were 0x80002000,
0x80001fe0, 0x2000, and 0x20).

Make the parsing of argc, argv, and envp a bit more robust by checking if
argc is a number below CKSEG0, and argv/envp point to CKSEG0.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

No differences found