From patchwork Thu Apr 25 09:02:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 239435 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 7E2222C00FF for ; Thu, 25 Apr 2013 19:09:04 +1000 (EST) Received: from localhost ([::1]:38875 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVIAo-0004mL-LK for incoming@patchwork.ozlabs.org; Thu, 25 Apr 2013 05:09:02 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56587) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVIAO-0004bo-PG for qemu-devel@nongnu.org; Thu, 25 Apr 2013 05:08:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVIAI-0004Q5-PL for qemu-devel@nongnu.org; Thu, 25 Apr 2013 05:08:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8565) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVI4m-0002tN-Mj for qemu-devel@nongnu.org; Thu, 25 Apr 2013 05:02:48 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3P92kpD031331 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 25 Apr 2013 05:02:46 -0400 Received: from redhat.com (vpn-201-14.tlv.redhat.com [10.35.201.14]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id r3P92giH006509; Thu, 25 Apr 2013 05:02:44 -0400 Date: Thu, 25 Apr 2013 12:02:37 +0300 From: "Michael S. Tsirkin" To: seabios@seabios.org Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH RFC 3/3] acpi: add an option to disable builtin tables 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 Serves to save a bit of memory, and is helpful for debugging (making sure tables come from qemu). Memory stats: Enabled: Total size: 128776 Fixed: 59100 Free: 2296 (used 98.2% of 128KiB rom) Disabled: Total size: 119836 Fixed: 58996 Free: 11236 (used 91.4% of 128KiB rom) Signed-off-by: Michael S. Tsirkin --- src/Kconfig | 12 +++++++++++- src/acpi.c | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Kconfig b/src/Kconfig index 3c80132..1b54b83 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -387,10 +387,20 @@ menu "BIOS Tables" default y help Support generation of ACPI tables. + config ACPI_BUILTIN + bool "Include built-in ACPI tables" + default y + depends on ACPI + help + Include built-in ACPI tables in BIOS. + Required for QEMU 1.5 and older. + This option can be disabled for QEMU 1.6 and newer + to save some space in the ROM file. + If unsure, say Y. config ACPI_DSDT bool "Include default ACPI DSDT" default y - depends on ACPI + depends on ACPI && ACPI_BUILTIN help Include default DSDT ACPI table in BIOS. Required for QEMU 1.3 and older. diff --git a/src/acpi.c b/src/acpi.c index 16ea9f4..b03b2ba 100644 --- a/src/acpi.c +++ b/src/acpi.c @@ -664,7 +664,7 @@ acpi_setup(void) linker_link("/etc/linker-script"); - if (!acpi_generate) { + if (!CONFIG_ACPI_BUILTIN || !acpi_generate) { return; }