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] Use ioremap instead of __va to map VGA memory area (to b

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Use ioremap instead of __va to map VGA memory area (to be uncached).
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 14 Apr 2006 17:00:14 +0000
Delivery-date: Fri, 14 Apr 2006 10:02:03 -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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 2ae003c45ffe0234b1274263b30d8cafd0f5a591
# Parent  c6557cad26707b50e4a0a003032396cbab4190e9
Use ioremap instead of __va to map VGA memory area (to be uncached).

Signed-off-by: Tristan Gingold <tristan.gingold@xxxxxxxx>

diff -r c6557cad2670 -r 2ae003c45ffe xen/drivers/char/console.c
--- a/xen/drivers/char/console.c        Fri Apr 14 13:33:53 2006
+++ b/xen/drivers/char/console.c        Fri Apr 14 13:37:19 2006
@@ -65,11 +65,12 @@
 #define COLUMNS     80
 #define LINES       25
 #define ATTRIBUTE    7
+#define VIDEO_SIZE  (COLUMNS * LINES * 2)
 
 /* Clear the screen and initialize VIDEO, XPOS and YPOS.  */
 static void cls(void)
 {
-    memset(video, 0, COLUMNS * LINES * 2);
+    memset(video, 0, VIDEO_SIZE);
     xpos = ypos = 0;
     outw(10+(1<<(5+8)), 0x3d4); /* cursor off */
 }
@@ -107,9 +108,9 @@
      * 
      * These checks are basically to detect headless server boxes.
      */
-    return (detect_video(__va(0xA0000)) || 
-            detect_video(__va(0xB0000)) || 
-            detect_video(__va(0xB8000)));
+    return (detect_video(ioremap(0xA0000, VIDEO_SIZE)) || 
+            detect_video(ioremap(0xB0000, VIDEO_SIZE)) || 
+            detect_video(ioremap(0xB8000, VIDEO_SIZE)));
 }
 
 /* This is actually code from vgaHWRestore in an old version of XFree86 :-) */
@@ -143,7 +144,7 @@
         return;
     }
 
-    video = __va(0xB8000);
+    video = ioremap(0xB8000, VIDEO_SIZE);
 
     tmp = inb(0x3da);
     outb(0x00, 0x3c0);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Use ioremap instead of __va to map VGA memory area (to be uncached)., Xen patchbot -unstable <=