qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org, vgabios-developers@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 4/5] update pci_get_lfb_addr for vmware vga
Date: Fri,  7 May 2010 12:09:46 +0200	[thread overview]
Message-ID: <1273226987-10066-4-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1273226987-10066-1-git-send-email-kraxel@redhat.com>

vmware vga has the framebuffer at pci region 1 not 0.  This patch makes
pci_get_lfb_addr check region 1 too.  It also gives names to the
numbered labels to make the code more readable.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 vgabios.c |   23 ++++++++++++++---------
 1 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/vgabios.c b/vgabios.c
index a575b7b..ed89334 100644
--- a/vgabios.c
+++ b/vgabios.c
@@ -3852,26 +3852,31 @@ _pci_get_lfb_addr:
     mov dl, #0x00
     call pci_read_reg
     cmp ax, #0xffff
-    jz pci_get_lfb_addr_5
- pci_get_lfb_addr_3:
+    jz pci_get_lfb_addr_fail
+ pci_get_lfb_addr_next_dev:
     mov dl, #0x00
     call pci_read_reg
     cmp ax, bx ;; check vendor
-    jz pci_get_lfb_addr_4
+    jz pci_get_lfb_addr_found
     add cx, #0x8
     cmp cx, #0x200 ;; search bus #0 and #1
-    jb pci_get_lfb_addr_3
- pci_get_lfb_addr_5:
+    jb pci_get_lfb_addr_next_dev
+ pci_get_lfb_addr_fail:
     xor dx, dx ;; no LFB
-    jmp pci_get_lfb_addr_6
- pci_get_lfb_addr_4:
+    jmp pci_get_lfb_addr_return
+ pci_get_lfb_addr_found:
     mov dl, #0x10 ;; I/O space #0
     call pci_read_reg
     test ax, #0xfff1
-    jnz pci_get_lfb_addr_5
+    jz pci_get_lfb_addr_success
+    mov dl, #0x14 ;; I/O space #1
+    call pci_read_reg
+    test ax, #0xfff1
+    jnz pci_get_lfb_addr_fail
+ pci_get_lfb_addr_success:
     shr eax, #16
     mov dx, ax ;; LFB address
- pci_get_lfb_addr_6:
+ pci_get_lfb_addr_return:
   pop eax
   mov ax, dx
   pop dx
-- 
1.6.6.1

  parent reply	other threads:[~2010-05-07 13:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-07 10:09 [Qemu-devel] [PATCH 1/5] Makefile cleanup Gerd Hoffmann
2010-05-07 10:09 ` [Qemu-devel] [PATCH 2/5] Add defines for PCI IDs Gerd Hoffmann
2010-05-07 15:32   ` Blue Swirl
2010-05-10  7:51     ` Gerd Hoffmann
2010-05-07 10:09 ` [Qemu-devel] [PATCH 3/5] Add qemu stdvga pci bios Gerd Hoffmann
2010-05-07 10:09 ` Gerd Hoffmann [this message]
2010-05-07 10:09 ` [Qemu-devel] [PATCH 5/5] Add qemu vmware vga " Gerd Hoffmann
2010-05-07 14:38 ` [Qemu-devel] [PATCH 1/5] Makefile cleanup Isaku Yamahata
2010-05-20 12:57 ` [Qemu-devel] vgabios plans ( Re: [PATCH 1/5] Makefile cleanup) Gerd Hoffmann
2010-05-20 13:04   ` [Qemu-devel] " Anthony Liguori
2010-05-21 13:29     ` Gerd Hoffmann

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=1273226987-10066-4-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vgabios-developers@nongnu.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).