From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=49319 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PDbjJ-0002qx-Bd for qemu-devel@nongnu.org; Wed, 03 Nov 2010 07:42:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PDbjI-0006Kr-1m for qemu-devel@nongnu.org; Wed, 03 Nov 2010 07:42:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63510) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PDbjH-0006KD-Pr for qemu-devel@nongnu.org; Wed, 03 Nov 2010 07:42:12 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oA3BgBMf027696 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 3 Nov 2010 07:42:11 -0400 Received: from rincewind.home.kraxel.org (vpn1-4-71.ams2.redhat.com [10.36.4.71]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id oA3Bg8Lq004868 for ; Wed, 3 Nov 2010 07:42:10 -0400 From: Gerd Hoffmann Date: Wed, 3 Nov 2010 12:41:54 +0100 Message-Id: <1288784516-15637-10-git-send-email-kraxel@redhat.com> In-Reply-To: <1288784516-15637-1-git-send-email-kraxel@redhat.com> References: <1288784516-15637-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [vgabios patch v2 09/11] update pci_get_lfb_addr for vmware vga List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 --- vgabios.c | 23 ++++++++++++++--------- 1 files changed, 14 insertions(+), 9 deletions(-) diff --git a/vgabios.c b/vgabios.c index 2e8b5d7..c1e312b 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.7.1