qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Kevin O'Connor <kevin@koconnor.net>
Cc: seabios@seabios.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [SeaBIOS] [PATCH v2 1/5] linker: utility to patch in-memory ROM files
Date: Sun, 22 Sep 2013 13:49:58 +0300	[thread overview]
Message-ID: <20130922104958.GA6413@redhat.com> (raw)
In-Reply-To: <20130726000627.GA14029@morn.localdomain>

On Thu, Jul 25, 2013 at 08:06:27PM -0400, Kevin O'Connor wrote:
> On Thu, Jul 25, 2013 at 03:55:56PM +0300, Michael S. Tsirkin wrote:
> > On Mon, Jul 15, 2013 at 11:01:02AM +0300, Michael S. Tsirkin wrote:
> > > On Sun, Jul 14, 2013 at 02:24:52PM -0400, Kevin O'Connor wrote:
> > > > I'd prefer to see this tracked within the "linker" code and not in the
> > > > generic romfile struct.
> > > 
> > > A way to associate a romfile instance with a value seems generally
> > > useful, no?  Still, that's not too hard - it would only mean an extra
> > > linked list of 
> > > 
> > > struct linker {
> > > 	char name[56]
> > > 	void *data;
> > > 	struct hlist_node node;
> > > }
> > > 
> > > is this preferable?
> 
> Sure, but it's probably easier to do something like:
> 
> struct linkfiles { char *name; void *data; };
> 
> void linker_loader_execute(const char *name)
> {
>     int size;
>     struct linker_loader_entry_s *entries = romfile_loadfile(name, &size);
>     int numentries = size/sizeof(entries[0]);
>     if (! entries)
>         return;
>     struct linkfiles *files = malloc_tmp(sizeof(files[0]) * numentries);
> 
> and then just populate and use the array of filenames.

OK I'll do this but it's more code as I can't use plain romfile_find
anymore, and have to code up my own lookup.

> > > > Also, is there another name besides "linker" that could be used?
> > > > SeaBIOS has code to self-relocate and fixup code relocations.  I think
> > > > having code in the repo called "linker" could cause confusion.
> > > > 
> > > 
> > > romfile_loader?
> 
> Shrug.  How about "tabledeploy"?
> 
> -Kevin

  reply	other threads:[~2013-09-22 10:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-07 15:42 [Qemu-devel] [PATCH v2 0/5] seabios: load acpi tables from qemu Michael S. Tsirkin
2013-07-07 15:42 ` [Qemu-devel] [PATCH v2 1/5] linker: utility to patch in-memory ROM files Michael S. Tsirkin
2013-07-14 18:24   ` [Qemu-devel] [SeaBIOS] " Kevin O'Connor
2013-07-15  8:01     ` Michael S. Tsirkin
2013-07-25 12:55       ` Michael S. Tsirkin
2013-07-26  0:06         ` Kevin O'Connor
2013-09-22 10:49           ` Michael S. Tsirkin [this message]
2013-09-22 11:18             ` Michael S. Tsirkin
2013-09-22 13:44               ` Michael S. Tsirkin
2013-07-07 15:42 ` [Qemu-devel] [PATCH v2 2/5] pmm: add a way to test whether memory is in FSEG Michael S. Tsirkin
2013-07-07 15:42 ` [Qemu-devel] [PATCH v2 3/5] acpi: pack rsdp Michael S. Tsirkin
2013-07-07 15:42 ` [Qemu-devel] [PATCH v2 4/5] acpi: load and link tables from /etc/acpi/ Michael S. Tsirkin
2013-07-14 18:27   ` [Qemu-devel] [SeaBIOS] " Kevin O'Connor
2013-07-15  8:11     ` Michael S. Tsirkin
2013-07-15  9:58       ` Michael S. Tsirkin
2013-07-07 15:42 ` [Qemu-devel] [PATCH v2 5/5] acpi: add an option to disable builtin tables Michael S. Tsirkin

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=20130922104958.GA6413@redhat.com \
    --to=mst@redhat.com \
    --cc=kevin@koconnor.net \
    --cc=qemu-devel@nongnu.org \
    --cc=seabios@seabios.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 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).