WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] x86: propagate VESA capabilities to dom0

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: propagate VESA capabilities to dom0
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 12 Oct 2007 14:30:13 -0700
Delivery-date: Fri, 12 Oct 2007 14:30:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1192186541 -3600
# Node ID ef4119637f52648c096e899801f1ca82dbbc04d2
# Parent  723b9837db1bfb66f6e18961019742d77f133021
x86: propagate VESA capabilities to dom0

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.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/arch/x86/boot/video.S       |    3 +++
 xen/arch/x86/setup.c            |    3 +++
 xen/drivers/video/vesa.c        |    2 +-
 xen/include/public/xen-compat.h |    2 +-
 xen/include/public/xen.h        |    6 ++++++
 5 files changed, 14 insertions(+), 2 deletions(-)

diff -r 723b9837db1b -r ef4119637f52 xen/arch/x86/boot/video.S
--- a/xen/arch/x86/boot/video.S Fri Oct 12 11:42:56 2007 +0100
+++ b/xen/arch/x86/boot/video.S Fri Oct 12 11:55:41 2007 +0100
@@ -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
diff -r 723b9837db1b -r ef4119637f52 xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c      Fri Oct 12 11:42:56 2007 +0100
+++ b/xen/arch/x86/setup.c      Fri Oct 12 11:55:41 2007 +0100
@@ -308,6 +308,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)
@@ -340,6 +341,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.gbl_caps = bvi->capabilities;
+        vga_console_info.u.vesa_lfb.mode_attrs = bvi->vesa_attrib;
     }
 }
 
diff -r 723b9837db1b -r ef4119637f52 xen/drivers/video/vesa.c
--- a/xen/drivers/video/vesa.c  Fri Oct 12 11:42:56 2007 +0100
+++ b/xen/drivers/video/vesa.c  Fri Oct 12 11:55:41 2007 +0100
@@ -46,7 +46,7 @@ void __init vesa_early_init(void)
 {
     unsigned int vram_vmode;
 
-    /* XXX vga_compat = !(boot_video_info.capabilities & 2); */
+    vga_compat = !(vesa_lfb_info.capabilities & 2);
 
     if ( (vlfb_info.bits_per_pixel < 8) || (vlfb_info.bits_per_pixel > 32) )
         return;
diff -r 723b9837db1b -r ef4119637f52 xen/include/public/xen-compat.h
--- a/xen/include/public/xen-compat.h   Fri Oct 12 11:42:56 2007 +0100
+++ b/xen/include/public/xen-compat.h   Fri Oct 12 11:55:41 2007 +0100
@@ -27,7 +27,7 @@
 #ifndef __XEN_PUBLIC_XEN_COMPAT_H__
 #define __XEN_PUBLIC_XEN_COMPAT_H__
 
-#define __XEN_LATEST_INTERFACE_VERSION__ 0x00030205
+#define __XEN_LATEST_INTERFACE_VERSION__ 0x00030206
 
 #if defined(__XEN__) || defined(__XEN_TOOLS__)
 /* Xen is built with matching headers and implements the latest interface. */
diff -r 723b9837db1b -r ef4119637f52 xen/include/public/xen.h
--- a/xen/include/public/xen.h  Fri Oct 12 11:42:56 2007 +0100
+++ b/xen/include/public/xen.h  Fri Oct 12 11:55:41 2007 +0100
@@ -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 (offset 0xa, VESA command 0x4f00). */
+            uint32_t gbl_caps;
+            /* Mode attributes (offset 0x0, VESA command 0x4f01). */
+            uint16_t mode_attrs;
+#endif
         } vesa_lfb;
     } u;
 } dom0_vga_console_info_t;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86: propagate VESA capabilities to dom0, Xen patchbot-unstable <=