Enabling interrupts for an ATA hard disk?
Posted: Wed May 13, 2009 4:13 pm
RESOLVED:
Well, this site has been a great resource. Being a newbie to device programming the task of completing a hard disk driver in just a few short weeks was quite a daunting task. I apparently had a few problems, the main of which was that I did indeed keep reading the status register instead of the alternate status register. I now am getting interrupts and my disk driver is finally starting to take shape.
---
Hello all!
Well, in school we are developing a small operating system, and I am working on a hard disk driver. This is my first time working with a device this complex (last quarter we programmed a serial IO device). Anyway, so far I have found my IDE controller in the PCI bus and my next step is to get interrupts going for the hard disk so that I can test my service routines.
Now, I am hoping someone can quickly go through the usual steps needed for an operating system to initialize an ATA hard disk for use. For example, I believe this initialization will involve either a software or hardware reset. I will go into more detail about my project if required, but I was hoping that someone with experience in this area could point me in the right direction.
Also, I should mention that I was able to get interrupts for the secondary IDE device, which is a CDROM by setting the SRST bit in the device control register. However, my goal is to work with the hard disk on the primary IDE channel.
Thanks for looking!
Well, this site has been a great resource. Being a newbie to device programming the task of completing a hard disk driver in just a few short weeks was quite a daunting task. I apparently had a few problems, the main of which was that I did indeed keep reading the status register instead of the alternate status register. I now am getting interrupts and my disk driver is finally starting to take shape.
---
Hello all!
Well, in school we are developing a small operating system, and I am working on a hard disk driver. This is my first time working with a device this complex (last quarter we programmed a serial IO device). Anyway, so far I have found my IDE controller in the PCI bus and my next step is to get interrupts going for the hard disk so that I can test my service routines.
Now, I am hoping someone can quickly go through the usual steps needed for an operating system to initialize an ATA hard disk for use. For example, I believe this initialization will involve either a software or hardware reset. I will go into more detail about my project if required, but I was hoping that someone with experience in this area could point me in the right direction.
Also, I should mention that I was able to get interrupts for the secondary IDE device, which is a CDROM by setting the SRST bit in the device control register. However, my goal is to work with the hard disk on the primary IDE channel.
Thanks for looking!