IDE controller trouble

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
mr0b

IDE controller trouble

Post by mr0b »

For the past couple of days, i've been trying to get the ide controller to send an IRQ.

The Primary IDE controller IRQ is enabled on the second PIC.
The nIEN bit in the Device control register is set to 0.
After sending the identify command(either 0xEC for the hard drive, or 0xa1 for the cd drive), once the controller prepares the 256 words for the transfer, i STILL get no interrupt.

Am i, perhaps, forgetting something? Or is it just VMware?

Cheers, mr0b
durand
Member
Member
Posts: 193
Joined: Wed Dec 21, 2005 12:00 am
Location: South Africa
Contact:

Re:IDE controller trouble

Post by durand »

It could well be VMWare. It has a lot of little problems which only show up when people like OS developers are messing with it. Have you tried testing on real hardware? (particularly with the kbd. arg :-\ )

And, of course:

1. are interrupts enabled and mapped correctly?
2. are IRQ's mapped correctly?
3. Is IRQ2 unmasked?
4. Are your IDE irq's unmasked? (14 and 15, right?)
mr0b

Re:IDE controller trouble

Post by mr0b »

-The interrupts aren't the problem here...
-The IRQs are mapped(am using the keyboard and timer)
-What do you mean by "IRQ2 unmasked"?
-Yeah, the IRQ14 is unmasked

-Haven't tested it on real harwdare. I'll go buy a bunch of CD-RWs for the testing later today.
durand
Member
Member
Posts: 193
Joined: Wed Dec 21, 2005 12:00 am
Location: South Africa
Contact:

Re:IDE controller trouble

Post by durand »

IRQ2 is the cascading IRQ. The PIC controllers are actually daisy-chained and if a high IRQ occurs (8-15), then the second PIC controller signals this to the system by signalling IRQ2. You won't receive an IRQ2, just the originating IRQ14. However, if IRQ2 is masked, then your higher IRQ's won't be seen by the CPU.

So, you need to have IRQ2 unmasked if you want to receive any IRQ's from the second controller.
mr0b

Re:IDE controller trouble

Post by mr0b »

You were right, IRQ2 was masked.

Thanks durand ;D
Post Reply