From: "Jan Beulich" Subject: [PATCH] x86: retrieve VBE EDID/DDC info independent of used video mode Date: Tue, 19 Jun 2007 17:14:30 +0100 Message-ID: <46781D06.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org The code to retrieve this information was protected by a check of a variable (vbe_version) that would get initialized only when a VESA mode was selected on the command line. Since the problem was inherited from Linux, a similar patch went out to lkml a few minutes ago. Signed-off-by: Jan Beulich Index: 2007-06-18/xen/arch/x86/boot/video.S =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2007-06-18.orig/xen/arch/x86/boot/video.S 2007-06-15 14:05:46.0000000= 00 +0200 +++ 2007-06-18/xen/arch/x86/boot/video.S 2007-06-19 17:47:57.0000000= 00 +0200 @@ -428,16 +428,12 @@ setmenu: jmp mode_set =20 check_vesa: -#ifdef CONFIG_FIRMWARE_EDID leaw modelist+1024, %di movw $0x4f00, %ax int $0x10 cmpw $0x004f, %ax jnz setbad =20 - movw 4(%di), %ax - movw %ax, bootsym(vbe_version) -#endif leaw modelist+1024, %di subb $VIDEO_FIRST_VESA>>8, %bh movw %bx, %cx # Get mode information structure @@ -891,8 +887,13 @@ store_edid: cmpb $1, bootsym(opt_edid) # EDID disabled on cmdline = (edid=3Dno)? je .Lno_edid =20 - cmpw $0x0200, bootsym(vbe_version) # only do EDID on >=3D = VBE2.0 - jl .Lno_edid + leaw modelist, %di + movw $0x4f00, %ax + int $0x10 + cmpw $0x004f, %ax + jne .Lno_edid + cmpw $0x0200, 4(%di) # only do EDID on >=3D VBE2.0 + jb .Lno_edid =20 xorw %di, %di # Report Capability pushw %di @@ -901,6 +902,8 @@ store_edid: xorw %bx, %bx xorw %cx, %cx int $0x10 + pushw %ds + popw %es cmpw $0x004f, %ax # Call failed? jne .Lno_edid =20 @@ -920,8 +923,6 @@ store_edid: movw $0x01, %bx movw $0x00, %cx movw $0x00, %dx - pushw %ds - popw %es movw $bootsym(boot_edid_info), %di int $0x10 =20 @@ -940,7 +941,6 @@ edit_buf: .space 6 # Line e card_name: .word 0 # Pointer to adapter name graphic_mode: .byte 0 # Graphic mode with a linear frame buffer dac_size: .byte 6 # DAC bit depth -vbe_version: .word 0 # VBE bios version =20 # Status messages keymsg: .ascii "Press to see video modes available,"