root/drivers/char/suncons.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. __set_origin
  2. hide_cursor
  3. cursor_reverse
  4. set_cursor
  5. render_screen
  6. con_type_init
  7. get_scrmem
  8. set_scrmem
  9. set_get_font
  10. con_adjust_height
  11. set_get_cmap
  12. sun_clear_screen
  13. vesa_blank
  14. vesa_unblank
  15. set_vesa_blanking
  16. vesa_powerdown
  17. fb_open
  18. fb_ioctl
  19. fb_close
  20. fb_mmap
  21. set_palette
  22. console_restore_palette
  23. srmmu_get_pte
  24. get_phys
  25. cg6_restore_palette
  26. cg6_mmap
  27. cg6_loadcmap
  28. cg6_setcursor
  29. cg6_scursor
  30. cg6_ioctl
  31. cg6_setup
  32. cg3_loadcmap
  33. cg3_mmap
  34. cg3_setup
  35. bwtwo_mmap
  36. bwtwo_blank
  37. bwtwo_unblank
  38. bwtwo_setup
  39. known_card
  40. sparc_console_probe
  41. sun_console_init
  42. sun_blitc

   1 /* suncons.c: Sun SparcStation console support.
   2  *
   3  * Copyright (C) 1995 Peter Zaitcev (zaitcev@lab.ipmce.su)
   4  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
   5  * Copyright (C) 1995 Miguel de Icaza (miguel@nuclecu.unam.mx)
   6  *
   7  * Added font loading Nov/21, Miguel de Icaza (miguel@nuclecu.unam.mx)
   8  * Added render_screen and faster scrolling Nov/27, miguel
   9  * Added console palette code for cg6 Dec/13/95, miguel
  10  * Added generic frame buffer support Dec/14/95, miguel
  11  * Added cgsix and bwtwo drivers Jan/96, miguel
  12  * Added 4m, and cg3 driver Feb/96, miguel
  13  * Fixed the cursor on color displays Feb/96, miguel.
  14  *
  15  * Cleaned up the detection code, generic 8bit depth display 
  16  * code, Mar/96 miguel
  17  * 
  18  * This file contains the frame buffer device drivers.
  19  * Each driver is kept together in case we would like to
  20  * split this file.
  21  *
  22  * Much of this driver is derived from the DEC TGA driver by
  23  * Jay Estabrook who has done a nice job with the console
  24  * driver abstraction btw.
  25  *
  26  * We try to make everything a power of two if possible to
  27  * speed up the bit blit.  Doing multiplies, divides, and
  28  * remainder routines end up calling software library routines
  29  * since not all Sparcs have the hardware to do it.
  30  *
  31  * TODO:
  32  * do not use minor to index into instances of the frame buffer,
  33  * since the numbers assigned to us are not consecutive.
  34  *
  35  * do not blank the screen when frame buffer is mapped.
  36  *
  37  * Change the detection loop to use more than one video card.
  38  */
  39 
  40 
  41 /* Define this one if you are debugging something in X, it will not disable the console output */
  42 /* #define DEBUGGING_X */
  43 /* See also: sparc/keyboard.c: CODING_NEW_DRIVER */
  44 
  45 #define GRAPHDEV_MAJOR 29
  46 
  47 #define FRAME_BUFFERS 1
  48 
  49 #include <linux/sched.h>
  50 #include <linux/timer.h>
  51 #include <linux/interrupt.h>
  52 #include <linux/tty.h>
  53 #include <linux/tty_flip.h>
  54 #include <linux/kernel.h>
  55 #include <linux/string.h>
  56 #include <linux/errno.h>
  57 #include <linux/kd.h>
  58 #include <linux/malloc.h>
  59 #include <linux/major.h>
  60 #include <linux/mm.h>
  61 #include <linux/types.h>
  62 
  63 #include <asm/system.h>
  64 #include <asm/segment.h>
  65 #include <asm/page.h>
  66 #include <asm/pgtable.h>
  67 #include <asm/bitops.h>
  68 #include <asm/oplib.h>
  69 #include <asm/sbus.h>
  70 #include <asm/fbio.h>
  71 #include <asm/io.h>
  72 #include <asm/pgtsun4c.h>       /* for the sun4c_nocache */
  73 
  74 #include "kbd_kern.h"
  75 #include "vt_kern.h"
  76 #include "consolemap.h"
  77 #include "selection.h"
  78 #include "console_struct.h"
  79 
  80 #define cmapsz 8192
  81 
  82 extern void register_console(void (*proc)(const char *));
  83 extern void console_print(const char *);
  84 extern unsigned char vga_font[];
  85 extern int graphics_on;
  86 extern int serial_console;
  87 
  88 /* Based upon what the PROM tells us, we can figure out where
  89  * the console is currently located.  The situation can be either
  90  * of the following two scenarios:
  91  *
  92  * 1) Console i/o is done over the serial line, ttya or ttyb
  93  * 2) Console output on frame buffer (video card) and input
  94  *    coming from the keyboard/mouse which each use a zilog8530
  95  *    serial channel a piece.
  96  */
  97 
  98 /* The following variables describe a Sparc console. */
  99 
 100 /* From the PROM */
 101 static char con_name[40];
 102 
 103 /* Screen dimensions and color depth. */
 104 static int con_depth, con_width, con_height, con_type;
 105 
 106 static int con_linebytes;
 107 
 108 /* Base address of first line. */
 109 static unsigned char *con_fb_base;
 110 
 111 /* Screen parameters: we compute those at startup to make the code faster */
 112 static int chars_per_line;      /* number of bytes per line */
 113 static int ints_per_line;       /* number of ints per  line */
 114 static int skip_bytes;          /* number of bytes we skip for the y margin */
 115 static int x_margin, y_margin;  /* the x and y margins */
 116 static int bytes_per_row;       /* bytes used by one screen line (of 16 scan lines)  */
 117 
 118 /* Functions used by the SPARC dependent console code
 119  * to perform the restore_palette function.
 120  */
 121 static void (*restore_palette)(void);
 122 void set_palette (void);
 123 
 124 
 125  /* Our screen looks like at 1152 X 900:
 126  *
 127  *  0,0
 128  *      ------------------------------------------------------------------
 129  *      |                          ^^^^^^^^^^^                           |
 130  *      |                          18 y-pixels                           |
 131  *      |                          ^^^^^^^^^^^                           |
 132  *   13 | <-64 pixels->|  <-- 128 8x16 characters -->    | <-64 pixels-> |
 133  *    ....
 134  *                         54 chars from top to bottom
 135  *    ....
 136  *  888 | <-64 pixels->|  <-- 128 8x16 characters -->    | <-64 pixels-> |
 137  *      |                          ^^^^^^^^^^^                           |
 138  *      |                          18 y-pixels                           |
 139  *      |                          ^^^^^^^^^^^                           |
 140  *      ------------------------------------------------------------------
 141  */
 142 /* First for MONO displays. */
 143 #define SCREEN_WIDTH     1152     /* Screen width in pixels  */
 144 #define SCREEN_HEIGHT    900      /* Screen height in pixels */
 145 #define CHARS_PER_LINE   144      /* Make this empirical for speed */
 146 #define NICE_Y_MARGIN    18       /* We skip 18 y-pixels at top/bottom */
 147 #define NICE_X_MARGIN    8        /* We skip 64 x-pixels at left/right */
 148 #define FBUF_TOP_SKIP    2592     /* Empirical, (CHARS_PER_LINE * NICE_Y_MARGIN) */
 149 #define CHAR_HEIGHT      16
 150 #define ONE_ROW          2304     /* CHARS_PER_LINE * CHAR_HEIGHT */
 151 
 152 /* Now we have this, to compute the base frame buffer position
 153  * for a new character to be rendered. 1 and 8 bit depth.
 154  */
 155 #define FBUF_OFFSET(cindex) \
 156         (((FBUF_TOP_SKIP) + (((cindex)>>7) * ONE_ROW)) + \
 157          ((NICE_X_MARGIN) + (((cindex)&127))))
 158 
 159 
 160 #define COLOR_FBUF_OFFSET(cindex) \
 161         (((skip_bytes) + (((cindex)>>7) * bytes_per_row)) + \
 162          ((x_margin) + (((cindex)&127) << 3)))
 163 
 164 void
 165 __set_origin(unsigned short offset)
     /* [previous][next][first][last][top][bottom][index][help] */
 166 {
 167         /*
 168          * should not be called, but if so, do nothing...
 169          */
 170 }
 171 
 172 /* For the cursor, we just invert the 8x16 block at the cursor
 173  * location.  Easy enough...
 174  *
 175  * Hide the cursor from view, during blanking, usually...
 176  */
 177 static int cursor_pos = -1;
 178 void
 179 hide_cursor(void)
     /* [previous][next][first][last][top][bottom][index][help] */
 180 {
 181         unsigned long flags;
 182         int j;
 183 
 184         save_flags(flags); cli();
 185 
 186         if(cursor_pos == -1) {
 187                 restore_flags (flags);
 188                 return;
 189         }
 190         /* We just zero out the area for now.  Certain graphics
 191          * cards like the cg6 have a hardware cursor that we could
 192          * use, but this is an optimization for some time later.
 193          */
 194         switch (con_depth){
 195         case 1: {
 196                 unsigned char *dst;
 197                 dst = (unsigned char *)((unsigned long)con_fb_base +
 198                                         FBUF_OFFSET(cursor_pos));
 199                 for(j = 0; j < CHAR_HEIGHT; j++, dst += CHARS_PER_LINE)
 200                         *dst = ~(0);
 201                 break;
 202         }
 203         case 8: {
 204                 unsigned long *dst;
 205                 const    int ipl = ints_per_line;
 206                 
 207                 dst = (unsigned long *)((unsigned long)con_fb_base + COLOR_FBUF_OFFSET(cursor_pos));
 208                 for(j = 0; j < CHAR_HEIGHT; j++, dst += ipl) {
 209                         *dst = ~(0UL);
 210                         *(dst + 1) = ~(0UL);
 211                 }
 212                 break;
 213         }
 214         default:
 215                 break;
 216         }
 217         restore_flags(flags);
 218 }
 219 
 220 /* The idea is the following:
 221  * we only use the colors in the range 0..15, and we only
 222  * setup the palette on that range, so we better keep the
 223  * pixel inversion using those colors, that's why we have
 224  * those constants below.
 225  */
 226 inline static void
 227 cursor_reverse (long *dst, int height, const int ints_on_line)
     /* [previous][next][first][last][top][bottom][index][help] */
 228 {
 229     int j;
 230 
 231     for (j = 0; j < height; j++){
 232         *dst     = ~(*dst)     & 0x0f0f0f0f;
 233         *(dst+1) = ~(*(dst+1)) & 0x0f0f0f0f;
 234         dst += ints_on_line;
 235     }
 236 }
 237 
 238 void
 239 set_cursor(int currcons)
     /* [previous][next][first][last][top][bottom][index][help] */
 240 {
 241         int j, idx, oldpos;
 242         unsigned long flags;
 243 
 244         if (currcons != fg_console || console_blanked || vcmode == KD_GRAPHICS)
 245                 return;
 246 
 247         if (__real_origin != __origin)
 248                 __set_origin(__real_origin);
 249 
 250         save_flags(flags); cli();
 251 
 252         idx = (pos - video_mem_base) >> 1;
 253         oldpos = cursor_pos;
 254         cursor_pos = idx;
 255         if (!deccm) {
 256                 hide_cursor ();
 257                 restore_flags (flags);
 258                 return;
 259         }
 260         switch (con_depth){
 261         case 1: {
 262                 unsigned char *dst, *opos;
 263                 
 264                 dst = (unsigned char *)((unsigned long)con_fb_base + FBUF_OFFSET(idx));
 265                 opos = (unsigned char *)((unsigned long)con_fb_base + FBUF_OFFSET(oldpos));
 266                 if(oldpos != -1) {
 267                         /* Restore what was at the old position */
 268                         for(j=0; j < CHAR_HEIGHT; j++, opos += CHARS_PER_LINE) {
 269                                 *opos = ~*opos;
 270                         }
 271                 }
 272                 for(j=0; j < 16; j++, dst+=CHARS_PER_LINE) {
 273                         *dst = ~*dst;
 274                 }
 275                 break;
 276         }
 277         case 8: {
 278                 unsigned long *dst, *opos;
 279                 dst = (unsigned long *)((unsigned long)con_fb_base + COLOR_FBUF_OFFSET(idx));
 280                 opos = (unsigned long *)((unsigned long)con_fb_base + COLOR_FBUF_OFFSET(oldpos));
 281                         
 282                 if(oldpos != -1) 
 283                         cursor_reverse(opos, CHAR_HEIGHT, ints_per_line);
 284                 cursor_reverse (dst, CHAR_HEIGHT, ints_per_line);
 285                 break;
 286         }
 287         default:
 288         }
 289         restore_flags(flags);
 290 }
 291 
 292 /*
 293  * Render the current screen
 294  * Only used at startup to avoid the caching that is being done in selection.h
 295  */
 296 static void
 297 render_screen(void)
     /* [previous][next][first][last][top][bottom][index][help] */
 298 {
 299     int count;
 300     unsigned short *contents;
 301 
 302     count = video_num_columns * video_num_lines;
 303     contents = (unsigned short *) video_mem_base;
 304     
 305     for (;count--; contents++)
 306         sun_blitc (*contents, (unsigned long) contents);
 307 }
 308 
 309 unsigned long
 310 con_type_init(unsigned long kmem_start, const char **display_desc)
     /* [previous][next][first][last][top][bottom][index][help] */
 311 {
 312         can_do_color = (con_type != FBTYPE_SUN2BW);
 313 
 314         video_type = VIDEO_TYPE_SUN;
 315         *display_desc = "SUN";
 316 
 317         if (!serial_console) {
 318                 /* If we fall back to PROM than our output have to remain readable. */
 319                 prom_putchar('\033');  prom_putchar('[');  prom_putchar('H');
 320 
 321                 /*
 322                  * fake the screen memory with some CPU memory
 323                  */
 324                 video_mem_base = kmem_start;
 325                 kmem_start += video_screen_size;
 326                 video_mem_term = kmem_start;
 327 
 328                 render_screen();
 329         }
 330         return kmem_start;
 331 }
 332 
 333 /*
 334  * NOTE: get_scrmem() and set_scrmem() are here only because
 335  * the VGA version of set_scrmem() has some direct VGA references.
 336  */
 337 void
 338 get_scrmem(int currcons)
     /* [previous][next][first][last][top][bottom][index][help] */
 339 {
 340         memcpyw((unsigned short *)vc_scrbuf[currcons],
 341                 (unsigned short *)origin, video_screen_size);
 342         origin = video_mem_start = (unsigned long)vc_scrbuf[currcons];
 343         scr_end = video_mem_end = video_mem_start + video_screen_size;
 344         pos = origin + y*video_size_row + (x<<1);
 345 }
 346 
 347 void
 348 set_scrmem(int currcons, long offset)
     /* [previous][next][first][last][top][bottom][index][help] */
 349 {
 350         if (video_mem_term - video_mem_base < offset + video_screen_size)
 351                 offset = 0;
 352         memcpyw((unsigned short *)(video_mem_base + offset),
 353                 (unsigned short *) origin, video_screen_size);
 354         video_mem_start = video_mem_base;
 355         video_mem_end = video_mem_term;
 356         origin = video_mem_base + offset;
 357         scr_end = origin + video_screen_size;
 358         pos = origin + y*video_size_row + (x<<1);
 359 }
 360 
 361 /*
 362  * PIO_FONT support.
 363  */
 364 int
 365 set_get_font(char * arg, int set, int ch512)
     /* [previous][next][first][last][top][bottom][index][help] */
 366 {
 367         int error, i, line;
 368 
 369         if (!arg)
 370                 return -EINVAL;
 371         error = verify_area (set ? VERIFY_READ : VERIFY_WRITE, (void *) arg,
 372                              ch512 ? 2* cmapsz : cmapsz);
 373         if (error)
 374                 return error;
 375 
 376         /* download the current font */
 377         if (!set){
 378                 memset (arg, 0, cmapsz);
 379                 for (i = 0; i < 256; i++)
 380                     for (line = 0; line < CHAR_HEIGHT; line++)
 381                         put_user (vga_font [i], arg+(i*32+line));
 382                 return 0;
 383         }
 384         
 385         /* set the font */
 386         for (i = 0; i < 256; i++)
 387                 for (line = 0; line < CHAR_HEIGHT; line++){
 388                         vga_font [i*CHAR_HEIGHT + line] = (get_user (arg + (i * 32 + line)));
 389                         if (con_depth == 1)
 390                                 vga_font [i*CHAR_HEIGHT + line] = vga_font [i*CHAR_HEIGHT + line];
 391                 }
 392         return 0;
 393 }
 394 
 395 /*
 396  * Adjust the screen to fit a font of a certain height
 397  *
 398  * Returns < 0 for error, 0 if nothing changed, and the number
 399  * of lines on the adjusted console if changed.
 400  *
 401  * for now, we only support the built-in font...
 402  */
 403 int
 404 con_adjust_height(unsigned long fontheight)
     /* [previous][next][first][last][top][bottom][index][help] */
 405 {
 406         return -EINVAL;
 407 }
 408 
 409 int
 410 set_get_cmap(unsigned char * arg, int set)
     /* [previous][next][first][last][top][bottom][index][help] */
 411 {
 412         int i;
 413 
 414         i = verify_area(set ? VERIFY_READ : VERIFY_WRITE, (void *)arg, 16*3);
 415         if (i)
 416                 return i;
 417 
 418         for (i=0; i<16; i++) {
 419                 if (set) {
 420                         default_red[i] = get_user(arg++) ;
 421                         default_grn[i] = get_user(arg++) ;
 422                         default_blu[i] = get_user(arg++) ;
 423                 } else {
 424                         put_user (default_red[i], arg++) ;
 425                         put_user (default_grn[i], arg++) ;
 426                         put_user (default_blu[i], arg++) ;
 427                 }
 428         }
 429         if (set) {
 430                 for (i=0; i<MAX_NR_CONSOLES; i++)
 431                         if (vc_cons_allocated(i)) {
 432                                 int j, k ;
 433                                 for (j=k=0; j<16; j++) {
 434                                         vc_cons[i].d->vc_palette[k++] = default_red[j];
 435                                         vc_cons[i].d->vc_palette[k++] = default_grn[j];
 436                                         vc_cons[i].d->vc_palette[k++] = default_blu[j];
 437                                 }
 438                         }
 439                 set_palette();
 440         }
 441 
 442         return 0;
 443 }
 444 
 445 
 446 void
 447 sun_clear_screen(void)
     /* [previous][next][first][last][top][bottom][index][help] */
 448 {
 449         memset (con_fb_base, (con_depth == 1 ? ~(0) : (0)),
 450                 (con_depth * con_height * con_width) / 8);
 451         /* also clear out the "shadow" screen memory */
 452         memset((char *)video_mem_base, 0, (video_mem_term - video_mem_base));
 453 }
 454 
 455 /*
 456  * dummy routines for the VESA blanking code, which is VGA only,
 457  * so we don't have to carry that stuff around for the Sparc...
 458  */
 459 void vesa_blank(void)
     /* [previous][next][first][last][top][bottom][index][help] */
 460 {
 461 }
 462 void vesa_unblank(void)
     /* [previous][next][first][last][top][bottom][index][help] */
 463 {
 464 }
 465 void set_vesa_blanking(const unsigned long arg)
     /* [previous][next][first][last][top][bottom][index][help] */
 466 {
 467 }
 468 
 469 void vesa_powerdown(void)
     /* [previous][next][first][last][top][bottom][index][help] */
 470 {
 471 }
 472 
 473 #undef color
 474 /* cg6 cursor status, kernel tracked copy */
 475 struct cg6_cursor {
 476         short   enable;         /* cursor is enabled */
 477         struct  fbcurpos cpos;  /* position */
 478         struct  fbcurpos chot;  /* hot-spot */
 479         struct  fbcurpos size;  /* size of mask & image fields */
 480         int     bits[2][32];    /* space for mask & image bits */
 481         char    color [6];      /* cursor colors */
 482 };
 483 
 484 struct cg6_info {
 485         struct bt_regs *bt;     /* color control */
 486         void *fbc;
 487         struct cg6_fhc *fhc;
 488         struct cg6_tec *tec;
 489         struct cg6_thc *thc;
 490         struct cg6_cursor cursor; /* cursor control */
 491         void *dhc;
 492 };
 493 
 494 struct bwtwo_info {
 495         struct bwtwo_regs *regs;
 496 };
 497 
 498 struct cg3_info {
 499         struct bt_regs *bt;     /* brooktree (color) registers */
 500 };
 501 
 502 /* Array holding the information for the frame buffers */
 503 typedef struct {
 504         union {
 505                 struct bwtwo_info bwtwo;
 506                 struct cg3_info   cg3;
 507                 struct cg6_info   cg6;
 508         } info;                 /* per frame information */
 509         int    space;           /* I/O space this card resides in */
 510         int    blanked;         /* true if video blanked */
 511         int    open;            /* is this fb open? */
 512         int    mmaped;          /* has this fb been mmapped? */
 513         int    vtconsole;       /* virtual console where it is opened */
 514         long   base;            /* frame buffer base    */
 515         struct fbtype type;     /* frame buffer type    */
 516         int    (*mmap)(struct inode *, struct file *, struct vm_area_struct *, long fb_base, void *);
 517         void   (*loadcmap)(void *this, int index, int count);
 518         void   (*blank)(void *this);
 519         void   (*unblank)(void *this);
 520         int    (*ioctl)(struct inode *, struct file *, unsigned int, unsigned long, void *);
 521 } fbinfo_t;
 522 
 523 static fbinfo_t fbinfo [FRAME_BUFFERS];
 524 
 525 /* We need to keep a copy of the color map to answer ioctl requests */
 526 static union {
 527         unsigned char   map[256][3];    /* reasonable way to access */
 528         unsigned int    raw[256*3/4];   /* hardware wants it like this */
 529 } color_map;
 530 
 531 #define FB_MMAP_VM_FLAGS (VM_SHM| VM_LOCKED)
 532 
 533 static int
 534 fb_open (struct inode * inode, struct file * file)
     /* [previous][next][first][last][top][bottom][index][help] */
 535 {
 536         int minor = MINOR (inode->i_rdev);
 537 
 538         if (minor >= FRAME_BUFFERS)
 539                 return -EBADF;
 540         if (fbinfo [minor].open)
 541                 return -EBUSY;
 542         fbinfo [minor].open = 1;
 543         fbinfo [minor].mmaped = 0;
 544         return 0;
 545 }
 546 
 547 static int
 548 fb_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
     /* [previous][next][first][last][top][bottom][index][help] */
 549 {
 550         int minor = MINOR (inode->i_rdev);
 551         fbinfo_t *fb;
 552         struct fbcmap *cmap;
 553         int i;
 554         
 555         if (minor >= FRAME_BUFFERS)
 556                 return -EBADF;
 557         fb = &fbinfo [minor];
 558         
 559         switch (cmd){
 560         case FBIOGTYPE:         /* return frame buffer type */
 561                 i = verify_area (VERIFY_WRITE, (void *) arg, sizeof (struct fbtype));
 562                 if (i) return i;
 563                 *(struct fbtype *)arg = (fb->type);
 564                 break;
 565         case FBIOGATTR:{
 566                 struct fbgattr *fba = (struct fbgattr *) arg;
 567                 
 568                 i = verify_area (VERIFY_WRITE, (void *) arg, sizeof (struct fbgattr));
 569                 if (i) return i;
 570                 fba->real_type = fb->type.fb_type;
 571                 fba->owner = 0;
 572                 fba->fbtype = fb->type;
 573                 fba->sattr.flags = 0;
 574                 fba->sattr.emu_type = fb->type.fb_type;
 575                 fba->sattr.dev_specific [0] = -1;
 576                 fba->emu_types [0] = fb->type.fb_type;
 577                 fba->emu_types [1] = -1;
 578                 break;
 579         }
 580         case FBIOSVIDEO:
 581                 i = verify_area(VERIFY_READ, (void *)arg, sizeof(int));
 582                 if (i) return i;
 583                 
 584                 if (*(int *)arg){
 585                         if (!fb->blanked || !fb->unblank)
 586                                 break;
 587                         (*fb->unblank)(fb);
 588                         fb->blanked = 0;
 589                 } else {
 590                         if (fb->blanked || !fb->blank)
 591                                 break;
 592                         (*fb->blank)(fb);
 593                         fb->blanked = 1;
 594                 }
 595                 break;
 596         case FBIOGVIDEO:
 597                 i = verify_area (VERIFY_WRITE, (void *) arg, sizeof (int));
 598                 if (i) return i;
 599                 *(int *) arg = fb->blanked;
 600                 break;
 601         case FBIOPUTCMAP: {     /* load color map entries */
 602                 char *rp, *gp, *bp;
 603                 int end, count;;
 604                 
 605                 if (!fb->loadcmap)
 606                         return -EINVAL;
 607                 i = verify_area (VERIFY_READ, (void *) arg, sizeof (struct fbcmap));
 608                 if (i) return i;
 609                 cmap = (struct fbcmap *) arg;
 610                 count = cmap->count;
 611                 if ((cmap->index < 0) || (cmap->index > 255))
 612                         return -EINVAL;
 613                 if (cmap->index + count > 256)
 614                         count = 256 - cmap->index;
 615                 i = verify_area (VERIFY_READ, rp = cmap->red, cmap->count);
 616                 if (i) return i;
 617                 i = verify_area (VERIFY_READ, gp = cmap->green, cmap->count);
 618                 if (i) return i;
 619                 i = verify_area (VERIFY_READ, bp = cmap->blue, cmap->count);
 620                 if (i) return i;
 621 
 622                 end = cmap->index + count;
 623                 for (i = cmap->index; i < end; i++){
 624                         color_map.map [i][0] = *rp++;
 625                         color_map.map [i][1] = *gp++;
 626                         color_map.map [i][2] = *bp++;
 627                 }
 628                 (*fb->loadcmap)(fb, cmap->index, count);
 629                 break;                  
 630         }
 631 
 632         default:
 633                 if (fb->ioctl){
 634                         i = fb->ioctl (inode, file, cmd, arg, fb);
 635                         if (i == -EINVAL)
 636                                 printk ("[[FBIO: %8.8x]]\n", cmd);
 637                         return i;
 638                 }
 639                 printk ("[[FBIO: %8.8x]]\n", cmd);
 640                 return -EINVAL;
 641         }
 642         return 0;
 643 }
 644 
 645 static void
 646 fb_close (struct inode * inode, struct file *filp)
     /* [previous][next][first][last][top][bottom][index][help] */
 647 {
 648         int minor = MINOR(inode->i_rdev);
 649         struct fbcursor cursor;
 650         
 651         if (minor >= FRAME_BUFFERS)
 652                 return;
 653         if (fbinfo [minor].open)
 654                 fbinfo [minor].open = 0;
 655         vt_cons [fbinfo [minor].vtconsole]->vc_mode = KD_TEXT;
 656 
 657         /* Leaving graphics mode, turn off the cursor */
 658         graphics_on = 0;
 659         if (fbinfo [minor].mmaped)
 660                 sun_clear_screen ();
 661         cursor.set    = FB_CUR_SETCUR;
 662         cursor.enable = 0;
 663         fb_ioctl (inode, filp, FBIOSCURPOS, (unsigned long) &cursor);
 664         set_palette ();
 665         render_screen ();
 666         return;
 667 }
 668 
 669 static int
 670 fb_mmap (struct inode *inode, struct file *file, struct vm_area_struct *vma)
     /* [previous][next][first][last][top][bottom][index][help] */
 671 {
 672         int minor = MINOR (inode->i_rdev);
 673         fbinfo_t *fb;
 674 
 675         if (minor >= FRAME_BUFFERS)
 676                 return -ENXIO;
 677         /* FIXME: the fg_console below should actually be the
 678          * console on which the invoking process is running
 679          */
 680         if (vt_cons [fg_console]->vc_mode == KD_GRAPHICS)
 681                 return -ENXIO;
 682         fbinfo [minor].vtconsole = fg_console;
 683         fb = &fbinfo [minor];
 684 
 685         if (fb->mmap){
 686                 int v;
 687                 
 688                 v = (*fb->mmap)(inode, file, vma, fb->base, fb);
 689                 if (v) return v;
 690                 fbinfo [minor].mmaped = 1;
 691                 vt_cons [fg_console]->vc_mode = KD_GRAPHICS;
 692                 graphics_on = 1;
 693                 return 0;
 694         } else
 695                 return -ENXIO;
 696 }
 697 
 698 static struct file_operations graphdev_fops =
 699 {
 700         NULL,                   /* lseek */
 701         NULL,                   /* read */
 702         NULL,                   /* write */
 703         NULL,                   /* readdir */
 704         NULL,                   /* select */
 705         fb_ioctl,
 706         fb_mmap,
 707         fb_open,                /* open */
 708         fb_close,               /* close */
 709 };
 710 
 711 /* Call the frame buffer routine for setting the palette */
 712 void
 713 set_palette (void)
     /* [previous][next][first][last][top][bottom][index][help] */
 714 {
 715         if (console_blanked || vt_cons [fg_console]->vc_mode == KD_GRAPHICS)
 716                 return;
 717 
 718         if (fbinfo [0].loadcmap){
 719                 int i, j;
 720         
 721                 /* First keep color_map with the palette colors */
 722                 for (i = 0; i < 16; i++){
 723                         j = color_table [i];
 724                         color_map.map [i][0] = default_red [j];
 725                         color_map.map [i][1] = default_grn [j];
 726                         color_map.map [i][2] = default_blu [j];
 727                 }
 728                 (*fbinfo [0].loadcmap)(&fbinfo [0], 0, 16);
 729         }
 730 }
 731 
 732 /* Called when returning to prom */
 733 void
 734 console_restore_palette (void)
     /* [previous][next][first][last][top][bottom][index][help] */
 735 {
 736         if (restore_palette)
 737                 (*restore_palette) ();
 738 }
 739 
 740 /* This routine should be moved to srmmu.c */
 741 static __inline__ unsigned int
 742 srmmu_get_pte (unsigned long addr)
     /* [previous][next][first][last][top][bottom][index][help] */
 743 {
 744         register unsigned long entry;
 745 
 746         __asm__ __volatile__("\n\tlda [%1] %2,%0\n\t" :
 747                              "=r" (entry):
 748                              "r" ((addr & 0xfffff000) | 0x400), "i" (ASI_M_FLUSH_PROBE));
 749         return entry;
 750 }
 751 
 752 unsigned int
 753 get_phys (unsigned int addr)
     /* [previous][next][first][last][top][bottom][index][help] */
 754 {
 755         switch (sparc_cpu_model){
 756         case sun4c:
 757                 return sun4c_get_pte (addr) << PAGE_SHIFT;
 758         case sun4m:
 759                 return ((srmmu_get_pte (addr) & 0xffffff00) << 4);
 760         default:
 761                 panic ("get_phys called for unsupported cpu model\n");
 762                 return 0;
 763         }
 764 }
 765 
 766 /* CG6 support code */
 767 
 768 /* Offset of interesting structures in the OBIO space */
 769 /*
 770  * Brooktree is the video dac and is funny to program on the cg6.
 771  * (it's even funnier on the cg3)
 772  * The FBC could be the the frame buffer control
 773  * The FHC could be the frame buffer hardware control.
 774  */
 775 #define CG6_ROM_OFFSET       0x0
 776 #define CG6_BROOKTREE_OFFSET 0x200000
 777 #define CG6_DHC_OFFSET       0x240000
 778 #define CG6_ALT_OFFSET       0x280000
 779 #define CG6_FHC_OFFSET       0x300000
 780 #define CG6_THC_OFFSET       0x301000
 781 #define CG6_FBC_OFFSET       0x700000
 782 #define CG6_TEC_OFFSET       0x701000
 783 #define CG6_RAM_OFFSET       0x800000
 784 
 785 struct bt_regs {
 786         unsigned int  addr;     /* address register */
 787         unsigned int  color_map; /* color map */
 788         unsigned int  control;  /* control register */
 789         unsigned int  cursor;   /* cursor map register */
 790 };
 791 
 792 /* The contents are unknown */
 793 struct cg6_tec {
 794         int tec_matrix;
 795         int tec_clip;
 796         int tec_vdc;
 797 };
 798 
 799 struct cg6_thc {
 800         unsigned int thc_xxx0[512];  /* ??? */
 801         unsigned int thc_hsync1;     /* hsync timing */
 802         unsigned int thc_hsync2;
 803         unsigned int thc_hsync3;
 804         unsigned int thc_vsync1;     /* vsync timing */
 805         unsigned int thc_vsync2;
 806         unsigned int thc_refresh;
 807         unsigned int thc_misc;
 808         unsigned int thc_xxx1[56];
 809         unsigned int thc_cursxy;             /* cursor x,y position (16 bits each) */
 810         unsigned int thc_cursmask[32];       /* cursor mask bits */
 811         unsigned int thc_cursbits[32];       /* what to show where mask enabled */
 812 };
 813 
 814 static void
 815 cg6_restore_palette (void)
     /* [previous][next][first][last][top][bottom][index][help] */
 816 {
 817         volatile struct bt_regs *bt;
 818 
 819         bt = fbinfo [0].info.cg6.bt;
 820         bt->addr = 0;
 821         bt->color_map = 0xffffffff;
 822         bt->color_map = 0xffffffff;
 823         bt->color_map = 0xffffffff;
 824 }
 825 
 826 /* Ugh: X wants to mmap a bunch of cute stuff at the same time :-( */
 827 /* So, we just mmap the things that are being asked for */
 828 static int
 829 cg6_mmap (struct inode *inode, struct file *file, struct vm_area_struct *vma, long base, void *xx)
     /* [previous][next][first][last][top][bottom][index][help] */
 830 {
 831         unsigned int size, page, r, map_size;
 832         unsigned int map_offset = 0;
 833         fbinfo_t *fb = (fbinfo_t *) xx;
 834         
 835         size = vma->vm_end - vma->vm_start;
 836         if (vma->vm_offset & ~PAGE_MASK)
 837                 return -ENXIO;
 838 
 839         /* To stop the swapper from even considering these pages */
 840         vma->vm_flags |= FB_MMAP_VM_FLAGS;
 841         
 842         /* Each page, see which map applies */
 843         for (page = 0; page < size; ){
 844                 switch (vma->vm_offset+page){
 845                 case CG6_TEC:
 846                         map_size = PAGE_SIZE;
 847                         map_offset = get_phys ((uint)fb->info.cg6.tec);
 848                         break;
 849                 case CG6_FBC:
 850                         map_size = PAGE_SIZE;
 851                         map_offset = get_phys ((uint)fb->info.cg6.fbc);
 852                         break;
 853                 case CG6_FHC:
 854                         map_size = PAGE_SIZE;
 855                         map_offset = get_phys ((uint)fb->info.cg6.fhc);
 856                         break;
 857                 case CG6_THC:
 858                         map_size = PAGE_SIZE;
 859                         map_offset = get_phys ((uint)fb->info.cg6.thc);
 860                         break;
 861                 case CG6_BTREGS:
 862                         map_size = PAGE_SIZE;
 863                         map_offset = get_phys ((uint)fb->info.cg6.bt);
 864                         break;
 865                         
 866                 case CG6_DHC:
 867                         map_size = PAGE_SIZE * 40;
 868                         map_offset = get_phys ((uint)fb->info.cg6.dhc);
 869                         break;
 870                         
 871                 case CG6_ROM:
 872                         map_size = 0;
 873                         break;
 874 
 875                 case CG6_RAM:
 876                         map_size = size-page;
 877                         map_offset = get_phys ((uint) con_fb_base);
 878                         if (map_size < fb->type.fb_size)
 879                                 map_size = fb->type.fb_size;
 880                         break;
 881                 default:
 882                         map_size = 0;
 883                         break;
 884                 }
 885                 if (!map_size){
 886                         page += PAGE_SIZE;
 887                         continue;
 888                 }
 889                 r = io_remap_page_range (vma->vm_start+page,
 890                                          map_offset,
 891                                          map_size, vma->vm_page_prot,
 892                                          fb->space);
 893                 if (r) return -EAGAIN;
 894                 page += map_size;
 895         }
 896         vma->vm_inode = inode;
 897         inode->i_count++;
 898         return 0;
 899 }
 900 
 901 #define BT_D4M3(x) ((((x) >> 2) << 1) + ((x) >> 2))     /* (x / 4) * 3 */
 902 #define BT_D4M4(x) ((x) & ~3)                           /* (x / 4) * 4 */
 903 
 904 static void
 905 cg6_loadcmap (void *fbinfo, int index, int count)
     /* [previous][next][first][last][top][bottom][index][help] */
 906 {
 907         fbinfo_t *fb = (fbinfo_t *) fbinfo;
 908         struct bt_regs *bt = fb->info.cg6.bt;
 909         int i;
 910         
 911         bt->addr = index << 24;
 912         for (i = index; count--; i++){
 913                 bt->color_map = color_map.map [i][0] << 24;
 914                 bt->color_map = color_map.map [i][1] << 24;
 915                 bt->color_map = color_map.map [i][2] << 24;
 916         }
 917 }
 918 
 919 /* Load cursor information */
 920 static void
 921 cg6_setcursor (struct cg6_info *info)
     /* [previous][next][first][last][top][bottom][index][help] */
 922 {
 923         unsigned int v;
 924         struct cg6_cursor *c = &info->cursor;
 925         
 926         if (c->enable){
 927                 v = ((c->cpos.fbx - c->chot.fbx) << 16)
 928                    |((c->cpos.fby - c->chot.fby) & 0xffff);
 929         } else {
 930                 /* Magic constant to turn off the cursor */
 931                 v = ((65536-32) << 16) | (65536-32);
 932         }
 933         info->thc->thc_cursxy = v;
 934 }
 935 
 936 #undef pos
 937 static int
 938 cg6_scursor (struct fbcursor *cursor, fbinfo_t *fb)
     /* [previous][next][first][last][top][bottom][index][help] */
 939 {
 940         int op = cursor->set;
 941         volatile struct cg6_thc *thc = fb->info.cg6.thc;
 942         struct cg6_cursor *cursor_info = &fb->info.cg6.cursor;
 943         int i, bytes = 0;
 944         
 945         if (op & FB_CUR_SETSHAPE){
 946                 if ((unsigned int) cursor->size.fbx > 32)
 947                         return -EINVAL;
 948                 if ((unsigned int) cursor->size.fby > 32)
 949                         return -EINVAL;
 950                 bytes = (cursor->size.fby * 32)/8;
 951                 i = verify_area (VERIFY_READ, cursor->image, bytes);
 952                 if (i) return i;
 953                 i = verify_area (VERIFY_READ, cursor->mask, bytes);
 954                 if (i) return i;
 955         }
 956         if (op & (FB_CUR_SETCUR | FB_CUR_SETPOS | FB_CUR_SETHOT)){
 957                 if (op & FB_CUR_SETCUR)
 958                         cursor_info->enable = cursor->enable;
 959                 if (op & FB_CUR_SETPOS)
 960                         cursor_info->cpos = cursor->pos;
 961                 if (op & FB_CUR_SETHOT)
 962                         cursor_info->chot = cursor->hot;
 963                 cg6_setcursor (&fb->info.cg6);
 964         }
 965         if (op & FB_CUR_SETSHAPE){
 966                 unsigned int u;
 967                 
 968                 cursor_info->size = cursor->size;
 969                 memset ((void *)&cursor_info->bits, 0, sizeof (cursor_info->size));
 970                 memcpy (cursor_info->bits [0], cursor->mask, bytes);
 971                 memcpy (cursor_info->bits [1], cursor->image, bytes);
 972                 u = ~0;
 973                 if (cursor_info->size.fbx < 32)
 974                         u = ~(u  >> cursor_info->size.fbx);
 975                 for (i = 0; i < 32; i++){
 976                         int m = cursor_info->bits [0][i] & u;
 977                         thc->thc_cursmask [i] = m;
 978                         thc->thc_cursbits [i] = m & cursor_info->bits [1][i];
 979                 }
 980         }
 981         return 0;
 982 }
 983 
 984 /* Handle cg6-specific ioctls */
 985 static int
 986 cg6_ioctl (struct inode *inode, struct file *file, unsigned cmd, unsigned long arg, fbinfo_t *fb)
     /* [previous][next][first][last][top][bottom][index][help] */
 987 {
 988         int i;
 989 
 990         switch (cmd){
 991         case FBIOGCURMAX:
 992                 i = verify_area (VERIFY_WRITE, (void *) arg, sizeof (struct fbcurpos));
 993                 if (i) return i;
 994                 ((struct fbcurpos *) arg)->fbx = 32;
 995                 ((struct fbcurpos *) arg)->fby = 32;
 996                 break;
 997 
 998         case FBIOSVIDEO:
 999                 /* vesa_blank and vesa_unblank could do the job on fb [0] */
1000                 break;
1001 
1002         case FBIOSCURSOR:
1003                 return cg6_scursor ((struct fbcursor *) arg, fb);
1004 
1005         case FBIOSCURPOS:
1006                 /*
1007                 i= verify_area (VERIFY_READ, (void *) arg, sizeof (struct fbcurpos));
1008                 if (i) return i;
1009                 */
1010                 fb->info.cg6.cursor.cpos = *(struct fbcurpos *)arg;
1011                 cg6_setcursor (&fb->info.cg6);
1012                 break;
1013         default:
1014                 return -EINVAL;
1015         }
1016         return 0;
1017 }
1018 
1019 static void
1020 cg6_setup (int slot, unsigned int cg6, int cg6_io)
     /* [previous][next][first][last][top][bottom][index][help] */
