http://www.nondot.org/sabre/os/files/Disk/IDE-tech.html
and i have read taht one of the first things i need to do is issue the Identify Drive command. so i assume by looking at those specs, i need to do something similar to:
Code: Select all
oubportb(0x1f6, 0xb0); // selects drive 0
outportb(0x1f7, 0xec); //identify drive command
my question is...1. i assume i need to have the IDE irq interrupt handlers read from the sector buffer whenever the irq is triggered. but where do i read the data from. where is this 'sector buffer' that the document speaks of.
i do see the Read buffer command (0xe4), so i assume i need to use that? it says that also will set BUSY, then set up the sector buffer for a read, set DRQ, clear BUSY, and generate an interrupt.
So i would have 2 interrupts generated in order to read the info from the Identify Drive command? and even after executing the read buffer command...i still don't know where i read in the data in the sector buffer. all the read buffer command says is that i can read up to 512bytes from the sector buffer? i am sorry if this is a bit of a ramble. thanks for any help in advance. :)