From patchwork Fri Dec 18 11:16:01 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/4] Do not guard qemu shadow ram work around in CONFIG_OPTIONROMS_DEPLOYED Date: Fri, 18 Dec 2009 01:16:01 -0000 From: Gerd Hoffmann X-Patchwork-Id: 41397 Message-Id: <1261134964-12427-2-git-send-email-kraxel@redhat.com> 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); }