Page 1 of 1

Implementing Reboot System call for Long mode

Posted: Sat Apr 16, 2011 12:34 pm
by rchandel
I am implementing Reboot System call, kernel is in Long mode(x86_64).

Code: Select all

Reboot:
    in   $0x64, %al
    test $0x2, %al
    jne Reboot
    mov  $0xFE, %al
    out %al, $0x64
    jmp Reboot
    sysretq
On calling reboot following error is occurring:
09 General Page fault: Coprocessor Segment Overrun exception;

what I am doing wrong here?

This method is suggested here at http://wiki.osdev.org/Reboot

Any suggestions?

Re: Implementing Reboot System call for Long mode

Posted: Mon Apr 18, 2011 12:57 pm
by rchandel
Above Reboot code is working fine on AMD SimNow Emulator.
But it is not working on QEMU emulator; I am not able to figure it out yet.