Jan Beulich
2007-Jun-19 16:14 UTC
[Xen-devel] [PATCH] x86: retrieve VBE EDID/DDC info independent of used video mode
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 <jbeulich@novell.com> Index: 2007-06-18/xen/arch/x86/boot/video.S ==================================================================--- 2007-06-18.orig/xen/arch/x86/boot/video.S 2007-06-15 14:05:46.000000000 +0200 +++ 2007-06-18/xen/arch/x86/boot/video.S 2007-06-19 17:47:57.000000000 +0200 @@ -428,16 +428,12 @@ setmenu: jmp mode_set check_vesa: -#ifdef CONFIG_FIRMWARE_EDID leaw modelist+1024, %di movw $0x4f00, %ax int $0x10 cmpw $0x004f, %ax jnz setbad - 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=no)? je .Lno_edid - cmpw $0x0200, bootsym(vbe_version) # only do EDID on >= 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 >= VBE2.0 + jb .Lno_edid 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 @@ -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 @@ -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 # Status messages keymsg: .ascii "Press <RETURN> to see video modes available," _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel