debuggers.hg

view xenolinux-2.4.21-sparse/include/asm-xeno/vga.h @ 672:2e36bfa1978c

bitkeeper revision 1.353 (3f13c7d5NDWHAyq2VYrx7Mqs7QYIfQ)

vga.h, keyboard.h, setup.c, ioport.c:
Cleanups.
author kaf24@scramble.cl.cam.ac.uk
date Tue Jul 15 09:22:29 2003 +0000 (2003-07-15)
parents 3a237a10a0c6
children 1e118e51c91f
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( 0xb8000, 32*1024 );
28 return (unsigned long) vgacon_mmap;
29 }
30 else
31 {
32 if( x != 0xc0000 )
33 panic("Argghh! VGA Console is weird. 2:%08lx\n",x);
35 return (unsigned long) vgacon_mmap + 0x8000;
36 }
37 return 0;
38 }
40 static inline unsigned char vga_readb(unsigned char * x) { return (*(x)); }
41 static inline void vga_writeb(unsigned char x, unsigned char *y) { *(y) = (x); }
43 #endif