1021 {
1022         struct cg6_info *cg6info;
1023 
1024         printk ("cgsix%d at 0x%8.8x\n", slot, (unsigned int) cg6);
1025         
1026         /* Fill in parameters we left out */
1027         fbinfo [slot].type.fb_cmsize = 256;
1028         fbinfo [slot].mmap = cg6_mmap;
1029         fbinfo [slot].loadcmap = cg6_loadcmap;
1030         fbinfo [slot].ioctl = (void *) cg6_ioctl;
1031         fbinfo [slot].blank = 0;
1032         fbinfo [slot].unblank = 0;
1033         
1034         cg6info = (struct cg6_info *) &fbinfo [slot].info.cg6;
1035 
1036         /* Map the hardware registers */
1037         cg6info->bt = sparc_alloc_io ((void *) cg6+CG6_BROOKTREE_OFFSET, 0,
1038                  sizeof (struct bt_regs),"cgsix_dac", cg6_io, 0);
1039         cg6info->fhc = sparc_alloc_io ((void *) cg6+CG6_FHC_OFFSET, 0,
1040                  sizeof (int), "cgsix_fhc", cg6_io, 0);
1041         cg6info->thc = sparc_alloc_io ((void *) cg6+CG6_THC_OFFSET, 0,
1042                  sizeof (struct cg6_thc), "cgsix_thc", cg6_io, 0);
1043         cg6info->tec = sparc_alloc_io ((void *) cg6+CG6_TEC_OFFSET, 0,
1044                  sizeof (struct cg6_tec), "cgsix_tec", cg6_io, 0);
1045         cg6info->dhc = sparc_alloc_io ((void *) cg6+CG6_DHC_OFFSET, 0,
1046                  0x40000, "cgsix_dhc", cg6_io, 0);
1047         cg6info->fbc = sparc_alloc_io ((void *) cg6+CG6_FBC_OFFSET, 0,
1048                  0x1000, "cgsix_fbc", cg6_io, 0);
1049         if (!con_fb_base){
1050                 con_fb_base = sparc_alloc_io ((void *) cg6+CG6_RAM_OFFSET, 0,
1051                     fbinfo [slot].type.fb_size, "cgsix_ram", cg6_io, 0);
1052         }
1053         if (!slot)
1054                 restore_palette = cg6_restore_palette;
1055 }
1056 
1057 /* The cg3 driver, obio space addresses for mapping the cg3 stuff */
1058 #define CG3_REGS 0x400000
1059 #define CG3_RAM  0x800000
1060 #define D4M3(x) ((((x)>>2)<<1) + ((x)>>2))      /* (x/4)*3 */
1061 #define D4M4(x) ((x)&~0x3)                      /* (x/4)*4 */
1062 
1063 /* The cg3 palette is loaded with 4 color values at each time  */
1064 /* so you end up with: (rgb)(r), (gb)(rg), (b)(rgb), and so on */
1065 static void
1066 cg3_loadcmap (void *fbinfo, int index, int count)
     /* [previous][next][first][last][top][bottom][index][help] */
