From patchwork Thu May 14 00:52:05 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Minet X-Patchwork-Id: 23665 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4E0qDRv032182 for ; Thu, 14 May 2009 00:52:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752592AbZENAwJ (ORCPT ); Wed, 13 May 2009 20:52:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752455AbZENAwI (ORCPT ); Wed, 13 May 2009 20:52:08 -0400 Received: from serveur.didaction.com ([91.121.180.38]:47091 "EHLO serveur.didaction.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751719AbZENAwH (ORCPT ); Wed, 13 May 2009 20:52:07 -0400 X-Greylist: delayed 511 seconds by postgrey-1.27 at vger.kernel.org; Wed, 13 May 2009 20:52:07 EDT Received: from portablevm.vincent-minet.net (unknown [IPv6:2a01:e35:2e22:1bb0::2]) by serveur.didaction.com (Postfix) with ESMTPSA id 6D20924042 for ; Thu, 14 May 2009 02:52:06 +0200 (CEST) From: Vincent Minet To: kvm@vger.kernel.org Subject: [PATCH] bios: Fix MADT corruption and RSDT size when using -acpitable Date: Thu, 14 May 2009 02:52:05 +0200 Message-Id: <1242262325-18444-1-git-send-email-vincent@vincent-minet.net> X-Mailer: git-send-email 1.6.3 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org External ACPI tables are counted twice for the RSDT size and the load address for the first external table is in the MADT (interrupt override entries are overwritten). Signed-off-by: Vincent Minet --- kvm/bios/rombios32.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/kvm/bios/rombios32.c b/kvm/bios/rombios32.c index cbd5f15..289361b 100755 --- a/kvm/bios/rombios32.c +++ b/kvm/bios/rombios32.c @@ -1626,7 +1626,7 @@ void acpi_bios_init(void) addr = base_addr = ram_size - ACPI_DATA_SIZE; rsdt_addr = addr; rsdt = (void *)(addr); - rsdt_size = sizeof(*rsdt) + external_tables * 4; + rsdt_size = sizeof(*rsdt); addr += rsdt_size; fadt_addr = addr; @@ -1787,6 +1787,7 @@ void acpi_bios_init(void) } int_override++; madt_size += sizeof(struct madt_int_override); + addr += sizeof(struct madt_int_override); } acpi_build_table_header((struct acpi_table_header *)madt, "APIC", madt_size, 1);