From patchwork Wed Feb 22 07:18:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jordan.l.justen@intel.com X-Patchwork-Id: 142409 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 19CE6B6FB4 for ; Wed, 22 Feb 2012 18:55:40 +1100 (EST) Received: from localhost ([::1]:44923 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S072r-0006GV-OJ for incoming@patchwork.ozlabs.org; Wed, 22 Feb 2012 02:55:25 -0500 Received: from eggs.gnu.org ([140.186.70.92]:49512) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S06UN-0007A5-Sk for qemu-devel@nongnu.org; Wed, 22 Feb 2012 02:19:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S06UI-0007sK-5Z for qemu-devel@nongnu.org; Wed, 22 Feb 2012 02:19:47 -0500 Received: from mga14.intel.com ([143.182.124.37]:51996) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S06UH-0007n5-Ue for qemu-devel@nongnu.org; Wed, 22 Feb 2012 02:19:42 -0500 Received: from azsmga002.ch.intel.com ([10.2.17.35]) by azsmga102.ch.intel.com with ESMTP; 21 Feb 2012 23:19:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.71,315,1320652800"; d="scan'208";a="68967839" Received: from unknown (HELO jljusten-laptop.amr.corp.intel.com) ([10.255.15.109]) by AZSMGA002.ch.intel.com with ESMTP; 21 Feb 2012 23:19:40 -0800 From: Jordan Justen To: qemu-devel@nongnu.org Date: Tue, 21 Feb 2012 23:18:56 -0800 Message-Id: <1329895136-20494-10-git-send-email-jordan.l.justen@intel.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1329895136-20494-1-git-send-email-jordan.l.justen@intel.com> References: <1329895136-20494-1-git-send-email-jordan.l.justen@intel.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 143.182.124.37 Cc: Jordan Justen Subject: [Qemu-devel] [PATCH v11 9/9] pc_piix/pc_sysfw: enable flash by default 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 Now, the pc-sysfw:rom_only property will default to false which enables flash by default. All pc types below pc-1.1 set rom_only to true. This prevents flash from being enabled on these pc machine types. For pc-1.1 rom_only will use the default (false), which will allow flash to be used for pc-1.1. Signed-off-by: Jordan Justen --- hw/pc_piix.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ hw/pc_sysfw.c | 2 +- 2 files changed, 50 insertions(+), 1 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index fcf0153..fe7a729 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -385,6 +385,14 @@ static QEMUMachine pc_machine_v1_0 = { .desc = "Standard PC", .init = pc_init_pci, .max_cpus = 255, + .compat_props = (GlobalProperty[]) { + { + .driver = "pc-sysfw", + .property = "rom_only", + .value = stringify(1), + }, + { /* end of list */ } + }, }; static QEMUMachine pc_machine_v0_15 = { @@ -392,6 +400,14 @@ static QEMUMachine pc_machine_v0_15 = { .desc = "Standard PC", .init = pc_init_pci, .max_cpus = 255, + .compat_props = (GlobalProperty[]) { + { + .driver = "pc-sysfw", + .property = "rom_only", + .value = stringify(1), + }, + { /* end of list */ } + }, }; static QEMUMachine pc_machine_v0_14 = { @@ -425,6 +441,11 @@ static QEMUMachine pc_machine_v0_14 = { .property = "event_idx", .value = "off", }, + { + .driver = "pc-sysfw", + .property = "rom_only", + .value = stringify(1), + }, { /* end of list */ } }, }; @@ -472,6 +493,11 @@ static QEMUMachine pc_machine_v0_13 = { .property = "use_broken_id", .value = stringify(1), }, + { + .driver = "pc-sysfw", + .property = "rom_only", + .value = stringify(1), + }, { /* end of list */ } }, }; @@ -523,6 +549,11 @@ static QEMUMachine pc_machine_v0_12 = { .property = "use_broken_id", .value = stringify(1), }, + { + .driver = "pc-sysfw", + .property = "rom_only", + .value = stringify(1), + }, { /* end of list */ } } }; @@ -582,6 +613,11 @@ static QEMUMachine pc_machine_v0_11 = { .property = "use_broken_id", .value = stringify(1), }, + { + .driver = "pc-sysfw", + .property = "rom_only", + .value = stringify(1), + }, { /* end of list */ } } }; @@ -653,6 +689,11 @@ static QEMUMachine pc_machine_v0_10 = { .property = "use_broken_id", .value = stringify(1), }, + { + .driver = "pc-sysfw", + .property = "rom_only", + .value = stringify(1), + }, { /* end of list */ } }, }; @@ -662,6 +703,14 @@ static QEMUMachine isapc_machine = { .desc = "ISA-only PC", .init = pc_init_isa, .max_cpus = 1, + .compat_props = (GlobalProperty[]) { + { + .driver = "pc-sysfw", + .property = "rom_only", + .value = stringify(1), + }, + { /* end of list */ } + }, }; #ifdef CONFIG_XEN diff --git a/hw/pc_sysfw.c b/hw/pc_sysfw.c index 972706c..abf9004 100644 --- a/hw/pc_sysfw.c +++ b/hw/pc_sysfw.c @@ -226,7 +226,7 @@ void pc_system_firmware_init(MemoryRegion *rom_memory) } static Property pcsysfw_properties[] = { - DEFINE_PROP_UINT8("rom_only", PcSysFwDevice, rom_only, 1), + DEFINE_PROP_UINT8("rom_only", PcSysFwDevice, rom_only, 0), DEFINE_PROP_END_OF_LIST(), };