1067 {
1068         fbinfo_t *fb = (fbinfo_t *) fbinfo;
1069         struct bt_regs *bt = fb->info.cg3.bt;
1070         int *i, steps;
1071 
1072         i = &color_map.raw [D4M3(index)];
1073         steps = D4M3(index+count-1) - D4M3(index)+3;
1074         bt->addr = D4M4(index);
1075         while (steps--)
1076                 bt->color_map = *i++;
1077 }
1078 
1079 /* The cg3 is presumed to emulate a cg4, I guess older programs will want that */
1080 /* addresses above 0x4000000 are for cg3, below that it's cg4 emulation          */
1081 static int
1082 cg3_mmap (struct inode *inode, struct file *file, struct vm_area_struct *vma, long base, void *xx)
     /* [previous][next][first][last][top][bottom][index][help] */
1083 {
1084         unsigned int size, page, r, map_size;
1085         unsigned int map_offset = 0;
1086         fbinfo_t *fb = (fbinfo_t *) xx;
1087         
1088         size = vma->vm_end - vma->vm_start;
1089         if (vma->vm_offset & ~PAGE_MASK)
1090                 return -ENXIO;
1091 
1092         /* To stop the swapper from even considering these pages */
1093         vma->vm_flags |= FB_MMAP_VM_FLAGS; 
1094         
1095         /* Each page, see which map applies */
1096         for (page = 0; page < size; ){
1097                 switch (vma->vm_offset+page){
1098                 case CG3_MMAP_OFFSET:
1099                         map_size = size-page;
1100                         map_offset = get_phys ((uint) con_fb_base);
1101                         if (map_size > fb->type.fb_size)
1102                                 map_size = fb->type.fb_size;
1103                         break;
1104                 default:
1105                         map_size = 0;
1106                         break;
1107                 }
1108                 if (!map_size){
1109                         page += PAGE_SIZE;
1110                         continue;
1111                 }
1112                 r = io_remap_page_range (vma->vm_start+page,
1113                                          map_offset,
1114                                          map_size, vma->vm_page_prot,
1115                                          fb->space);
1116                 if (r) return -EAGAIN;
1117                 page += map_size;
1118         }
1119         vma->vm_inode = inode;
1120         inode->i_count++;
1121         return 0;
1122 }
1123 
1124 static void
1125 cg3_setup (int slot, unsigned int cg3, int cg3_io)
     /* [previous][next][first][last][top][bottom][index][help] */
