|
|
1.1 ! root 1: /* @(#)bw2reg.h 1.1 86/02/03 SMI */ ! 2: ! 3: /* ! 4: * Copyright (c) 1985 by Sun Microsystems, Inc. ! 5: */ ! 6: ! 7: ! 8: /* ! 9: * Sun-2 black and white display hardware definitions ! 10: */ ! 11: ! 12: /* ! 13: * The Sun-2 video lives in P2 memory space (BW2MB) or is onboard ! 14: * (BW2OB); we can access it through ! 15: * the identical virtual addresses established by the monitor ! 16: * the physical address appropriate to the type. ! 17: * The video memory is just memory, although it can also copy data that ! 18: * is written to other locations. ! 19: * The A-side of the MB_ZSCC connects to the keyboard. ! 20: * The B-side of the MB_ZSCC connects to the mouse. ! 21: */ ! 22: ! 23: #define BW2_FBSIZE (128*1024) /* size of frame buffer */ ! 24: ! 25: #define BW2MB_FB (char *)0x700000 /* frame buffer */ ! 26: #define BW2MB_ZSCC (char *)0x780000 /* UARTS */ ! 27: #define BW2MB_CR (char *)0x781800 /* video control register */ ! 28: #define BW2MB_PGT PGT_OBMEM ! 29: ! 30: #define BW2VME_FB (char *)0x000000 ! 31: #define BW2VME_CR (char *)0x020000 ! 32: #define BW2VME_PGT PGT_OBIO ! 33: ! 34: /* ! 35: * The video control register is arranged as shown below. ! 36: * ! 37: * Vc_copybase specifies the base (physical) address in main memory ! 38: * where, if a write is done, the write is also done to the frame buffer. ! 39: * Note that copying only works on 128K boundaries even though the base ! 40: * address is specified in 64K units, since the low order bit is ignored. ! 41: */ ! 42: struct bw2cr { ! 43: unsigned vc_video_en:1; /* Video enable */ ! 44: unsigned vc_copy_en:1; /* Copy enable */ ! 45: unsigned vc_int_en:1; /* Interrupt enable */ ! 46: unsigned vc_int:1; /* Int active - r/o */ ! 47: unsigned vc_b_jumper:1; /* Config jumper, 0=default */ ! 48: /* FIXME: 1=manufacturing burnin */ ! 49: /* This is a 'temporary' kludge */ ! 50: unsigned vc_a_jumper:1; /* Config jumper, 0=default */ ! 51: unsigned vc_color_jumper:1; /* Config jumper, 0=default */ ! 52: /* 1=use S-2 color as console */ ! 53: unsigned vc_1024_jumper:1; /* Config jumper, 0=default */ ! 54: /* 1=screen is 1024*1024 */ ! 55: /* NOTE: vc_copybase & 0x81 == aberrant bits. Don't depend on 'em! */ ! 56: #define weird 1 ! 57: unsigned vc_copybase:weird+6+weird; /* Base addr of copy memory */ ! 58: #undef weird ! 59: }; ! 60: #define BW2_COPYSHIFT 16 /* bits to shift base address */ ! 61: ! 62: #define BW2_USECOPYMEM 0x1 /* config flag to use copy memory */ ! 63: ! 64: #define BW2_VIDEOENABLEMASK 0x8000 /* Video enable */ ! 65: #define BW2_COPYENABLEMASK 0x4000 /* Copy enable */ ! 66: #define BW2_INTENABLEMASK 0x2000 /* Interrupt enable */ ! 67: #define BW2_INTACTIVEMASK 0x1000 /* Interrupt active */ ! 68: #define BW2_COPYBASEMASK 0x007E /* Copy base */ ! 69: ! 70: /* ! 71: * The device itself, as we remap it ! 72: */ ! 73: struct bw2dev { ! 74: u_char image[BW2_FBSIZE]; ! 75: #ifdef sun2 ! 76: struct bw2cr bw2cr; ! 77: u_char filler[NBPG - sizeof (struct bw2cr)]; ! 78: #endif ! 79: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.