diff options
author | iap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk> | 2004-01-12 08:53:30 +0000 |
---|---|---|
committer | iap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk> | 2004-01-12 08:53:30 +0000 |
commit | 6b5b22582f098f13cce9926f03d17092789ffa5e (patch) | |
tree | c5d9ac81db9517973b9a74fb017f1c9c90fca012 /xenolinux-2.4.24-sparse/include/asm-xeno/vga.h | |
parent | abc73fe73e5760d1f6836ea098813f4d65d2c097 (diff) | |
download | xen-6b5b22582f098f13cce9926f03d17092789ffa5e.tar.gz xen-6b5b22582f098f13cce9926f03d17092789ffa5e.tar.bz2 xen-6b5b22582f098f13cce9926f03d17092789ffa5e.zip |
bitkeeper revision 1.671 (4002608aofyioMya1eWuIFZIJHQO4Q)
Upgrade to Linux version 2.4.24
Diffstat (limited to 'xenolinux-2.4.24-sparse/include/asm-xeno/vga.h')
-rw-r--r-- | xenolinux-2.4.24-sparse/include/asm-xeno/vga.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/xenolinux-2.4.24-sparse/include/asm-xeno/vga.h b/xenolinux-2.4.24-sparse/include/asm-xeno/vga.h new file mode 100644 index 0000000000..d0624cf480 --- /dev/null +++ b/xenolinux-2.4.24-sparse/include/asm-xeno/vga.h @@ -0,0 +1,42 @@ +/* + * Access to VGA videoram + * + * (c) 1998 Martin Mares <mj@ucw.cz> + */ + +#ifndef _LINUX_ASM_VGA_H_ +#define _LINUX_ASM_VGA_H_ + +#include <asm/io.h> + +extern unsigned char *vgacon_mmap; + +static unsigned long VGA_MAP_MEM(unsigned long x) +{ + if( vgacon_mmap == NULL ) + { + /* This is our first time in this function. This whole thing + is a rather grim hack. We know we're going to get asked + to map a 32KB region between 0xb0000 and 0xb8000 because + that's what VGAs are. We used the boot time permanent + fixed map region, and map it to machine pages. + */ + if( x != 0xb8000 ) + panic("Argghh! VGA Console is weird. 1:%08lx\n",x); + + vgacon_mmap = (unsigned char*) bt_ioremap( 0xa0000, 128*1024 ); + return (unsigned long) (vgacon_mmap+x-0xa0000); + } + else + { + if( x != 0xc0000 && x != 0xa0000 ) /* vidmem_end or charmap fonts */ + panic("Argghh! VGA Console is weird. 2:%08lx\n",x); + return (unsigned long) (vgacon_mmap+x-0xa0000); + } + return 0; +} + +static inline unsigned char vga_readb(unsigned char * x) { return (*(x)); } +static inline void vga_writeb(unsigned char x, unsigned char *y) { *(y) = (x); } + +#endif |