1126 {
1127         struct cg3_info *cg3info;
1128 
1129         printk ("cgthree%d at 0x%8.8x\n", slot, cg3);
1130         
1131         /* Fill in parameters we left out */
1132         fbinfo [slot].type.fb_cmsize = 256;
1133         fbinfo [slot].mmap = cg3_mmap;
1134         fbinfo [slot].loadcmap = cg3_loadcmap;
1135         fbinfo [slot].ioctl = 0; /* no special ioctls */
1136 
1137         cg3info = (struct cg3_info *) &fbinfo [slot].info.cg3;
1138 
1139         /* Map the card registers */
1140         cg3info->bt = sparc_alloc_io ((void *) cg3+CG3_REGS, 0,
1141                  sizeof (struct bt_regs),"cg3_bt", cg3_io, 0);
1142         
1143         if (!con_fb_base){
1144                 con_fb_base=sparc_alloc_io ((void*) cg3+CG3_RAM, 0,
1145                     fbinfo [slot].type.fb_size, "cg3_ram", cg3_io, 0);
1146         }
1147 }
1148 
1149 /* OBio addresses for the bwtwo registers */
1150 #define BWTWO_REGISTER_OFFSET 0x400000
1151 
1152 struct bwtwo_regs {
1153         char          unknown [16];
1154 #define BWTWO_ENABLE_VIDEO 0x40
1155         unsigned char control;
1156         char          unknown2 [15];
1157 };
1158 
1159 static int
1160 bwtwo_mmap (struct inode *inode, struct file *file, struct vm_area_struct *vma, long base, void *xx)
     /* [previous][next][first][last][top][bottom][index][help] */
