From patchwork Fri Jul 20 17:04:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 172311 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BCDB12C036A for ; Sat, 21 Jul 2012 03:08:54 +1000 (EST) Received: from localhost ([::1]:55701 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsGhA-0002dW-NJ for incoming@patchwork.ozlabs.org; Fri, 20 Jul 2012 13:08:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54007) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsGeg-0002OI-LE for qemu-devel@nongnu.org; Fri, 20 Jul 2012 13:08:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SsGcZ-0007ho-Gu for qemu-devel@nongnu.org; Fri, 20 Jul 2012 13:06:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55206) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsGcZ-0007hj-8r for qemu-devel@nongnu.org; Fri, 20 Jul 2012 13:04:07 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q6KH45ZB003256 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 20 Jul 2012 13:04:06 -0400 Received: from otherpad.lan.raisama.net (vpn1-5-12.gru2.redhat.com [10.97.5.12]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q6KH41uj014234; Fri, 20 Jul 2012 13:04:04 -0400 From: Eduardo Habkost To: qemu-devel@nongnu.org, seabios@seabios.org Date: Fri, 20 Jul 2012 14:04:49 -0300 Message-Id: <1342803890-1795-2-git-send-email-ehabkost@redhat.com> In-Reply-To: <1342803890-1795-1-git-send-email-ehabkost@redhat.com> References: <1342803890-1795-1-git-send-email-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Igor Mammedov , Kevin O'Connor , Gleb Natapov Subject: [Qemu-devel] [SeaBIOS PATCH 1/2] acpi: report real I/O APIC ID (0) on MADT table (v2) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org When resetting an I/O APIC, its ID is set to 0, and SeaBIOS doesn't change it, so report it correctly on the MADT table. Some hardware may require the BIOS to initialize I/O APIC ID to an unique value, but SeaBIOS doesn't do that. This patch at least makes the MADT table reflect reality. Changes v1 -> v2: - Cosmetic: whitespace change (removed extra newline) - New patch description Signed-off-by: Eduardo Habkost --- src/acpi.c | 2 +- src/config.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/acpi.c b/src/acpi.c index d39cbd9..da3bc57 100644 --- a/src/acpi.c +++ b/src/acpi.c @@ -336,7 +336,7 @@ build_madt(void) struct madt_io_apic *io_apic = (void*)apic; io_apic->type = APIC_IO; io_apic->length = sizeof(*io_apic); - io_apic->io_apic_id = CountCPUs; + io_apic->io_apic_id = BUILD_IOAPIC_ID; io_apic->address = cpu_to_le32(BUILD_IOAPIC_ADDR); io_apic->interrupt = cpu_to_le32(0); diff --git a/src/config.h b/src/config.h index 3a70867..0d4066d 100644 --- a/src/config.h +++ b/src/config.h @@ -52,6 +52,7 @@ #define BUILD_PCIMEM64_END 0x10000000000ULL #define BUILD_IOAPIC_ADDR 0xfec00000 +#define BUILD_IOAPIC_ID 0 #define BUILD_HPET_ADDRESS 0xfed00000 #define BUILD_APIC_ADDR 0xfee00000