qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org, seabios@seabios.org
Cc: Anthony Liguori <aliguori@us.ibm.com>, Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 1/4] Do not guard qemu shadow ram work around in CONFIG_OPTIONROMS_DEPLOYED
Date: Fri, 18 Dec 2009 12:16:01 +0100	[thread overview]
Message-ID: <1261134964-12427-2-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1261134964-12427-1-git-send-email-kraxel@redhat.com>

From: Anthony Liguori <aliguori@us.ibm.com>

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 <aliguori@us.ibm.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 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

  reply	other threads:[~2009-12-18 11:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-18 11:16 [Qemu-devel] [PATCH 0/4] qemu option loading Gerd Hoffmann
2009-12-18 11:16 ` Gerd Hoffmann [this message]
2009-12-18 11:16 ` [Qemu-devel] [PATCH 2/4] Disable CONFIG_OPTIONROMS_DEPLOYED by default Gerd Hoffmann
2009-12-18 11:16 ` [Qemu-devel] [PATCH 3/4] move htonl() + friends to util.h Gerd Hoffmann
2009-12-18 11:16 ` [Qemu-devel] [PATCH 4/4] qemu: add rom loading via fw_cfg Gerd Hoffmann
2009-12-18 15:41 ` [Qemu-devel] Re: [SeaBIOS] [PATCH 0/4] qemu option loading Anthony Liguori
2009-12-18 15:52   ` Gerd Hoffmann
2009-12-18 16:22     ` Anthony Liguori
2009-12-18 16:37       ` Gerd Hoffmann
2009-12-18 23:40     ` Kevin O'Connor
2009-12-19  0:37 ` Kevin O'Connor
2009-12-19  2:55   ` Anthony Liguori
2009-12-19  3:37     ` Kevin O'Connor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1261134964-12427-2-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=seabios@seabios.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).