Tips for random disk lockups
Posted: Fri Sep 21, 2007 9:31 pm
I would think that just about all of us have run into random disk lockups at one time or another as we build our OSes? I did a search, but couldn't find any threads giving suggestions on any of the (millions, of course) things that could be wrong. -- But I thought that such a thread might give future users (or even me!) a glimmer of an idea of what might be wrong when we run into the problem (again).
I can even give one tip that hung me up for a bit, a few months ago: I didn't realize back then that I needed to wait for an interrupt, (or alternately for the "busy" flag to clear) -- in between EVERY SINGLE sector that I was reading or writing in PIO mode. I was under the impression that once I issued the command, I'd have to wait for the disk to become ready, and then the whole thing would be streamed in one gulp ... silly, I know.
But now I've run into it again. I just moved from Bochs (where everything was running perfectly) onto *gasp* real hardware. And now I get random disk lockups -- it seems after about 10 or 20 reads/writes.
So: I'd love to hear some examples of what caused disk lockups for all the rest of you, and maybe it'll shorten my debugging time. I hate debugging random stuff.
I can even give one tip that hung me up for a bit, a few months ago: I didn't realize back then that I needed to wait for an interrupt, (or alternately for the "busy" flag to clear) -- in between EVERY SINGLE sector that I was reading or writing in PIO mode. I was under the impression that once I issued the command, I'd have to wait for the disk to become ready, and then the whole thing would be streamed in one gulp ... silly, I know.
But now I've run into it again. I just moved from Bochs (where everything was running perfectly) onto *gasp* real hardware. And now I get random disk lockups -- it seems after about 10 or 20 reads/writes.
So: I'd love to hear some examples of what caused disk lockups for all the rest of you, and maybe it'll shorten my debugging time. I hate debugging random stuff.