Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/alpha Remove local implementation switching to acce...



details:   https://anonhg.NetBSD.org/src/rev/04bdd342a963
branches:  trunk
changeset: 484113:04bdd342a963
user:      nisimura <nisimura%NetBSD.org@localhost>
date:      Sun Mar 26 05:52:17 2000 +0000

description:
Remove local implementation switching to accelerated MI sfb.c.

diffstat:

 sys/arch/alpha/include/Makefile |    4 +-
 sys/arch/alpha/include/sfbreg.h |   96 ----
 sys/arch/alpha/tc/sfb.c         |  852 ----------------------------------------
 sys/arch/alpha/tc/sfbvar.h      |   80 ---
 4 files changed, 2 insertions(+), 1030 deletions(-)

diffs (truncated from 1058 to 300 lines):

diff -r c0d576afd8c7 -r 04bdd342a963 sys/arch/alpha/include/Makefile
--- a/sys/arch/alpha/include/Makefile   Sun Mar 26 04:31:39 2000 +0000
+++ b/sys/arch/alpha/include/Makefile   Sun Mar 26 05:52:17 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.9 2000/03/17 22:36:31 tron Exp $
+#      $NetBSD: Makefile,v 1.10 2000/03/26 05:52:19 nisimura Exp $
 
 KDIR=  /sys/arch/alpha/include
 INCSDIR= /usr/include/alpha
@@ -8,7 +8,7 @@
        disklabel.h ecoff_machdep.h elf_machdep.h endian.h endian_machdep.h \
        fbio.h float.h frame.h ieee.h ieeefp.h intr.h intrcnt.h kbio.h \
        kcore.h limits.h math.h pal.h param.h pcb.h pio.h pmap.h proc.h \
-       profile.h prom.h psl.h pte.h ptrace.h reg.h rpb.h setjmp.h sfbreg.h \
+       profile.h prom.h psl.h pte.h ptrace.h reg.h rpb.h setjmp.h \
        signal.h stdarg.h sysarch.h types.h varargs.h vmparam.h vuid_event.h \
        z8530var.h
 
