ia64/xen-unstable

view linux-2.4-xen-sparse/include/asm-xen/vga.h @ 6552:a9873d384da4

Merge.
author adsharma@los-vmm.sc.intel.com
date Thu Aug 25 12:24:48 2005 -0700 (2005-08-25)
parents 112d44270733 fa0754a9f64f
children dfaf788ab18c
line source
1 /*
2 * Access to VGA videoram
3 *
4 * (c) 1998 Martin Mares <mj@ucw.cz>
5 */
7 #ifndef _LINUX_ASM_VGA_H_
8 #define _LINUX_ASM_VGA_H_
10 #include <asm/io.h>
12 extern unsigned char *vgacon_mmap;
14 static unsigned long VGA_MAP_MEM(unsigned long x)
15 {
16 if( vgacon_mmap == NULL )
17 {
18 /* This is our first time in this function. This whole thing
19 is a rather grim hack. We know we're going to get asked
20 to map a 32KB region between 0xb0000 and 0xb8000 because
21 that's what VGAs are. We used the boot time permanent
22 fixed map region, and map it to machine pages.
23 */
24 if( x != 0xb8000 )
25 panic("Argghh! VGA Console is weird. 1:%08lx\n",x);
27 vgacon_mmap = (unsigned char*) bt_ioremap( 0xa0000, 128*1024 );
28 return (unsigned long) (vgacon_mmap+x-0xa0000);
29 }
30 else
31 {
32 if( x != 0xc0000 && x != 0xa0000 ) /* vidmem_end or charmap fonts */
33 panic("Argghh! VGA Console is weird. 2:%08lx\n",x);
34 return (unsigned long) (vgacon_mmap+x-0xa0000);
35 }
36 return 0;
37 }
39 static inline unsigned char vga_readb(unsigned char * x) { return (*(x)); }
40 static inline void vga_writeb(unsigned char x, unsigned char *y) { *(y) = (x); }
42 #endif