From mboxrd@z Thu Jan 1 00:00:00 1970 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 From: Gerd Hoffmann 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> Subject: [Qemu-devel] [PATCH 1/4] Do not guard qemu shadow ram work around in CONFIG_OPTIONROMS_DEPLOYED List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, seabios@seabios.org Cc: Anthony Liguori , Gerd Hoffmann 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); } -- 1.6.5.2