summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--i386/Makefile.in2
-rw-r--r--i386/bogus/blit.h1
-rw-r--r--i386/i386at/blit.c948
-rw-r--r--i386/i386at/blitreg.h404
-rw-r--r--i386/i386at/blituser.h73
-rw-r--r--i386/i386at/blitvar.h116
-rw-r--r--i386/i386at/conf.c17
-rw-r--r--i386/i386at/kd.c13
9 files changed, 15 insertions, 1572 deletions
diff --git a/ChangeLog b/ChangeLog
index c6851e7..68505ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,19 @@
`DEVELOPMENT' for details. Partly based on suggestions by
Gianluca Guida <glguida@gmail.com>.
+ * i386/bogus/blit.h: Remove file.
+ * i386/i386at/blit.c: Likewise.
+ * i386/i386at/blitreg.h: Likewise.
+ * i386/i386at/blituser.h: Likewise.
+ * i386/i386at/blitvar.h: Likewise.
+ * i386/i386at/conf.c: Don't include <blit.h> anymore and adopt all
+ users of NBLIT as if it were always defined to `0'.
+ * i386/i386at/kd.c: Likewise.
+ (blit_init): Remove definition.
+ (blit_present): Likewise and adopt all users as if it were always
+ defined to `FALSE'.
+ * i386/Makefile.in (i386at-files): Remove `blit.c'.
+
* bogus/net_atm.h: Remove file.
* Makefile.in (bogus-files): Remove `net_atm.h'.
* kern/syscall_sw.c: Don't include <net_atm.h> anymore and adopt all
diff --git a/i386/Makefile.in b/i386/Makefile.in
index fdd04f2..d22a1aa 100644
--- a/i386/Makefile.in
+++ b/i386/Makefile.in
@@ -70,7 +70,7 @@ endif
# Source files for any i386 kernel
-i386at-files = autoconf.c blit.c conf.c cons_conf.c rtc.c \
+i386at-files = autoconf.c conf.c cons_conf.c rtc.c \
i386at_ds_routines.c immc.c int_init.c iopl.c kd.c kd_event.c \
kd_mouse.c kd_queue.c model_dep.c pic_isa.c
i386-files = ast_check.c db_disasm.c db_interface.c db_trace.c debug_i386.c \
diff --git a/i386/bogus/blit.h b/i386/bogus/blit.h
deleted file mode 100644
index 1471edf..0000000
--- a/i386/bogus/blit.h
+++ /dev/null
@@ -1 +0,0 @@
-#define NBLIT 0
diff --git a/i386/i386at/blit.c b/i386/i386at/blit.c
deleted file mode 100644
index 32cc0a2..0000000
--- a/i386/i386at/blit.c
+++ /dev/null
@@ -1,948 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1991,1990,1989 Carnegie Mellon University
- * All Rights Reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie Mellon
- * the rights to redistribute these changes.
- */
-
-/* **********************************************************************
- File: blit.c
- Description: Device Driver for Bell Tech Blit card
-
- $ Header: $
-
- Copyright Ing. C. Olivetti & C. S.p.A. 1988, 1989.
- All rights reserved.
-********************************************************************** */
-/*
- Copyright 1988, 1989 by Olivetti Advanced Technology Center, Inc.,
-Cupertino, California.
-
- All Rights Reserved
-
- Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appears in all
-copies and that both the copyright notice and this permission notice
-appear in supporting documentation, and that the name of Olivetti
-not be used in advertising or publicity pertaining to distribution
-of the software without specific, written prior permission.
-
- OLIVETTI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
-IN NO EVENT SHALL OLIVETTI BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
-NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUR OF OR IN CONNECTION
-WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-*/
-
-/*
- Copyright 1988, 1989 by Intel Corporation, Santa Clara, California.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appears in all
-copies and that both the copyright notice and this permission notice
-appear in supporting documentation, and that the name of Intel
-not be used in advertising or publicity pertaining to distribution
-of the software without specific, written prior permission.
-
-INTEL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
-IN NO EVENT SHALL INTEL BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
-NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-*/
-
-#ifdef MACH_KERNEL
-#include <sys/types.h>
-#include <device/errno.h>
-#else /* MACH_KERNEL */
-#include <sys/types.h>
-#include <sys/errno.h>
-#include <sys/param.h>
-#include <sys/dir.h>
-#include <sys/signal.h>
-#include <sys/user.h>
-#endif /* MACH_KERNEL */
-#include <vm/vm_kern.h>
-#include <mach/vm_param.h>
-#include <machine/machspl.h>
-
-#include <i386at/blitreg.h>
-#include <i386at/blitvar.h>
-#include <i386at/blituser.h>
-#include <i386at/kd.h>
-#include <i386at/kdsoft.h>
-
-#include <blit.h>
-
-
-/*
- * This driver really only supports 1 card, though parts of it were
- * written to support multiple cards. If you want to finish the job
- * and really support multiple cards, then you'll have to:
- *
- * (1) make sure that driver functions pass around a pointer telling
- * which card they're talking about.
- *
- * (2) coordinate things with the kd driver, so that one card is used
- * for the console and the other is simply an additional display.
- */
-#define MAXBLITS 1
-
-#if NBLIT > MAXBLITS
-/* oh, no, you don't want to do this...; */
-
-#else
-#if NBLIT > 0
-
-#define AUTOINIT 0
-
- /*
- * Forward Declarations
- */
-static tiledesc();
-static loadall();
-
-#if AUTOINIT
-int blitattach(), blitprobe();
-#endif
-
-int blitioctl(), blitopen(), blitclose(), blitmmap();
-
-
-static void setstatus();
-#define CARD_RESET 0
-#define CARD_MAPPED 1
-#define CARD_MAYBE_PRESENT 2
-#define CARD_PRESENT 3
-#define BIU_INIT 4
-#define UNUSED1 5
-#define DP_INIT 6
-#define UNUSED2 7
-
-
-#if AUTOINIT
-struct mb_device *blitinfo[NBLIT];
-
-struct mb_driver blitdriver = {
- blitprobe,
- 0, /* slave routine */
- blitattach,
- 0, 0, 0, /* go, done, intr routines */
- BLIT_MAPPED_SIZE,
- "blit", blitinfo, /* device info */
- 0, 0, /* no controller */
- 0 /* no flags */
- /* rest zeros */
-};
-#endif /* AUTOINIT */
-
-
-/*
- * Per-card bookkeeping information for driver.
- *
- * "scrstrip" and "dpctlregs" point to data areas that are passed to
- * the Display Processor. They are allocated out of the spare
- * graphics memory. "scrstrip" is used to describe an entire screen.
- * "dpctlregs" contains assorted parameters for the display
- * controller.
- *
- * "firstfree" is an offset into the graphics memory. Memory starting
- * there can be allocated by users.
- */
-
-struct blitsoft {
- struct blitdev *blt; /* ptr to mapped card */
- caddr_t physaddr; /* start of mapped card */
- boolean_t open; /* is device open? */
- struct screen_descrip *scrstrip;
- DPCONTROLBLK *dpctlregs;
- int firstfree;
-} blitsoft[NBLIT];
-
-
-/*
- * The following array contains the initial settings for
- * the Display Processor Control Block Registers.
- * The video timing signals in this array are for the
- * Bell Technologies Blit Express running in 1664 x 1200 x 1 mode.
- * Please treat as read-only.
- */
-
-DPCONTROLBLK blit_mparm = {
- DP_DSP_ON, /* video status */
- 0x00ff, /* interrupt mask - all disabled */
- 0x0010, /* trip point */
- 0x00ff, /* frame interrupt interval */
- 0x0000, /* reserved */
- CRTM_NONINTER | CRTM_SUPHIGH_SPEED, /* CRT controller mode */
- 41, /* horizontal synch stop */
- 57, /* horiz field start */
- 265, /* horiz field stop */
- 265, /* line length */
- 15, /* vert synch stop */
- 43, /* vert field start */
- 1243, /* vert field stop */
- 1244, /* frame length */
- 0x0000, 0x0000, /* descriptor pointer */
- 0x0000, /* reserved */
- 0x0101, /* x, y zoom factors */
- 0x0000, /* FldColor */
- 0x00ff, /* BdrColor */
- 0x0000, /* 1Bpp Pad */
- 0x0000, /* 2Bpp Pad */
- 0x0000, /* 4Bpp Pad */
- DP_CURSOR_CROSSHAIR, /* cursor style & mode */
- 0x00A0, 0x0050, /* cursor x & y loc. */
- /* cursor pattern */
- 0xfffe, 0xfffc, 0xc018, 0xc030, 0xc060, 0xc0c0, 0xc0c0, 0xc060,
- 0xc430, 0xce18, 0xdb0c, 0xf186, 0xe0c3, 0xc066, 0x803c, 0x0018
-};
-
-void blitreboot();
-
-/***********
- *
- * Initialization.
- *
- ***********/
-
-
-/*
- * Probe - is the board there?
- *
- * in: reg = start of mapped Blit memory.
- *
- * out: returns size of mapped Blit memory if the board is present,
- * 0 otherwise.
- *
- * effects: if the board is present, it is reset and left visible in
- * Unix mode.
- */
-
-#if AUTOINIT
-/*ARGSUSED*/
-int
-blitprobe(reg, unit)
- caddr_t reg;
- int unit;
-{
- struct blitdev *blt = (struct blitdev *)reg;
-
- if (blit_present())
- return(BLIT_MAPPED_SIZE); /* go */
- else
- return(0); /* no-go */
-}
-#endif /* AUTOINIT */
-
-
-/*
- * Temporary initialization routine. This will go away when we have
- * autoconfig.
- */
-
-blitinit()
-{
- if (!blit_present())
- return;
-
- blit_init();
-}
-
-
-/*
- * Allocate needed objects from Blit's memory.
- */
-blit_memory_init(bs)
- struct blitsoft *bs;
-{
- struct blitdev *blt = bs->blt;
- struct blitmem *bm = (struct blitmem *)blt->graphmem;
- u_char *p = bm->spare;
-
- if ((int)p % 2 == 1)
- ++p;
-
- bs->scrstrip = (struct screen_descrip *)p;
- p += sizeof(struct screen_descrip);
- if ((int)p % 2 == 1)
- ++p;
-
- bs->dpctlregs = (DPCONTROLBLK *)p;
- p += sizeof(DPCONTROLBLK);
- if ((int)p % 2 == 1)
- ++p;
-
- /*
- * Note: if you use the 786 graphics processor for character
- * processing, you should copy the font from the ROM into
- * graphics memory and change font_start to point to it.
- * Otherwise, the 786 will have problems accessing the font.
- */
-
- bs->firstfree = p - blt->graphmem;
-}
-
-
-/*
- * Reset the Blit board and leave it visible.
- */
-
-blit_reset_board()
-{
- union blit_config_reg config;
-
- config.byte = inb(BLIT_CONFIG_ADDR);
- config.reg.reset = 1;
- outb(BLIT_CONFIG_ADDR, config.byte);
- config.reg.reset = 0;
- config.reg.mode = BLIT_UNIX_MODE;
- config.reg.invisible = BLIT_VISIBLE;
- outb(BLIT_CONFIG_ADDR, config.byte);
- setstatus(CARD_RESET);
-}
-
-
-#if AUTOINIT
-/*
- * Attach - finish initialization by setting up the 786.
- */
-
-blitattach(md)
- struct mb_device *md;
-{
- struct blitdev *blt = (struct blitdev *)md->md_addr;
-
- blit_init(xyz);
-}
-#endif /* AUTOINIT */
-
-
-/*
- * Initialize Bus Interface Unit.
- */
-
-init_biu(blt)
- struct blitdev *blt;
-{
- WRITEREG8(blt, INTER_RELOC, 0);
- WRITEREG8(blt, BIU_CONTROL, BIU_16BIT);
-
- /* WRITEREG16(blt, DRAM_REFRESH, 0x003f); */
- WRITEREG16(blt, DRAM_REFRESH, 0x0018); /* refresh rate */
- WRITEREG16(blt, DRAM_CONTROL,
- MEMROWS1 | FASTPG_INTERLV | HEIGHT_256K);
- WRITEREG16(blt, DP_PRIORITY, (7 << 3) | 7); /* max pri */
- WRITEREG16(blt, GP_PRIORITY, (1 << 3) | 1); /* almost min pri */
- WRITEREG16(blt, EXT_PRIORITY, 5 << 3);
-
- /* now freeze the settings */
- WRITEREG16(blt, BIU_CONTROL, BIU_16BIT | BIU_WP1);
-
- /* Put graphics processor into Poll state. */
- WRITEREG16(blt, GP_OPCODE_REG, (OP_LINK|GECL));
-}
-
-
-/*
- * Initialize the Display Processor.
- * XXX - assumes only 1 card is installed, assumes monochrome display.
- */
-
-init_dp(bs)
- struct blitsoft *bs;
-{
- struct blitdev *blt = bs->blt;
- struct blitmem *bm = (struct blitmem *)blt->graphmem;
-
- /*
- * Set up strip header and tile descriptor for the whole
- * screen. It's not clear why the C bit should be turned on,
- * but it seems to get rid of the nasty flickering you can get
- * by positioning an xterm window along the top of the screen.
- */
- bs->scrstrip->strip.lines = BLIT_MONOHEIGHT - 1;
- bs->scrstrip->strip.linkl = 0;
- bs->scrstrip->strip.linkh = 0;
- bs->scrstrip->strip.tiles = DP_C_BIT | (1 - 1);
- tiledesc(&bs->scrstrip->tile,
- 0, 0, /* x, y */
- BLIT_MONOWIDTH, /* width of strip */
- BLIT_MONOWIDTH, /* width of bitmap */
- VM_TO_ADDR786(bm->fb.mono_fb, blt), /* the actual bitmap */
- 1); /* bits per pixel */
-
- /* Copy into DP register block. */
- *(bs->dpctlregs) = blit_mparm;
- bs->dpctlregs->descl = DP_ADDRLOW(VM_TO_ADDR786(bs->scrstrip, blt));
- bs->dpctlregs->desch = DP_ADDRHIGH(VM_TO_ADDR786(bs->scrstrip, blt));
-
- /* Load the DP with the register block */
- loadall(blt, bs->dpctlregs);
-}
-
-
-/*
- * Fill in a tile descriptor.
- */
-
-static
-tiledesc(tile, x, y, w, ww, adx, bpp)
- TILEDESC *tile; /* pointer to tile descriptor */
- int x; /* starting x in bitmap */
- int y; /* starting y in bitmap */
- int w; /* width of strip (in bits_) */
- int ww; /* actual width of bitmap (bits) */
- addr786_t adx; /* start of bitmap */
- int bpp; /* bits per pixel */
-{
- u_short bm_width;
- short rghtp;
- short adr_left, adr_right;
- addr786_t bmstadr;
- u_short start_stop_bit;
-
- bm_width = 2 * (((ww + 1) * bpp) / 16);
- rghtp = x + w - 1;
- adr_left = ((x * bpp) / 16) * 2;
- adr_right = ((rghtp * bpp) / 16) * 2;
- bmstadr = (ww * y) + adr_left + (int)adx;
- start_stop_bit = ((((16 - 1) - ((x * bpp) % 16)) << 4) +
- ((16 - ((rghtp + 1) * bpp) % 16) % 16) +
- (bpp << 8));
-
- tile->bitmapw = bm_width;
- tile->meml = DP_ADDRLOW(bmstadr);
- tile->memh = DP_ADDRHIGH(bmstadr);
- tile->bppss = start_stop_bit;
- tile->fetchcnt = adr_right - adr_left;
- tile->flags = 0;
-}
-
-
-/*
- * Cause the Display Processor to load its Control Registers from
- * "vm_addr".
- */
-
-static
-loadall(blt, vm_addr)
-struct blitdev *blt;
-DPCONTROLBLK *vm_addr;
-{
- addr786_t blit_addr = VM_TO_ADDR786(vm_addr, blt);
- int i;
-
- /* set up dp address */
- WRITEREG16(blt, DP_PARM1_REG, DP_ADDRLOW(blit_addr));
- WRITEREG16(blt, DP_PARM2_REG, DP_ADDRHIGH(blit_addr));
-
- /* set blanking video */
- WRITEREG16(blt, DEF_VIDEO_REG, 0);
-
- /* load opcode to start dp */
- WRITEREG16(blt, DP_OPCODE_REG, DP_LOADALL);
-
- /* wait for acceptance */
- for (i = 0; i < DP_RDYTIMEOUT; ++i)
- if (READREG(blt, DP_OPCODE_REG) & DECL)
- break;
-
- if (i >= DP_RDYTIMEOUT) {
- printf("Blit Display Processor timeout (loading registers)\n");
- hang:
- goto hang;
- }
-
-#ifdef notdef
- /* wait for acceptance */
- CDELAY((READREG(blt, DP_OPCODE_REG) & DECL) != 0, DP_RDYTIMEOUT);
- if ((READREG(blt, DP_OPCODE_REG) & DECL) == 0) {
- printf("Blit Display Processor timeout (loading registers)\n");
- hang:
- goto hang;
- }
-#endif /* notdef */
-}
-
-
-/*
- * blit_present: returns YES if Blit is present. For the first call,
- * the hardware is probed. After that, a flag is used.
- * Sets blitsoft[0].blt and blitsoft[0].physaddr.
- */
-
-#define TEST_BYTE 0xa5 /* should not be all 0's or 1's */
-
-boolean_t
-blit_present()
-{
- static boolean_t present = FALSE;
- static boolean_t initialized = FALSE;
- struct blitdev *blt;
- boolean_t blit_rom_ok();
- struct blitdev *mapblit();
- void freeblit();
-
- /*
- * We set "initialized" early on so that if the Blit init. code
- * fails, kdb will still be able to use the EGA or VGA display
- * (if present).
- */
- if (initialized)
- return(present);
- initialized = TRUE;
-
- blit_reset_board();
- blt = mapblit((caddr_t)BLIT_BASE_ADDR, BLIT_MAPPED_SIZE);
- setstatus(CARD_MAPPED);
- if (blt == NULL)
- panic("blit: can't map display");
- blt->graphmem[0] = TEST_BYTE;
- present = FALSE;
- if (blt->graphmem[0] == TEST_BYTE) {
- setstatus(CARD_MAYBE_PRESENT);
- present = blit_rom_ok(blt);
- }
- if (present) {
- blitsoft[0].blt = blt;
- blitsoft[0].physaddr = (caddr_t)BLIT_BASE_ADDR;
- setstatus(CARD_PRESENT);
- }
- else
- freeblit((vm_offset_t)blt, BLIT_MAPPED_SIZE);
- return(present);
-}
-
-#undef TEST_BYTE
-
-
-/*
- * mapblit: map the card into kernel vm and return the (virtual)
- * address.
- */
-struct blitdev *
-mapblit(physaddr, length)
-caddr_t physaddr; /* start of card */
-int length; /* num bytes to map */
-{
- vm_offset_t vmaddr;
-#ifdef MACH_KERNEL
- vm_offset_t io_map();
-#else /* MACH_KERNEL */
- vm_offset_t pmap_map_bd();
-#endif /* MACH_KERNEL */
-
- if (physaddr != (caddr_t)trunc_page(physaddr))
- panic("Blit card not on page boundary");
-
-#ifdef MACH_KERNEL
- vmaddr = io_map((vm_offset_t)physaddr, length);
- if (vmaddr == 0)
-#else /* MACH_KERNEL */
- if (kmem_alloc_pageable(kernel_map,
- &vmaddr, round_page(BLIT_MAPPED_SIZE))
- != KERN_SUCCESS)
-#endif /* MACH_KERNEL */
- panic("can't alloc VM for Blit card");
-
- (void)pmap_map_bd(vmaddr, (vm_offset_t)physaddr,
- (vm_offset_t)physaddr+length,
- VM_PROT_READ | VM_PROT_WRITE);
- return((struct blitdev *)vmaddr);
-}
-
-
-/*
- * freeblit: free card from memory.
- * XXX - currently a no-op.
- */
-void
-freeblit(va, length)
-vm_offset_t va; /* virt addr start of card */
-int length;
-{
-}
-
-
-/*
- * blit_init: initialize globals & hardware, and set cursor. Could be
- * called twice, once as part of kd initialization and once as part of
- * blit initialization. Should not be called before blit_present() is
- * called.
- */
-
-void
-blit_init()
-{
- static boolean_t initialized = FALSE;
- struct blitmem *gmem; /* start of blit graphics memory */
- int card;
- void getfontinfo(), clear_blit();
-
- if (initialized)
- return;
-
- for (card = 0; card < NBLIT; ++card) {
- if (card > 0) {
- blitsoft[card].blt = NULL;
- blitsoft[card].physaddr = NULL;
- }
- blitsoft[card].open = FALSE;
- blitsoft[card].scrstrip = NULL;
- blitsoft[card].dpctlregs = NULL;
- blitsoft[card].firstfree = 0;
- }
-
- /*
- * blit_memory_init allocates memory used by the Display Processor,
- * so it comes before the call to init_dp. blit_memory_init
- * potentially copies the font from ROM into the graphics memory,
- * so it comes after the call to getfontinfo.
- */
- getfontinfo(blitsoft[0].blt); /* get info & check assumptions */
- blit_memory_init(&blitsoft[0]);
-
- /* init 786 */
- init_biu(blitsoft[0].blt);
- setstatus(BIU_INIT);
- init_dp(&blitsoft[0]);
- setstatus(DP_INIT);
-
- gmem = (struct blitmem *)blitsoft[0].blt->graphmem;
- vid_start = gmem->fb.mono_fb;
- kd_lines = 25;
- kd_cols = 80;
- kd_attr = KA_NORMAL;
-
- /*
- * Use generic bitmap routines, no 786 assist (see
- * blit_memory_init).
- */
- kd_dput = bmpput;
- kd_dmvup = bmpmvup;
- kd_dmvdown = bmpmvdown;
- kd_dclear = bmpclear;
- kd_dsetcursor = bmpsetcursor;
- kd_dreset = blitreboot;
-
- clear_blit(blitsoft[0].blt);
- (*kd_dsetcursor)(0);
-
- initialized = TRUE;
-}
-
-
-/*
- * blit_rom_ok: make sure we're looking at the ROM for a monochrome
- * Blit.
- */
-
-boolean_t
-blit_rom_ok(blt)
- struct blitdev *blt;
-{
- short magic;
- short bpp;
-
- magic = READROM(blt->eprom, EP_MAGIC1);
- if (magic != EP_MAGIC1_VAL) {
-#ifdef notdef
- printf("blit: magic1 bad (0x%x)\n", magic);
-#endif
- return(FALSE);
- }
- magic = READROM(blt->eprom, EP_MAGIC2);
- if (magic != EP_MAGIC2_VAL) {
-#ifdef notdef
- printf("blit: magic2 bad (0x%x)\n", magic);
-#endif
- return(FALSE);
- }
- bpp = READROM(blt->eprom, EP_BPP);
- if (bpp != 1) {
-#ifdef notdef
- printf("blit: not monochrome board (bpp = 0x%x)\n", bpp);
-#endif
- return(FALSE);
- }
-
- return(TRUE);
-}
-
-
-/*
- * getfontinfo: get information about the font and make sure that
- * our simplifying assumptions are valid.
- */
-
-void
-getfontinfo(blt)
- struct blitdev *blt;
-{
- u_char *rom = blt->eprom;
- short fontoffset;
- short pick_cursor_height();
-
- fb_width = BLIT_MONOWIDTH;
- fb_height = BLIT_MONOHEIGHT;
- chars_in_font = READROM(rom, EP_NUMCHARS);
- char_width = READROM(rom, EP_CHARWIDTH);
- char_height = READROM(rom, EP_CHARHEIGHT);
- fontoffset = READROM(rom, EP_FONTSTART);
- xstart = READROM(rom, EP_XSTART);
- ystart = READROM(rom, EP_YSTART);
- char_black = BLIT_BLACK_BYTE;
- char_white = BLIT_WHITE_BYTE;
-
- font_start = rom + fontoffset;
-
- /*
- * Check byte-alignment assumption.
- * XXX - does it do any good to panic when initializing the
- * console driver?
- */
- if (char_width % 8 != 0)
- panic("blit: char width not integral num of bytes");
- if (xstart % 8 != 0) {
- /* move it to a more convenient location */
- printf("blit: console corner moved.\n");
- xstart = 8 * (xstart/8);
- }
-
- cursor_height = pick_cursor_height();
- char_byte_width = char_width / 8;
- fb_byte_width = BLIT_MONOWIDTH / 8;
- font_byte_width = char_byte_width * chars_in_font;
-}
-
-
-/*
- * pick_cursor_height: pick a size for the cursor, based on the font
- * size.
- */
-
-short
-pick_cursor_height()
-{
- int scl_avail; /* scan lines available for console */
- int scl_per_line; /* scan lines per console line */
-
- /*
- * scan lines avail. = total lines - top margin;
- * no bottom margin (XXX).
- */
- scl_avail = BLIT_MONOHEIGHT - ystart;
-
- scl_per_line = scl_avail / kd_lines;
- if (scl_per_line < char_height)
- return(1);
- else
- return(scl_per_line - char_height);
-}
-
-
-/*
- * setstatus: Give a status indication to the user. Ideally, we'd
- * just set the 3 user-controlled LED's. Unfortunately, that doesn't
- * seem to work. So, we ring the bell.
- */
-
-static void
-setstatus(val)
- int val;
-{
- union blit_diag_reg diag;
-
- diag.byte = inb(BLIT_DIAG_ADDR);
- diag.reg.led0 = (val & 1) ? BLIT_LED_ON : BLIT_LED_OFF;
- diag.reg.led1 = (val & 2) ? BLIT_LED_ON : BLIT_LED_OFF;
- diag.reg.led2 = (val & 4) ? BLIT_LED_ON : BLIT_LED_OFF;
- outb(BLIT_DIAG_ADDR, diag.byte);
-
-#ifdef DEBUG
- for (val &= 7; val > 0; val--) {
- feep();
- pause();
- }
- for (val = 0; val < 10; val++) {
- pause();
- }
-#endif
-}
-
-
-
-/***********
- *
- * Other (non-initialization) routines.
- *
- ***********/
-
-
-/*
- * Open - Verify that minor device is OK and not in use, then clear
- * the screen.
- */
-
-/*ARGSUSED*/
-int
-blitopen(dev, flag)
- dev_t dev;
- int flag;
-{
- void clear_blit();
- int which = minor(dev);
-
- if (!blit_present() || which >= NBLIT)
- return(ENXIO);
- if (blitsoft[which].open)
- return(EBUSY);
-
- clear_blit(blitsoft[which].blt);
- blitsoft[which].open = TRUE;
- return(0); /* ok */
-}
-
-
-/*
- * Close - free any kernel memory structures that were allocated while
- * the device was open (currently none).
- */
-
-/*ARGSUSED*/
-blitclose(dev, flag)
- dev_t dev;
- int flag;
-{
- int which = minor(dev);
-
- if (!blitsoft[which].open)
- panic("blit: closing not-open device??");
- blitsoft[which].open = FALSE;
-}
-
-
-/*
- * Mmap.
- */
-
-/*ARGSUSED*/
-int
-blitmmap(dev, off, prot)
- dev_t dev;
- off_t off;
- int prot;
-{
- if ((u_int) off >= BLIT_MAPPED_SIZE)
- return(-1);
-
- /* Get page frame number for the page to be mapped. */
- return(i386_btop(blitsoft[minor(dev)].physaddr + off));
-}
-
-
-/*
- * Ioctl.
- */
-
-#ifdef MACH_KERNEL
-io_return_t blit_get_stat(dev, flavor, data, count)
- dev_t dev;
- int flavor;
- int *data; /* pointer to OUT array */
- unsigned int *count; /* OUT */
-{
- int which = minor(dev);
-
- switch (flavor) {
- case BLIT_1ST_UNUSED:
- if (*count < 1)
- return (D_INVALID_OPERATION);
- *data = blitsoft[which].firstfree;
- *count = 1;
- break;
- default:
- return (D_INVALID_OPERATION);
- }
- return (D_SUCCESS);
-}
-#else /* MACH_KERNEL */
-/*ARGSUSED*/
-int
-blitioctl(dev, cmd, data, flag)
- dev_t dev;
- int cmd;
- caddr_t data;
- int flag;
-{
- int which = minor(dev);
- int err = 0;
-
- switch (cmd) {
- case BLIT_1ST_UNUSED:
- *(int *)data = blitsoft[which].firstfree;
- break;
- default:
- err = ENOTTY;
- }
-
- return(err);
-}
-#endif /* MACH_KERNEL */
-
-/*
- * clear_blit: clear blit's screen.
- */
-
-void
-clear_blit(blt)
- struct blitdev *blt;
-{
- (*kd_dclear)(0, kd_lines*kd_cols, KA_NORMAL);
-}
-
-/*
- * Put the board into DOS mode in preparation for rebooting.
- */
-
-void
-blitreboot()
-{
- union blit_config_reg config;
-
- config.byte = inb(BLIT_CONFIG_ADDR);
- config.reg.mode = BLIT_DOS_MODE;
- config.reg.invisible = BLIT_VISIBLE;
- outb(BLIT_CONFIG_ADDR, config.byte);
-}
-
-#endif /* NBLIT > 0 */
-#endif /* NBLIT > MAXBLITS */
diff --git a/i386/i386at/blitreg.h b/i386/i386at/blitreg.h
deleted file mode 100644
index 7226aca..0000000
--- a/i386/i386at/blitreg.h
+++ /dev/null
@@ -1,404 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1991,1990,1989 Carnegie Mellon University
- * All Rights Reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie Mellon
- * the rights to redistribute these changes.
- */
-/* **********************************************************************
- File: blitreg.h
- Description: Bell Tech Blit card hardware description
-
- $ Header: $
-
- Copyright Ing. C. Olivetti & C. S.p.A. 1988, 1989.
- All rights reserved.
-********************************************************************** */
-/*
- Copyright 1988, 1989 by Olivetti Advanced Technology Center, Inc.,
-Cupertino, California.
-
- All Rights Reserved
-
- Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appears in all
-copies and that both the copyright notice and this permission notice
-appear in supporting documentation, and that the name of Olivetti
-not be used in advertising or publicity pertaining to distribution
-of the software without specific, written prior permission.
-
- OLIVETTI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
-IN NO EVENT SHALL OLIVETTI BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
-NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUR OF OR IN CONNECTION
-WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-*/
-
-/*
- * Some code taken from Bob Glossman's 1987 "minimal Blit Express
- * driver", copyright unknown. Probably copyright Intel, too.
- */
-
-
-#ifndef blitreg_DEFINED
-#define blitreg_DEFINED
-
-
-/*
- * Registers accessible through AT I/O space. These addresses can be
- * changed by changing bits 4-8 of the Blit's DIP switch.
- */
-
-#define BLIT_CONFIG_ADDR 0x304
-#define BLIT_DIAG_ADDR 0x306
-
-#if defined(sun386) || defined(i386)
-
-
-/*
- * Layout of Blit control register.
- */
-
-union blit_config_reg {
- struct config_bits {
- unsigned dos_segment : 4;
- unsigned reset : 1;
- unsigned mode : 1;
-#define BLIT_UNIX_MODE 1
-#define BLIT_DOS_MODE 0
- unsigned invisible : 1;
-#define BLIT_INVISIBLE 1
-#define BLIT_VISIBLE 0
- unsigned unused : 1;
- } reg;
- u_char byte;
-};
-
-
-/*
- * Blit Diag register.
- * The UNIX base address is currently hardwired to BLIT_BASE_ADDR.
- */
-
-#define BLIT_BASE_ADDR 0xd80000 /* base of blit memory (phys addr) */
-
-union blit_diag_reg {
- struct diag_bits {
- unsigned unix_base_addr : 5; /* phys addr (ignored) */
- unsigned led0 : 1;
- unsigned led1 : 1;
- unsigned led2 : 1;
-#define BLIT_LED_ON 1
-#define BLIT_LED_OFF 0
- } reg;
- u_char byte;
-};
-
-#endif /* sun386 || i386 */
-
-
-/*
- * Graphics memory, 786 registers, static RAM, and EPROM, all
- * accessible through mapped memory.
- */
-
-#define BLIT_MONOWIDTH 1664
-#define BLIT_MONOHEIGHT 1200
-#define BLIT_MONOFBSIZE ((BLIT_MONOWIDTH*BLIT_MONOHEIGHT)/8)
- /* byte size of monochrome fb */
-
-#define BLIT_MEMSIZE 0x100000 /* num bytes mapped graphics memory */
-
-#define BLIT_REGSIZE 128 /* bytes taken by 786 registers */
-#define BLIT_REGPAD (0x10000 - BLIT_REGSIZE)
- /* padding between reg's and SRAM */
-
-#define BLIT_SRAMSIZE 0x4000 /* num bytes mapped for SRAM */
-#define BLIT_SRAMPAD (0x10000 - BLIT_SRAMSIZE)
- /* padding between SRAM and EPROM */
-
-#define BLIT_EPROMSIZE 0x20000 /* num bytes mapped for EPROM */
-
-
-/*
- * Layout of the Blit's mapped memory. The physical address is (or
- * will be, eventually) determined by the Diag register (above).
- */
-
-struct blitdev {
- u_char graphmem[BLIT_MEMSIZE];
- u_char reg786[BLIT_REGSIZE];
- u_char pad1[BLIT_REGPAD];
- u_char sram[BLIT_SRAMSIZE];
- u_char pad2[BLIT_SRAMPAD];
- u_char eprom[BLIT_EPROMSIZE];
-};
-
-#define BLIT_MAPPED_SIZE sizeof(struct blitdev)
-
-
-/*
- * Offsets for 786 registers (i.e., indices into reg786[]).
- */
-
-#define INTER_RELOC 0x00 /* Internal Relocation Register */
-#define BIU_CONTROL 0x04 /* BIU Control Register */
-#define DRAM_REFRESH 0x06 /* DRAM Refresh control register */
-#define DRAM_CONTROL 0x08 /* DRAM control register */
-#define DP_PRIORITY 0x0A /* DP priority register */
-#define GP_PRIORITY 0x0C /* GP priority register*/
-#define EXT_PRIORITY 0x0E /* External Priority Register*/
-#define GP_OPCODE_REG 0x20 /* GP opcode register */
-#define GP_PARM1_REG 0x22 /* GP Parameter 1 Register */
-#define GP_PARM2_REG 0x24 /* GP Parameter 2 Register*/
-#define GP_STAT_REG 0x26 /* GP Status Register*/
-#define DP_OPCODE_REG 0x40 /* DP opcode register */
-#define DP_PARM1_REG 0x42 /* DP Parameter 1 Register*/
-#define DP_PARM2_REG 0x44 /* DP Parameter 2 Register*/
-#define DP_PARM3_REG 0x46 /* DP Parameter 3 Register*/
-#define DP_STAT_REG 0x48 /* DP Status Register*/
-#define DEF_VIDEO_REG 0x4A /* DP Default Video Register*/
-
-
-/*
- * 786 BIU Control Register values.
- */
-
-#define BIU_WP1 0x02 /* Write Protect One; 1 = on */
-#define BIU_16BIT 0x10 /* access 786 registers as words; 0 = bytes */
-
-
-/*
- * 786 DRAM/VRAM Control Register values.
- */
-
-/* RW bits */
-#define MEMROWS1 0
-#define MEMROWS2 0x20
-#define MEMROWS3 0x40
-#define MEMROWS4 0x60
-
-/* DC bits */
-#define PG_NONINTERLV 0
-#define FASTPG_NONINTERLV 0x10
-#define PG_INTERLV 0x08
-#define FASTPG_INTERLV 0x18
-
-/* HT bits */
-#define HEIGHT_8K 0
-#define HEIGHT_16K 0x1
-#define HEIGHT_32K 0x2
-#define HEIGHT_64K 0x3
-#define HEIGHT_128K 0x4
-#define HEIGHT_256K 0x5
-#define HEIGHT_512K 0x6
-#define HEIGHT_1M 0x7
-
-
-/*
- * 786 Graphics Processor opcodes.
- */
-
-#define GECL 0x001 /* end of command list */
-#define OP_LINK 0x200 /* LINK - "link next cmd" */
-
-
-/*
- * 786 Display Processor opcodes.
- */
-
-#define DECL 1 /* end of list */
-#define DP_LOADALL 0x500
-
-
-/*
- * Macros for accessing 786 registers (see BIU_16BIT) and EPROM.
- */
-
-#define WRITEREG8(base,offset,val) \
- (base)->reg786[(offset)] = (val) & 0xff, \
- (base)->reg786[(offset)+1] = ((val) & 0xff00) >> 8
-
-#define WRITEREG16(base,offset,val) \
- (*((u_short *)((base)->reg786+(offset)))) = (val)
-
-#define READREG(base,offset) \
- (*((u_short *)(((base)->reg786+(offset)))))
-
-#define WRITEROM(romp,offset,val) \
- (*((u_short *)((romp)+(offset)))) = (val)
-
-#define READROM(romp,offset) \
- (*((u_short *)(((romp)+(offset)))))
-
-
-/*
- * Layout of Display Processor Control Block Registers. This block is
- * allocated somewhere in the Blit's graphics memory, and a pointer to
- * it is passed to the Display Processor.
- *
- * NOTE: The 786 only sees the memory mapped by the Blit. Thus all
- * addresses passed to the 786 are relative to the start of the Blit's
- * mapped memory.
- */
-
-typedef int addr786_t; /* 0 = start of Blit mapped memory */
-
-typedef struct {
- u_short vidstat; /* video status */
- u_short intrmask; /* interrupt mask */
- u_short trip_point;
- u_short frame_intr; /* frame interrupt */
- u_short reserved1;
- u_short crtmode; /* CRT controller mode */
- u_short hsyncstop; /* monitor parameters */
- u_short hfldstart;
- u_short hfldstop;
- u_short linelength;
- u_short vsyncstop;
- u_short vfldstart;
- u_short vfldstop;
- u_short vframelen;
- u_short descl; /* descriptor pointer low part */
- u_short desch; /* descriptor pointer high part */
- u_short reserved2;
- u_short xyzoom;
- u_short fldcolor;
- u_short bordercolor;
- u_short bpp_pad1;
- u_short bpp_pad2;
- u_short bpp_pad4;
- u_short csrmode; /* & CsrPad */
- u_short cursorx; /* cursor x location */
- u_short cursory; /* cursor y location */
- u_short cursorpat[16]; /* cursor pattern */
-} DPCONTROLBLK;
-
-
-/*
- * Values for 786 Display Processor Control Block Registers.
- */
-
-/* video status */
-#define DP_DSP_ON 1 /* display on */
-#define DP_CSR_ON 2 /* cursor on */
-
-/* CRT controller modes */
-#define CRTM_NONINTER 0 /* non-interlaced */
-#define CRTM_INTERLCD 0x40 /* interlaced */
-#define CRTM_INTERSYN 0x60 /* interlaced - sync */
-#define CRTM_WIN_STAT_ENABLE 0x10 /* window status enable */
-#define CRTM_SYNC_SLAVE_MODE 0x08 /* on = operate as slave */
-#define CRTM_BLANK_SLAVE_MODE 0x04 /* on = Blank is input */
-#define CRTM_NORMAL_SPEED 0x00
-#define CRTM_HIGH_SPEED 0x01
-#define CRTM_VRYHIGH_SPEED 0x02
-#define CRTM_SUPHIGH_SPEED 0x03
-
-/* cursor style */
-#define DP_CURSOR_16X16 0x8000 /* off = 8x8 */
-#define DP_CURSOR_CROSSHAIR 0x4000 /* off = block cursor */
-#define DP_CURSOR_TRANSPRNT 0x2000 /* off = cursor is opaque */
-
-
-/*
- * Types for dealing with 786 Display Processor.
- */
-
-typedef struct {
- u_short lines; /* (lines in strip) - 1 */
- u_short linkl; /* link to next strip low part */
- u_short linkh; /* link to next strip high part */
- u_short tiles; /* C bit, (tiles in strip) - 1 */
-} STRIPHEADER;
-
-/*
- * If the C bit is turned on, the display processor "automatically
- * displays the background color" for areas not defined by the strips.
- * See section 3.1.3.2 of the '786 User's Manual.
- */
-#define DP_C_BIT 0x8000
-
-typedef struct {
- u_short bitmapw; /* width of bitmap */
- u_short meml; /* btb mem address low part */
- u_short memh; /* btb mem address high part */
- u_short bppss; /* bpp, start and stop fields */
- u_short fetchcnt; /* fetch count */
- u_short flags; /* various flags */
-} TILEDESC;
-
-
-/*
- * Macros for encoding addresses for strip headers & tile descriptors.
- * addr786 is relative to the start of the Blit's mapped memory.
- */
-
-#define DP_ADDRLOW(addr786) (((int)(addr786)) & 0xffff)
-#define DP_ADDRHIGH(addr786) ((((int)(addr786)) >> 16) & 0x3f)
-
-
-/*
- * Byte offsets to useful data words within the EPROM.
- */
-
-#define EP_MAGIC1 0
-#define EP_MAGIC1_VAL 0x7856
-#define EP_MAGIC2 2
-#define EP_MAGIC2_VAL 0x6587
-#define EP_DPSTART 4 /* start of DP ctl block */
- /* (0 = start of EPROM) */
-#define EP_DPLEN 6 /* byte length of DP control block */
-
-#define EP_FONTSTART 8 /* start of font */
- /* (0 = start of EPROM) */
-#define EP_FONTLEN 10 /* byte length of font */
-#define EP_CHARWIDTH 12 /* bit width of each char in font */
-#define EP_CHARHEIGHT 14
-#define EP_NUMCHARS 16 /* num chars in font */
-
-/* where in the bitmap the 25x80 console screen starts */
-#define EP_XSTART 18
-#define EP_YSTART 20
-
-#define EP_SCREENWIDTH 22 /* pixels per scan line */
-#define EP_SCREENHEIGHT 24 /* number of scan lines */
-
-#define EP_FIXUP_X 26 /* magic numbers for displaying */
-#define EP_FIXUP_Y 28 /* hardware cursor */
-
-#define EP_BPP 30 /* bits per pixel */
-
-
-/*
- * Miscellaneous.
- */
-
-#define BLIT_BLACK_BIT 0 /* try saying that 3 times fast */
-#define BLIT_WHITE_BIT 1
-#define BLIT_BLACK_BYTE 0
-#define BLIT_WHITE_BYTE 0xff
-
-
-#endif /* blitreg_DEFINED */
diff --git a/i386/i386at/blituser.h b/i386/i386at/blituser.h
deleted file mode 100644
index 0ebcfff..0000000
--- a/i386/i386at/blituser.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1991,1990,1989 Carnegie Mellon University
- * All Rights Reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie Mellon
- * the rights to redistribute these changes.
- */
-/* **********************************************************************
- File: blituser.h
- Description: User-program definitions for Bell Tech Blit card
-
- Copyright Ing. C. Olivetti & C. S.p.A. 1988, 1989.
- All rights reserved.
-********************************************************************** */
-/*
- Copyright 1988, 1989 by Olivetti Advanced Technology Center, Inc.,
-Cupertino, California.
-
- All Rights Reserved
-
- Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appears in all
-copies and that both the copyright notice and this permission notice
-appear in supporting documentation, and that the name of Olivetti
-not be used in advertising or publicity pertaining to distribution
-of the software without specific, written prior permission.
-
- OLIVETTI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
-IN NO EVENT SHALL OLIVETTI BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
-NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUR OF OR IN CONNECTION
-WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-*/
-
-#ifndef _BLITUSER_
-#define _BLITUSER_
-
-#include <sys/ioctl.h>
-
-/*
- * Ioctl's.
- */
-
-/*
- * BLIT_1ST_UNUSED returns a byte offset into the Blit graphics
- * memory. The user is free to allocate and use any graphics memory
- * starting at that offset.
- */
-
-#define BLIT_1ST_UNUSED _IOR('b', 1, int)
-
-#endif /* _BLITUSER_ */
diff --git a/i386/i386at/blitvar.h b/i386/i386at/blitvar.h
deleted file mode 100644
index 58401f3..0000000
--- a/i386/i386at/blitvar.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1991,1990,1989 Carnegie Mellon University
- * All Rights Reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie Mellon
- * the rights to redistribute these changes.
- */
-/* **********************************************************************
- File: blitvar.h
- Description: Definitions used by Blit driver other than h/w definition.
-
- $ Header: $
-
- Copyright Ing. C. Olivetti & C. S.p.A. 1988, 1989.
- All rights reserved.
-********************************************************************** */
-/*
- Copyright 1988, 1989 by Olivetti Advanced Technology Center, Inc.,
-Cupertino, California.
-
- All Rights Reserved
-
- Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appears in all
-copies and that both the copyright notice and this permission notice
-appear in supporting documentation, and that the name of Olivetti
-not be used in advertising or publicity pertaining to distribution
-of the software without specific, written prior permission.
-
- OLIVETTI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
-IN NO EVENT SHALL OLIVETTI BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
-NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUR OF OR IN CONNECTION
-WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-*/
-
-#include <i386at/blitreg.h>
-#include <sys/types.h>
-#include <mach/boolean.h>
-
-
-/*
- * This is how we use the Blit's graphics memory. The frame buffer
- * goes at the front, and the rest is used for miscellaneous
- * allocations. Users can use the "spare" memory, but they should do
- * an ioctl to find out which part of the memory is really free.
- */
-
-struct blitmem {
- union blitfb {
- u_char mono_fb[BLIT_MONOFBSIZE];
- u_char color_fb[1]; /* place-holder */
- } fb;
- u_char spare[BLIT_MEMSIZE - sizeof(union blitfb)];
-};
-
-
-/*
- * Macro to get from blitdev pointer to monochrome framebuffer.
- */
-#define BLIT_MONOFB(blt, fbptr) \
- { struct blitmem *mymem = (struct blitmem *)((blt)->graphmem); \
- fbptr = mymem->fb.mono_fb; \
- }
-
-
-/*
- * Single-tile description that can be used to describe the entire
- * screen.
- */
-
-struct screen_descrip {
- STRIPHEADER strip;
- TILEDESC tile;
-};
-
-
-/*
- * Number of microseconds we're willing to wait for display processor
- * to load its command block.
- */
-
-#define DP_RDYTIMEOUT 1000000
-
-
-/*
- * Conversion macros.
- */
-
-#define VM_TO_ADDR786(vmaddr, blit_base) \
- ((int)(vmaddr) - (int)(blit_base))
-
-
-extern boolean_t blit_present();
-extern void blit_init();
diff --git a/i386/i386at/conf.c b/i386/i386at/conf.c
index 2e62ca0..f36fcc5 100644
--- a/i386/i386at/conf.c
+++ b/i386/i386at/conf.c
@@ -69,16 +69,6 @@ extern int lprgetstat(), lprsetstat(), lprportdeath();
#define lprname "lpr"
#endif /* NLPR > 0 */
-#include <blit.h>
-#if NBLIT > 0
-extern int blitopen(), blitclose(), blit_get_stat();
-extern vm_offset_t blitmmap();
-#define blitname "blit"
-
-extern int mouseinit(), mouseopen(), mouseclose();
-extern int mouseioctl(), mouseselect(), mouseread();
-#endif
-
extern int kbdopen(), kbdclose(), kbdread();
extern int kbdgetstat(), kbdsetstat();
#define kbdname "kbd"
@@ -151,13 +141,6 @@ struct dev_ops dev_name_list[] =
nodev },
#endif
-#if NBLIT > 0
- { blitname, blitopen, blitclose, nodev,
- nodev, blit_get_stat, nodev, blitmmap,
- nodev, nodev, nodev, 0,
- nodev },
-#endif
-
{ mousename, mouseopen, mouseclose, mouseread,
nodev, mousegetstat, nulldev, nomap,
nodev, nulldev, nulldev, 0,
diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c
index f2e8f15..cf03bc2 100644
--- a/i386/i386at/kd.c
+++ b/i386/i386at/kd.c
@@ -93,14 +93,6 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <i386at/kdsoft.h>
#include <cons.h>
-#include <blit.h>
-#if NBLIT > 0
-#include <i386at/blitvar.h>
-#else
-#define blit_present() FALSE
-#define blit_init() /* nothing */
-#endif
-
#define DEBUG 1 /* export feep() */
#define DEFAULT -1 /* see kd_atoi */
@@ -1200,10 +1192,7 @@ kdinit()
* board specific initialization: set up globals and kd_dxxx
* pointers, and synch displayed cursor with logical cursor.
*/
- if (blit_present())
- blit_init();
- else
- kd_xga_init();
+ kd_xga_init();
/* get rid of any garbage in output buffer */
if (inb(K_STATUS) & K_OBUF_FUL)