This is the seabios code that adds support for loading acpi tables from QEMU.
Kevin, I think I have addresses all your comments. In particular, in the end I dropped the new data field from the romfile structure.
Please review and consider for merging.
Changes from v2: - addressed comments from Kevin: fixed coding style, minimized changes to existing code
Changes from v1: - simplified linker interfaces along the lines suggested by Kevin - fixed lots of bugs
Michael S. Tsirkin (5): romfile_loader: utility to patch in-memory ROM files pmm: support looking up a given pattern in FSEG acpi: pack rsdp acpi: load and link tables through romfile loader acpi: add an option to disable builtin tables
Makefile | 2 +- src/acpi.h | 2 +- src/romfile_loader.h | 72 +++++++++++++++++++++ src/util.h | 2 + src/acpi.c | 29 +++++++++ src/paravirt.c | 2 + src/pmm.c | 18 ++++++ src/romfile_loader.c | 172 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/Kconfig | 12 +++- 9 files changed, 308 insertions(+), 3 deletions(-) create mode 100644 src/romfile_loader.h create mode 100644 src/romfile_loader.c