qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Frode Vatvedt Fjeld <frodef@cs.uit.no>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Floppy geometry detection and INT 13,8
Date: Wed, 07 Mar 2007 23:35:33 -0000	[thread overview]
Message-ID: <2h8xe8zl59.fsf@vserver.cs.uit.no> (raw)

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

                 reply	other threads:[~2007-03-07 23:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2h8xe8zl59.fsf@vserver.cs.uit.no \
    --to=frodef@cs.uit.no \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).