direct-io.hg

changeset 9651:2ae003c45ffe

Use ioremap instead of __va to map VGA memory area (to be uncached).

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author kaf24@firebug.cl.cam.ac.uk
date Fri Apr 14 14:37:19 2006 +0100 (2006-04-14)
parents c6557cad2670
children 5c477ad95dba
files xen/drivers/char/console.c
line diff
     1.1 --- a/xen/drivers/char/console.c	Fri Apr 14 14:33:53 2006 +0100
     1.2 +++ b/xen/drivers/char/console.c	Fri Apr 14 14:37:19 2006 +0100
     1.3 @@ -65,11 +65,12 @@ spinlock_t console_lock = SPIN_LOCK_UNLO
     1.4  #define COLUMNS     80
     1.5  #define LINES       25
     1.6  #define ATTRIBUTE    7
     1.7 +#define VIDEO_SIZE  (COLUMNS * LINES * 2)
     1.8  
     1.9  /* Clear the screen and initialize VIDEO, XPOS and YPOS.  */
    1.10  static void cls(void)
    1.11  {
    1.12 -    memset(video, 0, COLUMNS * LINES * 2);
    1.13 +    memset(video, 0, VIDEO_SIZE);
    1.14      xpos = ypos = 0;
    1.15      outw(10+(1<<(5+8)), 0x3d4); /* cursor off */
    1.16  }
    1.17 @@ -107,9 +108,9 @@ static int detect_vga(void)
    1.18       * 
    1.19       * These checks are basically to detect headless server boxes.
    1.20       */
    1.21 -    return (detect_video(__va(0xA0000)) || 
    1.22 -            detect_video(__va(0xB0000)) || 
    1.23 -            detect_video(__va(0xB8000)));
    1.24 +    return (detect_video(ioremap(0xA0000, VIDEO_SIZE)) || 
    1.25 +            detect_video(ioremap(0xB0000, VIDEO_SIZE)) || 
    1.26 +            detect_video(ioremap(0xB8000, VIDEO_SIZE)));
    1.27  }
    1.28  
    1.29  /* This is actually code from vgaHWRestore in an old version of XFree86 :-) */
    1.30 @@ -143,7 +144,7 @@ static void init_vga(void)
    1.31          return;
    1.32      }
    1.33  
    1.34 -    video = __va(0xB8000);
    1.35 +    video = ioremap(0xB8000, VIDEO_SIZE);
    1.36  
    1.37      tmp = inb(0x3da);
    1.38      outb(0x00, 0x3c0);