qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin O'Connor <kevin@koconnor.net>
To: "Marc Marí" <markmb@redhat.com>
Cc: Juan Quintela <quintela@redhat.com>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	"Gabriel L. Somlo" <somlo@cmu.edu>,
	qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>, Laszlo <lersek@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2] Add optionrom compatible with fw_cfg DMA version
Date: Mon, 18 Jan 2016 12:10:32 -0500	[thread overview]
Message-ID: <20160118171032.GA8162@morn.lan> (raw)
In-Reply-To: <20160118172209.1c165640@markmb_rh>

On Mon, Jan 18, 2016 at 05:22:09PM +0100, Marc Marí wrote:
> On Mon, 18 Jan 2016 14:42:06 +0000
> Stefan Hajnoczi <stefanha@gmail.com> wrote:
> > Was there a technical reason why linuxboot.S cannot be extended
> > (e.g.  a size limit)?
> 
> I don't think there's a technical reason. It is a lot simpler to write
> the fw_cfg DMA stuff in C. To extend linuxboot.S these things should be
> modified:
>  - Add fw_cfg DMA detection support
>  - Change read_fw from a macro to a function that checks for fw_cfg DMA
>    support and does the operation using IO or memory
>  - Extract bits and pieces from linuxboot.S into functions, that are
>    only necessary when there is no support for fw_cfg DMA (the most
>    important is jumping to 32 bits to read and copy the kernel).
> 
> This way, you check for support from the very beggining (when
> configuring the machine), and you don't have to branch the code
> anymore.
> 
> (I think I discussed this with somebody in the past. But I'm not sure
> with whom, or when. So I'll suppose it was a dream and it is not on the
> archives).
> 
> If you really think they should be merged, I'd even propose to
> merge the ASM version onto the C version (convert this patch into
> linuxboot.S). This slightly improves readability.

FYI, if the existing linuxboot.S jumps to 32bit mode just to copy the
kernel then that isn't necessary.  By specification, option roms run
in "big real" mode and thus can directly read/write to the first 4G of
ram.

-Kevin

  reply	other threads:[~2016-01-18 17:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-18  9:59 [Qemu-devel] [PATCH v2] Add optionrom compatible with fw_cfg DMA version Marc Marí
2016-01-18 10:38 ` Paolo Bonzini
2016-01-18 14:42 ` Stefan Hajnoczi
2016-01-18 16:22   ` Marc Marí
2016-01-18 17:10     ` Kevin O'Connor [this message]
2016-01-19 12:11     ` Gerd Hoffmann
2016-01-21 10:02       ` Stefan Hajnoczi

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=20160118171032.GA8162@morn.lan \
    --to=kevin@koconnor.net \
    --cc=kraxel@redhat.com \
    --cc=lersek@redhat.com \
    --cc=markmb@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=somlo@cmu.edu \
    --cc=stefanha@gmail.com \
    --cc=stefanha@redhat.com \
    /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).