[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
stop_floppy produces a 'floppy0: no floppy controllers found' message
From: |
Frank van Dreumel |
Subject: |
stop_floppy produces a 'floppy0: no floppy controllers found' message |
Date: |
Wed, 25 Sep 2002 01:49:09 +0200 |
Some time ago I bought an Asus P4T-E motherboard (a Socket 478 P4
motherboard with the Intel 850 Chipset). When I tried to boot linux by
means of syslinux or by writing a kernel directly to floppy, I got the
following message during startup:
--8<------
Floppy drive(s): fd0 is 1.44M
floppy0: no floppy controllers found
--8<------
The result being that my floppy drive was nowhere to be found. After some
extensive searching on the internet I found a solution for my problem. For
syslinux the problem could be solved by applying the following patch:
--8<------
diff -Nur syslinux-1.52/ldlinux.asm syslinux-1.52/ldlinux.asm
--- syslinux-1.52/ldlinux.asm
+++ syslinux-1.52/ldlinux.asm
@@ -2195,9 +2195,15 @@
; at least bootsect.S seems to imply so
;
kill_motor:
+%if 1
+ xor ax,ax
+ xor dx,dx
+ int 13h
+%else
mov dx,03F2h
xor al,al
call slow_out
+%endif
;
; If we're debugging, wait for a keypress so we can read any debug
messages
;
--8<------
For the kernel the problem could be solved by applying the following patch:
--8<------
diff -Nur linux/arch/i386/boot/bootsect.S linux/arch/i386/boot/bootsect.S
--- linux/arch/i386/boot/bootsect.S
+++ linux/arch/i386/boot/bootsect.S
@@ -395,9 +395,15 @@
# NOTE: Doesn't save %ax or %dx; do it yourself if you need to.
kill_motor:
+#if 1
+ xorw %ax, %ax # reset FDC
+ xorb %dl, %dl
+ int $0x13
+#else
movw $0x3f2, %dx
xorb %al, %al
outb %al, %dx
+#endif
ret
sectors: .word 0
--8<------
And when all goes well I get the following message during startup:
--8<------
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
--8<------
To solve the 1024 cylinder boundary limitation of lilo, I gave grub a try
and again my floppy controller went crazy. Having seen this problem before
I tracked down the problem to the following piece of code in
grub-0.9x/stage2/asm.S:
/*
* stop_floppy()
*
* Stops the floppy drive from spinning, so that other software is
* jumped to with a known state.
*/
ENTRY(stop_floppy)
movw $0x3F2, %dx
xorb %al, %al
outb %al, %dx
ret
Applying the following changes won't solve the problem (my floppy
controller still goes crazy):
/*
* stop_floppy()
*
* Stops the floppy drive from spinning, so that other software is
* jumped to with a known state.
*/
ENTRY(stop_floppy)
- movw $0x3F2, %dx
- xorb %al, %al
- outb %al, %dx
+ xorw %ax, %ax
+ xorb %dl, %dl
+ int $0x13
ret
But applying the following changes will:
/*
* stop_floppy()
*
* Stops the floppy drive from spinning, so that other software is
* jumped to with a known state.
*/
ENTRY(stop_floppy)
- movw $0x3F2, %dx
- xorb %al, %al
- outb %al, %dx
ret
But in this case there is no point in having stop_floppy around, which
clearly can't be the correct solution. Obviously this is a rather critical
bug/feature, since it results in not being able to access my floppy disc
after booting in this way. I know it is specific to my P4T-E motherboard
because exactly the same configuration with an Asus A7V-133 or Asus A7V-266
or Asus A7V-333 motherboard instead of my P4T-E motherboard works without a
problem with both the patched and the original syslinux / kernel.
I hope I described the problem clearly enough, but if not, I'm happy to
shed more light on the problem. If you find a (possible) solution, I'll be
happy to test it on my P4T-E motherboard.
Greetz,
Frank van Dreumel
--
There are only 10 types of people in the world,
those who understand binary and those who don't
- stop_floppy produces a 'floppy0: no floppy controllers found' message,
Frank van Dreumel <=