Re: [PATCH] Seabios - read e820 table from qemu_cfg

Gleb Natapov
2010-01-29T16:08:50Z

On Fri, Jan 29, 2010 at 10:03:55AM +0100, Jes Sorensen wrote:
> On 01/28/10 05:39, Kevin O'Connor wrote:
> >I think defining accessor functions for every piece of data passed
> >through qemu-cfg interface is going to get tiring. I'd prefer to
> >extend the existing qemu-cfg "file" interface for new content.
> >
> >For example, add a helper with something like:
> >
> >int qemu_cfg_get_file(const char *name, void *dest, int maxsize);
>
> Hi Kevin,
>
> I think switching qemu_cfg to use a file name based interface would be
> a nice feature, but I think it should be independent of this patch. I am
> CC'ing Gleb on this as he did the original design I believe.
>
There is already file like interface on top of fw_cfg. Look for
qemu_cfg_read_file(). I am not sure this is a good idea to start using
it for something that is not actually a file. I have no problem with
adding accessors for each new data time. As you noted below this way we
don't need to load the whole e820 map into the memory, but can do entry
by entry.

--
Gleb.