Messages in this thread |  | | | Date | Tue, 26 Mar 1996 19:49:51 -0500 | | From | "Darrin R. Smith" <> | | Subject | Re: Linux reboot |
| |
Dale Scheetz wrote: > > On Tue, 26 Mar 1996, William E. Roadcap wrote: > > > On Tue, 26 Mar 1996, PAER LINDH wrote: > > > > > > > > I have always wondered why Linux never reboots by itself when I type > > > reboot or press CTRL-ALT-DEL. I will have to press the reset button > > > manually. It just stops after the text > > > > > > rebooting > > > > > > has appeared on the screen. This has happened ever since I switched CPU > > > to a AMD DX4-120. Before on my AMD DX2-66 it rebooted fine. > > > In MS-DOS/Windows the rebooting works fine. [...]
I have an AMD 486DX2-80 with the same problem. I have been working on a fix for the kernel, but I must say I am not that proficient in protected mode assembly yet(esp. wrt gcc/as). On my system, if I am in dos, and I write out the "magic number" to location 472(ie [0x472] = 0x1234), and then jump into the bootstrap address, the machine reboots fine. On the other hand, if I carefully exit protected mode and then do the same thing in process.c, the machine just hangs. Below is my current hard_reset_now() call in arch/1386/kernel/process.c -- if anyone would care to give me a few pointers on it, it would be much appreciated as this is my first attempt at hacking the kernel. By the way -- this is from 1.2.13.
--Darrin Smith
void hard_reset_now(void) { printk("hard reset code has begun execution\n"); sti(); /* rebooting needs to touch the page at absolute addr 0 */ pg0[0] = 7; *((unsigned short *)0x472) = 0x1234; __asm__ __volatile__("\tlidt %0": "=m" (no_idt)); __asm__ __volatile__(" cli mov %eax,%cr0 lidt 0x3ff andb %al,0xfe movl %cr0,%eax ljmp forward ; exited protected mode forward: movw %ax,0xffff pushw %ax movw %ax,0x0000 pushw %ax lret"); /* we just forced the cpu into the bootstrap code */ }
f you do learn to speak correct English, whom are you going to speak it to? -- Clarence Darrow
|  |