[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in
From: |
Roman Kagan |
Subject: |
Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT |
Date: |
Wed, 10 Feb 2016 19:57:42 +0300 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Tue, Feb 09, 2016 at 11:22:01AM -0500, John Snow wrote:
> > I don't. At the time the patch was developed there basically were no
> > mechanisms to update the geometry at all (and this was what you patchset
> > addressed, in particular, wasn't it?) so I didn't care.
>
> That's not true.
>
> You could swap different 1.44MB-class diskettes for other geometries,
> check this out:
>
> static const FDFormat fd_formats[] = {
> /* First entry is default format */
> /* 1.44 MB 3"1/2 floppy disks */
> { FDRIVE_DRV_144, 18, 80, 1, FDRIVE_RATE_500K, },
> { FDRIVE_DRV_144, 20, 80, 1, FDRIVE_RATE_500K, },
> { FDRIVE_DRV_144, 21, 80, 1, FDRIVE_RATE_500K, },
> { FDRIVE_DRV_144, 21, 82, 1, FDRIVE_RATE_500K, },
> { FDRIVE_DRV_144, 21, 83, 1, FDRIVE_RATE_500K, },
> { FDRIVE_DRV_144, 22, 80, 1, FDRIVE_RATE_500K, },
> { FDRIVE_DRV_144, 23, 80, 1, FDRIVE_RATE_500K, },
> { FDRIVE_DRV_144, 24, 80, 1, FDRIVE_RATE_500K, },
> ...
>
> You absolutely could get different sector and track counts before my
> patchset.
Indeed (sorry the patch was developed a couple of months ago so I had to
look at the code to refresh my memory).
However, I tried to implement the part of ACPI spec that read
> 9.9.2 _FDI (Floppy Disk Information)
> ====================================
> This object returns information about a floppy disk drive. This
> information is the same as that returned by the INT 13 Function 08H on
> IA-PCs.
so I went ahead and looked into what SeaBIOS did for int 0x13/0x08. And
what it did was read the CMOS at 0x10 and obtain the drive type, and
then return a hardcoded set of parameters (including geometry)
associated to that drive type. So this was what I basically did here,
too. (As a matter of fact the first patch I submitted was just pure ASL
which mimicked exactly the SeaBIOS behavior: read the CMOS and return
the corresponding Package with parameters.)
And IIRC the drive type couldn't change at runtime so I thought I wasn't
doing worse than it was.
As for what to do now, I'll try to check how tolerant the guests are of
changing the floppy geometry under them without updating _FDI, and then
decide.
Roman.
- Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT, (continued)
- Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT, Michael S. Tsirkin, 2016/02/10
- Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT, Roman Kagan, 2016/02/10
- Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT, Roman Kagan, 2016/02/10
- Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT, John Snow, 2016/02/10
- Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT, Roman Kagan, 2016/02/10
- Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT, John Snow, 2016/02/10
- Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT, Kevin O'Connor, 2016/02/13
- Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT, Laszlo Ersek, 2016/02/14
- Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT, Michael S. Tsirkin, 2016/02/14
- Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT, Roman Kagan, 2016/02/17
- Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT,
Roman Kagan <=
[Qemu-devel] [PULL 47/49] expose floppy drive geometry and CMOS type, Michael S. Tsirkin, 2016/02/04
[Qemu-devel] [PULL 49/49] acpi: update expected DSDT, Michael S. Tsirkin, 2016/02/04
Re: [Qemu-devel] [PULL 00/49] pc and misc cleanups and fixes, virtio optimizations, Peter Maydell, 2016/02/05