1161 {
1162         unsigned int size, map_offset, r;
1163         fbinfo_t *fb = (fbinfo_t *) xx;
1164         int map_size;
1165         
1166         map_size = size = vma->vm_end - vma->vm_start;
1167         
1168         if (vma->vm_offset & ~PAGE_MASK)
1169                 return -ENXIO;
1170 
1171         /* To stop the swapper from even considering these pages */
1172         vma->vm_flags |= FB_MMAP_VM_FLAGS;
1173         printk ("base=%8.8xl start=%8.8xl size=%x offset=%8.8x\n",
1174                 (unsigned int) base,
1175                 (unsigned int) vma->vm_start, size,
1176                 (unsigned int) vma->vm_offset);
1177 
1178         /* This routine should also map the register if asked for, but we don't do that yet */
1179         map_offset = get_phys ((uint) con_fb_base);
1180         r = io_remap_page_range (vma->vm_start, map_offset, map_size, vma->vm_page_prot,
1181                                  fb->space);
1182         if (r) return -EAGAIN;
1183         vma->vm_inode = inode;
1184         inode->i_count++;
1185         return 0;
1186 }
1187 
1188 static void
1189 bwtwo_blank (void *xx)
     /* [previous][next][first][last][top][bottom][index][help] */
1190 {
1191         fbinfo_t *fb = (fbinfo_t *) xx;
1192 
1193         fb->info.bwtwo.regs->control &= ~BWTWO_ENABLE_VIDEO;
1194 }
1195 
1196 static void
1197 bwtwo_unblank (void *xx)
     /* [previous][next][first][last][top][bottom][index][help] */
