qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC 6/7] Add offset register to fw_cfg DMA interface


From: Kevin O'Connor
Subject: Re: [Qemu-devel] [RFC 6/7] Add offset register to fw_cfg DMA interface
Date: Tue, 21 Jul 2015 16:16:43 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

On Tue, Jul 21, 2015 at 10:06:51PM +0200, Laszlo Ersek wrote:
> On 07/21/15 18:26, Stefan Hajnoczi wrote:
> > On Tue, Jul 21, 2015 at 5:03 PM, Marc Marí <address@hidden> wrote:
> >> Signed-off-by: Marc Marí <address@hidden>
> >> ---
> >>  hw/nvram/fw_cfg.c | 19 ++++++++++++++++---
> >>  1 file changed, 16 insertions(+), 3 deletions(-)
> > 
> > No commit description, no docs/specs/fw_cfg.txt documentation.
> 
> Yes, those would be nice.
> 
> Also, I think this patch should be squashed into the main fw_cfg patch.
> 
> > I understand how the offset is supposed to work, but why is it
> > necessary?  No one needed it before so there must be a reason why you
> > decided to add it now.
> 
> I guess because of
> <http://thread.gmane.org/gmane.comp.bios.coreboot.seabios/9496/focus=9554>.
> 
> For me chunked transfers would be important (ie. transfering I+J=K bytes
> from the same fw_cfg file should be possible as two separate accesses,
> with I & J sizes), but I believe the offset register would not be
> necessary just for that. So I think it's solely directed at Kevin's
> feedback (see link above).

The reason the "offset" field is useful is because several of the
fw_cfg files have headers, and it's necessary to read the header into
one area of memory and the payload into another area of memory.  So,
basically we want to be able to read a chunk of a fw_cfg entry to one
memory address and then read another chunk to another memory address.

Not sure what you mean by "I+J=K" but I suspect we have similar
requirements - the ability to read different parts of a fw_cfg entry
in different calls.  Without this ability we'd need to read the entire
entry into a big linear area of memory and then memmove that around.
If there is a way to accomplish this without an "offset" field then
that's fine too.

Cheers,
-Kevin



reply via email to

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