From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HP5fR-0003hj-Lh for qemu-devel@nongnu.org; Wed, 07 Mar 2007 18:35:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HP5fP-0003e7-KY for qemu-devel@nongnu.org; Wed, 07 Mar 2007 18:35:33 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HP5fP-0003dn-Gy for qemu-devel@nongnu.org; Wed, 07 Mar 2007 18:35:31 -0500 Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HP5fG-0004SG-6B for qemu-devel@nongnu.org; Wed, 07 Mar 2007 18:35:22 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HP5f8-00075W-S5 for qemu-devel@nongnu.org; Thu, 08 Mar 2007 00:35:14 +0100 Received: from vserver.cs.uit.no ([129.242.19.132]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Mar 2007 00:35:14 +0100 Received: from frodef by vserver.cs.uit.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Mar 2007 00:35:14 +0100 From: Frode Vatvedt Fjeld Message-ID: <2h8xe8zl59.fsf@vserver.cs.uit.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: news Subject: [Qemu-devel] Floppy geometry detection and INT 13,8 Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Wed, 07 Mar 2007 23:35:33 -0000 To: qemu-devel@nongnu.org I stumbled upon a problem when trying to get Qemu to boot my homebrew kernel image. For certain sizes of floppy image files, the (still homebrew) bootloader failed to load the kernel properly. After quite a bit of searching, I believe I pinned the problem down to the fact that Qemu tries to adjust the geometry of the floppy to the size of the image file. The kernel loaded fine when the floppy geometry was determined to be "1.44 MB 3"1/2 floppy disk (2 h 80 t 18 s) rw", while it failed miserably when it was detected as "880 kB 5"1/4 floppy disk (2 h 80 t 11 s) rw". (The change was triggered by a tiny change in file-size.) I expected Qemu to emulate the 1.44 MB standard geometry regardless, so this was quite surprising. I'd like to suggest that it would be better to base the floppy geometry on user configuration rather than auto-detection, because this can cause surprising behaviour and confusion. However, when I tried to take this variable floppy geometry into account in my bootloader, by using the in 13,8 BIOS service, it didn't work. This service reports 15 sectors/track rather than 11 as stated above. Also, when I read the floppy (using in 13,2), it behaves consistently with 11 sectors/track. So I'm unable to write a bootloader that works with Qemu. This appears to me to be a bug in Qemu, although I am no expert in how these BIOS services are supposed to work. Regards, -- Frode Vatvedt Fjeld