From: Tristan Gingold Subject: PATCH: console.c: use ioremap instead of __va to map video memory Date: Fri, 14 Apr 2006 13:37:22 +0100 Message-ID: <200604141437.22342.Tristan.Gingold@bull.net> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_Ce5PEr6W2igXjhg" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com, Keir Fraser Cc: xen-ia64-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_Ce5PEr6W2igXjhg Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Hi, on ia64 you need to map video are as uncached memory. With this patch the vga console is now working on ia64. Tested on ia64 only. Tristan. --Boundary-00=_Ce5PEr6W2igXjhg Content-Transfer-Encoding: 7bit Content-Type: text/x-diff; charset="us-ascii"; name="xen-vga2.diffs" Content-Disposition: attachment; filename="xen-vga2.diffs" # HG changeset patch # User tristan.gingold@bull.net # Node ID ef77d9331c6790e90d9bfb544fce0d8aa07df04d # Parent 0771620083f2a53354b8ed4146938a9349a825f5 Use ioremap instead of __va to map VGA memory area (to be uncached). Signed-off-by: Tristan Gingold diff -r 0771620083f2 -r ef77d9331c67 xen/drivers/char/console.c --- a/xen/drivers/char/console.c Fri Apr 14 07:14:22 2006 +++ b/xen/drivers/char/console.c Fri Apr 14 08:14:02 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); --Boundary-00=_Ce5PEr6W2igXjhg Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_Ce5PEr6W2igXjhg--