If I send RESET OR RECALIBRATE command to FDC seperately, the interrupt can be received normally.
But if I first send RESET, and then send RECALIBRATE command to FDC, only one interrupt can be received.
I think 2 interrupts should be received during this proceduce.(one is for RESET command, one is for RECALIBRATE command.)
I set the trap gate type for floppy's interrupt and I also found the behaviors of the following virtual machines are different.
Virtual BOX1.6 : ONLY received the interrupt triggered by RESET command
Qemu manager3.0: ONLY received the interrupt triggered by RESET command
Bochs2.3.6 : ONLY received the interrupt triggered by RECALIBRATE command
Can anybody give me some ideas about this problem? I just only want to reset the FDC.
floppy driver problem(interrupt), pls give me some advise
Re: floppy driver problem(interrupt), pls give me some advise
Hi,
Are you waiting between commands, or are you hammering the FDC with commands at full speed? The FDC is legacy and I believe you need to wait for the interrupt for the first command before sending the second command (or put in some kind of delay - say 200msec).
Cheers,
Adam
Are you waiting between commands, or are you hammering the FDC with commands at full speed? The FDC is legacy and I believe you need to wait for the interrupt for the first command before sending the second command (or put in some kind of delay - say 200msec).
Cheers,
Adam
Re: floppy driver problem(interrupt), pls give me some advise
I think we can safely assume the FDC does not like to get more then one command at a time. Isn't there some busy bit or something one can check to see if sending a command is safe?AJ wrote:The FDC is legacy
JAL
Re: floppy driver problem(interrupt), pls give me some advise
Hi AJ, jal
I add some delay between two commands. The sequences are as follows:
1. send RESET command to FDC
2. send OK
3. receive interrupt, handle interrupt(namely, send SENSEI command to FDC, get 2 result bytes, send SPECIFY command to FDC)
4. interrupt handle OK
5. wait about 1s
mov ecx, 0xFFFFFF
.loop:
dec ecx
nop
nop
nop
nop
cmp ecx, 0
jne .loop
6. re-send RESET command to FDC
7. NOTHING happen
I'll continue to try to find where the problem is located.
Thanks anyway.
I add some delay between two commands. The sequences are as follows:
1. send RESET command to FDC
2. send OK
3. receive interrupt, handle interrupt(namely, send SENSEI command to FDC, get 2 result bytes, send SPECIFY command to FDC)
4. interrupt handle OK
5. wait about 1s
mov ecx, 0xFFFFFF
.loop:
dec ecx
nop
nop
nop
nop
cmp ecx, 0
jne .loop
6. re-send RESET command to FDC
7. NOTHING happen
I'll continue to try to find where the problem is located.
Thanks anyway.
Re: floppy driver problem(interrupt), pls give me some advise
Thanks Dex.
The problem has just been solved.
I forgot send EOI to 8259a and I found floppy controller is very sensitive about time delay which I always ignore.(Here, also thanks Adam
and JAL's reminder.)
BTW, DexOS is cool.
The problem has just been solved.
I forgot send EOI to 8259a and I found floppy controller is very sensitive about time delay which I always ignore.(Here, also thanks Adam
and JAL's reminder.)
BTW, DexOS is cool.