diff -r c0d576afd8c7 -r 04bdd342a963 sys/arch/alpha/include/sfbreg.h
--- a/sys/arch/alpha/include/sfbreg.h   Sun Mar 26 04:31:39 2000 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/* $NetBSD: sfbreg.h,v 1.2 1997/04/06 08:47:42 cgd Exp $ */
-
-/*
- * Copyright (c) 1996 Carnegie-Mellon University.
- * All rights reserved.
- *
- * Author: Chris G. Demetriou
- *
- * 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@localhost
- *  School of Computer Science
- *  Carnegie Mellon University
- *  Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie the
- * rights to redistribute these changes.
- */
-
-/*
- * Smart ("CXTurbo") Frame Buffer definitions, from:
- * ``DEC 3000 300/400/500/600/700/800/900 AXP Models System Prgrammer's Manual''
- * (DEC order number EK-D3SYS-PM), section 6.
- *
- * All definitions are in "dense" TurboChannel space.
- */
-
-/*
- * Size of the SFB address space.
- */
-#define        SFB_SIZE                0x1000000
-
-/*
- * Offsets into slot space of each functional unit.
- */
-#define        SFB_ASIC_OFFSET         0x0100000       /* SFB ASIC Control Registers */
-#define        SFB_ASIC_SIZE           0x0020000
-#define        SFB_RAMDAC_OFFSET       0x01c0000       /* Bt495 RAMDAC Registers */
-#define        SFB_RAMDAC_SIZE         0x0040000
-#define        SFB_FB_OFFSET           0x0200000       /* Frame buffer */
-#define        SFB_FB_SIZE             0x0200000
-#define        SFB_OSBM_OFFSET         0x0600000       /* Off-screen buffer memory */
-#define        SFB_OSBM_SIZE           0x0200000
-
-/*
- * SFB ASIC registers (offsets from SFB_ASIC_OFFSET).
- */
-#define        SFB_ASIC_COPYBUF_0      0x0000  /* Copy buffer register 0 (R/W) */
-#define        SFB_ASIC_COPYBUF_1      0x0004  /* Copy buffer register 1 (R/W) */
-#define        SFB_ASIC_COPYBUF_2      0x0008  /* Copy buffer register 2 (R/W) */
-#define        SFB_ASIC_COPYBUF_3      0x000c  /* Copy buffer register 3 (R/W) */
-#define        SFB_ASIC_COPYBUF_4      0x0010  /* Copy buffer register 4 (R/W) */
-#define        SFB_ASIC_COPYBUF_5      0x0014  /* Copy buffer register 5 (R/W) */
-#define        SFB_ASIC_COPYBUF_6      0x0018  /* Copy buffer register 6 (R/W) */
-#define        SFB_ASIC_COPYBUF_7      0x001c  /* Copy buffer register 7 (R/W) */
-#define        SFB_ASIC_FG             0x0020  /* Foreground (R/W) */
-#define        SFB_ASIC_BG             0x0024  /* Background (R/W) */
-#define        SFB_ASIC_PLANEMASK      0x0028  /* PlaneMask (R/W) */
-#define        SFB_ASIC_PIXELMASK      0x002c  /* PixelMask (R/W) */
-#define        SFB_ASIC_MODE           0x0030  /* Mode (R/W) */
-#define        SFB_ASIC_ROP            0x0034  /* RasterOp (R/W) */
-#define        SFB_ASIC_PIXELSHIFT     0x0038  /* PixelShift (R/W) */
-#define        SFB_ASIC_ADDRESS        0x003c  /* Address (R/W) */
-#define        SFB_ASIC_BRES1          0x0040  /* Bresenham register 1 (R/W) */
-#define        SFB_ASIC_BRES2          0x0044  /* Bresenham register 2 (R/W) */
-#define        SFB_ASIC_BRES3          0x0048  /* Bresenham register 3 (R) (?) */
-#define        SFB_ASIC_BCONT          0x004c  /* Bcont (W) */
-#define        SFB_ASIC_DEEP           0x0050  /* Deep (R/W) */
-#define        SFB_ASIC_START          0x0054  /* Start (W) */
-#define        SFB_ASIC_CLEAR_INTR     0x0058  /* Clear Interrupt (W) */
-#define        SFB_ASIC_VIDEO_REFRESH  0x0060  /* Video refresh counter (R/W) */
-#define        SFB_ASIC_VIDEO_HSETUP   0x0064  /* Video horizontal setup (R/W) */
-#define        SFB_ASIC_VIDEO_VSETUP   0x0068  /* Video vertical setup (R/W) */
-#define        SFB_ASIC_VIDEO_BASE     0x006c  /* Video base address (R/W) */
-#define        SFB_ASIC_VIDEO_VALID    0x0070  /* Video valid (W) */
-#define        SFB_ASIC_ENABLE_INTR    0x0074  /* Enable/Disable Interrupts (W) */
-#define        SFB_ASIC_TCCLK          0x0078  /* TCCLK count (R/W) */
-#define        SFB_ASIC_VIDCLK         0x007c  /* VIDCLK count (R/W) */
-
-/*
- * Bt459 RAMDAC registers (offsets from SFB_RAMDAC_OFFSET)
- */
-#define        SFB_RAMDAC_ADDRLOW      0x0000  /* Address register low byte */
-#define        SFB_RAMDAC_ADDRHIGH     0x0004  /* Address register high byte */
-#define        SFB_RAMDAC_REGDATA      0x0008  /* Register addressed by addr reg */
-#define        SFB_RAMDAC_CMAPDATA     0x000c  /* Colormap loc addressed by addr reg */
diff -r c0d576afd8c7 -r 04bdd342a963 sys/arch/alpha/tc/sfb.c
--- a/sys/arch/alpha/tc/sfb.c   Sun Mar 26 04:31:39 2000 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,852 +0,0 @@
-/* $NetBSD: sfb.c,v 1.23 1999/12/06 19:25:56 drochner Exp $ */
-
-/*
- * Copyright (c) 1995, 1996 Carnegie-Mellon University.
- * All rights reserved.
- *
- * Author: Chris G. Demetriou
- * 
- * 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@localhost
- *  School of Computer Science
- *  Carnegie Mellon University
- *  Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie the
- * rights to redistribute these changes.
- */
-
-#include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
-
-__KERNEL_RCSID(0, "$NetBSD: sfb.c,v 1.23 1999/12/06 19:25:56 drochner Exp $");
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/device.h>
-#include <sys/malloc.h>
-#include <sys/buf.h>
-#include <sys/ioctl.h>
-
-#include <machine/bus.h>
-#include <machine/intr.h>
-#include <machine/conf.h>
-
-#include <dev/tc/tcvar.h>
-#include <machine/sfbreg.h>
-#include <alpha/tc/sfbvar.h>
-#include <alpha/tc/bt459reg.h>
-
-#include <dev/rcons/raster.h>
-#include <dev/wscons/wscons_raster.h>
-#include <dev/wscons/wsdisplayvar.h>
-#include <machine/fbio.h>
-
-#include <machine/autoconf.h>
-#include <machine/pte.h>
-
-int    sfbmatch __P((struct device *, struct cfdata *, void *));
-void   sfbattach __P((struct device *, struct device *, void *));
-
-struct cfattach sfb_ca = {
-       sizeof(struct sfb_softc), sfbmatch, sfbattach,
-};
-
-void   sfb_getdevconfig __P((tc_addr_t dense_addr, struct sfb_devconfig *dc));
-struct sfb_devconfig sfb_console_dc;
-tc_addr_t sfb_consaddr;
-
-struct wsdisplay_emulops sfb_emulfuncs = {
-       rcons_cursor,                   /* could use hardware cursor; punt */
-       rcons_mapchar,
-       rcons_putchar,
-       rcons_copycols,
-       rcons_erasecols,
-       rcons_copyrows,
-       rcons_eraserows,
-       rcons_alloc_attr
-};
-
-struct wsscreen_descr sfb_stdscreen = {
-       "std",
-       0, 0,   /* will be filled in -- XXX shouldn't, it's global */
-       &sfb_emulfuncs,
-       0, 0
-};
-
-const struct wsscreen_descr *_sfb_scrlist[] = {
-       &sfb_stdscreen,
-       /* XXX other formats, graphics screen? */
-};
-
-struct wsscreen_list sfb_screenlist = {
-       sizeof(_sfb_scrlist) / sizeof(struct wsscreen_descr *), _sfb_scrlist
-};
-
-int    sfbioctl __P((void *, u_long, caddr_t, int, struct proc *));
-int    sfbmmap __P((void *, off_t, int));
-
-static int     sfb_alloc_screen __P((void *, const struct wsscreen_descr *,
-                                     void **, int *, int *, long *));
-static void    sfb_free_screen __P((void *, void *));
-static int     sfb_show_screen __P((void *, void *, int,
-                                    void (*) (void *, int, int), void *));
-
-void   sfb_blank __P((struct sfb_devconfig *));
-void   sfb_unblank __P((struct sfb_devconfig *));
-
-void   sfb_put_cmap __P((struct sfb_devconfig *, struct fbcmap *));
-void   sfb_get_cmap __P((struct sfb_devconfig *, struct fbcmap *));
-int     sfb_set_curpos __P((struct sfb_devconfig *, struct fbcurpos *));
-int     sfb_get_curpos __P((struct sfb_devconfig *, struct fbcurpos *));
-int     sfb_get_curmax __P((struct sfb_devconfig *, struct fbcurpos *));
-int     sfb_set_cursor __P((struct sfb_devconfig *, struct fbcursor *));
-int     sfb_get_cursor __P((struct sfb_devconfig *, struct fbcursor *));
-
-struct wsdisplay_accessops sfb_accessops = {
-       sfbioctl,
-       sfbmmap,
-       sfb_alloc_screen,
-       sfb_free_screen,
-       sfb_show_screen,
-       0 /* load_font */
-};
-
-int
-sfbmatch(parent, match, aux)
-       struct device *parent;
-       struct cfdata *match;
-       void *aux;
-{
-       struct tc_attach_args *ta = aux;
-
-       if (strncmp("PMAGB-BA", ta->ta_modname, TC_ROM_LLEN) != 0)
-               return (0);
-
-       return (10);
-}
-
-void
-sfb_getdevconfig(dense_addr, dc)
-       tc_addr_t dense_addr;
-       struct sfb_devconfig *dc;
-{
-       struct raster *rap;
-       struct rcons *rcp;
-       char *regp, *ramdacregp;
-       int i;
-
-       dc->dc_vaddr = dense_addr;
-       dc->dc_paddr = ALPHA_K0SEG_TO_PHYS(dc->dc_vaddr);       /* XXX */
-       dc->dc_size = SFB_SIZE;
-
-       regp = (char *)dc->dc_vaddr + SFB_ASIC_OFFSET;
-       ramdacregp = (char *)dc->dc_vaddr + SFB_RAMDAC_OFFSET;
-
-       dc->dc_wid =
-           (*(volatile u_int32_t *)(regp + SFB_ASIC_VIDEO_HSETUP) & 0x1ff) * 4;
-       dc->dc_ht =
-           (*(volatile u_int32_t *)(regp + SFB_ASIC_VIDEO_VSETUP) & 0x7ff);
-
-       switch (*(volatile u_int32_t *)(regp + SFB_ASIC_DEEP)) {
-       case 0:
-       case 1:                                 /* XXX by the book; wrong? */
-               dc->dc_depth = 8;               /* 8 plane */
-               break;
-       case 2:
-               dc->dc_depth = 16;              /* 16 plane */
-               break;
-       case 4:
-               dc->dc_depth = 32;              /* 32 plane */
-               break;
-       default:
-               dc->dc_depth = 8;               /* XXX can't happen? */
-               break;
-       }
-
-       dc->dc_rowbytes = dc->dc_wid * (dc->dc_depth / 8);



Home | Main Index | Thread Index | Old Index