From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43541) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTYdv-0006xI-Aw for qemu-devel@nongnu.org; Wed, 10 Feb 2016 12:33:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTYds-0002vC-2K for qemu-devel@nongnu.org; Wed, 10 Feb 2016 12:33:31 -0500 Received: from mx2.parallels.com ([199.115.105.18]:32853) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTYdr-0002v4-SA for qemu-devel@nongnu.org; Wed, 10 Feb 2016 12:33:27 -0500 Date: Wed, 10 Feb 2016 20:33:14 +0300 From: Roman Kagan Message-ID: <20160210173313.GI9169@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> <56BA319C.9010505@redhat.com> <20160210171018.GG9169@rkaganb.sw.ru> <56BB7070.90002@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <56BB7070.90002@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 , Laszlo Ersek , Richard Henderson On Wed, Feb 10, 2016 at 12:16:32PM -0500, John Snow wrote: > On 02/10/2016 12:10 PM, Roman Kagan wrote: > > Well, as I wrote in another mail, SeaBIOS, which is supposed to provide > > the same information to int 0x13/0x08, populates it with static data > > based only on the drive type as encoded in CMOS at initialization time, > > and everyone seem to have been fine with that so far. I'll need to > > re-test it with real Windows guests, though. > > > > OK, but what we appear to be doing currently is polling the current > geometry values for a drive instead of some pre-chosen ones based on the > drive type. > > What values does SeaBIOS use? (Can you point me to the table it uses?) src/hw/floppy.c: struct floppyinfo_s FloppyInfo[] VARFSEG = { // Unknown { {0, 0, 0}, 0x00, 0x00}, // 1 - 360KB, 5.25" - 2 heads, 40 tracks, 9 sectors { {2, 40, 9}, FLOPPY_SIZE_525, FLOPPY_RATE_300K}, // 2 - 1.2MB, 5.25" - 2 heads, 80 tracks, 15 sectors { {2, 80, 15}, FLOPPY_SIZE_525, FLOPPY_RATE_500K}, // 3 - 720KB, 3.5" - 2 heads, 80 tracks, 9 sectors { {2, 80, 9}, FLOPPY_SIZE_350, FLOPPY_RATE_250K}, // 4 - 1.44MB, 3.5" - 2 heads, 80 tracks, 18 sectors { {2, 80, 18}, FLOPPY_SIZE_350, FLOPPY_RATE_500K}, // 5 - 2.88MB, 3.5" - 2 heads, 80 tracks, 36 sectors { {2, 80, 36}, FLOPPY_SIZE_350, FLOPPY_RATE_1M}, // 6 - 160k, 5.25" - 1 heads, 40 tracks, 8 sectors { {1, 40, 8}, FLOPPY_SIZE_525, FLOPPY_RATE_250K}, // 7 - 180k, 5.25" - 1 heads, 40 tracks, 9 sectors { {1, 40, 9}, FLOPPY_SIZE_525, FLOPPY_RATE_300K}, // 8 - 320k, 5.25" - 2 heads, 40 tracks, 8 sectors { {2, 40, 8}, FLOPPY_SIZE_525, FLOPPY_RATE_250K}, }; The array is indexed by the floppy drive type from CMOS Roman.