]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/mini-os.git/commitdiff
stubdom: use PVFB so as to e.g. permit SDL display
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 28 Feb 2008 10:21:21 +0000 (10:21 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 28 Feb 2008 10:21:21 +0000 (10:21 +0000)
This adds support in ioemu for PVFB frontend as stubdomain display.
This permits for instance to use SDL in dom0 to perform the eventual
display.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
fbfront.c
include/fbfront.h

index bbe49b92a509f2590c79107aca71d2fd936a9f0c..4f5041ab6972c80d6d9dfd1c26262a7c59174d54 100644 (file)
--- a/fbfront.c
+++ b/fbfront.c
@@ -31,13 +31,6 @@ struct kbdfront_dev {
     char *nodename;
     char *backend;
 
-    char *data;
-    int width;
-    int height;
-    int depth;
-    int line_length;
-    int mem_length;
-
 #ifdef HAVE_LIBC
     int fd;
 #endif
@@ -316,7 +309,10 @@ struct fbfront_dev *init_fbfront(char *nodename, void *data, int width, int heig
     for (i = 0; mapped < mem_length && i < max_pd; i++) {
         unsigned long *pd = (unsigned long *) alloc_page();
         for (j = 0; mapped < mem_length && j < PAGE_SIZE / sizeof(unsigned long); j++) {
-            pd[j] = virt_to_mfn((unsigned long) data + mapped);
+            /* Trigger CoW */
+            * ((char *)data + mapped) = 0;
+            barrier();
+            pd[j] = virtual_to_mfn((unsigned long) data + mapped);
             mapped += PAGE_SIZE;
         }
         for ( ; j < PAGE_SIZE / sizeof(unsigned long); j++)
index 502f0330a205c2bab774841ae5cb41a55489db46..fa98942e76372487908cb5345b8d8ae4ea57de0c 100644 (file)
@@ -14,6 +14,9 @@
 #ifndef KEY_Q
 #define KEY_Q 16
 #endif
+#ifndef KEY_MAX
+#define KEY_MAX 0x1ff
+#endif
 
 
 struct kbdfront_dev;