[SeaBIOS] [Qemu-devel] [PATCH RFC 2/3] acpi: load and link tables from /etc/acpi/
Michael S. Tsirkin
mst at redhat.com
Mon Apr 29 15:25:13 CEST 2013
On Mon, Apr 29, 2013 at 01:41:01PM +0200, Laszlo Ersek wrote:
> Not sure how much it counts, but I personally can agree with you on this
> direction :)
>
> One note below:
>
> > @@ -603,8 +604,72 @@ acpi_setup(void)
> > if (! CONFIG_ACPI)
> > return;
> >
> > + int acpi_generate = 1;
> > +
> > dprintf(3, "init ACPI tables\n");
> >
> > + struct romfile_s *file = NULL;
> > + for (;;) {
> > + file = romfile_findprefix("/etc/acpi/", file);
> > + if (!file)
> > + break;
> > +
> > + /*
> > + * Disable ACPI table generation. All ACPI tables must come from
> > + * etc/acpi/ romfile entries.
> > + */
> > + acpi_generate = 0;
> > +
>
> [...]
>
> > + }
> > +
> > + linker_link("/etc/linker-script");
> > +
> > + if (!acpi_generate) {
> > + return;
> > + }
> > +
> > + dprintf(3, "generate ACPI tables\n");
> > +
> > // This code is hardcoded for PIIX4 Power Management device.
> > struct pci_device *pci = pci_find_init_device(acpi_find_tbl, NULL);
> > if (!pci)
>
> Are you deliberately calling linker_link() independently from
> "acpi_generate"? My hunch is that linker_link() only makes sense if
> acpi_generate == 0 (ie. qemu has passed down at least one table to
> repoint some pointer to), but I may be missing a use case.
>
> Thanks
> Laszlo
In theory linker code is unrelated to acpi, and host
can the linker to patch any romfile.
I could add if (!acpi_generate) but it just seems
like adding code to remove something potentially useful.
--
MST
More information about the SeaBIOS
mailing list