debuggers.hg

view xenolinux-2.4.21-sparse/include/asm-xeno/vga.h @ 653:3a237a10a0c6

bitkeeper revision 1.344 (3f12be53t1VivuAfELH_J3XUhJ2Frg)

more console stuff
author iap10@labyrinth.cl.cam.ac.uk
date Mon Jul 14 14:29:39 2003 +0000 (2003-07-14)
parents 6879a4610638
children 2e36bfa1978c
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;
15 static unsigned long VGA_MAP_MEM(unsigned long x)
16 {
18 if( vgacon_mmap == NULL )
19 {
20 /* This is our first time in this function. This whole thing
21 is a rather grim hack. We know we're going to get asked
22 to map a 32KB region between 0xb0000 and 0xb8000 because
23 that's what VGAs are. We used the boot time permanent
24 fixed map region, and map it to machine pages.
25 */
27 if( x != 0xb8000 )
28 {
29 printk("Argghh! VGA Console is weird. 1:%08lx\n",x);
30 BUG();
31 }
33 vgacon_mmap = (unsigned char*) bt_ioremap( 0xb8000, 32*1024 );
34 //xprintk("VGA_MAP_MEM(%08x) first. return %p\n",x,vgacon_mmap);
35 return (unsigned long) vgacon_mmap;
36 }
37 else
38 {
39 if( x != 0xc0000 )
40 {
41 printk("Argghh! VGA Console is weird. 2:%08lx\n",x);
42 BUG();
43 }
44 //xprintk("VGA_MAP_MEM(%08x) second. return %p\n",x,(unsigned long) vgacon_mmap+0x8000);
46 return (unsigned long) vgacon_mmap + 0x8000;
48 }
49 return 0;
50 }
52 static inline unsigned char vga_readb(unsigned char * x) { return (*(x)); }
53 static inline void vga_writeb(unsigned char x, unsigned char *y) { *(y) = (x); }
55 #endif