From patchwork Fri Dec 18 11:16:01 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 41397 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 80B47B6F06 for ; Fri, 18 Dec 2009 22:52:09 +1100 (EST) Received: from localhost ([127.0.0.1]:42484 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLbNO-0006d1-NT for incoming@patchwork.ozlabs.org; Fri, 18 Dec 2009 06:52:06 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NLaol-0005lm-Dh for qemu-devel@nongnu.org; Fri, 18 Dec 2009 06:16:19 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NLaoe-0005dU-TL for qemu-devel@nongnu.org; Fri, 18 Dec 2009 06:16:17 -0500 Received: from [199.232.76.173] (port=51218 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLaod-0005cN-6s for qemu-devel@nongnu.org; Fri, 18 Dec 2009 06:16:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:16527) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NLaoc-0005PK-LH for qemu-devel@nongnu.org; Fri, 18 Dec 2009 06:16:10 -0500 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nBIBG9RU020621 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 18 Dec 2009 06:16:09 -0500 Received: from zweiblum.home.kraxel.org (vpn1-6-184.ams2.redhat.com [10.36.6.184]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nBIBG7sB011138; Fri, 18 Dec 2009 06:16:08 -0500 Received: by zweiblum.home.kraxel.org (Postfix, from userid 500) id 6C1CB70FCB; Fri, 18 Dec 2009 12:16:04 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org, seabios@seabios.org Date: Fri, 18 Dec 2009 12:16:01 +0100 Message-Id: <1261134964-12427-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1261134964-12427-1-git-send-email-kraxel@redhat.com> References: <1261134964-12427-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Anthony Liguori , Gerd Hoffmann Subject: [Qemu-devel] [PATCH 1/4] Do not guard qemu shadow ram work around in CONFIG_OPTIONROMS_DEPLOYED X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Anthony Liguori As we are going to disable CONFIG_OPTIONROMS_DEPLOYED under QEMU so that we can make proper use of DDIM. Signed-off-by: Anthony Liguori Signed-off-by: Gerd Hoffmann --- src/shadow.c | 20 ++++++++------------ 1 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/shadow.c b/src/shadow.c index f0f97c5..3f443ed 100644 --- a/src/shadow.c +++ b/src/shadow.c @@ -29,18 +29,14 @@ __make_bios_writable(u16 bdf) int clear = 0; int i; for (i=0; i<6; i++) { - if (CONFIG_OPTIONROMS_DEPLOYED) { - int reg = pci_config_readb(bdf, 0x5a + i); - if ((reg & 0x11) != 0x11) { - // Need to copy optionroms to work around qemu implementation - void *mem = (void*)(BUILD_ROM_START + i * 32*1024); - memcpy((void*)BUILD_BIOS_TMP_ADDR, mem, 32*1024); - pci_config_writeb(bdf, 0x5a + i, 0x33); - memcpy(mem, (void*)BUILD_BIOS_TMP_ADDR, 32*1024); - clear = 1; - } else { - pci_config_writeb(bdf, 0x5a + i, 0x33); - } + int reg = pci_config_readb(bdf, 0x5a + i); + if ((reg & 0x11) != 0x11) { + // Need to copy optionroms to work around qemu implementation + void *mem = (void*)(BUILD_ROM_START + i * 32*1024); + memcpy((void*)BUILD_BIOS_TMP_ADDR, mem, 32*1024); + pci_config_writeb(bdf, 0x5a + i, 0x33); + memcpy(mem, (void*)BUILD_BIOS_TMP_ADDR, 32*1024); + clear = 1; } else { pci_config_writeb(bdf, 0x5a + i, 0x33); }