Linux has been using the VESA capabilities field for quite a while, so
Xen should also supply it. At once, in case needed in the future, also
propagate the mode attributes field.
(Applies cleanly only on top of the previously sent VESA LFB output
patch.)
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
Index: 2007-08-08/xen/arch/x86/boot/video.S
===================================================================
--- 2007-08-08.orig/xen/arch/x86/boot/video.S 2007-08-09 12:59:50.000000000
+0200
+++ 2007-08-08/xen/arch/x86/boot/video.S 2007-08-09 13:56:54.000000000
+0200
@@ -44,6 +44,7 @@
#define PARAM_LFB_COLORS 0x1c
#define PARAM_VESAPM_SEG 0x24
#define PARAM_VESAPM_OFF 0x26
+#define PARAM_VESA_ATTRIB 0x28
#define _param(param) bootsym(boot_vid_info)+(param)
video: xorw %ax, %ax
@@ -129,6 +130,8 @@ mopar_gr:
movl %eax, _param(PARAM_LFB_COLORS)
movl 35(%di), %eax
movl %eax, _param(PARAM_LFB_COLORS+4)
+ movw 0(%di), %ax
+ movw %ax, _param(PARAM_VESA_ATTRIB)
# get video mem size
leaw vesa_glob_info, %di
Index: 2007-08-08/xen/arch/x86/setup.c
===================================================================
--- 2007-08-08.orig/xen/arch/x86/setup.c 2007-08-09 12:59:50.000000000
+0200
+++ 2007-08-08/xen/arch/x86/setup.c 2007-08-09 12:58:04.000000000 +0200
@@ -357,6 +357,7 @@ struct boot_video_info {
u8 rsvd_pos; /* 0x23 */
u16 vesapm_seg; /* 0x24 */
u16 vesapm_off; /* 0x26 */
+ u16 vesa_attrib; /* 0x28 */
};
static void __init parse_video_info(void)
@@ -389,6 +390,8 @@ static void __init parse_video_info(void
vga_console_info.u.vesa_lfb.blue_size = bvi->blue_size;
vga_console_info.u.vesa_lfb.rsvd_pos = bvi->rsvd_pos;
vga_console_info.u.vesa_lfb.rsvd_size = bvi->rsvd_size;
+ vga_console_info.u.vesa_lfb.capabilities = bvi->capabilities;
+ vga_console_info.u.vesa_lfb.attributes = bvi->vesa_attrib;
}
}
Index: 2007-08-08/xen/drivers/video/vesa.c
===================================================================
--- 2007-08-08.orig/xen/drivers/video/vesa.c 2007-08-09 12:59:50.000000000
+0200
+++ 2007-08-08/xen/drivers/video/vesa.c 2007-08-09 12:59:23.000000000 +0200
@@ -38,7 +38,7 @@ int __init vesa_early_init(void)
{
int type;
- /* XXX vga_compat = !(boot_video_info.capabilities & 2); */
+ vga_compat = !(vesa_lfb_info.capabilities & 2);
if ( vesa_lfb_info.bits_per_pixel < 8 || vesa_lfb_info.bits_per_pixel > 32
)
return -ENOSYS;
Index: 2007-08-08/xen/include/public/xen.h
===================================================================
--- 2007-08-08.orig/xen/include/public/xen.h 2007-06-11 15:01:03.000000000
+0200
+++ 2007-08-08/xen/include/public/xen.h 2007-08-09 12:29:56.000000000 +0200
@@ -565,6 +565,12 @@ typedef struct dom0_vga_console_info {
uint8_t green_pos, green_size;
uint8_t blue_pos, blue_size;
uint8_t rsvd_pos, rsvd_size;
+#if __XEN_INTERFACE_VERSION__ >= 0x00030206
+ /* VESA capabilities. */
+ uint32_t capabilities;
+ /* Mode attributes. */
+ uint16_t attributes;
+#endif
} vesa_lfb;
} u;
} dom0_vga_console_info_t;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|