linux-mips
[Top] [All Lists]

Patch for prom envp

To: linux-mips <linux-mips@linux-mips.org>
Subject: Patch for prom envp
From: Karl Lessard <klessard@sunrisetelecom.com>
Date: Thu, 14 Oct 2004 10:53:01 -0400
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020623 Debian/1.0.0-0.woody.1
Hi,

this small patch fix some heavy crashes when a board bootup and tries to
use the vector argument as the environnement variable.

Thanks,
Karl



diff -urp linux-mips/arch/mips/au1000/pb1100/init.c 
linux/arch/mips/au1000/pb1100/init.c
--- linux-mips/arch/mips/au1000/pb1100/init.c   Mon Nov 17 20:17:46 2003
+++ linux/arch/mips/au1000/pb1100/init.c        Thu Oct 14 10:11:42 2004
@@ -53,7 +53,7 @@ void __init prom_init(void)
 
        prom_argc = fw_arg0;
        prom_argv = (char **) fw_arg1;
-       prom_envp = (int *) fw_arg3;
+       prom_envp = (int *) fw_arg2;
 
        mips_machgroup = MACH_GROUP_ALCHEMY;
        mips_machtype = MACH_PB1100;
diff -urp linux-mips/arch/mips/ite-boards/ivr/init.c 
linux/arch/mips/ite-boards/ivr/init.c
--- linux-mips/arch/mips/ite-boards/ivr/init.c  Mon Nov 17 20:17:46 2003
+++ linux/arch/mips/ite-boards/ivr/init.c       Thu Oct 14 10:19:09 2004
@@ -60,7 +60,7 @@ void __init prom_init(void)
 
        prom_argc = fw_arg0;
        prom_argv = (char **) fw_arg1;
-       prom_envp = (int *) fw_arg3;
+       prom_envp = (int *) fw_arg2;
 
        mips_machgroup = MACH_GROUP_GLOBESPAN;
        mips_machtype = MACH_IVR;  /* Globespan's iTVC15 reference board */
diff -urp linux-mips/arch/mips/ite-boards/qed-4n-s01b/init.c 
linux/arch/mips/ite-boards/qed-4n-s01b/init.c
--- linux-mips/arch/mips/ite-boards/qed-4n-s01b/init.c  Mon Nov 17 20:17:46 2003
+++ linux/arch/mips/ite-boards/qed-4n-s01b/init.c       Thu Oct 14 10:19:33 2004
@@ -60,7 +60,7 @@ void __init prom_init(void)
 
        prom_argc = fw_arg0;
        prom_argv = (char **) fw_arg1;
-       prom_envp = (int *) fw_arg3;
+       prom_envp = (int *) fw_arg2;
 
        mips_machgroup = MACH_GROUP_ITE;
        mips_machtype = MACH_QED_4N_S01B;  /* ITE board name/number */

<Prev in Thread] Current Thread [Next in Thread>