[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 25/25] q35: automatically load the q35 dsdt tabl
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 25/25] q35: automatically load the q35 dsdt table |
Date: |
Fri, 14 Sep 2012 09:08:16 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0 |
Il 13/09/2012 22:12, Jason Baron ha scritto:
> Automatically, locate the required q35 dsdt table on load. Otherwise we error
> out. This could be done in the bios, but its harder to produce a good error
> message.
>
> Signed-off-by: Jason Baron <address@hidden>
> ---
> hw/pc_q35.c | 26 ++++++++++++++++++++++++++
> 1 files changed, 26 insertions(+), 0 deletions(-)
>
> diff --git a/hw/pc_q35.c b/hw/pc_q35.c
> index b8c1196..08ae62b 100644
> --- a/hw/pc_q35.c
> +++ b/hw/pc_q35.c
> @@ -329,6 +329,25 @@ static void pc_q35_init_late(BusState **idebus,
> ISADevice *rtc_state,
> 8, NULL, 0);
> }
>
> +static int find_and_load_dsdt(const char *dsdt_name)
> +{
> + char *filename;
> + char buf[256];
> +
> + filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, dsdt_name);
> + if (!filename) {
> + return -1;
> + }
> +
> + snprintf(buf, 256, "file=%s", filename);
> + if (acpi_table_add(buf) < 0) {
> + fprintf(stderr, "Wrong acpi table provided\n");
> + return -1;
> + }
> +
> + return 0;
> +}
> +
> /* PC hardware initialisation */
> static void pc_q35_init(ram_addr_t ram_size,
> const char *boot_device,
> @@ -356,6 +375,13 @@ static void pc_q35_init(ram_addr_t ram_size,
> qemu_irq *i8259;
> int i;
>
> + /* let's first see if we can find the proper dsdt */
> + if (find_and_load_dsdt("q35-acpi-dsdt.aml")) {
> + fprintf(stderr, "Couldn't find q35 dsdt table!\n"
> + "Try updating your bios.\n");
> + exit(1);
> + }
> +
> pc_cpus_init(cpu_model);
>
> kvmclock_create();
>
Should we take the PIIX4 DSDT into the QEMU tree, and do the same thing
for PIIX4?
Paolo
- [Qemu-devel] [PATCH 06/25] pc: Move ioapic_init() from pc_piix.c to pc.c, (continued)
- [Qemu-devel] [PATCH 06/25] pc: Move ioapic_init() from pc_piix.c to pc.c, Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 13/25] q35: Suppress SMM BIOS initialization under KVM, Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 03/25] pci: introduce pci_swizzle_map_irq_fn() for standardized interrupt pin swizzle, Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 04/25] ahci: add ide device initialization helper, Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 15/25] q35: smbus: Remove PCI_STATUS_SIG_SYSTEM_ERROR and PCI_STATUS_DETECTED_PARITY from w1cmask, Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 09/25] pcie: pass pcie window size to pcie_host_mmcfg_update(), Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 17/25] q35: Add kvmclock support, Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 14/25] q35: Fix non-PCI IRQ processing in ich9_lpc_update_apic, Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 20/25] pcie: drop version_id field for live migration, Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 25/25] q35: automatically load the q35 dsdt table, Jason Baron, 2012/09/13
- Re: [Qemu-devel] [PATCH 25/25] q35: automatically load the q35 dsdt table,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 22/25] ahci: properly reset PxCMD on HBA reset, Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 01/25] pci: pci capability must be in PCI space, Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 05/25] pc, pc_piix: split out pc nic initialization, Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 19/25] ahci: add migration support, Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 21/25] pcie_aer: clear cmask for Advanced Error Interrupt Message Number, Jason Baron, 2012/09/13
- [Qemu-devel] [PATCH 11/25] q35: Introduce q35 pc based chipset emulator, Jason Baron, 2012/09/13