ia64/xen-unstable

view linux-2.4.29-xen-sparse/include/asm-xen/vga.h @ 3887:4385894c52ae

bitkeeper revision 1.1230.2.4 (421a95cepOZORm0EbZfqBeZ6PZ8MwA)

Merge freefall.cl.cam.ac.uk:/auto/groups/xeno/users/cl349/BK/xen-unstable.bk
into freefall.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk
author iap10@freefall.cl.cam.ac.uk
date Tue Feb 22 02:15:42 2005 +0000 (2005-02-22)
parents 0a4b76b6b5a0
children
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