Subject: Re: Floppy - weird behaviour?
To: hypno <hypno@alpha.evilworks.com>
From: Perry E. Metzger <perry@piermont.com>
List: port-i386
Date: 02/05/2003 15:56:19
hypno <hypno@alpha.evilworks.com> writes:
> is the correct behaviour for the floppy to continue running the floppy
> motor after a boot into the kernel?
> after the fdc initialization it turns itself off.
The machine has no way of knowing it should turn off the floppy motor
until it attaches the floppy controller. The boot blocks should turn
off the floppy drive before starting the system -- indeed, I thought
they did. This is probably something David Laight could do as he is
fixing the boot blocks up.
I fixed a related bug many years ago, btw, which was that the system
did not turn off the floppy motor if it was rebooted while the motor
was on. (I fixed this with a shutdown hook.)
> this:
> movl $0x3f2,%edx
> movb $0x0c,%al
> outb %al,%dx
>
> in locore.S did the trick for me ...
Simply putting code in locore.S will not properly fix this -- locore
cannot properly make assumptions about devices that might not be in
particular locations. There might be something entirely different at
that location on someone else's box.
Perry