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