Messages in this thread Patch in this message | | | Date | Sat, 21 Sep 1996 19:58:46 +0200 | From | Hans Lermen <> | Subject | _realy_ FIXED [ was: reboot problem ] (fwd) |
| |
Hi Linus,
The patch from Neil Turton _realy_ fixes the reboot problem ! I checked it on a machine that (besides Linux) even Windows'95 couldn't reboot. I modified Neil's patch, so that the kernel now can understand a boot commandline parameter:
reboot=cold
So, people with reboot problems can at least have a cold reboot. It would be realy good to have it in the 2.0.x kernel.
On 20 Sep 1996, Neil Turton wrote:
> .... Also, I have had this problem > and managed to make it go away by doing a cold software reset. > [ ... ]
YES Neil, that did the job :-)
Below the modified patch from Neil, fits into 2.0.21.
Hans <lermen@fgan.de>
-------------------------------------------------------------------------- --- linux/init/main.c.old Sat Sep 21 00:38:41 1996 +++ linux/init/main.c Sat Sep 21 19:13:46 1996 @@ -98,6 +98,7 @@ extern void ppa_setup(char *str, int *ints); extern void scsi_luns_setup(char *str, int *ints); extern void sound_setup(char *str, int *ints); +extern void reboot_setup(char *str, int *ints); #ifdef CONFIG_CDU31A extern void cdu31a_setup(char *str, int *ints); #endif CONFIG_CDU31A @@ -417,5 +418,6 @@ { "baycom=", baycom_setup }, #endif + { "reboot=", reboot_setup }, { 0, 0 } }; --- linux/arch/i386/kernel/process.c.old Sat Sep 21 00:17:18 1996 +++ linux/arch/i386/kernel/process.c Sat Sep 21 19:13:39 1996 @@ -182,6 +182,13 @@ * and if it doesn't work, we do some other stupid things. */ static long no_idt[2] = {0, 0}; +static int reboot_mode = 0; + +void reboot_setup(char *str, int *ints) +{ + if (str[0] == 'c' /* cold */) reboot_mode = 1; + else reboot_mode = 0; +} static inline void kb_wait(void) { @@ -199,7 +206,7 @@ sti(); /* rebooting needs to touch the page at absolute addr 0 */ pg0[0] = 7; - *((unsigned short *)0x472) = 0x1234; + *((unsigned short *)0x472) = reboot_mode ? 0 : 0x1234; for (;;) { for (i=0; i<100; i++) { kb_wait(); --------------------------------------------------------------------------
| |