RE: [Geekos-devel] Re: IDE driver details
Status: Pre-Alpha
Brought to you by:
daveho
From: Vishal S. <vis...@ho...> - 2002-01-29 21:56:26
|
Hi, I need a calibrated delay of approx. 400ns for communicating with IDE drives. There are two possible options. Use timer interrupts: I can use them if they are not going to be used by any other components of the kernel. This also is not a good idea because we frequently need to wait for 400ns in IDE -drive communication. This will increase the number of interrupts. Probably couple of them each time u try to access a sector. Second is to use loop with NOP's in it and execute it to get approximately a 400nsecond delay. For eg. if NOP takes 4 clock cycles and my clock has 100ns duty cycle I can get 400ns delay by putting 4 NOP in my delay loop. This works fine if we assume all processors have 100ns clock duty cycle...but this not the case because different versions of Intel/AMD processors have different speeds. If you guys have any Ideas regarding this let me know?? I will try to look into Linux source reference how they handle such situations. I know Linux uses something called BogoMIPS. But I am not sure how it works. Let me know if you guys have some other amazing ideas to handle this situation Thanks, Vishal |