diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2013-01-04 13:24:49 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-01-04 13:24:49 -0600 |
commit | 72e5b276b2fcd5ac3c0b235f19ff0dc39ad9f82f (patch) | |
tree | 406b166d87d54d3c18c50aa12d286445bd5d2184 /hw/pc.c | |
parent | 25bbf61e4bacd1e4fa4115ffcf151051b9d6608e (diff) | |
parent | 503b19fc5d018f4edc60fb771cf97f47cea71be2 (diff) | |
download | qemu-72e5b276b2fcd5ac3c0b235f19ff0dc39ad9f82f.zip qemu-72e5b276b2fcd5ac3c0b235f19ff0dc39ad9f82f.tar.gz qemu-72e5b276b2fcd5ac3c0b235f19ff0dc39ad9f82f.tar.bz2 |
Merge remote-tracking branch 'kraxel/acpi.2' into staging
* kraxel/acpi.2:
apci: assign memory regions to ich9 lpc device
apci: assign memory regions to piix4 acpi device
acpi: autoload dsdt
configure: also symlink *.aml files
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/pc.c')
-rw-r--r-- | hw/pc.c | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -886,6 +886,29 @@ void pc_cpus_init(const char *cpu_model) } } +void pc_acpi_init(const char *default_dsdt) +{ + char *filename = NULL, *arg = NULL; + + if (acpi_tables != NULL) { + /* manually set via -acpitable, leave it alone */ + return; + } + + filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, default_dsdt); + if (filename == NULL) { + fprintf(stderr, "WARNING: failed to find %s\n", default_dsdt); + return; + } + + arg = g_strdup_printf("file=%s", filename); + if (acpi_table_add(arg) != 0) { + fprintf(stderr, "WARNING: failed to load %s\n", filename); + } + g_free(arg); + g_free(filename); +} + void *pc_memory_init(MemoryRegion *system_memory, const char *kernel_filename, const char *kernel_cmdline, |