Implementing Reboot System call for Long mode
Posted: Sat Apr 16, 2011 12:34 pm
I am implementing Reboot System call, kernel is in Long mode(x86_64).
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?
Code: Select all
Reboot:
in $0x64, %al
test $0x2, %al
jne Reboot
mov $0xFE, %al
out %al, $0x64
jmp Reboot
sysretq
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?