Failing to reboot

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
HOS

Failing to reboot

Post 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
Perica
Member
Member
Posts: 454
Joined: Sat Nov 25, 2006 12:50 am

Re:Failing to reboot

Post by Perica »

..
Last edited by Perica on Sun Dec 03, 2006 9:22 pm, edited 1 time in total.
Tim

Re:Failing to reboot

Post 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();
}
HOS

Re:Failing to reboot

Post 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
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Failing to reboot

Post 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 ?
HOS

Re:Failing to reboot

Post by HOS »

its a real ps/2 mouse, round plug and all :) ...
Post Reply