qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] Add optionrom compatible with fw_cfg DMA ver


From: Kevin O'Connor
Subject: Re: [Qemu-devel] [PATCH v2] Add optionrom compatible with fw_cfg DMA version
Date: Mon, 18 Jan 2016 12:10:32 -0500
User-agent: Mutt/1.5.24 (2015-08-30)

On Mon, Jan 18, 2016 at 05:22:09PM +0100, Marc Marí wrote:
> On Mon, 18 Jan 2016 14:42:06 +0000
> Stefan Hajnoczi <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]