From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33437) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTY5h-0006P4-Dq for qemu-devel@nongnu.org; Wed, 10 Feb 2016 11:58:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTY5b-0002V3-S3 for qemu-devel@nongnu.org; Wed, 10 Feb 2016 11:58:09 -0500 Received: from mx2.parallels.com ([199.115.105.18]:33536) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTY5b-0002U2-Lj for qemu-devel@nongnu.org; Wed, 10 Feb 2016 11:58:03 -0500 Date: Wed, 10 Feb 2016 19:57:42 +0300 From: Roman Kagan Message-ID: <20160210165741.GF9169@rkaganb.sw.ru> References: <1454612376-7072-1-git-send-email-mst@redhat.com> <1454612376-7072-49-git-send-email-mst@redhat.com> <20160205192507.41fc6024@nial.brq.redhat.com> <20160208131443.GC6420@rkaganb.sw.ru> <56B8F89F.3090603@redhat.com> <20160209155249.GA13787@rkaganb.sw.ru> <56BA1229.8090809@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <56BA1229.8090809@redhat.com> Subject: Re: [Qemu-devel] [PULL 48/49] i386: populate floppy drive information in DSDT List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: Peter Maydell , Eduardo Habkost , "Michael S. Tsirkin" , qemu-devel@nongnu.org, Paolo Bonzini , Igor Mammedov , Richard Henderson 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.