From: Fabrice Bellard <fabrice@bellard.org>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Better floppy disk support
Date: Wed, 12 May 2004 22:33:11 +0200 [thread overview]
Message-ID: <40A28A07.4080706@bellard.org> (raw)
In-Reply-To: <40A0E16D.6080400@easynet.be>
Mark Jonckheere wrote:
> I propose some patches for better floppy disk support:
>
> 1. To make "tomsrtbt-2.0.103.ElTorito.288.img" bootable.
>
> The first one is in fdc.c. It removes the test in fd_init(), since it
> always forces the disk type to 1.44 MB, It is better to give the first
> call to fd_revalidate() a chance to decide if it is a 1.44 or 2.88 drive.
This is incorrect as the BIOS configuration will be invalid. I think it
is better to probe the disk image size in fd_init (just to select
between 1.44 and 2.88 drives).
> 2. To make my standalone chntpw-disk bootable (google for bd000607.zip).
>
> Booting from bd000607.img gives a segmentation error. It seems that the
> bootcode on this floppy (syslinux-ldlinux) does a word-length (16-bit)
> INW at address 0x80 which was translated by function default_ioport_readw()
> in a call to default_ioport_readb(NULL, 0x80) and read_page(NULL, 0x81).
> The second function (in dma.c) needs a (dma_cont *) pointer as its first
> parameter and segfaults when it tries to dereference the NULL-pointer.
>
> To avoid this problem with word-length io-reads to two adjacent io-ports
> from different or undefined devices it is best to translate it into two
> readb calls each with its own opaque value. The function
> default_ioport_readw()
> is not the most logical place for doing this, it is better to do this
> upstream in the function cpu_inw().
>
> I modified cpu_inw() and cpu_outw(), but the same problem could also
> happen with cpu_inl() and cpu_outl().
I have commited a slightly different patch (your patch breaks 16 bit
I/Os and is too slow).
> 3. To accept "--nics 0" as a legal argument.
>
> Sometimes it can be usefull to install software without ethernet support.
> I made a minor modification to accept 0 as a legal value for the argument
> --nics. Since the default value remains 1, nothing changes for current
> usage.
OK.
Fabrice.
prev parent reply other threads:[~2004-05-12 20:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-11 14:21 [Qemu-devel] Better floppy disk support Mark Jonckheere
2004-05-12 20:33 ` Fabrice Bellard [this message]
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=40A28A07.4080706@bellard.org \
--to=fabrice@bellard.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.