qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] fdc: fix MAX_FD probelm


From: Natalia Portillo
Subject: Re: [Qemu-devel] [PATCH] fdc: fix MAX_FD probelm
Date: Tue, 15 Sep 2009 13:32:43 +0100

There has never been autodetection.

I can check for it if you want in IBM PC original BIOS' source code.

When the user tried to access a drive, simply the BIOS said that the drive does not answer.

Newer BIOS started to do a seek to check if drive is present and working, on seek fail, drive fails.

But it is hardcoded, if you put in the BIOS configuration that there is a second drive and there is none, the BIOS will indeed do a seek, fail, indicate the drive fails, but inform the operating system, there is a second drive in the system.

You can just check in any modern BIOS, disconnect any floppy drive, select in BIOS you have a 5.25" drive (or the oldest it can) and A: will appear on Windows showing you exactly that drive.

El 13/09/2009, a las 16:42, TAKEDA, toshiya escribió:

Dear Stuart and members,

On Sun, Sep 13, 2009 at 07:07:12PM +0900, 武田 俊也 wrote:
I added "connected" t fdrive_t to show physical drive is connected or not
and it is initialized in fdctrl_connect_drives().

This is new patch.

Neat. :-)

I'm still slightly concerned that for machines with MAX_PHYSICAL_DRIVES set to 2, guests would see drives 2 and 3 as present, but with no disk inserted. Previously, though, I expect they would have been mirrors of
drives 0 and 1, which is obviously worse!

FD_DOR_SELMASK is not affected by MAX_PHYSICAL_DRIVES and is fixed to 3,
so I think drive 2 and 3 are not recognized as the mirror of 0 and 1.

Because MAX_PHYSICAL_DRIVES == 2, drives[2 or 3]->bs is always null,
but it may be same as drives[0 or 1] with no diskette inserted.

I don't know how PC/AT BIOS detects the physical drive existance.
In PC-98x1 family case, BIOS executes 4 recalib commands for each drives
and check the results of sence interrupt status commands to detect
which drives are connected and power-on.
(PC-98 BIOS also check the results of sence drive status command to
detect the diskette is inserted.)

If it is similar to PC/AT case, it is the problem of fdc commands.
Now fdrive_t has the flag "connected", so we needed to fix
the sence interrupt status command that it checks "connected" flag
and changes the results.
(We may need to fix other commands in the same way.)
But I need time to investigate the real fdc behaviors on my pc.

Well, I also think it is better the user can select the physical drive
number, not only 2 but 0, 1 and 3.
But it will require the large scale patch, for example the block and
qemu option commands.

In this patch, I hope I fix only the mirror problem of drive 2 and 3,
and add "connect" flag that will help specifying several physical
drive number in future.
And I hope other 2 itmes are for another patch.

If this patch is acceptable for commit, I will reimplement PC-09 patch
based on it and in this time I hope I can fix the sence interrupt status.

Thanks,
TAKEDA, toshiya

Cheers,
--
Stuart Brady










reply via email to

[Prev in Thread] Current Thread [Next in Thread]