qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Floppy geometry
@ 2007-03-11 15:15 Frode Vatvedt Fjeld
  0 siblings, 0 replies; only message in thread
From: Frode Vatvedt Fjeld @ 2007-03-11 15:15 UTC (permalink / raw)
  To: qemu-devel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-03-11 15:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-11 15:15 [Qemu-devel] Floppy geometry Frode Vatvedt Fjeld

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).