Page 1 of 1
floppy re calibration not getting irq6
Posted: Wed Nov 11, 2020 4:07 am
by ITchimp
In the init_floppy routine, trying to re-calibrate... I am using the first drive...
so I send the cmd and drive # to the FDC, got stuck in the infinite loop that is
supposed to exit upon irq6 interrupt... what could go wrong here?
Re: floppy re calibration not getting irq6
Posted: Wed Nov 11, 2020 11:43 am
by nullplan
ITchimp wrote:what could go wrong here?
Anything that can go wrong with IRQs normally: IRQ not enabled in the sender, IRQ masked in the PIC/APIC, interrupt flag not set, IDTR points to Nirvana, IDT gate for the interrupt is garbled. Try to exclude some of these possibilities (e.g. if IDTR was set wrong, then no other interrupt would work, either).
Re: floppy re calibration not getting irq6
Posted: Thu Nov 12, 2020 2:41 am
by ITchimp
I have made a few checks. eflag's irq enable bit is on...
also the previous times the interrupt and irq routine works... (as I reset FDC by
writing a zero to DOR)...
any suggestions??
My code snippet below, I got stuck in the while loop
Code: Select all
int st0, cy1;
floppy_motor(1);
print("start the timer \n");
//magic();
//exec(run_floppy_timer);
int i=0;
for (i=0;i<10;i++){
floppy_write_cmd(RECALIBERATE); // 7
floppy_write_cmd(1); // select first drive
//irq6 = 1;
//sti();
while(irq6);