1198 {
1199         fbinfo_t *fb = (fbinfo_t *) xx;
1200         fb->info.bwtwo.regs->control |= BWTWO_ENABLE_VIDEO;
1201 }
1202 
1203 static void
1204 bwtwo_setup (int slot, unsigned int bwtwo, int bw2_io)
     /* [previous][next][first][last][top][bottom][index][help] */
1205 {
1206         printk ("bwtwo%d at 0x%8.8x\n", slot, bwtwo);
1207         fbinfo [slot].type.fb_cmsize = 2;
1208         fbinfo [slot].mmap = bwtwo_mmap;
1209         fbinfo [slot].loadcmap = 0;
1210         fbinfo [slot].ioctl = 0;
1211         fbinfo [slot].blank = bwtwo_blank;
1212         fbinfo [slot].unblank = bwtwo_unblank;
1213         fbinfo [slot].info.bwtwo.regs = sparc_alloc_io ((void *) bwtwo+BWTWO_REGISTER_OFFSET,
1214                 0, sizeof (struct bwtwo_regs), "bwtwo_regs", bw2_io, 0);
1215 }
1216 
1217 static char *known_cards [] = {
1218         "cgsix", "cgthree", "bwtwo", "SUNW,tcx", 0
1219 };
1220 
1221 static int
1222 known_card (char *name)
     /* [previous][next][first][last][top][bottom][index][help] */
1223 {
1224         int i;
1225 
1226         for (i = 0; known_cards [i]; i++)
1227                 if (strcmp (name, known_cards [i]) == 0)
1228                         return 1;
1229         return 0;
1230 }
1231 
1232 static struct {
1233         int depth;
1234         int resx, resy;
1235         int x_margin, y_margin;
1236 } scr_def [] = {
1237         { 1, 1152, 900,  8,  18 },
1238         { 8, 1152, 900,  64, 18 },
1239         { 8, 1280, 1024, 96, 80 },
1240         { 8, 1024, 768,  0,  0 },
1241         { 0 },
1242 };
1243 
1244 static int
1245 sparc_console_probe(void)
     /* [previous][next][first][last][top][bottom][index][help] */
1246 {
1247         int propl, con_node, i;
1248         struct linux_sbus_device *sbdp;
1249         unsigned int fbbase = 0xb001b001;
1250         int fbiospace = 0;
1251 
1252         /* XXX The detection code needs to support multiple video cards in one system */
1253         con_node = 0;
1254         switch(prom_vers) {
1255         case PROM_V0:
1256                 /* V0 proms are at sun4c only. Can skip many checks. */
1257                 con_type = FBTYPE_NOTYPE;
1258                 if(SBus_chain == 0) {
1259                         prom_printf("SBUS chain is NULL, bailing out...\n");
1260                         prom_halt();
1261                 }
1262                 for_each_sbusdev(sbdp, SBus_chain) {
1263                         con_node = sbdp->prom_node;
1264 
1265                         /* If no "address" than it is not the PROM console. */
1266                         if(sbdp->num_vaddrs) {
1267                                 if(!strncmp(sbdp->prom_name, "cgsix", 5)) {
1268                                         con_type = FBTYPE_SUNFAST_COLOR;
1269                                         fbbase = (uint) sbdp->reg_addrs [0].phys_addr;
1270                                         fbiospace = sbdp->reg_addrs[0].which_io;
1271                                         break;
1272                                 } else if(!strncmp(sbdp->prom_name, "cgthree", 7)) {
1273                                         con_type = FBTYPE_SUN3COLOR;
1274                                         fbbase = (uint) sbdp->reg_addrs [0].phys_addr;
1275                                         fbiospace = sbdp->reg_addrs[0].which_io;
1276                                         break;
1277                                 } else if (!strncmp(sbdp->prom_name, "bwtwo", 5)) {
1278                                         con_type = FBTYPE_SUN2BW;
1279                                         fbbase = (uint) sbdp->reg_addrs [0].phys_addr;
1280                                         fbiospace = sbdp->reg_addrs[0].which_io;
1281                                         break;
1282                                 }
1283                         }
1284                 }
1285                 if(con_type == FBTYPE_NOTYPE) return -1;
1286                 con_fb_base = (unsigned char *) sbdp->sbus_vaddrs[0];
1287                 strncpy(con_name, sbdp->prom_name, sizeof (con_name));
1288                 break;
1289         case PROM_V2:
1290         case PROM_V3:
1291         case PROM_P1275:
1292                 for_each_sbusdev(sbdp, SBus_chain) {
1293                         if (known_card (sbdp->prom_name))
1294                                 break;
1295                 }
1296                 if (!sbdp){
1297                         prom_printf ("Could not find a know video card on this machine\n");
1298                         prom_halt ();
1299                 }
1300                 prom_apply_sbus_ranges (&sbdp->reg_addrs [0], sbdp->num_registers);
1301                 fbbase = (long) sbdp->reg_addrs [0].phys_addr;
1302                 fbiospace = sbdp->reg_addrs[0].which_io;
1303                 con_node = (*romvec->pv_v2devops.v2_inst2pkg)
1304                         (*romvec->pv_v2bootargs.fd_stdout);
1305                 /*
1306                  * Determine the type of hardware accelerator.
1307                  */
1308                 propl = prom_getproperty(con_node, "emulation", con_name, sizeof (con_name));
1309                 if (propl < 0 || propl >= sizeof (con_name)) {
1310                         /* Early cg3s had no "emulation". */
1311                         propl = prom_getproperty(con_node, "name", con_name, sizeof (con_name));
1312                         if (propl < 0) {
1313                                 prom_printf("console: no device name!!\n");
1314                                 return -1;
1315                         }
1316                 }
1317                 if(!strncmp(con_name, "cgsix", sizeof (con_name))) {
1318                         con_type = FBTYPE_SUNFAST_COLOR;
1319                 } else if(!strncmp(con_name, "cgthree", sizeof (con_name))) {
1320                         con_type = FBTYPE_SUN3COLOR;
1321                 } else if(!strncmp(con_name, "cgfourteen", sizeof (con_name))) {
1322                         con_type = FBTYPE_MDICOLOR;
1323                 } else if(!strncmp(con_name, "bwtwo", sizeof (con_name))) {
1324                         con_type = FBTYPE_SUN2BW;
1325                 } else if(!strncmp(con_name,"SUNW,tcx", sizeof (con_name))){
1326                         con_type = FBTYPE_SUN3COLOR;
1327                 } else {
1328                         prom_printf("console: \"%s\" is unsupported\n", con_name);
1329                         return -1;
1330                 }
1331                 propl = prom_getproperty(con_node, "address", (char *) &con_fb_base, 4);
1332                 if (propl != 4) {
1333                     con_fb_base = 0;
1334                 }
1335                 break;
1336         default:
1337                 return -1;
1338         };
1339 
1340         /* Get the device geometry */
1341         con_linebytes = prom_getintdefault(con_node, "linebytes", 1152);
1342         con_width = prom_getintdefault(con_node, "width", 1152);
1343         con_height = prom_getintdefault(con_node, "height", 900);
1344 
1345         /* Currently we just support 1-bit and 8-bit depth displays */
1346         if (con_type == FBTYPE_SUN2BW) {
1347                 con_depth = 1;
1348         } else {
1349                 con_depth = 8;
1350         }
1351         for (i = 0; scr_def [i].depth; i++){
1352                 if (scr_def [i].resx != con_width || scr_def [i].resy != con_height)
1353                         continue;
1354                 if (scr_def [i].depth != con_depth)
1355                         continue;
1356                 x_margin = scr_def [i].x_margin;
1357                 y_margin = scr_def [i].y_margin;
1358                 chars_per_line = (con_width * con_depth) / 8;
1359                 skip_bytes = chars_per_line * y_margin;
1360                 ints_per_line = chars_per_line / 4;
1361                 bytes_per_row = CHAR_HEIGHT * chars_per_line;
1362                 break;
1363         }
1364         if (!scr_def [i].depth){
1365                 x_margin = y_margin = 0;
1366                 prom_printf ("PenguinCon: unknown video resolution %dx%d may be slow\n", con_width, con_height);
1367                 prom_halt ();
1368         }
1369         /* P3: I fear this strips 15inch 1024/768 PC-like monitors out. */
1370         if ((con_linebytes*8) / con_depth != con_width) {
1371                 prom_printf("console: UNUSUAL VIDEO, linebytes=%d, width=%d, depth=%d\n",
1372                         con_linebytes, con_width, con_depth);
1373                 return -1;
1374         }
1375 
1376         /* Negate the font table on 1 bit depth cards so we have white on black */
1377         if (con_depth == 1)
1378                 for(i=0; i<(16 * 256); i++)
1379                         vga_font[i] = ~vga_font[i];
1380 
1381         /* Fill in common fb information */
1382         fbinfo [0].type.fb_type   = con_type;
1383         fbinfo [0].type.fb_height = con_height;
1384         fbinfo [0].type.fb_width  = con_width;
1385         fbinfo [0].type.fb_depth  = con_depth;
1386         fbinfo [0].type.fb_size   = PAGE_ALIGN((con_linebytes) * (con_height));
1387         fbinfo [0].space = fbiospace;
1388         fbinfo [0].blanked = 0;
1389 
1390         /* Should be filled in for supported video cards */
1391         fbinfo [0].mmap = 0; 
1392         fbinfo [0].loadcmap = 0;
1393         fbinfo [0].ioctl = 0;
1394         fbinfo [0].blank = 0;
1395         fbinfo [0].unblank = 0;
1396 
1397         if (fbbase == 0xb001b001){
1398                 printk ("Mail miguel@nuclecu.unam.mx video_card=%d (%s)\n", con_type, con_name);
1399         }
1400 
1401         /* Per card setup */
1402         switch (con_type){
1403         case FBTYPE_SUN3COLOR:
1404                 cg3_setup (0, fbbase, fbiospace);
1405                 break;
1406         case FBTYPE_SUNFAST_COLOR:
1407                 cg6_setup (0, fbbase, fbiospace);
1408                 break;
1409         case FBTYPE_SUN2BW:
1410                 bwtwo_setup (0, fbbase, fbiospace);
1411                 break;
1412         default:
1413                 break;
1414         }
1415         if (!con_fb_base){
1416                 prom_printf ("PROM does not have an 'address' property for this\n"
1417                              "frame buffer and the Linux drivers do not know how\n"
1418                              "to map the video of this device\n");
1419                 prom_halt ();
1420         }
1421         fbinfo [0].base = (long) con_fb_base;
1422         
1423         /* Register the frame buffer device */
1424         if (register_chrdev (GRAPHDEV_MAJOR, "graphics", &graphdev_fops)){
1425                 printk ("Could not register graphics device\n");
1426                 return -EIO;
1427         }
1428         return 0; /* success */
1429 }
1430 
1431 /* video init code, called from within the SBUS bus scanner at
1432  * boot time.
1433  */
1434 void
1435 sun_console_init(void)
     /* [previous][next][first][last][top][bottom][index][help] */
