Page 1 of 1

Failing to reboot

Posted: Mon Oct 27, 2003 9:10 pm
by HOS
Hi!

i have just finished adding ps/2 mouse support, and i realized that my restart() function no longer works. here is what i have been using:

Code: Select all

inline void restart()
{
   outportb (0x64, 0xfe);
   for (;;)
   {
   }
}
and when i do not enable the ps/2 mouse it works fine... but if i enable the mouse and press ctrl-alt-del (which calls restart()) or invoke restart() another way, the screen just goes black, but then hangs, the cpu does not reset. is there anything else i should be doing to restart properly, and what (in enabling the ps/2 mouse) could cause this function to not work?

thanks

Re:Failing to reboot

Posted: Tue Oct 28, 2003 12:52 am
by Perica
..

Re:Failing to reboot

Posted: Tue Oct 28, 2003 6:43 am
by Tim
Unfortunately, triple faulting is not guaranteed to work. I have two motherboards here that just hang on triple faults.

HOS: This reboot routine has worked well for me so far.

Code: Select all

void ArchReboot(void)
{
    uint8_t temp;
    disable();

    /* flush the keyboard controller */
    do
    {
        temp = in(0x64);
        if (temp & 1)
            in(0x60);
    } while(temp & 2);

    /* pulse the CPU reset line */
    out(0x64, 0xFE);

    ArchProcessorIdle();
}

Re:Failing to reboot

Posted: Tue Oct 28, 2003 9:45 am
by HOS
I added code to flush the keyboard controller before doing outportb(0x64, 0xFE) but it still does not restart. the weird thing is, i added code to triple fault the processor (calling a interrupt that doesn't exist like Perica), and the computer hangs when i have the mouse enabled. if i comment out the call to enable the mouse, the computer does restart when it triple faults. so i guess the problem is not just in the restart() function, but maybe i am enabling the mouse badly?? Why would the computer just hang with a black screen and not reboot i wonder?

thanks for your feedback

Re:Failing to reboot

Posted: Tue Oct 28, 2003 9:48 am
by Pype.Clicker
i'm too curious ... i don't think i'll be able to provide more help after you responded, but still ... Do you have a LegacyPS2Mouse (yeah, the one with the small round plug) or an USB mouse with backward compatibility ?

Re:Failing to reboot

Posted: Tue Oct 28, 2003 10:57 am
by HOS
its a real ps/2 mouse, round plug and all :) ...