[Closed]GPF with Grub2
Posted: Thu Apr 05, 2012 7:39 am
Hi,
I decided to use Grub2 instead of Grub few time ago.
I have a strange issue.
My kernel work properly with Grub and with -kernel QEMU option.
If i use the same kernel with Grub2 a GPF fault is raised.
After searching i discovered that it was the return of a system call which was the problem.
I use VIsual C++ 2010 and Cygwin for Grub2.
I tried many things and searched for long time but i have not a begin of an answer.
Does anyone have an idea ?
Thanks
I decided to use Grub2 instead of Grub few time ago.
I have a strange issue.
My kernel work properly with Grub and with -kernel QEMU option.
If i use the same kernel with Grub2 a GPF fault is raised.
After searching i discovered that it was the return of a system call which was the problem.
Code: Select all
void _declspec(naked) VGADriver::VGASyscall()
{
__asm{
cli
push ebp
mov ebp,esp
//sub ebp, 4
pushad
}
// ...
// Some code
// ...
__asm{
//mov al,0x20 //EOI
//out 0x20,al
//out 0xa0,al
sti
popad
pop ebp
iretd // <-------------- here is the problem
}
}
I tried many things and searched for long time but i have not a begin of an answer.
Does anyone have an idea ?
Thanks