1436 {
1437         if(serial_console)
1438                 return;
1439 
1440         if(sparc_console_probe()) {
1441                 prom_printf("Could not probe console, bailing out...\n");
1442                 prom_halt();
1443         }
1444         sun_clear_screen();
1445 }
1446 
1447 /*
1448  * sun_blitc
1449  *
1450  * Displays an ASCII character at a specified character cell
1451  *  position.
1452  *
1453  * Called from scr_writew() when the destination is
1454  *  the "shadow" screen
1455  */
1456 static unsigned int
1457 fontmask_bits[16] = {
1458     0x00000000,
1459     0x000000ff,
1460     0x0000ff00,
1461     0x0000ffff,
1462     0x00ff0000,
1463     0x00ff00ff,
1464     0x00ffff00,
1465     0x00ffffff,
1466     0xff000000,
1467     0xff0000ff,
1468     0xff00ff00,
1469     0xff00ffff,
1470     0xffff0000,
1471     0xffff00ff,
1472     0xffffff00,
1473     0xffffffff
1474 };
1475 
1476 int
1477 sun_blitc(unsigned int charattr, unsigned long addr)
     /* [previous][next][first][last][top][bottom][index][help] */
1478 {
1479         int j, idx;
1480         unsigned char *font_row;
1481 
1482 #ifndef DEBUGGING_X
1483         if (graphics_on)
1484                 return 0;
1485 #endif
1486         idx = (addr - video_mem_base) >> 1;
1487 
1488         /* Invalidate the cursor position if necessary. */
1489         if(idx == cursor_pos)
1490                 cursor_pos = -1;
1491         font_row = &vga_font[(charattr & 0xff) << 4];
1492 
1493         switch (con_depth){
1494         case 1: {
1495                 register unsigned char *dst;
1496                 
1497                 dst = (unsigned char *)(((unsigned long)con_fb_base) + FBUF_OFFSET(idx));
1498                 for(j = 0; j < CHAR_HEIGHT; j++, font_row++, dst+=CHARS_PER_LINE)
1499                         *dst = *font_row;
1500                 break;
1501         }
1502         case 8: {
1503                 register unsigned long *dst;
1504                 unsigned long fgmask, bgmask, data, rowbits, attrib;
1505                 const int ipl = ints_per_line;
1506                 
1507                 dst = (unsigned long *)(((unsigned long)con_fb_base) + COLOR_FBUF_OFFSET(idx));
1508                 attrib = (charattr >> 8) & 0x0ff;
1509                 fgmask = attrib & 0x0f;
1510                 bgmask = (attrib >> 4) & 0x0f;
1511                 fgmask = fgmask << 8 | fgmask;
1512                 fgmask |= fgmask << 16;
1513                 bgmask = bgmask << 8 | bgmask;
1514                 bgmask |= bgmask << 16;
1515                 
1516                 for(j = 0; j < CHAR_HEIGHT; j++, font_row++, dst += ipl) {
1517                         rowbits = *font_row;
1518                         data = fontmask_bits[(rowbits>>4)&0xf];
1519                         data = (data & fgmask) | (~data & bgmask);
1520                         *dst = data;
1521                         data = fontmask_bits[rowbits&0xf];
1522                         data = (data & fgmask) | (~data & bgmask);
1523                         *(dst+1) = data;
1524                 }
1525                 break;
1526         } /* case */
1527         } /* switch */
1528         return (0);
1529 }
1530 
1531 unsigned char vga_font[cmapsz] = {
1532 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1533 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 
1534 0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xff, 
1535 0xdb, 0xff, 0xff, 0xc3, 0xe7, 0xff, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00, 
1536 0x00, 0x00, 0x00, 0x00, 0x6c, 0xfe, 0xfe, 0xfe, 0xfe, 0x7c, 0x38, 0x10, 
1537 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x7c, 0xfe, 
1538 0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 
1539 0x3c, 0x3c, 0xe7, 0xe7, 0xe7, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 
1540 0x00, 0x00, 0x00, 0x18, 0x3c, 0x7e, 0xff, 0xff, 0x7e, 0x18, 0x18, 0x3c, 
1541 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 
1542 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 
1543 0xff, 0xff, 0xe7, 0xc3, 0xc3, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
1544 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x42, 0x42, 0x66, 0x3c, 0x00, 
1545 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3, 0x99, 0xbd, 
1546 0xbd, 0x99, 0xc3, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x1e, 0x0e, 
1547 0x1a, 0x32, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00, 
1548 0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 0x18, 
1549 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x33, 0x3f, 0x30, 0x30, 0x30, 
1550 0x30, 0x70, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x63, 
1551 0x7f, 0x63, 0x63, 0x63, 0x63, 0x67, 0xe7, 0xe6, 0xc0, 0x00, 0x00, 0x00, 
1552 0x00, 0x00, 0x00, 0x18, 0x18, 0xdb, 0x3c, 0xe7, 0x3c, 0xdb, 0x18, 0x18, 
1553 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfe, 0xf8, 
1554 0xf0, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x0e, 
1555 0x1e, 0x3e, 0xfe, 0x3e, 0x1e, 0x0e, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 
1556 0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x00, 
1557 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 
1558 0x66, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xdb, 
1559 0xdb, 0xdb, 0x7b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x00, 0x00, 0x00, 0x00, 
1560 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x6c, 0xc6, 0xc6, 0x6c, 0x38, 0x0c, 0xc6, 
1561 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1562 0xfe, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 
1563 0x7e, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00, 
1564 0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
1565 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
1566 0x18, 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1567 0x00, 0x18, 0x0c, 0xfe, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1568 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0xfe, 0x60, 0x30, 0x00, 0x00, 
1569 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 
1570 0xc0, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1571 0x00, 0x24, 0x66, 0xff, 0x66, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1572 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x38, 0x7c, 0x7c, 0xfe, 0xfe, 0x00, 
1573 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x7c, 0x7c, 
1574 0x38, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1575 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1576 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 
1577 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x24, 0x00, 0x00, 0x00, 
1578 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 
1579 0x6c, 0xfe, 0x6c, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, 
1580 0x18, 0x18, 0x7c, 0xc6, 0xc2, 0xc0, 0x7c, 0x06, 0x06, 0x86, 0xc6, 0x7c, 
1581 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0xc6, 0x0c, 0x18, 
1582 0x30, 0x60, 0xc6, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 
1583 0x6c, 0x38, 0x76, 0xdc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
1584 0x00, 0x30, 0x30, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1585 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30, 
1586 0x30, 0x30, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x18, 
1587 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 
1588 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x3c, 0xff, 0x3c, 0x66, 0x00, 0x00, 
1589 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 
1590 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1591 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 
1592 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 
1593 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1594 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1595 0x02, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 
1596 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xce, 0xde, 0xf6, 0xe6, 0xc6, 0xc6, 0x7c, 
1597 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x38, 0x78, 0x18, 0x18, 0x18, 
1598 0x18, 0x18, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 
1599 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 
1600 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0x3c, 0x06, 0x06, 0x06, 0xc6, 0x7c, 
1601 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x1c, 0x3c, 0x6c, 0xcc, 0xfe, 
1602 0x0c, 0x0c, 0x0c, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc0, 
1603 0xc0, 0xc0, 0xfc, 0x06, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
1604 0x00, 0x00, 0x38, 0x60, 0xc0, 0xc0, 0xfc, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 
1605 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc6, 0x06, 0x06, 0x0c, 0x18, 
1606 0x30, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 
1607 0xc6, 0xc6, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
1608 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x06, 0x0c, 0x78, 
1609 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 
1610 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1611 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 
1612 0x00, 0x00, 0x00, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0c, 0x06, 
1613 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 
1614 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 
1615 0x30, 0x18, 0x0c, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 
1616 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x0c, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 
1617 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xde, 0xde, 
1618 0xde, 0xdc, 0xc0, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 
1619 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 
1620 0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc, 
1621 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 
1622 0xc0, 0xc2, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x6c, 
1623 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x00, 0x00, 0x00, 0x00, 
1624 0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x62, 0x66, 0xfe, 
1625 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 
1626 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 
1627 0xc2, 0xc0, 0xc0, 0xde, 0xc6, 0xc6, 0x66, 0x3a, 0x00, 0x00, 0x00, 0x00, 
1628 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 
1629 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 
1630 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x0c, 
1631 0x0c, 0x0c, 0x0c, 0x0c, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00, 
1632 0x00, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0x66, 0xe6, 
1633 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 
1634 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xe7, 
1635 0xff, 0xff, 0xdb, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0x00, 0x00, 0x00, 0x00, 
1636 0x00, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0xc6, 
1637 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 
1638 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 
1639 0x66, 0x66, 0x7c, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00, 
1640 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xd6, 0xde, 0x7c, 
1641 0x0c, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 
1642 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 
1643 0xc6, 0x60, 0x38, 0x0c, 0x06, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
1644 0x00, 0x00, 0xff, 0xdb, 0x99, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 
1645 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 
1646 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xc3, 
1647 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0x66, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 
1648 0x00, 0x00, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xdb, 0xdb, 0xff, 0x66, 0x66, 
1649 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xc3, 0x66, 0x3c, 0x18, 0x18, 
1650 0x3c, 0x66, 0xc3, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xc3, 
1651 0xc3, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 
1652 0x00, 0x00, 0xff, 0xc3, 0x86, 0x0c, 0x18, 0x30, 0x60, 0xc1, 0xc3, 0xff, 
1653 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x30, 0x30, 0x30, 0x30, 0x30, 
1654 0x30, 0x30, 0x30, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 
1655 0xc0, 0xe0, 0x70, 0x38, 0x1c, 0x0e, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 
1656 0x00, 0x00, 0x3c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x3c, 
1657 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00, 
1658 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1659 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 
1660 0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1661 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x7c, 
1662 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x60, 
1663 0x60, 0x78, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x00, 0x00, 0x00, 0x00, 
1664 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 
1665 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 
1666 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1667 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
1668 0x00, 0x00, 0x38, 0x6c, 0x64, 0x60, 0xf0, 0x60, 0x60, 0x60, 0x60, 0xf0, 
1669 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 
1670 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00, 0x00, 0x00, 0xe0, 0x60, 
1671 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00, 
1672 0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 
1673 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x0e, 0x06, 0x06, 
1674 0x06, 0x06, 0x06, 0x06, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0xe0, 0x60, 
1675 0x60, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00, 
1676 0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 
1677 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0xff, 0xdb, 
1678 0xdb, 0xdb, 0xdb, 0xdb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1679 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 
1680 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 
1681 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 
1682 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 
1683 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0x0c, 0x1e, 0x00, 
1684 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0xf0, 
1685 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x60, 
1686 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x30, 
1687 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00, 
1688 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 
1689 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xc3, 0xc3, 
1690 0xc3, 0x66, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1691 0x00, 0xc3, 0xc3, 0xc3, 0xdb, 0xdb, 0xff, 0x66, 0x00, 0x00, 0x00, 0x00, 
1692 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0x66, 0x3c, 0x18, 0x3c, 0x66, 0xc3, 
1693 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 
1694 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 
1695 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x60, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 
1696 0x00, 0x00, 0x0e, 0x18, 0x18, 0x18, 0x70, 0x18, 0x18, 0x18, 0x18, 0x0e, 
1697 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 
1698 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x18, 
1699 0x18, 0x18, 0x0e, 0x18, 0x18, 0x18, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 
1700 0x00, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1701 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 
1702 0xc6, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 
1703 0xc2, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x0c, 0x06, 0x7c, 0x00, 0x00, 
1704 0x00, 0x00, 0xcc, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 
1705 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, 0x00, 0x7c, 0xc6, 0xfe, 
1706 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 
1707 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
1708 0x00, 0x00, 0xcc, 0x00, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 
1709 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x00, 0x78, 0x0c, 0x7c, 
1710 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x38, 
1711 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
1712 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x60, 0x60, 0x66, 0x3c, 0x0c, 0x06, 
1713 0x3c, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xfe, 
1714 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x00, 
1715 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
1716 0x00, 0x60, 0x30, 0x18, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 
1717 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x38, 0x18, 0x18, 
1718 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x66, 
1719 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 
1720 0x00, 0x60, 0x30, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 
1721 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 
1722 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x38, 0x00, 
1723 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 
1724 0x18, 0x30, 0x60, 0x00, 0xfe, 0x66, 0x60, 0x7c, 0x60, 0x60, 0x66, 0xfe, 
1725 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x3b, 0x1b, 
1726 0x7e, 0xd8, 0xdc, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x6c, 
1727 0xcc, 0xcc, 0xfe, 0xcc, 0xcc, 0xcc, 0xcc, 0xce, 0x00, 0x00, 0x00, 0x00, 
1728 0x00, 0x10, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 
1729 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 
1730 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 
1731 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
1732 0x00, 0x30, 0x78, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 
1733 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x00, 0xcc, 0xcc, 0xcc, 
1734 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x00, 
1735 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0x78, 0x00, 
1736 0x00, 0xc6, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 
1737 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 
1738 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 
1739 0xc3, 0xc0, 0xc0, 0xc0, 0xc3, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 
1740 0x00, 0x38, 0x6c, 0x64, 0x60, 0xf0, 0x60, 0x60, 0x60, 0x60, 0xe6, 0xfc, 
1741 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0x66, 0x3c, 0x18, 0xff, 0x18, 
1742 0xff, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 0x66, 
1743 0x7c, 0x62, 0x66, 0x6f, 0x66, 0x66, 0x66, 0xf3, 0x00, 0x00, 0x00, 0x00, 
1744 0x00, 0x0e, 0x1b, 0x18, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 
1745 0xd8, 0x70, 0x00, 0x00, 0x00, 0x18, 0x30, 0x60, 0x00, 0x78, 0x0c, 0x7c, 
1746 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, 
1747 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 
1748 0x00, 0x18, 0x30, 0x60, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 
1749 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x60, 0x00, 0xcc, 0xcc, 0xcc, 
1750 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 
1751 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 
1752 0x76, 0xdc, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 
1753 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x6c, 0x6c, 0x3e, 0x00, 0x7e, 0x00, 
1754 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x6c, 
1755 0x38, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1756 0x00, 0x00, 0x30, 0x30, 0x00, 0x30, 0x30, 0x60, 0xc0, 0xc6, 0xc6, 0x7c, 
1757 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc0, 
1758 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1759 0x00, 0x00, 0xfe, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 
1760 0x00, 0xc0, 0xc0, 0xc2, 0xc6, 0xcc, 0x18, 0x30, 0x60, 0xce, 0x9b, 0x06, 
1761 0x0c, 0x1f, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc2, 0xc6, 0xcc, 0x18, 0x30, 
1762 0x66, 0xce, 0x96, 0x3e, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 
1763 0x00, 0x18, 0x18, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 
1764 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x6c, 0xd8, 0x6c, 0x36, 0x00, 0x00, 
1765 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x6c, 0x36, 
1766 0x6c, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x44, 0x11, 0x44, 
1767 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 
1768 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 
1769 0x55, 0xaa, 0x55, 0xaa, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 
1770 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0x18, 0x18, 0x18, 0x18, 
1771 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
1772 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 
1773 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0xf8, 
1774 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36, 
1775 0x36, 0x36, 0x36, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
1776 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x36, 0x36, 0x36, 0x36, 
1777 0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x18, 0xf8, 
1778 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36, 
1779 0x36, 0xf6, 0x06, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
1780 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
1781 0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0xf6, 
1782 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
1783 0x36, 0xf6, 0x06, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1784 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xfe, 0x00, 0x00, 0x00, 0x00, 
1785 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0xf8, 
1786 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1787 0x00, 0x00, 0x00, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
1788 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x00, 0x00, 0x00, 0x00, 
1789 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 
1790 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1791 0x00, 0x00, 0x00, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
1792 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 
1793 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 
1794 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 
1795 0x18, 0x18, 0x18, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
1796 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 
1797 0x18, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 
1798 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
1799 0x36, 0x37, 0x30, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1800 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 
1801 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf7, 0x00, 0xff, 
1802 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1803 0x00, 0xff, 0x00, 0xf7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
1804 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 
1805 0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 
1806 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x36, 
1807 0x36, 0xf7, 0x00, 0xf7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
1808 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 
1809 0x00, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xff, 
1810 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1811 0x00, 0xff, 0x00, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
1812 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x36, 0x36, 0x36, 0x36, 
1813 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x3f, 
1814 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 
1815 0x18, 0x1f, 0x18, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1816 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 
1817 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 
1818 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
1819 0x36, 0x36, 0x36, 0xff, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
1820 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x18, 0xff, 0x18, 0x18, 0x18, 0x18, 
1821 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 
1822 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1823 0x00, 0x00, 0x00, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
1824 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
1825 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 
1826 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 
1827 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 
1828 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 
1829 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 
1830 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1831 0x00, 0x76, 0xdc, 0xd8, 0xd8, 0xd8, 0xdc, 0x76, 0x00, 0x00, 0x00, 0x00, 
1832 0x00, 0x00, 0x78, 0xcc, 0xcc, 0xcc, 0xd8, 0xcc, 0xc6, 0xc6, 0xc6, 0xcc, 
1833 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc6, 0xc6, 0xc0, 0xc0, 0xc0, 
1834 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1835 0xfe, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, 
1836 0x00, 0x00, 0x00, 0xfe, 0xc6, 0x60, 0x30, 0x18, 0x30, 0x60, 0xc6, 0xfe, 
1837 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xd8, 0xd8, 
1838 0xd8, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1839 0x66, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xc0, 0x00, 0x00, 0x00, 
1840 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
1841 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x18, 0x3c, 0x66, 0x66, 
1842 0x66, 0x3c, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 
1843 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 
1844 0x00, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0x6c, 0x6c, 0x6c, 0x6c, 0xee, 
1845 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x30, 0x18, 0x0c, 0x3e, 0x66, 
1846 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1847 0x00, 0x7e, 0xdb, 0xdb, 0xdb, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1848 0x00, 0x00, 0x00, 0x03, 0x06, 0x7e, 0xdb, 0xdb, 0xf3, 0x7e, 0x60, 0xc0, 
1849 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x30, 0x60, 0x60, 0x7c, 0x60, 
1850 0x60, 0x60, 0x30, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 
1851 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 
1852 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, 
1853 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x18, 
1854 0x18, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 
1855 0x18, 0x0c, 0x06, 0x0c, 0x18, 0x30, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 
1856 0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0c, 0x00, 0x7e, 
1857 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x1b, 0x1b, 0x1b, 0x18, 0x18, 
1858 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
1859 0x18, 0x18, 0x18, 0x18, 0xd8, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00, 
1860 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x7e, 0x00, 0x18, 0x18, 0x00, 
1861 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 
1862 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x6c, 
1863 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1864 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 
1865 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1866 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0c, 0x0c, 
1867 0x0c, 0x0c, 0x0c, 0xec, 0x6c, 0x6c, 0x3c, 0x1c, 0x00, 0x00, 0x00, 0x00, 
1868 0x00, 0xd8, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 
1869 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xd8, 0x30, 0x60, 0xc8, 0xf8, 0x00, 
1870 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1871 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 
1872 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1873 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
1874 };

/* [previous][next][first][last][top][bottom][index][help] */