ATA PIO: on 0x1F7 command General Protection Fault
Posted: Fri May 04, 2007 5:56 pm
Hi, it seems i do have a very strange problem here.
For a time i've been trying to code a basic ata driver.
I did read many documentation and example source codes.
I'm working on qemu.
The strange problem is that when i write to command register 0x1F7 of primary controller, - any value - i just get a General Protection Fault.
I do have a basicly working kernel. Do have gdt, idt, keyboard, console, timer etc stuff. Everything seems to work very well except this.
Tried many different things but no success.
outportb(0x1f7, 0x20);
outportb(0x1f7, 0xec);
etc... whenever i do try to put a byte on port 0x1f7 i do get the GPF.
Anyone did already meet this situation before?
In my last try i did ported this code;
http://www.osdev.org/phpBB2/viewtopic.p ... hlight=lba
Before did try many other example codes too but doesn't change..
I can provide specific code details if requested.
Thanks, Hüseyin
For a time i've been trying to code a basic ata driver.
I did read many documentation and example source codes.
I'm working on qemu.
The strange problem is that when i write to command register 0x1F7 of primary controller, - any value - i just get a General Protection Fault.
I do have a basicly working kernel. Do have gdt, idt, keyboard, console, timer etc stuff. Everything seems to work very well except this.
Tried many different things but no success.
outportb(0x1f7, 0x20);
outportb(0x1f7, 0xec);
etc... whenever i do try to put a byte on port 0x1f7 i do get the GPF.
Anyone did already meet this situation before?
In my last try i did ported this code;
http://www.osdev.org/phpBB2/viewtopic.p ... hlight=lba
Before did try many other example codes too but doesn't change..
I can provide specific code details if requested.
Thanks, Hüseyin