First part of amigappc support patches by Frank Wille.

This commit is contained in:
is 2007-08-20 19:23:44 +00:00
parent 4418b58c3f
commit 1ee8b50f43
16 changed files with 131 additions and 86 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: afsc.c,v 1.39 2007/03/05 18:25:29 he Exp $ */
/* $NetBSD: afsc.c,v 1.40 2007/08/20 19:23:44 is Exp $ */
/*
* Copyright (c) 1982, 1990 The Regents of the University of California.
@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: afsc.c,v 1.39 2007/03/05 18:25:29 he Exp $");
__KERNEL_RCSID(0, "$NetBSD: afsc.c,v 1.40 2007/08/20 19:23:44 is Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -79,6 +79,10 @@ __KERNEL_RCSID(0, "$NetBSD: afsc.c,v 1.39 2007/03/05 18:25:29 he Exp $");
#include <amiga/dev/siopvar.h>
#include <amiga/dev/zbusvar.h>
#ifdef __powerpc__
#define badaddr(a) badaddr_read(a, 2, NULL)
#endif
void afscattach(struct device *, struct device *, void *);
int afscmatch(struct device *, struct cfdata *, void *);
int afsc_dmaintr(void *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: bzivsc.c,v 1.23 2007/03/11 17:34:37 he Exp $ */
/* $NetBSD: bzivsc.c,v 1.24 2007/08/20 19:23:45 is Exp $ */
/*
* Copyright (c) 1997 Michael L. Hitch
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: bzivsc.c,v 1.23 2007/03/11 17:34:37 he Exp $");
__KERNEL_RCSID(0, "$NetBSD: bzivsc.c,v 1.24 2007/08/20 19:23:45 is Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -67,6 +67,10 @@ __KERNEL_RCSID(0, "$NetBSD: bzivsc.c,v 1.23 2007/03/11 17:34:37 he Exp $");
#include <amiga/dev/bzivscvar.h>
#include <amiga/dev/zbusvar.h>
#ifdef __powerpc__
#define badaddr(a) badaddr_read(a, 2, NULL)
#endif
void bzivscattach(struct device *, struct device *, void *);
int bzivscmatch(struct device *, struct cfdata *, void *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: bzsc.c,v 1.41 2007/03/11 17:34:38 he Exp $ */
/* $NetBSD: bzsc.c,v 1.42 2007/08/20 19:23:45 is Exp $ */
/*
* Copyright (c) 1997 Michael L. Hitch
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: bzsc.c,v 1.41 2007/03/11 17:34:38 he Exp $");
__KERNEL_RCSID(0, "$NetBSD: bzsc.c,v 1.42 2007/08/20 19:23:45 is Exp $");
/*
* Initial amiga Blizzard 1230-II driver by Daniel Widenfalk. Conversion to
@ -73,6 +73,10 @@ __KERNEL_RCSID(0, "$NetBSD: bzsc.c,v 1.41 2007/03/11 17:34:38 he Exp $");
#include <amiga/dev/bzscvar.h>
#include <amiga/dev/zbusvar.h>
#ifdef __powerpc__
#define badaddr(a) badaddr_read(a, 2, NULL)
#endif
void bzscattach(struct device *, struct device *, void *);
int bzscmatch(struct device *, struct cfdata *, void *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: bztzsc.c,v 1.28 2007/03/11 17:34:38 he Exp $ */
/* $NetBSD: bztzsc.c,v 1.29 2007/08/20 19:23:45 is Exp $ */
/*
* Copyright (c) 1997 Michael L. Hitch
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: bztzsc.c,v 1.28 2007/03/11 17:34:38 he Exp $");
__KERNEL_RCSID(0, "$NetBSD: bztzsc.c,v 1.29 2007/08/20 19:23:45 is Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -73,6 +73,10 @@ __KERNEL_RCSID(0, "$NetBSD: bztzsc.c,v 1.28 2007/03/11 17:34:38 he Exp $");
#include <amiga/dev/bztzscvar.h>
#include <amiga/dev/zbusvar.h>
#ifdef __powerpc__
#define badaddr(a) badaddr_read(a, 2, NULL)
#endif
void bztzscattach(struct device *, struct device *, void *);
int bztzscmatch(struct device *, struct cfdata *, void *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: cbiisc.c,v 1.24 2007/03/11 17:34:38 he Exp $ */
/* $NetBSD: cbiisc.c,v 1.25 2007/08/20 19:23:45 is Exp $ */
/*
* Copyright (c) 1997 Michael L. Hitch
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cbiisc.c,v 1.24 2007/03/11 17:34:38 he Exp $");
__KERNEL_RCSID(0, "$NetBSD: cbiisc.c,v 1.25 2007/08/20 19:23:45 is Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -67,6 +67,10 @@ __KERNEL_RCSID(0, "$NetBSD: cbiisc.c,v 1.24 2007/03/11 17:34:38 he Exp $");
#include <amiga/dev/cbiiscvar.h>
#include <amiga/dev/zbusvar.h>
#ifdef __powerpc__
#define badaddr(a) badaddr_read(a, 2, NULL)
#endif
void cbiiscattach(struct device *, struct device *, void *);
int cbiiscmatch(struct device *, struct cfdata *, void *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: cbsc.c,v 1.25 2007/03/11 17:34:38 he Exp $ */
/* $NetBSD: cbsc.c,v 1.26 2007/08/20 19:23:46 is Exp $ */
/*
* Copyright (c) 1997 Michael L. Hitch
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cbsc.c,v 1.25 2007/03/11 17:34:38 he Exp $");
__KERNEL_RCSID(0, "$NetBSD: cbsc.c,v 1.26 2007/08/20 19:23:46 is Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -67,6 +67,10 @@ __KERNEL_RCSID(0, "$NetBSD: cbsc.c,v 1.25 2007/03/11 17:34:38 he Exp $");
#include <amiga/dev/cbscvar.h>
#include <amiga/dev/zbusvar.h>
#ifdef __powerpc__
#define badaddr(a) badaddr_read(a, 2, NULL)
#endif
void cbscattach(struct device *, struct device *, void *);
int cbscmatch(struct device *, struct cfdata *, void *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: fd.c,v 1.72 2007/07/29 13:31:07 ad Exp $ */
/* $NetBSD: fd.c,v 1.73 2007/08/20 19:23:46 is Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.72 2007/07/29 13:31:07 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.73 2007/08/20 19:23:46 is Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -348,7 +348,7 @@ fdcattach(struct device *pdp, struct device *dp, void *auxp)
{
struct fdcargs args;
printf(": dmabuf pa 0x%x", kvtop(fdc_dmap));
printf(": dmabuf pa 0x%x", (unsigned)kvtop(fdc_dmap));
printf(": dmabuf ka %p\n", fdc_dmap);
args.unit = 0;
args.type = fdcgetfdtype(args.unit);

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_cl.c,v 1.39 2007/03/06 00:46:00 he Exp $ */
/* $NetBSD: grf_cl.c,v 1.40 2007/08/20 19:23:46 is Exp $ */
/*
* Copyright (c) 1997 Klaus Burkert
@ -36,7 +36,7 @@
#include "opt_amigacons.h"
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: grf_cl.c,v 1.39 2007/03/06 00:46:00 he Exp $");
__KERNEL_RCSID(0, "$NetBSD: grf_cl.c,v 1.40 2007/08/20 19:23:46 is Exp $");
#include "grfcl.h"
#if NGRFCL > 0
@ -108,7 +108,7 @@ static int cl_getspritemax(struct grf_softc *, struct grf_position *);
int cl_blank(struct grf_softc *, int *);
int cl_setmonitor(struct grf_softc *, struct grfvideo_mode *);
void cl_writesprpos(volatile char *, short, short);
void writeshifted(volatile char *, char, char);
void writeshifted(volatile char *, signed char, signed char);
static void RegWakeup(volatile void *);
static void RegOnpass(volatile void *);
@ -812,8 +812,8 @@ cl_writesprpos(ba, x, y)
void
writeshifted(to, shiftx, shifty)
volatile char *to;
char shiftx;
char shifty;
signed char shiftx;
signed char shifty;
{
int y;
unsigned long long *tptr, *iptr, *mptr, line;

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_cv.c,v 1.44 2007/03/05 19:48:19 he Exp $ */
/* $NetBSD: grf_cv.c,v 1.45 2007/08/20 19:23:46 is Exp $ */
/*
* Copyright (c) 1995 Michael Teske
@ -33,7 +33,7 @@
#include "opt_amigacons.h"
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: grf_cv.c,v 1.44 2007/03/05 19:48:19 he Exp $");
__KERNEL_RCSID(0, "$NetBSD: grf_cv.c,v 1.45 2007/08/20 19:23:46 is Exp $");
#include "grfcv.h"
#if NGRFCV > 0
@ -68,6 +68,16 @@ __KERNEL_RCSID(0, "$NetBSD: grf_cv.c,v 1.44 2007/03/05 19:48:19 he Exp $");
#include <amiga/dev/grf_cvreg.h>
#include <amiga/dev/zbusvar.h>
/*
* finish all bus operations, flush pipelines
* XXX is this really needed?
*/
#if defined(__m68k__)
#define cpu_sync() __asm volatile ("nop")
#elif defined(__powerpc__)
#define cpu_sync() __asm volatile ("sync; isync")
#endif
int grfcvmatch(struct device *, struct cfdata *, void *);
void grfcvattach(struct device *, struct device *, void *);
int grfcvprint(void *, const char *);
@ -304,7 +314,7 @@ cvintr(void *arg)
/* Save old CR index */
cridx = vgar (ba, CRT_ADDRESS);
#if 0
#if !defined(__m68k__)
test = RCrt(ba, CRT_ID_END_VER_RETR);
/* Clear int (bit 4) */
test &= ~0x10;
@ -325,7 +335,7 @@ cvintr(void *arg)
curs_update_flag = 0;
}
/* Reenable int */
#if 0
#if !defined(__m68k__)
test |= 0x10;
WCrt(ba, CRT_ID_END_VER_RETR, test);
#else
@ -336,7 +346,7 @@ cvintr(void *arg)
/* Restore the old CR index */
vgaw(ba, CRT_ADDRESS, cridx);
__asm volatile("nop");
cpu_sync();
#endif /* !CV_NO_HARDWARE_CURSOR */
return (1);
}
@ -358,7 +368,7 @@ cv_has_4mb(volatile void *fb)
testfbw = (volatile unsigned long *)fb;
testfbr = (volatile unsigned long *)((volatile char*)fb + 0x02000000);
*testfbw = 0x87654321;
__asm volatile("nop");
cpu_sync();
if (*testfbr != 0x87654321)
return (0);
@ -366,15 +376,15 @@ cv_has_4mb(volatile void *fb)
testfbw = (volatile unsigned long *)((volatile char*)fb + 0x00200000);
testfbr = (volatile unsigned long *)((volatile char*)fb + 0x02200000);
*testfbw = 0x87654321;
__asm volatile("nop");
cpu_sync();
if (*testfbr != 0x87654321)
return (0);
*testfbw = 0xAAAAAAAA;
__asm volatile("nop");
cpu_sync();
if (*testfbr != 0xAAAAAAAA)
return (0);
*testfbw = 0x55555555;
__asm volatile("nop");
cpu_sync();
if (*testfbr != 0x55555555)
return (0);
return (1);
@ -1848,9 +1858,9 @@ cv_setup_hwc(struct grf_softc *gp)
return;
/* reset colour stack */
#if 0
#if !defined(__m68k__)
test = RCrt(ba, CRT_ID_HWGC_MODE);
__asm volatile("nop");
cpu_sync();
#else
/* do it in assembler, the above does't seem to work */
__asm volatile ("moveb #0x45, %1@(0x3d4); \
@ -1863,9 +1873,9 @@ cv_setup_hwc(struct grf_softc *gp)
*hwc = 0;
*hwc = 0;
#if 0
#if !defined(__m68k__)
test = RCrt(ba, CRT_ID_HWGC_MODE);
__asm volatile("nop");
cpu_sync();
#else
/* do it in assembler, the above does't seem to work */
__asm volatile ("moveb #0x45, %1@(0x3d4); \
@ -2107,7 +2117,7 @@ cv_setspriteinfo(struct grf_softc *gp, struct grf_spriteinfo *info)
/* reset colour stack */
test = RCrt(ba, CRT_ID_HWGC_MODE);
__asm volatile("nop");
cpu_sync();
switch (depth) {
case 8:
case 15:
@ -2126,7 +2136,7 @@ cv_setspriteinfo(struct grf_softc *gp, struct grf_spriteinfo *info)
}
test = RCrt(ba, CRT_ID_HWGC_MODE);
__asm volatile("nop");
cpu_sync();
switch (depth) {
case 8:
WCrt (ba, CRT_ID_HWGC_BG_STACK, 1);

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_cv3d.c,v 1.21 2007/03/05 19:48:19 he Exp $ */
/* $NetBSD: grf_cv3d.c,v 1.22 2007/08/20 19:23:46 is Exp $ */
/*
* Copyright (c) 1995 Michael Teske
@ -33,7 +33,7 @@
#include "opt_amigacons.h"
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: grf_cv3d.c,v 1.21 2007/03/05 19:48:19 he Exp $");
__KERNEL_RCSID(0, "$NetBSD: grf_cv3d.c,v 1.22 2007/08/20 19:23:46 is Exp $");
#include "grfcv3d.h"
#if NGRFCV3D > 0
@ -90,6 +90,15 @@ Note: IO Regbase is needed fo wakeup of the board otherwise use
#include <amiga/dev/grf_cv3dreg.h>
#include <amiga/dev/zbusvar.h>
/*
* finish all bus operations, flush pipelines
*/
#if defined(__m68k__)
#define cpu_sync() __asm volatile ("nop")
#elif defined(__powerpc__)
#define cpu_sync() __asm volatile ("sync; isync")
#endif
int grfcv3dmatch(struct device *, struct cfdata *, void *);
void grfcv3dattach(struct device *, struct device *, void *);
int grfcv3dprint(void *, const char *);
@ -1714,9 +1723,9 @@ cv3d_setup_hwc(struct grf_softc *gp)
return;
/* reset colour stack */
#if 0
#if !defined(__m68k__)
test = RCrt(ba, CRT_ID_HWGC_MODE);
__asm volatile("nop");
cpu_sync();
#else
/* do it in assembler, the above does't seem to work */
__asm volatile ("moveb #0x45, %1@(0x3d4); \
@ -1729,9 +1738,9 @@ cv3d_setup_hwc(struct grf_softc *gp)
*hwc = 0;
*hwc = 0;
#if 0
#if !defined(__m68k__)
test = RCrt(ba, CRT_ID_HWGC_MODE);
__asm volatile("nop");
cpu_sync();
#else
/* do it in assembler, the above does't seem to work */
__asm volatile ("moveb #0x45, %1@(0x3d4); \
@ -1962,7 +1971,7 @@ cv3d_setspriteinfo(struct grf_softc *gp, struct grf_spriteinfo *info)
/* reset colour stack */
test = RCrt(ba, CRT_ID_HWGC_MODE);
__asm volatile("nop");
cpu_sync();
switch (depth) {
case 8:
case 15:
@ -1981,7 +1990,7 @@ cv3d_setspriteinfo(struct grf_softc *gp, struct grf_spriteinfo *info)
}
test = RCrt(ba, CRT_ID_HWGC_MODE);
__asm volatile("nop");
cpu_sync();
switch (depth) {
case 8:
WCrt (ba, CRT_ID_HWGC_BG_STACK, 1);

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_et.c,v 1.24 2007/03/05 19:48:19 he Exp $ */
/* $NetBSD: grf_et.c,v 1.25 2007/08/20 19:23:50 is Exp $ */
/*
* Copyright (c) 1997 Klaus Burkert
@ -37,7 +37,7 @@
#include "opt_amigacons.h"
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: grf_et.c,v 1.24 2007/03/05 19:48:19 he Exp $");
__KERNEL_RCSID(0, "$NetBSD: grf_et.c,v 1.25 2007/08/20 19:23:50 is Exp $");
#include "grfet.h"
#if NGRFET > 0
@ -1069,7 +1069,7 @@ et_load_mon(struct grf_softc *gp, struct grfettext_mode *md)
/* provide all needed information in grf device-independent locations */
gp->g_data = (void *) gv;
gi = &gp->g_display;
gi->gd_regaddr = (void *) ztwopa(ba);
gi->gd_regaddr = ztwopa(__UNVOLATILE(ba));
gi->gd_regsize = 64 * 1024;
gi->gd_fbaddr = (void *) kvtop(__UNVOLATILE(gp->g_fbkva));
gi->gd_fbsize = et_fbsize;

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_rh.c,v 1.48 2007/03/05 19:48:19 he Exp $ */
/* $NetBSD: grf_rh.c,v 1.49 2007/08/20 19:23:50 is Exp $ */
/*
* Copyright (c) 1994 Markus Wild
@ -34,7 +34,7 @@
#include "opt_retina.h"
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: grf_rh.c,v 1.48 2007/03/05 19:48:19 he Exp $");
__KERNEL_RCSID(0, "$NetBSD: grf_rh.c,v 1.49 2007/08/20 19:23:50 is Exp $");
#include "grfrh.h"
#if NGRFRH > 0
@ -121,16 +121,18 @@ extern unsigned char kernel_font_8x11[];
/* Convert big-endian long into little-endian long. */
#ifdef __m68k__
#define M2I(val) \
__asm volatile (" rorw #8,%0 ; \
swap %0 ; \
rorw #8,%0 ; " : "=d" (val) : "0" (val));
#define M2INS(val) \
__asm volatile (" rorw #8,%0 ; \
swap %0 ; \
rorw #8,%0 ; \
swap %0 ; " : "=d" (val) : "0" (val));
#else
#define M2I(val) \
val = ((val & 0xff000000) >> 24) | \
((val & 0x00ff0000) >> 8 ) | \
((val & 0x0000ff00) << 8 ) | \
((val & 0x000000ff) << 24)
#endif
#define ACM_OFFSET (0x00b00000)
#define LM_OFFSET (0x00c00000)

View File

@ -1,4 +1,4 @@
/* $NetBSD: sbic.c,v 1.60 2007/07/09 20:52:02 ad Exp $ */
/* $NetBSD: sbic.c,v 1.61 2007/08/20 19:23:50 is Exp $ */
/*
* Copyright (c) 1990 The Regents of the University of California.
@ -78,7 +78,7 @@
#include "opt_ddb.h"
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sbic.c,v 1.60 2007/07/09 20:52:02 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: sbic.c,v 1.61 2007/08/20 19:23:50 is Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -680,7 +680,7 @@ sbicdmaok(struct sbic_softc *dev, struct scsipi_xfer *xs)
if (isztwomem(dev->sc_tinfo[xs->xs_periph->periph_target].bounce))
printf("alloc ZII target %d bounce pa 0x%x\n",
xs->xs_periph->periph_target,
kvtop(dev->sc_tinfo[xs->xs_periph->periph_target].bounce));
(unsigned)kvtop(dev->sc_tinfo[xs->xs_periph->periph_target].bounce));
else if (dev->sc_tinfo[xs->xs_periph->periph_target].bounce)
printf("alloc CHIP target %d bounce pa %p\n",
xs->xs_periph->periph_target,
@ -1650,7 +1650,7 @@ sbicgo(struct sbic_softc *dev, struct scsipi_xfer *xs)
count = acb->sc_kv.dc_count;
if (count && (char *)kvtop(addr) != acb->sc_pa.dc_addr) { /* XXXX check */
printf("sbic: DMA buffer mapping changed %p->%x\n",
acb->sc_pa.dc_addr, kvtop(addr));
acb->sc_pa.dc_addr, (unsigned)kvtop(addr));
#ifdef DDB
Debugger();
#endif
@ -1679,7 +1679,7 @@ sbicgo(struct sbic_softc *dev, struct scsipi_xfer *xs)
if (isztwomem(dev->sc_tinfo[xs->xs_periph->periph_target].bounce))
printf("alloc ZII target %d bounce pa 0x%x\n",
xs->xs_periph->periph_target,
kvtop(dev->sc_tinfo[xs->xs_periph->periph_target].bounce));
(unsigned)kvtop(dev->sc_tinfo[xs->xs_periph->periph_target].bounce));
else if (dev->sc_tinfo[xs->xs_periph->periph_target].bounce)
printf("alloc CHIP target %d bounce pa %p\n",
xs->xs_periph->periph_target,
@ -1687,14 +1687,14 @@ sbicgo(struct sbic_softc *dev, struct scsipi_xfer *xs)
printf("Allocating %d bounce at %x\n",
dev->target,
kvtop(dev->sc_tinfo[dev->target].bounce));
(unsigned)kvtop(dev->sc_tinfo[dev->target].bounce));
}
} else { /* write: copy to DMA buffer */
#ifdef DEBUG
if(data_pointer_debug)
printf("sbicgo: copying %x bytes to target %d bounce %x\n",
count, dev->target,
kvtop(dev->sc_tinfo[dev->target].bounce));
(unsigned)kvtop(dev->sc_tinfo[dev->target].bounce));
#endif
bcopy (addr, dev->sc_tinfo[dev->target].bounce, count);
}
@ -2243,13 +2243,13 @@ sbicnextstate(struct sbic_softc *dev, u_char csr, u_char asr)
if ((u_char *)kvtop(acb->sc_dmausrbuf) != acb->sc_usrbufpa)
printf("%s: WARNING - buffer mapping changed %p->%x\n",
dev->sc_dev.dv_xname, acb->sc_usrbufpa,
kvtop(acb->sc_dmausrbuf));
(unsigned)kvtop(acb->sc_dmausrbuf));
#ifdef DEBUG
if(data_pointer_debug)
printf("sbicgo:copying %lx bytes from target %d bounce %x\n",
acb->sc_dmausrlen,
dev->target,
kvtop(dev->sc_tinfo[dev->target].bounce));
(unsigned)kvtop(dev->sc_tinfo[dev->target].bounce));
#endif
bcopy(dev->sc_tinfo[dev->target].bounce,
acb->sc_dmausrbuf,

View File

@ -1,4 +1,4 @@
/* $NetBSD: siop.c,v 1.56 2007/05/13 19:24:20 mhitch Exp $ */
/* $NetBSD: siop.c,v 1.57 2007/08/20 19:23:51 is Exp $ */
/*
* Copyright (c) 1990 The Regents of the University of California.
@ -70,7 +70,7 @@
#include "opt_ddb.h"
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: siop.c,v 1.56 2007/05/13 19:24:20 mhitch Exp $");
__KERNEL_RCSID(0, "$NetBSD: siop.c,v 1.57 2007/08/20 19:23:51 is Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -914,7 +914,7 @@ siop_checkintr(struct siop_softc *sc, u_char istat, u_char dstat,
#ifdef DEBUG
if (rp->siop_dsa != kvtop((void *)&acb->ds)) {
printf ("siop: invalid dsa: %lx %x\n", rp->siop_dsa,
kvtop((void *)&acb->ds));
(unsigned)kvtop((void *)&acb->ds));
panic("*** siop DSA invalid ***");
}
#endif
@ -1389,9 +1389,10 @@ bad_phase:
* XXXX need to clean this up to print out the info, reset, and continue
*/
printf ("siopchkintr: target %x ds %p\n", target, &acb->ds);
printf ("scripts %lx ds %x rp %x dsp %lx dcmd %lx\n", sc->sc_scriptspa,
kvtop((void *)&acb->ds), kvtop((void *)__UNVOLATILE(rp)),
rp->siop_dsp, *((volatile long *)&rp->siop_dcmd));
printf ("scripts %lx ds %x rp %x dsp %lx dcmd %lx\n",
sc->sc_scriptspa, (unsigned)kvtop((void *)&acb->ds),
(unsigned)kvtop((void *)__UNVOLATILE(rp)), rp->siop_dsp,
*((volatile long *)&rp->siop_dcmd));
printf ("siopchkintr: istat %x dstat %x sstat0 %x dsps %lx dsa %lx sbcl %x sts %x msg %x %x sfbr %x\n",
istat, dstat, sstat0, rp->siop_dsps, rp->siop_dsa,
rp->siop_sbcl, acb->stat[0], acb->msg[0], acb->msg[1], rp->siop_sfbr);

View File

@ -1,4 +1,4 @@
/* $NetBSD: siop2.c,v 1.28 2007/05/13 19:24:20 mhitch Exp $ */
/* $NetBSD: siop2.c,v 1.29 2007/08/20 19:23:51 is Exp $ */
/*
* Copyright (c) 1990 The Regents of the University of California.
@ -70,7 +70,7 @@
#include "opt_ddb.h"
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: siop2.c,v 1.28 2007/05/13 19:24:20 mhitch Exp $");
__KERNEL_RCSID(0, "$NetBSD: siop2.c,v 1.29 2007/08/20 19:23:51 is Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -977,7 +977,7 @@ siopng_checkintr(struct siop_softc *sc, u_char istat, u_char dstat,
#ifdef DEBUG
if (rp->siop_dsa != kvtop((void *)&acb->ds)) {
printf ("siopng: invalid dsa: %lx %x\n", rp->siop_dsa,
kvtop((void *)&acb->ds));
(unsigned)kvtop((void *)&acb->ds));
panic("*** siopng DSA invalid ***");
}
#endif
@ -1511,9 +1511,10 @@ bad_phase:
* XXXX need to clean this up to print out the info, reset, and continue
*/
printf ("siopngchkintr: target %x ds %p\n", target, &acb->ds);
printf ("scripts %lx ds %x rp %x dsp %lx dcmd %lx\n", sc->sc_scriptspa,
kvtop((void *)&acb->ds), kvtop((void *)__UNVOLATILE(rp)),
rp->siop_dsp, *((long *)__UNVOLATILE(&rp->siop_dcmd)));
printf ("scripts %lx ds %x rp %x dsp %lx dcmd %lx\n",
sc->sc_scriptspa, (unsigned)kvtop((void *)&acb->ds),
(unsigned)kvtop((void *)__UNVOLATILE(rp)), rp->siop_dsp,
*((long *)__UNVOLATILE(&rp->siop_dcmd)));
printf ("siopngchkintr: istat %x dstat %x sist %x dsps %lx dsa %lx sbcl %x sts %x msg %x %x sfbr %x\n",
istat, dstat, sist, rp->siop_dsps, rp->siop_dsa,
rp->siop_sbcl, acb->stat[0], acb->msg[0], acb->msg[1], rp->siop_sfbr);

View File

@ -1,4 +1,4 @@
/* $NetBSD: zbus.c,v 1.59 2007/08/20 15:18:03 is Exp $ */
/* $NetBSD: zbus.c,v 1.60 2007/08/20 19:23:52 is Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: zbus.c,v 1.59 2007/08/20 15:18:03 is Exp $");
__KERNEL_RCSID(0, "$NetBSD: zbus.c,v 1.60 2007/08/20 19:23:52 is Exp $");
#include <sys/param.h>
#include <sys/device.h>
@ -359,6 +359,7 @@ zbusprint(void *auxp, const char *pnp)
void *
zbusmap(void *pa, u_int size)
{
#if defined(__m68k__)
static vaddr_t nextkva = 0;
vaddr_t kva;
@ -373,15 +374,12 @@ zbusmap(void *pa, u_int size)
nextkva += size;
if (nextkva > ZBUSADDR + ZBUSAVAIL)
panic("allocating too much Zorro I/O address space");
#if defined(__powerpc__)
/*
* XXX we use direct constant mapping, so no need for:
* physaccess((void *)kva, (void *)pa, size, PTE_RW|PTE_I);
*/
#elif defined(__m68k__)
physaccess((void *)kva, (void *)pa, size, PG_RW|PG_CI);
#else
ERROR no support for this target CPU yet.
#endif
return((void *)kva);
#else
/*
* XXX we use direct constant mapping
*/
return(pa);
#endif
}