backout previous kprintf change

This commit is contained in:
christos 1996-10-13 03:05:43 +00:00
parent 986daa1436
commit ca36ac9ef4
130 changed files with 2805 additions and 2805 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: Locore.c,v 1.13 1996/10/10 23:55:05 christos Exp $ */
/* $NetBSD: Locore.c,v 1.14 1996/10/13 03:06:28 christos Exp $ */
/*
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@ -136,7 +136,7 @@ lowinit()
* Routines called from interrupt vectors.
*/
panic("Machine check");
kprintf("Write timeout");
printf("Write timeout");
hilint();
if (dmaintr())
return;

View File

@ -1,4 +1,4 @@
/* $NetBSD: amiga_init.c,v 1.51 1996/10/10 23:55:08 christos Exp $ */
/* $NetBSD: amiga_init.c,v 1.52 1996/10/13 03:06:29 christos Exp $ */
/*
* Copyright (c) 1994 Michael L. Hitch
@ -1083,7 +1083,7 @@ kernel_reload_write(uio)
if ((error = uiomove((caddr_t)&kernel_exec, sizeof(kernel_exec),
uio)) != 0)
return(error);
kprintf("loading kernel %ld+%ld+%ld+%ld\n", kernel_exec.a_text,
printf("loading kernel %ld+%ld+%ld+%ld\n", kernel_exec.a_text,
kernel_exec.a_data, kernel_exec.a_bss,
esym == NULL ? 0 : kernel_exec.a_syms);
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.42 1996/10/11 19:49:49 mhitch Exp $ */
/* $NetBSD: autoconf.c,v 1.43 1996/10/13 03:06:31 christos Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -69,7 +69,7 @@ configure()
panic("no mainbus found");
#ifdef DEBUG_KERNEL_START
kprintf("survived autoconf, going to enable interrupts\n");
printf("survived autoconf, going to enable interrupts\n");
#endif
#ifdef DRACO
@ -85,32 +85,32 @@ configure()
custom.intena = INTF_SETCLR | INTF_SOFTINT;
}
#ifdef DEBUG_KERNEL_START
kprintf("survived interrupt enable\n");
printf("survived interrupt enable\n");
#endif
#ifdef GENERIC
if ((boothowto & RB_ASKNAME) == 0) {
setroot();
#ifdef DEBUG_KERNEL_START
kprintf("survived setroot()\n");
printf("survived setroot()\n");
#endif
}
setconf();
#ifdef DEBUG_KERNEL_START
kprintf("survived setconf()\n");
printf("survived setconf()\n");
#endif
#else
setroot();
#ifdef DEBUG_KERNEL_START
kprintf("survived setroot()\n");
printf("survived setroot()\n");
#endif
#endif
#ifdef DEBUG_KERNEL_START
kprintf("survived root device search\n");
printf("survived root device search\n");
#endif
swapconf();
#ifdef DEBUG_KERNEL_START
kprintf("survived swap device search\n");
printf("survived swap device search\n");
#endif
cold = 0;
}
@ -235,7 +235,7 @@ mbattach(pdp, dp, auxp)
struct device *pdp, *dp;
void *auxp;
{
kprintf("\n");
printf("\n");
config_found(dp, "clock", simple_devprint);
#ifdef DRACO
if (is_draco()) {
@ -273,7 +273,7 @@ mbprint(auxp, pnp)
const char *pnp;
{
if (pnp)
kprintf("%s at %s", (char *)auxp, pnp);
printf("%s at %s", (char *)auxp, pnp);
return(UNCONF);
}
@ -342,7 +342,7 @@ setroot()
*/
if (rootdev == orootdev)
return;
kprintf("changing root device to %c%c%d%c\n",
printf("changing root device to %c%c%d%c\n",
devname[majdev][0], devname[majdev][1],
unit, part + 'a');
#ifdef DOSWAP
@ -442,7 +442,7 @@ is_a4000()
return (1);
#ifdef DEBUG
if (a4000_flag)
kprintf("Denise ID = %04x\n", (unsigned short)custom.deniseid);
printf("Denise ID = %04x\n", (unsigned short)custom.deniseid);
#endif
if (machineid >> 16)
return (0); /* It's not an A4000 */

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_memrw.c,v 1.4 1996/10/10 23:55:11 christos Exp $ */
/* $NetBSD: db_memrw.c,v 1.5 1996/10/13 03:06:32 christos Exp $ */
/*
* Copyright (c) 1994 Gordon W. Ross
@ -115,7 +115,7 @@ db_write_text(dst, ch)
}
#if 0
kprintf("db_write_text: %x: %x = %x (%x:%x)\n", dst, *dst, ch, pte, *pte);
printf("db_write_text: %x: %x = %x (%x:%x)\n", dst, *dst, ch, pte, *pte);
#endif
*pte &= ~PG_RO;
TBIS((vm_offset_t)dst);

View File

@ -1,4 +1,4 @@
/* $NetBSD: disksubr.c,v 1.26 1996/10/10 23:55:13 christos Exp $ */
/* $NetBSD: disksubr.c,v 1.27 1996/10/13 03:06:34 christos Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -199,11 +199,11 @@ readdisklabel(dev, strat, lp, clp)
lp->d_secpercyl = lp->d_nsectors * lp->d_ntracks;
#ifdef DIAGNOSTIC
if (lp->d_ncylinders != rbp->ncylinders)
kprintf("warning found rdb->ncylinders(%ld) != "
printf("warning found rdb->ncylinders(%ld) != "
"rdb->highcyl(%ld) + 1\n", rbp->ncylinders,
rbp->highcyl);
if (lp->d_nsectors * lp->d_ntracks != rbp->secpercyl)
kprintf("warning found rdb->secpercyl(%ld) != "
printf("warning found rdb->secpercyl(%ld) != "
"rdb->nsectors(%ld) * rdb->nheads(%ld)\n", rbp->secpercyl,
rbp->nsectors, rbp->nheads);
#endif
@ -216,7 +216,7 @@ readdisklabel(dev, strat, lp, clp)
lp->d_sparespertrack = lp->d_sparespercyl / lp->d_ntracks;
#ifdef DIAGNOSTIC
if (lp->d_sparespercyl % lp->d_ntracks)
kprintf("warning lp->d_sparespercyl(%d) not multiple "
printf("warning lp->d_sparespercyl(%d) not multiple "
"of lp->d_ntracks(%d)\n", lp->d_sparespercyl,
lp->d_ntracks);
#endif
@ -288,7 +288,7 @@ readdisklabel(dev, strat, lp, clp)
case ADT_NETBSDROOT:
pp = &lp->d_partitions[0];
if (pp->p_size) {
kprintf("WARN: more than one root, ignoring\n");
printf("WARN: more than one root, ignoring\n");
clp->rdblock = RDBNULL; /* invlidate cpulab */
continue;
}
@ -296,7 +296,7 @@ readdisklabel(dev, strat, lp, clp)
case ADT_NETBSDSWAP:
pp = &lp->d_partitions[1];
if (pp->p_size) {
kprintf("WARN: more than one swap, ignoring\n");
printf("WARN: more than one swap, ignoring\n");
clp->rdblock = RDBNULL; /* invlidate cpulab */
continue;
}
@ -317,10 +317,10 @@ readdisklabel(dev, strat, lp, clp)
pbp->partname[pbp->partname[0] + 1] = 0;
else
pbp->partname[sizeof(pbp->partname) - 1] = 0;
kprintf("Partition '%s' geometry %ld/%ld differs",
printf("Partition '%s' geometry %ld/%ld differs",
pbp->partname + 1, pbp->e.numheads,
pbp->e.secpertrk);
kprintf(" from RDB %d/%d\n", lp->d_ntracks,
printf(" from RDB %d/%d\n", lp->d_ntracks,
lp->d_nsectors);
}
#endif
@ -579,7 +579,7 @@ getadostype(dostype)
return(adt);
case DOST_XXXBSD:
#ifdef DIAGNOSTIC
kprintf("found dostype: 0x%lx which is deprecated", dostype);
printf("found dostype: 0x%lx which is deprecated", dostype);
#endif
if (b1 == 'S') {
dostype = DOST_NBS;
@ -592,12 +592,12 @@ getadostype(dostype)
dostype |= FS_BSDFFS;
}
#ifdef DIAGNOSTIC
kprintf(" using: 0x%lx instead\n", dostype);
printf(" using: 0x%lx instead\n", dostype);
#endif
return(getadostype(dostype));
default:
#ifdef DIAGNOSTIC
kprintf("warning unknown dostype: 0x%lx marking unused\n",
printf("warning unknown dostype: 0x%lx marking unused\n",
dostype);
#endif
adt.archtype = ADT_UNKNOWN;

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.79 1996/10/10 23:55:18 christos Exp $ */
/* $NetBSD: machdep.c,v 1.80 1996/10/13 03:06:36 christos Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -255,9 +255,9 @@ cpu_startup()
/*
* Good {morning,afternoon,evening,night}.
*/
kprintf(version);
printf(version);
identifycpu();
kprintf("real mem = %d (%d pages)\n", ctob(physmem), ctob(physmem)/NBPG);
printf("real mem = %d (%d pages)\n", ctob(physmem), ctob(physmem)/NBPG);
/*
* Allocate space for system data structures.
@ -409,9 +409,9 @@ again:
#ifdef DEBUG
pmapdebug = opmapdebug;
#endif
kprintf("avail mem = %ld (%ld pages)\n", ptoa(cnt.v_free_count),
printf("avail mem = %ld (%ld pages)\n", ptoa(cnt.v_free_count),
ptoa(cnt.v_free_count)/NBPG);
kprintf("using %d buffers containing %d bytes of memory\n",
printf("using %d buffers containing %d bytes of memory\n",
nbuf, bufpages * CLBYTES);
/*
@ -419,20 +419,20 @@ again:
*/
if (memlist->m_nseg > 0 && memlist->m_nseg < 16)
for (i = 0; i < memlist->m_nseg; i++)
kprintf("memory segment %d at %x size %x\n", i,
printf("memory segment %d at %x size %x\n", i,
memlist->m_seg[i].ms_start,
memlist->m_seg[i].ms_size);
#if defined(MACHINE_NONCONTIG) && defined(DEBUG)
kprintf("Physical memory segments:\n");
printf("Physical memory segments:\n");
for (i = 0; i < memlist->m_nseg && phys_segs[i].start; ++i)
kprintf("Physical segment %d at %08lx size %ld offset %d\n", i,
printf("Physical segment %d at %08lx size %ld offset %d\n", i,
phys_segs[i].start,
(phys_segs[i].end - phys_segs[i].start) / NBPG,
phys_segs[i].first_page);
#endif
#ifdef DEBUG_KERNEL_START
kprintf("calling initcpu...\n");
printf("calling initcpu...\n");
#endif
/*
* Set up CPU-specific registers, cache, etc.
@ -440,7 +440,7 @@ again:
initcpu();
#ifdef DEBUG_KERNEL_START
kprintf("survived initcpu...\n");
printf("survived initcpu...\n");
#endif
/*
* Set up buffers, so they can be used to read disk labels.
@ -448,14 +448,14 @@ again:
bufinit();
#ifdef DEBUG_KERNEL_START
kprintf("survived bufinit...\n");
printf("survived bufinit...\n");
#endif
/*
* Configure the system.
*/
configure();
#ifdef DEBUG_KERNEL_START
kprintf("survived configure...\n");
printf("survived configure...\n");
#endif
}
@ -505,7 +505,7 @@ identifycpu()
char machbuf[16];
if (is_draco()) {
ksprintf(machbuf, "DraCo rev.%d", is_draco());
sprintf(machbuf, "DraCo rev.%d", is_draco());
mach = machbuf;
} else
#endif
@ -522,7 +522,7 @@ identifycpu()
#ifdef M68060
if (machineid & AMIGA_68060) {
asm(".word 0x4e7a,0x0808; movl d0,%0" : "=d"(pcr) : : "d0");
ksprintf(cpubuf, "68%s060 rev.%d",
sprintf(cpubuf, "68%s060 rev.%d",
pcr & 0x10000 ? "LC/EC" : "", (pcr>>8)&0xff);
cpu_type = cpubuf;
mmu = "/MMU";
@ -554,8 +554,8 @@ identifycpu()
fputype = FPU_NONE;
}
}
ksprintf(cpu_model, "%s (%s CPU%s%s)", mach, cpu_type, mmu, fpu);
kprintf("%s\n", cpu_model);
sprintf(cpu_model, "%s (%s CPU%s%s)", mach, cpu_type, mmu, fpu);
printf("%s\n", cpu_model);
}
/*
@ -642,7 +642,7 @@ sendsig(catcher, sig, mask, code)
#if 0
kprintf("sendsig %d %d %x %x %x\n", p->p_pid, sig, mask, code, catcher);
printf("sendsig %d %d %x %x %x\n", p->p_pid, sig, mask, code, catcher);
#endif
frame = (struct frame *)p->p_md.md_regs;
@ -667,13 +667,13 @@ kprintf("sendsig %d %d %x %x %x\n", p->p_pid, sig, mask, code, catcher);
(void)grow(p, (unsigned)fp);
#ifdef DEBUG
if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid)
kprintf("sendsig(%d): sig %d ssp %p usp %p scp %p ft %d\n",
printf("sendsig(%d): sig %d ssp %p usp %p scp %p ft %d\n",
p->p_pid, sig, &oonstack, fp, &fp->sf_sc, ft);
#endif
if (useracc((caddr_t)fp, sizeof(struct sigframe), B_WRITE) == 0) {
#ifdef DEBUG
if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid)
kprintf("sendsig(%d): useracc failed on sig %d\n",
printf("sendsig(%d): useracc failed on sig %d\n",
p->p_pid, sig);
#endif
/*
@ -729,7 +729,7 @@ kprintf("sendsig %d %d %x %x %x\n", p->p_pid, sig, mask, code, catcher);
frame->f_format = frame->f_vector = 0;
#ifdef DEBUG
if (sigdebug & SDB_FOLLOW)
kprintf("sendsig(%d): copy out %d of frame %d\n",
printf("sendsig(%d): copy out %d of frame %d\n",
p->p_pid, exframesize[ft], ft);
#endif
}
@ -738,7 +738,7 @@ kprintf("sendsig %d %d %x %x %x\n", p->p_pid, sig, mask, code, catcher);
m68881_save(&kfp->sf_state.ss_fpstate);
#ifdef DEBUG
if ((sigdebug & SDB_FPSTATE) && *(char *)&kfp->sf_state.ss_fpstate)
kprintf("sendsig(%d): copy out FP state (%x) to %p\n",
printf("sendsig(%d): copy out FP state (%x) to %p\n",
p->p_pid, *(u_int *)&kfp->sf_state.ss_fpstate,
&kfp->sf_state.ss_fpstate);
#endif
@ -757,7 +757,7 @@ kprintf("sendsig %d %d %x %x %x\n", p->p_pid, sig, mask, code, catcher);
frame->f_regs[SP] = (int)fp;
#ifdef DEBUG
if (sigdebug & SDB_FOLLOW)
kprintf("sendsig(%d): sig %d scp %p fp %p sc_sp %x sc_ap %x\n",
printf("sendsig(%d): sig %d scp %p fp %p sc_sp %x sc_ap %x\n",
p->p_pid, sig, kfp->sf_scp, fp,
kfp->sf_sc.sc_sp, kfp->sf_sc.sc_ap);
#endif
@ -767,7 +767,7 @@ kprintf("sendsig %d %d %x %x %x\n", p->p_pid, sig, mask, code, catcher);
frame->f_pc = (int)(((char *)PS_STRINGS) - (esigcode - sigcode));
#ifdef DEBUG
if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid)
kprintf("sendsig(%d): sig %d returns\n",
printf("sendsig(%d): sig %d returns\n",
p->p_pid, sig);
#endif
free((caddr_t)kfp, M_TEMP);
@ -803,7 +803,7 @@ sys_sigreturn(p, v, retval)
scp = SCARG(uap, sigcntxp);
#ifdef DEBUG
if (sigdebug & SDB_FOLLOW)
kprintf("sigreturn: pid %d, scp %p\n", p->p_pid, scp);
printf("sigreturn: pid %d, scp %p\n", p->p_pid, scp);
#endif
if ((int)scp & 1)
return(EINVAL);
@ -843,7 +843,7 @@ sys_sigreturn(p, v, retval)
flags = fuword((caddr_t)rf);
#ifdef DEBUG
if (sigdebug & SDB_FOLLOW)
kprintf("sigreturn(%d): sc_ap %x flags %x\n",
printf("sigreturn(%d): sc_ap %x flags %x\n",
p->p_pid, rf, flags);
#endif
/*
@ -855,7 +855,7 @@ sys_sigreturn(p, v, retval)
return (EJUSTRETURN);
#ifdef DEBUG
if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid)
kprintf("sigreturn(%d): ssp %p usp %x scp %p ft %d\n",
printf("sigreturn(%d): ssp %p usp %x scp %p ft %d\n",
p->p_pid, &flags, scp->sc_sp, SCARG(uap, sigcntxp),
(flags&SS_RTEFRAME) ? tstate.ss_frame.f_format : -1);
#endif
@ -884,7 +884,7 @@ sys_sigreturn(p, v, retval)
bcopy((caddr_t)&tstate.ss_frame.F_u, (caddr_t)&frame->F_u, sz);
#ifdef DEBUG
if (sigdebug & SDB_FOLLOW)
kprintf("sigreturn(%d): copy in %d of frame type %d\n",
printf("sigreturn(%d): copy in %d of frame type %d\n",
p->p_pid, sz, tstate.ss_frame.f_format);
#endif
}
@ -896,7 +896,7 @@ sys_sigreturn(p, v, retval)
m68881_restore(&tstate.ss_fpstate);
#ifdef DEBUG
if ((sigdebug & SDB_FPSTATE) && *(char *)&tstate.ss_fpstate)
kprintf("sigreturn(%d): copied in FP state (%x) at %p\n",
printf("sigreturn(%d): copied in FP state (%x) at %p\n",
p->p_pid, *(u_int *)&tstate.ss_fpstate,
&tstate.ss_fpstate);
#endif
@ -904,7 +904,7 @@ sys_sigreturn(p, v, retval)
#ifdef DEBUG
if ((sigdebug & SDB_FOLLOW) ||
((sigdebug & SDB_KSTACK) && p->p_pid == sigpid))
kprintf("sigreturn(%d): returns\n", p->p_pid);
printf("sigreturn(%d): returns\n", p->p_pid);
#endif
return (EJUSTRETURN);
}
@ -920,7 +920,7 @@ bootsync(void)
waittime = 0;
(void) spl0();
kprintf("syncing disks... ");
printf("syncing disks... ");
/*
* Release vnodes held by texts before sync.
*/
@ -940,13 +940,13 @@ bootsync(void)
nbusy++;
if (nbusy == 0)
break;
kprintf("%d ", nbusy);
printf("%d ", nbusy);
delay(40000 * iter);
}
if (nbusy)
kprintf("giving up\n");
printf("giving up\n");
else
kprintf("done\n");
printf("done\n");
/*
* If we've been adjusting the clock, the todr
* will be out of synch; adjust it now.
@ -977,7 +977,7 @@ boot(howto, bootstr)
dumpsys();
if (howto & RB_HALT) {
kprintf("System halted.\n\n");
printf("System halted.\n\n");
asm(" stop #0x2700");
/*NOTREACHED*/
}
@ -1069,12 +1069,12 @@ dumpsys()
dumpconf();
if (dumplo < 0)
return;
kprintf("\ndumping to dev %x, offset %ld\n", dumpdev, dumplo);
printf("\ndumping to dev %x, offset %ld\n", dumpdev, dumplo);
psize = (*bdevsw[major(dumpdev)].d_psize) (dumpdev);
kprintf("dump ");
printf("dump ");
if (psize == -1) {
kprintf("area unavailable.\n");
printf("area unavailable.\n");
return;
}
kseg_p = (kcore_seg_t *)dump_hdr;
@ -1103,7 +1103,7 @@ dumpsys()
/* Print out how many MBs we have to go. */
n = bytes - i;
if (n && (n % (1024 * 1024)) == 0)
kprintf("%d ", n / (1024 * 1024));
printf("%d ", n / (1024 * 1024));
/* Limit size for next transfer. */
if (n > BYTES_PER_DUMP)
@ -1133,26 +1133,26 @@ dumpsys()
switch (error) {
case ENXIO:
kprintf("device bad\n");
printf("device bad\n");
break;
case EFAULT:
kprintf("device not ready\n");
printf("device not ready\n");
break;
case EINVAL:
kprintf("area improper\n");
printf("area improper\n");
break;
case EIO:
kprintf("i/o error\n");
printf("i/o error\n");
break;
default:
kprintf("succeeded\n");
printf("succeeded\n");
break;
}
kprintf("\n\n");
printf("\n\n");
delay(5000000); /* 5 seconds */
}
@ -1268,7 +1268,7 @@ straytrap(pc, evec)
int pc;
u_short evec;
{
kprintf("unexpected trap format %x (vector offset %x) from %x\n",
printf("unexpected trap format %x (vector offset %x) from %x\n",
evec>>12, evec & 0xFFF, pc);
/*XXX*/ panic("straytrap");
}
@ -1495,7 +1495,7 @@ call_sicallbacks()
#ifdef DIAGNOSTIC
if (ncbd) {
ncb += ncbd;
kprintf("call_sicallback: %d more dynamic structures %d total\n",
printf("call_sicallback: %d more dynamic structures %d total\n",
ncbd, ncb);
ncbd = 0;
}
@ -1610,7 +1610,7 @@ intrhand(sr)
ipl = (sr >> 8) & 7;
#ifdef REALLYDEBUG
kprintf("intrhand: got int. %d\n", ipl);
printf("intrhand: got int. %d\n", ipl);
#endif
#ifdef DRACO
if (is_draco())
@ -1660,14 +1660,14 @@ intrhand(sr)
splx(s);
if (ssir_active & SIR_NET) {
#ifdef REALLYDEBUG
kprintf("calling netintr\n");
printf("calling netintr\n");
#endif
cnt.v_soft++;
netintr();
}
if (ssir_active & SIR_CLOCK) {
#ifdef REALLYDEBUG
kprintf("calling softclock\n");
printf("calling softclock\n");
#endif
cnt.v_soft++;
/* XXXX softclock(&frame.f_stackadj); */
@ -1675,7 +1675,7 @@ intrhand(sr)
}
if (ssir_active & SIR_CBACK) {
#ifdef REALLYDEBUG
kprintf("calling softcallbacks\n");
printf("calling softcallbacks\n");
#endif
cnt.v_soft++;
call_sicallbacks();
@ -1732,12 +1732,12 @@ intrhand(sr)
audio_handler();
break;
default:
kprintf("intrhand: unexpected sr 0x%x, intreq = 0x%x\n",
printf("intrhand: unexpected sr 0x%x, intreq = 0x%x\n",
sr, ireq);
break;
}
#ifdef REALLYDEBUG
kprintf("intrhand: leaving.\n");
printf("intrhand: leaving.\n");
#endif
}
@ -1775,7 +1775,7 @@ nmihand(frame)
*/
if (innmihand == 0) {
innmihand = 1;
kprintf("Got a keyboard NMI\n");
printf("Got a keyboard NMI\n");
innmihand = 0;
}
if (panicbutton) {
@ -1793,7 +1793,7 @@ nmihand(frame)
if (parityerror(&frame))
return;
/* panic?? */
kprintf("unexpected level 7 interrupt ignored\n");
printf("unexpected level 7 interrupt ignored\n");
}
#endif
@ -1810,27 +1810,27 @@ regdump(fp, sbytes)
return;
s = splhigh();
doingdump = 1;
kprintf("pid = %d, pc = %s, ", curproc ? curproc->p_pid : 0,
printf("pid = %d, pc = %s, ", curproc ? curproc->p_pid : 0,
hexstr(fp->f_pc, 8));
kprintf("ps = %s, ", hexstr(fp->f_sr, 4));
kprintf("sfc = %s, ", hexstr(getsfc(), 4));
kprintf("dfc = %s\n", hexstr(getdfc(), 4));
kprintf("Registers:\n ");
printf("ps = %s, ", hexstr(fp->f_sr, 4));
printf("sfc = %s, ", hexstr(getsfc(), 4));
printf("dfc = %s\n", hexstr(getdfc(), 4));
printf("Registers:\n ");
for (i = 0; i < 8; i++)
kprintf(" %d", i);
kprintf("\ndreg:");
printf(" %d", i);
printf("\ndreg:");
for (i = 0; i < 8; i++)
kprintf(" %s", hexstr(fp->f_regs[i], 8));
kprintf("\nareg:");
printf(" %s", hexstr(fp->f_regs[i], 8));
printf("\nareg:");
for (i = 0; i < 8; i++)
kprintf(" %s", hexstr(fp->f_regs[i+8], 8));
printf(" %s", hexstr(fp->f_regs[i+8], 8));
if (sbytes > 0) {
if (fp->f_sr & PSL_S) {
kprintf("\n\nKernel stack (%s):",
printf("\n\nKernel stack (%s):",
hexstr((int)(((int *)&fp)-1), 8));
dumpmem(((int *)&fp)-1, sbytes, 0);
} else {
kprintf("\n\nUser stack (%s):", hexstr(fp->f_regs[SP], 8));
printf("\n\nUser stack (%s):", hexstr(fp->f_regs[SP], 8));
dumpmem((int *)fp->f_regs[SP], sbytes, 1);
}
}
@ -1850,9 +1850,9 @@ dumpmem(ptr, sz, ustack)
for (i = 0; i < sz; i++) {
if ((i & 7) == 0)
kprintf("\n%s: ", hexstr((int)ptr, 6));
printf("\n%s: ", hexstr((int)ptr, 6));
else
kprintf(" ");
printf(" ");
if (ustack == 1) {
if ((val = fuword(ptr++)) == -1)
break;
@ -1862,9 +1862,9 @@ dumpmem(ptr, sz, ustack)
break;
val = *ptr++;
}
kprintf("%s", hexstr(val, 8));
printf("%s", hexstr(val, 8));
}
kprintf("\n");
printf("\n");
}
static char *

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.37 1996/10/10 23:55:20 christos Exp $ */
/* $NetBSD: pmap.c,v 1.38 1996/10/13 03:06:38 christos Exp $ */
/*
* Copyright (c) 1991 Regents of the University of California.
@ -470,9 +470,9 @@ pmap_init(phys_start, phys_end)
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
#ifdef MACHINE_NONCONTIG
kprintf("pmap_init(%lx, %lx)\n", avail_start, avail_end);
printf("pmap_init(%lx, %lx)\n", avail_start, avail_end);
#else
kprintf("pmap_init(%lx, %lx)\n", phys_start, phys_end);
printf("pmap_init(%lx, %lx)\n", phys_start, phys_end);
#endif
#endif
/*
@ -497,9 +497,9 @@ pmap_init(phys_start, phys_end)
panic("pmap_init: bogons in the VM system!\n");
#ifdef DEBUG
if (pmapdebug & PDB_INIT) {
kprintf("pmap_init: Sysseg %p, Sysmap %p, Sysptmap %p\n",
printf("pmap_init: Sysseg %p, Sysmap %p, Sysptmap %p\n",
Sysseg, Sysmap, Sysptmap);
kprintf(" pstart %lx, pend %lx, vstart %lx, vend %lx\n",
printf(" pstart %lx, pend %lx, vstart %lx, vend %lx\n",
avail_start, avail_end, virtual_avail, virtual_end);
}
#endif
@ -515,7 +515,7 @@ pmap_init(phys_start, phys_end)
npg += atop(phys_segs[i].end - phys_segs[i].start);
}
#ifdef DEBUG
kprintf("pmap_init: avail_start %lx phys_segs[0].start %lx npg %ld\n",
printf("pmap_init: avail_start %lx phys_segs[0].start %lx npg %ld\n",
avail_start, phys_segs[0].start, npg);
#endif
#else
@ -545,7 +545,7 @@ pmap_init(phys_start, phys_end)
pmap_attributes = (char *) addr;
#ifdef DEBUG
if (pmapdebug & PDB_INIT)
kprintf("pmap_init: %lx bytes (%lx pgs): seg %p tbl %p attr %p\n",
printf("pmap_init: %lx bytes (%lx pgs): seg %p tbl %p attr %p\n",
s, npg, Segtabzero, pv_table, pmap_attributes);
#endif
@ -595,7 +595,7 @@ pmap_init(phys_start, phys_end)
#ifdef DEBUG
kpt_stats.kpttotal = atop(s);
if (pmapdebug & PDB_INIT)
kprintf("pmap_init: KPT: %ld pages from %lx to %lx\n",
printf("pmap_init: KPT: %ld pages from %lx to %lx\n",
atop(s), addr, addr + s);
#endif
@ -618,7 +618,7 @@ pmap_init(phys_start, phys_end)
panic("pmap_init: cannot map range to pt_map");
#ifdef DEBUG
if (pmapdebug & PDB_INIT)
kprintf("pmap_init: pt_map [%lx - %lx)\n", addr, addr2);
printf("pmap_init: pt_map [%lx - %lx)\n", addr, addr2);
#endif
#if defined(M68040) || defined(M68060)
@ -659,7 +659,7 @@ pmap_next_page(addrp)
if (avail_next == phys_segs[cur_seg].end) {
avail_next = phys_segs[++cur_seg].start;
#ifdef DEBUG
kprintf("pmap_next_page: next %lx remain %ld\n",
printf("pmap_next_page: next %lx remain %ld\n",
avail_next, avail_remaining);
#endif
}
@ -831,7 +831,7 @@ pmap_map(virt, start, end, prot)
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
kprintf("pmap_map(%lx, %lx, %lx, %x)\n", virt, start, end, prot);
printf("pmap_map(%lx, %lx, %lx, %x)\n", virt, start, end, prot);
#endif
while (start < end) {
pmap_enter(pmap_kernel(), virt, start, prot, FALSE);
@ -861,7 +861,7 @@ pmap_create(size)
#ifdef DEBUG
if (pmapdebug & (PDB_FOLLOW|PDB_CREATE))
kprintf("pmap_create(%lx)\n", size);
printf("pmap_create(%lx)\n", size);
#endif
/*
* Software use map does not need a pmap
@ -891,7 +891,7 @@ pmap_pinit(pmap)
#ifdef DEBUG
if (pmapdebug & (PDB_FOLLOW|PDB_CREATE))
kprintf("pmap_pinit(%p)\n", pmap);
printf("pmap_pinit(%p)\n", pmap);
#endif
/*
* No need to allocate page table space yet but we do need a
@ -923,7 +923,7 @@ pmap_destroy(pmap)
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
kprintf("pmap_destroy(%p)\n", pmap);
printf("pmap_destroy(%p)\n", pmap);
#endif
if (pmap == NULL)
return;
@ -949,7 +949,7 @@ pmap_release(pmap)
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
kprintf("pmap_release(%p)\n", pmap);
printf("pmap_release(%p)\n", pmap);
#endif
#ifdef notdef /* DIAGNOSTIC */
/* count would be 0 from pmap_destroy... */
@ -974,7 +974,7 @@ pmap_reference(pmap)
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
kprintf("pmap_reference(%p)\n", pmap);
printf("pmap_reference(%p)\n", pmap);
#endif
if (pmap != NULL) {
simple_lock(&pmap->pm_lock);
@ -1007,7 +1007,7 @@ pmap_remove(pmap, sva, eva)
u_int opte;
if (pmapdebug & (PDB_FOLLOW|PDB_REMOVE|PDB_PROTECT))
kprintf("pmap_remove(%p, %lx, %lx)\n", pmap, sva, eva);
printf("pmap_remove(%p, %lx, %lx)\n", pmap, sva, eva);
#endif
if (pmap == NULL)
@ -1050,7 +1050,7 @@ pmap_remove(pmap, sva, eva)
*/
#ifdef DEBUG
if (pmapdebug & PDB_REMOVE)
kprintf("remove: invalidating %p\n", pte);
printf("remove: invalidating %p\n", pte);
#endif
bits = *(int *)pte & (PG_U|PG_M);
*(int *)pte = PG_NV;
@ -1112,10 +1112,10 @@ pmap_remove(pmap, sva, eva)
#ifdef DEBUG
if (npv == NULL) {
#ifdef MACHINE_NONCONTIG /* XXX this need to be fixed */
kprintf("pmap_remove: PA %lx index %d\n",
printf("pmap_remove: PA %lx index %d\n",
pa, pa_index(pa));
#else
kprintf("pmap_remove: PA %lx index %ld\n",
printf("pmap_remove: PA %lx index %ld\n",
pa, pa_index(pa));
#endif
panic("pmap_remove: PA not in pv_tab");
@ -1135,7 +1135,7 @@ pmap_remove(pmap, sva, eva)
#ifdef DEBUG
remove_stats.ptinvalid++;
if (pmapdebug & (PDB_REMOVE|PDB_PTPAGE)) {
kprintf("remove: ste was %x@%p pte was %x@%p\n",
printf("remove: ste was %x@%p pte was %x@%p\n",
*ste, ste,
*(int *)&opte, pmap_pte(pmap, va));
}
@ -1155,7 +1155,7 @@ pmap_remove(pmap, sva, eva)
ste -= NPTEPG / SG4_LEV3SIZE;
#ifdef DEBUG
if (pmapdebug &(PDB_REMOVE|PDB_SEGTAB|0x10000))
kprintf("pmap_remove:PT at %lx removed\n",
printf("pmap_remove:PT at %lx removed\n",
va);
#endif
}
@ -1170,7 +1170,7 @@ pmap_remove(pmap, sva, eva)
if (ptpmap != pmap_kernel()) {
#ifdef DEBUG
if (pmapdebug & (PDB_REMOVE|PDB_SEGTAB))
kprintf("remove: stab %p, refcnt %d\n",
printf("remove: stab %p, refcnt %d\n",
ptpmap->pm_stab,
ptpmap->pm_sref - 1);
if ((pmapdebug & PDB_PARANOIA) &&
@ -1180,7 +1180,7 @@ pmap_remove(pmap, sva, eva)
if (--(ptpmap->pm_sref) == 0) {
#ifdef DEBUG
if (pmapdebug&(PDB_REMOVE|PDB_SEGTAB))
kprintf("remove: free stab %p\n",
printf("remove: free stab %p\n",
ptpmap->pm_stab);
#endif
kmem_free_wakeup(kernel_map,
@ -1248,7 +1248,7 @@ pmap_page_protect(pa, prot)
#ifdef DEBUG
if ((pmapdebug & (PDB_FOLLOW|PDB_PROTECT)) ||
(prot == VM_PROT_NONE && (pmapdebug & PDB_REMOVE)))
kprintf("pmap_page_protect(%lx, %x)\n", pa, prot);
printf("pmap_page_protect(%lx, %x)\n", pa, prot);
#endif
if (!pmap_valid_page(pa))
return;
@ -1270,10 +1270,10 @@ pmap_page_protect(pa, prot)
if (!pmap_ste_v(pv->pv_pmap,pv->pv_va) ||
pmap_pte_pa(pmap_pte(pv->pv_pmap,pv->pv_va)) != pa)
{
kprintf ("pmap_page_protect: va %lx, pmap_ste_v %d pmap_pte_pa %08x/%lx\n",
printf ("pmap_page_protect: va %lx, pmap_ste_v %d pmap_pte_pa %08x/%lx\n",
pv->pv_va, pmap_ste_v(pv->pv_pmap,pv->pv_va),
pmap_pte_pa(pmap_pte(pv->pv_pmap,pv->pv_va)),pa);
kprintf (" pvh %p pv %p pv_next %p\n", pa_to_pvh(pa), pv, pv->pv_next);
printf (" pvh %p pv %p pv_next %p\n", pa_to_pvh(pa), pv, pv->pv_next);
panic("pmap_page_protect: bad mapping");
}
#endif
@ -1302,7 +1302,7 @@ pmap_protect(pmap, sva, eva, prot)
#ifdef DEBUG
if (pmapdebug & (PDB_FOLLOW|PDB_PROTECT))
kprintf("pmap_protect(%p, %lx, %lx, %x)\n", pmap, sva, eva, prot);
printf("pmap_protect(%p, %lx, %lx, %x)\n", pmap, sva, eva, prot);
#endif
if (pmap == NULL)
return;
@ -1388,7 +1388,7 @@ pmap_enter(pmap, va, pa, prot, wired)
#ifdef DEBUG
if (pmapdebug & (PDB_FOLLOW|PDB_ENTER))
kprintf("pmap_enter(%p, %lx, %lx, %x, %x)\n",
printf("pmap_enter(%p, %lx, %lx, %x, %x)\n",
pmap, va, pa, prot, wired);
#endif
if (pmap == NULL)
@ -1417,7 +1417,7 @@ pmap_enter(pmap, va, pa, prot, wired)
opa = pmap_pte_pa(pte);
#ifdef DEBUG
if (pmapdebug & PDB_ENTER)
kprintf("enter: pte %p, *pte %x\n", pte, *(int *)pte);
printf("enter: pte %p, *pte %x\n", pte, *(int *)pte);
#endif
/*
@ -1436,7 +1436,7 @@ pmap_enter(pmap, va, pa, prot, wired)
if ((wired && !pmap_pte_w(pte)) || (!wired && pmap_pte_w(pte))) {
#ifdef DEBUG
if (pmapdebug & PDB_ENTER)
kprintf("enter: wiring change -> %x\n", wired);
printf("enter: wiring change -> %x\n", wired);
#endif
if (wired)
pmap->pm_stats.wired_count++;
@ -1462,7 +1462,7 @@ pmap_enter(pmap, va, pa, prot, wired)
if (opa) {
#ifdef DEBUG
if (pmapdebug & PDB_ENTER)
kprintf("enter: removing old mapping %lx\n", va);
printf("enter: removing old mapping %lx\n", va);
#endif
pmap_remove(pmap, va, va + PAGE_SIZE);
#ifdef DEBUG
@ -1495,7 +1495,7 @@ pmap_enter(pmap, va, pa, prot, wired)
s = splimp();
#ifdef DEBUG
if (pmapdebug & PDB_ENTER)
kprintf("enter: pv at %p: %lx/%p/%p\n",
printf("enter: pv at %p: %lx/%p/%p\n",
pv, pv->pv_va, pv->pv_pmap, pv->pv_next);
#endif
/*
@ -1581,7 +1581,7 @@ validate:
s = "UST";
else
s = "other";
kprintf("pmap_init: validating %s kernel page at %lx -> %lx\n",
printf("pmap_init: validating %s kernel page at %lx -> %lx\n",
s, va, pa);
}
@ -1615,7 +1615,7 @@ validate:
#endif
#ifdef DEBUG
if (pmapdebug & PDB_ENTER)
kprintf("enter: new pte value %x\n", npte);
printf("enter: new pte value %x\n", npte);
#endif
*(int *)pte++ = npte;
if (!wired && active_pmap(pmap))
@ -1645,7 +1645,7 @@ pmap_change_wiring(pmap, va, wired)
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
kprintf("pmap_change_wiring(%p, %lx, %x)\n", pmap, va, wired);
printf("pmap_change_wiring(%p, %lx, %x)\n", pmap, va, wired);
#endif
if (pmap == NULL)
return;
@ -1659,7 +1659,7 @@ pmap_change_wiring(pmap, va, wired)
*/
if (!pmap_ste_v(pmap, va)) {
if (pmapdebug & PDB_PARANOIA)
kprintf("pmap_change_wiring: invalid STE for %lx\n", va);
printf("pmap_change_wiring: invalid STE for %lx\n", va);
return;
}
/*
@ -1668,7 +1668,7 @@ pmap_change_wiring(pmap, va, wired)
*/
if (!pmap_pte_v(pte)) {
if (pmapdebug & PDB_PARANOIA)
kprintf("pmap_change_wiring: invalid PTE for %lx\n", va);
printf("pmap_change_wiring: invalid PTE for %lx\n", va);
}
#endif
if ((wired && !pmap_pte_w(pte)) || (!wired && pmap_pte_w(pte))) {
@ -1700,7 +1700,7 @@ pmap_extract(pmap, va)
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
kprintf("pmap_extract(%p, %lx) -> ", pmap, va);
printf("pmap_extract(%p, %lx) -> ", pmap, va);
#endif
pa = 0;
if (pmap && pmap_ste_v(pmap, va))
@ -1709,7 +1709,7 @@ pmap_extract(pmap, va)
pa = (pa & PG_FRAME) | (va & ~PG_FRAME);
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
kprintf("%lx\n", pa);
printf("%lx\n", pa);
#endif
return(pa);
}
@ -1730,7 +1730,7 @@ void pmap_copy(dst_pmap, src_pmap, dst_addr, len, src_addr)
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
kprintf("pmap_copy(%p, %p, %lx, %lx, %lx)\n",
printf("pmap_copy(%p, %p, %lx, %lx, %lx)\n",
dst_pmap, src_pmap, dst_addr, len, src_addr);
#endif
}
@ -1747,7 +1747,7 @@ void pmap_update()
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
kprintf("pmap_update()\n");
printf("pmap_update()\n");
#endif
#if defined(M68060)
if (machineid & AMIGA_68060)
@ -1786,7 +1786,7 @@ pmap_collect(pmap)
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
kprintf("pmap_collect(%p)\n", pmap);
printf("pmap_collect(%p)\n", pmap);
kpt_stats.collectscans++;
#endif
s = splimp();
@ -1809,7 +1809,7 @@ pmap_collect(pmap)
#ifdef DEBUG
if (pv->pv_va < (vm_offset_t)Sysmap ||
pv->pv_va >= (vm_offset_t)Sysmap + AMIGA_KPTSIZE)
kprintf("collect: kernel PT VA out of range\n");
printf("collect: kernel PT VA out of range\n");
else
goto ok;
pmap_pvdump(pa);
@ -1824,7 +1824,7 @@ ok:
#ifdef DEBUG
if (pmapdebug & (PDB_PTPAGE|PDB_COLLECT)) {
kprintf("collect: freeing KPT page at %lx (ste %x@%p)\n",
printf("collect: freeing KPT page at %lx (ste %x@%p)\n",
pv->pv_va, *(int *)pv->pv_ptste, pv->pv_ptste);
opmapdebug = pmapdebug;
pmapdebug |= PDB_PTPAGE;
@ -1853,7 +1853,7 @@ ok:
if (kpt == (struct kpt_page *)0)
panic("pmap_collect: lost a KPT page");
if (pmapdebug & (PDB_PTPAGE|PDB_COLLECT))
kprintf("collect: %lx (%lx) to free list\n",
printf("collect: %lx (%lx) to free list\n",
kpt->kpt_va, kpa);
#endif
*pkpt = kpt->kpt_next;
@ -1866,11 +1866,11 @@ ok:
pmapdebug = opmapdebug;
if (*ste)
kprintf("collect: kernel STE at %p still valid (%x)\n",
printf("collect: kernel STE at %p still valid (%x)\n",
ste, *ste);
ste = (int *)&Sysptmap[(u_int *)ste-pmap_ste(pmap_kernel(), 0)];
if (*ste)
kprintf("collect: kernel PTmap at %p still valid (%x)\n",
printf("collect: kernel PTmap at %p still valid (%x)\n",
ste, *ste);
#endif
}
@ -1884,7 +1884,7 @@ pmap_activate(pmap, pcbp)
{
#ifdef DEBUG
if (pmapdebug & (PDB_FOLLOW|PDB_SEGTAB))
kprintf("pmap_activate(%p, %p)\n", pmap, pcbp);
printf("pmap_activate(%p, %p)\n", pmap, pcbp);
#endif
PMAP_ACTIVATE(pmap, pcbp, pmap == curproc->p_vmspace->vm_map.pmap);
}
@ -1901,7 +1901,7 @@ pmap_zero_page(phys)
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
kprintf("pmap_zero_page(%lx)\n", phys);
printf("pmap_zero_page(%lx)\n", phys);
#endif
phys >>= PG_SHIFT;
clearseg(phys);
@ -1919,7 +1919,7 @@ pmap_copy_page(src, dst)
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
kprintf("pmap_copy_page(%lx, %lx)\n", src, dst);
printf("pmap_copy_page(%lx, %lx)\n", src, dst);
#endif
src >>= PG_SHIFT;
dst >>= PG_SHIFT;
@ -1949,7 +1949,7 @@ pmap_pageable(pmap, sva, eva, pageable)
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
kprintf("pmap_pageable(%p, %lx, %lx, %x)\n",
printf("pmap_pageable(%p, %lx, %lx, %x)\n",
pmap, sva, eva, pageable);
#endif
/*
@ -1966,7 +1966,7 @@ pmap_pageable(pmap, sva, eva, pageable)
#ifdef DEBUG
if ((pmapdebug & (PDB_FOLLOW|PDB_PTPAGE)) == PDB_PTPAGE)
kprintf("pmap_pageable(%p, %lx, %lx, %x)\n",
printf("pmap_pageable(%p, %lx, %lx, %x)\n",
pmap, sva, eva, pageable);
#endif
if (!pmap_ste_v(pmap, sva))
@ -1979,7 +1979,7 @@ pmap_pageable(pmap, sva, eva, pageable)
return;
#ifdef DEBUG
if (pv->pv_va != sva || pv->pv_next) {
kprintf("pmap_pageable: bad PT page va %lx next %p\n",
printf("pmap_pageable: bad PT page va %lx next %p\n",
pv->pv_va, pv->pv_next);
return;
}
@ -1990,7 +1990,7 @@ pmap_pageable(pmap, sva, eva, pageable)
pmap_changebit(pa, PG_M, FALSE);
#ifdef DEBUG
if (pmapdebug & PDB_PTPAGE)
kprintf("pmap_pageable: PT page %lx(%x) unmodified\n",
printf("pmap_pageable: PT page %lx(%x) unmodified\n",
sva, *(int *)pmap_pte(pmap, sva));
if (pmapdebug & PDB_WIRING)
pmap_check_wiring("pageable", sva);
@ -2008,7 +2008,7 @@ pmap_clear_modify(pa)
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
kprintf("pmap_clear_modify(%lx)\n", pa);
printf("pmap_clear_modify(%lx)\n", pa);
#endif
pmap_changebit(pa, PG_M, FALSE);
}
@ -2024,7 +2024,7 @@ void pmap_clear_reference(pa)
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
kprintf("pmap_clear_reference(%lx)\n", pa);
printf("pmap_clear_reference(%lx)\n", pa);
#endif
pmap_changebit(pa, PG_U, FALSE);
}
@ -2043,7 +2043,7 @@ pmap_is_referenced(pa)
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW) {
boolean_t rv = pmap_testbit(pa, PG_U);
kprintf("pmap_is_referenced(%lx) -> %c\n", pa, "FT"[rv]);
printf("pmap_is_referenced(%lx) -> %c\n", pa, "FT"[rv]);
return(rv);
}
#endif
@ -2064,7 +2064,7 @@ pmap_is_modified(pa)
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW) {
boolean_t rv = pmap_testbit(pa, PG_M);
kprintf("pmap_is_modified(%lx) -> %c\n", pa, "FT"[rv]);
printf("pmap_is_modified(%lx) -> %c\n", pa, "FT"[rv]);
return(rv);
}
#endif
@ -2163,7 +2163,7 @@ pmap_changebit(pa, bit, setem)
#ifdef DEBUG
if (pmapdebug & PDB_BITS)
kprintf("pmap_changebit(%lx, %x, %s)\n",
printf("pmap_changebit(%lx, %x, %s)\n",
pa, bit, setem ? "set" : "clear");
#endif
if (!pmap_valid_page(pa))
@ -2240,7 +2240,7 @@ pmap_enter_ptpage(pmap, va)
#ifdef DEBUG
if (pmapdebug & (PDB_FOLLOW|PDB_ENTER|PDB_PTPAGE))
kprintf("pmap_enter_ptpage: pmap %p, va %lx\n", pmap, va);
printf("pmap_enter_ptpage: pmap %p, va %lx\n", pmap, va);
enter_stats.ptpneeded++;
#endif
/*
@ -2281,7 +2281,7 @@ pmap_enter_ptpage(pmap, va)
PMAP_ACTIVATE(pmap, (struct pcb *)curproc->p_addr, 1);
#ifdef DEBUG
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE|PDB_SEGTAB))
kprintf("enter_pt: pmap %p stab %p(%p)\n",
printf("enter_pt: pmap %p stab %p(%p)\n",
pmap, pmap->pm_stab, pmap->pm_stpa);
#endif
}
@ -2314,7 +2314,7 @@ pmap_enter_ptpage(pmap, va)
#endif
#ifdef DEBUG
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE|PDB_SEGTAB))
kprintf("enter_pt: alloc ste2 %d(%p)\n", ix, addr);
printf("enter_pt: alloc ste2 %d(%p)\n", ix, addr);
#endif
}
ste = pmap_ste2(pmap, va);
@ -2329,7 +2329,7 @@ pmap_enter_ptpage(pmap, va)
ste = (u_int *)((int)ste & ~(NBPG / SG4_LEV3SIZE - 1));
#ifdef DEBUG
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE|PDB_SEGTAB))
kprintf("enter_pt: ste2 %p (%p)\n",
printf("enter_pt: ste2 %p (%p)\n",
pmap_ste2(pmap, va), ste);
#endif
}
@ -2352,7 +2352,7 @@ pmap_enter_ptpage(pmap, va)
*/
#ifdef DEBUG
if (pmapdebug & PDB_COLLECT)
kprintf("enter_pt: no KPT pages, collecting...\n");
printf("enter_pt: no KPT pages, collecting...\n");
#endif
pmap_collect(pmap_kernel());
if ((kpt = kpt_free_list) == (struct kpt_page *)0)
@ -2377,7 +2377,7 @@ pmap_enter_ptpage(pmap, va)
#endif
#ifdef DEBUG
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE))
kprintf("enter_pt: add &Sysptmap[%d]: %x (KPT page %lx)\n",
printf("enter_pt: add &Sysptmap[%d]: %x (KPT page %lx)\n",
ste - pmap_ste(pmap, 0),
*(int *)&Sysptmap[ste - pmap_ste(pmap, 0)],
kpt->kpt_va);
@ -2396,7 +2396,7 @@ pmap_enter_ptpage(pmap, va)
pmap->pm_sref++;
#ifdef DEBUG
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE))
kprintf("enter_pt: about to fault UPT pg at %lx\n", va);
printf("enter_pt: about to fault UPT pg at %lx\n", va);
#endif
if (vm_fault(pt_map, va, VM_PROT_READ|VM_PROT_WRITE, FALSE)
!= KERN_SUCCESS)
@ -2430,7 +2430,7 @@ pmap_enter_ptpage(pmap, va)
}
#ifdef DEBUG
if (pv == NULL) {
kprintf("enter_pt: PV entry for PT page %lx not found\n", ptpa);
printf("enter_pt: PV entry for PT page %lx not found\n", ptpa);
panic("pmap_enter_ptpage: PT page not entered");
}
#endif
@ -2438,7 +2438,7 @@ pmap_enter_ptpage(pmap, va)
pv->pv_ptpmap = pmap;
#ifdef DEBUG
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE))
kprintf("enter_pt: new PT page at PA %lx, ste at %p\n", ptpa, ste);
printf("enter_pt: new PT page at PA %lx, ste at %p\n", ptpa, ste);
#endif
/*
@ -2464,7 +2464,7 @@ pmap_enter_ptpage(pmap, va)
if (pmap != pmap_kernel()) {
#ifdef DEBUG
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE|PDB_SEGTAB))
kprintf("enter_pt: stab %p refcnt %d\n",
printf("enter_pt: stab %p refcnt %d\n",
pmap->pm_stab, pmap->pm_sref);
#endif
}
@ -2486,12 +2486,12 @@ pmap_pvdump(pa)
{
register pv_entry_t pv;
kprintf("pa %lx", pa);
printf("pa %lx", pa);
for (pv = pa_to_pvh(pa); pv; pv = pv->pv_next)
kprintf(" -> pmap %p, va %lx, ptste %p, ptpmap %p, flags %x",
printf(" -> pmap %p, va %lx, ptste %p, ptpmap %p, flags %x",
pv->pv_pmap, pv->pv_va, pv->pv_ptste, pv->pv_ptpmap,
pv->pv_flags);
kprintf("\n");
printf("\n");
}
void
@ -2508,7 +2508,7 @@ pmap_check_wiring(str, va)
return;
if (!vm_map_lookup_entry(pt_map, va, &entry)) {
kprintf("wired_check: entry for %lx not found\n", va);
printf("wired_check: entry for %lx not found\n", va);
return;
}
count = 0;
@ -2516,7 +2516,7 @@ pmap_check_wiring(str, va)
if (*pte)
count++;
if (entry->wired_count != count)
kprintf("*%s*: %lx: w%d/a%d\n",
printf("*%s*: %lx: w%d/a%d\n",
str, va, entry->wired_count, count);
}
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: swapgeneric.c,v 1.25 1996/10/10 23:55:22 christos Exp $ */
/* $NetBSD: swapgeneric.c,v 1.26 1996/10/13 03:06:40 christos Exp $ */
/*
* Copyright (c) 1982, 1986 Regents of the University of California.
@ -117,23 +117,23 @@ getgenconf(bp)
struct genericconf *gc;
for (;;) {
kprintf("root device> ");
printf("root device> ");
gets(bp);
for (gc = genericconf; gc->gc_driver; gc++)
if (gc->gc_driver->cd_name[0] == bp[0] &&
gc->gc_driver->cd_name[1] == bp[1])
break;
if (gc->gc_driver == NULL) {
kprintf("use one of:");
printf("use one of:");
for (gc = genericconf; gc->gc_driver; gc++)
kprintf(" %s%%d", gc->gc_driver->cd_name);
kprintf("\n");
printf(" %s%%d", gc->gc_driver->cd_name);
printf("\n");
continue;
}
cp = bp + 2;
if (*cp >= '0' && *cp <= '9')
break;
kprintf("bad/missing unit number\n");
printf("bad/missing unit number\n");
}
return(gc);
}
@ -199,7 +199,7 @@ setconf()
goto found;
}
}
kprintf("no suitable root\n");
printf("no suitable root\n");
asm("stop #0x2700");
/*NOTREACHED*/
found:

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.50 1996/10/10 23:55:23 christos Exp $ */
/* $NetBSD: trap.c,v 1.51 1996/10/13 03:06:42 christos Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -238,7 +238,7 @@ panictrap(type, code, v, fp)
{
static int panicing = 0;
if (panicing++ == 0) {
kprintf("trap type %d, code = %x, v = %x\n", type, code, v);
printf("trap type %d, code = %x, v = %x\n", type, code, v);
regdump(fp, 128);
}
type &= ~T_USER;
@ -312,7 +312,7 @@ trapmmufault(type, code, v, fp, p, sticks)
#ifdef M68060
if (machineid & AMIGA_68060) {
if (--donomore == 0 || mmudebug & 1)
kprintf ("68060 access error: pc %x, code %b,"
printf ("68060 access error: pc %x, code %b,"
" ea %x\n", fp->f_pc,
code, FSLW_STRING, v);
if (p == oldp && v == oldv && code == oldcode)
@ -324,10 +324,10 @@ trapmmufault(type, code, v, fp, p, sticks)
oldcode = code;
} else
#endif
kprintf("68040 access error: pc %x, code %x,"
printf("68040 access error: pc %x, code %x,"
" ea %x, fa %x\n", fp->f_pc, code, fp->f_fmt7.f_ea, v);
if (curpcb)
kprintf(" curpcb %p ->pcb_ustp %x / %x\n",
printf(" curpcb %p ->pcb_ustp %x / %x\n",
curpcb, curpcb->pcb_ustp,
curpcb->pcb_ustp << PG_SHIFT);
@ -369,7 +369,7 @@ trapmmufault(type, code, v, fp, p, sticks)
va = trunc_page((vm_offset_t)v);
#ifdef DEBUG
if (map == kernel_map && va == 0) {
kprintf("trap: bad kernel access at %x pc %x\n", v, fp->f_pc);
printf("trap: bad kernel access at %x pc %x\n", v, fp->f_pc);
panictrap(type, code, v, fp);
}
#endif
@ -389,14 +389,14 @@ trapmmufault(type, code, v, fp, p, sticks)
#ifdef DEBUG
if (mmudebug)
kprintf("vm_fault(%p,%lx,%d,0)\n", map, va, ftype);
printf("vm_fault(%p,%lx,%d,0)\n", map, va, ftype);
#endif
rv = vm_fault(map, va, ftype, FALSE);
#ifdef DEBUG
if (mmudebug)
kprintf("vmfault %s %lx returned %d\n",
printf("vmfault %s %lx returned %d\n",
map == kernel_map ? "kernel" : "user", va, rv);
#endif
#ifdef M68060
@ -425,7 +425,7 @@ trapmmufault(type, code, v, fp, p, sticks)
/* Check WB1 */
if (fp->f_fmt7.f_wb1s & WBS_VALID) {
kprintf ("trap: wb1 was valid, not handled yet\n");
printf ("trap: wb1 was valid, not handled yet\n");
panictrap(type, code, v, fp);
}
@ -501,9 +501,9 @@ nogo:
trapcpfault(p, fp);
return;
}
kprintf("vm_fault(%p, %lx, %x, 0) -> %x\n",
printf("vm_fault(%p, %lx, %x, 0) -> %x\n",
map, va, ftype, rv);
kprintf(" type %x, code [mmu,,ssw]: %x\n",
printf(" type %x, code [mmu,,ssw]: %x\n",
type, code);
panictrap(type, code, v, fp);
}
@ -550,7 +550,7 @@ trap(type, code, v, frame)
#endif
#ifdef DEBUG
if (mmudebug & 2)
kprintf("trap: t %x c %x v %x pad %x adj %x sr %x pc %x fmt %x vc %x\n",
printf("trap: t %x c %x v %x pad %x adj %x sr %x pc %x fmt %x vc %x\n",
type, code, v, frame.f_pad, frame.f_stackadj, frame.f_sr,
frame.f_pc, frame.f_format, frame.f_vector);
#endif
@ -630,7 +630,7 @@ trap(type, code, v, frame)
*/
type |= T_USER;
#ifdef DEBUG
kprintf("pid %d: kernel %s exception\n", p->p_pid,
printf("pid %d: kernel %s exception\n", p->p_pid,
type==T_COPERR ? "coprocessor" : "format");
#endif
p->p_sigacts->ps_sigact[SIGILL] = SIG_DFL;
@ -709,7 +709,7 @@ trap(type, code, v, frame)
#ifdef DEBUG
if (i != SIGTRAP)
kprintf("trapsignal(%d, %d, %d, %x, %x)\n", p->p_pid, i,
printf("trapsignal(%d, %d, %d, %x, %x)\n", p->p_pid, i,
ucode, v, frame.f_pc);
#endif
trapsignal(p, i, ucode);
@ -906,7 +906,7 @@ _write_back (wb, wb_sts, wb_data, wb_addr, wb_map)
#ifdef DEBUG
if (mmudebug)
kprintf("wb%d valid: %x %x %x\n",wb,wb_sts,wb_addr,wb_data);
printf("wb%d valid: %x %x %x\n",wb,wb_sts,wb_addr,wb_data);
#endif
/* See if we're going to span two pages (for word or long transfers) */
@ -928,14 +928,14 @@ _write_back (wb, wb_sts, wb_data, wb_addr, wb_map)
mmusr = probeva(wb_addr, wb_sts & WBS_TMMASK);
#ifdef DEBUG
if (mmudebug)
kprintf("wb3: probeva(%x,%x) = %x\n",
printf("wb3: probeva(%x,%x) = %x\n",
wb_addr + wb_extra_page, wb_sts & WBS_TMMASK, mmusr);
#endif
if((mmusr & (MMUSR_R | MMUSR_W)) != MMUSR_R) {
#ifdef DEBUG
if (mmudebug)
kprintf("wb3: need to bring in first page\n");
printf("wb3: need to bring in first page\n");
#endif
wb_rc = vm_fault(wb_map,
trunc_page((vm_offset_t)wb_addr),
@ -945,7 +945,7 @@ _write_back (wb, wb_sts, wb_data, wb_addr, wb_map)
return (wb_rc);
#ifdef DEBUG
if (mmudebug)
kprintf("wb3: first page brought in.\n");
printf("wb3: first page brought in.\n");
#endif
}
}
@ -958,7 +958,7 @@ _write_back (wb, wb_sts, wb_data, wb_addr, wb_map)
mmusr = probeva(wb_addr+wb_extra_page, wb_sts & WBS_TMMASK);
#ifdef DEBUG
if (mmudebug)
kprintf("wb%d: probeva %x %x = %x\n",
printf("wb%d: probeva %x %x = %x\n",
wb, wb_addr + wb_extra_page,
wb_sts & WBS_TMMASK,mmusr);
#endif
@ -966,7 +966,7 @@ _write_back (wb, wb_sts, wb_data, wb_addr, wb_map)
if((mmusr & (MMUSR_R | MMUSR_W)) != MMUSR_R) {
#ifdef DEBUG
if (mmudebug)
kprintf("wb%d: page boundary crossed."
printf("wb%d: page boundary crossed."
" Bringing in extra page.\n",wb);
#endif
@ -979,7 +979,7 @@ _write_back (wb, wb_sts, wb_data, wb_addr, wb_map)
}
#ifdef DEBUG
if (mmudebug)
kprintf("wb%d: extra page brought in okay.\n", wb);
printf("wb%d: extra page brought in okay.\n", wb);
#endif
}
@ -1025,7 +1025,7 @@ void
_wb_fault()
{
#ifdef DEBUG
kprintf ("trap: writeback fault\n");
printf ("trap: writeback fault\n");
#endif
return;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: afsc.c,v 1.17 1996/10/10 23:55:27 christos Exp $ */
/* $NetBSD: afsc.c,v 1.18 1996/10/13 03:06:45 christos Exp $ */
/*
* Copyright (c) 1994 Michael L. Hitch
@ -135,7 +135,7 @@ afscattach(pdp, dp, auxp)
struct zbus_args *zap;
siop_regmap_p rp;
kprintf("\n");
printf("\n");
zap = auxp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ahsc.c,v 1.15 1996/10/10 23:55:28 christos Exp $ */
/* $NetBSD: ahsc.c,v 1.16 1996/10/13 03:06:46 christos Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -115,7 +115,7 @@ ahscattach(pdp, dp, auxp)
volatile struct sdmac *rp;
struct sbic_softc *sc;
kprintf("\n");
printf("\n");
sc = (struct sbic_softc *)dp;
sc->sc_cregs = rp = ztwomap(0xdd0000);
@ -186,7 +186,7 @@ ahsc_dmago(dev, addr, count, flags)
dev->sc_dmacmd |= CNTR_DDIR;
#ifdef DEBUG
if (ahsc_dmadebug & DDB_IO)
kprintf("ahsc_dmago: cmd %x\n", dev->sc_dmacmd);
printf("ahsc_dmago: cmd %x\n", dev->sc_dmacmd);
#endif
dev->sc_flags |= SBICF_INTR;
@ -208,7 +208,7 @@ ahsc_dmastop(dev)
#ifdef DEBUG
if (ahsc_dmadebug & DDB_FOLLOW)
kprintf("ahsc_dmastop()\n");
printf("ahsc_dmastop()\n");
#endif
if (dev->sc_dmacmd) {
s = splbio();
@ -247,7 +247,7 @@ ahsc_dmaintr(arg)
#ifdef DEBUG
if (ahsc_dmadebug & DDB_FOLLOW)
kprintf("%s: dmaintr 0x%x\n", dev->sc_dev.dv_xname, stat);
printf("%s: dmaintr 0x%x\n", dev->sc_dev.dv_xname, stat);
#endif
/*
@ -283,7 +283,7 @@ ahsc_dmanext(dev)
if (dev->sc_cur > dev->sc_last) {
/* shouldn't happen !! */
kprintf("ahsc_dmanext at end !!!\n");
printf("ahsc_dmanext at end !!!\n");
ahsc_dmastop(dev);
return(0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: atzsc.c,v 1.19 1996/10/10 23:55:30 christos Exp $ */
/* $NetBSD: atzsc.c,v 1.20 1996/10/13 03:06:48 christos Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -150,16 +150,16 @@ atzscattach(pdp, dp, auxp)
if (kvtop(sc) & sc->sc_dmamask) {
sc->sc_dmabuffer = (char *)alloc_z2mem(MAXPHYS * 8); /* XXX */
if (isztwomem(sc->sc_dmabuffer))
kprintf(" bounce pa 0x%x", kvtop(sc->sc_dmabuffer));
printf(" bounce pa 0x%x", kvtop(sc->sc_dmabuffer));
else if (sc->sc_dmabuffer)
kprintf(" bounce pa 0x%x",
printf(" bounce pa 0x%x",
PREP_DMA_MEM(sc->sc_dmabuffer));
}
#endif
sc->sc_sbicp = (sbic_regmap_p) ((int)rp + 0x91);
sc->sc_clkfreq = sbic_clock_override ? sbic_clock_override : 77;
kprintf(": dmamask 0x%lx\n", ~sc->sc_dmamask);
printf(": dmamask 0x%lx\n", ~sc->sc_dmamask);
sc->sc_link.channel = SCSI_CHANNEL_ONLY_ONE;
sc->sc_link.adapter_softc = sc;
@ -210,7 +210,7 @@ atzsc_dmago(dev, addr, count, flags)
dev->sc_dmacmd |= CNTR_DDIR;
#ifdef DEBUG
if (atzsc_dmadebug & DDB_IO)
kprintf("atzsc_dmago: cmd %x\n", dev->sc_dmacmd);
printf("atzsc_dmago: cmd %x\n", dev->sc_dmacmd);
#endif
dev->sc_flags |= SBICF_INTR;
@ -232,7 +232,7 @@ atzsc_dmastop(dev)
#ifdef DEBUG
if (atzsc_dmadebug & DDB_FOLLOW)
kprintf("atzsc_dmastop()\n");
printf("atzsc_dmastop()\n");
#endif
if (dev->sc_dmacmd) {
s = splbio();
@ -271,7 +271,7 @@ atzsc_dmaintr(arg)
#ifdef DEBUG
if (atzsc_dmadebug & DDB_FOLLOW)
kprintf("%s: dmaintr 0x%x\n", dev->sc_dev.dv_xname, stat);
printf("%s: dmaintr 0x%x\n", dev->sc_dev.dv_xname, stat);
#endif
/*
@ -307,7 +307,7 @@ atzsc_dmanext(dev)
if (dev->sc_cur > dev->sc_last) {
/* shouldn't happen !! */
kprintf("atzsc_dmanext at end !!!\n");
printf("atzsc_dmanext at end !!!\n");
atzsc_dmastop(dev);
return(0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: bzsc.c,v 1.12 1996/10/10 23:55:31 christos Exp $ */
/* $NetBSD: bzsc.c,v 1.13 1996/10/13 03:06:50 christos Exp $ */
/*
* Copyright (c) 1995 Daniel Widenfalk
@ -184,7 +184,7 @@ bzscattach(pdp, dp, auxp)
sc->sc_softc.sc_link.device = &bzsc_scsidev;
sc->sc_softc.sc_link.openings = 1;
kprintf("\n");
printf("\n");
sc->sc_softc.sc_isr.isr_intr = bzsc_intr;
sc->sc_softc.sc_isr.isr_arg = &sc->sc_softc;

View File

@ -1,4 +1,4 @@
/* $NetBSD: clock.c,v 1.20 1996/10/11 21:32:56 mhitch Exp $ */
/* $NetBSD: clock.c,v 1.21 1996/10/13 03:06:51 christos Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -142,7 +142,7 @@ clockattach(pdp, dp, auxp)
clockchip = "CIA B";
}
kprintf(": %s system hz %d hardware hz %d\n", clockchip, hz,
printf(": %s system hz %d hardware hz %d\n", clockchip, hz,
#ifdef DRACO
dracorev >= 4 ? eclockfreq / 7 : eclockfreq);
#else
@ -209,7 +209,7 @@ void calibrate_delay()
extern u_int32_t delaydivisor;
/* XXX this should be defined elsewhere */
kprintf("Calibrating delay loop... ");
printf("Calibrating delay loop... ");
do {
t1 = clkread();
@ -219,7 +219,7 @@ void calibrate_delay()
t2 -= t1;
delaydivisor = (delaydivisor * t2 + 1023) >> 10;
#ifdef DIAGNOSTIC
kprintf("\ndiff %ld us, new divisor %u ns\n", t2, delaydivisor);
printf("\ndiff %ld us, new divisor %u ns\n", t2, delaydivisor);
do {
t1 = clkread();
delay(1024);
@ -227,7 +227,7 @@ void calibrate_delay()
} while (t2 <= t1);
t2 -= t1;
delaydivisor = (delaydivisor * t2 + 1023) >> 10;
kprintf("diff %ld us, new divisor %u ns\n", t2, delaydivisor);
printf("diff %ld us, new divisor %u ns\n", t2, delaydivisor);
#endif
do {
t1 = clkread();
@ -237,9 +237,9 @@ void calibrate_delay()
t2 -= t1;
delaydivisor = (delaydivisor * t2 + 1023) >> 10;
#ifdef DIAGNOSTIC
kprintf("diff %ld us, new divisor ", t2);
printf("diff %ld us, new divisor ", t2);
#endif
kprintf("%u ns\n", delaydivisor);
printf("%u ns\n", delaydivisor);
}
void
@ -656,12 +656,12 @@ inittodr(base)
u_long timbuf = base; /* assume no battery clock exists */
if (gettod == NULL && rtcinit() == 0)
kprintf("WARNING: no battery clock\n");
printf("WARNING: no battery clock\n");
else
timbuf = gettod();
if (timbuf < base) {
kprintf("WARNING: bad date in battery clock\n");
printf("WARNING: bad date in battery clock\n");
timbuf = base;
}
@ -673,7 +673,7 @@ void
resettodr()
{
if (settod && settod(time.tv_sec) == 0)
kprintf("Cannot set battery backed clock\n");
printf("Cannot set battery backed clock\n");
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: drsc.c,v 1.5 1996/10/10 23:55:33 christos Exp $ */
/* $NetBSD: drsc.c,v 1.6 1996/10/13 03:06:52 christos Exp $ */
/*
* Copyright (c) 1996 Ignatios Souvatzis
@ -111,7 +111,7 @@ drscattach(pdp, dp, auxp)
struct zbus_args *zap;
siop_regmap_p rp;
kprintf("\n");
printf("\n");
zap = auxp;
@ -197,7 +197,7 @@ drsc_handler()
*draco_intpen &= ~DRIRQ_SCSI;
#ifdef DEBUG
if (*draco_intpen & DRIRQ_SCSI)
kprintf("%s: intpen still 0x%x\n", sc->sc_dev.dv_xname,
printf("%s: intpen still 0x%x\n", sc->sc_dev.dv_xname,
*draco_intpen);
#endif
add_sicallback((sifunc_t)siopintr, sc, NULL);

View File

@ -1,4 +1,4 @@
/* $NetBSD: empsc.c,v 1.10 1996/10/10 23:55:34 christos Exp $ */
/* $NetBSD: empsc.c,v 1.11 1996/10/13 03:06:54 christos Exp $ */
/*
@ -111,7 +111,7 @@ empscattach(pdp, dp, auxp)
struct sci_softc *sc;
struct zbus_args *zap;
kprintf("\n");
printf("\n");
zap = auxp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: fd.c,v 1.34 1996/10/10 23:55:36 christos Exp $ */
/* $NetBSD: fd.c,v 1.35 1996/10/13 03:06:55 christos Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -317,7 +317,7 @@ fdcmatch(pdp, match, auxp)
if (matchname("fdc", auxp) == 0 || cfp->cf_unit != 0)
return(0);
if ((fdc_dmap = alloc_chipmem(DMABUFSZ)) == NULL) {
kprintf("fdc: unable to allocate dma buffer\n");
printf("fdc: unable to allocate dma buffer\n");
return(0);
}
return(1);
@ -330,8 +330,8 @@ fdcattach(pdp, dp, auxp)
{
struct fdcargs args;
kprintf(": dmabuf pa 0x%x", kvtop(fdc_dmap));
kprintf(": dmabuf ka %p\n", fdc_dmap);
printf(": dmabuf pa 0x%x", kvtop(fdc_dmap));
printf(": dmabuf ka %p\n", fdc_dmap);
args.unit = 0;
args.type = fdcgetfdtype(args.unit);
@ -353,7 +353,7 @@ fdcprint(auxp, pnp)
fcp = auxp;
if (pnp)
kprintf("fd%d at %s unit %d:", fcp->unit, pnp,
printf("fd%d at %s unit %d:", fcp->unit, pnp,
fcp->type->driveid);
return(UNCONF);
}
@ -396,7 +396,7 @@ fdattach(pdp, dp, auxp)
sc->retries = FDRETRIES;
sc->stepdelay = FDSTEPDELAY;
sc->bytespersec = 512;
kprintf(" unit %d: %s %d cyl, %d head, %d sec [%d sec], 512 bytes/sec\n",
printf(" unit %d: %s %d cyl, %d head, %d sec [%d sec], 512 bytes/sec\n",
sc->hwunit, sc->type->desc, sc->type->ncylinders, FDNHEADS,
sc->type->amiga_nsectors, sc->type->msdos_nsectors);
@ -494,7 +494,7 @@ fdopen(dev, flags, devtype, p)
if ((error = fdgetdisklabel(sc, dev)) != 0)
goto done;
#ifdef FDDEBUG
kprintf(" open successful\n");
printf(" open successful\n");
#endif
done:
/*
@ -524,7 +524,7 @@ fdclose(dev, flags, devtype, p)
int s;
#ifdef FDDEBUG
kprintf("fdclose()\n");
printf("fdclose()\n");
#endif
sc = getsoftc(fd_cd, FDUNIT(dev));
s = splbio();
@ -668,7 +668,7 @@ fdstrategy(bp)
sc = getsoftc(fd_cd, unit);
#ifdef FDDEBUG
kprintf("fdstrategy: 0x%x\n", bp);
printf("fdstrategy: 0x%x\n", bp);
#endif
/*
* check for valid partition and bounds
@ -757,7 +757,7 @@ fdgetdisklabel(sc, dev)
sc->dkdev.dk_label->d_npartitions == (FDPART(dev) + 1))
return(0);
#ifdef FDDEBUG
kprintf("fdgetdisklabel()\n");
printf("fdgetdisklabel()\n");
#endif
part = FDPART(dev);
lp = sc->dkdev.dk_label;
@ -849,7 +849,7 @@ fdsetdisklabel(sc, lp)
* partition
*/
#ifdef FDDEBUG
kprintf("fdsetdisklabel\n");
printf("fdsetdisklabel\n");
#endif
if (lp->d_secsize != FDSECSIZE ||
lp->d_nsectors != clp->d_nsectors ||
@ -904,7 +904,7 @@ fdputdisklabel(sc, dev)
if ((sc->flags & FDF_HAVELABEL) == 0)
return(EBADF);
#ifdef FDDEBUG
kprintf("fdputdisklabel\n");
printf("fdputdisklabel\n");
#endif
/*
* get buf and read in sector 0
@ -971,7 +971,7 @@ fdcgetfdtype(unit)
delay(1);
}
#ifdef FDDEBUG
kprintf("fdcgettype unit %d id 0x%lx\n", unit, id);
printf("fdcgettype unit %d id 0x%lx\n", unit, id);
#endif
for (cnt = 0, ftp = fdtype; cnt < nfdtype; ftp++, cnt++)
@ -1000,7 +1000,7 @@ fdmotoroff(arg)
s = splbio();
#ifdef FDDEBUG
kprintf("fdmotoroff: unit %d\n", sc->hwunit);
printf("fdmotoroff: unit %d\n", sc->hwunit);
#endif
if ((sc->flags & FDF_MOTORON) == 0)
goto done;
@ -1013,7 +1013,7 @@ fdmotoroff(arg)
goto done;
}
#ifdef FDDEBUG
kprintf(" motor was on, turning off\n");
printf(" motor was on, turning off\n");
#endif
/*
@ -1022,7 +1022,7 @@ fdmotoroff(arg)
if (sc->flags & FDF_DIRTY) {
sc->flags |= FDF_JUSTFLUSH | FDF_MOTOROFF;
#ifdef FDDEBUG
kprintf(" flushing dirty buffer first\n");
printf(" flushing dirty buffer first\n");
#endif
/*
* if dma'ing done for now, fddone() will call us again
@ -1046,7 +1046,7 @@ fdmotoroff(arg)
}
#ifdef FDDEBUG
kprintf(" hw turning unit off\n");
printf(" hw turning unit off\n");
#endif
sc->flags &= ~(FDF_MOTORON | FDF_MOTOROFF);
@ -1099,7 +1099,7 @@ fdsetpos(sc, trk, towrite)
sc->flags |= FDF_WRITEWAIT;
#ifdef FDDEBUG
kprintf("fdsetpos: cyl %d head %d towrite %d\n", trk / FDNHEADS,
printf("fdsetpos: cyl %d head %d towrite %d\n", trk / FDNHEADS,
trk % FDNHEADS, towrite);
#endif
nstep = ncyl - sc->curcyl;
@ -1185,7 +1185,7 @@ fdstart(sc)
int changed;
#ifdef FDDEBUG
kprintf("fdstart: unit %d\n", sc->hwunit);
printf("fdstart: unit %d\n", sc->hwunit);
#endif
/*
@ -1200,7 +1200,7 @@ fdstart(sc)
dp = &sc->bufq;
if ((bp = dp->b_actf) == NULL) {
#ifdef FDDEBUG
kprintf(" nothing to do\n");
printf(" nothing to do\n");
#endif
return;
}
@ -1223,9 +1223,9 @@ fdstart(sc)
* this unit until re-open()'ed also invalidate
* all current io
*/
kprintf("fdstart: disk changed\n");
printf("fdstart: disk changed\n");
#ifdef FDDEBUG
kprintf(" disk was removed invalidating all io\n");
printf(" disk was removed invalidating all io\n");
#endif
sc->flags &= ~FDF_HAVELABEL;
for (;;) {
@ -1361,7 +1361,7 @@ fddmastart(sc, trk)
int adkmask, ndmaw, write, dmatrk;
#ifdef FDDEBUG
kprintf("fddmastart: unit %d cyl %d head %d", sc->hwunit,
printf("fddmastart: unit %d cyl %d head %d", sc->hwunit,
trk / FDNHEADS, trk % FDNHEADS);
#endif
/*
@ -1379,7 +1379,7 @@ fddmastart(sc, trk)
}
#ifdef FDDEBUG
kprintf(" %s", write ? " flushing cache\n" : " loading cache\n");
printf(" %s", write ? " flushing cache\n" : " loading cache\n");
#endif
sc->cachetrk = trk;
fdc_indma = sc;
@ -1419,7 +1419,7 @@ fddmastart(sc, trk)
}
#ifdef FDDEBUG
kprintf(" dma started\n");
printf(" dma started\n");
#endif
}
@ -1468,7 +1468,7 @@ fddmadone(sc, timeo)
int timeo;
{
#ifdef FDDEBUG
kprintf("fddmadone: unit %d, timeo %d\n", sc->hwunit, timeo);
printf("fddmadone: unit %d, timeo %d\n", sc->hwunit, timeo);
#endif
fdc_indma = NULL;
untimeout(fdmotoroff, sc);
@ -1495,7 +1495,7 @@ fddmadone(sc, timeo)
*/
sc->flags &= ~FDF_DIRTY;
if (timeo)
kprintf("%s: write of track cache timed out.\n",
printf("%s: write of track cache timed out.\n",
sc->sc_dv.dv_xname);
if (sc->flags & FDF_JUSTFLUSH) {
sc->flags &= ~FDF_JUSTFLUSH;
@ -1524,7 +1524,7 @@ fddmadone(sc, timeo)
else {
#ifdef FDDEBUG
if (timeo)
kprintf("%s: fddmadone: cache load timed out.\n",
printf("%s: fddmadone: cache load timed out.\n",
sc->sc_dv.dv_xname);
#endif
if (sc->retried >= sc->retries) {
@ -1552,7 +1552,7 @@ fddone(sc)
int sz;
#ifdef FDDEBUG
kprintf("fddone: unit %d\n", sc->hwunit);
printf("fddone: unit %d\n", sc->hwunit);
#endif
/*
* check to see if unit is just flushing the cache,
@ -1694,11 +1694,11 @@ fdminphys(bp)
toff = sec * FDSECSIZE;
tsz = sc->nsectors * FDSECSIZE;
#ifdef FDDEBUG
kprintf("fdminphys: before %d", bp->b_bcount);
printf("fdminphys: before %d", bp->b_bcount);
#endif
bp->b_bcount = min(bp->b_bcount, tsz - toff);
#ifdef FDDEBUG
kprintf(" after %d\n", bp->b_bcount);
printf(" after %d\n", bp->b_bcount);
#endif
minphys(bp);
}
@ -1825,7 +1825,7 @@ amrawtocache(sc)
again:
if (doagain == 0 || (rp = srp = fdfindsync(srp, erp)) == NULL) {
#ifdef DIAGNOSTIC
kprintf("%s: corrupted track (%d) data.\n",
printf("%s: corrupted track (%d) data.\n",
sc->sc_dv.dv_xname, sc->cachetrk);
#endif
return(-1);
@ -1841,20 +1841,20 @@ again:
rp = mfmblkdecode(rp, &cktmp, NULL, 1);
if (cktmp != hcksum) {
#ifdef FDDEBUG
kprintf(" info 0x%x hchksum 0x%x trkhcksum 0x%x\n",
printf(" info 0x%x hchksum 0x%x trkhcksum 0x%x\n",
info, hcksum, cktmp);
#endif
goto again;
}
if (((info >> 16) & 0xff) != sc->cachetrk) {
#ifdef DEBUG
kprintf("%s: incorrect track found: 0x%lx %d\n",
printf("%s: incorrect track found: 0x%lx %d\n",
sc->sc_dv.dv_xname, info, sc->cachetrk);
#endif
goto again;
}
#ifdef FDDEBUG
kprintf(" info 0x%x\n", info);
printf(" info 0x%x\n", info);
#endif
rp = mfmblkdecode(rp, &cktmp, NULL, 1);
@ -1863,7 +1863,7 @@ again:
crp = mfmblkdecode(rp, dp, &dcksum, FDSECLWORDS);
if (cktmp != dcksum) {
#ifdef FDDEBUG
kprintf(" info 0x%x dchksum 0x%x trkdcksum 0x%x\n",
printf(" info 0x%x dchksum 0x%x trkdcksum 0x%x\n",
info, dcksum, cktmp);
#endif
goto again;
@ -1990,7 +1990,7 @@ msrawtocache(sc)
*/
if ((rp = (u_short *)fdfindsync((u_long *)rp, (u_long *)erp)) == NULL) {
#ifdef DIAGNOSTIC
kprintf("%s: corrupted track (%d) data.\n",
printf("%s: corrupted track (%d) data.\n",
sc->sc_dv.dv_xname, sc->cachetrk);
#endif
return(-1);
@ -2003,7 +2003,7 @@ msrawtocache(sc)
continue;
rp = msblkdecode(rp, tb, 4);
#ifdef FDDEBUG
kprintf("sector id: sector %d, track %d, side %d,"
printf("sector id: sector %d, track %d, side %d,"
"bps %d\n", tb[2], tb[0], tb[1], 128 << tb[3]);
#endif
if ((tb[0] * FDNHEADS + tb[1]) != sc->cachetrk ||

View File

@ -1,4 +1,4 @@
/* $NetBSD: flsc.c,v 1.11 1996/10/10 23:55:38 christos Exp $ */
/* $NetBSD: flsc.c,v 1.12 1996/10/13 03:06:57 christos Exp $ */
/*
* Copyright (c) 1995 Daniel Widenfalk
@ -187,7 +187,7 @@ flscattach(pdp, dp, auxp)
/* We don't want interrupt until we're initialized! */
*rp->hardbits = sc->sc_specific.portbits;
kprintf("\n");
printf("\n");
/* attach all scsi units on us */
config_found(dp, &sc->sc_softc.sc_link, scsiprint);

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf.c,v 1.30 1996/10/11 21:12:50 mhitch Exp $ */
/* $NetBSD: grf.c,v 1.31 1996/10/13 03:06:58 christos Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -157,12 +157,12 @@ grfattach(pdp, dp, auxp)
gp->g_grfdev = makedev(maj, gp->g_unit);
if (dp != NULL) {
kprintf(": width %d height %d", gp->g_display.gd_dwidth,
printf(": width %d height %d", gp->g_display.gd_dwidth,
gp->g_display.gd_dheight);
if (gp->g_display.gd_colors == 2)
kprintf(" monochrome\n");
printf(" monochrome\n");
else
kprintf(" colors %d\n", gp->g_display.gd_colors);
printf(" colors %d\n", gp->g_display.gd_colors);
}
/*
@ -177,7 +177,7 @@ grfprint(auxp, pnp)
const char *pnp;
{
if (pnp)
kprintf("ite at %s", pnp);
printf("ite at %s", pnp);
return(UNCONF);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_cc.c,v 1.21 1996/10/10 23:55:41 christos Exp $ */
/* $NetBSD: grf_cc.c,v 1.22 1996/10/13 03:06:59 christos Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -147,7 +147,7 @@ grfccattach(pdp, dp, auxp)
grf_cc_on(gp);
}
if (dp != NULL)
kprintf("\n");
printf("\n");
/*
* attach grf
*/
@ -160,7 +160,7 @@ grfccprint(auxp, pnp)
const char *pnp;
{
if (pnp)
kprintf("grf%d at %s", ((struct grf_softc *)auxp)->g_unit,
printf("grf%d at %s", ((struct grf_softc *)auxp)->g_unit,
pnp);
return(UNCONF);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_cl.c,v 1.15 1996/10/10 23:55:42 christos Exp $ */
/* $NetBSD: grf_cl.c,v 1.16 1996/10/13 03:07:01 christos Exp $ */
/*
* Copyright (c) 1995 Ezra Story
@ -281,7 +281,7 @@ grfclattach(pdp, dp, auxp)
zap = auxp;
kprintf("\n");
printf("\n");
/* make sure both halves have matched */
if (!cl_regaddr || !cl_fbaddr)
@ -322,36 +322,36 @@ grfclattach(pdp, dp, auxp)
*/
if (amiga_config_found(cfdata, &gp->g_device, gp, grfclprint)) {
attachflag = 1;
kprintf("grfcl: %dMB ", cl_fbsize / 0x100000);
printf("grfcl: %dMB ", cl_fbsize / 0x100000);
switch (cltype) {
case PICASSO:
kprintf("Picasso II");
printf("Picasso II");
cl_maxpixelclock = 86000000;
break;
case SPECTRUM:
kprintf("Spectrum");
printf("Spectrum");
cl_maxpixelclock = 90000000;
break;
case PICCOLO:
if (cl_sd64 == 1) {
kprintf("Piccolo SD64");
printf("Piccolo SD64");
/* 110MHz will be supported if we
* have a palette doubling mode.
*/
cl_maxpixelclock = 90000000;
} else {
kprintf("Piccolo");
printf("Piccolo");
cl_maxpixelclock = 90000000;
}
break;
}
kprintf(" being used\n");
printf(" being used\n");
#ifdef CL_OVERCLOCK
cl_maxpixelclock = 115000000;
#endif
} else {
if (!attachflag)
kprintf("grfcl unattached!!\n");
printf("grfcl unattached!!\n");
}
}
@ -361,7 +361,7 @@ grfclprint(auxp, pnp)
const char *pnp;
{
if (pnp)
kprintf("ite at %s: ", pnp);
printf("ite at %s: ", pnp);
return (UNCONF);
}
@ -1154,7 +1154,7 @@ denom = 0x00 - 0x1f (1) 0x20 - 0x3e (even)
*num = minn;
*denom = (mind << 1) | minp;
if (minerr > 500000)
kprintf("Warning: CompFQ minimum error = %ld\n", minerr);
printf("Warning: CompFQ minimum error = %ld\n", minerr);
return;
}
@ -1212,7 +1212,7 @@ cl_load_mon(gp, md)
TEXT = (gv->depth == 4);
if (!cl_mondefok(gv)) {
kprintf("mondef not ok\n");
printf("mondef not ok\n");
return (0);
}
ba = gp->g_regkva;

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_cv.c,v 1.17 1996/10/10 23:55:44 christos Exp $ */
/* $NetBSD: grf_cv.c,v 1.18 1996/10/13 03:07:03 christos Exp $ */
/*
* Copyright (c) 1995 Michael Teske
@ -353,7 +353,7 @@ grfcvattach(pdp, dp, auxp)
* inited earlier, just copy (not device struct)
*/
kprintf("\n");
printf("\n");
#ifdef CV64CONSOLE
bcopy(&congrf.g_display, &gp->g_display,
(char *) &gp[1] - (char *) &gp->g_display);
@ -389,11 +389,11 @@ grfcvattach(pdp, dp, auxp)
*/
if (amiga_config_found(cfdata, &gp->g_device, gp, grfcvprint)) {
if (dp != NULL)
kprintf("grfcv: CyberVision64 with %dMB being used\n", cv_fbsize/0x100000);
printf("grfcv: CyberVision64 with %dMB being used\n", cv_fbsize/0x100000);
attachflag = 1;
} else {
if (!attachflag)
/*kprintf("grfcv unattached!!\n")*/;
/*printf("grfcv unattached!!\n")*/;
}
}
@ -403,7 +403,7 @@ grfcvprint(auxp, pnp)
const char *pnp;
{
if (pnp)
kprintf("ite at %s: ", pnp);
printf("ite at %s: ", pnp);
return (UNCONF);
}
@ -429,9 +429,9 @@ cv_compute_clock(freq)
long diff, d2;
if (freq < 12500000 || freq > MAXPIXELCLOCK) {
kprintf("grfcv: Illegal clock frequency: %ldMHz\n", freq/1000000);
kprintf("grfcv: Using default frequency: 25MHz\n");
kprintf("grfcv: See the manpage of grfconfig for more informations.\n");
printf("grfcv: Illegal clock frequency: %ldMHz\n", freq/1000000);
printf("grfcv: Using default frequency: 25MHz\n");
printf("grfcv: See the manpage of grfconfig for more informations.\n");
freq = 25000000;
}
@ -934,7 +934,7 @@ cv_setmonitor(gp, gv)
*/
if (gp->g_flags & GF_GRFON)
if (md == monitor_current) {
kprintf("grf_cv: Changing the used mode not allowed!\n");
printf("grf_cv: Changing the used mode not allowed!\n");
return (EINVAL);
}
@ -1079,23 +1079,23 @@ cv_mondefok(gv)
#endif
break;
default:
kprintf("grf_cv: Illegal depth in mode %d\n",
printf("grf_cv: Illegal depth in mode %d\n",
(int) gv->mode_num);
return (0);
}
if (gv->pixel_clock > maxpix) {
kprintf("grf_cv: Pixelclock too high in mode %d\n",
printf("grf_cv: Pixelclock too high in mode %d\n",
(int) gv->mode_num);
return (0);
}
if (gv->mode_num == 255) { /* console mode */
if ((gv->disp_width / 8) > MAXCOLS) {
kprintf ("grfcv: Too many columns for console\n");
printf ("grfcv: Too many columns for console\n");
return (0);
} else if ((gv->disp_height / S3FONTY) > MAXROWS) {
kprintf ("grfcv: Too many rows for console\n");
printf ("grfcv: Too many rows for console\n");
return (0);
}
}
@ -1128,8 +1128,8 @@ cv_load_mon(gp, md)
CONSOLE = (gv->mode_num == 255);
if (!cv_mondefok(gv)) {
kprintf("grfcv: The monitor definition is illegal.\n");
kprintf("grfcv: See the manpage of grfconfig for more informations\n");
printf("grfcv: The monitor definition is illegal.\n");
printf("grfcv: See the manpage of grfconfig for more informations\n");
return (0);
}
ba = gp->g_regkva;

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_et.c,v 1.6 1996/10/10 23:55:47 christos Exp $ */
/* $NetBSD: grf_et.c,v 1.7 1996/10/13 03:07:04 christos Exp $ */
/*
* Copyright (c) 1996 Tobias Abt
@ -278,7 +278,7 @@ grfetattach(pdp, dp, auxp)
zap = auxp;
kprintf("\n");
printf("\n");
/* make sure both halves have matched */
if (!et_regaddr || !et_fbaddr)
@ -319,46 +319,46 @@ grfetattach(pdp, dp, auxp)
*/
if (amiga_config_found(cfdata, &gp->g_device, gp, grfetprint)) {
attachflag = 1;
kprintf("grfet: %dMB ", et_fbsize / 0x100000);
printf("grfet: %dMB ", et_fbsize / 0x100000);
switch (ettype) {
case OMNIBUS:
kprintf("oMniBus");
printf("oMniBus");
break;
case DOMINO:
kprintf("Domino");
printf("Domino");
break;
case MERLIN:
kprintf("Merlin");
printf("Merlin");
break;
}
kprintf(" with ");
printf(" with ");
switch (etctype) {
case ET4000:
kprintf("Tseng ET4000");
printf("Tseng ET4000");
break;
case ETW32:
kprintf("Tseng ETW32");
printf("Tseng ETW32");
break;
}
kprintf(" and ");
printf(" and ");
switch (etdtype) {
case SIERRA11483:
kprintf("Sierra SC11483 DAC");
printf("Sierra SC11483 DAC");
break;
case SIERRA15025:
kprintf("Sierra SC15025 DAC");
printf("Sierra SC15025 DAC");
break;
case MUSICDAC:
kprintf("MUSIC DAC");
printf("MUSIC DAC");
break;
case MERLINDAC:
kprintf("BrookTree DAC");
printf("BrookTree DAC");
break;
}
kprintf(" being used\n");
printf(" being used\n");
} else {
if (!attachflag)
kprintf("grfet unattached!!\n");
printf("grfet unattached!!\n");
}
}
@ -369,7 +369,7 @@ grfetprint(auxp, pnp)
const char *pnp;
{
if (pnp)
kprintf("ite at %s: ", pnp);
printf("ite at %s: ", pnp);
return (UNCONF);
}
@ -1055,7 +1055,7 @@ et_load_mon(gp, md)
TEXT = (gv->depth == 4);
if (!et_mondefok(gv)) {
kprintf("mondef not ok\n");
printf("mondef not ok\n");
return (0);
}
ba = gp->g_regkva;

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_rh.c,v 1.23 1996/10/10 23:55:49 christos Exp $ */
/* $NetBSD: grf_rh.c,v 1.24 1996/10/13 03:07:05 christos Exp $ */
/*
* Copyright (c) 1994 Markus Wild
@ -1609,7 +1609,7 @@ grfrhattach(pdp, dp, auxp)
(void)rh_load_mon(gp, current_mon);
}
if (dp != NULL)
kprintf("\n");
printf("\n");
/*
* attach grf
*/
@ -1622,7 +1622,7 @@ grfrhprint(auxp, pnp)
const char *pnp;
{
if (pnp)
kprintf("ite at %s", pnp);
printf("ite at %s", pnp);
return(UNCONF);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_rt.c,v 1.32 1996/10/10 23:55:51 christos Exp $ */
/* $NetBSD: grf_rt.c,v 1.33 1996/10/13 03:07:06 christos Exp $ */
/*
* Copyright (c) 1993 Markus Wild
@ -881,7 +881,7 @@ grfrtattach(pdp, dp, auxp)
(void)rt_load_mon(gp, current_mon);
}
if (dp != NULL)
kprintf("\n");
printf("\n");
/*
* attach grf
*/
@ -894,7 +894,7 @@ grfrtprint(auxp, pnp)
const char *pnp;
{
if (pnp)
kprintf("grf%d at %s", ((struct grf_softc *)auxp)->g_unit,
printf("grf%d at %s", ((struct grf_softc *)auxp)->g_unit,
pnp);
return(UNCONF);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_ul.c,v 1.21 1996/10/10 23:55:53 christos Exp $ */
/* $NetBSD: grf_ul.c,v 1.22 1996/10/13 03:07:07 christos Exp $ */
#define UL_DEBUG
/*
@ -273,10 +273,10 @@ ul_load_code(gp)
ba->ctrl = LBL | INCW | NMI | NMIM | HLT | CF;
kprintf("\ndownloading TMS code");
printf("\ndownloading TMS code");
i=0;
while ((j = tmscode[i++])) {
kprintf(".");
printf(".");
ba->hstadrh = tmscode[i++];
ba->hstadrl = tmscode[i++];
while (j-- > 0) {
@ -561,7 +561,7 @@ grfulattach(pdp, dp, auxp)
grful_iteinit(gp);
}
if (dp != NULL)
kprintf("\n");
printf("\n");
/*
* attach grf
*/
@ -574,7 +574,7 @@ grfulprint(auxp, pnp)
const char *pnp;
{
if (pnp)
kprintf("grf%d at %s", ((struct grf_softc *)auxp)->g_unit,
printf("grf%d at %s", ((struct grf_softc *)auxp)->g_unit,
pnp);
return(UNCONF);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: grfabs_cc.c,v 1.14 1996/10/10 23:55:55 christos Exp $ */
/* $NetBSD: grfabs_cc.c,v 1.15 1996/10/13 03:07:09 christos Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -1896,7 +1896,7 @@ display_aga_view(v)
#ifdef DEBUG
if (aga_enable & AGA_TRACE)
kprintf("display_aga_view(%dx%dx%d) %p\n", w, h,
printf("display_aga_view(%dx%dx%d) %p\n", w, h,
depth, v);
#endif
/* round down to nearest even width */
@ -1924,9 +1924,9 @@ display_aga_view(v)
#ifdef DEBUG
if (aga_enable & AGA_TRACE2) {
kprintf (" ddfwidth %04x x %04x y %04x", ddfwidth,
printf (" ddfwidth %04x x %04x y %04x", ddfwidth,
x, y);
kprintf (" hstart %04x hstop %04x vstart %04x vstop %04x ddfstart %04x\n",
printf (" hstart %04x hstop %04x vstart %04x vstop %04x ddfstart %04x\n",
hstart, hstop, vstart, vstop, ddfstart);
}
#endif
@ -1951,9 +1951,9 @@ display_aga_view(v)
ddfstart &= 0xfffc;
#ifdef DEBUG
if (aga_enable & AGA_TRACE2) {
kprintf (" ddfwidth %04x x %04x y %04x", ddfwidth,
printf (" ddfwidth %04x x %04x y %04x", ddfwidth,
x, y);
kprintf (" hstart %04x hstop %04x vstart %04x vstop %04x ddfstart %04x\n",
printf (" hstart %04x hstop %04x vstart %04x vstop %04x ddfstart %04x\n",
hstart, hstop, vstart, vstop, ddfstart);
}
#endif
@ -2011,57 +2011,57 @@ display_aga_view(v)
tmp->cp.inst.operand = aga_this_data->beamcon0;
#ifdef DEBUG
if (aga_enable & AGA_TRACE2)
kprintf(" beamcon0 %04x", tmp->cp.inst.operand);
printf(" beamcon0 %04x", tmp->cp.inst.operand);
#endif
tmp = find_copper_inst(cp, CI_MOVE(R_DIWHIGH));
tmp->cp.inst.operand = CALC_DIWHIGH(hstart, vstart, hstop, vstop);
#ifdef DEBUG
if (aga_enable & AGA_TRACE2)
kprintf(" diwhigh %04x>", tmp->cp.inst.operand);
printf(" diwhigh %04x>", tmp->cp.inst.operand);
#endif
#if 0
tmp->cp.inst.operand = (vstop & 0x0700) | ((hstop & 0x0100) << 5);
#endif
#ifdef DEBUG
if (aga_enable & AGA_TRACE2)
kprintf("%04x", tmp->cp.inst.operand);
printf("%04x", tmp->cp.inst.operand);
#endif
tmp = find_copper_inst(cp, CI_MOVE(R_BPLCON0));
tmp->cp.inst.operand = aga_this_data->bplcon0 |
((depth & 0x7) << 12) | ((depth & 0x8) << 1);
#ifdef DEBUG
if (aga_enable & AGA_TRACE2)
kprintf(" bplcon0 %04x", tmp->cp.inst.operand);
printf(" bplcon0 %04x", tmp->cp.inst.operand);
#endif
tmp = find_copper_inst(cp, CI_MOVE(R_BPLCON1));
tmp->cp.inst.operand = con1;
#ifdef DEBUG
if (aga_enable & AGA_TRACE2)
kprintf(" bplcon1 %04x>0000\n", con1);
printf(" bplcon1 %04x>0000\n", con1);
#endif
tmp = find_copper_inst(cp, CI_MOVE(R_DIWSTART));
tmp->cp.inst.operand = ((vstart & 0xff) << 8) | (hstart & 0xff);
#ifdef DEBUG
if (aga_enable & AGA_TRACE2)
kprintf(" diwstart %04x", tmp->cp.inst.operand);
printf(" diwstart %04x", tmp->cp.inst.operand);
#endif
tmp = find_copper_inst(cp, CI_MOVE(R_DIWSTOP));
tmp->cp.inst.operand = ((vstop & 0xff) << 8) | (hstop & 0xff);
#ifdef DEBUG
if (aga_enable & AGA_TRACE2)
kprintf(" diwstop %04x", tmp->cp.inst.operand);
printf(" diwstop %04x", tmp->cp.inst.operand);
#endif
tmp = find_copper_inst(cp, CI_MOVE(R_DDFSTART));
tmp->cp.inst.operand = ddfstart;
#ifdef DEBUG
if (aga_enable & AGA_TRACE2)
kprintf(" ddfstart %04x", tmp->cp.inst.operand);
printf(" ddfstart %04x", tmp->cp.inst.operand);
#endif
tmp = find_copper_inst(cp, CI_MOVE(R_DDFSTOP));
tmp->cp.inst.operand = ddfstart + ddfwidth;
#ifdef DEBUG
if (aga_enable & AGA_TRACE2)
kprintf(" ddfstop %04x", tmp->cp.inst.operand);
printf(" ddfstop %04x", tmp->cp.inst.operand);
#endif
tmp = find_copper_inst(cp, CI_MOVE(R_BPL0PTH));
@ -2071,7 +2071,7 @@ display_aga_view(v)
tmp[j + 1].cp.inst.operand = LOADDR(PREP_DMA_MEM(v->bitmap->plane[i]));
#ifdef DEBUG
if (aga_enable & AGA_TRACE2)
kprintf (" bpl%dpth %p", i, v->bitmap->plane[i]);
printf (" bpl%dpth %p", i, v->bitmap->plane[i]);
#endif
}
@ -2081,7 +2081,7 @@ display_aga_view(v)
tmp[1].cp.inst.operand = v->bitmap->row_mod;
#ifdef DEBUG
if (aga_enable & AGA_TRACE2)
kprintf(" bplxmod %04x\n", v->bitmap->row_mod);
printf(" bplxmod %04x\n", v->bitmap->row_mod);
#endif
/* set next pointers correctly */
@ -3027,7 +3027,7 @@ display_pal_aga_view(v)
#ifdef DEBUG
if (aga_enable & AGA_TRACE)
kprintf("display_aga_view(%dx%dx%d) %p\n", w, h,
printf("display_aga_view(%dx%dx%d) %p\n", w, h,
depth, v);
#endif
/* round down to nearest even width */
@ -3055,9 +3055,9 @@ display_pal_aga_view(v)
#ifdef DEBUG
if (aga_enable & AGA_TRACE2) {
kprintf (" ddfwidth %04x x %04x y %04x", ddfwidth,
printf (" ddfwidth %04x x %04x y %04x", ddfwidth,
x, y);
kprintf (" hstart %04x hstop %04x vstart %04x vstop %04x ddfstart %04x\n",
printf (" hstart %04x hstop %04x vstart %04x vstop %04x ddfstart %04x\n",
hstart, hstop, vstart, vstop, ddfstart);
}
#endif
@ -3082,9 +3082,9 @@ display_pal_aga_view(v)
ddfstart &= 0xfffc;
#ifdef DEBUG
if (aga_enable & AGA_TRACE2) {
kprintf (" ddfwidth %04x x %04x y %04x", ddfwidth,
printf (" ddfwidth %04x x %04x y %04x", ddfwidth,
x, y);
kprintf (" hstart %04x hstop %04x vstart %04x vstop %04x ddfstart %04x\n",
printf (" hstart %04x hstop %04x vstart %04x vstop %04x ddfstart %04x\n",
hstart, hstop, vstart, vstop, ddfstart);
}
#endif
@ -3142,57 +3142,57 @@ display_pal_aga_view(v)
tmp->cp.inst.operand = paga_this_data->beamcon0;
#ifdef DEBUG
if (aga_enable & AGA_TRACE2)
kprintf(" beamcon0 %04x", tmp->cp.inst.operand);
printf(" beamcon0 %04x", tmp->cp.inst.operand);
#endif
tmp = find_copper_inst(cp, CI_MOVE(R_DIWHIGH));
tmp->cp.inst.operand = CALC_DIWHIGH(hstart, vstart, hstop, vstop);
#ifdef DEBUG
if (aga_enable & AGA_TRACE2)
kprintf(" diwhigh %04x>", tmp->cp.inst.operand);
printf(" diwhigh %04x>", tmp->cp.inst.operand);
#endif
#if 0
tmp->cp.inst.operand = (vstop & 0x0700) | ((hstop & 0x0100) << 5);
#endif
#ifdef DEBUG
if (aga_enable & AGA_TRACE2)
kprintf("%04x", tmp->cp.inst.operand);
printf("%04x", tmp->cp.inst.operand);
#endif
tmp = find_copper_inst(cp, CI_MOVE(R_BPLCON0));
tmp->cp.inst.operand = paga_this_data->bplcon0 |
((depth & 0x7) << 12) | ((depth & 0x8) << 1);
#ifdef DEBUG
if (aga_enable & AGA_TRACE2)
kprintf(" bplcon0 %04x", tmp->cp.inst.operand);
printf(" bplcon0 %04x", tmp->cp.inst.operand);
#endif
tmp = find_copper_inst(cp, CI_MOVE(R_BPLCON1));
tmp->cp.inst.operand = con1;
#ifdef DEBUG
if (aga_enable & AGA_TRACE2)
kprintf(" bplcon1 %04x>0000\n", con1);
printf(" bplcon1 %04x>0000\n", con1);
#endif
tmp = find_copper_inst(cp, CI_MOVE(R_DIWSTART));
tmp->cp.inst.operand = ((vstart & 0xff) << 8) | (hstart & 0xff);
#ifdef DEBUG
if (aga_enable & AGA_TRACE2)
kprintf(" diwstart %04x", tmp->cp.inst.operand);
printf(" diwstart %04x", tmp->cp.inst.operand);
#endif
tmp = find_copper_inst(cp, CI_MOVE(R_DIWSTOP));
tmp->cp.inst.operand = ((vstop & 0xff) << 8) | (hstop & 0xff);
#ifdef DEBUG
if (aga_enable & AGA_TRACE2)
kprintf(" diwstop %04x", tmp->cp.inst.operand);
printf(" diwstop %04x", tmp->cp.inst.operand);
#endif
tmp = find_copper_inst(cp, CI_MOVE(R_DDFSTART));
tmp->cp.inst.operand = ddfstart;
#ifdef DEBUG
if (aga_enable & AGA_TRACE2)
kprintf(" ddfstart %04x", tmp->cp.inst.operand);
printf(" ddfstart %04x", tmp->cp.inst.operand);
#endif
tmp = find_copper_inst(cp, CI_MOVE(R_DDFSTOP));
tmp->cp.inst.operand = ddfstart + ddfwidth;
#ifdef DEBUG
if (aga_enable & AGA_TRACE2)
kprintf(" ddfstop %04x", tmp->cp.inst.operand);
printf(" ddfstop %04x", tmp->cp.inst.operand);
#endif
tmp = find_copper_inst(cp, CI_MOVE(R_BPL0PTH));
@ -3202,7 +3202,7 @@ display_pal_aga_view(v)
tmp[j + 1].cp.inst.operand = LOADDR(PREP_DMA_MEM(v->bitmap->plane[i]));
#ifdef DEBUG
if (aga_enable & AGA_TRACE2)
kprintf (" bpl%dpth %p", i, v->bitmap->plane[i]);
printf (" bpl%dpth %p", i, v->bitmap->plane[i]);
#endif
}
@ -3212,7 +3212,7 @@ display_pal_aga_view(v)
tmp[1].cp.inst.operand = v->bitmap->row_mod;
#ifdef DEBUG
if (aga_enable & AGA_TRACE2)
kprintf(" bplxmod %04x\n", v->bitmap->row_mod);
printf(" bplxmod %04x\n", v->bitmap->row_mod);
#endif
/* set next pointers correctly */

View File

@ -1,4 +1,4 @@
/* $NetBSD: gtsc.c,v 1.18 1996/10/10 23:55:58 christos Exp $ */
/* $NetBSD: gtsc.c,v 1.19 1996/10/13 03:07:11 christos Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -147,7 +147,7 @@ gtscattach(pdp, dp, auxp)
sc->sc_dmamask = ~0x01ffffff;
else
sc->sc_dmamask = ~0x07ffffff;
kprintf(": dmamask 0x%lx", ~sc->sc_dmamask);
printf(": dmamask 0x%lx", ~sc->sc_dmamask);
if ((gap->flags & GVP_NOBANK) == 0)
sc->gtsc_bankmask = (~sc->sc_dmamask >> 18) & 0x01c0;
@ -167,10 +167,10 @@ gtscattach(pdp, dp, auxp)
if (gtsc_dmabounce || kvtop(sc) & sc->sc_dmamask) {
sc->sc_dmabuffer = (char *) alloc_z2mem(MAXPHYS * 8); /* XXX */
if (isztwomem(sc->sc_dmabuffer))
kprintf(" bounce pa 0x%x", kvtop(sc->sc_dmabuffer));
printf(" bounce pa 0x%x", kvtop(sc->sc_dmabuffer));
else if (gtsc_maxdma == 0) {
gtsc_maxdma = 1024;
kprintf(" bounce pa 0x%x",
printf(" bounce pa 0x%x",
PREP_DMA_MEM(sc->sc_dmabuffer));
}
}
@ -178,13 +178,13 @@ gtscattach(pdp, dp, auxp)
if (gtsc_maxdma == 0)
gtsc_maxdma = MAXPHYS;
kprintf(" flags %x", gap->flags);
kprintf(" maxdma %d\n", gtsc_maxdma);
printf(" flags %x", gap->flags);
printf(" maxdma %d\n", gtsc_maxdma);
sc->sc_sbicp = (sbic_regmap_p) ((int)rp + 0x61);
sc->sc_clkfreq = gtsc_clock_override ? gtsc_clock_override :
((gap->flags & GVP_14MHZ) ? 143 : 72);
kprintf("sc_clkfreg: %ld.%ldMhz\n", sc->sc_clkfreq / 10, sc->sc_clkfreq % 10);
printf("sc_clkfreg: %ld.%ldMhz\n", sc->sc_clkfreq / 10, sc->sc_clkfreq % 10);
sc->sc_link.channel = SCSI_CHANNEL_ONLY_ONE;
sc->sc_link.adapter_softc = sc;
@ -236,13 +236,13 @@ gtsc_dmago(dev, addr, count, flags)
#ifdef DEBUG
if (gtsc_debug & DDB_IO)
kprintf("gtsc_dmago: cmd %x\n", dev->sc_dmacmd);
printf("gtsc_dmago: cmd %x\n", dev->sc_dmacmd);
#endif
dev->sc_flags |= SBICF_INTR;
sdp->CNTR = dev->sc_dmacmd;
if((u_int)dev->sc_cur->dc_addr & dev->sc_dmamask) {
#if 1
kprintf("gtsc_dmago: pa %p->%lx dmacmd %x",
printf("gtsc_dmago: pa %p->%lx dmacmd %x",
dev->sc_cur->dc_addr,
(u_int)dev->sc_cur->dc_addr & ~dev->sc_dmamask,
dev->sc_dmacmd);
@ -262,7 +262,7 @@ gtsc_dmago(dev, addr, count, flags)
dev->sc_tcnt = gtsc_maxdma;
#if 1
if((u_int)dev->sc_cur->dc_addr & dev->sc_dmamask)
kprintf(" tcnt %ld\n", dev->sc_tcnt);
printf(" tcnt %ld\n", dev->sc_tcnt);
#endif
return(dev->sc_tcnt);
}
@ -278,7 +278,7 @@ gtsc_dmastop(dev)
#ifdef DEBUG
if (gtsc_debug & DDB_FOLLOW)
kprintf("gtsc_dmastop()\n");
printf("gtsc_dmastop()\n");
#endif
if (dev->sc_dmacmd) {
/*
@ -306,7 +306,7 @@ gtsc_dmaintr(arg)
return (0);
#ifdef DEBUG
if (gtsc_debug & DDB_FOLLOW)
kprintf("%s: dmaintr 0x%x\n", dev->sc_dev.dv_xname, stat);
printf("%s: dmaintr 0x%x\n", dev->sc_dev.dv_xname, stat);
#endif
if (dev->sc_flags & SBICF_INTR)
if (sbicintr(dev))
@ -325,7 +325,7 @@ gtsc_dmanext(dev)
if (dev->sc_cur > dev->sc_last) {
/* shouldn't happen !! */
kprintf("gtsc_dmanext at end !!!\n");
printf("gtsc_dmanext at end !!!\n");
gtsc_dmastop(dev);
return(0);
}
@ -347,7 +347,7 @@ gtsc_dmanext(dev)
dev->sc_tcnt = gtsc_maxdma;
#ifdef DEBUG
if (gtsc_debug & DDB_FOLLOW)
kprintf("gtsc_dmanext ret: %ld\n", dev->sc_tcnt);
printf("gtsc_dmanext ret: %ld\n", dev->sc_tcnt);
#endif
return(dev->sc_tcnt);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: gvpbus.c,v 1.13 1996/10/10 23:55:59 christos Exp $ */
/* $NetBSD: gvpbus.c,v 1.14 1996/10/13 03:07:11 christos Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -90,7 +90,7 @@ gvpbusattach(pdp, dp, auxp)
ga.prod = *((u_char *)zap->va + 0x8001) & 0xf8;
if (*((u_char *)zap->va + 0x8001) & 0x01)
ga.flags |= GVP_14MHZ;
kprintf(": subprod %02x flags %02x", *((u_char *)zap->va + 0x8001), ga.flags);
printf(": subprod %02x flags %02x", *((u_char *)zap->va + 0x8001), ga.flags);
#if 0
} else {
ga.prod = GVP_SERIESII; /* really a series I */
@ -138,9 +138,9 @@ gvpbusattach(pdp, dp, auxp)
ga.flags |= GVP_IO;
break;
default:
kprintf(": unknown Series II %x", ga.prod);
printf(": unknown Series II %x", ga.prod);
}
kprintf("\n");
printf("\n");
/*
* attempt to configure the board.
*/
@ -165,9 +165,9 @@ gvpbusprint(auxp, pnp)
* doesn't support io yet.
*/
if (gap->prod == GVP_IOEXTEND)
kprintf("gio at %s", pnp);
printf("gio at %s", pnp);
else
kprintf("gtsc at %s", pnp);
printf("gtsc at %s", pnp);
return(UNCONF);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: idesc.c,v 1.26 1996/10/10 23:56:01 christos Exp $ */
/* $NetBSD: idesc.c,v 1.27 1996/10/13 03:07:12 christos Exp $ */
/*
* Copyright (c) 1994 Michael L. Hitch
@ -308,9 +308,9 @@ void ide_dump_regs __P((ide_regmap_p));
int ide_debug = 0;
#define TRACE0(arg) if (ide_debug > 1) kprintf(arg)
#define TRACE1(arg1,arg2) if (ide_debug > 1) kprintf(arg1,arg2)
#define QPRINTF(a) if (ide_debug > 1) kprintf a
#define TRACE0(arg) if (ide_debug > 1) printf(arg)
#define TRACE1(arg1,arg2) if (ide_debug > 1) printf(arg1,arg2)
#define QPRINTF(a) if (ide_debug > 1) printf a
#else /* !DEBUG */
@ -354,7 +354,7 @@ idescattach(pdp, dp, auxp)
sc->sc_cregs = rp = (ide_regmap_p) ztwomap(0xda0000);
sc->sc_a1200 = ztwomap(0xda8000 + 0x1000);
sc->sc_flags |= IDECF_A1200;
kprintf(" A1200 @ %p:%p", rp, sc->sc_a1200);
printf(" A1200 @ %p:%p", rp, sc->sc_a1200);
}
#ifdef DEBUG
@ -364,14 +364,14 @@ idescattach(pdp, dp, auxp)
rp->ide_error = 0x5a;
rp->ide_cyl_lo = 0xa5;
if (rp->ide_error == 0x5a || rp->ide_cyl_lo != 0xa5) {
kprintf ("\n");
printf ("\n");
return;
}
/* test if controller will reset */
if (idereset(sc) != 0) {
delay (500000);
if (idereset(sc) != 0) {
kprintf (" IDE controller did not reset\n");
printf (" IDE controller did not reset\n");
return;
}
}
@ -382,7 +382,7 @@ idescattach(pdp, dp, auxp)
/* Execute a controller only command. */
if (idecommand(&sc->sc_ide[0], 0, 0, 0, 0, IDEC_DIAGNOSE) != 0 ||
wait_for_unbusy(sc) != 0) {
kprintf (" ide attach failed\n");
printf (" ide attach failed\n");
return;
}
#endif
@ -402,7 +402,7 @@ idescattach(pdp, dp, auxp)
rp->ide_ctlr = 0;
}
kprintf ("\n");
printf ("\n");
sc->sc_link.channel = SCSI_CHANNEL_ONLY_ONE;
sc->sc_link.adapter_softc = sc;
@ -600,7 +600,7 @@ void
ide_dump_regs(regs)
ide_regmap_p regs;
{
kprintf ("ide regs: %04x %02x %02x %02x %02x %02x %02x %02x\n",
printf ("ide regs: %04x %02x %02x %02x %02x %02x %02x %02x\n",
regs->ide_data, regs->ide_error, regs->ide_seccnt,
regs->ide_sector, regs->ide_cyl_lo, regs->ide_cyl_hi,
regs->ide_sdh, regs->ide_command);
@ -627,7 +627,7 @@ idewait (sc, mask)
return (0);
#ifdef DEBUG
if (ide_debug)
kprintf ("idewait busy: %02x\n", regs->ide_status);
printf ("idewait busy: %02x\n", regs->ide_status);
#endif
for (;;) {
if ((regs->ide_status & IDES_BUSY) == 0 &&
@ -636,17 +636,17 @@ idewait (sc, mask)
if (regs->ide_status & IDES_ERR)
break;
if (++timeout > 10000) {
kprintf ("idewait timeout %02x\n", regs->ide_status);
printf ("idewait timeout %02x\n", regs->ide_status);
return (-1);
}
delay (1000);
}
if (regs->ide_status & IDES_ERR)
kprintf ("idewait: error %02x %02x\n", regs->ide_error,
printf ("idewait: error %02x %02x\n", regs->ide_error,
regs->ide_status);
#ifdef DEBUG
else if (ide_debug)
kprintf ("idewait delay %d %02x\n", timeout, regs->ide_status);
printf ("idewait delay %d %02x\n", timeout, regs->ide_status);
#endif
return (regs->ide_status & IDES_ERR);
}
@ -663,7 +663,7 @@ idecommand (ide, cylin, head, sector, count, cmd)
#ifdef DEBUG
if (ide_debug)
kprintf ("idecommand: cmd = %02x\n", cmd);
printf ("idecommand: cmd = %02x\n", cmd);
#endif
if (wait_for_unbusy(idec) < 0)
return (-1);
@ -672,7 +672,7 @@ idecommand (ide, cylin, head, sector, count, cmd)
stat = wait_for_unbusy(idec);
else
stat = idewait(idec, IDES_READY);
if (stat < 0) kprintf ("idecommand:%d stat %d\n", ide->sc_drive, stat);
if (stat < 0) printf ("idecommand:%d stat %d\n", ide->sc_drive, stat);
if (stat < 0)
return (-1);
regs->ide_precomp = 0;
@ -802,7 +802,7 @@ ideiwrite(ide, block, buf, nblks)
regs->ide_data = *bufp++;
}
if (wait_for_unbusy(idec) != 0)
kprintf ("ideiwrite: timeout waiting for unbusy\n");
printf ("ideiwrite: timeout waiting for unbusy\n");
}
idec->sc_stat[0] = 0;
return (0);
@ -830,7 +830,7 @@ ideicmd(dev, target, cbuf, clen, buf, len)
#ifdef DEBUG
if (ide_debug > 1)
kprintf ("ideicmd: target %d cmd %02x\n", target,
printf ("ideicmd: target %d cmd %02x\n", target,
*((u_char *)cbuf));
#endif
if (target > 1)
@ -920,7 +920,7 @@ ideicmd(dev, target, cbuf, clen, buf, len)
dev->sc_stat[0] = 0;
return (0);
default:
kprintf ("ide: mode sense page %x not simulated\n",
printf ("ide: mode sense page %x not simulated\n",
*((u_char *)cbuf + 2) & 0x3f);
return (-1);
}
@ -939,7 +939,7 @@ ideicmd(dev, target, cbuf, clen, buf, len)
*((u_char *) buf + 2) = sense_convert[i].scsi_sense_key;
*((u_char *) buf + 12) = sense_convert[i].scsi_sense_qual;
dev->sc_stat[0] = 0;
kprintf("ide: request sense %02x -> %02x %02x\n", ide->sc_error,
printf("ide: request sense %02x -> %02x %02x\n", ide->sc_error,
sense_convert[i].scsi_sense_key, sense_convert[i].scsi_sense_qual);
return (0);
@ -951,7 +951,7 @@ kprintf("ide: request sense %02x -> %02x %02x\n", ide->sc_error,
case 0x11 /*SPACE*/:
case MODE_SELECT:
default:
kprintf ("ide: unhandled SCSI command %02x\n", *((u_char *)cbuf));
printf ("ide: unhandled SCSI command %02x\n", *((u_char *)cbuf));
ide->sc_error = 0x04;
dev->sc_stat[0] = SCSI_CHECK;
return (SCSI_CHECK);
@ -975,7 +975,7 @@ idego(dev, xs)
ide->sc_bcount = xs->datalen;
#ifdef DEBUG
if (ide_debug > 1)
kprintf ("ide_go: %02x\n", xs->cmd->opcode);
printf ("ide_go: %02x\n", xs->cmd->opcode);
#endif
if (xs->cmd->opcode != READ_COMMAND && xs->cmd->opcode != READ_BIG &&
xs->cmd->opcode != WRITE_COMMAND && xs->cmd->opcode != WRITE_BIG) {
@ -1034,7 +1034,7 @@ idestart(dev)
command = (dev->sc_flags & IDECF_READ) ?
IDEC_READ : IDEC_WRITE;
if (idecommand(ide, cylin, head, sector, count, command) != 0) {
kprintf ("idestart: timeout waiting for unbusy\n");
printf ("idestart: timeout waiting for unbusy\n");
#if 0
bp->b_error = EINVAL;
bp->b_flags |= B_ERROR;
@ -1048,7 +1048,7 @@ idestart(dev)
if (dev->sc_flags & IDECF_READ)
return (0);
if (wait_for_drq(dev) < 0) {
kprintf ("idestart: timeout waiting for drq\n");
printf ("idestart: timeout waiting for drq\n");
}
#define W1 (regs->ide_data = *bf++)
for (i = 0, bf = (short *) (ide->sc_buf + ide->sc_skip * DEV_BSIZE);
@ -1079,7 +1079,7 @@ idesc_intr(arg)
if (dev->sc_flags & IDECF_A1200) {
if (*dev->sc_a1200 & 0x80) {
#if 0
kprintf ("idesc_intr: A1200 interrupt %x\n", *dev->sc_a1200);
printf ("idesc_intr: A1200 interrupt %x\n", *dev->sc_a1200);
#endif
dummy = regs->ide_status; /* XXX */
*dev->sc_a1200 = 0x7c | (*dev->sc_a1200 & 0x03);
@ -1093,25 +1093,25 @@ idesc_intr(arg)
}
#ifdef DEBUG
if (ide_debug)
kprintf ("idesc_intr: %02x\n", dummy);
printf ("idesc_intr: %02x\n", dummy);
#endif
if ((dev->sc_flags & IDECF_ACTIVE) == 0)
return (1);
dev->sc_flags &= ~IDECF_ACTIVE;
if (wait_for_unbusy(dev) < 0)
kprintf ("idesc_intr: timeout waiting for unbusy\n");
printf ("idesc_intr: timeout waiting for unbusy\n");
ide = dev->sc_cur;
if (dummy & IDES_ERR) {
dev->sc_stat[0] = SCSI_CHECK;
ide->sc_error = regs->ide_error;
kprintf("idesc_intr: error %02x, %02x\n", dev->sc_stat[1], dummy);
printf("idesc_intr: error %02x, %02x\n", dev->sc_stat[1], dummy);
ide_scsidone(dev, dev->sc_stat[0]);
}
if (dev->sc_flags & IDECF_READ) {
#define R2 (*bf++ = regs->ide_data)
bf = (short *) (ide->sc_buf + ide->sc_skip * DEV_BSIZE);
if (wait_for_drq(dev) != 0)
kprintf ("idesc_intr: read error detected late\n");
printf ("idesc_intr: read error detected late\n");
for (i = 0; i < DEV_BSIZE / 2 / 16; ++i) {
R2; R2; R2; R2; R2; R2; R2; R2;
R2; R2; R2; R2; R2; R2; R2; R2;
@ -1123,7 +1123,7 @@ kprintf("idesc_intr: error %02x, %02x\n", dev->sc_stat[1], dummy);
ide->sc_mbcount -= DEV_BSIZE;
#ifdef DEBUG
if (ide_debug)
kprintf ("idesc_intr: sc_bcount %ld\n", ide->sc_bcount);
printf ("idesc_intr: sc_bcount %ld\n", ide->sc_bcount);
#endif
if (ide->sc_bcount == 0)
ide_scsidone(dev, dev->sc_stat[0]);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ae.c,v 1.10 1996/10/10 23:56:02 christos Exp $ */
/* $NetBSD: if_ae.c,v 1.11 1996/10/13 03:07:13 christos Exp $ */
/*
* Copyright (c) 1995 Bernd Ernesti and Klaus Burkert. All rights reserved.
@ -201,7 +201,7 @@ aeattach(parent, self, aux)
/*
* Make config msgs look nicer.
*/
kprintf("\n");
printf("\n");
sc->sc_base = zap->va;
sc->sc_r1 = (struct aereg1 *)(aestd[1] + (int)zap->va);
@ -224,7 +224,7 @@ aeattach(parent, self, aux)
sc->sc_arpcom.ac_enaddr[4] = (ser >> 8) & 0xff;
sc->sc_arpcom.ac_enaddr[5] = ser & 0xff;
kprintf("%s: hardware address %s 32K", sc->sc_dev.dv_xname,
printf("%s: hardware address %s 32K", sc->sc_dev.dv_xname,
ether_sprintf(sc->sc_arpcom.ac_enaddr));
aestop(sc);
@ -233,7 +233,7 @@ aeattach(parent, self, aux)
/* get the chip version of the lance chip */
sc->sc_r1->aer1_rap = 0x5900;
revision = ((sc->sc_r1->aer1_rdp >> 4) -2);
kprintf(" chip-revision: B%x\n", revision);
printf(" chip-revision: B%x\n", revision);
splx (s);
@ -424,7 +424,7 @@ aeinit(sc)
/* Wait for initialization to finish. */
do {
if (++timo == 10000) {
kprintf("%s: card failed to initialize\n", sc->sc_dev.dv_xname);
printf("%s: card failed to initialize\n", sc->sc_dev.dv_xname);
break;
}
} while ((aer1->aer1_rdp & AE_IDON) == 0);
@ -484,7 +484,7 @@ aestart(ifp)
#ifdef AEDEBUG
if (len > ETHER_MAX_LEN)
kprintf("packet length %d\n", len);
printf("packet length %d\n", len);
#endif
ifp->if_timer = 5;
@ -524,34 +524,34 @@ aeintr(arg)
AE_RINT | AE_TINT | AE_IDON));
if (stat & AE_SERR) {
if (stat & AE_MERR) {
kprintf("%s: memory error\n", sc->sc_dev.dv_xname);
printf("%s: memory error\n", sc->sc_dev.dv_xname);
aereset(sc);
return (1);
}
if (stat & AE_BABL) {
kprintf("%s: babble\n", sc->sc_dev.dv_xname);
printf("%s: babble\n", sc->sc_dev.dv_xname);
ifp->if_oerrors++;
}
#if 0
if (stat & AE_CERR) {
kprintf("%s: collision error\n", sc->sc_dev.dv_xname);
printf("%s: collision error\n", sc->sc_dev.dv_xname);
ifp->if_collisions++;
}
#endif
if (stat & AE_MISS) {
kprintf("%s: missed packet\n", sc->sc_dev.dv_xname);
printf("%s: missed packet\n", sc->sc_dev.dv_xname);
ifp->if_ierrors++;
}
aer1->aer1_rdp = AE_BABL | AE_CERR | AE_MISS | AE_INEA;
}
if ((stat & AE_RXON) == 0) {
kprintf("%s: receiver disabled\n", sc->sc_dev.dv_xname);
printf("%s: receiver disabled\n", sc->sc_dev.dv_xname);
ifp->if_ierrors++;
aereset(sc);
return (1);
}
if ((stat & AE_TXON) == 0) {
kprintf("%s: transmitter disabled\n", sc->sc_dev.dv_xname);
printf("%s: transmitter disabled\n", sc->sc_dev.dv_xname);
ifp->if_oerrors++;
aereset(sc);
return (1);
@ -584,7 +584,7 @@ aetint(sc)
if (tmd->tmd1 & AE_OWN) {
#ifdef AEDEBUG
kprintf("%s: extra tint\n", sc->sc_dev.dv_xname);
printf("%s: extra tint\n", sc->sc_dev.dv_xname);
#endif
return;
}
@ -598,21 +598,21 @@ aetint(sc)
if (tmd->tmd1 & AE_ERR) {
if (tmd->tmd3 & AE_TBUFF)
kprintf("%s: transmit buffer error\n", sc->sc_dev.dv_xname);
printf("%s: transmit buffer error\n", sc->sc_dev.dv_xname);
if (tmd->tmd3 & AE_UFLO)
kprintf("%s: underflow\n", sc->sc_dev.dv_xname);
printf("%s: underflow\n", sc->sc_dev.dv_xname);
if (tmd->tmd3 & (AE_TBUFF | AE_UFLO)) {
aereset(sc);
return;
}
if (tmd->tmd3 & AE_LCAR)
kprintf("%s: lost carrier\n", sc->sc_dev.dv_xname);
printf("%s: lost carrier\n", sc->sc_dev.dv_xname);
if (tmd->tmd3 & AE_LCOL) {
kprintf("%s: late collision\n", sc->sc_dev.dv_xname);
printf("%s: late collision\n", sc->sc_dev.dv_xname);
ifp->if_collisions++;
}
if (tmd->tmd3 & AE_RTRY) {
kprintf("%s: excessive collisions, tdr %d\n",
printf("%s: excessive collisions, tdr %d\n",
sc->sc_dev.dv_xname, tmd->tmd3 & AE_TDR_MASK);
ifp->if_collisions += 16;
}
@ -653,7 +653,7 @@ aerint(sc)
*/
if (rmd->rmd1 & AE_OWN) {
#ifdef AEDEBUG
kprintf("%s: extra rint\n", sc->sc_dev.dv_xname);
printf("%s: extra rint\n", sc->sc_dev.dv_xname);
#endif
return;
}
@ -666,13 +666,13 @@ aerint(sc)
if (rmd->rmd1 & (AE_FRAM | AE_OFLO | AE_CRC | AE_RBUFF)) {
ifp->if_ierrors++;
if ((rmd->rmd1 & (AE_FRAM | AE_OFLO | AE_ENP)) == (AE_FRAM | AE_ENP))
kprintf("%s: framing error\n", sc->sc_dev.dv_xname);
printf("%s: framing error\n", sc->sc_dev.dv_xname);
if ((rmd->rmd1 & (AE_OFLO | AE_ENP)) == AE_OFLO)
kprintf("%s: overflow\n", sc->sc_dev.dv_xname);
printf("%s: overflow\n", sc->sc_dev.dv_xname);
if ((rmd->rmd1 & (AE_CRC | AE_OFLO | AE_ENP)) == (AE_CRC | AE_ENP))
kprintf("%s: crc mismatch\n", sc->sc_dev.dv_xname);
printf("%s: crc mismatch\n", sc->sc_dev.dv_xname);
if (rmd->rmd1 & AE_RBUFF)
kprintf("%s: receive buffer error\n", sc->sc_dev.dv_xname);
printf("%s: receive buffer error\n", sc->sc_dev.dv_xname);
} else if ((rmd->rmd1 & (AE_STP | AE_ENP)) != (AE_STP | AE_ENP)) {
do {
rmd->rmd3 = 0;
@ -681,7 +681,7 @@ aerint(sc)
} while ((rmd->rmd1 & (AE_OWN | AE_ERR | AE_STP | AE_ENP)) == 0);
sc->sc_rmd = bix;
kprintf("%s: chained buffer\n", sc->sc_dev.dv_xname);
printf("%s: chained buffer\n", sc->sc_dev.dv_xname);
if ((rmd->rmd1 & (AE_OWN | AE_ERR | AE_STP | AE_ENP)) != AE_ENP) {
aereset(sc);
return;
@ -710,7 +710,7 @@ aeread(sc, buf, len)
struct ether_header *eh;
if (len <= sizeof(struct ether_header) || len > ETHER_MAX_LEN) {
kprintf("%s: invalid packet size %d; dropping\n",
printf("%s: invalid packet size %d; dropping\n",
sc->sc_dev.dv_xname, len);
ifp->if_ierrors++;
return;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_bah.c,v 1.21 1996/10/10 23:56:04 christos Exp $ */
/* $NetBSD: if_bah.c,v 1.22 1996/10/13 03:07:14 christos Exp $ */
/*
* Copyright (c) 1994, 1995 Ignatios Souvatzis
@ -223,7 +223,7 @@ bah_zbus_attach(parent, self, aux)
int s, linkaddress;
#if (defined(BAH_DEBUG) && (BAH_DEBUG > 2))
kprintf("\n%s: attach(0x%x, 0x%x, 0x%x)\n",
printf("\n%s: attach(0x%x, 0x%x, 0x%x)\n",
sc->sc_dev.dv_xname, parent, self, aux);
#endif
s = splhigh();
@ -246,10 +246,10 @@ bah_zbus_attach(parent, self, aux)
linkaddress = sc->sc_base->dipswitches;
#ifdef BAHTIMINGS
kprintf(": link addr 0x%02x(%ld), with timer\n",
printf(": link addr 0x%02x(%ld), with timer\n",
linkaddress, linkaddress);
#else
kprintf(": link addr 0x%02x(%d)\n", linkaddress, linkaddress);
printf(": link addr 0x%02x(%d)\n", linkaddress, linkaddress);
#endif
sc->sc_arccom.ac_anaddr = linkaddress;
@ -339,7 +339,7 @@ bah_reset(sc)
ifp = &sc->sc_arccom.ac_if;
#ifdef BAH_DEBUG
kprintf("%s: reset\n", sc->sc_dev.dv_xname);
printf("%s: reset\n", sc->sc_dev.dv_xname);
#endif
/* stop hardware in case it still runs */
@ -358,7 +358,7 @@ bah_reset(sc)
linkaddress = sc->sc_base->dipswitches;
#if defined(BAH_DEBUG) && (BAH_DEBUG > 2)
kprintf("%s: reset: card reset, link addr = 0x%02x (%ld)\n",
printf("%s: reset: card reset, link addr = 0x%02x (%ld)\n",
sc->sc_dev.dv_xname, linkaddress, linkaddress);
#endif
sc->sc_arccom.ac_anaddr = linkaddress;
@ -372,14 +372,14 @@ bah_reset(sc)
sc->sc_base->command = ARC_CONF(CONF_LONG);
#ifdef BAH_DEBUG
kprintf("%s: reset: chip configured, status=0x%02x\n",
printf("%s: reset: chip configured, status=0x%02x\n",
sc->sc_dev.dv_xname, sc->sc_base->status);
#endif
sc->sc_base->command = ARC_CLR(CLR_POR|CLR_RECONFIG);
#ifdef BAH_DEBUG
kprintf("%s: reset: bits cleared, status=0x%02x\n",
printf("%s: reset: bits cleared, status=0x%02x\n",
sc->sc_dev.dv_xname, sc->sc_base->status);
#endif
@ -395,7 +395,7 @@ bah_reset(sc)
sc->sc_base->status = sc->sc_intmask;
#ifdef BAH_DEBUG
kprintf("%s: reset: started receiver, status=0x%02x\n",
printf("%s: reset: started receiver, status=0x%02x\n",
sc->sc_dev.dv_xname, sc->sc_base->status);
#endif
@ -541,7 +541,7 @@ bah_start(ifp)
sc = ifp->if_softc;
#if defined(BAH_DEBUG) && (BAH_DEBUG > 3)
kprintf("%s: start(0x%x)\n", sc->sc_dev.dv_xname, ifp);
printf("%s: start(0x%x)\n", sc->sc_dev.dv_xname, ifp);
#endif
if ((ifp->if_flags & IFF_RUNNING) == 0)
@ -576,7 +576,7 @@ bah_start(ifp)
#ifdef BAH_DEBUG
m = m_pullup(m,3); /* gcc does structure padding */
kprintf("%s: start: filling %ld from %ld to %ld type %ld\n",
printf("%s: start: filling %ld from %ld to %ld type %ld\n",
sc->sc_dev.dv_xname, buffer, mtod(m, u_char *)[0],
mtod(m, u_char *)[1], mtod(m, u_char *)[2]);
#else
@ -648,7 +648,7 @@ bah_start(ifp)
ifp->if_flags |= IFF_OACTIVE;
} else {
#ifdef BAH_DEBUG
kprintf("%s: start: starting transmitter on buffer %d\n",
printf("%s: start: starting transmitter on buffer %d\n",
sc->sc_dev.dv_xname, buffer);
#endif
/* Transmitter was off, start it */
@ -901,7 +901,7 @@ cleanup:
sc->sc_base->status = sc->sc_intmask;
#ifdef BAH_DEBUG
kprintf("%s: srint: restarted rx on buf %ld\n",
printf("%s: srint: restarted rx on buf %ld\n",
sc->sc_dev.dv_xname, buffer);
#endif
}
@ -984,7 +984,7 @@ bah_tint(sc, isr)
#endif
#if defined(BAH_DEBUG) && (BAH_DEBUG > 1)
kprintf("%s: tint: starting tx on buffer %d, status 0x%02x\n",
printf("%s: tint: starting tx on buffer %d, status 0x%02x\n",
sc->sc_dev.dv_xname, buffer, sc->sc_base->status);
#endif
} else {
@ -995,7 +995,7 @@ bah_tint(sc, isr)
ifp->if_timer = 0;
#ifdef BAH_DEBUG
kprintf("%s: tint: no more buffers to send, status 0x%02x\n",
printf("%s: tint: no more buffers to send, status 0x%02x\n",
sc->sc_dev.dv_xname, sc->sc_base->status);
#endif
}
@ -1027,7 +1027,7 @@ bahintr(arg)
return (0);
#if defined(BAH_DEBUG) && (BAH_DEBUG>1)
kprintf("%s: intr: status 0x%02x, intmask 0x%02x\n",
printf("%s: intr: status 0x%02x, intmask 0x%02x\n",
sc->sc_dev.dv_xname, isr, sc->sc_intmask);
#endif
@ -1081,7 +1081,7 @@ bahintr(arg)
if (maskedisr & ARC_RI) {
#if defined(BAH_DEBUG) && (BAH_DEBUG > 1)
kprintf("%s: intr: hard rint, act %ld\n",
printf("%s: intr: hard rint, act %ld\n",
sc->sc_dev.dv_xname, sc->sc_rx_act);
#endif
@ -1113,7 +1113,7 @@ bahintr(arg)
/* we are in the RX intr, so mask is ok for RX */
#ifdef BAH_DEBUG
kprintf("%s: started rx for buffer %ld, status 0x%02x\n",
printf("%s: started rx for buffer %ld, status 0x%02x\n",
sc->sc_dev.dv_xname, sc->sc_rx_act,
sc->sc_base->status);
#endif
@ -1156,7 +1156,7 @@ bah_ioctl(ifp, command, data)
s = splnet();
#if defined(BAH_DEBUG) && (BAH_DEBUG > 2)
kprintf("%s: ioctl() called, cmd = 0x%x\n",
printf("%s: ioctl() called, cmd = 0x%x\n",
sc->sc_dev.dv_xname, command);
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ed.c,v 1.22 1996/10/10 23:56:06 christos Exp $ */
/* $NetBSD: if_ed.c,v 1.23 1996/10/13 03:07:16 christos Exp $ */
/*
* Device driver for National Semiconductor DS8390/WD83C690 based ethernet
@ -273,7 +273,7 @@ ed_zbus_attach(parent, self, aux)
ether_ifattach(ifp);
/* Print additional info when attached. */
kprintf(": address %s\n", ether_sprintf(sc->sc_arpcom.ac_enaddr));
printf(": address %s\n", ether_sprintf(sc->sc_arpcom.ac_enaddr));
#if NBPFILTER > 0
bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
@ -513,7 +513,7 @@ outloop:
* should never happen at this point.
*/
if (sc->txb_inuse && (sc->xmit_busy == 0)) {
kprintf("%s: packets buffered, but transmitter idle\n",
printf("%s: packets buffered, but transmitter idle\n",
sc->sc_dev.dv_xname);
ed_xmit(sc);
}
@ -632,9 +632,9 @@ loop:
len = (len & ED_PAGE_MASK) | (nlen << ED_PAGE_SHIFT);
#ifdef DIAGNOSTIC
if (len != packet_hdr.count) {
kprintf("%s: length does not match next packet pointer\n",
printf("%s: length does not match next packet pointer\n",
sc->sc_dev.dv_xname);
kprintf("%s: len %04x nlen %04x start %02x first %02x curr %02x next %02x stop %02x\n",
printf("%s: len %04x nlen %04x start %02x first %02x curr %02x next %02x stop %02x\n",
sc->sc_dev.dv_xname, packet_hdr.count, len,
sc->rec_page_start, sc->next_packet, current,
packet_hdr.next_packet, sc->rec_page_stop);
@ -803,7 +803,7 @@ edintr(arg)
if (isr & ED_ISR_RXE) {
++sc->sc_arpcom.ac_if.if_ierrors;
#ifdef ED_DEBUG
kprintf("%s: receive error %x\n",
printf("%s: receive error %x\n",
sc->sc_dev.dv_xname,
NIC_GET(sc, ED_P0_RSR));
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_es.c,v 1.14 1996/10/10 23:56:07 christos Exp $ */
/* $NetBSD: if_es.c,v 1.15 1996/10/13 03:07:17 christos Exp $ */
/*
* Copyright (c) 1995 Michael L. Hitch
@ -196,7 +196,7 @@ esattach(parent, self, aux)
ether_ifattach(ifp);
/* Print additional info when attached. */
kprintf(": address %s\n", ether_sprintf(sc->sc_arpcom.ac_enaddr));
printf(": address %s\n", ether_sprintf(sc->sc_arpcom.ac_enaddr));
#if NBPFILTER > 0
bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
@ -216,24 +216,24 @@ es_dump_smcregs(where, smc)
{
u_short cur_bank = smc->b0.bsr & BSR_MASK;
kprintf("SMC registers %p from %s bank %04x\n", smc, where,
printf("SMC registers %p from %s bank %04x\n", smc, where,
smc->b0.bsr);
smc->b0.bsr = BSR_BANK0;
kprintf("TCR %04x EPHSR %04x RCR %04x ECR %04x MIR %04x MCR %04x\n",
printf("TCR %04x EPHSR %04x RCR %04x ECR %04x MIR %04x MCR %04x\n",
SWAP(smc->b0.tcr), SWAP(smc->b0.ephsr), SWAP(smc->b0.rcr),
SWAP(smc->b0.ecr), SWAP(smc->b0.mir), SWAP(smc->b0.mcr));
smc->b1.bsr = BSR_BANK1;
kprintf("CR %04x BAR %04x IAR %04x %04x %04x GPR %04x CTR %04x\n",
printf("CR %04x BAR %04x IAR %04x %04x %04x GPR %04x CTR %04x\n",
SWAP(smc->b1.cr), SWAP(smc->b1.bar), smc->b1.iar[0], smc->b1.iar[1],
smc->b1.iar[2], smc->b1.gpr, SWAP(smc->b1.ctr));
smc->b2.bsr = BSR_BANK2;
kprintf("MMUCR %04x PNR %02x ARR %02x FIFO %04x PTR %04x",
printf("MMUCR %04x PNR %02x ARR %02x FIFO %04x PTR %04x",
SWAP(smc->b2.mmucr), smc->b2.pnr, smc->b2.arr, smc->b2.fifo,
SWAP(smc->b2.ptr));
kprintf(" DATA %04x %04x IST %02x MSK %02x\n", smc->b2.data,
printf(" DATA %04x %04x IST %02x MSK %02x\n", smc->b2.data,
smc->b2.datax, smc->b2.ist, smc->b2.msk);
smc->b3.bsr = BSR_BANK3;
kprintf("MT %04x %04x %04x %04x\n",
printf("MT %04x %04x %04x %04x\n",
smc->b3.mt[0], smc->b3.mt[1], smc->b3.mt[2], smc->b3.mt[3]);
smc->b3.bsr = cur_bank;
}
@ -307,7 +307,7 @@ esintr(arg)
#ifdef ESDEBUG
while ((smc->b2.bsr & BSR_MASK) != BSR_BANK2 &&
sc->sc_arpcom.ac_if.if_flags & IFF_RUNNING) {
kprintf("%s: intr BSR not 2: %04x\n", sc->sc_dev.dv_xname,
printf("%s: intr BSR not 2: %04x\n", sc->sc_dev.dv_xname,
smc->b2.bsr);
smc->b2.bsr = BSR_BANK2;
}
@ -320,20 +320,20 @@ esintr(arg)
}
#ifdef ESDEBUG
if (esdebug)
kprintf ("%s: esintr ist %02x msk %02x",
printf ("%s: esintr ist %02x msk %02x",
sc->sc_dev.dv_xname, intsts, smc->b2.msk);
if (sc->sc_intbusy++) {
kprintf("%s: esintr re-entered\n", sc->sc_dev.dv_xname);
printf("%s: esintr re-entered\n", sc->sc_dev.dv_xname);
panic("esintr re-entered");
}
if (sc->sc_smcbusy)
kprintf("%s: esintr interrupted busy %d\n", sc->sc_dev.dv_xname,
printf("%s: esintr interrupted busy %d\n", sc->sc_dev.dv_xname,
sc->sc_smcbusy);
#endif
smc->b2.msk = 0;
#ifdef ESDEBUG
if (esdebug)
kprintf ("=>%02x%02x pnr %02x arr %02x fifo %04x\n",
printf ("=>%02x%02x pnr %02x arr %02x fifo %04x\n",
smc->b2.ist, smc->b2.ist, smc->b2.pnr, smc->b2.arr,
smc->b2.fifo);
#endif
@ -341,14 +341,14 @@ esintr(arg)
sc->sc_intctl &= ~MSK_ALLOC;
#ifdef ESDEBUG
if (esdebug || 1)
kprintf ("%s: ist %02x", sc->sc_dev.dv_xname,
printf ("%s: ist %02x", sc->sc_dev.dv_xname,
intsts);
#endif
if ((smc->b2.arr & ARR_FAILED) == 0) {
u_char save_pnr;
#ifdef ESDEBUG
if (esdebug || 1)
kprintf (" arr %02x\n", smc->b2.arr);
printf (" arr %02x\n", smc->b2.arr);
#endif
save_pnr = smc->b2.pnr;
smc->b2.pnr = smc->b2.arr;
@ -360,12 +360,12 @@ esintr(arg)
}
#ifdef ESDEBUG
else if (esdebug || 1)
kprintf (" IST_ALLOC with ARR_FAILED?\n");
printf (" IST_ALLOC with ARR_FAILED?\n");
#endif
}
#ifdef ESDEBUG
while ((smc->b2.bsr & BSR_MASK) != BSR_BANK2) {
kprintf("%s: intr+ BSR not 2: %04x\n", sc->sc_dev.dv_xname,
printf("%s: intr+ BSR not 2: %04x\n", sc->sc_dev.dv_xname,
smc->b2.bsr);
smc->b2.bsr = BSR_BANK2;
}
@ -375,23 +375,23 @@ esintr(arg)
}
#ifdef ESDEBUG
while ((smc->b2.bsr & BSR_MASK) != BSR_BANK2) {
kprintf("%s: intr++ BSR not 2: %04x\n", sc->sc_dev.dv_xname,
printf("%s: intr++ BSR not 2: %04x\n", sc->sc_dev.dv_xname,
smc->b2.bsr);
smc->b2.bsr = BSR_BANK2;
}
#endif
if (intact & IST_RX_OVRN) {
kprintf ("%s: Overrun ist %02x", sc->sc_dev.dv_xname,
printf ("%s: Overrun ist %02x", sc->sc_dev.dv_xname,
intsts);
smc->b2.ist = ACK_RX_OVRN;
kprintf ("->%02x\n", smc->b2.ist);
printf ("->%02x\n", smc->b2.ist);
sc->sc_arpcom.ac_if.if_ierrors++;
}
if (intact & IST_TX_EMPTY) {
u_short ecr;
#ifdef ESDEBUG
if (esdebug)
kprintf ("%s: TX EMPTY %02x",
printf ("%s: TX EMPTY %02x",
sc->sc_dev.dv_xname, intsts);
++estxint5; /* count # IST_TX_EMPTY ints */
#endif
@ -399,7 +399,7 @@ esintr(arg)
sc->sc_intctl &= ~(MSK_TX_EMPTY | MSK_TX);
#ifdef ESDEBUG
if (esdebug)
kprintf ("->%02x intcl %x pnr %02x arr %02x\n",
printf ("->%02x intcl %x pnr %02x arr %02x\n",
smc->b2.ist, sc->sc_intctl, smc->b2.pnr,
smc->b2.arr);
#endif
@ -426,9 +426,9 @@ esintr(arg)
int n = 0;
#ifdef ESDEBUG
if (esdebug) {
kprintf ("%s: TX INT ist %02x",
printf ("%s: TX INT ist %02x",
sc->sc_dev.dv_xname, intsts);
kprintf ("->%02x\n", smc->b2.ist);
printf ("->%02x\n", smc->b2.ist);
}
++estxint3; /* count # IST_TX */
#endif
@ -446,11 +446,11 @@ zzzz:
smc->b2.pnr = tx_pnr; /* set TX packet number */
smc->b2.ptr = PTR_READ; /* point to status word */
#if 0 /* XXXX */
kprintf("%s: esintr TXINT IST %02x PNR %02x(%d)",
printf("%s: esintr TXINT IST %02x PNR %02x(%d)",
sc->sc_dev.dv_xname, smc->b2.ist,
tx_pnr, n);
kprintf(" Status %04x", smc->b2.data);
kprintf(" EPHSR %04x\n", ephsr);
printf(" Status %04x", smc->b2.data);
printf(" EPHSR %04x\n", ephsr);
#endif
if ((smc->b2.data & EPHSR_TX_SUC) == 0 && (tcr & TCR_TXENA) == 0) {
/*
@ -492,10 +492,10 @@ zzzz:
if ((smc->b2.fifo & FIFO_TEMPTY) == 0 && n++ < 32) {
#if 0 /* XXXX */
kprintf("%s: multiple TX int(%2d) pnr %02x ist %02x fifo %04x",
printf("%s: multiple TX int(%2d) pnr %02x ist %02x fifo %04x",
sc->sc_dev.dv_xname, n, tx_pnr, smc->b2.ist, smc->b2.fifo);
smc->w2.istmsk = ACK_TX << 8;
kprintf(" %04x\n", smc->b2.fifo);
printf(" %04x\n", smc->b2.fifo);
#endif
if (tx_pnr != (smc->b2.fifo >> 8))
goto zzzz;
@ -505,7 +505,7 @@ zzzz:
estint(sc);
#ifdef ESDEBUG
while ((smc->b2.bsr & BSR_MASK) != BSR_BANK2) {
kprintf("%s: intr+++ BSR not 2: %04x\n", sc->sc_dev.dv_xname,
printf("%s: intr+++ BSR not 2: %04x\n", sc->sc_dev.dv_xname,
smc->b2.bsr);
smc->b2.bsr = BSR_BANK2;
}
@ -513,7 +513,7 @@ zzzz:
smc->b2.msk = sc->sc_intctl;
#ifdef ESDEBUG
if (--sc->sc_intbusy) {
kprintf("%s: esintr busy on exit\n", sc->sc_dev.dv_xname);
printf("%s: esintr busy on exit\n", sc->sc_dev.dv_xname);
panic("esintr busy on exit");
}
#endif
@ -546,14 +546,14 @@ esrint(sc)
#ifdef ESDEBUG
if (esdebug)
kprintf ("%s: esrint fifo %04x", sc->sc_dev.dv_xname,
printf ("%s: esrint fifo %04x", sc->sc_dev.dv_xname,
smc->b2.fifo);
if (sc->sc_smcbusy++) {
kprintf("%s: esrint re-entered\n", sc->sc_dev.dv_xname);
printf("%s: esrint re-entered\n", sc->sc_dev.dv_xname);
panic("esrint re-entered");
}
while ((smc->b2.bsr & BSR_MASK) != BSR_BANK2) {
kprintf("%s: rint BSR not 2: %04x\n", sc->sc_dev.dv_xname,
printf("%s: rint BSR not 2: %04x\n", sc->sc_dev.dv_xname,
smc->b2.bsr);
smc->b2.bsr = BSR_BANK2;
}
@ -563,13 +563,13 @@ esrint(sc)
(void) smc->b2.mmucr;
#ifdef ESDEBUG
if (esdebug)
kprintf ("->%04x", smc->b2.fifo);
printf ("->%04x", smc->b2.fifo);
#endif
len = *data;
len = SWAP(len); /* Careful of macro side-effects */
#ifdef ESDEBUG
if (esdebug)
kprintf (" length %d", len);
printf (" length %d", len);
#endif
smc->b2.ptr = PTR_RCV | (PTR_AUTOINCR + PTR_READ) | SWAP(0x0000);
(void) smc->b2.mmucr;
@ -580,7 +580,7 @@ esrint(sc)
if (pktctlw & RFSW_ODDFRM)
pktlen++;
if (len > 1530) {
kprintf("%s: Corrupted packet length-sts %04x bytcnt %04x len %04x bank %04x\n",
printf("%s: Corrupted packet length-sts %04x bytcnt %04x len %04x bank %04x\n",
sc->sc_dev.dv_xname, pktctlw, pktlen, len, smc->b2.bsr);
/* XXX ignore packet, or just truncate? */
#if defined(ESDEBUG) && defined(DDB)
@ -594,7 +594,7 @@ esrint(sc)
++sc->sc_arpcom.ac_if.if_ierrors;
#ifdef ESDEBUG
if (--sc->sc_smcbusy) {
kprintf("%s: esrintr busy on bad packet exit\n",
printf("%s: esrintr busy on bad packet exit\n",
sc->sc_dev.dv_xname);
panic("esrintr busy on exit");
}
@ -623,28 +623,28 @@ esrint(sc)
;
#ifdef ESDEBUG
if (pktctlw & (RFSW_ALGNERR | RFSW_BADCRC | RFSW_TOOLNG | RFSW_TOOSHORT)) {
kprintf ("%s: Packet error %04x\n", sc->sc_dev.dv_xname, pktctlw);
printf ("%s: Packet error %04x\n", sc->sc_dev.dv_xname, pktctlw);
/* count input error? */
}
if (esdebug) {
kprintf (" pktctlw %04x pktlen %04x fifo %04x\n", pktctlw, pktlen,
printf (" pktctlw %04x pktlen %04x fifo %04x\n", pktctlw, pktlen,
smc->b2.fifo);
for (i = 0; i < pktlen; ++i)
kprintf ("%02x%s", pktbuf[i], ((i & 31) == 31) ? "\n" :
printf ("%02x%s", pktbuf[i], ((i & 31) == 31) ? "\n" :
"");
if (i & 31)
kprintf ("\n");
printf ("\n");
}
#endif
#else /* USEPKTBUF */
/* XXX copy directly from controller to mbuf */
#ifdef ESDEBUG
if (pktctlw & (RFSW_ALGNERR | RFSW_BADCRC | RFSW_TOOLNG | RFSW_TOOSHORT)) {
kprintf ("%s: Packet error %04x\n", sc->sc_dev.dv_xname, pktctlw);
printf ("%s: Packet error %04x\n", sc->sc_dev.dv_xname, pktctlw);
/* count input error? */
}
if (esdebug) {
kprintf (" pktctlw %04x pktlen %04x fifo %04x\n", pktctlw, pktlen,
printf (" pktctlw %04x pktlen %04x fifo %04x\n", pktctlw, pktlen,
smc->b2.fifo);
}
#endif
@ -691,10 +691,10 @@ esrint(sc)
if (esdebug) {
buf = mtod(m, u_short *);
for (i = 0; i < len; ++i)
kprintf ("%02x%s", ((u_char *)buf)[i],
printf ("%02x%s", ((u_char *)buf)[i],
((i & 31) == 31) ? "\n" : "");
if (i & 31)
kprintf ("\n");
printf ("\n");
}
#endif
#endif /* USEPKTBUF */
@ -737,7 +737,7 @@ esrint(sc)
ether_input(ifp, eh, top);
#ifdef ESDEBUG
if (--sc->sc_smcbusy) {
kprintf("%s: esintr busy on exit\n", sc->sc_dev.dv_xname);
printf("%s: esintr busy on exit\n", sc->sc_dev.dv_xname);
panic("esintr busy on exit");
}
#endif
@ -780,11 +780,11 @@ esstart(ifp)
#ifdef ESDEBUG
if (sc->sc_smcbusy++) {
kprintf("%s: esstart re-entered\n", sc->sc_dev.dv_xname);
printf("%s: esstart re-entered\n", sc->sc_dev.dv_xname);
panic("esstart re-entred");
}
while ((smc->b2.bsr & BSR_MASK) != BSR_BANK2) {
kprintf("%s: esstart BSR not 2: %04x\n", sc->sc_dev.dv_xname,
printf("%s: esstart BSR not 2: %04x\n", sc->sc_dev.dv_xname,
smc->b2.bsr);
smc->b2.bsr = BSR_BANK2;
}
@ -802,7 +802,7 @@ esstart(ifp)
break;
#ifdef ESDEBUG
if (esdebug && (m->m_next || m->m_len & 1))
kprintf("%s: esstart m_next %p m_len %d\n",
printf("%s: esstart m_next %p m_len %d\n",
sc->sc_dev.dv_xname, m->m_next, m->m_len);
#endif
for (m0 = m, pktlen = 0; m0; m0 = m0->m_next)
@ -826,7 +826,7 @@ esstart(ifp)
#ifdef ESDEBUG
while ((smc->b2.bsr & BSR_MASK) != BSR_BANK2) {
kprintf("%s: esstart+ BSR not 2: %04x\n", sc->sc_dev.dv_xname,
printf("%s: esstart+ BSR not 2: %04x\n", sc->sc_dev.dv_xname,
smc->b2.bsr);
smc->b2.bsr = BSR_BANK2;
}
@ -839,7 +839,7 @@ esstart(ifp)
*data = SWAP(pktlen);
#ifdef ESDEBUG
while ((smc->b2.bsr & BSR_MASK) != BSR_BANK2) {
kprintf("%s: esstart++ BSR not 2: %04x\n", sc->sc_dev.dv_xname,
printf("%s: esstart++ BSR not 2: %04x\n", sc->sc_dev.dv_xname,
smc->b2.bsr);
smc->b2.bsr = BSR_BANK2;
}
@ -858,7 +858,7 @@ esstart(ifp)
pktlen -= 4;
#ifdef ESDEBUG
if (pktlen > sizeof(pktbuf) && i > (sizeof(pktbuf) * 2))
kprintf("%s: esstart packet longer than pktbuf\n",
printf("%s: esstart packet longer than pktbuf\n",
sc->sc_dev.dv_xname);
#endif
#if 0 /* doesn't quite work? */
@ -874,7 +874,7 @@ esstart(ifp)
#else
#ifdef ESDEBUG
while ((smc->b2.bsr & BSR_MASK) != BSR_BANK2) {
kprintf("%s: esstart++2 BSR not 2: %04x\n", sc->sc_dev.dv_xname,
printf("%s: esstart++2 BSR not 2: %04x\n", sc->sc_dev.dv_xname,
smc->b2.bsr);
smc->b2.bsr = BSR_BANK2;
}
@ -903,7 +903,7 @@ esstart(ifp)
if (m->m_len & 1)
pktctlw = (*buf & 0xff00) | CTLB_ODD;
if (m->m_len & 1 && m->m_next)
kprintf("%s: esstart odd byte count in mbuf\n",
printf("%s: esstart odd byte count in mbuf\n",
sc->sc_dev.dv_xname);
}
*data = pktctlw;
@ -919,12 +919,12 @@ esstart(ifp)
* retransmitting the buffer. mhitch
*/
#ifdef DIAGNOSTIC
kprintf("%s: esstart+++ BSR not 2: %04x\n",
printf("%s: esstart+++ BSR not 2: %04x\n",
sc->sc_dev.dv_xname, smc->b2.bsr);
#endif
smc->b2.bsr = BSR_BANK2;
#ifdef ESDEBUG
kprintf("start_ptr %04x end_ptr %04x cur ptr %04x\n",
printf("start_ptr %04x end_ptr %04x cur ptr %04x\n",
start_ptr, end_ptr, SWAP(smc->b2.ptr));
--sc->sc_smcbusy;
#endif
@ -934,7 +934,7 @@ esstart(ifp)
}
smc->b2.mmucr = MMUCR_ENQ_TX;
if (smc->b2.pnr != active_pnr)
kprintf("%s: esstart - PNR changed %x->%x\n",
printf("%s: esstart - PNR changed %x->%x\n",
sc->sc_dev.dv_xname, active_pnr, smc->b2.pnr);
#if NBPFILTER > 0
if (sc->sc_arpcom.ac_if.if_bpf)
@ -947,12 +947,12 @@ esstart(ifp)
smc->b2.msk = sc->sc_intctl;
#ifdef ESDEBUG
while ((smc->b2.bsr & BSR_MASK) != BSR_BANK2) {
kprintf("%s: esstart++++ BSR not 2: %04x\n", sc->sc_dev.dv_xname,
printf("%s: esstart++++ BSR not 2: %04x\n", sc->sc_dev.dv_xname,
smc->b2.bsr);
smc->b2.bsr = BSR_BANK2;
}
if (--sc->sc_smcbusy) {
kprintf("%s: esstart busy on exit\n", sc->sc_dev.dv_xname);
printf("%s: esstart busy on exit\n", sc->sc_dev.dv_xname);
panic("esstart busy on exit");
}
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_qn.c,v 1.8 1996/10/10 23:56:09 christos Exp $ */
/* $NetBSD: if_qn.c,v 1.9 1996/10/13 03:07:18 christos Exp $ */
/*
* Copyright (c) 1995 Mika Kortelainen
@ -258,7 +258,7 @@ qnattach(parent, self, aux)
ether_ifattach(ifp);
#ifdef QN_DEBUG
kprintf(": hardware address %s\n", ether_sprintf(sc->sc_arpcom.ac_enaddr));
printf(": hardware address %s\n", ether_sprintf(sc->sc_arpcom.ac_enaddr));
#endif
#if NBPFILTER > 0

View File

@ -1,4 +1,4 @@
/* $NetBSD: ite.c,v 1.45 1996/10/12 17:27:28 mhitch Exp $ */
/* $NetBSD: ite.c,v 1.46 1996/10/13 03:07:19 christos Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -221,15 +221,15 @@ iteattach(pdp, dp, auxp)
alloc_sicallback();
iteinit(gp->g_itedev);
kprintf(": rows %d cols %d", ip->rows, ip->cols);
kprintf(" repeat at (%d/100)s next at (%d/100)s",
printf(": rows %d cols %d", ip->rows, ip->cols);
printf(" repeat at (%d/100)s next at (%d/100)s",
start_repeat_timeo, next_repeat_timeo);
if (kbd_ite == NULL)
kbd_ite = ip;
if (kbd_ite == ip)
kprintf(" has keyboard");
kprintf("\n");
printf(" has keyboard");
printf("\n");
} else {
if (con_itesoftc.grf != NULL &&
con_itesoftc.grf->g_conpri > gp->g_conpri)
@ -1749,7 +1749,7 @@ iteputchar(c, ip)
break;
case 6:
/* cursor position report */
ksprintf(ip->argbuf, "\033[%d;%dR",
sprintf(ip->argbuf, "\033[%d;%dR",
ip->cury + 1, ip->curx + 1);
ite_sendstr(ip->argbuf);
break;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ite_ul.c,v 1.6 1996/10/10 23:56:13 christos Exp $ */
/* $NetBSD: ite_ul.c,v 1.7 1996/10/13 03:07:20 christos Exp $ */
/*
* Copyright (c) 1995 Ignatios Souvatzis
@ -217,7 +217,7 @@ ulowell_init(ip)
*/
#ifdef UL_DEBUG
kprintf("ulowell_init: %d %d %d %d %d %d\n", ip->ftwidth, ip->ftheight,
printf("ulowell_init: %d %d %d %d %d %d\n", ip->ftwidth, ip->ftheight,
ip->ftbaseline, ip->font_lo, ip->font_hi, ip->ftboldsmear);
#endif
}
@ -306,7 +306,7 @@ static void screen_up (struct ite_softc *ip, int top, int bottom, int lines)
ba = (struct gspregs *)ip->grf->g_regkva;
#ifdef DEBUG_UL
kprintf("screen_up %d %d %d ->",top,bottom,lines);
printf("screen_up %d %d %d ->",top,bottom,lines);
#endif
/* do some bounds-checking here.. */
@ -340,7 +340,7 @@ static void screen_down (struct ite_softc *ip, int top, int bottom, int lines)
ba = (struct gspregs *)ip->grf->g_regkva;
#ifdef DEBUG_UL
kprintf("screen_down %d %d %d ->",top,bottom,lines);
printf("screen_down %d %d %d ->",top,bottom,lines);
#endif
/* do some bounds-checking here.. */
@ -397,7 +397,7 @@ void ulowell_clear(struct ite_softc *ip, int sy, int sx, int h, int w)
u_int16_t cmd[7];
#ifdef DEBUG_UL
kprintf("ulowell_clear %d %d %d %d ->",sy,sx,h,w);
printf("ulowell_clear %d %d %d %d ->",sy,sx,h,w);
#endif
ba = (struct gspregs *)ip->grf->g_regkva;
@ -420,7 +420,7 @@ void ulowell_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir)
ba = (struct gspregs *)ip->grf->g_regkva;
#ifdef DEBUG_UL
kprintf("ulowell_scroll %d %d %d %d ->",sy,sx,count,dir);
printf("ulowell_scroll %d %d %d %d ->",sy,sx,count,dir);
#endif
ulowell_cursor(ip, ERASE_CURSOR);
@ -458,10 +458,10 @@ gsp_dump(cmd,len)
u_int16_t *cmd;
int len;
{
kprintf("gsp");
printf("gsp");
while (len-- > 0)
kprintf(" %lx",*cmd++);
kprintf("\n");
printf(" %lx",*cmd++);
printf("\n");
}
#endif
#endif /* NGRFUL */

View File

@ -1,4 +1,4 @@
/* $NetBSD: ivsc.c,v 1.18 1996/10/10 23:56:14 christos Exp $ */
/* $NetBSD: ivsc.c,v 1.19 1996/10/13 03:07:21 christos Exp $ */
/*
* Copyright (c) 1994 Michael L. Hitch
@ -74,7 +74,7 @@ struct scsi_device ivsc_scsidev = {
#ifdef DEBUG
extern int sci_debug;
#define QPRINTF(a) if (sci_debug > 1) kprintf a
#define QPRINTF(a) if (sci_debug > 1) printf a
#else
#define QPRINTF(a)
#endif
@ -123,7 +123,7 @@ ivscattach(pdp, dp, auxp)
struct sci_softc *sc;
struct zbus_args *zap;
kprintf("\n");
printf("\n");
zap = auxp;
@ -198,7 +198,7 @@ ivsc_dma_xfer_in (dev, len, buf, phase)
|| --wait < 0) {
#ifdef DEBUG
if (sci_debug)
kprintf("ivsc_dma_in2 fail: l%d i%x w%d\n",
printf("ivsc_dma_in2 fail: l%d i%x w%d\n",
len, *dev->sci_bus_csr, wait);
#endif
*dev->sci_mode &= ~SCI_MODE_DMA;
@ -235,7 +235,7 @@ ivsc_dma_xfer_in (dev, len, buf, phase)
|| --wait < 0) {
#ifdef DEBUG
if (sci_debug)
kprintf("ivsc_dma_in1 fail: l%d i%x w%d\n",
printf("ivsc_dma_in1 fail: l%d i%x w%d\n",
len, *dev->sci_bus_csr, wait);
#endif
*dev->sci_mode &= ~SCI_MODE_DMA;
@ -285,7 +285,7 @@ ivsc_dma_xfer_out (dev, len, buf, phase)
|| --wait < 0) {
#ifdef DEBUG
if (sci_debug)
kprintf("ivsc_dma_out fail: l%d i%x w%d\n",
printf("ivsc_dma_out fail: l%d i%x w%d\n",
len, *dev->sci_bus_csr, wait);
#endif
*dev->sci_mode &= ~SCI_MODE_DMA;

View File

@ -1,4 +1,4 @@
/* $NetBSD: kbd.c,v 1.25 1996/10/11 21:12:51 mhitch Exp $ */
/* $NetBSD: kbd.c,v 1.26 1996/10/13 03:07:22 christos Exp $ */
/*
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@ -112,16 +112,16 @@ kbdattach(pdp, dp, auxp)
case 0:
case 1:
case 2:
kprintf(": CIA A type Amiga\n");
printf(": CIA A type Amiga\n");
break;
case 3:
case 4:
default:
kprintf(": QuickLogic type MF-II\n");
printf(": QuickLogic type MF-II\n");
break;
}
#else
kprintf(": CIA A type Amiga\n");
printf(": CIA A type Amiga\n");
#endif
}
@ -303,7 +303,7 @@ kbdintr(mask)
#ifdef KBDRESET
if (reset_warn && c == 0xf0) {
#ifdef DEBUG
kprintf ("kbdintr: !!!! Reset Warning !!!!\n");
printf ("kbdintr: !!!! Reset Warning !!!!\n");
#endif
bootsync();
reset_warn = 0;
@ -320,7 +320,7 @@ kbdintr(mask)
#ifdef KBDRESET
if (c == 0x78) {
#ifdef DEBUG
kprintf ("kbdintr: Reset Warning started\n");
printf ("kbdintr: Reset Warning started\n");
#endif
++reset_warn;
return;
@ -387,7 +387,7 @@ kbdgetcn ()
}
splx(s);
#ifdef DRACORAWKEYDEBUG
kprintf("<%02x>", in);
printf("<%02x>", in);
#endif
return (in>=sizeof(drkbdtab) ? 0xff : drkbdtab[in]|c);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: mfc.c,v 1.16 1996/10/10 23:56:18 christos Exp $ */
/* $NetBSD: mfc.c,v 1.17 1996/10/13 03:07:23 christos Exp $ */
/*
* Copyright (c) 1994 Michael L. Hitch
@ -347,7 +347,7 @@ mfcattach(pdp, dp, auxp)
zap = auxp;
kprintf ("\n");
printf ("\n");
scc = (struct mfc_softc *)dp;
unit = scc->sc_dev.dv_unit;
@ -429,7 +429,7 @@ mfcsattach(pdp, dp, auxp)
ma = auxp;
if (dp) {
kprintf (": input fifo %d output fifo %d\n", SERIBUF_SIZE,
printf (": input fifo %d output fifo %d\n", SERIBUF_SIZE,
SEROBUF_SIZE);
alloc_sicallback();
}
@ -774,7 +774,7 @@ mfcsparam(tp, t)
scc->imask |= (0x2 << ((unit & 1) * 4)) | 0x80;
scc->sc_regs->du_imr = scc->imask;
#if defined(DEBUG) && 0
kprintf("mfcsparam: speed %d => %x ct %d imask %x cflag %x\n",
printf("mfcsparam: speed %d => %x ct %d imask %x cflag %x\n",
t->c_ospeed, ospeed, scc->ct_val, scc->imask, cflag);
#endif
if (ospeed == 0)
@ -1040,7 +1040,7 @@ mfcintr(arg)
}
if (istat & 0x80) { /* input port change interrupt */
c = regs->du_ipcr;
kprintf ("%s: ipcr %02x", scc->sc_dev.dv_xname, c);
printf ("%s: ipcr %02x", scc->sc_dev.dv_xname, c);
}
return(1);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: mgnsc.c,v 1.21 1996/10/10 23:56:19 christos Exp $ */
/* $NetBSD: mgnsc.c,v 1.22 1996/10/13 03:07:24 christos Exp $ */
/*
* Copyright (c) 1994 Michael L. Hitch
@ -108,7 +108,7 @@ mgnscattach(pdp, dp, auxp)
struct zbus_args *zap;
siop_regmap_p rp;
kprintf("\n");
printf("\n");
zap = auxp;
sc = (struct siop_softc *)dp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: mlhsc.c,v 1.13 1996/10/10 23:56:21 christos Exp $ */
/* $NetBSD: mlhsc.c,v 1.14 1996/10/13 03:07:25 christos Exp $ */
/*
* Copyright (c) 1994 Michael L. Hitch
@ -71,7 +71,7 @@ struct scsi_device mlhsc_scsidev = {
#ifdef DEBUG
extern int sci_debug;
#define QPRINTF(a) if (sci_debug > 1) kprintf a
#define QPRINTF(a) if (sci_debug > 1) printf a
#else
#define QPRINTF(a)
#endif
@ -116,7 +116,7 @@ mlhscattach(pdp, dp, auxp)
struct sci_softc *sc;
struct zbus_args *zap;
kprintf("\n");
printf("\n");
zap = auxp;
@ -187,7 +187,7 @@ mlhsc_dma_xfer_in (dev, len, buf, phase)
|| --wait < 0) {
#ifdef DEBUG
if (sci_debug)
kprintf("mlhdma_in fail: l%d i%x w%d\n",
printf("mlhdma_in fail: l%d i%x w%d\n",
len, csr, wait);
#endif
*dev->sci_mode &= ~SCI_MODE_DMA;
@ -223,7 +223,7 @@ mlhsc_dma_xfer_in (dev, len, buf, phase)
|| --wait < 0) {
#ifdef DEBUG
if (sci_debug)
kprintf("mlhdma_in fail: l%d i%x w%d\n",
printf("mlhdma_in fail: l%d i%x w%d\n",
len, csr, wait);
#endif
*dev->sci_mode &= ~SCI_MODE_DMA;
@ -276,7 +276,7 @@ mlhsc_dma_xfer_out (dev, len, buf, phase)
|| --wait < 0) {
#ifdef DEBUG
if (sci_debug)
kprintf("mlhdma_out fail: l%d i%x w%d\n",
printf("mlhdma_out fail: l%d i%x w%d\n",
len, csr, wait);
#endif
*dev->sci_mode &= ~SCI_MODE_DMA;
@ -304,7 +304,7 @@ mlhsc_dma_xfer_out (dev, len, buf, phase)
|| --wait < 0) {
#ifdef DEBUG
if (sci_debug)
kprintf("mlhdma_out fail: l%d i%x w%d\n",
printf("mlhdma_out fail: l%d i%x w%d\n",
len, csr, wait);
#endif
*dev->sci_mode &= ~SCI_MODE_DMA;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ms.c,v 1.12 1996/10/11 21:12:53 mhitch Exp $ */
/* $NetBSD: ms.c,v 1.13 1996/10/13 03:07:26 christos Exp $ */
/*
* based on:
@ -119,7 +119,7 @@ msattach(pdp, dp, auxp)
struct device *pdp, *dp;
void *auxp;
{
kprintf("\n");
printf("\n");
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: msc.c,v 1.9 1996/10/10 23:56:23 christos Exp $ */
/* $NetBSD: msc.c,v 1.10 1996/10/13 03:07:26 christos Exp $ */
/*
* Copyright (c) 1993 Zik.
@ -191,12 +191,12 @@ bugi(msc, string)
mscmem = msc->board;
ms = &mscmem->Status[msc->port];
kprintf("msc %s u%d f%08lx F%08lx\n", string, msc->port, msc->flags,
printf("msc %s u%d f%08lx F%08lx\n", string, msc->port, msc->flags,
msc->openflags);
kprintf("msc h%d t%d H%d t%d p%02x c%02x CD%02x\n", ms->InHead,
printf("msc h%d t%d H%d t%d p%02x c%02x CD%02x\n", ms->InHead,
ms->InTail, ms->OutHead, ms->OutTail, ms->Param, ms->Command,
ms->chCD);
kprintf("msc a%02x b%02x c%02x\n", ms->Pad_a, ms->Pad_b, ms->Padc);
printf("msc a%02x b%02x c%02x\n", ms->Pad_a, ms->Pad_b, ms->Padc);
return
}
@ -232,26 +232,26 @@ mscattach(pdp, dp, auxp)
unit = dp->dv_unit;
if (mscinitcard(zap) != 0) {
kprintf("\nmsc%d: Board initialize failed, bad download code.\n", unit);
printf("\nmsc%d: Board initialize failed, bad download code.\n", unit);
return;
}
kprintf("\nmsc%d: Board successfully initialized.\n", unit);
printf("\nmsc%d: Board successfully initialized.\n", unit);
mscmem = (struct mscmemory *) zap->va;
if (mscmem->Common.Crystal == MSC_UNKNOWN) {
kprintf("msc%d: Unable to detect crystal frequency.\n", unit);
printf("msc%d: Unable to detect crystal frequency.\n", unit);
return;
}
if (mscmem->Common.Crystal == MSC_TURBO) {
kprintf("msc%d: Turbo version detected (%02x%02x:%d)\n", unit,
printf("msc%d: Turbo version detected (%02x%02x:%d)\n", unit,
mscmem->Common.TimerH, mscmem->Common.TimerL,
mscmem->Common.Pad_a);
mscspeedtab = mscspeedtab_turbo;
} else {
kprintf("msc%d: Normal version detected (%02x%02x:%d)\n", unit,
printf("msc%d: Normal version detected (%02x%02x:%d)\n", unit,
mscmem->Common.TimerH, mscmem->Common.TimerL,
mscmem->Common.Pad_a);
mscspeedtab = mscspeedtab_normal;
@ -413,7 +413,7 @@ mscopen(dev, flag, mode, p)
tp->t_state |= TS_WOPEN;
#if DEBUG_CD
kprintf("msc %ld waiting for CD\n", MSCLINE(dev));
printf("msc %ld waiting for CD\n", MSCLINE(dev));
#endif
error = ttysleep(tp, (caddr_t)&tp->t_rawq, TTIPRI | PCATCH, ttopen, 0);
@ -425,7 +425,7 @@ mscopen(dev, flag, mode, p)
done:
#if DEBUG_CD
kprintf("msc %ld waiting for CD\n", MSCLINE(dev));
printf("msc %ld waiting for CD\n", MSCLINE(dev));
#endif
/* This is a way to handle lost XON characters */
if ((flag & O_TRUNC) && (tp->t_state & TS_TTSTOP)) {
@ -583,7 +583,7 @@ mscmint (data)
if (newhead != (bufpos = ms->InTail))
{
#if DEBUG_MSC
kprintf("iop%d\n",slot);
printf("iop%d\n",slot);
#endif
/* buffer for input chars/events */
ibuf = &msc->board->InBuf[msc->port][0];
@ -604,7 +604,7 @@ mscmint (data)
/* carrier detect change OFF -> ON */
case MSCEVENT_CarrierOn:
#if DEBUG_CD
kprintf("msc CD ON %d\n", msc->port);
printf("msc CD ON %d\n", msc->port);
#endif
msc->flags |= TIOCM_CD;
if (MSCDIALIN(tp->t_dev))
@ -614,7 +614,7 @@ mscmint (data)
/* carrier detect change ON -> OFF */
case MSCEVENT_CarrierOff:
#if DEBUG_CD
kprintf("msc CD OFF %d\n", msc->port);
printf("msc CD OFF %d\n", msc->port);
#endif
msc->flags &= ~TIOCM_CD;
#ifndef MSCCDHACK
@ -635,13 +635,13 @@ mscmint (data)
case MSCEVENT_Break:
#if DEBUG_MSC
kprintf("Break received on msc%d\n", slot);
printf("Break received on msc%d\n", slot);
#endif
(*linesw[tp->t_line].l_rint)(TTY_FE, tp);
break;
default:
kprintf("msc: unknown event type %d\n",
printf("msc: unknown event type %d\n",
ibuf[(bufpos-1)&0xff]);
} /* event type switch */
@ -652,7 +652,7 @@ mscmint (data)
if (ms->chCD) {
/* Carrier detect ON -> OFF */
#if DEBUG_CD
kprintf("msc CD OFF blocked %d msc->flags %08lx\n",
printf("msc CD OFF blocked %d msc->flags %08lx\n",
msc->port, msc->flags);
#endif
msc->flags &= ~TIOCM_CD;
@ -674,13 +674,13 @@ mscmint (data)
goto NoRoomForYa;
}
#if DEBUG_MSC
kprintf("'%c' ",ibuf[bufpos]);
printf("'%c' ",ibuf[bufpos]);
#endif
(*linesw[tp->t_line].l_rint)((int)ibuf[bufpos++], tp);
break;
default:
kprintf("msc: unknown data type %d\n", cbuf[bufpos]);
printf("msc: unknown data type %d\n", cbuf[bufpos]);
bufpos++;
} /* switch on input data type */
@ -728,7 +728,7 @@ NoRoomForYa:
if (newhead != (bufpos = ms->InTail))
{
#if DEBUG_MSC
kprintf("icp%d\n",slot);
printf("icp%d\n",slot);
#endif
/* buffer for input chars/events */
ibuf = &msc->board->InBuf[msc->port][0];
@ -749,7 +749,7 @@ NoRoomForYa:
/* carrier detect change OFF -> ON */
case MSCEVENT_CarrierOn:
#if DEBUG_CD
kprintf("msc CD ON %d (closed)\n", msc->port);
printf("msc CD ON %d (closed)\n", msc->port);
#endif
msc->flags |= TIOCM_CD;
break;
@ -757,7 +757,7 @@ NoRoomForYa:
/* carrier detect change ON -> OFF */
case MSCEVENT_CarrierOff:
#if DEBUG_CD
kprintf("msc CD OFF %d (closed)\n", msc->port);
printf("msc CD OFF %d (closed)\n", msc->port);
#endif
msc->flags &= ~TIOCM_CD;
#ifndef MSCCDHACK
@ -778,7 +778,7 @@ NoRoomForYa:
break;
default:
kprintf("msc: unknown event type %d\n",
printf("msc: unknown event type %d\n",
ibuf[(bufpos-1)&0xff]);
} /* event type switch */
@ -1005,7 +1005,7 @@ mschwiflow(tp, flag)
/* Rob's version */
#if 1
#if DEBUG_MSC
kprintf("mschwiflow %d\n", flag);
printf("mschwiflow %d\n", flag);
#endif
if (flag)
@ -1065,7 +1065,7 @@ mscstart(tp)
slot = MSCSLOT(tp->t_dev);
#if 0
kprintf("starting msc%d\n", slot);
printf("starting msc%d\n", slot);
#endif
s = spltty();
@ -1122,7 +1122,7 @@ mscstart(tp)
#if 0
msc->tmpbuf[cc] = 0;
kprintf("sending '%s'\n", msctmpbuf);
printf("sending '%s'\n", msctmpbuf);
#endif
/* send the first char across to reduce latency */
@ -1172,7 +1172,7 @@ mscstop(tp, flag)
#if 0
msc = &mscdev[MSCSLOT(tp->t_dev)];
ms = &msc->board->Status[msc->port];
kprintf("stopped output on msc%d\n", MSCSLOT(tp->t_dev));
printf("stopped output on msc%d\n", MSCSLOT(tp->t_dev));
ms->OutDisable = TRUE;
#endif
}
@ -1297,9 +1297,9 @@ mscinitcard(zap)
to += start;
#if DEBUG_MSC
kprintf("\n** copying %ld bytes from %08lx to %08lx (start=%04lx)\n",
printf("\n** copying %ld bytes from %08lx to %08lx (start=%04lx)\n",
(unsigned long)bcount, (unsigned long)from, to, start);
kprintf("First byte to copy is %02lx\n", *from);
printf("First byte to copy is %02lx\n", *from);
#endif
while(bcount--) *to++ = *from++;

View File

@ -1,4 +1,4 @@
/* $NetBSD: otgsc.c,v 1.14 1996/10/10 23:56:24 christos Exp $ */
/* $NetBSD: otgsc.c,v 1.15 1996/10/13 03:07:27 christos Exp $ */
/*
* Copyright (c) 1994 Michael L. Hitch
@ -73,7 +73,7 @@ struct scsi_device otgsc_scsidev = {
#ifdef DEBUG
extern int sci_debug;
#define QPRINTF(a) if (sci_debug > 1) kprintf a
#define QPRINTF(a) if (sci_debug > 1) printf a
#else
#define QPRINTF(a)
#endif
@ -118,7 +118,7 @@ otgscattach(pdp, dp, auxp)
struct sci_softc *sc;
struct zbus_args *zap;
kprintf("\n");
printf("\n");
zap = auxp;
@ -191,7 +191,7 @@ otgsc_dma_xfer_in (dev, len, buf, phase)
|| --wait < 0) {
#ifdef DEBUG
if (sci_debug)
kprintf("otgsc_dma_in fail: l%d i%x w%d\n",
printf("otgsc_dma_in fail: l%d i%x w%d\n",
len, *dev->sci_bus_csr, wait);
#endif
*dev->sci_mode &= ~SCI_MODE_DMA;
@ -241,7 +241,7 @@ otgsc_dma_xfer_out (dev, len, buf, phase)
|| --wait < 0) {
#ifdef DEBUG
if (sci_debug)
kprintf("otgsc_dma_out fail: l%d i%x w%d\n",
printf("otgsc_dma_out fail: l%d i%x w%d\n",
len, *dev->sci_bus_csr, wait);
#endif
*dev->sci_mode &= ~SCI_MODE_DMA;

View File

@ -1,4 +1,4 @@
/* $NetBSD: par.c,v 1.14 1996/10/10 23:56:25 christos Exp $ */
/* $NetBSD: par.c,v 1.15 1996/10/13 03:07:28 christos Exp $ */
/*
* Copyright (c) 1982, 1990 The Regents of the University of California.
@ -133,7 +133,7 @@ parattach(pdp, dp, auxp)
if ((pardebug & PDB_NOCHECK) == 0)
#endif
par_softcp->sc_flags = PARF_ALIVE;
kprintf("\n");
printf("\n");
}
int
@ -150,9 +150,9 @@ paropen(dev, flags, mode, p)
return(ENXIO);
#ifdef DEBUG
if (pardebug & PDB_FOLLOW) {
kprintf("paropen(%x, %x): flags %x, ",
printf("paropen(%x, %x): flags %x, ",
dev, flags, sc->sc_flags);
kprintf ("port = $%x\n", ((ciab.pra ^ CIAB_PRA_SEL)
printf ("port = $%x\n", ((ciab.pra ^ CIAB_PRA_SEL)
& (CIAB_PRA_SEL|CIAB_PRA_BUSY|CIAB_PRA_POUT)));
}
#endif
@ -189,7 +189,7 @@ parclose(dev, flags, mode, p)
#ifdef DEBUG
if (pardebug & PDB_FOLLOW)
kprintf("parclose(%x, %x): flags %x\n",
printf("parclose(%x, %x): flags %x\n",
dev, flags, sc->sc_flags);
#endif
sc->sc_flags &= ~(PARF_OPEN|PARF_OREAD|PARF_OWRITE);
@ -209,7 +209,7 @@ parstart(arg)
sc = getparsp(unit);
#ifdef DEBUG
if (pardebug & PDB_FOLLOW)
kprintf("parstart(%x)\n", unit);
printf("parstart(%x)\n", unit);
#endif
sc->sc_flags &= ~PARF_DELAY;
wakeup(sc);
@ -226,7 +226,7 @@ partimo(arg)
sc = getparsp(unit);
#ifdef DEBUG
if (pardebug & PDB_FOLLOW)
kprintf("partimo(%x)\n", unit);
printf("partimo(%x)\n", unit);
#endif
sc->sc_flags &= ~(PARF_UIO|PARF_TIMO);
wakeup(sc);
@ -241,7 +241,7 @@ parread(dev, uio, flags)
#ifdef DEBUG
if (pardebug & PDB_FOLLOW)
kprintf("parread(%x, %p)\n", dev, uio);
printf("parread(%x, %p)\n", dev, uio);
#endif
return (parrw(dev, uio));
}
@ -256,7 +256,7 @@ parwrite(dev, uio, flags)
#ifdef DEBUG
if (pardebug & PDB_FOLLOW)
kprintf("parwrite(%x, %p)\n", dev, uio);
printf("parwrite(%x, %p)\n", dev, uio);
#endif
return (parrw(dev, uio));
}
@ -285,7 +285,7 @@ parrw(dev, uio)
#ifdef DEBUG
if (pardebug & (PDB_FOLLOW|PDB_IO))
kprintf("parrw(%x, %p, %c): burst %d, timo %d, resid %x\n",
printf("parrw(%x, %p, %c): burst %d, timo %d, resid %x\n",
dev, uio, uio->uio_rw == UIO_READ ? 'R' : 'W',
sc->sc_burst, sc->sc_timo, uio->uio_resid);
#endif
@ -321,7 +321,7 @@ again:
{
#ifdef DEBUG
if (pardebug & PDB_IO)
kprintf("parrw: uiomove/sleep timo, flags %x\n",
printf("parrw: uiomove/sleep timo, flags %x\n",
sc->sc_flags);
#endif
if (sc->sc_flags & PARF_TIMO)
@ -353,7 +353,7 @@ again:
#endif
#ifdef DEBUG
if (pardebug & PDB_IO)
kprintf("parrw: %s(%p, %d) -> %d\n",
printf("parrw: %s(%p, %d) -> %d\n",
uio->uio_rw == UIO_READ ? "recv" : "send", cp, len, cnt);
#endif
splx(s);
@ -381,7 +381,7 @@ again:
{
#ifdef DEBUG
if (pardebug & PDB_IO)
kprintf("parrw: timeout/done\n");
printf("parrw: timeout/done\n");
#endif
splx(s);
break;
@ -433,14 +433,14 @@ again:
uio->uio_resid += (len - cnt);
#ifdef DEBUG
if (pardebug & PDB_IO)
kprintf("parrw: short write, adjust by %d\n",
printf("parrw: short write, adjust by %d\n",
len-cnt);
#endif
}
free(buf, M_DEVBUF);
#ifdef DEBUG
if (pardebug & (PDB_FOLLOW|PDB_IO))
kprintf("parrw: return %d, resid %d\n", error, uio->uio_resid);
printf("parrw: return %d, resid %d\n", error, uio->uio_resid);
#endif
return (error);
}
@ -528,7 +528,7 @@ parintr(arg)
#ifdef DEBUG
if (pardebug & PDB_INTERRUPT)
kprintf("parintr %s\n", mask ? "FLG" : "tout");
printf("parintr %s\n", mask ? "FLG" : "tout");
#endif
/*
* if invoked from timeout handler, mask will be 0,
@ -568,7 +568,7 @@ parsendch (ch)
#ifdef DEBUG
if (pardebug & PDB_INTERRUPT)
kprintf ("parsendch, port = $%x\n",
printf ("parsendch, port = $%x\n",
((ciab.pra ^ CIAB_PRA_SEL)
& (CIAB_PRA_SEL|CIAB_PRA_BUSY|CIAB_PRA_POUT)));
#endif
@ -586,7 +586,7 @@ parsendch (ch)
{
#ifdef DEBUG
if (pardebug & PDB_INTERRUPT)
kprintf ("parsendch interrupted, error = %d\n", error);
printf ("parsendch interrupted, error = %d\n", error);
#endif
if (partimeout_pending)
untimeout(parintr, 0);
@ -599,7 +599,7 @@ parsendch (ch)
{
#ifdef DEBUG
if (pardebug & PDB_INTERRUPT)
kprintf ("#%d", ch);
printf ("#%d", ch);
#endif
ciaa.prb = ch;
parsend_pending = 1;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sbic.c,v 1.27 1996/10/10 23:56:27 christos Exp $ */
/* $NetBSD: sbic.c,v 1.28 1996/10/13 03:07:29 christos Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -139,7 +139,7 @@ int sbicdma_bounces = 0; /* number operations using bounce buffer */
int sbicdma_hits = 0; /* number of DMA chains that were contiguous */
int sbicdma_misses = 0; /* number of DMA chains that were not contiguous */
int sbicdma_saves = 0;
#define QPRINTF(a) if (sbic_debug > 1) kprintf a
#define QPRINTF(a) if (sbic_debug > 1) printf a
int sbic_debug = 0;
int sync_debug = 0;
int sbic_dma_debug = 0;
@ -241,7 +241,7 @@ sbic_save_ptrs(dev, regs, target, lun)
do {
GET_SBIC_asr(regs, asr);
if( asr & SBIC_ASR_DBR ) {
kprintf("sbic_save_ptrs: asr %02x canceled!\n", asr);
printf("sbic_save_ptrs: asr %02x canceled!\n", asr);
splx(s);
SBIC_TRACE(dev);
return;
@ -259,9 +259,9 @@ sbic_save_ptrs(dev, regs, target, lun)
SBIC_TC_PUT(regs, 0);
#ifdef DEBUG
if(!count && sbic_debug) kprintf("%dcount0",target);
if(!count && sbic_debug) printf("%dcount0",target);
if(data_pointer_debug == -1)
kprintf("SBIC saving target %d data pointers from (%p,%x)%xASR:%02x",
printf("SBIC saving target %d data pointers from (%p,%x)%xASR:%02x",
target, dev->sc_cur->dc_addr, dev->sc_cur->dc_count,
acb->sc_dmacmd, asr);
#endif
@ -275,7 +275,7 @@ sbic_save_ptrs(dev, regs, target, lun)
acb->sc_tcnt = dev->sc_tcnt = count;
#ifdef DEBUG
if(data_pointer_debug)
kprintf(" at (%p,%x):%x\n",
printf(" at (%p,%x):%x\n",
dev->sc_cur->dc_addr, dev->sc_cur->dc_count,count);
sbicdma_saves++;
#endif
@ -342,7 +342,7 @@ void sbic_load_ptrs(dev, regs, target, lun)
#ifdef DEBUG
if(data_pointer_debug)
kprintf("DMA recalc:kv(%p,%x)pa(%p,%lx)\n",
printf("DMA recalc:kv(%p,%x)pa(%p,%lx)\n",
acb->sc_kv.dc_addr,
acb->sc_kv.dc_count,
acb->sc_pa.dc_addr,
@ -352,7 +352,7 @@ void sbic_load_ptrs(dev, regs, target, lun)
splx(s);
#ifdef DEBUG
if(data_pointer_debug)
kprintf("SBIC restoring target %d data pointers at (%p,%x)%x\n",
printf("SBIC restoring target %d data pointers at (%p,%x)%x\n",
target, dev->sc_cur->dc_addr, dev->sc_cur->dc_count,
dev->sc_dmacmd);
#endif
@ -397,7 +397,7 @@ sbic_scsicmd(xs)
if (acb == NULL) {
#ifdef DEBUG
kprintf("sbic_scsicmd: unable to queue request for target %d\n",
printf("sbic_scsicmd: unable to queue request for target %d\n",
slp->target);
#ifdef DDB
Debugger();
@ -514,7 +514,7 @@ sbic_sched(dev)
#ifdef DEBUG
if( data_pointer_debug > 1 )
kprintf("sbic_sched(%d,%d)\n",slp->target,slp->lun);
printf("sbic_sched(%d,%d)\n",slp->target,slp->lun);
#endif
dev->sc_stat[0] = -1;
dev->target = slp->target;
@ -550,7 +550,7 @@ sbic_scsidone(acb, stat)
SBIC_TRACE(dev);
#ifdef DIAGNOSTIC
if (acb == NULL || xs == NULL) {
kprintf("sbic_scsidone -- (%d,%d) no scsi_xfer\n",
printf("sbic_scsidone -- (%d,%d) no scsi_xfer\n",
dev->target, dev->lun);
#ifdef DDB
Debugger();
@ -565,7 +565,7 @@ sbic_scsidone(acb, stat)
#ifdef DEBUG
if( data_pointer_debug > 1 )
kprintf("scsidone: (%d,%d)->(%d,%d)%02x\n",
printf("scsidone: (%d,%d)->(%d,%d)%02x\n",
slp->target, slp->lun,
dev->target, dev->lun, stat);
if( xs->sc_link->target == dev->sc_link.adapter_target )
@ -578,7 +578,7 @@ sbic_scsidone(acb, stat)
struct scsi_sense *ss = (void *)&acb->cmd;
#ifdef DEBUG
if (report_sense)
kprintf("sbic_scsidone: autosense %02x targ %d lun %d",
printf("sbic_scsidone: autosense %02x targ %d lun %d",
acb->cmd.opcode, slp->target, slp->lun);
#endif
bzero(ss, sizeof(*ss));
@ -607,7 +607,7 @@ sbic_scsidone(acb, stat)
xs->error = XS_SENSE;
#ifdef DEBUG
if (report_sense)
kprintf(" => %02x %02x\n", xs->sense.flags,
printf(" => %02x %02x\n", xs->sense.flags,
xs->sense.extra_bytes[3]);
#endif
} else {
@ -651,7 +651,7 @@ sbic_scsidone(acb, stat)
else if (acb->chain.tqe_next) {
TAILQ_REMOVE(&dev->ready_list, acb, chain);
} else {
kprintf("%s: can't find matching acb\n",
printf("%s: can't find matching acb\n",
dev->sc_dev.dv_xname);
#ifdef DDB
Debugger();
@ -699,11 +699,11 @@ sbicdmaok(dev, xs)
else if ((dev->sc_tinfo[xs->sc_link->target].bounce
= (char *)alloc_z2mem(MAXPHYS))) {
if (isztwomem(dev->sc_tinfo[xs->sc_link->target].bounce))
kprintf("alloc ZII target %d bounce pa 0x%x\n",
printf("alloc ZII target %d bounce pa 0x%x\n",
xs->sc_link->target,
kvtop(dev->sc_tinfo[xs->sc_link->target].bounce));
else if (dev->sc_tinfo[xs->sc_link->target].bounce)
kprintf("alloc CHIP target %d bounce pa 0x%p\n",
printf("alloc CHIP target %d bounce pa 0x%p\n",
xs->sc_link->target,
PREP_DMA_MEM(dev->sc_tinfo[xs->sc_link->target].bounce));
return(1);
@ -731,7 +731,7 @@ sbicwait(regs, until, timeo, line)
while ((val & until) == 0) {
if (timeo-- == 0) {
GET_SBIC_csr(regs, csr);
kprintf("sbicwait TIMEO @%d with asr=x%x csr=x%x\n",
printf("sbicwait TIMEO @%d with asr=x%x csr=x%x\n",
line, val, csr);
#if defined(DDB) && defined(DEBUG)
Debugger();
@ -757,7 +757,7 @@ sbicabort(dev, regs, where)
GET_SBIC_asr(regs, asr);
GET_SBIC_csr(regs, csr);
kprintf ("%s: abort %s: csr = 0x%02x, asr = 0x%02x\n",
printf ("%s: abort %s: csr = 0x%02x, asr = 0x%02x\n",
dev->sc_dev.dv_xname, where, csr, asr);
@ -779,7 +779,7 @@ sbicabort(dev, regs, where)
/* sbic is jammed w/data. need to clear it */
/* But we don't know what direction it needs to go */
GET_SBIC_data(regs, asr);
kprintf("%s: abort %s: clearing data buffer 0x%02x\n",
printf("%s: abort %s: clearing data buffer 0x%02x\n",
dev->sc_dev.dv_xname, where, asr);
GET_SBIC_asr(regs, asr);
if( asr & SBIC_ASR_DBR ) /* Not the read direction, then */
@ -787,7 +787,7 @@ sbicabort(dev, regs, where)
GET_SBIC_asr(regs, asr);
}
WAIT_CIP(regs);
kprintf("%s: sbicabort - sending ABORT command\n", dev->sc_dev.dv_xname);
printf("%s: sbicabort - sending ABORT command\n", dev->sc_dev.dv_xname);
SET_SBIC_cmd(regs, SBIC_CMD_ABORT);
WAIT_CIP(regs);
@ -795,12 +795,12 @@ kprintf("%s: sbicabort - sending ABORT command\n", dev->sc_dev.dv_xname);
if (asr & (SBIC_ASR_BSY|SBIC_ASR_LCI)) {
/* ok, get more drastic.. */
kprintf("%s: sbicabort - asr %x, trying to reset\n", dev->sc_dev.dv_xname, asr);
printf("%s: sbicabort - asr %x, trying to reset\n", dev->sc_dev.dv_xname, asr);
sbicreset(dev);
dev->sc_flags &= ~SBICF_SELECTED;
return -1;
}
kprintf("%s: sbicabort - sending DISC command\n", dev->sc_dev.dv_xname);
printf("%s: sbicabort - sending DISC command\n", dev->sc_dev.dv_xname);
SET_SBIC_cmd(regs, SBIC_CMD_DISC);
do {
@ -864,7 +864,7 @@ sbicinit(dev)
shift_nosync += 8;
#ifdef DEBUG
if (inhibit_sync)
kprintf("%s: Inhibiting synchronous transfer %02x\n",
printf("%s: Inhibiting synchronous transfer %02x\n",
dev->sc_dev.dv_xname, inhibit_sync);
#endif
for (i = 0; i < 8; ++i)
@ -985,8 +985,8 @@ sbicerror(dev, regs, csr)
if (xs->flags & SCSI_SILENT)
return;
kprintf("%s: ", dev->sc_dev.dv_xname);
kprintf("csr == 0x%02x\n", csr); /* XXX */
printf("%s: ", dev->sc_dev.dv_xname);
printf("csr == 0x%02x\n", csr); /* XXX */
}
/*
@ -1030,7 +1030,7 @@ sbicselectbus(dev, regs, target, lun, our_addr)
GET_SBIC_asr(regs, asr);
if( asr & (SBIC_ASR_INT|SBIC_ASR_BSY) ) {
/* This means we got ourselves reselected upon */
/* kprintf("sbicselectbus: INT/BSY asr %02x\n", asr);*/
/* printf("sbicselectbus: INT/BSY asr %02x\n", asr);*/
#ifdef DDB
/* Debugger();*/
#endif
@ -1050,7 +1050,7 @@ sbicselectbus(dev, regs, target, lun, our_addr)
if (asr & SBIC_ASR_LCI) {
#ifdef DEBUG
if (reselect_debug)
kprintf("sbicselectbus: late LCI asr %02x\n", asr);
printf("sbicselectbus: late LCI asr %02x\n", asr);
#endif
SBIC_TRACE(dev);
return 1;
@ -1061,7 +1061,7 @@ sbicselectbus(dev, regs, target, lun, our_addr)
if( csr == SBIC_CSR_RSLT_NI || csr == SBIC_CSR_RSLT_IFY) {
#ifdef DEBUG
if(reselect_debug)
kprintf("sbicselectbus: reselected asr %02x\n", asr);
printf("sbicselectbus: reselected asr %02x\n", asr);
#endif
/* We need to handle this now so we don't lock up later */
sbicnextstate(dev, csr, asr);
@ -1110,7 +1110,7 @@ sbicselectbus(dev, regs, target, lun, our_addr)
&& dev->sc_sync[id].state == SYNC_START) {
#ifdef DEBUG
if (sync_debug)
kprintf("Forcing target %d asynchronous.\n", id);
printf("Forcing target %d asynchronous.\n", id);
#endif
dev->sc_sync[id].offset = 0;
dev->sc_sync[id].period = sbic_min_period;
@ -1134,7 +1134,7 @@ sbicselectbus(dev, regs, target, lun, our_addr)
#ifdef DEBUG
if (sync_debug)
kprintf("Sending sync request to target %d ... ",
printf("Sending sync request to target %d ... ",
id);
#endif
/*
@ -1154,7 +1154,7 @@ sbicselectbus(dev, regs, target, lun, our_addr)
dev->sc_sync[id].state = SYNC_SENT;
#ifdef DEBUG
if (sync_debug)
kprintf ("sent\n");
printf ("sent\n");
#endif
}
@ -1164,7 +1164,7 @@ sbicselectbus(dev, regs, target, lun, our_addr)
QPRINTF(("[%02x]", csr));
#ifdef DEBUG
if (sync_debug && dev->sc_sync[id].state == SYNC_SENT)
kprintf("csr-result of last msgout: 0x%x\n", csr);
printf("csr-result of last msgout: 0x%x\n", csr);
#endif
if (csr != SBIC_CSR_SEL_TIMEO)
@ -1245,7 +1245,7 @@ sbicxfout(regs, len, bp, phase)
if ((asr & SBIC_ASR_INT) || --wait < 0) {
#ifdef DEBUG
if (sbic_debug)
kprintf("sbicxfout fail: l%d i%x w%d\n",
printf("sbicxfout fail: l%d i%x w%d\n",
len, asr, wait);
#endif
return (len);
@ -1291,7 +1291,7 @@ sbicxfin(regs, len, bp)
GET_SBIC_asr (regs, asr);
if((asr & SBIC_ASR_PE)) {
#ifdef DEBUG
kprintf("sbicxfin parity error: l%d i%x w%d\n",
printf("sbicxfin parity error: l%d i%x w%d\n",
len, asr, wait);
/* return ((unsigned long)buf - (unsigned long)bp); */
#ifdef DDB
@ -1306,7 +1306,7 @@ sbicxfin(regs, len, bp)
QPRINTF(("sbicxfin fail:{%d} %02x %02x %02x %02x %02x %02x "
"%02x %02x %02x %02x\n", len, obp[0], obp[1], obp[2],
obp[3], obp[4], obp[5], obp[6], obp[7], obp[8], obp[9]));
kprintf("sbicxfin fail: l%d i%x w%d\n",
printf("sbicxfin fail: l%d i%x w%d\n",
len, asr, wait);
}
#endif
@ -1378,7 +1378,7 @@ sbicicmd(dev, target, lun, cbuf, clen, buf, len)
routine = 3;
debug_sbic_regs = regs; /* store this to allow debug calls */
if( data_pointer_debug > 1 )
kprintf("sbicicmd(%d,%d):%d\n", target, lun,
printf("sbicicmd(%d,%d):%d\n", target, lun,
acb->sc_kv.dc_count);
#endif
@ -1400,7 +1400,7 @@ sbicicmd(dev, target, lun, cbuf, clen, buf, len)
*/
if (!( dev->sc_flags & SBICF_SELECTED )
&& sbicselectbus(dev, regs, target, lun, dev->sc_scsiaddr)) {
/*kprintf("sbicicmd trying to select busy bus!\n");*/
/*printf("sbicicmd trying to select busy bus!\n");*/
dev->sc_flags &= ~SBICF_ICMD;
return(-1);
}
@ -1435,7 +1435,7 @@ sbicicmd(dev, target, lun, cbuf, clen, buf, len)
} else {
#ifdef DEBUG
if(reselect_debug>1)
kprintf("sbicicmd: handling disconnect\n");
printf("sbicicmd: handling disconnect\n");
#endif
i = SBIC_STATE_DISCONNECT;
}
@ -1455,7 +1455,7 @@ sbicicmd(dev, target, lun, cbuf, clen, buf, len)
GET_SBIC_asr(regs, asr);
CSR_TRACE('I',csr,asr,target);
if( asr & (SBIC_ASR_BSY|SBIC_ASR_LCI|SBIC_ASR_CIP) )
kprintf("next: cmd sent asr %02x, csr %02x\n",
printf("next: cmd sent asr %02x, csr %02x\n",
asr, csr);
#endif
break;
@ -1504,7 +1504,7 @@ sbicicmd(dev, target, lun, cbuf, clen, buf, len)
*/
#ifdef DEBUG
if(sbic_debug)
kprintf("SBICICMD status phase\n");
printf("SBICICMD status phase\n");
#endif
SBIC_TC_PUT(regs, 0);
SET_SBIC_cmd_phase(regs, 0x46);
@ -1531,7 +1531,7 @@ sbicicmd(dev, target, lun, cbuf, clen, buf, len)
/* tapes may take a loooong time.. */
while (asr & SBIC_ASR_BSY){
if(asr & SBIC_ASR_DBR) {
kprintf("sbicicmd: Waiting while sbic is jammed, CSR:%02x,ASR:%02x\n",
printf("sbicicmd: Waiting while sbic is jammed, CSR:%02x,ASR:%02x\n",
csr,asr);
#ifdef DDB
Debugger();
@ -1551,7 +1551,7 @@ sbicicmd(dev, target, lun, cbuf, clen, buf, len)
* wait for last command to complete
*/
if (asr & SBIC_ASR_LCI) {
kprintf("sbicicmd: last command ignored\n");
printf("sbicicmd: last command ignored\n");
}
else if( i == 1 ) /* Bsy */
SBIC_WAIT (regs, SBIC_ASR_INT, wait);
@ -1568,12 +1568,12 @@ sbicicmd(dev, target, lun, cbuf, clen, buf, len)
#if CSR_LOG_BUF_SIZE
if(reselect_debug>1)
for(i=0; i<bufptr; i++)
kprintf("CSR:%02x", csrbuf[i]);
printf("CSR:%02x", csrbuf[i]);
#endif
#ifdef DEBUG
if(data_pointer_debug > 1)
kprintf("sbicicmd done(%d,%d):%d =%d=\n",
printf("sbicicmd done(%d,%d):%d =%d=\n",
dev->target, lun,
acb->sc_kv.dc_count,
dev->sc_stat[0]);
@ -1659,7 +1659,7 @@ sbicgo(dev, xs)
routine = 1;
debug_sbic_regs = regs; /* store this to allow debug calls */
if( data_pointer_debug > 1 )
kprintf("sbicgo(%d,%d)\n", dev->target, dev->lun);
printf("sbicgo(%d,%d)\n", dev->target, dev->lun);
#endif
/*
@ -1677,7 +1677,7 @@ sbicgo(dev, xs)
*/
if (sbicselectbus(dev, regs, dev->target, dev->lun,
dev->sc_scsiaddr)) {
/* kprintf("sbicgo: Trying to select busy bus!\n"); */
/* printf("sbicgo: Trying to select busy bus!\n"); */
SBIC_TRACE(dev);
return(0); /* Not done: needs to be rescheduled */
}
@ -1699,7 +1699,7 @@ sbicgo(dev, xs)
addr = acb->sc_kv.dc_addr;
count = acb->sc_kv.dc_count;
if (count && (char *)kvtop(addr) != acb->sc_pa.dc_addr) { /* XXXX check */
kprintf("sbic: DMA buffer mapping changed %p->%x\n",
printf("sbic: DMA buffer mapping changed %p->%x\n",
acb->sc_pa.dc_addr, kvtop(addr));
#ifdef DDB
Debugger();
@ -1720,29 +1720,29 @@ sbicgo(dev, xs)
acb->sc_dmausrlen = count;
acb->sc_usrbufpa = (u_char *)kvtop(addr);
if(!dev->sc_tinfo[dev->target].bounce) {
kprintf("sbicgo: HELP! no bounce allocated for %d\n",
printf("sbicgo: HELP! no bounce allocated for %d\n",
dev->target);
kprintf("xfer: (%p->%p,%lx)\n", acb->sc_dmausrbuf,
printf("xfer: (%p->%p,%lx)\n", acb->sc_dmausrbuf,
acb->sc_usrbufpa, acb->sc_dmausrlen);
dev->sc_tinfo[xs->sc_link->target].bounce
= (char *)alloc_z2mem(MAXPHYS);
if (isztwomem(dev->sc_tinfo[xs->sc_link->target].bounce))
kprintf("alloc ZII target %d bounce pa 0x%x\n",
printf("alloc ZII target %d bounce pa 0x%x\n",
xs->sc_link->target,
kvtop(dev->sc_tinfo[xs->sc_link->target].bounce));
else if (dev->sc_tinfo[xs->sc_link->target].bounce)
kprintf("alloc CHIP target %d bounce pa 0x%p\n",
printf("alloc CHIP target %d bounce pa 0x%p\n",
xs->sc_link->target,
PREP_DMA_MEM(dev->sc_tinfo[xs->sc_link->target].bounce));
kprintf("Allocating %d bounce at %x\n",
printf("Allocating %d bounce at %x\n",
dev->target,
kvtop(dev->sc_tinfo[dev->target].bounce));
}
} else { /* write: copy to dma buffer */
#ifdef DEBUG
if(data_pointer_debug)
kprintf("sbicgo: copying %x bytes to target %d bounce %x\n",
printf("sbicgo: copying %x bytes to target %d bounce %x\n",
count, dev->target,
kvtop(dev->sc_tinfo[dev->target].bounce));
#endif
@ -1803,7 +1803,7 @@ sbicgo(dev, xs)
*/
#ifdef DEBUG
if( data_pointer_debug > 1 )
kprintf("sbicgo dmago:%d(%p:%lx)\n",
printf("sbicgo dmago:%d(%p:%lx)\n",
dev->target,dev->sc_cur->dc_addr,dev->sc_tcnt);
#if 0
/*
@ -1835,14 +1835,14 @@ sbicgo(dev, xs)
#ifdef DEBUG
debug_asr = asr;
#endif
if(asr & SBIC_ASR_LCI) kprintf("sbicgo: LCI asr:%02x csr:%02x\n",
if(asr & SBIC_ASR_LCI) printf("sbicgo: LCI asr:%02x csr:%02x\n",
asr,csr);
} while( i == SBIC_STATE_RUNNING
&& asr & (SBIC_ASR_INT|SBIC_ASR_LCI) );
CSR_TRACE('g',csr,asr,i<<4);
SBIC_TRACE(dev);
if (i == SBIC_STATE_DONE && dev->sc_stat[0] == 0xff) kprintf("sbicgo: done & stat = 0xff\n");
if (i == SBIC_STATE_DONE && dev->sc_stat[0] == 0xff) printf("sbicgo: done & stat = 0xff\n");
if (i == SBIC_STATE_DONE && dev->sc_stat[0] != 0xff) {
/* if( i == SBIC_STATE_DONE && dev->sc_stat[0] ) { */
/* Did we really finish that fast? */
@ -1887,7 +1887,7 @@ sbicintr(dev)
debug_asr = asr;
#endif
#if 0
if(asr & SBIC_ASR_LCI) kprintf("sbicintr: LCI asr:%02x csr:%02x\n",
if(asr & SBIC_ASR_LCI) printf("sbicintr: LCI asr:%02x csr:%02x\n",
asr,csr);
#endif
} while(i == SBIC_STATE_RUNNING &&
@ -1931,7 +1931,7 @@ sbicpoll(dev)
/* tapes may take a loooong time.. */
while (asr & SBIC_ASR_BSY){
if(asr & SBIC_ASR_DBR) {
kprintf("sbipoll: Waiting while sbic is jammed, CSR:%02x,ASR:%02x\n",
printf("sbipoll: Waiting while sbic is jammed, CSR:%02x,ASR:%02x\n",
csr,asr);
#ifdef DDB
Debugger();
@ -1947,7 +1947,7 @@ sbicpoll(dev)
GET_SBIC_asr(regs, asr);
}
if(asr & SBIC_ASR_LCI) kprintf("sbicpoll: LCI asr:%02x csr:%02x\n",
if(asr & SBIC_ASR_LCI) printf("sbicpoll: LCI asr:%02x csr:%02x\n",
asr,csr);
else if( i == 1 ) /* BSY */
SBIC_WAIT(regs, SBIC_ASR_INT, sbic_cmd_wait);
@ -1977,7 +1977,7 @@ sbicmsgin(dev)
GET_SBIC_asr(regs, asr);
#ifdef DEBUG
if(reselect_debug>1)
kprintf("sbicmsgin asr=%02x\n", asr);
printf("sbicmsgin asr=%02x\n", asr);
#endif
sbic_save_ptrs(dev, regs, dev->target, dev->lun);
@ -2013,17 +2013,17 @@ sbicmsgin(dev)
GET_SBIC_csr(regs, csr);
CSR_TRACE('X',csr,asr,dev->target);
if( csr == 0xff )
kprintf("sbicmsgin waiting: csr %02x asr %02x\n", csr, asr);
printf("sbicmsgin waiting: csr %02x asr %02x\n", csr, asr);
} while( csr == 0xff );
#endif
#ifdef DEBUG
if(reselect_debug>1)
kprintf("sbicmsgin: got %02x csr %02x asr %02x\n",
printf("sbicmsgin: got %02x csr %02x asr %02x\n",
*tmpaddr, csr, asr);
#endif
#if do_parity_check
if( asr & SBIC_ASR_PE ) {
kprintf ("Parity error");
printf ("Parity error");
/* This code simply does not work. */
WAIT_CIP(regs);
SET_SBIC_cmd(regs, SBIC_CMD_SET_ATN);
@ -2035,7 +2035,7 @@ sbicmsgin(dev)
if( !(asr & SBIC_ASR_LCI) )
/* Target wants to send garbled msg*/
continue;
kprintf("--fixing\n");
printf("--fixing\n");
/* loop until a msgout phase occurs on target */
while(csr & 0x07 != MESG_OUT_PHASE) {
while( asr & SBIC_ASR_BSY &&
@ -2074,12 +2074,12 @@ sbicmsgin(dev)
};
if(dev->sc_msg[0] == 0xff) {
kprintf("sbicmsgin: sbic swallowed our message\n");
printf("sbicmsgin: sbic swallowed our message\n");
break;
}
#ifdef DEBUG
if (sync_debug)
kprintf("msgin done csr 0x%x asr 0x%x msg 0x%x\n",
printf("msgin done csr 0x%x asr 0x%x msg 0x%x\n",
csr, asr, dev->sc_msg[0]);
#endif
/*
@ -2098,7 +2098,7 @@ sbicmsgin(dev)
QPRINTF(("REJECT of SYN"));
#ifdef DEBUG
if (sync_debug)
kprintf("target %d rejected sync, going async\n",
printf("target %d rejected sync, going async\n",
dev->target);
#endif
dev->sc_sync[dev->target].period = sbic_min_period;
@ -2121,7 +2121,7 @@ sbicmsgin(dev)
QPRINTF(("DISCONNECT"));
#ifdef DEBUG
if( reselect_debug>1 && dev->sc_msg[0] == MSG_DISCONNECT )
kprintf("sbicmsgin: got disconnect msg %s\n",
printf("sbicmsgin: got disconnect msg %s\n",
(dev->sc_flags & SBICF_ICMD)?"rejecting":"");
#endif
if( dev->sc_flags & SBICF_ICMD ) {
@ -2150,7 +2150,7 @@ sbicmsgin(dev)
#ifdef DEBUG
if (sync_debug)
kprintf ("GOT MSG %d! target %d acting weird.."
printf ("GOT MSG %d! target %d acting weird.."
" waiting for disconnect...\n",
dev->sc_msg[0], dev->target);
#endif
@ -2188,14 +2188,14 @@ sbicmsgin(dev)
SET_SBIC_syn(regs,
SBIC_SYN(dev->sc_sync[dev->target].offset,
dev->sc_sync[dev->target].period));
kprintf("%s: target %d now synchronous,"
printf("%s: target %d now synchronous,"
" period=%dns, offset=%d.\n",
dev->sc_dev.dv_xname, dev->target,
dev->sc_msg[3] * 4, dev->sc_msg[4]);
} else {
#ifdef DEBUG
if (sbic_debug || sync_debug)
kprintf ("sbicmsgin: Rejecting message 0x%02x\n",
printf ("sbicmsgin: Rejecting message 0x%02x\n",
dev->sc_msg[0]);
#endif
/* prepare to reject the message, NACK */
@ -2281,7 +2281,7 @@ sbicnextstate(dev, csr, asr)
#if defined(M68040) || defined(M68060)
if (dev->sc_flags & SBICF_DCFLUSH) {
#if 0
kprintf("sbic: 68040/68060 DMA cache flush needs"
printf("sbic: 68040/68060 DMA cache flush needs"
"fixing? %x:%x\n",
dev->sc_xs->data, dev->sc_xs->datalen);
#endif
@ -2289,19 +2289,19 @@ sbicnextstate(dev, csr, asr)
#endif
#ifdef DEBUG
if( data_pointer_debug > 1 )
kprintf("next dmastop: %d(%p:%lx)\n",
printf("next dmastop: %d(%p:%lx)\n",
dev->target,dev->sc_cur->dc_addr,dev->sc_tcnt);
dev->sc_dmatimo = 0;
#endif
dev->sc_dmastop(dev); /* was dmafree */
if (acb->flags & ACB_BBUF) {
if ((u_char *)kvtop(acb->sc_dmausrbuf) != acb->sc_usrbufpa)
kprintf("%s: WARNING - buffer mapping changed %p->%x\n",
printf("%s: WARNING - buffer mapping changed %p->%x\n",
dev->sc_dev.dv_xname, acb->sc_usrbufpa,
kvtop(acb->sc_dmausrbuf));
#ifdef DEBUG
if(data_pointer_debug)
kprintf("sbicgo:copying %lx bytes from target %d bounce %x\n",
printf("sbicgo:copying %lx bytes from target %d bounce %x\n",
acb->sc_dmausrlen,
dev->target,
kvtop(dev->sc_tinfo[dev->target].bounce));
@ -2328,7 +2328,7 @@ sbicnextstate(dev, csr, asr)
/* Do PIO */
SET_SBIC_control(regs, SBIC_CTL_EDI | SBIC_CTL_IDI);
if (acb->sc_kv.dc_count <= 0) {
kprintf("sbicnextstate:xfer count %d asr%x csr%x\n",
printf("sbicnextstate:xfer count %d asr%x csr%x\n",
acb->sc_kv.dc_count, asr, csr);
goto abort;
}
@ -2351,7 +2351,7 @@ sbicnextstate(dev, csr, asr)
acb->sc_kv.dc_count = i;
} else {
if (acb->sc_kv.dc_count <= 0) {
kprintf("sbicnextstate:xfer count %d asr%x csr%x\n",
printf("sbicnextstate:xfer count %d asr%x csr%x\n",
acb->sc_kv.dc_count, asr, csr);
goto abort;
}
@ -2375,7 +2375,7 @@ sbicnextstate(dev, csr, asr)
#endif
#ifdef DEBUG
if( data_pointer_debug > 1 )
kprintf("next dmanext: %d(%p:%lx)\n",
printf("next dmanext: %d(%p:%lx)\n",
dev->target,dev->sc_cur->dc_addr,
dev->sc_tcnt);
dev->sc_dmatimo = 1;
@ -2396,7 +2396,7 @@ sbicnextstate(dev, csr, asr)
case SBIC_CSR_MSGIN_W_ACK:
SET_SBIC_cmd(regs, SBIC_CMD_CLR_ACK); /* Dunno what I'm ACKing */
kprintf("Acking unknown msgin CSR:%02x",csr);
printf("Acking unknown msgin CSR:%02x",csr);
break;
case SBIC_CSR_XFERRED|MESG_OUT_PHASE:
@ -2405,7 +2405,7 @@ sbicnextstate(dev, csr, asr)
case SBIC_CSR_MIS_2|MESG_OUT_PHASE:
#ifdef DEBUG
if (sync_debug)
kprintf ("sending REJECT msg to last msg.\n");
printf ("sending REJECT msg to last msg.\n");
#endif
sbic_save_ptrs(dev, regs, dev->target, dev->lun);
@ -2417,7 +2417,7 @@ sbicnextstate(dev, csr, asr)
SEND_BYTE(regs, MSG_REJECT);
WAIT_CIP(regs);
if( asr & (SBIC_ASR_BSY|SBIC_ASR_LCI|SBIC_ASR_CIP) )
kprintf("next: REJECT sent asr %02x\n", asr);
printf("next: REJECT sent asr %02x\n", asr);
SBIC_TRACE(dev);
return SBIC_STATE_RUNNING;
@ -2428,7 +2428,7 @@ sbicnextstate(dev, csr, asr)
/* Try to schedule another target */
#ifdef DEBUG
if(reselect_debug>1)
kprintf("sbicnext target %d disconnected\n", dev->target);
printf("sbicnext target %d disconnected\n", dev->target);
#endif
TAILQ_INSERT_HEAD(&dev->nexus_list, acb, chain);
++dev->sc_tinfo[dev->target].dconns;
@ -2468,7 +2468,7 @@ sbicnextstate(dev, csr, asr)
if ((asr & SBIC_ASR_INT) == 0) {
#ifdef DEBUG
if (reselect_debug)
kprintf("RSLT_NI - no IFFY message? asr %x\n", asr);
printf("RSLT_NI - no IFFY message? asr %x\n", asr);
#endif
} else {
GET_SBIC_csr(regs,csr);
@ -2479,21 +2479,21 @@ sbicnextstate(dev, csr, asr)
sbicmsgin(dev);
newlun = dev->sc_msg[0] & 7;
} else {
kprintf("RSLT_NI - not MESG_IN_PHASE %x\n",
printf("RSLT_NI - not MESG_IN_PHASE %x\n",
csr);
}
}
}
#ifdef DEBUG
if(reselect_debug>1 || (reselect_debug && csr==SBIC_CSR_RSLT_NI))
kprintf("sbicnext: reselect %s from targ %d lun %d\n",
printf("sbicnext: reselect %s from targ %d lun %d\n",
csr == SBIC_CSR_RSLT_NI ? "NI" : "IFY",
newtarget, newlun);
#endif
if (dev->sc_nexus) {
#ifdef DEBUG
if (reselect_debug > 1)
kprintf("%s: reselect %s with active command\n",
printf("%s: reselect %s with active command\n",
dev->sc_dev.dv_xname,
csr == SBIC_CSR_RSLT_NI ? "NI" : "IFY");
#ifdef DDB
@ -2525,7 +2525,7 @@ sbicnextstate(dev, csr, asr)
break;
}
if (acb == NULL) {
kprintf("%s: reselect %s targ %d not in nexus_list %p\n",
printf("%s: reselect %s targ %d not in nexus_list %p\n",
dev->sc_dev.dv_xname,
csr == SBIC_CSR_RSLT_NI ? "NI" : "IFY", newtarget,
&dev->nexus_list.tqh_first);
@ -2540,13 +2540,13 @@ sbicnextstate(dev, csr, asr)
/*
* Something unexpected happened -- deal with it.
*/
kprintf("sbicnextstate: aborting csr %02x asr %02x\n", csr, asr);
printf("sbicnextstate: aborting csr %02x asr %02x\n", csr, asr);
#ifdef DDB
Debugger();
#endif
#ifdef DEBUG
if( data_pointer_debug > 1 )
kprintf("next dmastop: %d(%p:%lx)\n",
printf("next dmastop: %d(%p:%lx)\n",
dev->target,dev->sc_cur->dc_addr,dev->sc_tcnt);
dev->sc_dmatimo = 0;
#endif
@ -2561,7 +2561,7 @@ sbicnextstate(dev, csr, asr)
#if defined(M68040) || defined(M68060)
if (dev->sc_flags & SBICF_DCFLUSH) {
#if 0
kprintf("sbic: 68040/060 DMA cache flush needs"
printf("sbic: 68040/060 DMA cache flush needs"
"fixing? %x:%x\n",
dev->sc_xs->data, dev->sc_xs->datalen);
#endif
@ -2571,7 +2571,7 @@ sbicnextstate(dev, csr, asr)
~(SBICF_INDMA | SBICF_DCFLUSH);
#ifdef DEBUG
if( data_pointer_debug > 1 )
kprintf("next dmastop: %d(%p:%lx)\n",
printf("next dmastop: %d(%p:%lx)\n",
dev->target,dev->sc_cur->dc_addr,dev->sc_tcnt);
dev->sc_dmatimo = 0;
#endif
@ -2672,7 +2672,7 @@ sbicdumpstate()
GET_SBIC_asr(debug_sbic_regs,asr);
GET_SBIC_csr(debug_sbic_regs,csr);
kprintf("%s: asr:csr(%02x:%02x)->(%02x:%02x)\n",
printf("%s: asr:csr(%02x:%02x)->(%02x:%02x)\n",
(routine==1)?"sbicgo":
(routine==2)?"sbicintr":
(routine==3)?"sbicicmd":
@ -2690,12 +2690,12 @@ sbictimeout(dev)
s = splbio();
if (dev->sc_dmatimo) {
if (dev->sc_dmatimo > 1) {
kprintf("%s: dma timeout #%d\n",
printf("%s: dma timeout #%d\n",
dev->sc_dev.dv_xname, dev->sc_dmatimo - 1);
GET_SBIC_asr(dev->sc_sbicp, asr);
if( asr & SBIC_ASR_INT ) {
/* We need to service a missed IRQ */
kprintf("Servicing a missed int:(%02x,%02x)->(%02x,??)\n",
printf("Servicing a missed int:(%02x,%02x)->(%02x,??)\n",
debug_asr, debug_csr, asr);
sbicintr(dev);
}
@ -2714,20 +2714,20 @@ sbic_dump_acb(acb)
u_char *b = (u_char *) &acb->cmd;
int i;
kprintf("acb@%p ", acb);
printf("acb@%p ", acb);
if (acb->xs == NULL) {
kprintf("<unused>\n");
printf("<unused>\n");
return;
}
kprintf("(%d:%d) flags %2x clen %2d cmd ", acb->xs->sc_link->target,
printf("(%d:%d) flags %2x clen %2d cmd ", acb->xs->sc_link->target,
acb->xs->sc_link->lun, acb->flags, acb->clen);
for (i = acb->clen; i; --i)
kprintf(" %02x", *b++);
kprintf("\n");
kprintf(" xs: %8p data %8p:%04x ", acb->xs, acb->xs->data,
printf(" %02x", *b++);
printf("\n");
printf(" xs: %8p data %8p:%04x ", acb->xs, acb->xs->data,
acb->xs->datalen);
kprintf("va %8p:%04x ", acb->sc_kv.dc_addr, acb->sc_kv.dc_count);
kprintf("pa %8p:%04x tcnt %lx\n", acb->sc_pa.dc_addr, acb->sc_pa.dc_count,
printf("va %8p:%04x ", acb->sc_kv.dc_addr, acb->sc_kv.dc_count);
printf("pa %8p:%04x tcnt %lx\n", acb->sc_pa.dc_addr, acb->sc_pa.dc_count,
acb->sc_tcnt);
}
@ -2744,58 +2744,58 @@ sbic_dump(dev)
s = splbio();
regs = dev->sc_sbicp;
#if CSR_TRACE_SIZE
kprintf("csr trace: ");
printf("csr trace: ");
i = csr_traceptr;
do {
kprintf("%c%02x%02x%02x ", csr_trace[i].whr,
printf("%c%02x%02x%02x ", csr_trace[i].whr,
csr_trace[i].csr, csr_trace[i].asr, csr_trace[i].xtn);
switch(csr_trace[i].whr) {
case 'g':
kprintf("go "); break;
printf("go "); break;
case 's':
kprintf("select "); break;
printf("select "); break;
case 'y':
kprintf("select+ "); break;
printf("select+ "); break;
case 'i':
kprintf("intr "); break;
printf("intr "); break;
case 'f':
kprintf("finish "); break;
printf("finish "); break;
case '>':
kprintf("out "); break;
printf("out "); break;
case '<':
kprintf("in "); break;
printf("in "); break;
case 'm':
kprintf("msgin "); break;
printf("msgin "); break;
case 'x':
kprintf("msginx "); break;
printf("msginx "); break;
case 'X':
kprintf("msginX "); break;
printf("msginX "); break;
case 'r':
kprintf("reselect "); break;
printf("reselect "); break;
case 'I':
kprintf("icmd "); break;
printf("icmd "); break;
case 'a':
kprintf("abort "); break;
printf("abort "); break;
default:
kprintf("? ");
printf("? ");
}
switch(csr_trace[i].csr) {
case 0x11:
kprintf("INITIATOR"); break;
printf("INITIATOR"); break;
case 0x16:
kprintf("S_XFERRED"); break;
printf("S_XFERRED"); break;
case 0x20:
kprintf("MSGIN_ACK"); break;
printf("MSGIN_ACK"); break;
case 0x41:
kprintf("DISC"); break;
printf("DISC"); break;
case 0x42:
kprintf("SEL_TIMEO"); break;
printf("SEL_TIMEO"); break;
case 0x80:
kprintf("RSLT_NI"); break;
printf("RSLT_NI"); break;
case 0x81:
kprintf("RSLT_IFY"); break;
printf("RSLT_IFY"); break;
case 0x85:
kprintf("DISC_1"); break;
printf("DISC_1"); break;
case 0x18: case 0x19: case 0x1a:
case 0x1b: case 0x1e: case 0x1f:
case 0x28: case 0x29: case 0x2a:
@ -2806,42 +2806,42 @@ sbic_dump(dev)
case 0x8b: case 0x8e: case 0x8f:
switch(csr_trace[i].csr & 0xf0) {
case 0x10:
kprintf("DONE_"); break;
printf("DONE_"); break;
case 0x20:
kprintf("STOP_"); break;
printf("STOP_"); break;
case 0x40:
kprintf("ERR_"); break;
printf("ERR_"); break;
case 0x80:
kprintf("REQ_"); break;
printf("REQ_"); break;
}
switch(csr_trace[i].csr & 7) {
case 0:
kprintf("DATA_OUT"); break;
printf("DATA_OUT"); break;
case 1:
kprintf("DATA_IN"); break;
printf("DATA_IN"); break;
case 2:
kprintf("CMD"); break;
printf("CMD"); break;
case 3:
kprintf("STATUS"); break;
printf("STATUS"); break;
case 6:
kprintf("MSG_OUT"); break;
printf("MSG_OUT"); break;
case 7:
kprintf("MSG_IN"); break;
printf("MSG_IN"); break;
default:
kprintf("invld phs");
printf("invld phs");
}
break;
default: kprintf("****"); break;
default: printf("****"); break;
}
if (csr_trace[i].asr & SBIC_ASR_INT)
kprintf(" ASR_INT");
printf(" ASR_INT");
if (csr_trace[i].asr & SBIC_ASR_LCI)
kprintf(" ASR_LCI");
printf(" ASR_LCI");
if (csr_trace[i].asr & SBIC_ASR_BSY)
kprintf(" ASR_BSY");
printf(" ASR_BSY");
if (csr_trace[i].asr & SBIC_ASR_CIP)
kprintf(" ASR_CIP");
kprintf("\n");
printf(" ASR_CIP");
printf("\n");
i = (i + 1) & (CSR_TRACE_SIZE - 1);
} while (i != csr_traceptr);
#endif
@ -2850,39 +2850,39 @@ sbic_dump(dev)
GET_SBIC_csr(regs, csr);
else
csr = 0;
kprintf("%s@%p regs %p asr %x csr %x\n", dev->sc_dev.dv_xname,
printf("%s@%p regs %p asr %x csr %x\n", dev->sc_dev.dv_xname,
dev, regs, asr, csr);
if ((acb = dev->free_list.tqh_first)) {
kprintf("Free list:\n");
printf("Free list:\n");
while (acb) {
sbic_dump_acb(acb);
acb = acb->chain.tqe_next;
}
}
if ((acb = dev->ready_list.tqh_first)) {
kprintf("Ready list:\n");
printf("Ready list:\n");
while (acb) {
sbic_dump_acb(acb);
acb = acb->chain.tqe_next;
}
}
if ((acb = dev->nexus_list.tqh_first)) {
kprintf("Nexus list:\n");
printf("Nexus list:\n");
while (acb) {
sbic_dump_acb(acb);
acb = acb->chain.tqe_next;
}
}
if (dev->sc_nexus) {
kprintf("nexus:\n");
printf("nexus:\n");
sbic_dump_acb(dev->sc_nexus);
}
kprintf("sc_xs %p targ %d lun %d flags %x tcnt %lx dmacmd %x mask %lx\n",
printf("sc_xs %p targ %d lun %d flags %x tcnt %lx dmacmd %x mask %lx\n",
dev->sc_xs, dev->target, dev->lun, dev->sc_flags, dev->sc_tcnt,
dev->sc_dmacmd, dev->sc_dmamask);
for (i = 0; i < 8; ++i) {
if (dev->sc_tinfo[i].cmds > 2) {
kprintf("tgt %d: cmds %d disc %d senses %d lubusy %x\n",
printf("tgt %d: cmds %d disc %d senses %d lubusy %x\n",
i, dev->sc_tinfo[i].cmds,
dev->sc_tinfo[i].dconns,
dev->sc_tinfo[i].senses,

View File

@ -1,4 +1,4 @@
/* $NetBSD: sci.c,v 1.18 1996/10/10 23:56:29 christos Exp $ */
/* $NetBSD: sci.c,v 1.19 1996/10/13 03:07:31 christos Exp $ */
/*
* Copyright (c) 1994 Michael L. Hitch
@ -91,7 +91,7 @@ int sci_init_wait = SCI_INIT_WAIT;
int sci_no_dma = 0;
#ifdef DEBUG
#define QPRINTF(a) if (sci_debug > 1) kprintf a
#define QPRINTF(a) if (sci_debug > 1) printf a
int sci_debug = 0;
#else
#define QPRINTF(a)
@ -295,7 +295,7 @@ sciabort(dev, where)
struct sci_softc *dev;
char *where;
{
kprintf ("%s: abort %s: csr = 0x%02x, bus = 0x%02x\n",
printf ("%s: abort %s: csr = 0x%02x, bus = 0x%02x\n",
dev->sc_dev.dv_xname, where, *dev->sci_csr, *dev->sci_bus_csr);
if (dev->sc_flags & SCI_SELECTED) {
@ -347,7 +347,7 @@ scireset(dev)
if (dev->sc_flags & SCI_ALIVE)
sciabort(dev, "reset");
kprintf("%s: ", dev->sc_dev.dv_xname);
printf("%s: ", dev->sc_dev.dv_xname);
s = splbio();
/* preserve our ID for now */
@ -372,7 +372,7 @@ scireset(dev)
splx (s);
kprintf("sci id %d\n", my_id);
printf("sci id %d\n", my_id);
dev->sc_flags |= SCI_ALIVE;
}
@ -392,8 +392,8 @@ scierror(dev, csr)
if (xs->flags & SCSI_SILENT)
return;
kprintf("%s: ", dev->sc_dev.dv_xname);
kprintf("csr == 0x%02i\n", csr); /* XXX */
printf("%s: ", dev->sc_dev.dv_xname);
printf("csr == 0x%02i\n", csr); /* XXX */
}
/*
@ -458,7 +458,7 @@ sci_ixfer_out(dev, len, buf, phase)
if ((csr & SCI_BUS_BSY) == 0 || --wait < 0) {
#ifdef DEBUG
if (sci_debug)
kprintf("sci_ixfer_out fail: l%d i%x w%d\n",
printf("sci_ixfer_out fail: l%d i%x w%d\n",
len, csr, wait);
#endif
return (len);
@ -508,7 +508,7 @@ sci_ixfer_in(dev, len, buf, phase)
if (!(csr & SCI_BUS_BSY) || --wait < 0) {
#ifdef DEBUG
if (sci_debug)
kprintf("sci_ixfer_in fail: l%d i%x w%d\n",
printf("sci_ixfer_in fail: l%d i%x w%d\n",
len, csr, wait);
#endif
return;
@ -619,7 +619,7 @@ sciicmd(dev, target, cbuf, clen, buf, len, xferphase)
goto out;
default:
kprintf("sci: unexpected phase %d in icmd from %d\n",
printf("sci: unexpected phase %d in icmd from %d\n",
phase, target);
goto abort;
}
@ -727,7 +727,7 @@ scigo(dev, xs)
goto out;
default:
kprintf("sci: unexpected phase %d in icmd from %d\n",
printf("sci: unexpected phase %d in icmd from %d\n",
phase, target);
goto abort;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: ser.c,v 1.37 1996/10/10 23:56:30 christos Exp $ */
/* $NetBSD: ser.c,v 1.38 1996/10/13 03:07:32 christos Exp $ */
/*
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@ -207,13 +207,13 @@ serattach(pdp, dp, auxp)
(void) serinit(0, kgdb_rate);
serconsinit = 1; /* don't re-init in serputc */
if (kgdb_debug_init == 0)
kprintf(" kgdb enabled\n");
printf(" kgdb enabled\n");
else {
/*
* Print prefix of device name,
* let kgdb_connect print the rest.
*/
kprintf("ser0: ");
printf("ser0: ");
kgdb_connect(1);
}
}
@ -225,7 +225,7 @@ serattach(pdp, dp, auxp)
if (0 == serconsole)
serconsinit = 0;
if (dp)
kprintf(": input fifo %d output fifo %d\n", SERIBUF_SIZE,
printf(": input fifo %d output fifo %d\n", SERIBUF_SIZE,
SEROBUF_SIZE);
}
@ -743,7 +743,7 @@ int serhwiflow(tp, flag)
int flag;
{
#if 0
kprintf ("serhwiflow %d\n", flag);
printf ("serhwiflow %d\n", flag);
#endif
if (flag)
CLRRTS(ciab.pra);

View File

@ -1,4 +1,4 @@
/* $NetBSD: sfas.c,v 1.11 1996/10/10 23:56:33 christos Exp $ */
/* $NetBSD: sfas.c,v 1.12 1996/10/13 03:07:33 christos Exp $ */
/*
* Copyright (c) 1995 Daniel Widenfalk
@ -106,7 +106,7 @@ u_char sfas_inhibit_sync[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
u_char sfas_inhibit_disc[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
#ifdef DEBUG
#define QPRINTF(a) if (sfas_debug > 1) kprintf a
#define QPRINTF(a) if (sfas_debug > 1) printf a
int sfas_debug = 0;
#else
#define QPRINTF(a)
@ -246,7 +246,7 @@ sfasinitialize(dev)
*pte = PG_V | PG_RW | PG_CI | page;
TBIAS();
kprintf(": dmabuf 0x%lx", dev->sc_bump_pa);
printf(": dmabuf 0x%lx", dev->sc_bump_pa);
/*
* FIX
@ -271,7 +271,7 @@ sfasinitialize(dev)
* to us during interrupt time.
*/
offset = (vm_offset_t)dev->sc_vm_link - VM_MIN_KERNEL_ADDRESS;
kprintf(" vmlnk %p", dev->sc_vm_link);
printf(" vmlnk %p", dev->sc_vm_link);
vm_object_reference(kernel_object);
vm_map_insert(kernel_map, kernel_object, offset,
(vm_offset_t)dev->sc_vm_link,
@ -1075,19 +1075,19 @@ sfas_pretests(dev, rp)
sfas_init_nexus(dev, &dev->sc_nexus[i]);
}
kprintf("sfasintr: SCSI-RESET detected!");
printf("sfasintr: SCSI-RESET detected!");
return(-1);
}
if (dev->sc_interrupt & SFAS_INT_ILLEGAL_COMMAND) {
/* Something went terrible wrong! Dump some data and panic! */
kprintf("FIFO:");
printf("FIFO:");
while(*rp->sfas_fifo_flags & SFAS_FIFO_COUNT_MASK)
kprintf(" %x", *rp->sfas_fifo);
kprintf("\n");
printf(" %x", *rp->sfas_fifo);
printf("\n");
kprintf("CMD: %x\n", *rp->sfas_command);
printf("CMD: %x\n", *rp->sfas_command);
panic("sfasintr: ILLEGAL COMMAND!");
}
@ -1149,7 +1149,7 @@ sfas_pretests(dev, rp)
}
/* Somehow we got an illegal reselection. Dump and panic. */
kprintf("sfasintr: resel[0] %x resel[1] %x disconnected %d\n",
printf("sfasintr: resel[0] %x resel[1] %x disconnected %d\n",
dev->sc_resel[0], dev->sc_resel[1],
dev->sc_units_disconnected);
panic("sfasintr: Unexpected reselection!");
@ -1243,8 +1243,8 @@ sfas_midaction(dev, rp, nexus)
* Unexpected disconnection! Cleanup and exit. This
* shouldn't cause any problems.
*/
kprintf("sfasintr: Unexpected disconnection\n");
kprintf("sfasintr: u %x s %d p %d f %x c %x\n",
printf("sfasintr: Unexpected disconnection\n");
printf("sfasintr: u %x s %d p %d f %x c %x\n",
nexus->lun_unit, nexus->state,
dev->sc_status & SFAS_STAT_PHASE_MASK,
nexus->flags, nexus->cbuf[0]);
@ -1718,7 +1718,7 @@ sfas_postaction(dev, rp, nexus)
}
break;
default:
kprintf("SFASINTR: UNKNOWN PHASE! phase: %d\n",
printf("SFASINTR: UNKNOWN PHASE! phase: %d\n",
dev->sc_status & SFAS_STAT_PHASE_MASK);
dev->sc_led(dev, 0);
sfas_scsidone(dev, nexus->xs, -4);

View File

@ -1,4 +1,4 @@
/* $NetBSD: siop.c,v 1.34 1996/10/10 23:56:35 christos Exp $ */
/* $NetBSD: siop.c,v 1.35 1996/10/13 03:07:34 christos Exp $ */
/*
* Copyright (c) 1994 Michael L. Hitch
@ -203,7 +203,7 @@ siop_scsicmd(xs)
/* XXXX ?? */
if (sc->sc_nexus && flags & SCSI_POLL)
/* panic("siop_scsicmd: busy");*/
kprintf("siop_scsicmd: busy\n");
printf("siop_scsicmd: busy\n");
s = splbio();
acb = sc->free_list.tqh_first;
@ -255,7 +255,7 @@ siop_poll(sc, acb)
s = splbio();
to = xs->timeout / 1000;
if (sc->nexus_list.tqh_first)
kprintf("%s: siop_poll called with disconnected device\n",
printf("%s: siop_poll called with disconnected device\n",
sc->sc_dev.dv_xname);
for (;;) {
/* use cmd_wait values? */
@ -265,7 +265,7 @@ siop_poll(sc, acb)
(SIOP_ISTAT_SIP | SIOP_ISTAT_DIP)) == 0) {
if (--i <= 0) {
#ifdef DEBUG
kprintf ("waiting: tgt %d cmd %02x sbcl %02x dsp %lx (+%lx) dcmd %lx ds %p timeout %d\n",
printf ("waiting: tgt %d cmd %02x sbcl %02x dsp %lx (+%lx) dcmd %lx ds %p timeout %d\n",
xs->sc_link->target, acb->cmd.opcode,
rp->siop_sbcl, rp->siop_dsp,
rp->siop_dsp - sc->sc_scriptspa,
@ -284,7 +284,7 @@ siop_poll(sc, acb)
dstat = rp->siop_dstat;
if (siop_checkintr(sc, istat, dstat, sstat0, &status)) {
if (acb != sc->sc_nexus)
kprintf("%s: siop_poll disconnected device completed\n",
printf("%s: siop_poll disconnected device completed\n",
sc->sc_dev.dv_xname);
else if ((sc->sc_flags & SIOP_INTDEFER) == 0) {
sc->sc_flags &= ~SIOP_INTSOFF;
@ -313,7 +313,7 @@ siop_sched(sc)
#ifdef DEBUG
if (sc->sc_nexus) {
kprintf("%s: siop_sched- nexus %p/%d ready %p/%d\n",
printf("%s: siop_sched- nexus %p/%d ready %p/%d\n",
sc->sc_dev.dv_xname, sc->sc_nexus,
sc->sc_nexus->xs->sc_link->target,
sc->ready_list.tqh_first,
@ -338,7 +338,7 @@ siop_sched(sc)
if (acb == NULL) {
#ifdef DEBUGXXX
kprintf("%s: siop_sched didn't find ready command\n",
printf("%s: siop_sched didn't find ready command\n",
sc->sc_dev.dv_xname);
#endif
return;
@ -366,7 +366,7 @@ siop_scsidone(acb, stat)
if (acb == NULL || (xs = acb->xs) == NULL) {
#ifdef DIAGNOSTIC
kprintf("siop_scsidone: NULL acb or scsi_xfer\n");
printf("siop_scsidone: NULL acb or scsi_xfer\n");
#if defined(DEBUG) && defined(DDB)
Debugger();
#endif
@ -450,7 +450,7 @@ siop_scsidone(acb, stat)
TAILQ_REMOVE(&sc->ready_list, acb, chain);
--sc->sc_active;
} else {
kprintf("%s: can't find matching acb\n",
printf("%s: can't find matching acb\n",
sc->sc_dev.dv_xname);
#ifdef DDB
/* Debugger(); */
@ -480,7 +480,7 @@ siopabort(sc, rp, where)
int i;
#endif
kprintf ("%s: abort %s: dstat %02x, sstat0 %02x sbcl %02x\n",
printf ("%s: abort %s: dstat %02x, sstat0 %02x sbcl %02x\n",
sc->sc_dev.dv_xname,
where, rp->siop_dstat, rp->siop_sstat0, rp->siop_sbcl);
@ -516,7 +516,7 @@ siopabort(sc, rp, where)
for (i = 0; i < 2; ++i) {
if (sc->sc_iob[i].sc_xs && &sc->sc_iob[i] !=
sc->sc_cur) {
kprintf ("siopabort: cleanup!\n");
printf ("siopabort: cleanup!\n");
sc->sc_iob[i].sc_xs = NULL;
}
}
@ -575,7 +575,7 @@ siopinitialize(sc)
shift_nosync += 8;
#ifdef DEBUG
if (inhibit_sync)
kprintf("%s: Inhibiting synchronous transfer %02x\n",
printf("%s: Inhibiting synchronous transfer %02x\n",
sc->sc_dev.dv_xname, inhibit_sync);
#endif
for (i = 0; i < 8; ++i)
@ -600,7 +600,7 @@ siopreset(sc)
if (sc->sc_flags & SIOP_ALIVE)
siopabort(sc, rp, "reset");
kprintf("%s: ", sc->sc_dev.dv_xname); /* XXXX */
printf("%s: ", sc->sc_dev.dv_xname); /* XXXX */
s = splbio();
@ -645,7 +645,7 @@ siopreset(sc)
splx (s);
delay (siop_reset_delay * 1000);
kprintf("siop id %d reset V%d\n", sc->sc_link.adapter_target,
printf("siop id %d reset V%d\n", sc->sc_link.adapter_target,
rp->siop_ctest8 >> 4);
if ((sc->sc_flags & SIOP_ALIVE) == 0) {
@ -707,9 +707,9 @@ siop_start (sc, target, lun, cbuf, clen, buf, len)
#ifdef DEBUG
if (siop_debug & 0x100 && rp->siop_sbcl & SIOP_BSY) {
kprintf ("ACK! siop was busy: rp %p script %p dsa %p active %ld\n",
printf ("ACK! siop was busy: rp %p script %p dsa %p active %ld\n",
rp, &scripts, &acb->ds, sc->sc_active);
kprintf ("istat %02x sfbr %02x lcrc %02x sien %02x dien %02x\n",
printf ("istat %02x sfbr %02x lcrc %02x sien %02x dien %02x\n",
rp->siop_istat, rp->siop_sfbr, rp->siop_lcrc,
rp->siop_sien, rp->siop_dien);
#ifdef DDB
@ -749,7 +749,7 @@ siop_start (sc, target, lun, cbuf, clen, buf, len)
sc->sc_sync[target].sxfer = 0;
#ifdef DEBUG
if (siopsync_debug)
kprintf ("Forcing target %d asynchronous\n", target);
printf ("Forcing target %d asynchronous\n", target);
#endif
}
else {
@ -767,7 +767,7 @@ siop_start (sc, target, lun, cbuf, clen, buf, len)
sc->sc_sync[target].state = SYNC_SENT;
#ifdef DEBUG
if (siopsync_debug)
kprintf ("Sending sync request to target %d\n", target);
printf ("Sending sync request to target %d\n", target);
#endif
}
}
@ -810,9 +810,9 @@ siop_start (sc, target, lun, cbuf, clen, buf, len)
}
#ifdef DEBUG
if (nchain != 1 && len != 0 && siop_debug & 3) {
kprintf ("DMA chaining set: %d\n", nchain);
printf ("DMA chaining set: %d\n", nchain);
for (i = 0; i < nchain; ++i) {
kprintf (" [%d] %8p %lx\n", i, acb->ds.chain[i].databuf,
printf (" [%d] %8p %lx\n", i, acb->ds.chain[i].databuf,
acb->ds.chain[i].datalen);
}
}
@ -825,7 +825,7 @@ siop_start (sc, target, lun, cbuf, clen, buf, len)
dma_cachectl (buf, len);
#ifdef DEBUG
if (siop_debug & 0x100 && rp->siop_sbcl & SIOP_BSY) {
kprintf ("ACK! siop was busy at start: rp %p script %p dsa %p active %ld\n",
printf ("ACK! siop was busy at start: rp %p script %p dsa %p active %ld\n",
rp, &scripts, &acb->ds, sc->sc_active);
#ifdef DDB
/*Debugger();*/
@ -834,7 +834,7 @@ siop_start (sc, target, lun, cbuf, clen, buf, len)
#endif
if (sc->nexus_list.tqh_first == NULL) {
if (rp->siop_istat & SIOP_ISTAT_CON)
kprintf("%s: siop_select while connected?\n",
printf("%s: siop_select while connected?\n",
sc->sc_dev.dv_xname);
rp->siop_temp = 0;
rp->siop_sbcl = sc->sc_sync[target].sbcl;
@ -884,19 +884,19 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
#if 0
if (siop_debug & 0x100) {
DCIAS(&acb->stat[0]); /* XXX */
kprintf ("siopchkintr: istat %x dstat %x sstat0 %x dsps %x sbcl %x sts %x msg %x\n",
printf ("siopchkintr: istat %x dstat %x sstat0 %x dsps %x sbcl %x sts %x msg %x\n",
istat, dstat, sstat0, rp->siop_dsps, rp->siop_sbcl, acb->stat[0], acb->msg[0]);
kprintf ("sync msg in: %02x %02x %02x %02x %02x %02x\n",
printf ("sync msg in: %02x %02x %02x %02x %02x %02x\n",
acb->msg[0], acb->msg[1], acb->msg[2],
acb->msg[3], acb->msg[4], acb->msg[5]);
}
#endif
if (rp->siop_dsp && (rp->siop_dsp < sc->sc_scriptspa ||
rp->siop_dsp >= sc->sc_scriptspa + sizeof(scripts))) {
kprintf ("%s: dsp not within script dsp %lx scripts %lx:%lx",
printf ("%s: dsp not within script dsp %lx scripts %lx:%lx",
sc->sc_dev.dv_xname, rp->siop_dsp, sc->sc_scriptspa,
sc->sc_scriptspa + sizeof(scripts));
kprintf(" istat %x dstat %x sstat0 %x\n",
printf(" istat %x dstat %x sstat0 %x\n",
istat, dstat, sstat0);
#ifdef DDB
Debugger();
@ -908,7 +908,7 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
/* Normal completion status, or check condition */
#ifdef DEBUG
if (rp->siop_dsa != kvtop((caddr_t)&acb->ds)) {
kprintf ("siop: invalid dsa: %lx %x\n", rp->siop_dsa,
printf ("siop: invalid dsa: %lx %x\n", rp->siop_dsa,
kvtop((caddr_t)&acb->ds));
panic("*** siop DSA invalid ***");
}
@ -917,15 +917,15 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
if (sc->sc_sync[target].state == SYNC_SENT) {
#ifdef DEBUG
if (siopsync_debug)
kprintf ("sync msg in: %02x %02x %02x %02x %02x %02x\n",
printf ("sync msg in: %02x %02x %02x %02x %02x %02x\n",
acb->msg[0], acb->msg[1], acb->msg[2],
acb->msg[3], acb->msg[4], acb->msg[5]);
#endif
if (acb->msg[1] == 0xff)
kprintf ("%s: target %d ignored sync request\n",
printf ("%s: target %d ignored sync request\n",
sc->sc_dev.dv_xname, target);
else if (acb->msg[1] == MSG_REJECT)
kprintf ("%s: target %d rejected sync request\n",
printf ("%s: target %d rejected sync request\n",
sc->sc_dev.dv_xname, target);
sc->sc_sync[target].state = SYNC_DONE;
sc->sc_sync[target].sxfer = 0;
@ -945,7 +945,7 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
*/
if (acb->msg[4] && acb->msg[4] < 100 / 4) {
#ifdef DEBUG
kprintf ("%d: target %d wanted %dns period\n",
printf ("%d: target %d wanted %dns period\n",
sc->sc_dev.dv_xname, target,
acb->msg[4] * 4);
#endif
@ -955,7 +955,7 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
acb->msg[4] = 100 / 4;
}
#endif /* MAXTOR_KLUDGE */
kprintf ("%s: target %d now synchronous, period=%dns, offset=%d\n",
printf ("%s: target %d now synchronous, period=%dns, offset=%d\n",
sc->sc_dev.dv_xname, target,
acb->msg[4] * 4, acb->msg[5]);
scsi_period_to_siop (sc, target);
@ -965,14 +965,14 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
*status = acb->stat[0];
#ifdef DEBUG
if (rp->siop_sbcl & SIOP_BSY) {
/*kprintf ("ACK! siop was busy at end: rp %x script %x dsa %x\n",
/*printf ("ACK! siop was busy at end: rp %x script %x dsa %x\n",
rp, &scripts, &acb->ds);*/
#ifdef DDB
/*Debugger();*/
#endif
}
if (acb->msg[0] != 0x00)
kprintf("%s: message was not COMMAND COMPLETE: %x\n",
printf("%s: message was not COMMAND COMPLETE: %x\n",
sc->sc_dev.dv_xname, acb->msg[0]);
#endif
if (sc->nexus_list.tqh_first)
@ -983,7 +983,7 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
#ifdef DEBUG
++siopphmm;
if (acb == NULL)
kprintf("%s: Phase mismatch with no active command?\n",
printf("%s: Phase mismatch with no active command?\n",
sc->sc_dev.dv_xname);
#endif
if (acb->iob_len) {
@ -999,12 +999,12 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
#ifdef DEBUG
if (siop_debug & 0x100) {
int i;
kprintf ("Phase mismatch: curbuf %lx curlen %lx dfifo %x dbc %x sstat1 %x adjust %x sbcl %x starts %d acb %p\n",
printf ("Phase mismatch: curbuf %lx curlen %lx dfifo %x dbc %x sstat1 %x adjust %x sbcl %x starts %d acb %p\n",
acb->iob_curbuf, acb->iob_curlen, dfifo,
dbc, sstat1, adjust, rp->siop_sbcl, siopstarts, acb);
if (acb->ds.chain[1].datalen) {
for (i = 0; acb->ds.chain[i].datalen; ++i)
kprintf("chain[%d] addr %p len %lx\n",
printf("chain[%d] addr %p len %lx\n",
i, acb->ds.chain[i].databuf,
acb->ds.chain[i].datalen);
}
@ -1015,13 +1015,13 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
#ifdef DEBUG
SIOP_TRACE('m',rp->siop_sbcl,(rp->siop_dsp>>8),rp->siop_dsp);
if (siop_debug & 9)
kprintf ("Phase mismatch: %x dsp +%lx dcmd %lx\n",
printf ("Phase mismatch: %x dsp +%lx dcmd %lx\n",
rp->siop_sbcl,
rp->siop_dsp - sc->sc_scriptspa,
*((long *)&rp->siop_dcmd));
#endif
if ((rp->siop_sbcl & SIOP_REQ) == 0) {
kprintf ("Phase mismatch: REQ not asserted! %02x dsp %lx\n",
printf ("Phase mismatch: REQ not asserted! %02x dsp %lx\n",
rp->siop_sbcl, rp->siop_dsp);
#if defined(DEBUG) && defined(DDB)
Debugger();
@ -1044,15 +1044,15 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
if (sstat0 & SIOP_SSTAT0_STO) { /* Select timed out */
#ifdef DEBUG
if (acb == NULL)
kprintf("%s: Select timeout with no active command?\n",
printf("%s: Select timeout with no active command?\n",
sc->sc_dev.dv_xname);
if (rp->siop_sbcl & SIOP_BSY) {
kprintf ("ACK! siop was busy at timeout: rp %p script %p dsa %p\n",
printf ("ACK! siop was busy at timeout: rp %p script %p dsa %p\n",
rp, &scripts, &acb->ds);
kprintf(" sbcl %x sdid %x istat %x dstat %x sstat0 %x\n",
printf(" sbcl %x sdid %x istat %x dstat %x sstat0 %x\n",
rp->siop_sbcl, rp->siop_sdid, istat, dstat, sstat0);
if (!(rp->siop_sbcl & SIOP_BSY)) {
kprintf ("Yikes, it's not busy now!\n");
printf ("Yikes, it's not busy now!\n");
#if 0
*status = -1;
if (sc->nexus_list.tqh_first)
@ -1080,9 +1080,9 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
if (sstat0 & SIOP_SSTAT0_UDC) {
#ifdef DEBUG
if (acb == NULL)
kprintf("%s: Unexpected disconnect with no active command?\n",
printf("%s: Unexpected disconnect with no active command?\n",
sc->sc_dev.dv_xname);
kprintf ("%s: target %d disconnected unexpectedly\n",
printf ("%s: target %d disconnected unexpectedly\n",
sc->sc_dev.dv_xname, target);
#endif
#if 0
@ -1097,14 +1097,14 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
rp->siop_dsps == 0xff02)) {
#ifdef DEBUG
if (siop_debug & 0x100)
kprintf ("%s: ID %02x disconnected TEMP %lx (+%lx) curbuf %lx curlen %lx buf %p len %lx dfifo %x dbc %x sstat1 %x starts %d acb %p\n",
printf ("%s: ID %02x disconnected TEMP %lx (+%lx) curbuf %lx curlen %lx buf %p len %lx dfifo %x dbc %x sstat1 %x starts %d acb %p\n",
sc->sc_dev.dv_xname, 1 << target, rp->siop_temp,
rp->siop_temp ? rp->siop_temp - sc->sc_scriptspa : 0,
acb->iob_curbuf, acb->iob_curlen,
acb->ds.chain[0].databuf, acb->ds.chain[0].datalen, dfifo, dbc, sstat1, siopstarts, acb);
#endif
if (acb == NULL) {
kprintf("%s: Disconnect with no active command?\n",
printf("%s: Disconnect with no active command?\n",
sc->sc_dev.dv_xname);
return (0);
}
@ -1120,7 +1120,7 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
int n = rp->siop_temp - sc->sc_scriptspa;
if (acb->iob_curlen && acb->iob_curlen != acb->ds.chain[0].datalen)
kprintf("%s: iob_curbuf/len already set? n %x iob %lx/%lx chain[0] %p/%lx\n",
printf("%s: iob_curbuf/len already set? n %x iob %lx/%lx chain[0] %p/%lx\n",
sc->sc_dev.dv_xname, n, acb->iob_curbuf, acb->iob_curlen,
acb->ds.chain[0].databuf, acb->ds.chain[0].datalen);
if (n < Ent_datain)
@ -1128,15 +1128,15 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
else
n = (n - Ent_datain) / 16;
if (n <= 0 && n > DMAMAXIO)
kprintf("TEMP invalid %d\n", n);
printf("TEMP invalid %d\n", n);
else {
acb->iob_curbuf = (u_long)acb->ds.chain[n].databuf;
acb->iob_curlen = acb->ds.chain[n].datalen;
}
#ifdef DEBUG
if (siop_debug & 0x100) {
kprintf("%s: TEMP offset %d", sc->sc_dev.dv_xname, n);
kprintf(" curbuf %lx curlen %lx\n", acb->iob_curbuf,
printf("%s: TEMP offset %d", sc->sc_dev.dv_xname, n);
printf(" curbuf %lx curlen %lx\n", acb->iob_curbuf,
acb->iob_curlen);
}
#endif
@ -1153,10 +1153,10 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
#ifdef DEBUG
if (siop_debug & 0x100)
kprintf ("%s: adjusting DMA chain\n",
printf ("%s: adjusting DMA chain\n",
sc->sc_dev.dv_xname);
if (rp->siop_dsps == 0xff02)
kprintf ("%s: ID %02x disconnected without Save Data Pointers\n",
printf ("%s: ID %02x disconnected without Save Data Pointers\n",
sc->sc_dev.dv_xname, 1 << target);
#endif
for (i = 0; i < DMAMAXIO; ++i) {
@ -1168,8 +1168,8 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
break;
}
if (i >= DMAMAXIO || acb->ds.chain[i].datalen == 0) {
kprintf("couldn't find saved data pointer: ");
kprintf("curbuf %lx curlen %lx i %d\n",
printf("couldn't find saved data pointer: ");
printf("curbuf %lx curlen %lx i %d\n",
acb->iob_curbuf, acb->iob_curlen, i);
#ifdef DDB
Debugger();
@ -1177,7 +1177,7 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
}
#ifdef DEBUG
if (siop_debug & 0x100)
kprintf(" chain[0]: %p/%lx -> %lx/%lx\n",
printf(" chain[0]: %p/%lx -> %lx/%lx\n",
acb->ds.chain[0].databuf,
acb->ds.chain[0].datalen,
acb->iob_curbuf,
@ -1188,7 +1188,7 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
for (j = 1, ++i; i < DMAMAXIO && acb->ds.chain[i].datalen; ++i, ++j) {
#ifdef DEBUG
if (siop_debug & 0x100)
kprintf(" chain[%d]: %p/%lx -> %p/%lx\n", j,
printf(" chain[%d]: %p/%lx -> %p/%lx\n", j,
acb->ds.chain[j].databuf,
acb->ds.chain[j].datalen,
acb->ds.chain[i].databuf,
@ -1225,17 +1225,17 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
sc->sc_sstat1 = rp->siop_sbcl; /* XXXX save current SBCL */
#ifdef DEBUG
if (siop_debug & 0x100)
kprintf ("%s: target ID %02x reselected dsps %lx\n",
printf ("%s: target ID %02x reselected dsps %lx\n",
sc->sc_dev.dv_xname, reselid,
rp->siop_dsps);
if ((rp->siop_sfbr & 0x80) == 0)
kprintf("%s: Reselect message in was not identify: %x\n",
printf("%s: Reselect message in was not identify: %x\n",
sc->sc_dev.dv_xname, rp->siop_sfbr);
#endif
if (sc->sc_nexus) {
#ifdef DEBUG
if (siop_debug & 0x100)
kprintf ("%s: reselect ID %02x w/active\n",
printf ("%s: reselect ID %02x w/active\n",
sc->sc_dev.dv_xname, reselid);
#endif
TAILQ_INSERT_HEAD(&sc->ready_list, sc->sc_nexus, chain);
@ -1263,7 +1263,7 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
break;
}
if (acb == NULL) {
kprintf("%s: target ID %02x reselect nexus_list %p\n",
printf("%s: target ID %02x reselect nexus_list %p\n",
sc->sc_dev.dv_xname, reselid,
sc->nexus_list.tqh_first);
panic("unable to find reselecting device");
@ -1280,14 +1280,14 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
/* reselect was interrupted (by Sig_P or select) */
if (siop_debug & 0x100 ||
(ctest2 & SIOP_CTEST2_SIGP) == 0)
kprintf ("%s: reselect interrupted (Sig_P?) scntl1 %x ctest2 %x sfbr %x istat %x/%x\n",
printf ("%s: reselect interrupted (Sig_P?) scntl1 %x ctest2 %x sfbr %x istat %x/%x\n",
sc->sc_dev.dv_xname, rp->siop_scntl1,
ctest2, rp->siop_sfbr, istat, rp->siop_istat);
#endif
/* XXX assumes it was not select */
if (sc->sc_nexus == NULL) {
#ifdef DEBUG
kprintf("%s: reselect interrupted, sc_nexus == NULL\n",
printf("%s: reselect interrupted, sc_nexus == NULL\n",
sc->sc_dev.dv_xname);
#if 0
siop_dump(sc);
@ -1309,11 +1309,11 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
}
if (dstat & SIOP_DSTAT_SIR && rp->siop_dsps == 0xff06) {
if (acb == NULL)
kprintf("%s: Bad message-in with no active command?\n",
printf("%s: Bad message-in with no active command?\n",
sc->sc_dev.dv_xname);
/* Unrecognized message in byte */
dma_cachectl (&acb->msg[1],1);
kprintf ("%s: Unrecognized message in data sfbr %x msg %x sbcl %x\n",
printf ("%s: Unrecognized message in data sfbr %x msg %x sbcl %x\n",
sc->sc_dev.dv_xname, rp->siop_sfbr, acb->msg[1], rp->siop_sbcl);
/* what should be done here? */
DCIAS(kvtop(&acb->msg[1]));
@ -1322,7 +1322,7 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
}
if (dstat & SIOP_DSTAT_SIR && rp->siop_dsps == 0xff0a) {
/* Status phase wasn't followed by message in phase? */
kprintf ("%s: Status phase not followed by message in phase? sbcl %x sbdl %x\n",
printf ("%s: Status phase not followed by message in phase? sbcl %x sbdl %x\n",
sc->sc_dev.dv_xname, rp->siop_sbcl, rp->siop_sbdl);
if (rp->siop_sbcl == 0xa7) {
/* It is now, just continue the script? */
@ -1333,7 +1333,7 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
if (sstat0 == 0 && dstat & SIOP_DSTAT_SIR) {
dma_cachectl (&acb->stat[0], 1);
dma_cachectl (&acb->msg[0], 1);
kprintf ("SIOP interrupt: %lx sts %x msg %x %x sbcl %x\n",
printf ("SIOP interrupt: %lx sts %x msg %x %x sbcl %x\n",
rp->siop_dsps, acb->stat[0], acb->msg[0], acb->msg[1],
rp->siop_sbcl);
siopreset (sc);
@ -1341,11 +1341,11 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
return 0; /* siopreset has cleaned up */
}
if (sstat0 & SIOP_SSTAT0_SGE)
kprintf ("SIOP: SCSI Gross Error\n");
printf ("SIOP: SCSI Gross Error\n");
if (sstat0 & SIOP_SSTAT0_PAR)
kprintf ("SIOP: Parity Error\n");
printf ("SIOP: Parity Error\n");
if (dstat & SIOP_DSTAT_IID)
kprintf ("SIOP: Invalid instruction detected\n");
printf ("SIOP: Invalid instruction detected\n");
bad_phase:
/*
* temporary panic for unhandled conditions
@ -1353,11 +1353,11 @@ bad_phase:
* then panics.
* XXXX need to clean this up to print out the info, reset, and continue
*/
kprintf ("siopchkintr: target %x ds %p\n", target, &acb->ds);
kprintf ("scripts %lx ds %x rp %x dsp %lx dcmd %lx\n", sc->sc_scriptspa,
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((caddr_t)&acb->ds), kvtop((caddr_t)rp), rp->siop_dsp,
*((long *)&rp->siop_dcmd));
kprintf ("siopchkintr: istat %x dstat %x sstat0 %x dsps %lx dsa %lx sbcl %x sts %x msg %x %x sfbr %x\n",
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);
#ifdef DEBUG
@ -1381,7 +1381,7 @@ siop_select(sc)
#ifdef DEBUG
if (siop_debug & 1)
kprintf ("%s: select ", sc->sc_dev.dv_xname);
printf ("%s: select ", sc->sc_dev.dv_xname);
#endif
rp = sc->sc_siopp;
@ -1403,7 +1403,7 @@ siop_select(sc)
}
#ifdef DEBUG
if (siop_debug & 1)
kprintf ("siop_select: target %x cmd %02x ds %p\n",
printf ("siop_select: target %x cmd %02x ds %p\n",
acb->xs->sc_link->target, acb->cmd.opcode,
&sc->sc_nexus->ds);
#endif
@ -1442,10 +1442,10 @@ siopintr (sc)
sc->sc_istat = 0;
#ifdef DEBUG
if (siop_debug & 1)
kprintf ("%s: intr istat %x dstat %x sstat0 %x\n",
printf ("%s: intr istat %x dstat %x sstat0 %x\n",
sc->sc_dev.dv_xname, istat, dstat, sstat0);
if (!sc->sc_active) {
kprintf ("%s: spurious interrupt? istat %x dstat %x sstat0 %x nexus %p status %x\n",
printf ("%s: spurious interrupt? istat %x dstat %x sstat0 %x nexus %p status %x\n",
sc->sc_dev.dv_xname, istat, dstat, sstat0,
sc->sc_nexus, sc->sc_nexus ? sc->sc_nexus->stat[0] : 0);
}
@ -1454,7 +1454,7 @@ siopintr (sc)
#ifdef DEBUG
if (siop_debug & 5) {
DCIAS(kvtop(&sc->sc_nexus->stat[0]));
kprintf ("%s: intr istat %x dstat %x sstat0 %x dsps %lx sbcl %x sts %x msg %x\n",
printf ("%s: intr istat %x dstat %x sstat0 %x dsps %lx sbcl %x sts %x msg %x\n",
sc->sc_dev.dv_xname, istat, dstat, sstat0,
rp->siop_dsps, rp->siop_sbcl,
sc->sc_nexus->stat[0], sc->sc_nexus->msg[0]);
@ -1468,14 +1468,14 @@ siopintr (sc)
if (siop_checkintr (sc, istat, dstat, sstat0, &status)) {
#if 1
if (status == 0xff)
kprintf ("siopintr: status == 0xff\n");
printf ("siopintr: status == 0xff\n");
#endif
if ((sc->sc_flags & (SIOP_INTSOFF | SIOP_INTDEFER)) != SIOP_INTSOFF) {
#if 0
if (rp->siop_sbcl & SIOP_BSY) {
kprintf ("%s: SCSI bus busy at completion",
printf ("%s: SCSI bus busy at completion",
sc->sc_dev.dv_xname);
kprintf(" targ %d sbcl %02x sfbr %x lcrc %02x dsp +%x\n",
printf(" targ %d sbcl %02x sfbr %x lcrc %02x dsp +%x\n",
sc->sc_nexus->xs->sc_link->target,
rp->siop_sbcl, rp->siop_sfbr, rp->siop_lcrc,
rp->siop_dsp - sc->sc_scriptspa);
@ -1516,7 +1516,7 @@ scsi_period_to_siop (sc, target)
break;
}
}
kprintf ("siop sync old: siop_sxfr %02x, siop_sbcl %02x\n", sxfer, sbcl);
printf ("siop sync old: siop_sxfr %02x, siop_sbcl %02x\n", sxfer, sbcl);
#endif
for (sbcl = 1; sbcl < 4; ++sbcl) {
sxfer = (period * 4 - 1) / sc->sc_tcp[sbcl] - 3;
@ -1524,7 +1524,7 @@ scsi_period_to_siop (sc, target)
break;
}
if (sbcl > 3) {
kprintf("siop sync: unable to compute sync params for period %dns\n",
printf("siop sync: unable to compute sync params for period %dns\n",
period * 4);
/*
* XXX need to pick a value we can do and renegotiate
@ -1534,16 +1534,16 @@ scsi_period_to_siop (sc, target)
sxfer = (sxfer << 4) | ((offset <= SIOP_MAX_OFFSET) ?
offset : SIOP_MAX_OFFSET);
#ifdef DEBUG_SYNC
kprintf("siop sync: params for period %dns: sxfer %x sbcl %x",
printf("siop sync: params for period %dns: sxfer %x sbcl %x",
period * 4, sxfer, sbcl);
kprintf(" actual period %dns\n",
printf(" actual period %dns\n",
sc->sc_tcp[sbcl] * ((sxfer >> 4) + 4));
#endif
}
sc->sc_sync[target].sxfer = sxfer;
sc->sc_sync[target].sbcl = sbcl;
#ifdef DEBUG_SYNC
kprintf ("siop sync: siop_sxfr %02x, siop_sbcl %02x\n", sxfer, sbcl);
printf ("siop sync: siop_sxfr %02x, siop_sbcl %02x\n", sxfer, sbcl);
#endif
}
@ -1555,10 +1555,10 @@ siop_dump_trace()
{
int i;
kprintf("siop trace: next index %d\n", siop_trix);
printf("siop trace: next index %d\n", siop_trix);
i = siop_trix;
do {
kprintf("%3d: '%c' %02x %02x %02x\n", i, siop_trbuf[i],
printf("%3d: '%c' %02x %02x %02x\n", i, siop_trbuf[i],
siop_trbuf[i + 1], siop_trbuf[i + 2], siop_trbuf[i + 3]);
i = (i + 4) & (SIOP_TRACE_SIZE - 1);
} while (i != siop_trix);
@ -1572,20 +1572,20 @@ siop_dump_acb(acb)
u_char *b = (u_char *) &acb->cmd;
int i;
kprintf("acb@%p ", acb);
printf("acb@%p ", acb);
if (acb->xs == NULL) {
kprintf("<unused>\n");
printf("<unused>\n");
return;
}
kprintf("(%d:%d) flags %2x clen %2d cmd ", acb->xs->sc_link->target,
printf("(%d:%d) flags %2x clen %2d cmd ", acb->xs->sc_link->target,
acb->xs->sc_link->lun, acb->flags, acb->clen);
for (i = acb->clen; i; --i)
kprintf(" %02x", *b++);
kprintf("\n");
kprintf(" xs: %p data %p:%04x ", acb->xs, acb->xs->data,
printf(" %02x", *b++);
printf("\n");
printf(" xs: %p data %p:%04x ", acb->xs, acb->xs->data,
acb->xs->datalen);
kprintf("va %p:%lx ", acb->iob_buf, acb->iob_len);
kprintf("cur %lx:%lx\n", acb->iob_curbuf, acb->iob_curlen);
printf("va %p:%lx ", acb->iob_buf, acb->iob_len);
printf("cur %lx:%lx\n", acb->iob_curbuf, acb->iob_curlen);
}
void
@ -1601,36 +1601,36 @@ siop_dump(sc)
#if SIOP_TRACE_SIZE
siop_dump_trace();
#endif
kprintf("%s@%p regs %p istat %x\n",
printf("%s@%p regs %p istat %x\n",
sc->sc_dev.dv_xname, sc, rp, rp->siop_istat);
if ((acb = sc->free_list.tqh_first) > 0) {
kprintf("Free list:\n");
printf("Free list:\n");
while (acb) {
siop_dump_acb(acb);
acb = acb->chain.tqe_next;
}
}
if ((acb = sc->ready_list.tqh_first) > 0) {
kprintf("Ready list:\n");
printf("Ready list:\n");
while (acb) {
siop_dump_acb(acb);
acb = acb->chain.tqe_next;
}
}
if ((acb = sc->nexus_list.tqh_first) > 0) {
kprintf("Nexus list:\n");
printf("Nexus list:\n");
while (acb) {
siop_dump_acb(acb);
acb = acb->chain.tqe_next;
}
}
if (sc->sc_nexus) {
kprintf("Nexus:\n");
printf("Nexus:\n");
siop_dump_acb(sc->sc_nexus);
}
for (i = 0; i < 8; ++i) {
if (sc->sc_tinfo[i].cmds > 2) {
kprintf("tgt %d: cmds %d disc %d senses %d lubusy %x\n",
printf("tgt %d: cmds %d disc %d senses %d lubusy %x\n",
i, sc->sc_tinfo[i].cmds,
sc->sc_tinfo[i].dconns,
sc->sc_tinfo[i].senses,

View File

@ -1,4 +1,4 @@
/* $NetBSD: view.c,v 1.15 1996/10/11 21:12:54 mhitch Exp $ */
/* $NetBSD: view.c,v 1.16 1996/10/13 03:07:35 christos Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -83,7 +83,7 @@ viewattach(cnt)
int cnt;
{
viewprobe();
kprintf("%d view%s configured\n", NVIEW, NVIEW > 1 ? "s" : "");
printf("%d view%s configured\n", NVIEW, NVIEW > 1 ? "s" : "");
}
/* this function is called early to set up a display. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: wesc.c,v 1.16 1996/10/10 23:56:38 christos Exp $ */
/* $NetBSD: wesc.c,v 1.17 1996/10/13 03:07:36 christos Exp $ */
/*
* Copyright (c) 1994 Michael L. Hitch
@ -108,7 +108,7 @@ wescattach(pdp, dp, auxp)
struct zbus_args *zap;
siop_regmap_p rp;
kprintf("\n");
printf("\n");
zap = auxp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wstsc.c,v 1.15 1996/10/10 23:56:40 christos Exp $ */
/* $NetBSD: wstsc.c,v 1.16 1996/10/13 03:07:37 christos Exp $ */
/*
* Copyright (c) 1994 Michael L. Hitch
@ -76,7 +76,7 @@ struct scsi_device wstsc_scsidev = {
#ifdef DEBUG
extern int sci_debug;
#define QPRINTF(a) if (sci_debug > 1) kprintf a
#define QPRINTF(a) if (sci_debug > 1) printf a
#else
#define QPRINTF(a)
#endif
@ -125,7 +125,7 @@ wstscattach(pdp, dp, auxp)
struct sci_softc *sc;
struct zbus_args *zap;
kprintf("\n");
printf("\n");
zap = auxp;
@ -210,7 +210,7 @@ wstsc_dma_xfer_in (dev, len, buf, phase)
|| --wait < 0) {
#ifdef DEBUG
if (sci_debug | 1)
kprintf("supradma2_in fail: l%d i%x w%d\n",
printf("supradma2_in fail: l%d i%x w%d\n",
len, *dev->sci_bus_csr, wait);
#endif
*dev->sci_mode = 0;
@ -247,7 +247,7 @@ wstsc_dma_xfer_in (dev, len, buf, phase)
|| --wait < 0) {
#ifdef DEBUG
if (sci_debug | 1)
kprintf("supradma1_in fail: l%d i%x w%d\n",
printf("supradma1_in fail: l%d i%x w%d\n",
len, *dev->sci_bus_csr, wait);
#endif
*dev->sci_mode = 0;
@ -297,7 +297,7 @@ wstsc_dma_xfer_out (dev, len, buf, phase)
|| --wait < 0) {
#ifdef DEBUG
if (sci_debug)
kprintf("supradma_out fail: l%d i%x w%d\n",
printf("supradma_out fail: l%d i%x w%d\n",
len, *dev->sci_bus_csr, wait);
#endif
*dev->sci_mode = 0;
@ -352,7 +352,7 @@ wstsc_dma_xfer_in2 (dev, len, buf, phase)
|| --wait < 0) {
#ifdef DEBUG
if (sci_debug | 1)
kprintf("supradma2_in2 fail: l%d i%x w%d\n",
printf("supradma2_in2 fail: l%d i%x w%d\n",
len, *dev->sci_bus_csr, wait);
#endif
*dev->sci_mode &= ~SCI_MODE_DMA;
@ -385,7 +385,7 @@ wstsc_dma_xfer_in2 (dev, len, buf, phase)
|| --wait < 0) {
#ifdef DEBUG
if (sci_debug | 1)
kprintf("supradma1_in2 fail: l%d i%x w%d\n",
printf("supradma1_in2 fail: l%d i%x w%d\n",
len, *dev->sci_bus_csr, wait);
#endif
*dev->sci_mode &= ~SCI_MODE_DMA;
@ -446,7 +446,7 @@ wstsc_dma_xfer_out2 (dev, len, buf, phase)
|| --wait < 0) {
#ifdef DEBUG
if (sci_debug)
kprintf("supradma_out2 fail: l%d i%x w%d\n",
printf("supradma_out2 fail: l%d i%x w%d\n",
len, csr, wait);
#endif
*dev->sci_mode = 0;
@ -480,7 +480,7 @@ wstsc_dma_xfer_out2 (dev, len, buf, phase)
|| --wait < 0) {
#ifdef DEBUG
if (sci_debug)
kprintf("supradma_out2 fail: l%d i%x w%d\n",
printf("supradma_out2 fail: l%d i%x w%d\n",
len, csr, wait);
#endif
*dev->sci_mode = 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: zbus.c,v 1.25 1996/10/10 23:56:41 christos Exp $ */
/* $NetBSD: zbus.c,v 1.26 1996/10/13 03:07:38 christos Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -249,11 +249,11 @@ zbusattach(pdp, dp, auxp)
ecdp = &cfdev[ncfdev];
if (amiga_realconfig) {
if (ZTWOMEMADDR)
kprintf(": mem 0x%08lx-0x%08lx",
printf(": mem 0x%08lx-0x%08lx",
ZTWOMEMADDR, ZTWOMEMADDR + NBPG * NZTWOMEMPG - 1);
if (ZBUSAVAIL)
kprintf (": i/o size 0x%08x", ZBUSAVAIL);
kprintf("\n");
printf (": i/o size 0x%08x", ZBUSAVAIL);
printf("\n");
}
for (cdp = cfdev; cdp < ecdp; cdp++) {
for (pcp = preconftab; pcp < epcp; pcp++) {
@ -309,12 +309,12 @@ zbusprint(auxp, pnp)
zap = auxp;
if (pnp) {
kprintf("%s at %s:", aconflookup(zap->manid, zap->prodid),
printf("%s at %s:", aconflookup(zap->manid, zap->prodid),
pnp);
if (zap->manid == -1)
rv = UNSUPP;
}
kprintf(" rom %p man/pro %d/%d", zap->pa, zap->manid, zap->prodid);
printf(" rom %p man/pro %d/%d", zap->pa, zap->manid, zap->prodid);
return(rv);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: zssc.c,v 1.19 1996/10/10 23:56:42 christos Exp $ */
/* $NetBSD: zssc.c,v 1.20 1996/10/13 03:07:38 christos Exp $ */
/*
* Copyright (c) 1994 Michael L. Hitch
@ -108,7 +108,7 @@ zsscattach(pdp, dp, auxp)
struct zbus_args *zap;
siop_regmap_p rp;
kprintf("\n");
printf("\n");
zap = auxp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: psl.h,v 1.9 1996/10/10 23:56:47 christos Exp $ */
/* $NetBSD: psl.h,v 1.10 1996/10/13 03:07:40 christos Exp $ */
#ifndef _MACHINE_PSL_H_
#define _MACHINE_PSL_H_
@ -15,7 +15,7 @@
__asm __volatile ("clrl %0; movew sr,%0; movew %1,sr" : \
"&=d" (_spl_r) : "di" (s)); \
if ((_spl_r&PSL_IPL) > ((s)&PSL_IPL)&&((s)&PSL_IPL)!=PSL_IPL1) \
kprintf ("%s:%d:spl(%d) ==> spl(%d)!!\n",__FILE__,__LINE__, \
printf ("%s:%d:spl(%d) ==> spl(%d)!!\n",__FILE__,__LINE__, \
((PSL_IPL&_spl_r)>>8), ((PSL_IPL&(s))>>8)); \
_spl_r; \
})

View File

@ -1,4 +1,4 @@
/* $NetBSD: ast.c,v 1.6 1996/10/11 00:06:28 christos Exp $ */
/* $NetBSD: ast.c,v 1.7 1996/10/13 03:05:43 christos Exp $ */
/*
* Copyright (c) 1994,1995 Mark Brinicombe
@ -70,7 +70,7 @@ userret(p, pc, oticks)
panic("userret called in non SVC mode !");
if (current_spl_level != SPL_0)
kprintf("userret: spl level=%d on entry\n", current_spl_level);
printf("userret: spl level=%d on entry\n", current_spl_level);
#endif
/* take pending signals */
@ -120,7 +120,7 @@ userret(p, pc, oticks)
#ifdef DIAGNOSTIC
if (current_spl_level != SPL_0)
kprintf("userret: spl level=%d on exit\n", current_spl_level);
printf("userret: spl level=%d on exit\n", current_spl_level);
#endif
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.9 1996/10/11 00:06:29 christos Exp $ */
/* $NetBSD: autoconf.c,v 1.10 1996/10/13 03:05:44 christos Exp $ */
/*
* Copyright (c) 1994,1995 Mark Brinicombe.
@ -161,7 +161,7 @@ set_root_device()
#ifdef DEBUG
if (pmap_debug_level >= 0)
kprintf("rootdev = %08x\n", rootdev);
printf("rootdev = %08x\n", rootdev);
#endif
}
}
@ -222,7 +222,7 @@ swapconf()
break;
if (bdevsw[maj].d_psize) {
s = spltty();
kprintf("swap dev %04x ", swp->sw_dev);
printf("swap dev %04x ", swp->sw_dev);
(void)splx(s);
if (swapsize == -1)
nblks = (*bdevsw[maj].d_psize)(swp->sw_dev);
@ -230,9 +230,9 @@ swapconf()
nblks = swapsize;
s = spltty();
if (nblks == -1)
kprintf("-> device not configured for swap\n");
printf("-> device not configured for swap\n");
else
kprintf("-> %d bytes\n", nblks*DEV_BSIZE);
printf("-> %d bytes\n", nblks*DEV_BSIZE);
(void)splx(s);
if (nblks != -1 &&
(swp->sw_nblks == 0 || swp->sw_nblks > nblks))
@ -290,7 +290,7 @@ configure()
/* Debugging information */
kprintf("ipl_bio=%08x ipl_net=%08x ipl_tty=%08x ipl_clock=%08x ipl_imp=%08x ipl_none=%08x\n",
printf("ipl_bio=%08x ipl_net=%08x ipl_tty=%08x ipl_clock=%08x ipl_imp=%08x ipl_none=%08x\n",
irqmasks[IPL_BIO], irqmasks[IPL_NET], irqmasks[IPL_TTY],
irqmasks[IPL_CLOCK], irqmasks[IPL_IMP], irqmasks[IPL_NONE]);

View File

@ -1,4 +1,4 @@
/* $NetBSD: clock.c,v 1.8 1996/10/11 00:06:32 christos Exp $ */
/* $NetBSD: clock.c,v 1.9 1996/10/13 03:05:45 christos Exp $ */
/*
* Copyright (c) 1994-1996 Mark Brinicombe.
@ -128,7 +128,7 @@ setstatclockrate(hz)
count = TIMER_FREQUENCY / hz;
kprintf("Setting statclock to %dHz (%d ticks)\n", hz, count);
printf("Setting statclock to %dHz (%d ticks)\n", hz, count);
WriteByte(IOMD_T1LOW, (count >> 0) & 0xff);
WriteByte(IOMD_T1HIGH, (count >> 8) & 0xff);
@ -156,7 +156,7 @@ cpu_initclocks()
* This timer generates 100Hz interrupts for the system clock
*/
kprintf("clock: hz=%d stathz = %d profhz = %d\n", hz, stathz, profhz);
printf("clock: hz=%d stathz = %d profhz = %d\n", hz, stathz, profhz);
WriteByte(IOMD_T0LOW, (TIMER0_COUNT >> 0) & 0xff);
WriteByte(IOMD_T0HIGH, (TIMER0_COUNT >> 8) & 0xff);
@ -213,7 +213,7 @@ microtime(tvp)
deltatm = tm - oldtm;
if (deltatm < 0) deltatm += TIMER0_COUNT;
if (deltatm < 0) {
kprintf("opps deltatm < 0 tm=%d oldtm=%d deltatm=%d\n",
printf("opps deltatm < 0 tm=%d oldtm=%d deltatm=%d\n",
tm, oldtm, deltatm);
}
oldtm = tm;
@ -325,7 +325,7 @@ resettodr()
rtc.rtc_micro = 0;
/*
kprintf("resettod: %d/%d/%d%d %d:%d:%d\n", rtc.rtc_day,
printf("resettod: %d/%d/%d%d %d:%d:%d\n", rtc.rtc_day,
rtc.rtc_mon, rtc.rtc_cen, rtc.rtc_year, rtc.rtc_hour,
rtc.rtc_min, rtc.rtc_sec);
*/
@ -392,14 +392,14 @@ inittodr(base)
/* If the base was 0 then keep quiet */
if (base) {
kprintf("inittodr: %02d:%02d:%02d.%02d%02d %02d/%02d/%02d%02d\n",
printf("inittodr: %02d:%02d:%02d.%02d%02d %02d/%02d/%02d%02d\n",
rtc.rtc_hour, rtc.rtc_min, rtc.rtc_sec, rtc.rtc_centi,
rtc.rtc_micro, rtc.rtc_day, rtc.rtc_mon, rtc.rtc_cen,
rtc.rtc_year);
if (n > base + 60) {
days = (n - base) / SECPERDAY;
kprintf("Clock has gained %d day%c %ld hours %ld minutes %ld secs\n",
printf("Clock has gained %d day%c %ld hours %ld minutes %ld secs\n",
days, ((days == 1) ? 0 : 's'), ((n - base) / 3600) % 24,
((n - base) / 60) % 60, (n - base) % 60);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_disasm.c,v 1.6 1996/10/11 00:06:34 christos Exp $ */
/* $NetBSD: db_disasm.c,v 1.7 1996/10/13 03:05:47 christos Exp $ */
/*
* Copyright (c) 1996 Mark Brinicombe.
@ -494,39 +494,39 @@ db_insn_ldrstr(insn, loc)
u_int instruction_msrf(u_int addr, u_int word)
{
kprintf("MSR%s\t", opcode_condition(word));
printf("MSR%s\t", opcode_condition(word));
kprintf("%s_flg, ", (word & 0x00400000) ? "SPSR" : "CPSR");
printf("%s_flg, ", (word & 0x00400000) ? "SPSR" : "CPSR");
if (word & 0x02000000)
kprintf("#0x%08x", (word & 0xff) << (32 - ((word >> 7) & 0x1e)));
printf("#0x%08x", (word & 0xff) << (32 - ((word >> 7) & 0x1e)));
else
kprintf("r%d", word &0x0f);
printf("r%d", word &0x0f);
return(addr);
}
u_int instruction_cdt(u_int addr, u_int word)
{
kprintf("%s%s%s\t", (word & (1 << 20)) ? "LDC" : "STC",
printf("%s%s%s\t", (word & (1 << 20)) ? "LDC" : "STC",
opcode_condition(word), (word & (1 << 22)) ? "L" : "");
kprintf("CP #%d, cr%d, ", (word >> 8) & 0x0f, (word >> 12) & 0x0f);
printf("CP #%d, cr%d, ", (word >> 8) & 0x0f, (word >> 12) & 0x0f);
kprintf("[r%d", (word >> 16) & 0x0f);
printf("[r%d", (word >> 16) & 0x0f);
kprintf("%s, ", (word & (1 << 24)) ? "" : "]");
printf("%s, ", (word & (1 << 24)) ? "" : "]");
if (!(word & (1 << 23)))
kprintf("-");
printf("-");
kprintf("#0x%02x", word & 0xff);
printf("#0x%02x", word & 0xff);
if (word & (1 << 24))
kprintf("]");
printf("]");
if (word & (1 << 21))
kprintf("!");
printf("!");
return(addr);
}
@ -534,23 +534,23 @@ u_int instruction_cdt(u_int addr, u_int word)
u_int instruction_ldfstf(u_int addr, u_int word)
{
kprintf("%s%s%s\t", (word & (1 << 20)) ? "LDF" : "STF",
printf("%s%s%s\t", (word & (1 << 20)) ? "LDF" : "STF",
opcode_condition(word), (word & (1 << 22)) ? "L" : "");
kprintf("f%d, [r%d", (word >> 12) & 0x07, (word >> 16) & 0x0f);
printf("f%d, [r%d", (word >> 12) & 0x07, (word >> 16) & 0x0f);
kprintf("%s, ", (word & (1 << 24)) ? "" : "]");
printf("%s, ", (word & (1 << 24)) ? "" : "]");
if (!(word & (1 << 23)))
kprintf("-");
printf("-");
kprintf("#0x%03x", (word & 0xff) << 2);
printf("#0x%03x", (word & 0xff) << 2);
if (word & (1 << 24))
kprintf("]");
printf("]");
if (word & (1 << 21))
kprintf("!");
printf("!");
return(addr);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_interface.c,v 1.10 1996/10/11 00:06:36 christos Exp $ */
/* $NetBSD: db_interface.c,v 1.11 1996/10/13 03:05:47 christos Exp $ */
/*
* Copyright (c) 1996 Scott K. Stevens
@ -149,7 +149,7 @@ kdb_kbd_trap(tf)
struct trapframe *tf;
{
if (db_active == 0 && (boothowto & RB_KDB)) {
kprintf("\n\nkernel: keyboard interrupt\n");
printf("\n\nkernel: keyboard interrupt\n");
kdb_trap(-1, tf);
}
}
@ -277,7 +277,7 @@ db_machine_init()
*/
if (kernexec->a_syms == 0) {
kprintf("[No symbol table]\n");
printf("[No symbol table]\n");
} else {
esym = (int)&end + kernexec->a_syms + sizeof(int);
len = *((u_int *)esym);

View File

@ -1,4 +1,4 @@
/* $NetBSD: debug.c,v 1.3 1996/10/11 00:06:37 christos Exp $ */
/* $NetBSD: debug.c,v 1.4 1996/10/13 03:05:48 christos Exp $ */
/*
* Copyright (c) 1994 Melvin Tang-Richardson (Nut)
@ -65,7 +65,7 @@ debug_count_processes_on_q(queue)
queue_head=(struct proc *)&qs[queue];
for (lastproc=qs[queue].ph_link;lastproc!=queue_head;lastproc=lastproc->p_forw) {
if (lastproc != queue_head)
kprintf("Process queue=%8x proc=%08x p_addr=%8x, comm=%s\n",
printf("Process queue=%8x proc=%08x p_addr=%8x, comm=%s\n",
queue, (u_int) lastproc, (u_int) lastproc->p_addr,
lastproc->p_comm);
counter++;
@ -85,7 +85,7 @@ debug_show_q_details()
debug_count_processes_on_q(counter);
if (whichqs == 0)
kprintf("queues empty\n");
printf("queues empty\n");
(void)splx(s);
}
@ -103,22 +103,22 @@ debug_show_all_procs(argc, argv)
np = nprocs;
p = ap = (struct proc *)allproc.lh_first;
if (argc > 1)
kprintf(" pid proc addr map pcb pmap comm wchan\n");
printf(" pid proc addr map pcb pmap comm wchan\n");
else
kprintf(" pid proc addr uid ppid pgrp flag stat comm cputime \n");
printf(" pid proc addr uid ppid pgrp flag stat comm cputime \n");
while (--np >= 0) {
pp = p->p_pptr;
if (pp == 0)
pp = p;
if (p->p_stat) {
if (argc > 1)
kprintf("%5d %08x %08x %08x %08x %08x %12s ",
printf("%5d %08x %08x %08x %08x %08x %12s ",
p->p_pid, (u_int) ap, (u_int)p->p_addr,
(u_int) p->p_vmspace,
(u_int) &p->p_addr->u_pcb, (p->p_vmspace ? (u_int)&p->p_vmspace->vm_pmap : 0),
((p->p_comm == 0) ? "..." : p->p_comm));
else
kprintf("%5d %08x %08x %5d %5d %5d %08x %d %12s %5u.%02d ",
printf("%5d %08x %08x %5d %5d %5d %08x %d %12s %5u.%02d ",
p->p_pid, (u_int) ap, (u_int) p->p_addr,
p->p_cred->p_ruid,
pp->p_pid, p->p_pgrp->pg_id, p->p_flag,
@ -127,10 +127,10 @@ debug_show_all_procs(argc, argv)
(u_int)p->p_rtime.tv_usec / 10000);
if (p->p_wchan && argc > 1) {
if (p->p_wmesg)
kprintf("%12s ", p->p_wmesg);
kprintf("%x", (u_int)p->p_wchan);
printf("%12s ", p->p_wmesg);
printf("%x", (u_int)p->p_wchan);
}
kprintf("\n");
printf("\n");
}
ap = p->p_list.le_next;
if (ap == 0 && np > 0)
@ -152,12 +152,12 @@ debug_show_callout(argc, argv)
register int t;
s = splhigh();
kprintf(" cum ticks func arg\n");
printf(" cum ticks func arg\n");
for (cum = 0, p1 = calltodo.c_next; p1; p1 = p1->c_next) {
t = p1->c_time;
if (t > 0)
cum += t;
kprintf("%9d %9d %08x %08x\n", cum, t, (u_int) p1->c_func,
printf("%9d %9d %08x %08x\n", cum, t, (u_int) p1->c_func,
(u_int) p1->c_arg);
}
(void)splx(s);
@ -173,12 +173,12 @@ debug_show_fs(argc, argv)
s = splhigh();
kprintf("Registered filesystems (%d)\n", nvfssw);
printf("Registered filesystems (%d)\n", nvfssw);
for (vfsp = &vfssw[0]; vfsp < &vfssw[nvfssw]; vfsp++) {
if (*vfsp == NULL)
continue;
kprintf(" %s\n", (*vfsp)->vfs_name);
printf(" %s\n", (*vfsp)->vfs_name);
}
(void)splx(s);
}
@ -194,12 +194,12 @@ debug_show_vm_map(map, text)
s = splhigh();
kprintf("vm_map dump : %s\n", text);
printf("vm_map dump : %s\n", text);
mapentry = &map->header;
do {
kprintf("vm_map_entry: start = %08x end = %08x\n",
printf("vm_map_entry: start = %08x end = %08x\n",
(u_int) mapentry->start, (u_int) mapentry->end);
mapentry = mapentry->next;
} while (mapentry != &map->header);
@ -222,11 +222,11 @@ debug_show_pmap(pmap)
pd = (pd_entry_t *)pmap;
kprintf("pdir=%08x\n", (u_int) pd);
printf("pdir=%08x\n", (u_int) pd);
for (loop = 0; loop < 4096; ++loop) {
if (pd[loop] == 0)
continue;
kprintf("%08x : %08x\n", loop * 1024*1024, pd[loop]);
printf("%08x : %08x\n", loop * 1024*1024, pd[loop]);
if ((pd[loop] & 0xff) == 0x11) {
pt = (pt_entry_t *)(PROCESS_PAGE_TBLS_BASE
+ loop * 1024);
@ -237,7 +237,7 @@ debug_show_pmap(pmap)
++loop1;
while (loop1 < 256 && pt[loop1])
++loop1;
kprintf(" %08x -> %08x\n",
printf(" %08x -> %08x\n",
loop * 1024*1024 + start * 4096,
loop * 1024*1024 + loop1 * 4096 - 1);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: disassem.c,v 1.5 1996/10/11 00:06:38 christos Exp $ */
/* $NetBSD: disassem.c,v 1.6 1996/10/13 03:05:49 christos Exp $ */
/*
* Copyright (c) 1994 Mark Brinicombe.
@ -276,18 +276,18 @@ printascii(byte)
byte &= 0x7f;
if (byte < 0x20)
#ifdef DISASSEM_COLOUR
kprintf("\x1b[31m%c\x1b[0m", byte + '@');
printf("\x1b[31m%c\x1b[0m", byte + '@');
#else
kprintf("%c", byte + '@');
printf("%c", byte + '@');
#endif
else if (byte == 0x7f)
#ifdef DISASSEM_COLOUR
kprintf("\x1b[31m?\x1b[0m");
printf("\x1b[31m?\x1b[0m");
#else
kprintf("?");
printf("?");
#endif
else
kprintf("%c", byte);
printf("%c", byte);
}
@ -299,25 +299,25 @@ disassemble(addr)
u_int word;
u_int result = 0;
kprintf("%08x : ", (u_int)addr);
printf("%08x : ", (u_int)addr);
word = *((u_int *)addr);
for (loop = 0; loop < 4; ++loop)
printascii(addr[loop]);
kprintf(" : %08x : ", word);
printf(" : %08x : ", word);
loop = 0;
while (opcodes[loop].mask != 0) {
if ((word & opcodes[loop].mask) == opcodes[loop].pattern) {
#ifdef DISASSEM_COLOUR
kprintf("\x1b[3%dm", opcodes[loop].colour);
printf("\x1b[3%dm", opcodes[loop].colour);
#endif
result = (*opcodes[loop].decoder)((u_int )addr, word);
#ifdef DISASSEM_COLOUR
kprintf("\x1b[0m");
printf("\x1b[0m");
#endif
break;
}
@ -325,9 +325,9 @@ disassemble(addr)
}
if (opcodes[loop].mask == 0)
kprintf("Undefined instruction");
printf("Undefined instruction");
kprintf("\n\r");
printf("\n\r");
return(result);
}
@ -337,7 +337,7 @@ instruction_swi(addr, word)
u_int addr;
u_int word;
{
kprintf("SWI%s\t0x%08x", opcode_condition(word), (word & 0x00ffffff));
printf("SWI%s\t0x%08x", opcode_condition(word), (word & 0x00ffffff));
return(addr);
}
@ -356,9 +356,9 @@ instruction_branch(addr, word)
branch += addr + 8;
if (word & 0x01000000)
kprintf("BL%s\t0x%08x", opcode_condition(word), branch);
printf("BL%s\t0x%08x", opcode_condition(word), branch);
else
kprintf("B%s\t0x%08x", opcode_condition(word), branch);
printf("B%s\t0x%08x", opcode_condition(word), branch);
return(branch);
}
@ -369,9 +369,9 @@ instruction_mul(addr, word)
u_int addr;
u_int word;
{
kprintf("MUL%s%s\t", opcode_condition(word), opcode_s(word));
printf("MUL%s%s\t", opcode_condition(word), opcode_s(word));
kprintf("r%d, r%d, r%d", (word >> 16) & 0x0f, word & 0x0f,
printf("r%d, r%d, r%d", (word >> 16) & 0x0f, word & 0x0f,
(word >> 8) & 0x0f);
return(addr);
}
@ -382,9 +382,9 @@ instruction_mla(addr, word)
u_int addr;
u_int word;
{
kprintf("MLA%s%s\t", opcode_condition(word), opcode_s(word));
printf("MLA%s%s\t", opcode_condition(word), opcode_s(word));
kprintf("r%d, r%d, r%d, r%d", (word >> 16) & 0x0f, word & 0x0f,
printf("r%d, r%d, r%d, r%d", (word >> 16) & 0x0f, word & 0x0f,
(word >> 8) & 0x0f, (word >> 12) & 0x0f);
return(addr);
}
@ -394,16 +394,16 @@ static void
register_shift(word)
u_int word;
{
kprintf("r%d", (word & 0x0f));
printf("r%d", (word & 0x0f));
if ((word & 0x00000ff0) == 0)
;
else if ((word & 0x00000ff0) == 0x00000060)
kprintf(", RRX");
printf(", RRX");
else {
if (word & 0x10)
kprintf(", %s r%d", opcode_shift(word), (word >> 8) & 0x0f);
printf(", %s r%d", opcode_shift(word), (word >> 8) & 0x0f);
else
kprintf(", %s #%d", opcode_shift(word), (word >> 7) & 0x1f);
printf(", %s #%d", opcode_shift(word), (word >> 7) & 0x1f);
}
}
@ -413,10 +413,10 @@ instruction_ldrstr(addr, word)
u_int addr;
u_int word;
{
kprintf("%s%s%s%s\t", (word & 0x00100000) ? "LDR" : "STR",
printf("%s%s%s%s\t", (word & 0x00100000) ? "LDR" : "STR",
opcode_condition(word), opcode_b(word), opcode_t(word));
kprintf("r%d, ", (word >> 12) & 0x0f);
printf("r%d, ", (word >> 12) & 0x0f);
if (((word >> 16) & 0x0f) == 16)
{
@ -428,23 +428,23 @@ instruction_ldrstr(addr, word)
}
else
{
kprintf("[r%d", (word >> 16) & 0x0f);
printf("[r%d", (word >> 16) & 0x0f);
kprintf("%s, ", (word & (1 << 24)) ? "" : "]");
printf("%s, ", (word & (1 << 24)) ? "" : "]");
if (!(word & 0x00800000))
kprintf("-");
printf("-");
if (word & (1 << 25))
register_shift(word);
else
kprintf("#0x%04x", word & 0xfff);
printf("#0x%04x", word & 0xfff);
if (word & (1 << 24))
kprintf("]");
printf("]");
if (word & (1 << 21))
kprintf("!");
printf("!");
}
return(addr);
@ -459,15 +459,15 @@ instruction_ldmstm(addr, word)
int loop;
int start;
kprintf("%s%s%s\t", (word & 0x00100000) ? "LDM" : "STM",
printf("%s%s%s\t", (word & 0x00100000) ? "LDM" : "STM",
opcode_condition(word), opcode_blktrans(word));
kprintf("r%d", (word >> 16) & 0x0f);
printf("r%d", (word >> 16) & 0x0f);
if (word & (1 << 21))
kprintf("!");
printf("!");
kprintf(", {");
printf(", {");
start = -1;
@ -478,9 +478,9 @@ instruction_ldmstm(addr, word)
if (!(word & (1 << loop)) || loop == 16)
{
if (start == loop - 1)
kprintf("r%d, ", start);
printf("r%d, ", start);
else
kprintf("r%d-r%d, ", start, loop - 1);
printf("r%d-r%d, ", start, loop - 1);
start = -1;
}
}
@ -491,10 +491,10 @@ instruction_ldmstm(addr, word)
}
}
kprintf("\x7f\x7f}");
printf("\x7f\x7f}");
if (word & (1 << 22))
kprintf("^");
printf("^");
return(addr);
}
@ -507,18 +507,18 @@ instruction_dataproc(addr, word)
if ((word & 0x01800000) == 0x01000000)
word = word & ~(1<<20);
kprintf("%s%s%s\t", opcode_dataproc(word), opcode_condition(word),
printf("%s%s%s\t", opcode_dataproc(word), opcode_condition(word),
opcode_s(word));
if ((word & 0x01800000) != 0x01000000)
kprintf("r%d, ", (word >> 12) & 0x0f);
printf("r%d, ", (word >> 12) & 0x0f);
if ((word & 0x01a00000) != 0x01a00000)
kprintf("r%d, ", (word >> 16) & 0x0f);
printf("r%d, ", (word >> 16) & 0x0f);
if (word & 0x02000000)
{
kprintf("#&%08x", (word & 0xff) << (((word >> 7) & 0x1e)));
printf("#&%08x", (word & 0xff) << (((word >> 7) & 0x1e)));
}
else
{
@ -533,9 +533,9 @@ instruction_swap(addr, word)
u_int addr;
u_int word;
{
kprintf("SWP%s%s\t", opcode_condition(word), opcode_b(word));
printf("SWP%s%s\t", opcode_condition(word), opcode_b(word));
kprintf("r%d, r%d, [r%d]", (word >> 12) & 0x0f, (word & 0x0f),
printf("r%d, r%d, [r%d]", (word >> 12) & 0x0f, (word & 0x0f),
(word >> 16) & 0x0f);
return(addr);
}
@ -546,9 +546,9 @@ instruction_mrs(addr, word)
u_int addr;
u_int word;
{
kprintf("MRS%s\tr%d, ", opcode_condition(word), (word >> 12) & 0x0f);
printf("MRS%s\tr%d, ", opcode_condition(word), (word >> 12) & 0x0f);
kprintf("%s", (word & 0x00400000) ? "SPSR" : "CPSR");
printf("%s", (word & 0x00400000) ? "SPSR" : "CPSR");
return(addr);
}
@ -558,9 +558,9 @@ instruction_msr(addr, word)
u_int addr;
u_int word;
{
kprintf("MSR%s\t", opcode_condition(word));
printf("MSR%s\t", opcode_condition(word));
kprintf("%s, r%d", (word & 0x00400000) ? "SPSR" : "CPSR", word & 0x0f);
printf("%s, r%d", (word & 0x00400000) ? "SPSR" : "CPSR", word & 0x0f);
return(addr);
}
@ -571,14 +571,14 @@ instruction_msrf(addr, word)
u_int addr;
u_int word;
{
kprintf("MSR%s\t", opcode_condition(word));
printf("MSR%s\t", opcode_condition(word));
kprintf("%s_flg, ", (word & 0x00400000) ? "SPSR" : "CPSR");
printf("%s_flg, ", (word & 0x00400000) ? "SPSR" : "CPSR");
if (word & 0x02000000)
kprintf("#0x%08x", (word & 0xff) << (32 - ((word >> 7) & 0x1e)));
printf("#0x%08x", (word & 0xff) << (32 - ((word >> 7) & 0x1e)));
else
kprintf("r%d", word &0x0f);
printf("r%d", word &0x0f);
return(addr);
}
@ -588,16 +588,16 @@ instruction_mrcmcr(addr, word)
u_int addr;
u_int word;
{
kprintf("%s%s\t", (word & (1 << 20)) ? "MRC" : "MCR",
printf("%s%s\t", (word & (1 << 20)) ? "MRC" : "MCR",
opcode_condition(word));
kprintf("CP #%d, %d, ", (word >> 8) & 0x0f, (word >> 21) & 0x07);
printf("CP #%d, %d, ", (word >> 8) & 0x0f, (word >> 21) & 0x07);
kprintf("r%d, cr%d, cr%d", (word >> 12) & 0x0f, (word >> 16) & 0x0f,
printf("r%d, cr%d, cr%d", (word >> 12) & 0x0f, (word >> 16) & 0x0f,
word & 0x0f);
if (((word >> 5) & 0x07) != 0)
kprintf(", %d", (word >> 5) & 0x07);
printf(", %d", (word >> 5) & 0x07);
return(addr);
}
@ -608,14 +608,14 @@ instruction_cdp(addr, word)
u_int addr;
u_int word;
{
kprintf("CDP%s\t", opcode_condition(word));
printf("CDP%s\t", opcode_condition(word));
kprintf("CP #%d, %d, ", (word >> 8) & 0x0f, (word >> 20) & 0x0f);
printf("CP #%d, %d, ", (word >> 8) & 0x0f, (word >> 20) & 0x0f);
kprintf("cr%d, cr%d, cr%d", (word >> 12) & 0x0f, (word >> 16) & 0x0f,
printf("cr%d, cr%d, cr%d", (word >> 12) & 0x0f, (word >> 16) & 0x0f,
word & 0x0f);
kprintf(", %d", (word >> 5) & 0x07);
printf(", %d", (word >> 5) & 0x07);
return(addr);
}
@ -626,25 +626,25 @@ instruction_cdt(addr, word)
u_int addr;
u_int word;
{
kprintf("%s%s%s\t", (word & (1 << 20)) ? "LDC" : "STC",
printf("%s%s%s\t", (word & (1 << 20)) ? "LDC" : "STC",
opcode_condition(word), (word & (1 << 22)) ? "L" : "");
kprintf("CP #%d, cr%d, ", (word >> 8) & 0x0f, (word >> 12) & 0x0f);
printf("CP #%d, cr%d, ", (word >> 8) & 0x0f, (word >> 12) & 0x0f);
kprintf("[r%d", (word >> 16) & 0x0f);
printf("[r%d", (word >> 16) & 0x0f);
kprintf("%s, ", (word & (1 << 24)) ? "" : "]");
printf("%s, ", (word & (1 << 24)) ? "" : "]");
if (!(word & (1 << 23)))
kprintf("-");
printf("-");
kprintf("#0x%02x", word & 0xff);
printf("#0x%02x", word & 0xff);
if (word & (1 << 24))
kprintf("]");
printf("]");
if (word & (1 << 21))
kprintf("!");
printf("!");
return(addr);
}
@ -655,15 +655,15 @@ instruction_fpabinop(addr, word)
u_int addr;
u_int word;
{
kprintf("%s%s%s%s\t", opcode_fpabinop(word), opcode_condition(word),
printf("%s%s%s%s\t", opcode_fpabinop(word), opcode_condition(word),
opcode_fpaprec(word), opcode_fparnd(word));
kprintf("f%d, f%d, ", (word >> 12) & 0x07, (word >> 16) & 0x07);
printf("f%d, f%d, ", (word >> 12) & 0x07, (word >> 16) & 0x07);
if (word & (1 << 3))
kprintf("#%s", opcode_fpaimm(word));
printf("#%s", opcode_fpaimm(word));
else
kprintf("f%d", word & 0x07);
printf("f%d", word & 0x07);
return(addr);
}
@ -674,15 +674,15 @@ instruction_fpaunop(addr, word)
u_int addr;
u_int word;
{
kprintf("%s%s%s%s\t", opcode_fpaunop(word), opcode_condition(word),
printf("%s%s%s%s\t", opcode_fpaunop(word), opcode_condition(word),
opcode_fpaprec(word), opcode_fparnd(word));
kprintf("f%d, ", (word >> 12) & 0x07);
printf("f%d, ", (word >> 12) & 0x07);
if (word & (1 << 3))
kprintf("#%s", opcode_fpaimm(word));
printf("#%s", opcode_fpaimm(word));
else
kprintf("f%d", word & 0x07);
printf("f%d", word & 0x07);
return(addr);
}
@ -693,23 +693,23 @@ instruction_ldfstf(addr, word)
u_int addr;
u_int word;
{
kprintf("%s%s%s\t", (word & (1 << 20)) ? "LDF" : "STF",
printf("%s%s%s\t", (word & (1 << 20)) ? "LDF" : "STF",
opcode_condition(word), (word & (1 << 22)) ? "L" : "");
kprintf("f%d, [r%d", (word >> 12) & 0x07, (word >> 16) & 0x0f);
printf("f%d, [r%d", (word >> 12) & 0x07, (word >> 16) & 0x0f);
kprintf("%s, ", (word & (1 << 24)) ? "" : "]");
printf("%s, ", (word & (1 << 24)) ? "" : "]");
if (!(word & (1 << 23)))
kprintf("-");
printf("-");
kprintf("#0x%03x", (word & 0xff) << 2);
printf("#0x%03x", (word & 0xff) << 2);
if (word & (1 << 24))
kprintf("]");
printf("]");
if (word & (1 << 21))
kprintf("!");
printf("!");
return(addr);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: disksubr.c,v 1.4 1996/10/11 00:06:39 christos Exp $ */
/* $NetBSD: disksubr.c,v 1.5 1996/10/13 03:05:50 christos Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@ -120,7 +120,7 @@ readdisklabel(dev, strat, lp, osdep)
char *msg = NULL;
int cyl, riscbsdpartoff, i;
/* kprintf("Reading disclabel for %04x\n", dev);*/
/* printf("Reading disclabel for %04x\n", dev);*/
/* minimal requirements for archtypal disk label */
@ -164,7 +164,7 @@ readdisklabel(dev, strat, lp, osdep)
/* read the filecore boot block */
/* kprintf("readdisclabel: Reading boot block\n");*/
/* printf("readdisclabel: Reading boot block\n");*/
bp->b_blkno = FILECORE_BOOT_SECTOR;
bp->b_bcount = lp->d_secsize;
@ -187,7 +187,7 @@ readdisklabel(dev, strat, lp, osdep)
/* Invalid boot block so lets assume the entire disc is RiscBSD */
/* kprintf("readdisklabel: Invalid filecore boot block (incorrect checksum)\n");*/
/* printf("readdisklabel: Invalid filecore boot block (incorrect checksum)\n");*/
goto readlabel;
}
@ -201,7 +201,7 @@ readdisklabel(dev, strat, lp, osdep)
/* Do we have a RiscBSD partition table ? */
if (bb->partition_type == PARTITION_FORMAT_RISCBSD) {
/* kprintf("heads = %d nsectors = %d\n", heads, sectors);*/
/* printf("heads = %d nsectors = %d\n", heads, sectors);*/
riscbsdpartoff = cyl * heads * sectors;
} else if (bb->partition_type == PARTITION_FORMAT_RISCIX) {
@ -213,7 +213,7 @@ readdisklabel(dev, strat, lp, osdep)
/* Ok read the RISCiX partition table and see if there is a RiscBSD partition */
bp->b_blkno = cyl * heads * sectors;
kprintf("Found RiscIX partition table @ %08x\n", bp->b_blkno);
printf("Found RiscIX partition table @ %08x\n", bp->b_blkno);
bp->b_cylin = bp->b_blkno / lp->d_secpercyl;
bp->b_bcount = lp->d_secsize;
bp->b_flags = B_BUSY | B_READ;
@ -228,7 +228,7 @@ readdisklabel(dev, strat, lp, osdep)
rpt = (struct riscix_partition_table *)bp->b_data;
/* for (loop = 0; loop < NRISCIX_PARTITIONS; ++loop)
kprintf("p%d: %16s %08x %08x %08x\n", loop,
printf("p%d: %16s %08x %08x %08x\n", loop,
rpt->partitions[loop].rp_name,
rpt->partitions[loop].rp_start,
rpt->partitions[loop].rp_length,
@ -254,7 +254,7 @@ readdisklabel(dev, strat, lp, osdep)
/* next, dig out disk label */
readlabel:
/* kprintf("Reading disklabel addr=%08x\n", riscbsdpartoff * DEV_BSIZE);*/
/* printf("Reading disklabel addr=%08x\n", riscbsdpartoff * DEV_BSIZE);*/
bp->b_blkno = riscbsdpartoff + LABELSECTOR;
bp->b_cylin = bp->b_blkno / lp->d_secpercyl;
@ -425,7 +425,7 @@ writedisklabel(dev, strat, lp, osdep)
/* read the filecore boot block */
kprintf("writedisklabel: Reading boot block\n");
printf("writedisklabel: Reading boot block\n");
bp->b_blkno = FILECORE_BOOT_SECTOR;
bp->b_bcount = lp->d_secsize;
@ -436,7 +436,7 @@ writedisklabel(dev, strat, lp, osdep)
/* if successful, validate boot block and locate parition table */
if (biowait(bp)) {
kprintf("writedisklabel: filecore boot block I/O error\n");
printf("writedisklabel: filecore boot block I/O error\n");
goto done;
}
@ -447,14 +447,14 @@ writedisklabel(dev, strat, lp, osdep)
if (bb->checksum != filecore_checksum((u_char *)bb)) {
/* Invalid boot block so lets assume the entire disc is RiscBSD */
kprintf("writedisklabel: Invalid filecore boot block (incorrect checksum)\n");
printf("writedisklabel: Invalid filecore boot block (incorrect checksum)\n");
goto writelabel;
}
/* Do we have a RiscBSD partition ? */
if (bb->partition_type != PARTITION_FORMAT_RISCBSD) {
kprintf("writedisklabel: Invalid partition format\n");
printf("writedisklabel: Invalid partition format\n");
goto done;
}
@ -463,14 +463,14 @@ writedisklabel(dev, strat, lp, osdep)
heads = bb->heads;
sectors = bb->secspertrack;
/*kprintf("heads = %d nsectors = %d\n", heads, sectors);*/
/*printf("heads = %d nsectors = %d\n", heads, sectors);*/
riscbsdpartoff = cyl * heads * sectors;
}
writelabel:
/* kprintf("writedisklabel: Reading disklabel addr=%08x\n", riscbsdpartoff * DEV_BSIZE);*/
/* printf("writedisklabel: Reading disklabel addr=%08x\n", riscbsdpartoff * DEV_BSIZE);*/
/* next, dig out disk label */

View File

@ -1,4 +1,4 @@
/* $NetBSD: fault.c,v 1.9 1996/10/11 00:06:40 christos Exp $ */
/* $NetBSD: fault.c,v 1.10 1996/10/13 03:05:51 christos Exp $ */
/*
* Copyright (c) 1994-1996 Mark Brinicombe.
@ -181,11 +181,11 @@ data_abort_handler(frame)
s = spltty();
if (pmap_debug_level >= 0) {
kprintf("Data abort: '%s' status = %03x address = %08x PC = %08x\n",
printf("Data abort: '%s' status = %03x address = %08x PC = %08x\n",
aborts[fault_status & 0xf], fault_status & 0xfff,
fault_address, fault_pc);
kprintf("Instruction @V%08x = %08x\n",
printf("Instruction @V%08x = %08x\n",
fault_pc, fault_instruction);
}
@ -195,7 +195,7 @@ data_abort_handler(frame)
if ((fault_instruction & 0x0fb00ff0) == 0x01000090) {
if (pmap_debug_level >= 0) {
kprintf("SWP\n");
printf("SWP\n");
disassemble(fault_pc);
}
} else if ((fault_instruction & 0x0c000000) == 0x04000000) {
@ -213,7 +213,7 @@ data_abort_handler(frame)
#ifdef DEBUG_FAULT_CORRECTION
if (pmap_debug_level >= 0) {
/* kprintf("LDR/STR\n");*/
/* printf("LDR/STR\n");*/
disassemble(fault_pc);
}
#endif
@ -235,7 +235,7 @@ data_abort_handler(frame)
}
#ifdef DEBUG_FAULT_CORRECTION
if (pmap_debug_level >=0)
kprintf("late abt fix: r%d=%08x ", base, registers[base]);
printf("late abt fix: r%d=%08x ", base, registers[base]);
#endif
if ((fault_instruction & (1 << 25)) == 0) {
/* Immediate offset - easy */
@ -245,7 +245,7 @@ data_abort_handler(frame)
registers[base] += offset;
#ifdef DEBUG_FAULT_CORRECTION
if (pmap_debug_level >=0)
kprintf("imm=%08x ", offset);
printf("imm=%08x ", offset);
#endif
} else {
int shift;
@ -273,13 +273,13 @@ data_abort_handler(frame)
}
#ifdef DEBUG_FAULT_CORRECTION
if (pmap_debug_level >=0)
kprintf("shift reg=%d ", shift);
printf("shift reg=%d ", shift);
#endif
shift = registers[shift];
}
#ifdef DEBUG_FAULT_CORRECTION
if (pmap_debug_level >=0)
kprintf("shift=%08x ", shift);
printf("shift=%08x ", shift);
#endif
switch (((fault_instruction >> 5) & 0x3)) {
case 0 : /* Logical left */
@ -301,19 +301,19 @@ data_abort_handler(frame)
#ifdef DEBUG_FAULT_CORRECTION
if (pmap_debug_level >=0)
kprintf("abt: fixed LDR/STR with register offset\n");
printf("abt: fixed LDR/STR with register offset\n");
#endif
if ((fault_instruction & (1 << 23)))
offset = -offset;
#ifdef DEBUG_FAULT_CORRECTION
if (pmap_debug_level >=0)
kprintf("offset=%08x ", offset);
printf("offset=%08x ", offset);
#endif
registers[base] += offset;
}
#ifdef DEBUG_FAULT_CORRECTION
if (pmap_debug_level >=0)
kprintf("r%d=%08x\n", base, registers[base]);
printf("r%d=%08x\n", base, registers[base]);
#endif
}
#endif
@ -326,14 +326,14 @@ data_abort_handler(frame)
#ifdef DEBUG_FAULT_CORRECTION
if (pmap_debug_level >= 0) {
kprintf("LDM/STM\n");
printf("LDM/STM\n");
disassemble(fault_pc);
}
#endif
if (fault_instruction & (1 << 21)) {
#ifdef DEBUG_FAULT_CORRECTION
if (pmap_debug_level >= 0)
kprintf("This instruction must be corrected\n");
printf("This instruction must be corrected\n");
#endif
base = (fault_instruction >> 16) & 0x0f;
if (base == 15) {
@ -347,20 +347,20 @@ data_abort_handler(frame)
}
#ifdef DEBUG_FAULT_CORRECTION
if (pmap_debug_level >= 0) {
kprintf("%d registers used\n", count);
kprintf("Corrected r%d by %d bytes ", base, count * 4);
printf("%d registers used\n", count);
printf("Corrected r%d by %d bytes ", base, count * 4);
}
#endif
if (fault_instruction & (1 << 23)) {
#ifdef DEBUG_FAULT_CORRECTION
if (pmap_debug_level >= 0)
kprintf("down\n");
printf("down\n");
#endif
registers[base] -= count * 4;
} else {
#ifdef DEBUG_FAULT_CORRECTION
if (pmap_debug_level >= 0)
kprintf("up\n");
printf("up\n");
#endif
registers[base] += count * 4;
}
@ -374,7 +374,7 @@ data_abort_handler(frame)
#ifdef DEBUG_FAULT_CORRECTION
if (pmap_debug_level >= 0) {
kprintf("LDC/STC\n");
printf("LDC/STC\n");
disassemble(fault_pc);
}
#endif
@ -394,12 +394,12 @@ data_abort_handler(frame)
offset = (fault_instruction & 0xff) << 2;
if (pmap_debug_level >= 0)
kprintf("r%d=%08x\n", base, registers[base]);
printf("r%d=%08x\n", base, registers[base]);
if ((fault_instruction & (1 << 23)) != 0)
offset = -offset;
registers[base] += offset;
if (pmap_debug_level >= 0)
kprintf("r%d=%08x\n", base, registers[base]);
printf("r%d=%08x\n", base, registers[base]);
}
} else if ((fault_instruction & 0x0e000000) == 0x0c000000) {
disassemble(fault_pc);
@ -446,7 +446,7 @@ data_abort_handler(frame)
p = &proc0;
if (pmap_debug_level >= 0)
kprintf("fault in process %08x\n", (u_int)p);
printf("fault in process %08x\n", (u_int)p);
/* can't use curpcb, as it might be NULL; and we have p in a register anyway */
@ -463,9 +463,9 @@ data_abort_handler(frame)
}
if (pcb != curpcb) {
kprintf("data_abort: Alert ! pcb(%08x) != curpcb(%08x)\n", (u_int)pcb,
printf("data_abort: Alert ! pcb(%08x) != curpcb(%08x)\n", (u_int)pcb,
(u_int)curpcb);
kprintf("data_abort: Alert ! proc(%08x), curproc(%08x)\n", (u_int)p,
printf("data_abort: Alert ! proc(%08x), curproc(%08x)\n", (u_int)p,
(u_int)curproc);
}
@ -475,7 +475,7 @@ data_abort_handler(frame)
&& (fault_code != FAULT_TRANS_S && fault_code != FAULT_TRANS_P))
|| pcb->pcb_onfault == fusubailout) {
copyfault:
kprintf("Using pcb_onfault=%08x addr=%08x st=%08x\n",
printf("Using pcb_onfault=%08x addr=%08x st=%08x\n",
(u_int)pcb->pcb_onfault, fault_address, fault_status);
frame->tf_pc = (u_int)pcb->pcb_onfault;
if ((frame->tf_spsr & PSR_MODE) == PSR_USR32_MODE)
@ -486,7 +486,7 @@ copyfault:
#endif
++onfault_count;
if (onfault_count > 10) {
kprintf("Bummer: OD'ing on onfault_count\n");
printf("Bummer: OD'ing on onfault_count\n");
#ifdef DDB
Debugger();
onfault_count = 0;
@ -590,7 +590,7 @@ copyfault:
va = trunc_page((vm_offset_t)fault_address);
if (pmap_debug_level >= 0)
kprintf("ok we have a page permission fault - addr=V%08x ",
printf("ok we have a page permission fault - addr=V%08x ",
(u_int)va);
/*
@ -607,7 +607,7 @@ copyfault:
/* Was the fault due to the FPE/KGDB ? */
if ((frame->tf_spsr & PSR_MODE) == PSR_UND32_MODE) {
kprintf("UND32 Data abort: '%s' status = %03x address = %08x PC = %08x\n",
printf("UND32 Data abort: '%s' status = %03x address = %08x PC = %08x\n",
aborts[fault_status & 0xf], fault_status & 0xfff, fault_address,
fault_pc);
postmortem(frame);
@ -615,7 +615,7 @@ copyfault:
goto out;
}
kprintf("Data abort: '%s' status = %03x address = %08x PC = %08x\n",
printf("Data abort: '%s' status = %03x address = %08x PC = %08x\n",
aborts[fault_status & 0xf], fault_status & 0xfff, fault_address,
fault_pc);
postmortem(frame);
@ -625,13 +625,13 @@ copyfault:
#ifdef DIAGNOSTIC
if (va == 0 && map == kernel_map) {
kprintf("fault: bad kernel access at %x\n", (u_int)va);
printf("fault: bad kernel access at %x\n", (u_int)va);
goto we_re_toast;
}
#endif
if (pmap_debug_level >= 0)
kprintf("vmmap=%08x ", (u_int)map);
printf("vmmap=%08x ", (u_int)map);
/*
* We need to know whether the page should be mapped as R or R/W.
@ -661,10 +661,10 @@ copyfault:
rv = vm_fault(map, va, ftype, FALSE);
if (pmap_debug_level >= 0)
kprintf("fault result=%d\n", rv);
printf("fault result=%d\n", rv);
if (rv == KERN_SUCCESS)
goto out;
kprintf("Data abort: '%s' status = %03x address = %08x PC = %08x\n",
printf("Data abort: '%s' status = %03x address = %08x PC = %08x\n",
aborts[fault_status & 0xf], fault_status & 0xfff, fault_address,
fault_pc);
postmortem(frame);
@ -690,7 +690,7 @@ copyfault:
* the FAULT_PERM_P | FAULT_USER case similarly to FAULT_TRANS_P
*/
kprintf("Data abort: '%s' status = %03x address = %08x PC = %08x\n",
printf("Data abort: '%s' status = %03x address = %08x PC = %08x\n",
aborts[fault_status & 0xf], fault_status & 0xfff, fault_address,
fault_pc);
postmortem(frame);
@ -704,7 +704,7 @@ copyfault:
* However I have had this panic once so it can occor
* Yes they do ... Writing to -1 in user space does it ...
*/
kprintf("Data abort: '%s' status = %03x address = %08x PC = %08x\n",
printf("Data abort: '%s' status = %03x address = %08x PC = %08x\n",
aborts[fault_status & 0xf], fault_status & 0xfff, fault_address,
fault_pc);
disassemble(fault_pc);
@ -744,7 +744,7 @@ copyfault:
va = trunc_page((vm_offset_t)fault_address);
if (pmap_debug_level >= 0)
kprintf("ok we have a page fault - addr=V%08x ", (u_int)va);
printf("ok we have a page fault - addr=V%08x ", (u_int)va);
/*
* It is only a kernel address space fault iff:
@ -762,7 +762,7 @@ copyfault:
map = &vm->vm_map;
if (pmap_debug_level >= 0)
kprintf("vmmap=%08x ", (u_int)map);
printf("vmmap=%08x ", (u_int)map);
if (pmap_handled_emulation(map->pmap, va))
goto out;
@ -791,11 +791,11 @@ copyfault:
ftype |= VM_PROT_WRITE;
if (pmap_debug_level >= 0)
kprintf("fault protection = %d\n", ftype);
printf("fault protection = %d\n", ftype);
#ifdef DIAGNOSTIC
if (va == 0 && map == kernel_map) {
kprintf("trap: bad kernel access at %x\n", (u_int)va);
printf("trap: bad kernel access at %x\n", (u_int)va);
goto we_re_toast;
}
#endif
@ -819,7 +819,7 @@ copyfault:
*/
rv = vm_fault(map, va, ftype, FALSE);
/*kprintf("fault result=%d\n", rv);*/
/*printf("fault result=%d\n", rv);*/
if (rv == KERN_SUCCESS) {
if (nss > vm->vm_ssize)
vm->vm_ssize = nss;
@ -836,14 +836,14 @@ copyfault:
}
nogo:
if (fault_code == FAULT_TRANS_P) {
kprintf("Failed page fault in kernel\n");
printf("Failed page fault in kernel\n");
if (pcb->pcb_onfault)
goto copyfault;
kprintf("vm_fault(%x, %x, %x, 0) -> %x\n",
printf("vm_fault(%x, %x, %x, 0) -> %x\n",
(u_int)map, (u_int)va, ftype, rv);
goto we_re_toast;
}
kprintf("nogo, Data abort: '%s' status = %03x address = %08x PC = %08x\n",
printf("nogo, Data abort: '%s' status = %03x address = %08x PC = %08x\n",
aborts[fault_status & 0xf], fault_status & 0xfff, fault_address,
fault_pc);
disassemble(fault_pc);
@ -868,7 +868,7 @@ nogo:
va = trunc_page((vm_offset_t)fault_address);
if (pmap_debug_level >= 0)
kprintf("ok we have a section fault page addr=V%08x\n",
printf("ok we have a section fault page addr=V%08x\n",
(u_int)va);
/*
@ -895,7 +895,7 @@ nogo:
ftype = VM_PROT_READ | VM_PROT_WRITE;
#ifdef DIAGNOSTIC
if (map == kernel_map && va == 0) {
kprintf("trap: bad kernel access at %x\n", (u_int)va);
printf("trap: bad kernel access at %x\n", (u_int)va);
goto we_re_toast;
}
#endif
@ -904,10 +904,10 @@ nogo:
if ((caddr_t)va >= vm->vm_maxsaddr
&& (caddr_t)va < (caddr_t)VM_MAXUSER_ADDRESS
&& map != kernel_map) {
/* kprintf("Address is in the stack\n");*/
/* printf("Address is in the stack\n");*/
nss = clrnd(btoc(USRSTACK-(u_int)va));
if (nss > btoc(p->p_rlimit[RLIMIT_STACK].rlim_cur)) {
kprintf("Stack limit exceeded %08x %08x\n",
printf("Stack limit exceeded %08x %08x\n",
nss, btoc(p->p_rlimit[RLIMIT_STACK].rlim_cur));
rv = KERN_FAILURE;
goto nogo1;
@ -918,20 +918,20 @@ nogo:
v = trunc_page(vtopte(va));
if (pmap_debug_level >= 0)
kprintf("v=%08x\n", v);
printf("v=%08x\n", v);
rv = vm_fault(map, v, ftype, FALSE);
if (rv != KERN_SUCCESS)
goto nogo1;
if (pmap_debug_level >= 0)
kprintf("vm_fault succeeded\n");
printf("vm_fault succeeded\n");
/* update increment wiring as this is a page table fault */
vm_map_pageable(map, v, round_page(v+1), FALSE);
if (pmap_debug_level >= 0)
kprintf("faulting in page %08x\n", (u_int)va);
printf("faulting in page %08x\n", (u_int)va);
ftype = VM_PROT_READ;
@ -951,15 +951,15 @@ nogo:
goto out;
}
nogo1:
kprintf("nogo1, Data abort: '%s' status = %03x address = %08x PC = %08x\n",
printf("nogo1, Data abort: '%s' status = %03x address = %08x PC = %08x\n",
aborts[fault_status & 0xf], fault_status & 0xfff, fault_address,
fault_pc);
disassemble(fault_pc);
if (fault_code == FAULT_TRANS_S) {
kprintf("Section fault in SVC mode\n");
printf("Section fault in SVC mode\n");
if (pcb->pcb_onfault)
goto copyfault;
kprintf("vm_fault(%x, %x, %x, 0) -> %x\n",
printf("vm_fault(%x, %x, %x, 0) -> %x\n",
(u_int)map, (u_int)va, ftype, rv);
goto we_re_toast;
}
@ -973,7 +973,7 @@ nogo1:
default :
/* Are there any combinations I have missed ? */
kprintf("fault status = %08x fault code = %08x\n",
printf("fault status = %08x fault code = %08x\n",
fault_status, fault_code);
we_re_toast:
@ -1029,7 +1029,7 @@ prefetch_abort_handler(frame)
#ifdef DIAGNOSTIC
if ((GetCPSR() & PSR_MODE) != PSR_SVC32_MODE) {
s = spltty();
kprintf("fault being handled in non SVC32 mode\n");
printf("fault being handled in non SVC32 mode\n");
postmortem(frame);
pmap_debug_level = 0;
(void)splx(s);
@ -1056,11 +1056,11 @@ prefetch_abort_handler(frame)
if ((p = curproc) == 0) {
p = &proc0;
kprintf("Prefetch about with curproc == 0\n");
printf("Prefetch about with curproc == 0\n");
}
if (pmap_debug_level >= 0)
kprintf("prefetch fault in process %08x\n", (u_int)p);
printf("prefetch fault in process %08x\n", (u_int)p);
/* can't use curpcb, as it might be NULL; and we have p in a register anyway */
@ -1069,9 +1069,9 @@ prefetch_abort_handler(frame)
panic("prefetch_abort_handler: no pcb ... we're toast !\n");
if (pcb != curpcb) {
kprintf("data_abort: Alert ! pcb(%08x) != curpcb(%08x)\n", (u_int)pcb,
printf("data_abort: Alert ! pcb(%08x) != curpcb(%08x)\n", (u_int)pcb,
(u_int)curpcb);
kprintf("data_abort: Alert ! proc(%08x), curproc(%08x)\n", (u_int)p,
printf("data_abort: Alert ! proc(%08x), curproc(%08x)\n", (u_int)p,
(u_int)curproc);
}
@ -1086,14 +1086,14 @@ prefetch_abort_handler(frame)
/* All the kernel code pages are loaded at boot and do not get paged */
s = spltty();
kprintf("Prefetch address = %08x\n", frame->tf_pc);
printf("Prefetch address = %08x\n", frame->tf_pc);
postmortem(frame);
#ifdef CONTINUE_AFTER_SVC_PREFETCH
kprintf("prefetch abort in SVC mode !\n");
kprintf("The system should now be considered very unstable :-)\n");
printf("prefetch abort in SVC mode !\n");
printf("The system should now be considered very unstable :-)\n");
sigexit(curproc, SIGILL);
/* Not reached */
panic("prefetch_abort_handler: How did we get here ?\n");
@ -1107,13 +1107,13 @@ prefetch_abort_handler(frame)
fault_pc = frame->tf_pc;
if (pmap_debug_level >= 0)
kprintf("Prefetch abort: PC = %08x\n", fault_pc);
printf("Prefetch abort: PC = %08x\n", fault_pc);
/* Ok validate the address, can only execute in USER space */
if (fault_pc < VM_MIN_ADDRESS || fault_pc >= VM_MAXUSER_ADDRESS) {
s = spltty();
kprintf("prefetch: pc (%08x) not in user process space\n", fault_pc);
printf("prefetch: pc (%08x) not in user process space\n", fault_pc);
postmortem(frame);
trapsignal(p, SIGSEGV, FAULT_PERM_P);
(void)splx(s);
@ -1125,7 +1125,7 @@ prefetch_abort_handler(frame)
if (fetchuserword(fault_pc, &fault_instruction) != 0) {
s = spltty();
kprintf("prefetch: faultin failed for address %08x!!\n", fault_pc);
printf("prefetch: faultin failed for address %08x!!\n", fault_pc);
postmortem(frame);
trapsignal(p, SIGSEGV, fault_pc);
(void)splx(s);
@ -1136,9 +1136,9 @@ prefetch_abort_handler(frame)
if (pmap_debug_level >= 0) {
s = spltty();
kprintf("Instruction @V%08x = %08x\n", fault_pc, fault_instruction);
printf("Instruction @V%08x = %08x\n", fault_pc, fault_instruction);
disassemble(fault_pc);
kprintf("return addr=%08x\n", frame->tf_pc);
printf("return addr=%08x\n", frame->tf_pc);
(void)splx(s);
}
@ -1166,7 +1166,7 @@ validate_trapframe(frame, where)
u_int mode;
if ((GetCPSR() & PSR_MODE) != PSR_SVC32_MODE)
kprintf("VTF Warning : validate_trapframe : Not in SVC32 mode\n");
printf("VTF Warning : validate_trapframe : Not in SVC32 mode\n");
mode = frame->tf_spsr & PSR_MODE;
@ -1177,27 +1177,27 @@ validate_trapframe(frame, where)
case 2:
ptr = "prefetch abort handler";
if (mode != PSR_USR32_MODE)
kprintf("VTF Warning : %s : not USR32 mode\n", ptr);
printf("VTF Warning : %s : not USR32 mode\n", ptr);
break;
case 3:
ptr = "ast handler";
if (mode != PSR_USR32_MODE)
kprintf("VTF Warning : %s : not USR32 mode\n", ptr);
printf("VTF Warning : %s : not USR32 mode\n", ptr);
break;
case 4:
ptr = "syscall handler";
if (mode != PSR_USR32_MODE)
kprintf("VTF Warning : %s : not USR32 mode\n", ptr);
printf("VTF Warning : %s : not USR32 mode\n", ptr);
break;
case 5:
ptr = "undefined handler";
if (mode != PSR_USR32_MODE)
kprintf("VTF Warning : %s : not USR32 mode\n", ptr);
printf("VTF Warning : %s : not USR32 mode\n", ptr);
break;
case 6:
ptr = "sigreturn handler";
if (mode != PSR_USR32_MODE)
kprintf("VTF Warning : %s : not USR32 mode\n", ptr);
printf("VTF Warning : %s : not USR32 mode\n", ptr);
break;
default:
ptr = "unknown handler";
@ -1205,18 +1205,18 @@ validate_trapframe(frame, where)
}
if (frame->tf_usr_sp >= VM_MAXUSER_ADDRESS)
kprintf("VTF WARNING: %s : frame->tf_usr_sp >= VM_MAXUSER_ADDRESS [%08x]\n", ptr, frame->tf_usr_sp);
printf("VTF WARNING: %s : frame->tf_usr_sp >= VM_MAXUSER_ADDRESS [%08x]\n", ptr, frame->tf_usr_sp);
if (frame->tf_svc_lr >= 0xf1000000)
kprintf("VTF WARNING: %s : frame->tf_svc_lr >= 0xf1000000 [%08x]\n", ptr, frame->tf_svc_lr);
printf("VTF WARNING: %s : frame->tf_svc_lr >= 0xf1000000 [%08x]\n", ptr, frame->tf_svc_lr);
if (frame->tf_pc >= 0xf1000000)
kprintf("VTF WARNING: %s: frame->tf_pc >= 0xf1000000 [%08x]\n", ptr, frame->tf_pc);
printf("VTF WARNING: %s: frame->tf_pc >= 0xf1000000 [%08x]\n", ptr, frame->tf_pc);
if (frame->tf_pc < VM_MIN_ADDRESS)
kprintf("VTF WARNING: %s: frame->tf_pc >= VM_MIN_ADDRESS [%08x]\n", ptr, frame->tf_pc);
printf("VTF WARNING: %s: frame->tf_pc >= VM_MIN_ADDRESS [%08x]\n", ptr, frame->tf_pc);
if (mode != PSR_USR32_MODE) {
if (frame->tf_svc_lr < 0xf0000000)
kprintf("VTF WARNING: %s : frame->tf_svc_lr < 0xf0000000 [%08x]\n", ptr, frame->tf_svc_lr);
printf("VTF WARNING: %s : frame->tf_svc_lr < 0xf0000000 [%08x]\n", ptr, frame->tf_svc_lr);
if (frame->tf_pc < 0xf0000000)
kprintf("VTF WARNING: %s: frame->tf_pc < 0xf0000000 [%08x]\n", ptr, frame->tf_pc);
printf("VTF WARNING: %s: frame->tf_pc < 0xf0000000 [%08x]\n", ptr, frame->tf_pc);
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: irqhandler.c,v 1.8 1996/10/11 00:06:43 christos Exp $ */
/* $NetBSD: irqhandler.c,v 1.9 1996/10/13 03:05:52 christos Exp $ */
/*
* Copyright (c) 1994-1996 Mark Brinicombe.
@ -205,13 +205,13 @@ irq_claim(irq, handler)
if (/*handler->ih_next == NULL && */handler->ih_name) {
extern char *_intrnames;
char *ptr = _intrnames + (irq * 14);
/* kprintf("intrnames=%08x ptr=%08x irq=%d\n", (u_int)_intrnames, (u_int)ptr, irq);*/
/* printf("intrnames=%08x ptr=%08x irq=%d\n", (u_int)_intrnames, (u_int)ptr, irq);*/
strcpy(ptr, " ");
strncpy(ptr, handler->ih_name, min(strlen(handler->ih_name), 13));
} else {
extern char *_intrnames;
char *ptr = _intrnames + (irq * 14);
ksprintf(ptr, "irq %2d ", irq);
sprintf(ptr, "irq %2d ", irq);
}
#endif
@ -249,7 +249,7 @@ irq_claim(irq, handler)
/*
for (level = 0; level < IRQ_LEVELS; ++level)
kprintf("irqmask[%d] = %08x\n", level, irqmasks[level]);
printf("irqmask[%d] = %08x\n", level, irqmasks[level]);
*/
#if NPODULEBUS > 0
@ -336,7 +336,7 @@ irq_release(irq, handler)
} else {
extern char *_intrnames;
char *ptr = _intrnames + (irq * 14);
ksprintf(ptr, "irq %2d ", irq);
sprintf(ptr, "irq %2d ", irq);
}
#endif
@ -398,7 +398,7 @@ disable_interrupts(mask)
cpsr = SetCPSR(mask, mask);
#ifdef DIAGNOSTIC
if ((GetCPSR() & I32_bit) == 0)
kprintf("Alert ! disable_interrupts has failed\n");
printf("Alert ! disable_interrupts has failed\n");
#endif
return(cpsr);
}
@ -492,8 +492,8 @@ dosoftints()
softints = soft_interrupts & spl_mask;
/* if (soft_interrupts) {
kprintf("current_spl_level=%d ", current_spl_level);
kprintf("soft_interrupts=%08x spl_mask=%08x\n", soft_interrupts, spl_mask);
printf("current_spl_level=%d ", current_spl_level);
printf("soft_interrupts=%08x spl_mask=%08x\n", soft_interrupts, spl_mask);
}*/
/*
@ -592,14 +592,14 @@ validate_irq_address(irqf, mask)
if (irqf->if_pc > (int)SetCPSR && irqf->if_pc < (int)GetCPSR)
return;
if ((irqf->if_spsr & PSR_MODE) != PSR_USR32_MODE) {
kprintf("Alert! IRQ while in non USR mode (%08x) pc=%08x\n",
printf("Alert! IRQ while in non USR mode (%08x) pc=%08x\n",
irqf->if_spsr, irqf->if_pc);
}
if ((GetCPSR() & I32_bit) == 0) {
kprintf("Alert! IRQ's enabled during IRQ handler\n");
printf("Alert! IRQ's enabled during IRQ handler\n");
}
if (irqf->if_pc >= (int)vgone && irqf->if_pc < (int)vfinddev)
kprintf("Alert! IRQ between vgone & vfinddev : pc=%08x\n",
printf("Alert! IRQ between vgone & vfinddev : pc=%08x\n",
irqf->if_pc);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: kgdb_glue.c,v 1.3 1996/10/11 00:06:45 christos Exp $ */
/* $NetBSD: kgdb_glue.c,v 1.4 1996/10/13 03:05:53 christos Exp $ */
/*
* Copyright (C) 1994 Wolfgang Solfrank.
@ -49,19 +49,19 @@ dump(p, l)
int i, j, n;
while (l > 0) {
kprintf("%08x: ", p);
printf("%08x: ", p);
n = l > 16 ? 16 : l;
for (i = 4; --i >= 0;) {
for (j = 4; --j >= 0;)
kprintf(--n >= 0 ? "%02x " : " ", *p++);
kprintf(" ");
printf(--n >= 0 ? "%02x " : " ", *p++);
printf(" ");
}
p -= 16;
n = l > 16 ? 16 : l;
n = (n + 3) & ~3;
for (i = 4; --i >= 0;)
kprintf((n -= 4) >= 0 ? "%08x " : "", *((long *)p)++);
kprintf("\n");
printf((n -= 4) >= 0 ? "%08x " : "", *((long *)p)++);
printf("\n");
l -= 16;
}
}
@ -113,7 +113,7 @@ kgdb_connect(when)
{
boothowto |= RB_KDB;
if (when == 0)
kprintf("waiting for remote GDB\n");
printf("waiting for remote GDB\n");
__asm(".word 0xe6000010");
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.10 1996/10/11 00:06:48 christos Exp $ */
/* $NetBSD: machdep.c,v 1.11 1996/10/13 03:05:54 christos Exp $ */
/*
* Copyright (c) 1994-1996 Mark Brinicombe.
@ -288,13 +288,13 @@ boot(howto, bootstr)
/* Debugging here */
if (curproc == NULL)
kprintf("curproc = 0 - must have been in cpu_idle()\n");
printf("curproc = 0 - must have been in cpu_idle()\n");
/* if (panicstr)
kprintf("ioctlconsolebug=%d %08x\n", ioctlconsolebug, ioctlconsolebug);*/
printf("ioctlconsolebug=%d %08x\n", ioctlconsolebug, ioctlconsolebug);*/
/* if (curpcb)
kprintf("curpcb=%08x pcb_sp=%08x pcb_und_sp=%08x\n", curpcb, curpcb->pcb_sp, curpcb->pcb_und_sp);*/
printf("curpcb=%08x pcb_sp=%08x pcb_und_sp=%08x\n", curpcb, curpcb->pcb_sp, curpcb->pcb_und_sp);*/
#if NHYDRABUS > 0
/*
@ -308,10 +308,10 @@ boot(howto, bootstr)
/* Debug info */
kprintf("boot: howto=%08x %08x curproc=%08x\n", howto, spl_mask, (u_int)curproc);
printf("boot: howto=%08x %08x curproc=%08x\n", howto, spl_mask, (u_int)curproc);
kprintf("current_mask=%08x spl_mask=%08x\n", current_mask, spl_mask);
kprintf("ipl_bio=%08x ipl_net=%08x ipl_tty=%08x ipl_clock=%08x ipl_imp=%08x\n",
printf("current_mask=%08x spl_mask=%08x\n", current_mask, spl_mask);
printf("ipl_bio=%08x ipl_net=%08x ipl_tty=%08x ipl_clock=%08x ipl_imp=%08x\n",
irqmasks[IPL_BIO], irqmasks[IPL_NET], irqmasks[IPL_TTY],
irqmasks[IPL_CLOCK], irqmasks[IPL_IMP]);
@ -322,7 +322,7 @@ boot(howto, bootstr)
/* Did we encounter the ARM700 bug we discovered ? */
if (arm700bugcount > 0)
kprintf("ARM700 PREFETCH/SWI bug count = %d\n", arm700bugcount);
printf("ARM700 PREFETCH/SWI bug count = %d\n", arm700bugcount);
/* Disable console buffering */
@ -331,8 +331,8 @@ boot(howto, bootstr)
/* If we are still cold then hit the air brakes */
if (cold) {
kprintf("Halted while still in the ICE age.\n");
kprintf("Hit a key to reboot\n");
printf("Halted while still in the ICE age.\n");
printf("Hit a key to reboot\n");
cngetc();
boot0();
}
@ -374,8 +374,8 @@ boot(howto, bootstr)
shell();
#else
if (action & ACTION_KSHELL) {
kprintf("Halted.\n");
kprintf("Hit a key to reboot ");
printf("Halted.\n");
printf("Hit a key to reboot ");
cngetc();
}
#endif
@ -430,7 +430,7 @@ boot(howto, bootstr)
/* Run any shutdown hooks */
kprintf("Running shutdown hooks ...\n");
printf("Running shutdown hooks ...\n");
doshutdownhooks();
/* Make sure IRQ's are disabled */
@ -439,12 +439,12 @@ boot(howto, bootstr)
/* Tell the user we are booting */
kprintf("boot...");
printf("boot...");
/* Give the user time to read the last couple of lines of text. */
for (loop = 5; loop > 0; --loop) {
kprintf("%d..", loop);
printf("%d..", loop);
delay(500000);
}
@ -476,7 +476,7 @@ bootsync(void)
*/
IRQenable;
kprintf("Warning IRQ's disabled during boot()\n");
printf("Warning IRQ's disabled during boot()\n");
}
vfs_shutdown();
@ -563,35 +563,35 @@ initarm(bootconf)
/*
* Initialise the physical console
* This is done in main() but for the moment we do it here so that
* we can use kprintf in initarm() before main() has been called.
* we can use printf in initarm() before main() has been called.
*/
consinit();
/* Talk to the user */
kprintf("initarm...\n");
printf("initarm...\n");
kprintf("Kernel loaded from file %s\n", bootconfig.kernelname);
kprintf("Kernel arg string %s\n", (char *)bootconfig.argvirtualbase);
printf("Kernel loaded from file %s\n", bootconfig.kernelname);
printf("Kernel arg string %s\n", (char *)bootconfig.argvirtualbase);
kprintf("\nBoot configuration structure reports the following memory\n");
printf("\nBoot configuration structure reports the following memory\n");
kprintf(" DRAM block 0a at %08x size %08x DRAM block 0b at %08x size %08x\n\r",
printf(" DRAM block 0a at %08x size %08x DRAM block 0b at %08x size %08x\n\r",
bootconfig.dram[0].address,
bootconfig.dram[0].pages * bootconfig.pagesize,
bootconfig.dram[1].address,
bootconfig.dram[1].pages * bootconfig.pagesize);
kprintf(" DRAM block 1a at %08x size %08x DRAM block 1b at %08x size %08x\n\r",
printf(" DRAM block 1a at %08x size %08x DRAM block 1b at %08x size %08x\n\r",
bootconfig.dram[2].address,
bootconfig.dram[2].pages * bootconfig.pagesize,
bootconfig.dram[3].address,
bootconfig.dram[3].pages * bootconfig.pagesize);
kprintf(" VRAM block 0 at %08x size %08x\n\r",
printf(" VRAM block 0 at %08x size %08x\n\r",
bootconfig.vram[0].address,
bootconfig.vram[0].pages * bootconfig.pagesize);
kprintf(" videomem = %08x %08x\n", bootconfig.display_start, videomemory.vidm_vbase);
printf(" videomem = %08x %08x\n", bootconfig.display_start, videomemory.vidm_vbase);
/* Check to make sure the page size is correct */
@ -638,7 +638,7 @@ initarm(bootconf)
* memory to low physical memory etc.
*/
kprintf("initarm: Primary bootstrap ... ");
printf("initarm: Primary bootstrap ... ");
/*
* Update the videomemory structure to reflect the mapping changes
@ -702,14 +702,14 @@ initarm(bootconf)
/* Print some debugging info */
/*
kprintf("page tables look like this ...\n");
kprintf("V0x00000000 - %08x\n", ReadWord(l1pagetable + 0x0000));
kprintf("V0x03500000 - %08x\n", ReadWord(l1pagetable + 0x00d4));
kprintf("V0x00200000 - %08x\n", ReadWord(l1pagetable + 0x0080));
kprintf("V0xf4000000 - %08x\n", ReadWord(l1pagetable + 0x3d00));
kprintf("V0xf0000000 - %08x\n", ReadWord(l1pagetable + 0x3c00));
kprintf("page dir = P%08x\n", bootconfig.scratchphysicalbase + 0x4000);
kprintf("l1= V%08x\n", l1pagetable);
printf("page tables look like this ...\n");
printf("V0x00000000 - %08x\n", ReadWord(l1pagetable + 0x0000));
printf("V0x03500000 - %08x\n", ReadWord(l1pagetable + 0x00d4));
printf("V0x00200000 - %08x\n", ReadWord(l1pagetable + 0x0080));
printf("V0xf4000000 - %08x\n", ReadWord(l1pagetable + 0x3d00));
printf("V0xf0000000 - %08x\n", ReadWord(l1pagetable + 0x3c00));
printf("page dir = P%08x\n", bootconfig.scratchphysicalbase + 0x4000);
printf("l1= V%08x\n", l1pagetable);
*/
/*
@ -728,7 +728,7 @@ initarm(bootconf)
bootconfig.display_start = VMEM_VBASE;
physcon_display_base(VMEM_VBASE);
kprintf("done.\n");
printf("done.\n");
/*
* Ok we have finished the primary boot strap. All this has done is to
@ -746,7 +746,7 @@ initarm(bootconf)
process_kernel_args();
kprintf("initarm: Secondary bootstrap ... ");
printf("initarm: Secondary bootstrap ... ");
/* Zero down the memory we mapped in for the secondary bootstrap */
@ -821,7 +821,7 @@ initarm(bootconf)
#endif
physical = physical_start + kerneldatasize;
/* kprintf("physical=%08x next_phys=%08x\n", physical, pmap_next_phys_page(physical - NBPG));*/
/* printf("physical=%08x next_phys=%08x\n", physical, pmap_next_phys_page(physical - NBPG));*/
loop1 = 1;
kernel_pt_table[0] = 0;
for (loop = 0; loop < 15; ++loop) {
@ -841,7 +841,7 @@ initarm(bootconf)
/*
for (loop=0; loop < 10; ++loop)
kprintf("%d - P%08x\n", loop, kernel_pt_table[loop]);
printf("%d - P%08x\n", loop, kernel_pt_table[loop]);
*/
/* This should never be able to happen but better confirm that. */
@ -852,14 +852,14 @@ initarm(bootconf)
/* Update the address of the first free page of physical memory */
physical_freestart = physical;
/* kprintf("physical_fs=%08x next_phys=%08x\n", (u_int)physical_freestart, (u_int)pmap_next_phys_page(physical_freestart - NBPG));*/
/* printf("physical_fs=%08x next_phys=%08x\n", (u_int)physical_freestart, (u_int)pmap_next_phys_page(physical_freestart - NBPG));*/
free_pages -= (physical - physical_start) / NBPG;
/* Allocate a page for the system page mapped to 0x00000000 */
systempage.physical = physical_freestart;
physical_freestart += NBPG;
/* kprintf("(0)physical_fs=%08x next_phys=%08x\n", (u_int)physical_freestart, (u_int)pmap_next_phys_page(physical_freestart - NBPG));*/
/* printf("(0)physical_fs=%08x next_phys=%08x\n", (u_int)physical_freestart, (u_int)pmap_next_phys_page(physical_freestart - NBPG));*/
--free_pages;
bzero((char *)systempage.physical - physical_start, NBPG);
@ -876,14 +876,14 @@ initarm(bootconf)
irqstack.virtual = KERNEL_BASE + irqstack.physical-physical_start;
abtstack.virtual = KERNEL_BASE + abtstack.physical-physical_start;
undstack.virtual = KERNEL_BASE + undstack.physical-physical_start;
/* kprintf("(1)physical_fs=%08x next_phys=%08x\n", (u_int)physical_freestart, (u_int)pmap_next_phys_page(physical_freestart - NBPG));*/
/* printf("(1)physical_fs=%08x next_phys=%08x\n", (u_int)physical_freestart, (u_int)pmap_next_phys_page(physical_freestart - NBPG));*/
kernelstack.physical = physical_freestart;
physical_freestart += UPAGES * NBPG;
bzero((char *)kernelstack.physical - physical_start, UPAGES * NBPG);
free_pages -= UPAGES;
/* kprintf("(2)physical_fs=%08x next_phys=%08x\n", (u_int)physical_freestart, (u_int)pmap_next_phys_page(physical_freestart - NBPG));*/
/* printf("(2)physical_fs=%08x next_phys=%08x\n", (u_int)physical_freestart, (u_int)pmap_next_phys_page(physical_freestart - NBPG));*/
kernelstack.virtual = KERNEL_BASE + kernelstack.physical
@ -893,7 +893,7 @@ initarm(bootconf)
physical_freestart += round_page(sizeof(struct msgbuf));
free_pages -= round_page(sizeof(struct msgbuf)) / NBPG;
/* kprintf("physical_fs=%08x next_phys=%08x\n", (u_int)physical_freestart, (u_int)pmap_next_phys_page(physical_freestart - NBPG));*/
/* printf("physical_fs=%08x next_phys=%08x\n", (u_int)physical_freestart, (u_int)pmap_next_phys_page(physical_freestart - NBPG));*/
/* Ok we have allocated physical pages for the primary kernel page tables */
@ -902,10 +902,10 @@ initarm(bootconf)
l2pagetable = kernel_pt_table[KERNEL_PT_KERNEL] - physical_start;
if (N_GETMAGIC(kernexec[0]) == ZMAGIC) {
/* kprintf("[ktext read-only] ");
kprintf("[%08x %08x %08x] \n", (u_int)kerneldatasize, (u_int)kernexec->a_text,
/* printf("[ktext read-only] ");
printf("[%08x %08x %08x] \n", (u_int)kerneldatasize, (u_int)kernexec->a_text,
(u_int)(kernexec->a_text+kernexec->a_data+kernexec->a_bss));*/
/* kprintf("physical start=%08x physical freestart=%08x hydra phys=%08x\n", physical_start, physical_freestart, hydrascratch.physical);*/
/* printf("physical start=%08x physical freestart=%08x hydra phys=%08x\n", physical_start, physical_freestart, hydrascratch.physical);*/
for (logical = 0; logical < 0x00/*kernexec->a_text*/;
logical += NBPG)
map_entry_ro(l2pagetable, logical, physical_start
@ -1071,20 +1071,20 @@ initarm(bootconf)
/* Bit more debugging info */
/*
kprintf("page tables look like this ...\n");
kprintf("V0x00000000 - %08x\n", ReadWord(l1pagetable + 0x0000));
kprintf("V0x03200000 - %08x\n", ReadWord(l1pagetable + 0x00c8));
kprintf("V0x03500000 - %08x\n", ReadWord(l1pagetable + 0x00d4));
kprintf("V0xf0000000 - %08x\n", ReadWord(l1pagetable + 0x3c00));
kprintf("V0xf1000000 - %08x\n", ReadWord(l1pagetable + 0x3c40));
kprintf("V0xf2000000 - %08x\n", ReadWord(l1pagetable + 0x3c80));
kprintf("V0xf3000000 - %08x\n", ReadWord(l1pagetable + 0x3cc0));
kprintf("V0xf3300000 - %08x\n", ReadWord(l1pagetable + 0x3ccc));
kprintf("V0xf4000000 - %08x\n", ReadWord(l1pagetable + 0x3d00));
kprintf("V0xf6000000 - %08x\n", ReadWord(l1pagetable + 0x3d80));
printf("page tables look like this ...\n");
printf("V0x00000000 - %08x\n", ReadWord(l1pagetable + 0x0000));
printf("V0x03200000 - %08x\n", ReadWord(l1pagetable + 0x00c8));
printf("V0x03500000 - %08x\n", ReadWord(l1pagetable + 0x00d4));
printf("V0xf0000000 - %08x\n", ReadWord(l1pagetable + 0x3c00));
printf("V0xf1000000 - %08x\n", ReadWord(l1pagetable + 0x3c40));
printf("V0xf2000000 - %08x\n", ReadWord(l1pagetable + 0x3c80));
printf("V0xf3000000 - %08x\n", ReadWord(l1pagetable + 0x3cc0));
printf("V0xf3300000 - %08x\n", ReadWord(l1pagetable + 0x3ccc));
printf("V0xf4000000 - %08x\n", ReadWord(l1pagetable + 0x3d00));
printf("V0xf6000000 - %08x\n", ReadWord(l1pagetable + 0x3d80));
*/
/* kprintf("V0xefc00000 - %08x\n", ReadWord(l1pagetable + 0x3bf8));
kprintf("V0xef800000 - %08x\n", ReadWord(l1pagetable + 0x3bfc));*/
/* printf("V0xefc00000 - %08x\n", ReadWord(l1pagetable + 0x3bf8));
printf("V0xef800000 - %08x\n", ReadWord(l1pagetable + 0x3bfc));*/
/*
* Now we have the real page tables in place so we can switch to them.
@ -1097,7 +1097,7 @@ initarm(bootconf)
* which is why it is left to the last moment.
*/
kprintf("mapping ... ");
printf("mapping ... ");
bcopy((char *)KERNEL_BASE, (char *)0x00000000, kerneldatasize);
@ -1105,7 +1105,7 @@ initarm(bootconf)
setttb(kernel_pt_table[KERNEL_PT_PAGEDIR]);
kprintf("done.\n");
printf("done.\n");
/* Right set up the vectors at the bottom of page 0 */
@ -1121,22 +1121,22 @@ initarm(bootconf)
*/
#ifdef DIAGNOSTIC
kprintf("IRQ stack V%08x P%08x\n", (u_int) irqstack.virtual,
printf("IRQ stack V%08x P%08x\n", (u_int) irqstack.virtual,
(u_int) irqstack.physical);
kprintf("ABT stack V%08x P%08x\n", (u_int) abtstack.virtual,
printf("ABT stack V%08x P%08x\n", (u_int) abtstack.virtual,
(u_int) abtstack.physical);
kprintf("UND stack V%08x P%08x\n", (u_int) undstack.virtual,
printf("UND stack V%08x P%08x\n", (u_int) undstack.virtual,
(u_int) undstack.physical);
#endif
kprintf("init subsystems: stacks ");
printf("init subsystems: stacks ");
set_stackptr(PSR_IRQ32_MODE, irqstack.virtual + NBPG);
set_stackptr(PSR_ABT32_MODE, abtstack.virtual + NBPG);
set_stackptr(PSR_UND32_MODE, undstack.virtual + NBPG);
if (pmap_debug_level >= 0)
kprintf("kstack V%08x P%08x\n", (int) kernelstack.virtual,
printf("kstack V%08x P%08x\n", (int) kernelstack.virtual,
(int) kernelstack.physical);
/*
@ -1148,7 +1148,7 @@ initarm(bootconf)
* This just fills in a slighly better one.
*/
kprintf("vectors ");
printf("vectors ");
data_abort_handler_address = (u_int)data_abort_handler;
prefetch_abort_handler_address = (u_int)prefetch_abort_handler;
undefined_handler_address = (u_int)undefinedinstruction_bounce;
@ -1163,7 +1163,7 @@ initarm(bootconf)
/*
for (loop = 0x0; loop < 0x1000; ++loop) {
if (ReadWord(PAGE_DIRS_BASE + loop * 4) != 0)
kprintf("Pagetable for V%08x = %08x\n", loop << 20,
printf("Pagetable for V%08x = %08x\n", loop << 20,
ReadWord(0xf2000000 + loop * 4));
}
@ -1174,7 +1174,7 @@ initarm(bootconf)
/*
for (loop = 0x0; loop < 0x400; ++loop) {
if (ReadWord(kernel_pt_table[KERNEL_PT_PTE] + loop * 4) != 0)
kprintf("Pagetable for V%08x P%08x = %08x\n",
printf("Pagetable for V%08x P%08x = %08x\n",
loop << 22, kernel_pt_table[KERNEL_PT_PTE]+loop*4,
ReadWord(kernel_pt_table[KERNEL_PT_PTE]+loop * 4));
}
@ -1194,22 +1194,22 @@ initarm(bootconf)
/* Initialise the undefined instruction handlers */
kprintf("undefined ");
printf("undefined ");
undefined_init();
/* Boot strap pmap telling it where the kernel page table is */
kprintf("pmap ");
printf("pmap ");
pmap_bootstrap(PAGE_DIRS_BASE);
/* Setup the IRQ system */
kprintf("irq ");
printf("irq ");
irq_init();
kprintf("done.\n");
printf("done.\n");
#ifdef DDB
kprintf("ddb: ");
printf("ddb: ");
db_machine_init();
ddb_init();
@ -1294,14 +1294,14 @@ cpu_startup()
* not be buffered).
*/
kprintf(version);
printf(version);
kprintf("screen: %d x %d x %d\n", bootconfig.width + 1, bootconfig.height + 1, bootconfig.framerate);
printf("screen: %d x %d x %d\n", bootconfig.width + 1, bootconfig.height + 1, bootconfig.framerate);
if (cmos_read(RTC_ADDR_REBOOTCNT) > 0)
kprintf("Warning: REBOOTCNT = %d\n", cmos_read(RTC_ADDR_REBOOTCNT));
printf("Warning: REBOOTCNT = %d\n", cmos_read(RTC_ADDR_REBOOTCNT));
kprintf("real mem = %d (%d pages)\n", arm_page_to_byte(physmem), physmem);
printf("real mem = %d (%d pages)\n", arm_page_to_byte(physmem), physmem);
/*
* Find out how much space we need, allocate it,
@ -1380,7 +1380,7 @@ cpu_startup()
VM_MBUF_SIZE, FALSE);
/*
kprintf("mb_buf: map=%08x maxaddr = %08x mbutl = %08x\n", mb_map, maxaddr, mbutl);
printf("mb_buf: map=%08x maxaddr = %08x mbutl = %08x\n", mb_map, maxaddr, mbutl);
*/
/*
@ -1392,9 +1392,9 @@ cpu_startup()
for (loop = 1; loop < ncallout; ++loop)
callout[loop - 1].c_next = &callout[loop];
kprintf("avail mem = %d (%d pages)\n", (int)ptoa(cnt.v_free_count),
printf("avail mem = %d (%d pages)\n", (int)ptoa(cnt.v_free_count),
(int)ptoa(cnt.v_free_count) / NBPG);
kprintf("using %d buffers containing %d bytes of memory\n",
printf("using %d buffers containing %d bytes of memory\n",
nbuf, bufpages * CLBYTES);
/*
@ -1440,9 +1440,9 @@ cpu_startup()
kmodule_size = round_page(kmodule_size);
kmodule_base = (u_int)kmem_alloc(kernel_map, kmodule_size);
if (kmodule_base)
kprintf("KMODULE SPACE = %08x\n", kmodule_base);
printf("KMODULE SPACE = %08x\n", kmodule_base);
else
kprintf("\x1b[31mNO KMODULE SPACE\n\x1b[0m");
printf("\x1b[31mNO KMODULE SPACE\n\x1b[0m");
}
/*
@ -1657,7 +1657,7 @@ process_kernel_args()
max_processes = 16;
if (max_processes > 256)
max_processes = 256;
kprintf("Maximum \"in memory\" processes = %d\n",
printf("Maximum \"in memory\" processes = %d\n",
max_processes);
}
ptr = strstr(args, "ramdisc=");
@ -1686,7 +1686,7 @@ process_kernel_args()
videodram_size = round_page(videodram_size);
if (videodram_size > 1024*1024)
videodram_size = 1024*1024;
kprintf("VIDEO DRAM = %d\n", videodram_size);
printf("VIDEO DRAM = %d\n", videodram_size);
}
if (strstr(args, "single"))
boothowto |= RB_SINGLE;
@ -1722,7 +1722,7 @@ setup_cursor()
*/
cursor_data = (u_int *)kmem_alloc(kernel_map, NBPG);
/* kprintf("Cursor data page = V%08x P%08x\n", cursor_data, pmap_extract(kernel_pmap, (vm_offset_t)cursor_data));*/
/* printf("Cursor data page = V%08x P%08x\n", cursor_data, pmap_extract(kernel_pmap, (vm_offset_t)cursor_data));*/
WriteWord(IOMD_CURSINIT, pmap_extract(kernel_pmap,
(vm_offset_t)cursor_data));
return(0);
@ -1743,13 +1743,13 @@ setregs(p, pack, stack, retval)
register struct trapframe *tf;
if (pmap_debug_level >= -1)
kprintf("setregs: ip=%08x sp=%08x proc=%08x\n",
printf("setregs: ip=%08x sp=%08x proc=%08x\n",
(u_int) pack->ep_entry, (u_int) stack, (u_int) p);
tf = p->p_md.md_regs;
if (pmap_debug_level >= -1)
kprintf("mdregs=%08x pc=%08x lr=%08x sp=%08x\n",
printf("mdregs=%08x pc=%08x lr=%08x sp=%08x\n",
(u_int) tf, tf->tf_pc, tf->tf_usr_lr, tf->tf_usr_sp);
tf->tf_r11 = 0; /* bottom of the fp chain */
@ -1820,7 +1820,7 @@ sendsig(catcher, sig, mask, code)
extern char sigcode[], esigcode[];
if (pmap_debug_level >= 0)
kprintf("Sendsig: sig=%d mask=%08x catcher=%08x code=%08x\n",
printf("Sendsig: sig=%d mask=%08x catcher=%08x code=%08x\n",
sig, mask, (u_int)catcher, (u_int)code);
tf = p->p_md.md_regs;
@ -1896,7 +1896,7 @@ sendsig(catcher, sig, mask, code)
tf->tf_pc = (int)(((char *)PS_STRINGS) - (esigcode - sigcode));
if (pmap_debug_level >= 0)
kprintf("Sendsig: sig=%d pc=%08x\n", sig, tf->tf_pc);
printf("Sendsig: sig=%d pc=%08x\n", sig, tf->tf_pc);
}
@ -1926,7 +1926,7 @@ sys_sigreturn(p, v, retval)
register struct trapframe *tf;
if (pmap_debug_level >= 0)
kprintf("sigreturn: context=%08x\n", (int)SCARG(uap, sigcntxp));
printf("sigreturn: context=%08x\n", (int)SCARG(uap, sigcntxp));
tf = p->p_md.md_regs;
@ -2000,7 +2000,7 @@ cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
size_t newlen;
struct proc *p;
{
kprintf("cpu_sysctl: Currently stoned - Cannot support the operation\n");
printf("cpu_sysctl: Currently stoned - Cannot support the operation\n");
return(EOPNOTSUPP);
}
@ -2161,11 +2161,11 @@ extern u_int vtbugcaddr;
void
vtbugreport()
{
kprintf("vtvalbug = %d\n", vtvalbug);
printf("vtvalbug = %d\n", vtvalbug);
if (vtlastbug)
kprintf("vtlastbug = %s\n", vtlastbug);
kprintf("vtbugaddr = %08x\n", vtbugaddr);
kprintf("vtbugcaddr = %08x\n", vtbugcaddr);
printf("vtlastbug = %s\n", vtlastbug);
printf("vtbugaddr = %08x\n", vtbugaddr);
printf("vtbugcaddr = %08x\n", vtbugcaddr);
}
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: makemodes.c,v 1.5 1996/10/11 00:06:50 christos Exp $ */
/* $NetBSD: makemodes.c,v 1.6 1996/10/13 03:05:55 christos Exp $ */
/*
* Copyright (c) 1995 Mark Brinicombe.
@ -205,7 +205,7 @@ main(argc, argv)
/* This was for debugging */
for (loop = 0; loop < md; ++loop) {
kprintf("%d x %d: %d %d [%d,%d,%d,%d,%d,%d] [%d,%d,%d,%d,%d,%d]\n",
printf("%d x %d: %d %d [%d,%d,%d,%d,%d,%d] [%d,%d,%d,%d,%d,%d]\n",
mds[loop].md_xres,
mds[loop].md_yres,
mds[loop].md_pixelrate,
@ -246,7 +246,7 @@ main(argc, argv)
/* NOTE: A mode specifier cannot have a space in it at the moment */
while (argv[loop]) {
kprintf("%s ==> ", argv[loop]);
printf("%s ==> ", argv[loop]);
f = -1;
c = 256;
params = sscanf(argv[loop], "X%dY%dC%dF%d", &x, &y, &c, &f);
@ -257,8 +257,8 @@ main(argc, argv)
else if (params == 3)
makemode(out_fd, x, y, 256, c);
else
kprintf("Invalid mode specifier\n");
kprintf("\n");
printf("Invalid mode specifier\n");
printf("\n");
++loop;
}
@ -287,7 +287,7 @@ void makemode(out_fd, x, y, c, f)
/* Print some info */
kprintf("%d x %d x %d x %d : ", x, y, c, f);
printf("%d x %d x %d x %d : ", x, y, c, f);
/* Scan the modes */
@ -318,7 +318,7 @@ void makemode(out_fd, x, y, c, f)
/* Print it as info */
kprintf("%d ", fr);
printf("%d ", fr);
/* Is this a new maximum ? */

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.7 1996/10/11 00:06:51 christos Exp $ */
/* $NetBSD: pmap.c,v 1.8 1996/10/13 03:05:56 christos Exp $ */
/*
* Copyright (c) 1994-1996 Mark Brinicombe.
@ -173,7 +173,7 @@ pmap_debug(level)
int level;
{
pmap_debug_level = level;
kprintf("pmap_debug: level=%d\n", pmap_debug_level);
printf("pmap_debug: level=%d\n", pmap_debug_level);
}
@ -321,7 +321,7 @@ pmap_enter_pv(pmap, va, pind, flags)
pv = &pv_table[pind];
if (pmap_debug_level >= 5)
kprintf("pmap_enter_pv: pind=%08x pv %08x: %08x/%08x/%08x\n",
printf("pmap_enter_pv: pind=%08x pv %08x: %08x/%08x/%08x\n",
pind, (int) pv, (int) pv->pv_va, (int) pv->pv_pmap, (int) pv->pv_next);
if (pv->pv_pmap == NULL) {
@ -351,7 +351,7 @@ pmap_enter_pv(pmap, va, pind, flags)
npv->pv_va = va;
npv->pv_pmap = pmap;
npv->pv_flags = flags;
kprintf("pmap_enter_pv: already in pv_tab pind=%08x pv %08x: %08x/%08x/%08x",
printf("pmap_enter_pv: already in pv_tab pind=%08x pv %08x: %08x/%08x/%08x",
pind, (int) pv, (int) pv->pv_va, (int) pv->pv_pmap, (int) pv->pv_next);
splx(s);
return(0);
@ -394,7 +394,7 @@ pmap_remove_pv(pmap, va, pind)
pv = &pv_table[pind];
/* if (va == 0xefbfe000 || va == 0xefbff000 || va == 0xf1003000 || va == 0xf1004000)
kprintf("pmap_remove_pv(%08x, %08x, %d)\n",
printf("pmap_remove_pv(%08x, %08x, %d)\n",
(u_int)pmap, (u_int)va, pind);*/
/*
@ -448,7 +448,7 @@ pmap_modify_pv(pmap, va, pind, bic_mask, eor_mask)
u_int flags;
if (pmap_debug_level >= 5)
kprintf("pmap_modify_pv: pmap=%08x va=%08x pi=%08x bic_mask=%08x eor_mask=%08x\n",
printf("pmap_modify_pv: pmap=%08x va=%08x pi=%08x bic_mask=%08x eor_mask=%08x\n",
(int) pmap, (int) va, pind, bic_mask, eor_mask);
if (!pv_table)
@ -465,7 +465,7 @@ pmap_modify_pv(pmap, va, pind, bic_mask, eor_mask)
pv = &pv_table[pind];
if (pmap_debug_level >= 5)
kprintf("pmap_modify_pv: pind=%08x pv %08x: %08x/%08x/%08x/%08x ",
printf("pmap_modify_pv: pind=%08x pv %08x: %08x/%08x/%08x/%08x ",
pind, (int) pv, (int)pv->pv_va, (int)pv->pv_pmap, (int)pv->pv_next,
pv->pv_flags);
@ -478,14 +478,14 @@ pmap_modify_pv(pmap, va, pind, bic_mask, eor_mask)
flags = npv->pv_flags;
npv->pv_flags = ((flags & ~bic_mask) ^ eor_mask);
if (pmap_debug_level >= 0)
kprintf("done flags=%08x\n", flags);
printf("done flags=%08x\n", flags);
splx(s);
return(flags);
}
}
if (pmap_debug_level >= 0)
kprintf("done.\n");
printf("done.\n");
splx(s);
return(0);
}
@ -553,7 +553,7 @@ pmap_bootstrap(kernel_l1pt)
virtual_start += round_page(sizeof(struct msgbuf));
#if PMAPDEBUG > 0
kprintf("pmap_bootstrap: page_hook = V%08x pte = V%08x\n",
printf("pmap_bootstrap: page_hook = V%08x pte = V%08x\n",
page_hook_addr0, page_hook_pte0);
#endif
@ -583,10 +583,10 @@ pmap_init()
vm_size_t s;
vm_offset_t addr;
/* kprintf("pmap_init:\n");*/
/* printf("pmap_init:\n");*/
npages = pmap_page_index(physical_freeend - 1) + 1;
kprintf("Number of pages to handle = %ld\n", npages);
printf("Number of pages to handle = %ld\n", npages);
/*
* Set the available memory vars - These do not map to real memory
@ -599,14 +599,14 @@ pmap_init()
avail_end = physmem * NBPG;
s = (vm_size_t) (sizeof(struct pv_entry) * npages + npages);
/* kprintf("pv_table size = %08x\n", s);*/
/* printf("pv_table size = %08x\n", s);*/
s = round_page(s);
addr = (vm_offset_t) kmem_alloc(kernel_map, s);
/* kprintf("addr = %08x", addr);*/
/* printf("addr = %08x", addr);*/
pv_table = (pv_entry_t) addr;
addr += sizeof(struct pv_entry) * npages;
pmap_attributes = (char *) addr;
/* kprintf(" attributes = %08x\n", pmap_attributes);*/
/* printf(" attributes = %08x\n", pmap_attributes);*/
/* Ok currently there are some difficulties in allocating the process
* page directories on the fly. This is because the page directories
@ -622,11 +622,11 @@ pmap_init()
pagedirectories = (struct pmap **)kmem_alloc(kernel_map, s);
#if PMAPDEBUG > 0
kprintf("pagedirectories pointers at %08x\n", pagedirectories);
printf("pagedirectories pointers at %08x\n", pagedirectories);
#endif
bzero(pagedirectories, s);
kprintf("%dKB reserved for L1 page tables\n",
printf("%dKB reserved for L1 page tables\n",
max_processes * NBPG * 4 / 1024);
}
@ -682,7 +682,7 @@ pmap_allocpagedir(pmap)
pt_entry_t *pte;
if (pmap_debug_level >= 0)
kprintf("pmap_allocpagedir: pmap=%08x\n", (int)pmap);
printf("pmap_allocpagedir: pmap=%08x\n", (int)pmap);
/*
* No need to allocate page table space yet but we do need a
@ -705,7 +705,7 @@ pmap_allocpagedir(pmap)
+ PD_SIZE) + loop * PD_SIZE);
pd = (vm_offset_t)(pagetables_start + loop * PD_SIZE);
#if PMAP_DEBUG > 0
kprintf("pmap_pinit: page dir at V%08x P%08x\n",
printf("pmap_pinit: page dir at V%08x P%08x\n",
pmap->pm_pdir, pde);
#endif
@ -719,7 +719,7 @@ pmap_allocpagedir(pmap)
if (*(pte + 0) != 0 || *(pte + 1) != 0
|| *(pte + 2) != 0 || *(pte + 3) != 0) {
if (pmap_debug_level >= 0)
kprintf("pmap_pinit = V%08x (%08x) (%08x) (%08x) (%08x)\n",
printf("pmap_pinit = V%08x (%08x) (%08x) (%08x) (%08x)\n",
(int) pte, *(pte+0), *(pte+1),
*(pte+2), *(pte+3));
}
@ -732,7 +732,7 @@ pmap_allocpagedir(pmap)
*(pte + 3) = L2_PTE((pd + (3 * NBPG)) & PG_FRAME, AP_KRW);
#if PMAP_DEBUG > 0
kprintf("pmap_pinit = V%08x (%08x) (%08x) (%08x) (%08x)\n",
printf("pmap_pinit = V%08x (%08x) (%08x) (%08x) (%08x)\n",
pte, *(pte+0), *(pte+1), *(pte+2), *(pte+3));
#endif
@ -756,7 +756,7 @@ pmap_allocpagedir(pmap)
pmap->pm_pdir[2] = kernel_pmap->pm_pdir[2];
pmap->pm_pdir[3] = kernel_pmap->pm_pdir[3];*/
/*kprintf("L1 pagetable V%08x, P%08x\n", pmap->pm_pdir, pd);*/
/*printf("L1 pagetable V%08x, P%08x\n", pmap->pm_pdir, pd);*/
/* Allocate a page table to map all the page tables for this pmap */
@ -766,9 +766,9 @@ pmap_allocpagedir(pmap)
pmap->pm_vptpt) & PG_FRAME;
}
/* kprintf("pagetable = V%08x P%08x\n", pagetable,
/* printf("pagetable = V%08x P%08x\n", pagetable,
pmap_extract(kernel_pmap, pagetable));
kprintf("L1 addr = %08x\n",
printf("L1 addr = %08x\n",
&((pd_entry_t **)pmap->pm_pdir)[0xefc]);
*/
@ -779,7 +779,7 @@ pmap_allocpagedir(pmap)
pmap->pm_pdir[0xefe] = L1_PTE(pmap->pm_pptpt + 0x800);
pmap->pm_pdir[0xeff] = L1_PTE(pmap->pm_pptpt + 0xc00);
/* kprintf("copying %08x\n", (PROCESS_PAGE_TBLS_BASE
/* printf("copying %08x\n", (PROCESS_PAGE_TBLS_BASE
+ (PROCESS_PAGE_TBLS_BASE >> (PGSHIFT-2)) + 0xf00));
*/
@ -802,7 +802,7 @@ pmap_allocpagedir(pmap)
/*
if (pmap_debug_level >= 0) {
kprintf("::::%08x %08x\n",
printf("::::%08x %08x\n",
((pt_entry_t *)(pmap->pm_vptpt + 0xefc)),
&((pt_entry_t *)pmap->pm_vptpt)[0xefc >> 2]);
}
@ -854,7 +854,7 @@ pmap_pinit(pmap)
struct pmap *pmap;
{
if (pmap_debug_level >= 0)
kprintf("pmap_pinit: pmap=%08x\n", (int)pmap);
printf("pmap_pinit: pmap=%08x\n", (int)pmap);
/* Keep looping until we succeed in allocating a page directory */
@ -885,7 +885,7 @@ pmap_pinit(pmap)
if (tsleep((caddr_t)pagedirectories, PZERO, "l1ptwait", 1000)
== EWOULDBLOCK)
kprintf("Warning: Possible process deadlock due to shortage of L1 page tables\n");
printf("Warning: Possible process deadlock due to shortage of L1 page tables\n");
}
}
@ -902,7 +902,7 @@ pmap_destroy(pmap)
int count;
if (pmap_debug_level >= 0)
kprintf("pmap_destroy: pmap = %08x\n", (int) pmap);
printf("pmap_destroy: pmap = %08x\n", (int) pmap);
if (pmap == NULL)
return;
@ -914,7 +914,7 @@ pmap_destroy(pmap)
pmap_release(pmap);
free((caddr_t)pmap, M_VMPMAP);
} else
kprintf("pmap_destroy: pm_count=%d\n", count);
printf("pmap_destroy: pm_count=%d\n", count);
}
@ -947,7 +947,7 @@ pmap_release(pmap)
register pmap_t pmap;
{
if (pmap_debug_level >= 0)
kprintf("pmap_release: pmap=%08x\n", (int) pmap);
printf("pmap_release: pmap=%08x\n", (int) pmap);
if (pmap->pm_count != 1) /* XXX: needs sorting */
panic("pmap_release count");
@ -1028,7 +1028,7 @@ pmap_pageable(pmap, sva, eva, pageable)
*/
if (pmap_debug_level >= 5)
kprintf("pmap_pageable: pmap=%08x sva=%08x eva=%08x p=%d\n",
printf("pmap_pageable: pmap=%08x sva=%08x eva=%08x p=%d\n",
(int) pmap, (int) sva, (int) eva, (int) pageable);
if (pmap == kernel_pmap && pageable && eva == (sva + NBPG)) {
@ -1048,7 +1048,7 @@ pmap_pageable(pmap, sva, eva, pageable)
pmap_clear_modify(pa);
if (pmap_debug_level >= 0)
kprintf("pmap_pageable: ermm can't really do this yet (%08x)!\n",
printf("pmap_pageable: ermm can't really do this yet (%08x)!\n",
(int) sva);
}
}
@ -1061,26 +1061,26 @@ pmap_activate(pmap, pcbp)
{
if (pmap != NULL) {
#if PMAP_DEBUG > 1
kprintf("pmap_activate: pagedir = V%08x\n", pmap->pm_pdir);
printf("pmap_activate: pagedir = V%08x\n", pmap->pm_pdir);
#endif
pcbp->pcb_pagedir = (pd_entry_t *)pmap_extract(kernel_pmap,
(vm_offset_t)pmap->pm_pdir);
if (pmap_debug_level >= 0)
kprintf("pmap_activate: pmap=%08x pcb=%08x pdir=%08x l1=%08x\n",
printf("pmap_activate: pmap=%08x pcb=%08x pdir=%08x l1=%08x\n",
(int) pmap, (int) pcbp, (int) pmap->pm_pdir,
(int) pcbp->pcb_pagedir);
#if PMAP_DEBUG > 1
kprintf("pmap_activate: pagedir = P%08x\n", pcbp->pcb_pagedir);
printf("pmap_activate: pagedir = P%08x\n", pcbp->pcb_pagedir);
#endif
if (pmap == &curproc->p_vmspace->vm_pmap) {
kprintf("pmap: Setting TTB\n");
printf("pmap: Setting TTB\n");
setttb((u_int)pcbp->pcb_pagedir);
}
pmap->pm_pdchanged = FALSE;
}
#if PMAP_DEBUG > 1
kprintf("pmap_activate: done\n");
printf("pmap_activate: done\n");
#endif
}
@ -1097,7 +1097,7 @@ pmap_zero_page(phys)
vm_offset_t phys;
{
#if PMAPDEBUG > 4
kprintf("pmap_zero_page: pa = %08x", phys);
printf("pmap_zero_page: pa = %08x", phys);
#endif
/* Hook the physical page into the memory at our special hook point */
@ -1111,12 +1111,12 @@ pmap_zero_page(phys)
/* Zero the memory */
#if PMAPDEBUG > 4
kprintf(" zeroing...");
printf(" zeroing...");
#endif
bzero_page(page_hook0.va);
idcflush();
#if PMAPDEBUG > 4
kprintf("done.\n");
printf("done.\n");
#endif
}
@ -1134,7 +1134,7 @@ pmap_copy_page(src, dest)
vm_offset_t dest;
{
if (pmap_debug_level >= -1)
kprintf("pmap_copy_page: src=P%08x dest=P%08x\n",
printf("pmap_copy_page: src=P%08x dest=P%08x\n",
(int) src, (int) dest);
/* Hook the physical page into the memory at our special hook point */
@ -1168,7 +1168,7 @@ pmap_next_page(addr)
{
if (physical_freestart == physical_freeend) {
if (pmap_debug_level >= 0)
kprintf("pmap_next_page: Trying to allocate beyond memory\n");
printf("pmap_next_page: Trying to allocate beyond memory\n");
return(FALSE);
}
@ -1185,8 +1185,8 @@ pmap_next_page(addr)
}
#if PMAPDEBUG > 10
kprintf("pmap_next_page: Allocated physpage %08x\n", *addr);
kprintf("pmap_next_page: Next page is %08x\n", physical_freestart);
printf("pmap_next_page: Allocated physpage %08x\n", *addr);
printf("pmap_next_page: Next page is %08x\n", physical_freestart);
#endif
return(TRUE);
@ -1243,7 +1243,7 @@ unsigned int
pmap_free_pages()
{
#if PMAPDEBUG > 0
kprintf("pmap_free_pages: %08x pages free\n", free_pages);
printf("pmap_free_pages: %08x pages free\n", free_pages);
#endif
return(free_pages);
}
@ -1268,7 +1268,7 @@ pmap_page_index(pa)
int loop;
#if PMAPDEBUG > 0
kprintf("pmap_page_index: pa = P%08x", (int)pa);
printf("pmap_page_index: pa = P%08x", (int)pa);
#endif
if (pa < bootconfig.dram[0].address)
@ -1280,21 +1280,21 @@ pmap_page_index(pa)
+ bootconfig.dram[loop].pages * NBPG)) {
index += (pa - bootconfig.dram[loop].address) >> PGSHIFT;
#if PMAPDEBUG > 0
kprintf(" index = %08x\n" ,index);
printf(" index = %08x\n" ,index);
#endif
#ifdef DIAGNOSTIC
if (index > 0x00010000 || index < 0)
kprintf("pmap_page_index: pa = %08x\n", (int)pa);
printf("pmap_page_index: pa = %08x\n", (int)pa);
#endif
return(index);
} else
index += bootconfig.dram[loop].pages;
}
#if PMAPDEBUG > 0
kprintf(" index = Invalid\n");
printf(" index = Invalid\n");
#endif
if (pmap_debug_level >= 1)
kprintf("page invalid - no index %08x\n", (int) pa);
printf("page invalid - no index %08x\n", (int) pa);
return(-1);
}
@ -1313,7 +1313,7 @@ pmap_remove(pmap, sva, eva)
idcflush();
if (pmap_debug_level >= 0)
kprintf("pmap_remove: pmap=%08x sva=%08x eva=%08x\n", (int) pmap,
printf("pmap_remove: pmap=%08x sva=%08x eva=%08x\n", (int) pmap,
(int) sva, (int) eva);
sva &= PG_FRAME;
@ -1368,7 +1368,7 @@ pmap_remove(pmap, sva, eva)
#ifdef DEBUG
if (pmapdebug & PDB_REMOVE)
kprintf("remove: inv pte at %x(%x) ", pte, *pte);
printf("remove: inv pte at %x(%x) ", pte, *pte);
#endif
if ((pind = pmap_page_index(pa)) != -1) {
@ -1376,7 +1376,7 @@ pmap_remove(pmap, sva, eva)
/* pmap_remove_pv will update pmap_attributes */
#ifdef DIAGNOSTIC
if (pind > 0x00010000 || pind < 0) {
kprintf("eerk ! pind=%08x pa=%08x\n", pind, (int) pa);
printf("eerk ! pind=%08x pa=%08x\n", pind, (int) pa);
panic("The axe has fallen, were dead\n");
}
#endif
@ -1415,16 +1415,16 @@ pmap_remove_all(pa)
idcflush();
if (pmap_debug_level >= 0)
kprintf("pmap_remove_all: pa=%08x ", (int) pa);
printf("pmap_remove_all: pa=%08x ", (int) pa);
#ifdef DEBUG
if (pmapdebug & (PDB_FOLLOW|PDB_REMOVE|PDB_PROTECT))
kprintf("pmap_remove_all(%x)", (int) pa);
printf("pmap_remove_all(%x)", (int) pa);
/*pmap_pvdump(pa);*/
#endif
if ((pind = pmap_page_index(pa)) == -1) {
if (pmap_debug_level >= 0)
kprintf("no accounting\n");
printf("no accounting\n");
return;
}
@ -1433,7 +1433,7 @@ pmap_remove_all(pa)
if (ph->pv_pmap == NULL) {
if (pmap_debug_level >= 0)
kprintf("free page\n");
printf("free page\n");
splx(s);
return;
}
@ -1443,7 +1443,7 @@ pmap_remove_all(pa)
pte = pmap_pte(pmap, pv->pv_va);
if (pmap_debug_level >= 0)
kprintf("[%08x,%08x,%08x,%08x] ", (int) pmap, *pte,
printf("[%08x,%08x,%08x,%08x] ", (int) pmap, *pte,
(int) pv->pv_va, pv->pv_flags);
#ifdef DEBUG
@ -1472,7 +1472,7 @@ pmap_remove_all(pa)
*/
#ifdef DEBUG
if (pmapdebug & PDB_REMOVE)
kprintf("remove: inv pte at %x(%x) ", pte, *pte);
printf("remove: inv pte at %x(%x) ", pte, *pte);
#endif
#ifdef needednotdone
@ -1498,7 +1498,7 @@ reduce wiring count on page table pages as references drop
splx(s);
if (pmap_debug_level >= 0)
kprintf("done\n");
printf("done\n");
pmap_update();
}
@ -1522,7 +1522,7 @@ pmap_protect(pmap, sva, eva, prot)
int pind;
if (pmap_debug_level >= 0)
kprintf("pmap_protect: pmap=%08x %08x->%08x %08x\n",
printf("pmap_protect: pmap=%08x %08x->%08x %08x\n",
(int) pmap, (int) sva, (int) eva, prot);
if ((prot & VM_PROT_READ) == VM_PROT_NONE) {
@ -1548,7 +1548,7 @@ pmap_protect(pmap, sva, eva, prot)
}
while (sva < eva) {
/*kprintf("pmap_protect: sva = %08x eva=%08x\n", sva, eva);*/
/*printf("pmap_protect: sva = %08x eva=%08x\n", sva, eva);*/
/* only check once in a while */
if ((sva & PT_MASK) == 0) {
if (!pmap_pde_v(pmap_pde(pmap, sva))) {
@ -1625,11 +1625,11 @@ pmap_enter(pmap, va, pa, prot, wired)
u_int cacheable = 0;
#if PMAP_DEBUG > 5
kprintf("pmap_enter: V%08x P%08x in pmap V%08x\n", va, pa, pmap);
printf("pmap_enter: V%08x P%08x in pmap V%08x\n", va, pa, pmap);
#endif
if (pmap_debug_level >= 5)
kprintf("pmap_enter: V%08x P%08x in pmap V%08x prot=%08x, wired = %d\n",
printf("pmap_enter: V%08x P%08x in pmap V%08x prot=%08x, wired = %d\n",
(int) va, (int) pa, (int) pmap, prot, wired);
/* Valid pmap ? */
@ -1649,16 +1649,16 @@ pmap_enter(pmap, va, pa, prot, wired)
pte = pmap_pte(pmap, va);
if (!pte) {
kprintf("pmap_enter: pde = %08x\n", (u_int) pmap_pde(pmap, va));
kprintf("pmap_enter: pte = %08x\n", (u_int) pmap_pte(pmap, va));
printf("pmap_enter: pde = %08x\n", (u_int) pmap_pde(pmap, va));
printf("pmap_enter: pte = %08x\n", (u_int) pmap_pte(pmap, va));
panic("Failure 01 in pmap_enter (V%08x P%08x)\n", (u_int) va, (u_int) pa);
}
/* More debugging info */
if (pmap_debug_level >= 5) {
kprintf("pmap_enter: pte for V%08x = V%08x", (u_int) va, (u_int) pte);
kprintf(" (%08x)\n", *pte);
printf("pmap_enter: pte for V%08x = V%08x", (u_int) va, (u_int) pte);
printf(" (%08x)\n", *pte);
}
/* Is the pte valid ? If so then this page is already mapped */
@ -1680,7 +1680,7 @@ pmap_enter(pmap, va, pa, prot, wired)
/* All we must be doing is changing the protection */
if (pmap_debug_level >= 0)
kprintf("Failure 02 in pmap_enter (V%08x P%08x)\n", (u_int) va, (u_int) pa);
printf("Failure 02 in pmap_enter (V%08x P%08x)\n", (u_int) va, (u_int) pa);
pind = pmap_page_index(pa);
cacheable = (*pte) & PT_C;
@ -1701,7 +1701,7 @@ pmap_enter(pmap, va, pa, prot, wired)
idcflush();
if (pmap_debug_level >= 0)
kprintf("Failure 03 in pmap_enter (V%08x P%08x P%08x)\n",
printf("Failure 03 in pmap_enter (V%08x P%08x P%08x)\n",
(int) va, (int) pa, (int) opa);
/*
@ -1784,7 +1784,7 @@ pmap_enter(pmap, va, pa, prot, wired)
else
cacheable = 0;
if (pmap_debug_level > 0)
kprintf("pmap_enter: non-managed memory mapping va=%08x pa=%08x\n",
printf("pmap_enter: non-managed memory mapping va=%08x pa=%08x\n",
(int) va, (int) pa);
}
}
@ -1794,10 +1794,10 @@ pmap_enter(pmap, va, pa, prot, wired)
npte = (pa & PG_FRAME) | cacheable | PT_B;
if (va == 0 && (prot & VM_PROT_WRITE))
kprintf("va=0 prot=%d\n", prot);
printf("va=0 prot=%d\n", prot);
/*if (va < VM_MIN_ADDRESS)
kprintf("pmap_enter: va=%08x\n", (u_int)va);*/
printf("pmap_enter: va=%08x\n", (u_int)va);*/
/* if (va >= VM_MIN_ADDRESS && va < VM_MAXUSER_ADDRESS && !wired)
npte |= L2_INVAL;
@ -1836,7 +1836,7 @@ if (va == 0 && (prot & VM_PROT_WRITE))
#ifdef DIAGNOSTIC
if (pind > 0x00010000 || pind < 0)
{
kprintf("pind=%08x\n", pind);
printf("pind=%08x\n", pind);
}
#endif
/* pmap_modify_pv(pmap, va, pind, 0xffffffff, flags);*/
@ -1853,8 +1853,8 @@ if (va == 0 && (prot & VM_PROT_WRITE))
{
if (pmap_debug_level >= 0)
{
kprintf("Page being mapped in the page table area\n");
kprintf("page P%08x will be installed in the L1 table as well\n",
printf("Page being mapped in the page table area\n");
printf("page P%08x will be installed in the L1 table as well\n",
(int) pa);
}
pa = pa & PG_FRAME;
@ -1869,7 +1869,7 @@ if (va == 0 && (prot & VM_PROT_WRITE))
tlbflush();
#if PMAP_DEBUG > 5
kprintf("pmap_enter: pte = V%08x %08x\n", pte, *pte);
printf("pmap_enter: pte = V%08x %08x\n", pte, *pte);
#endif
}
@ -1886,7 +1886,7 @@ pmap_page_protect(phys, prot)
vm_prot_t prot;
{
if (pmap_debug_level >= 0)
kprintf("pmap_page_protect: pa=%08x, prot=%d\n", (int) phys, prot);
printf("pmap_page_protect: pa=%08x, prot=%d\n", (int) phys, prot);
switch(prot) {
case VM_PROT_READ:
@ -1983,27 +1983,27 @@ pmap_pte(pmap, va)
/* Return the address of the pte */
#if PMAP_DEBUG > 10
kprintf("pmap_pte: pmap=V%08x va=V%08x pde = V%08x", pmap, va,
printf("pmap_pte: pmap=V%08x va=V%08x pde = V%08x", pmap, va,
pmap_pde(pmap, va));
kprintf(" (%08x)\n", *(pmap_pde(pmap, va)));
printf(" (%08x)\n", *(pmap_pde(pmap, va)));
#endif
if (pmap_debug_level >= 10) {
kprintf("pmap_pte: pmap=V%08x va=V%08x pde = V%08x", (int) pmap,
printf("pmap_pte: pmap=V%08x va=V%08x pde = V%08x", (int) pmap,
(int) va, (int) pmap_pde(pmap, va));
kprintf(" (%08x)\n", *(pmap_pde(pmap, va)));
printf(" (%08x)\n", *(pmap_pde(pmap, va)));
}
/* Do we have a valid pde ? If not we don't have a page table */
if (!pmap_pde_v(pmap_pde(pmap, va))) {
if (pmap_debug_level >= 0)
kprintf("pmap_pte: failed - pde = %08x\n", (int) pmap_pde(pmap, va));
printf("pmap_pte: failed - pde = %08x\n", (int) pmap_pde(pmap, va));
return(NULL);
}
if (pmap_debug_level >= 10)
kprintf("pmap pagetable = P%08x current = P%08x\n", (int) pmap->pm_pptpt,
printf("pmap pagetable = P%08x current = P%08x\n", (int) pmap->pm_pptpt,
(*((pt_entry_t *)(PROCESS_PAGE_TBLS_BASE
+ (PROCESS_PAGE_TBLS_BASE >> (PGSHIFT-2))+0xefc)) & PG_FRAME));
@ -2015,7 +2015,7 @@ pmap_pte(pmap, va)
pde = (pd_entry_t *)CURRENT_PAGEDIR_BASE;
idcflush();
/*kprintf("\x1b[33mpde=%08x kernel pmap=%08x pmap=%08x\x1b[0m\n", pde, kernel_pmap, pmap);*/
/*printf("\x1b[33mpde=%08x kernel pmap=%08x pmap=%08x\x1b[0m\n", pde, kernel_pmap, pmap);*/
ptp = (pt_entry_t *)ALT_PAGE_TBLS_BASE;
pde[(ALT_PAGE_TBLS_BASE >> 20) + 0] = L1_PTE(pmap->pm_pptpt + 0x000);
pde[(ALT_PAGE_TBLS_BASE >> 20) + 1] = L1_PTE(pmap->pm_pptpt + 0x400);
@ -2028,7 +2028,7 @@ pmap_pte(pmap, va)
tlbflush();
}
if (pmap_debug_level >= 10)
kprintf("page tables base = %08x\n", (int) ptp);
printf("page tables base = %08x\n", (int) ptp);
result = (pt_entry_t *)((char *)ptp + ((va >> (PGSHIFT-2)) & ~3));
return(result);
}
@ -2049,7 +2049,7 @@ pmap_extract(pmap, va)
register pt_entry_t *pte;
register vm_offset_t pa;
/*
kprintf("pmap_extract: pmap = %08x va = V%08x\n", pmap, va);
printf("pmap_extract: pmap = %08x va = V%08x\n", pmap, va);
*/
/*
@ -2070,7 +2070,7 @@ pmap_extract(pmap, va)
pa = pmap_pte_pa(pte);
/* kprintf("pmap_extract: pa = P%08x\n", (pa | (va & ~PG_FRAME))); */
/* printf("pmap_extract: pa = P%08x\n", (pa | (va & ~PG_FRAME))); */
return(pa | (va & ~PG_FRAME));
}
@ -2112,7 +2112,7 @@ pmap_copy(dst_pmap, src_pmap, dst_addr, len, src_addr)
vm_offset_t src_addr;
{
if (pmap_debug_level >= 0)
kprintf("pmap_copy(%x, %x, %x, %x, %x)\n",
printf("pmap_copy(%x, %x, %x, %x, %x)\n",
(int) dst_pmap, (int) src_pmap, (int) dst_addr,
(int) len, (int) src_addr);
}
@ -2128,18 +2128,18 @@ pmap_dump_pvlist(phys, m)
if (!pv_table)
return;
kprintf("%s %08x:", m, (int) phys);
printf("%s %08x:", m, (int) phys);
pv = &pv_table[pmap_page_index(phys)];
if (pv->pv_pmap == NULL) {
kprintf(" no mappings\n");
printf(" no mappings\n");
return;
}
for (; pv; pv = pv->pv_next)
kprintf(" pmap %08x va %08x flags %08x", (int) pv->pv_pmap,
printf(" pmap %08x va %08x flags %08x", (int) pv->pv_pmap,
(int) pv->pv_va, pv->pv_flags);
kprintf("\n");
printf("\n");
}
@ -2152,17 +2152,17 @@ pmap_dump_pvs()
if (!pv_table)
return;
kprintf("pv dump\n");
printf("pv dump\n");
for (loop = 0; loop < npages; ++loop) {
pv = &pv_table[loop];
if (pv->pv_pmap != NULL) {
kprintf("%4d : ", loop);
printf("%4d : ", loop);
for (; pv; pv = pv->pv_next) {
kprintf(" pmap %08x va %08x flags %08x", (int) pv->pv_pmap,
printf(" pmap %08x va %08x flags %08x", (int) pv->pv_pmap,
(int) pv->pv_va, pv->pv_flags);
}
kprintf("\n");
printf("\n");
}
}
}
@ -2179,7 +2179,7 @@ pmap_testbit(pa, setbits)
int s;
if (pmap_debug_level >= 1)
kprintf("pmap_testbit: pa=%08x set=%08x\n", (int) pa, setbits);
printf("pmap_testbit: pa=%08x set=%08x\n", (int) pa, setbits);
if (pv_table == NULL || pmap_attributes == NULL)
return(FALSE);
@ -2192,7 +2192,7 @@ pmap_testbit(pa, setbits)
/*
if (pmap_debug_level >= 0)
kprintf("pmap_attributes = %02x\n", pmap_attributes[pind]);
printf("pmap_attributes = %02x\n", pmap_attributes[pind]);
*/
/*
@ -2201,7 +2201,7 @@ pmap_testbit(pa, setbits)
if (pmap_attributes[pind] & setbits) {
if (pmap_debug_level >= 0)
kprintf("pmap_attributes = %02x\n", pmap_attributes[pind]);
printf("pmap_attributes = %02x\n", pmap_attributes[pind]);
splx(s);
return(TRUE);
@ -2257,7 +2257,7 @@ pmap_changebit(pa, setbits, maskbits)
int s;
if (pmap_debug_level >= 1)
kprintf("pmap_changebit: pa=%08x set=%08x mask=%08x\n",
printf("pmap_changebit: pa=%08x set=%08x mask=%08x\n",
(int) pa, setbits, maskbits);
if (pv_table == NULL || pmap_attributes == NULL)
@ -2274,7 +2274,7 @@ pmap_changebit(pa, setbits, maskbits)
*/
if (pmap_debug_level >= 0 && pmap_attributes[pind])
kprintf("pmap_attributes = %02x\n", pmap_attributes[pind]);
printf("pmap_attributes = %02x\n", pmap_attributes[pind]);
if (~maskbits)
pmap_attributes[pind] &= maskbits;
@ -2320,7 +2320,7 @@ pmap_clear_modify(pa)
vm_offset_t pa;
{
if (pmap_debug_level >= 0)
kprintf("pmap_clear_modify pa=%08x\n", (int) pa);
printf("pmap_clear_modify pa=%08x\n", (int) pa);
pmap_changebit(pa, 0, ~PT_M);
}
@ -2330,7 +2330,7 @@ pmap_clear_reference(pa)
vm_offset_t pa;
{
if (pmap_debug_level >= 0)
kprintf("pmap_clear_reference pa=%08x\n", (int) pa);
printf("pmap_clear_reference pa=%08x\n", (int) pa);
pmap_changebit(pa, 0, ~PT_H);
}
@ -2340,7 +2340,7 @@ pmap_copy_on_write(pa)
vm_offset_t pa;
{
if (pmap_debug_level >= 0)
kprintf("pmap_copy_on_write pa=%08x\n", (int) pa);
printf("pmap_copy_on_write pa=%08x\n", (int) pa);
pmap_changebit(pa, 0, ~PT_Wr);
}
@ -2352,7 +2352,7 @@ pmap_is_modified(pa)
result = pmap_testbit(pa, PT_M);
if (pmap_debug_level >= 0)
kprintf("pmap_is_modified pa=%08x %08x\n", (int) pa, result);
printf("pmap_is_modified pa=%08x %08x\n", (int) pa, result);
return(result);
}
@ -2367,7 +2367,7 @@ pmap_is_referenced(pa)
result = pmap_testbit(pa, PT_H);
if (pmap_debug_level >= 0)
kprintf("pmap_is_referenced pa=%08x %08x\n", (int) pa, result);
printf("pmap_is_referenced pa=%08x %08x\n", (int) pa, result);
return(result);
}
@ -2402,7 +2402,7 @@ pmap_modified_emulation(pmap, va)
flags = pmap_modify_pv(pmap, va, pind, 0, 0);
if (pmap_debug_level > 2)
kprintf("pmap_modified_emulation: flags = %08x\n", flags);
printf("pmap_modified_emulation: flags = %08x\n", flags);
/*
* Do the flags say this page is writable ? If not then it is a genuine
@ -2415,13 +2415,13 @@ pmap_modified_emulation(pmap, va)
return(0);
if (pmap_debug_level > 0)
kprintf("pmap_modified_emulation: Got a hit va=%08x\n", (int) va);
printf("pmap_modified_emulation: Got a hit va=%08x\n", (int) va);
if (pmap_debug_level > 0)
kprintf("pte = %08x (%08x)", (int) pte, *pte);
printf("pte = %08x (%08x)", (int) pte, *pte);
*pte = *pte | PT_AP(AP_W);
if (pmap_debug_level > 0)
kprintf("->(%08x)\n", *pte);
printf("->(%08x)\n", *pte);
tlbflush();
@ -2449,7 +2449,7 @@ pmap_handled_emulation(pmap, va)
/* u_int flags;*/
if (pmap_debug_level > 2)
kprintf("pmap_handled_emulation\n");
printf("pmap_handled_emulation\n");
/* return(0);*/
@ -2458,20 +2458,20 @@ pmap_handled_emulation(pmap, va)
pte = pmap_pte(pmap, va);
if (!pte) {
if (pmap_debug_level > 2)
kprintf("no pte\n");
printf("no pte\n");
return(0);
}
/* Check for a zero pte */
if (pmap_debug_level > 1)
kprintf("*pte=%08x\n", *pte);
printf("*pte=%08x\n", *pte);
if (*pte == 0)
return(0);
if (pmap_debug_level > 1)
kprintf("pmap_handled_emulation: non zero pte %08x\n", *pte);
printf("pmap_handled_emulation: non zero pte %08x\n", *pte);
/* Have we marked a valid pte as invalid ? */
@ -2479,7 +2479,7 @@ pmap_handled_emulation(pmap, va)
return(0);
if (pmap_debug_level >=-1)
kprintf("Got an invalid pte\n");
printf("Got an invalid pte\n");
/* Extract the physical address of the page */
@ -2495,13 +2495,13 @@ pmap_handled_emulation(pmap, va)
*/
if (pmap_debug_level > 0)
kprintf("pmap_handled_emulation: Got a hit va=%08x\n", (int) va);
printf("pmap_handled_emulation: Got a hit va=%08x\n", (int) va);
if (pmap_debug_level > 0)
kprintf("pte = %08x (%08x)", (int) pte, *pte);
printf("pte = %08x (%08x)", (int) pte, *pte);
*pte = ((*pte) & ~L2_MASK) | L2_SPAGE;
if (pmap_debug_level > 0)
kprintf("->(%08x)\n", *pte);
printf("->(%08x)\n", *pte);
tlbflush();
@ -2519,10 +2519,10 @@ pmap_pagedir_dump()
{
int loop;
kprintf("PD pmap PD pmap\n");
printf("PD pmap PD pmap\n");
for (loop = 0; loop < max_processes / 2; ++loop) {
kprintf("%2d %08x %2d %08x\n", loop,
printf("%2d %08x %2d %08x\n", loop,
(int) pagedirectories[loop], loop + max_processes / 2,
(int) pagedirectories[loop + max_processes / 2]);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: postmortem.c,v 1.6 1996/10/11 00:06:53 christos Exp $ */
/* $NetBSD: postmortem.c,v 1.7 1996/10/13 03:05:57 christos Exp $ */
/*
* Copyright (c) 1994,1995 Mark Brinicombe.
@ -74,32 +74,32 @@ pm_dumpb(addr, count)
int loop;
for (; count > 0; count -= 16) {
kprintf("%08x: ", (int)addr);
printf("%08x: ", (int)addr);
for (loop = 0; loop < 16; ++loop) {
byte = addr[loop];
kprintf("%02x ", byte);
printf("%02x ", byte);
}
kprintf(" ");
printf(" ");
for (loop = 0; loop < 16; ++loop) {
byte = addr[loop];
if (byte < 0x20)
kprintf("\x1b[31m%c\x1b[0m", byte + '@');
printf("\x1b[31m%c\x1b[0m", byte + '@');
else if (byte == 0x7f)
kprintf("\x1b[31m?\x1b[0m");
printf("\x1b[31m?\x1b[0m");
else if (byte < 0x80)
kprintf("%c", byte);
printf("%c", byte);
else if (byte < 0xa0)
kprintf("\x1b[32m%c\x1b[0m", byte - '@');
printf("\x1b[32m%c\x1b[0m", byte - '@');
else if (byte == 0xff)
kprintf("\x1b[32m?\x1b[0m");
printf("\x1b[32m?\x1b[0m");
else
kprintf("%c", byte & 0x7f);
printf("%c", byte & 0x7f);
}
kprintf("\r\n");
printf("\r\n");
addr += 16;
}
}
@ -116,32 +116,32 @@ pm_dumpw(addr, count)
int loop;
for (; count > 0; count -= 32) {
kprintf("%08x: ", (int)addr);
printf("%08x: ", (int)addr);
for (loop = 0; loop < 8; ++loop) {
byte = ((u_int *)addr)[loop];
kprintf("%08x ", byte);
printf("%08x ", byte);
}
kprintf(" ");
printf(" ");
for (loop = 0; loop < 32; ++loop) {
byte = addr[loop];
if (byte < 0x20)
kprintf("\x1b[31m%c\x1b[0m", byte + '@');
printf("\x1b[31m%c\x1b[0m", byte + '@');
else if (byte == 0x7f)
kprintf("\x1b[31m?\x1b[0m");
printf("\x1b[31m?\x1b[0m");
else if (byte < 0x80)
kprintf("%c", byte);
printf("%c", byte);
else if (byte < 0xa0)
kprintf("\x1b[32m%c\x1b[0m", byte - '@');
printf("\x1b[32m%c\x1b[0m", byte - '@');
else if (byte == 0xff)
kprintf("\x1b[32m?\x1b[0m");
printf("\x1b[32m?\x1b[0m");
else
kprintf("%c", byte & 0x7f);
printf("%c", byte & 0x7f);
}
kprintf("\r\n");
printf("\r\n");
addr += 32;
}
}
@ -156,13 +156,13 @@ dumpframe(frame)
u_int s;
s = splhigh();
kprintf("frame address = %08x ", (u_int)frame);
kprintf("spsr =%08x\n", frame->tf_spsr);
kprintf("r0 =%08x r1 =%08x r2 =%08x r3 =%08x\n", frame->tf_r0, frame->tf_r1, frame->tf_r2, frame->tf_r3);
kprintf("r4 =%08x r5 =%08x r6 =%08x r7 =%08x\n", frame->tf_r4, frame->tf_r5, frame->tf_r6, frame->tf_r7);
kprintf("r8 =%08x r9 =%08x r10=%08x r11=%08x\n", frame->tf_r8, frame->tf_r9, frame->tf_r10, frame->tf_r11);
kprintf("r12=%08x r13=%08x r14=%08x r15=%08x\n", frame->tf_r12, frame->tf_usr_sp, frame->tf_usr_lr, frame->tf_pc);
kprintf("slr=%08x\n", frame->tf_svc_lr);
printf("frame address = %08x ", (u_int)frame);
printf("spsr =%08x\n", frame->tf_spsr);
printf("r0 =%08x r1 =%08x r2 =%08x r3 =%08x\n", frame->tf_r0, frame->tf_r1, frame->tf_r2, frame->tf_r3);
printf("r4 =%08x r5 =%08x r6 =%08x r7 =%08x\n", frame->tf_r4, frame->tf_r5, frame->tf_r6, frame->tf_r7);
printf("r8 =%08x r9 =%08x r10=%08x r11=%08x\n", frame->tf_r8, frame->tf_r9, frame->tf_r10, frame->tf_r11);
printf("r12=%08x r13=%08x r14=%08x r15=%08x\n", frame->tf_r12, frame->tf_usr_sp, frame->tf_usr_lr, frame->tf_pc);
printf("slr=%08x\n", frame->tf_svc_lr);
(void)splx(s);
}
@ -179,13 +179,13 @@ void kstack_stuff(p)
if (p->p_addr == 0) return;
if (p->p_vmspace == 0) return;
kprintf("proc=%08x comm=%s pid=%d\n", (u_int)p, p->p_comm, p->p_pid);
printf("proc=%08x comm=%s pid=%d\n", (u_int)p, p->p_comm, p->p_pid);
pmap = &p->p_vmspace->vm_pmap;
kprintf("pmap=%08x\n", (u_int)pmap);
printf("pmap=%08x\n", (u_int)pmap);
kprintf("p->p_addr=%08x pa=%08x,%d:%08x,%d\n",
printf("p->p_addr=%08x pa=%08x,%d:%08x,%d\n",
(u_int)p->p_addr,
(u_int)pmap_extract(pmap, (vm_offset_t)p->p_addr),
pmap_page_index(pmap_extract(pmap, (vm_offset_t)p->p_addr)),
@ -204,11 +204,11 @@ check_stacks(p)
if (p) {
ptr = ((u_char *)p->p_addr) + USPACE_UNDEF_STACK_BOTTOM;
for (loop = 0; loop < (USPACE_UNDEF_STACK_TOP - USPACE_UNDEF_STACK_BOTTOM) && *ptr == 0xdd; ++loop, ++ptr) ;
kprintf("%d bytes of undefined stack fill pattern out of %d bytes\n", loop,
printf("%d bytes of undefined stack fill pattern out of %d bytes\n", loop,
USPACE_UNDEF_STACK_TOP - USPACE_UNDEF_STACK_BOTTOM);
ptr = ((u_char *)p->p_addr) + USPACE_SVC_STACK_BOTTOM;
for (loop = 0; loop < (USPACE_SVC_STACK_TOP - USPACE_SVC_STACK_BOTTOM) && *ptr == 0xdd; ++loop, ++ptr) ;
kprintf("%d bytes of svc stack fill pattern out of %d bytes\n", loop,
printf("%d bytes of svc stack fill pattern out of %d bytes\n", loop,
USPACE_SVC_STACK_TOP - USPACE_SVC_STACK_BOTTOM);
}
}
@ -235,29 +235,29 @@ postmortem(frame)
dumpframe(frame);
kprintf("curproc=%08x paddr=%08x pcb=%08x curpcb=%08x\n",
printf("curproc=%08x paddr=%08x pcb=%08x curpcb=%08x\n",
(u_int) curproc, (u_int) curproc->p_addr,
(u_int) &curproc->p_addr->u_pcb, (u_int) curpcb);
kprintf("CPSR=%08x ", GetCPSR());
printf("CPSR=%08x ", GetCPSR());
kprintf("Process = %08x ", (u_int)curproc);
kprintf("pid = %d ", curproc->p_pid);
kprintf("comm = %s\n", curproc->p_comm);
printf("Process = %08x ", (u_int)curproc);
printf("pid = %d ", curproc->p_pid);
printf("comm = %s\n", curproc->p_comm);
pm_dumpw(irqstack.virtual + NBPG - 0x100, 0x100);
pm_dumpw(undstack.virtual + NBPG - 0x20, 0x20);
pm_dumpw(abtstack.virtual + NBPG - 0x20, 0x20);
kprintf("abt_sp=%08x irq_sp=%08x und_sp=%08x svc_sp=%08x\n",
printf("abt_sp=%08x irq_sp=%08x und_sp=%08x svc_sp=%08x\n",
get_stackptr(PSR_ABT32_MODE),
get_stackptr(PSR_IRQ32_MODE),
get_stackptr(PSR_UND32_MODE),
get_stackptr(PSR_SVC32_MODE));
if (curpcb)
kprintf("curpcb=%08x pcb_sp=%08x pcb_und_sp=%08x\n", curpcb, curpcb->pcb_sp, curpcb->pcb_und_sp);
printf("curpcb=%08x pcb_sp=%08x pcb_und_sp=%08x\n", curpcb, curpcb->pcb_sp, curpcb->pcb_und_sp);
kprintf("proc0=%08x paddr=%08x pcb=%08x\n", (u_int)&proc0,
printf("proc0=%08x paddr=%08x pcb=%08x\n", (u_int)&proc0,
(u_int)proc0.p_addr, (u_int) &proc0.p_addr->u_pcb);
/*
@ -265,26 +265,26 @@ postmortem(frame)
kstack_stuff(curproc);
*/
#else
kprintf("Process = %08x ", (u_int)curproc);
kprintf("pid = %d ", curproc->p_pid);
kprintf("comm = %s\n", curproc->p_comm);
kprintf("CPSR=%08x ", GetCPSR());
printf("Process = %08x ", (u_int)curproc);
printf("pid = %d ", curproc->p_pid);
printf("comm = %s\n", curproc->p_comm);
printf("CPSR=%08x ", GetCPSR());
kprintf("Traceback info\n");
printf("Traceback info\n");
addr = simpletraceback();
kprintf("Trapframe PC = %08x\n", frame->tf_pc);
kprintf("Trapframe SPSR = %08x\n", frame->tf_spsr);
printf("Trapframe PC = %08x\n", frame->tf_pc);
printf("Trapframe SPSR = %08x\n", frame->tf_spsr);
if (usertraceback) {
kprintf("Attempting user trackback\n");
printf("Attempting user trackback\n");
user_traceback(frame->tf_r11);
}
#endif
if ((frame->tf_spsr & PSR_MODE) == PSR_IRQ32_MODE
&& addr >= irqstack.virtual && addr < (irqstack.virtual + NBPG)) {
kprintf("Trap occurred in IRQ\n");
kprintf("IRQ Traceback info\n");
printf("Trap occurred in IRQ\n");
printf("IRQ Traceback info\n");
irqtraceback(addr, irqstack.virtual);
}
(void)splx(s);
@ -295,9 +295,9 @@ void
buried_alive(p)
struct proc *p;
{
kprintf("Ok major screw up detected on kernel stack\n");
kprintf("Putting the process down to minimise further trashing\n");
kprintf("Process was %08x pid=%d comm=%s\n", (u_int) p, p->p_pid, p->p_comm);
printf("Ok major screw up detected on kernel stack\n");
printf("Putting the process down to minimise further trashing\n");
printf("Process was %08x pid=%d comm=%s\n", (u_int) p, p->p_pid, p->p_comm);
}
#else
@ -305,7 +305,7 @@ void
postmortem(frame)
trapframe_t *frame;
{
kprintf("No postmortem support compiled in\n");
printf("No postmortem support compiled in\n");
}
void
@ -321,14 +321,14 @@ traceback_sym(lr, pc)
u_int pc;
{
#ifdef DDB
kprintf("fp->lr=%08x fp->pc=%08x\n", lr, pc);
/* kprintf("fp->lr=");
printf("fp->lr=%08x fp->pc=%08x\n", lr, pc);
/* printf("fp->lr=");
db_printsym((db_addr_t)(lr), DB_STGY_ANY);
kprintf(" fp->pc=");
printf(" fp->pc=");
db_printsym((db_addr_t)(pc), DB_STGY_ANY);
kprintf("\n");*/
printf("\n");*/
#else
kprintf("fp->lr=%08x fp->pc=%08x\n", lr, pc);
printf("fp->lr=%08x fp->pc=%08x\n", lr, pc);
#endif
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: stubs.c,v 1.9 1996/10/11 00:06:55 christos Exp $ */
/* $NetBSD: stubs.c,v 1.10 1996/10/13 03:05:58 christos Exp $ */
/*
* Copyright (c) 1994,1995 Mark Brinicombe.
@ -317,16 +317,16 @@ dumpsys()
if (dumpsize == 0)
return;
}
kprintf("\ndumping to dev %x, offset %d\n", (u_int)dumpdev,
printf("\ndumping to dev %x, offset %d\n", (u_int)dumpdev,
(u_int)dumplo);
blkno = dumplo;
dumpspace = page_hook0.va;
psize = (*bdevsw[major(dumpdev)].d_psize)(dumpdev);
kprintf("dump ");
printf("dump ");
if (psize == -1) {
kprintf("area unavailable\n");
printf("area unavailable\n");
return;
}
@ -354,30 +354,30 @@ dumpsys()
switch (error) {
case ENXIO:
kprintf("device bad\n");
printf("device bad\n");
break;
case EFAULT:
kprintf("device not ready\n");
printf("device not ready\n");
break;
case EINVAL:
kprintf("area improper\n");
printf("area improper\n");
break;
case EIO:
kprintf("i/o error\n");
printf("i/o error\n");
break;
case EINTR:
kprintf("aborted from console\n");
printf("aborted from console\n");
break;
default:
kprintf("succeeded\n");
printf("succeeded\n");
break;
}
kprintf("\n\n");
printf("\n\n");
delay(1000000);
}
@ -422,9 +422,9 @@ set_spl_masks()
void
dump_spl_masks()
{
kprintf("spl0=%08x splsoft=%08x splbio=%08x splnet=%08x\n",
printf("spl0=%08x splsoft=%08x splbio=%08x splnet=%08x\n",
spl_masks[SPL_0], spl_masks[SPL_SOFT], spl_masks[SPL_BIO], spl_masks[SPL_NET]);
kprintf("spltty=%08x splclock=%08x splimp=%08x splhigh=%08x\n",
printf("spltty=%08x splclock=%08x splimp=%08x splhigh=%08x\n",
spl_masks[SPL_TTY], spl_masks[SPL_CLOCK], spl_masks[SPL_IMP], spl_masks[SPL_HIGH]);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_machdep.c,v 1.3 1996/10/11 00:06:56 christos Exp $ */
/* $NetBSD: sys_machdep.c,v 1.4 1996/10/13 03:05:59 christos Exp $ */
/*
* Copyright (c) 1995 Mark Brinicombe.
@ -66,7 +66,7 @@ sys_sysarch(p, v, retval)
syscallarg(char *) parms;
} */ *uap = v;
kprintf("sys_sysarch: Currently stoned - Cannot support the operation (%d)\n",
printf("sys_sysarch: Currently stoned - Cannot support the operation (%d)\n",
SCARG(uap, op));
return(EINVAL);

View File

@ -1,4 +1,4 @@
/* $NetBSD: syscall.c,v 1.7 1996/10/11 00:06:57 christos Exp $ */
/* $NetBSD: syscall.c,v 1.8 1996/10/13 03:05:59 christos Exp $ */
/*
* Copyright (c) 1994,1995 Mark Brinicombe.
@ -147,12 +147,12 @@ syscall(frame, code)
u_int s;
s = splhigh();
kprintf("swi code = %08x %d\n", code, code);
printf("swi code = %08x %d\n", code, code);
postmortem(frame);
kprintf("nkt: syscall in kernel mode !\n");
printf("nkt: syscall in kernel mode !\n");
#ifdef CONTINUE_AFTER_SYSCALL_BUG
kprintf("The system should now be considered very unstable :-(\n");
printf("The system should now be considered very unstable :-(\n");
sigexit(curproc, SIGILL);
/* Not reached */
@ -184,15 +184,15 @@ syscall(frame, code)
#ifdef ARM700BUGTRACK
int loop;
kprintf("ARM700 just stumbled at 0x%08x\n", frame->tf_pc - 4);
kprintf("Code leading up to this was\n");
printf("ARM700 just stumbled at 0x%08x\n", frame->tf_pc - 4);
printf("Code leading up to this was\n");
for (loop = frame->tf_pc - 32; loop < frame->tf_pc; loop += 4)
disassemble(loop);
dumpframe(frame);
kprintf("CPU ID=%08x\n", cpu_id());
kprintf("MMU Fault address=%08x status=%08x\n", cpu_faultaddress(), cpu_faultstatus());
kprintf("Page table entry for 0x%08x at 0x%08x = 0x%08x\n", frame->tf_pc - 4, vtopte(frame->tf_pc - 4),
printf("CPU ID=%08x\n", cpu_id());
printf("MMU Fault address=%08x status=%08x\n", cpu_faultaddress(), cpu_faultstatus());
printf("Page table entry for 0x%08x at 0x%08x = 0x%08x\n", frame->tf_pc - 4, vtopte(frame->tf_pc - 4),
*vtopte(frame->tf_pc - 4));
#endif
@ -211,7 +211,7 @@ syscall(frame, code)
if ((GetCPSR() & PSR_MODE) != PSR_SVC32_MODE) {
splhigh();
kprintf("swi code = %08x %d\n", code, code);
printf("swi code = %08x %d\n", code, code);
postmortem(frame);
panic("syscall in non SVC mode !");
}
@ -236,7 +236,7 @@ syscall(frame, code)
regparams = 4;
if (pmap_debug_level >= -1)
kprintf("\x1b[31mSYSCALL\x1b[0m: code=%08x lr=%08x pid=%d\n",
printf("\x1b[31mSYSCALL\x1b[0m: code=%08x lr=%08x pid=%d\n",
code, frame->tf_pc, p->p_pid);
nsys = p->p_emul->e_nsysent;
@ -244,12 +244,12 @@ syscall(frame, code)
switch (code) {
case 0x1002:
kprintf((char *)frame->tf_r0, frame->tf_r1, frame->tf_r2, frame->tf_r3);
printf((char *)frame->tf_r0, frame->tf_r1, frame->tf_r2, frame->tf_r3);
SYSCALL_SPECIAL_RETURN;
break;
case 0x1003:
kprintf("%s", (char *)frame->tf_r0);
printf("%s", (char *)frame->tf_r0);
SYSCALL_SPECIAL_RETURN;
break;
@ -303,14 +303,14 @@ syscall(frame, code)
frame->tf_r0 = pmap_next_phys_page(frame->tf_r1);
break;*/
default:
kprintf("Unknown SYS_special call (%d)\n", frame->tf_r0);
printf("Unknown SYS_special call (%d)\n", frame->tf_r0);
break;
}
SYSCALL_SPECIAL_RETURN;
break;
case 0x100a:
kprintf("Warning: This syscall is about to be revoked (0x100a)\n");
printf("Warning: This syscall is about to be revoked (0x100a)\n");
frame->tf_r0 = pmap_page_attributes(frame->tf_r0);
SYSCALL_SPECIAL_RETURN;
break;
@ -342,7 +342,7 @@ syscall(frame, code)
caller = (void *)frame->tf_r0;
frame->tf_r0 = (*caller)(kprintf, install_coproc_handler);
frame->tf_r0 = (*caller)(printf, install_coproc_handler);
}
SYSCALL_SPECIAL_RETURN;
break;
@ -378,7 +378,7 @@ syscall(frame, code)
{ struct vnode *vp;
vp = (struct vp *)frame->tf_r0;
if (vp->v_numoutput > 0 && vp->v_usecount == 0 && vp->v_writecount == 0) {
kprintf("Patching vnode %08x\n", vp);
printf("Patching vnode %08x\n", vp);
vprint(NULL, vp);
if (--vp->v_numoutput < 0)
panic("vwakeup: neg numoutput");
@ -395,7 +395,7 @@ syscall(frame, code)
{ struct vnode *vp;
vp = (struct vp *)frame->tf_r0;
if (vp->v_numoutput == 0 && vp->v_usecount == 0 && vp->v_writecount == 0) {
kprintf("Patching vnode %08x\n", vp);
printf("Patching vnode %08x\n", vp);
vprint(NULL, vp);
if ((vp->v_flag & VBWAIT) && vp->v_numoutput <= 0) {
vp->v_flag &= ~VBWAIT;
@ -462,7 +462,7 @@ syscall(frame, code)
code = ReadWord(params);
params += sizeof(int);
regparams -= 1;
kprintf("SYS_syscall: code=%d %02x", code, code);
printf("SYS_syscall: code=%d %02x", code, code);
break;
case SYS___syscall:
@ -488,7 +488,7 @@ syscall(frame, code)
callp += code;
if (callp->sy_call == sys_nosys) {
kprintf("SYSCALL: nosys code=%08x lr=%08x proc=%08x pid=%d %s\n",
printf("SYSCALL: nosys code=%08x lr=%08x proc=%08x pid=%d %s\n",
code, frame->tf_pc, (u_int)p, p->p_pid, p->p_comm);
postmortem(frame);
#ifdef POSTMORTEM

View File

@ -1,4 +1,4 @@
/* $NetBSD: undefined.c,v 1.4 1996/10/11 00:06:59 christos Exp $ */
/* $NetBSD: undefined.c,v 1.5 1996/10/13 03:06:00 christos Exp $ */
/*
* Copyright (c) 1995 Mark Brinicombe.
@ -172,10 +172,10 @@ undefinedinstruction(frame)
if ((p = curproc) == 0)
p = &proc0;
/* kprintf("fault in process %08x %d\n", p, p->p_pid);*/
/* printf("fault in process %08x %d\n", p, p->p_pid);*/
if ((frame->tf_spsr & PSR_MODE) == PSR_USR32_MODE) {
/* kprintf("USR32 mode : %08x\n", frame->tf_spsr);*/
/* printf("USR32 mode : %08x\n", frame->tf_spsr);*/
sticks = p->p_sticks;
/* Modify the fault_code to reflect the USR/SVC state at time of fault */
@ -201,7 +201,7 @@ undefinedinstruction(frame)
/*
s = splhigh();
kprintf("Coprocessor number %d instruction fault\n", coprocessor);
printf("Coprocessor number %d instruction fault\n", coprocessor);
(void)splx(s);
*/
@ -210,26 +210,26 @@ undefinedinstruction(frame)
s = splhigh();
if ((fault_instruction & 0x0f000010) == 0x0e000000) {
kprintf("CDP\n");
printf("CDP\n");
disassemble(fault_pc);
}
else if ((fault_instruction & 0x0e000000) == 0x0c000000) {
kprintf("LDC/STC\n");
printf("LDC/STC\n");
disassemble(fault_pc);
}
else if ((fault_instruction & 0x0f000010) == 0x0e000010) {
kprintf("MRC/MCR\n");
printf("MRC/MCR\n");
disassemble(fault_pc);
}
else {
kprintf("Undefined instruction\n");
printf("Undefined instruction\n");
disassemble(fault_pc);
}
(void)splx(s);
if ((fault_code & FAULT_USER) == 0) {
kprintf("Undefined instruction in kernel: Heavy man !\n");
printf("Undefined instruction in kernel: Heavy man !\n");
postmortem(frame);
}
@ -314,8 +314,8 @@ resethandler(frame)
postmortem(frame);
#ifdef CONTINUE_AFTER_RESET_BUG
kprintf("Branch throuh zero\n");
kprintf("The system should now be considered very unstable :-)\n");
printf("Branch throuh zero\n");
printf("The system should now be considered very unstable :-)\n");
sigexit(curproc, SIGILL);
#ifdef VALIDATE_TRAPFRAME

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_machdep.c,v 1.8 1996/10/11 00:07:00 christos Exp $ */
/* $NetBSD: vm_machdep.c,v 1.9 1996/10/13 03:06:01 christos Exp $ */
/*
* Copyright (c) 1994-1996 Mark Brinicombe.
@ -122,7 +122,7 @@ cpu_fork(p1, p2)
#ifdef DEBUG_VMMACHDEP
if (pmap_debug_level >= 0)
kprintf("cpu_fork: %08x %08x %08x %08x\n", (u_int)p1, (u_int)p2,
printf("cpu_fork: %08x %08x %08x %08x\n", (u_int)p1, (u_int)p2,
(u_int) curproc, (u_int)&proc0);
#endif
@ -163,11 +163,11 @@ cpu_fork(p1, p2)
#ifdef DEBUG_VMMACHDEP
if (pmap_debug_level >= 0) {
kprintf("cpu_fork: pcb = %08x pagedir = %08x\n",
printf("cpu_fork: pcb = %08x pagedir = %08x\n",
(u_int)&up->u_pcb, (u_int)up->u_pcb.pcb_pagedir);
kprintf("p1->procaddr=%08x p1->procaddr->u_pcb=%08x pid=%d pmap=%08x\n",
printf("p1->procaddr=%08x p1->procaddr->u_pcb=%08x pid=%d pmap=%08x\n",
(u_int)p1->p_addr, (u_int)&p1->p_addr->u_pcb, p1->p_pid, (u_int)&p1->p_vmspace->vm_pmap);
kprintf("p2->procaddr=%08x p2->procaddr->u_pcb=%08x pid=%d pmap=%08x\n",
printf("p2->procaddr=%08x p2->procaddr->u_pcb=%08x pid=%d pmap=%08x\n",
(u_int)p2->p_addr, (u_int)&p2->p_addr->u_pcb, p2->p_pid, (u_int)&p2->p_vmspace->vm_pmap);
}
#endif
@ -186,9 +186,9 @@ cpu_fork(p1, p2)
#ifdef DEBUG_VMMACHDEP
if (pmap_debug_level >= 0) {
kprintf("fun time: paging in PT %08x for %08x\n", (u_int)addr, 0);
kprintf("p2->p_vmspace->vm_pmap.pm_pdir[0] = %08x\n", p2->p_vmspace->vm_pmap.pm_pdir[0]);
kprintf("p2->pm_vptpt[0] = %08x", *((int *)(p2->p_vmspace->vm_pmap.pm_vptpt + 0)));
printf("fun time: paging in PT %08x for %08x\n", (u_int)addr, 0);
printf("p2->p_vmspace->vm_pmap.pm_pdir[0] = %08x\n", p2->p_vmspace->vm_pmap.pm_pdir[0]);
printf("p2->pm_vptpt[0] = %08x", *((int *)(p2->p_vmspace->vm_pmap.pm_vptpt + 0)));
}
#endif
@ -205,7 +205,7 @@ cpu_fork(p1, p2)
#ifdef DEBUG_VMMACHDEP
if (pmap_debug_level >= 0) {
kprintf("vm_map_pageable: addr=%08x\n", (u_int)addr);
printf("vm_map_pageable: addr=%08x\n", (u_int)addr);
}
#endif
@ -215,9 +215,9 @@ cpu_fork(p1, p2)
#ifdef DEBUG_VMMACHDEP
if (pmap_debug_level >= 0) {
kprintf("party on! acquired a page table for 0M->(4M-1)\n");
kprintf("p2->p_vmspace->vm_pmap.pm_pdir[0] = %08x\n", p2->p_vmspace->vm_pmap.pm_pdir[0]);
kprintf("p2->pm_vptpt[0] = %08x", *((int *)(p2->p_vmspace->vm_pmap.pm_vptpt + 0)));
printf("party on! acquired a page table for 0M->(4M-1)\n");
printf("p2->p_vmspace->vm_pmap.pm_pdir[0] = %08x\n", p2->p_vmspace->vm_pmap.pm_pdir[0]);
printf("p2->pm_vptpt[0] = %08x", *((int *)(p2->p_vmspace->vm_pmap.pm_vptpt + 0)));
}
#endif
@ -293,7 +293,7 @@ cpu_exit(p)
}
*/
/* kprintf("cpu_exit: proc=%08x pid=%d comm=%s\n", p, p->p_pid, p->p_comm);*/
/* printf("cpu_exit: proc=%08x pid=%d comm=%s\n", p, p->p_pid, p->p_comm);*/
cnt.v_swtch++;
@ -309,13 +309,13 @@ cpu_swapin(p)
#ifdef DEBUG_VMMACHDEP
if (pmap_debug_level >= 0)
kprintf("cpu_swapin(%08x, %d, %s, %08x)\n", (u_int)p, p->p_pid, p->p_comm, (u_int)&p->p_vmspace->vm_pmap);
printf("cpu_swapin(%08x, %d, %s, %08x)\n", (u_int)p, p->p_pid, p->p_comm, (u_int)&p->p_vmspace->vm_pmap);
#endif
#ifdef FREESWAPPEDPAGEDIRS
kprintf("cpu_swapin(%08x, %d, %s, %08x)\n", (u_int)p, p->p_pid, p->p_comm, (u_int)&p->p_vmspace->vm_pmap);
printf("cpu_swapin(%08x, %d, %s, %08x)\n", (u_int)p, p->p_pid, p->p_comm, (u_int)&p->p_vmspace->vm_pmap);
if (p->p_vmspace->vm_pmap.pm_pdir)
kprintf("pdir = %08x\n", p->p_vmspace->vm_pmap.pm_pdir);
printf("pdir = %08x\n", p->p_vmspace->vm_pmap.pm_pdir);
pmap_pinit(&p->p_vmspace->vm_pmap);
pmap_debug_level = 10;
#endif
@ -326,9 +326,9 @@ cpu_swapin(p)
#ifdef DEBUG_VMMACHDEP
if (pmap_debug_level >= 0) {
kprintf("fun time: paging in PT %08x for %08x\n", (u_int)addr, 0);
kprintf("p->p_vmspace->vm_pmap.pm_pdir[0] = %08x\n", p->p_vmspace->vm_pmap.pm_pdir[0]);
kprintf("p->pm_vptpt[0] = %08x", *((int *)(p->p_vmspace->vm_pmap.pm_vptpt + 0)));
printf("fun time: paging in PT %08x for %08x\n", (u_int)addr, 0);
printf("p->p_vmspace->vm_pmap.pm_pdir[0] = %08x\n", p->p_vmspace->vm_pmap.pm_pdir[0]);
printf("p->pm_vptpt[0] = %08x", *((int *)(p->p_vmspace->vm_pmap.pm_vptpt + 0)));
}
#endif
@ -338,9 +338,9 @@ cpu_swapin(p)
#ifdef DEBUG_VMMACHDEP
if (pmap_debug_level >= 0) {
kprintf("party on! acquired a page table for 0M->(4M-1)\n");
kprintf("p->p_vmspace->vm_pmap.pm_pdir[0] = %08x\n", p->p_vmspace->vm_pmap.pm_pdir[0]);
kprintf("p->pm_vptpt[0] = %08x", *((int *)(p->p_vmspace->vm_pmap.pm_vptpt + 0)));
printf("party on! acquired a page table for 0M->(4M-1)\n");
printf("p->p_vmspace->vm_pmap.pm_pdir[0] = %08x\n", p->p_vmspace->vm_pmap.pm_pdir[0]);
printf("p->pm_vptpt[0] = %08x", *((int *)(p->p_vmspace->vm_pmap.pm_vptpt + 0)));
}
#endif
@ -357,8 +357,8 @@ cpu_swapout(p)
{
#ifdef DEBUG_VMMACHDEP
if (pmap_debug_level >= 0) {
kprintf("cpu_swapout(%08x, %d, %s, %08x)\n", (u_int)p, p->p_pid, p->p_comm, (u_int)&p->p_vmspace->vm_pmap);
kprintf("p->pm_vptpt[0] = %08x", *((int *)(p->p_vmspace->vm_pmap.pm_vptpt + 0)));
printf("cpu_swapout(%08x, %d, %s, %08x)\n", (u_int)p, p->p_pid, p->p_comm, (u_int)&p->p_vmspace->vm_pmap);
printf("p->pm_vptpt[0] = %08x", *((int *)(p->p_vmspace->vm_pmap.pm_vptpt + 0)));
}
#endif
@ -367,8 +367,8 @@ cpu_swapout(p)
pmap_remove(&p->p_vmspace->vm_pmap, 0, NBPG);
#ifdef FREESWAPPEDPAGEDIRS
kprintf("cpu_swapout(%08x, %d, %s, %08x)\n", (u_int)p, p->p_pid, p->p_comm, (u_int)&p->p_vmspace->vm_pmap);
kprintf("p->pm_vptpt[0] = %08x pdir=%08x\n", *((int *)(p->p_vmspace->vm_pmap.pm_vptpt + 0)), p->p_vmspace->vm_pmap.pm_pdir);
printf("cpu_swapout(%08x, %d, %s, %08x)\n", (u_int)p, p->p_pid, p->p_comm, (u_int)&p->p_vmspace->vm_pmap);
printf("p->pm_vptpt[0] = %08x pdir=%08x\n", *((int *)(p->p_vmspace->vm_pmap.pm_vptpt + 0)), p->p_vmspace->vm_pmap.pm_pdir);
pmap_freepagedir(&p->p_vmspace->vm_pmap);
p->p_vmspace->vm_pmap.pm_pdir = 0;
#endif
@ -395,7 +395,7 @@ pagemove(from, to, size)
#ifdef DEBUG_VMMACHDEP
if (pmap_debug_level >= 0)
kprintf("pagemove: V%08x to %08x size %08x\n", (u_int)from,
printf("pagemove: V%08x to %08x size %08x\n", (u_int)from,
(u_int)to, size);
#endif
fpte = vtopte(from);
@ -442,7 +442,7 @@ vmapbuf(bp, len)
pt_entry_t *pmap_pte __P((pmap_t, vm_offset_t));
if (pmap_debug_level >= 0)
kprintf("vmapbuf: bp=%08x buf=%08x len=%08x\n", (u_int)bp,
printf("vmapbuf: bp=%08x buf=%08x len=%08x\n", (u_int)bp,
(u_int)bp->b_data, (u_int)len);
if ((bp->b_flags & B_PHYS) == 0)
@ -484,7 +484,7 @@ vunmapbuf(bp, len)
vm_offset_t addr, off;
if (pmap_debug_level >= 0)
kprintf("vunmapbuf: bp=%08x buf=%08x len=%08x\n",
printf("vunmapbuf: bp=%08x buf=%08x len=%08x\n",
(u_int)bp, (u_int)bp->b_data, (u_int)len);
if ((bp->b_flags & B_PHYS) == 0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: com.c,v 1.9 1996/10/11 00:07:13 christos Exp $ */
/* $NetBSD: com.c,v 1.10 1996/10/13 03:06:11 christos Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995, 1996
@ -301,11 +301,11 @@ comattach(parent, self, aux)
if (ISSET(bus_io_read_1(bc, ioh, com_iir), IIR_FIFO_MASK) == IIR_FIFO_MASK)
if (ISSET(bus_io_read_1(bc, ioh, com_fifo), FIFO_TRIGGER_14) == FIFO_TRIGGER_14) {
SET(sc->sc_hwflags, COM_HW_FIFO);
kprintf(": ns16550a, working fifo\n");
printf(": ns16550a, working fifo\n");
} else
kprintf(": ns16550, broken fifo\n");
printf(": ns16550, broken fifo\n");
else
kprintf(": ns8250 or ns16450, no fifo\n");
printf(": ns8250 or ns16450, no fifo\n");
bus_io_write_1(bc, ioh, com_fifo, 0);
/* disable interrupts */
@ -332,10 +332,10 @@ comattach(parent, self, aux)
* Print prefix of device name,
* let kgdb_connect print the rest.
*/
kprintf("%s: ", sc->sc_dev.dv_xname);
printf("%s: ", sc->sc_dev.dv_xname);
kgdb_connect(1);
} else
kprintf("%s: kgdb enabled\n",
printf("%s: kgdb enabled\n",
sc->sc_dev.dv_xname);
}
}
@ -343,7 +343,7 @@ comattach(parent, self, aux)
/* XXX maybe move up some? */
if (ISSET(sc->sc_hwflags, COM_HW_CONSOLE))
kprintf("%s: console\n", sc->sc_dev.dv_xname);
printf("%s: console\n", sc->sc_dev.dv_xname);
}
int
@ -1049,7 +1049,7 @@ comintr(arg)
data = bus_io_read_1(bc, ioh, com_data);
if (ISSET(lsr, LSR_BI)) {
#ifdef notdef
kprintf("break %02x %02x %02x %02x\n",
printf("break %02x %02x %02x %02x\n",
sc->sc_msr, sc->sc_mcr, sc->sc_lcr,
sc->sc_dtr);
#endif
@ -1089,7 +1089,7 @@ comintr(arg)
}
#ifdef COM_DEBUG
else if (ISSET(lsr, LSR_BI|LSR_FE|LSR_PE|LSR_OE))
kprintf("weird lsr %02x\n", lsr);
printf("weird lsr %02x\n", lsr);
#endif
#ifdef COM_DEBUG
@ -1132,16 +1132,16 @@ comintr(arg)
}
#ifdef COM_DEBUG
ohfudge:
kprintf("comintr: too many iterations");
printf("comintr: too many iterations");
for (n = 0; n < 32; n++) {
if ((n % 4) == 0)
kprintf("\ncomintr: iter[%02d]", n);
kprintf(" %02x %02x %02x", iter[n].iir, iter[n].lsr, iter[n].msr);
printf("\ncomintr: iter[%02d]", n);
printf(" %02x %02x %02x", iter[n].iir, iter[n].lsr, iter[n].msr);
}
kprintf("\n");
kprintf("comintr: msr %02x mcr %02x lcr %02x ier %02x\n",
printf("\n");
printf("comintr: msr %02x mcr %02x lcr %02x ier %02x\n",
sc->sc_msr, sc->sc_mcr, sc->sc_lcr, sc->sc_ier);
kprintf("comintr: state %08x cc %d\n", sc->sc_tty->t_state,
printf("comintr: state %08x cc %d\n", sc->sc_tty->t_state,
sc->sc_tty->t_outq.c_cc);
#endif
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: debugconsole.c,v 1.2 1996/03/18 19:33:04 mark Exp $ */
/* $NetBSD: debugconsole.c,v 1.3 1996/10/13 03:06:03 christos Exp $ */
/*
* Copyright (c) 1994-1995 Melvyn Tang-Richardson
@ -79,7 +79,7 @@ dprintf(fmt, va_alist)
return;
va_start(ap, fmt);
kprintf(fmt, TOTTY, debug_tty, ap);
printf(fmt, TOTTY, debug_tty, ap);
va_end(ap);
*/
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: iic.c,v 1.4 1996/10/11 00:07:19 christos Exp $ */
/* $NetBSD: iic.c,v 1.5 1996/10/13 03:06:19 christos Exp $ */
/*
* Copyright (c) 1994-1996 Mark Brinicombe.
@ -252,7 +252,7 @@ iicmatch(parent, match, aux)
return(1);
break;
default:
kprintf("iic: Unknown IOMD id=%04x", id);
printf("iic: Unknown IOMD id=%04x", id);
break;
}
@ -268,7 +268,7 @@ iicprint(aux, name)
if (!name) {
if (ib->ib_addr)
kprintf(" addr 0x%02x", ib->ib_addr);
printf(" addr 0x%02x", ib->ib_addr);
}
/* XXXX print flags */
@ -304,7 +304,7 @@ iicattach(parent, self, aux)
{
struct iicbus_attach_args iaa;
kprintf("\n");
printf("\n");
while (config_found_sm(self, &iaa, iicprint, iicsubmatch));
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: kbd.c,v 1.12 1996/10/11 00:07:22 christos Exp $ */
/* $NetBSD: kbd.c,v 1.13 1996/10/13 03:06:22 christos Exp $ */
/*
* Copyright (c) 1994 Mark Brinicombe.
@ -682,7 +682,7 @@ kbdprobe(parent, match, aux)
return(1);
break;
default:
kprintf("kbd: Unknown IOMD id=%04x", id);
printf("kbd: Unknown IOMD id=%04x", id);
break;
}
@ -702,9 +702,9 @@ kbdattach(parent, self, aux)
error = kbdreset();
if (error == 1)
kprintf(": Cannot enable keyboard");
printf(": Cannot enable keyboard");
else if (error == 2)
kprintf(": No keyboard present");
printf(": No keyboard present");
sc->sc_iobase = mb->mb_iobase;
@ -715,7 +715,7 @@ kbdattach(parent, self, aux)
if (irq_claim(IRQ_KBDRX, &sc->sc_ih))
panic("Cannot claim IRQ for kbd%d\n", sc->sc_device.dv_unit);
kprintf("\n");
printf("\n");
}
@ -941,7 +941,7 @@ kbdcmd(cmd)
delay(200);
}
if (i == 0)
kprintf("kbd: transmit not ready\n");
printf("kbd: transmit not ready\n");
outb(IOMD_KBDDAT, cmd);
delay(200);
@ -968,7 +968,7 @@ kbdcmd(cmd)
if (retry)
kbd_flush_input();
}
kprintf("kbd: command failed, cmd = %02x, status = %02x\n", cmd, c);
printf("kbd: command failed, cmd = %02x, status = %02x\n", cmd, c);
return(1);
}
@ -1106,7 +1106,7 @@ getkey_polled()
up = (code & 0x100);
key = code & 0xff;
/* kprintf("code=%04x mod=%04x\n", code, modifiers);*/
/* printf("code=%04x mod=%04x\n", code, modifiers);*/
/* By default we use the main keycode lookup table */
@ -1227,7 +1227,7 @@ int
PollKeyboard(code)
int code;
{
/* kprintf("%02x.", code);*/
/* printf("%02x.", code);*/
/*
* Set the keyup flag if this is the release code.
@ -1248,7 +1248,7 @@ PollKeyboard(code)
/* If it is a resend code note it down */
if (code == KBR_RESEND) {
kprintf("kbd:resend\n");
printf("kbd:resend\n");
kbd_resend = 1;
return(0);
}
@ -1256,7 +1256,7 @@ PollKeyboard(code)
/* If it is an ack code note it down */
if (code == KBR_ACK) {
/* kprintf("kbd:ack\n");*/
/* printf("kbd:ack\n");*/
kbd_ack = 1;
return(0);
}
@ -1282,7 +1282,7 @@ PollKeyboard(code)
return(0);
}
/* kprintf("%02x:%02x.", code, flags);*/
/* printf("%02x:%02x.", code, flags);*/
/* Mark the code appropriately if it is part of an E0 sequence */
@ -1411,7 +1411,7 @@ kbddecodekey(sc, code)
/* if (key == 0) {
char err[80];
ksprintf(err, "\n\rUnknown keycode %04x\n\r", code);
sprintf(err, "\n\rUnknown keycode %04x\n\r", code);
dprintf(err);
}*/
@ -1477,16 +1477,16 @@ kbddecodekey(sc, code)
break;
#endif
case 0x21b:
kprintf("Kernel interruption\n");
printf("Kernel interruption\n");
boot(RB_HALT, NULL);
break;
case 0x209:
kprintf("Kernel interruption - nosync\n");
printf("Kernel interruption - nosync\n");
boot(RB_NOSYNC | RB_HALT, NULL);
break;
default:
kprintf("Special key %04x\n", key);
printf("Special key %04x\n", key);
break;
}
} else {

View File

@ -1,4 +1,4 @@
/* $NetBSD: lpt.c,v 1.10 1996/10/11 00:07:23 christos Exp $ */
/* $NetBSD: lpt.c,v 1.11 1996/10/13 03:06:24 christos Exp $ */
/*
* Copyright (c) 1994 Matthias Pfaller.
@ -117,7 +117,7 @@
#if !defined(DEBUG) || !defined(notdef)
#define LPRINTF(a)
#else
#define LPRINTF if (lptdebug) kprintf a
#define LPRINTF if (lptdebug) printf a
int lptdebug = 1;
#endif
@ -290,7 +290,7 @@ lptprobe(parent, match, aux)
int i, rv;
#ifdef DEBUG
#define ABORT do {kprintf("lptprobe: mask %x data %x failed\n", mask, data); \
#define ABORT do {printf("lptprobe: mask %x data %x failed\n", mask, data); \
goto out;} while (0)
#else
#define ABORT goto out
@ -347,9 +347,9 @@ lptattach(parent, self, aux)
bus_io_handle_t ioh;
if (mb->mb_irq != IRQUNK)
kprintf("\n");
printf("\n");
else
kprintf(": polled\n");
printf(": polled\n");
sc->sc_iobase = mb->mb_iobase;
sc->sc_irq = mb->mb_irq;
@ -377,7 +377,7 @@ lptattach(parent, self, aux)
}
#if defined(INET) && defined(PLIP)
else
kprintf("Warning PLIP device needs an interrupt driven lpt driver\n");
printf("Warning PLIP device needs an interrupt driven lpt driver\n");
#endif
}
@ -412,7 +412,7 @@ lptopen(dev, flag, mode, p)
#ifdef DIAGNOSTIC
if (sc->sc_state)
kprintf("%s: stat=0x%x not zero\n", sc->sc_dev.dv_xname,
printf("%s: stat=0x%x not zero\n", sc->sc_dev.dv_xname,
sc->sc_state);
#endif
@ -724,7 +724,7 @@ plipattach(struct lpt_softc *sc, int unit)
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
sc->sc_ifbuf = NULL;
ksprintf(ifp->if_xname, "plip%d", unit);
sprintf(ifp->if_xname, "plip%d", unit);
ifp->if_softc = sc;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS;
ifp->if_output = ether_output;
@ -738,7 +738,7 @@ plipattach(struct lpt_softc *sc, int unit)
ifp->if_mtu = PLIPMTU;
sc->sc_ifsoftint = IRQMASK_SOFTPLIP;
kprintf("plip%d at lpt%d: mtu=%d,%d,%d", unit, unit, (int) ifp->if_mtu,
printf("plip%d at lpt%d: mtu=%d,%d,%d", unit, unit, (int) ifp->if_mtu,
ifp->if_hdrlen, ifp->if_addrlen);
if_attach(ifp);
@ -760,8 +760,8 @@ plipioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
int error = 0;
#if PLIP_DEBUG > 0
kprintf("plipioctl: cmd=%08lx ifp=%08x data=%08x\n", cmd, (u_int)ifp, (u_int)data);
kprintf("plipioctl: ifp->flags=%08x\n", ifp->if_flags);
printf("plipioctl: cmd=%08lx ifp=%08x data=%08x\n", cmd, (u_int)ifp, (u_int)data);
printf("plipioctl: ifp->flags=%08x\n", ifp->if_flags);
#endif
switch (cmd) {
@ -773,7 +773,7 @@ plipioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
/* Deactive the parallel port */
#if PLIP_DEBUG != 0
if (plip_debug & PLIP_DEBUG_IF)
kprintf("plip: Disabling lpt irqs\n");
printf("plip: Disabling lpt irqs\n");
#endif
bus_io_write_1(bc, ioh, lpt_data, 0x00);
bus_io_write_1(bc, ioh, lpt_control, PLIP_INTR_DISABLE);
@ -801,7 +801,7 @@ plipioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
#if PLIP_DEBUG != 0
if (plip_debug & PLIP_DEBUG_IF)
kprintf("plip: Enabling lpt irqs\n");
printf("plip: Enabling lpt irqs\n");
#endif
bus_io_write_1(bc, ioh, lpt_data, 0x00);
@ -851,7 +851,7 @@ plipioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
#if PLIP_DEBUG != 0
if (plip_debug & PLIP_DEBUG_IF)
kprintf("plip: Enabling lpt irqs\n");
printf("plip: Enabling lpt irqs\n");
#endif
bus_io_write_1(bc, ioh, lpt_data, 0x00);
bus_io_write_1(bc, ioh, lpt_control, PLIP_INTR_ENABLE);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ncr5380sbc.c,v 1.5 1996/10/11 00:07:42 christos Exp $ */
/* $NetBSD: ncr5380sbc.c,v 1.6 1996/10/13 03:06:44 christos Exp $ */
/*
* Copyright (c) 1996 Melvin Tang-Richardson (Modified for weird regs)
@ -133,7 +133,7 @@ static void ncr5380_machine __P((struct ncr5380_softc *));
#ifndef DDB
/* This is used only in recoverable places. */
#define Debugger() kprintf("Debug: ncr5380.c:%d\n", __LINE__)
#define Debugger() printf("Debug: ncr5380.c:%d\n", __LINE__)
#endif
#ifdef DEBUG
@ -537,13 +537,13 @@ ncr5380_cmd_timeout(arg)
/* Get all our variables... */
xs = sr->sr_xs;
if (xs == NULL) {
kprintf("ncr5380_cmd_timeout: no scsi_xfer\n");
printf("ncr5380_cmd_timeout: no scsi_xfer\n");
goto out;
}
sc_link = xs->sc_link;
sc = sc_link->adapter_softc;
kprintf("%s: cmd timeout, targ=%d, lun=%d\n",
printf("%s: cmd timeout, targ=%d, lun=%d\n",
sc->sc_dev.dv_xname,
sr->sr_target, sr->sr_lun);
@ -629,7 +629,7 @@ ncr5380_scsi_cmd(xs)
/* Terminate any current command. */
sr = sc->sc_current;
if (sr) {
kprintf("%s: polled request aborting %d/%d\n",
printf("%s: polled request aborting %d/%d\n",
sc->sc_dev.dv_xname,
sr->sr_target, sr->sr_lun);
ncr5380_abort(sc);
@ -761,7 +761,7 @@ ncr5380_done(sc)
case SCSI_CHECK:
if (sr->sr_flags & SR_SENSE) {
/* Sense command also asked for sense? */
kprintf("ncr5380_done: sense asked for sense\n");
printf("ncr5380_done: sense asked for sense\n");
NCR_BREAK();
xs->error = XS_DRIVER_STUFFUP;
break;
@ -785,7 +785,7 @@ ncr5380_done(sc)
/* This is our "impossible" initial value. */
/* fallthrough */
default:
kprintf("%s: target %d, bad status=%d\n",
printf("%s: target %d, bad status=%d\n",
sc->sc_dev.dv_xname, sr->sr_target, sr->sr_status);
xs->error = XS_DRIVER_STUFFUP;
break;
@ -909,7 +909,7 @@ next_job:
/* Lost the race! reselected out from under us! */
/* Work with the reselected job. */
if (sr->sr_flags & SR_IMMED) {
kprintf("%s: reselected while polling (abort)\n",
printf("%s: reselected while polling (abort)\n",
sc->sc_dev.dv_xname);
/* Abort the reselected job. */
sc->sc_state |= NCR_ABORTING;
@ -943,7 +943,7 @@ next_job:
case XS_BUSY:
/* XXX - Reset and try again. */
kprintf("%s: SCSI bus busy, resetting...\n",
printf("%s: SCSI bus busy, resetting...\n",
sc->sc_dev.dv_xname);
ncr5380_reset_scsibus(sc);
/* fallthrough */
@ -994,7 +994,7 @@ next_job:
* send and IDENDIFY message, and then expect CMD phase.
*/
if (ncr5380_debug & NCR_DBG_CMDS) {
kprintf("ncr5380_sched: begin, target=%d, LUN=%d\n",
printf("ncr5380_sched: begin, target=%d, LUN=%d\n",
xs->sc_link->target, xs->sc_link->lun);
ncr5380_show_scsi_cmd(xs);
}
@ -1008,7 +1008,7 @@ next_job:
#ifdef DIAGNOSTIC
if ((xs->flags & (SCSI_DATA_IN | SCSI_DATA_OUT)) == 0) {
if (sc->sc_dataptr) {
kprintf("%s: ptr but no data in/out flags?\n");
printf("%s: ptr but no data in/out flags?\n");
NCR_BREAK();
sc->sc_dataptr = NULL;
}
@ -1114,7 +1114,7 @@ ncr5380_reselect(sc)
break;
/* Probably never get here... */
if (--timo <= 0) {
kprintf("%s: reselect, BSY stuck, bus=0x%x\n",
printf("%s: reselect, BSY stuck, bus=0x%x\n",
sc->sc_dev.dv_xname, bus);
/* Not much we can do. Reset the bus. */
ncr5380_reset_scsibus(sc);
@ -1143,7 +1143,7 @@ ncr5380_reselect(sc)
* selected as a target? (I/O == 0)
*/
if ((bus & SCI_BUS_IO) == 0) {
kprintf("%s: selected as target, data=0x%x\n",
printf("%s: selected as target, data=0x%x\n",
sc->sc_dev.dv_xname, data);
/* Not much we can do. Reset the bus. */
ncr5380_reset_scsibus(sc);
@ -1159,7 +1159,7 @@ ncr5380_reselect(sc)
if ((data & 0x7F) != (1 << target)) {
/* No selecting ID? or >2 IDs on bus? */
kprintf("%s: bad reselect, data=0x%x\n",
printf("%s: bad reselect, data=0x%x\n",
sc->sc_dev.dv_xname, data);
return;
}
@ -1177,7 +1177,7 @@ ncr5380_reselect(sc)
if ((bus & SCI_BUS_SEL) == 0)
break; /* success */
if (--timo <= 0) {
kprintf("%s: reselect, SEL stuck, bus=0x%x\n",
printf("%s: reselect, SEL stuck, bus=0x%x\n",
sc->sc_dev.dv_xname, bus);
NCR_BREAK();
/* assume connected (fail later if not) */
@ -1201,14 +1201,14 @@ ncr5380_reselect(sc)
lun = 0;
/* Wait for REQ before reading bus phase. */
if (ncr5380_wait_req(sc)) {
kprintf("%s: reselect, no REQ\n",
printf("%s: reselect, no REQ\n",
sc->sc_dev.dv_xname);
/* Try to send an ABORT message. */
goto abort;
}
phase = SCI_BUS_PHASE(*sc->sci_bus_csr);
if (phase != PHASE_MSG_IN) {
kprintf("%s: reselect, phase=%d\n",
printf("%s: reselect, phase=%d\n",
sc->sc_dev.dv_xname, phase);
goto abort;
}
@ -1220,7 +1220,7 @@ ncr5380_reselect(sc)
/* Peek at the message byte without consuming it! */
msg = *(sc->sci_data);
if ((msg & 0x80) == 0) {
kprintf("%s: reselect, not identify, msg=%d\n",
printf("%s: reselect, not identify, msg=%d\n",
sc->sc_dev.dv_xname, msg);
goto abort;
}
@ -1259,7 +1259,7 @@ ncr5380_reselect(sc)
return;
}
kprintf("%s: phantom reselect: target=%d, LUN=%d\n",
printf("%s: phantom reselect: target=%d, LUN=%d\n",
sc->sc_dev.dv_xname, target, lun);
abort:
/*
@ -1722,7 +1722,7 @@ have_msg:
/* The ncr5380 can not do synchronous mode. */
goto reject;
default:
kprintf("%s: unrecognized MESSAGE EXTENDED; sending REJECT\n",
printf("%s: unrecognized MESSAGE EXTENDED; sending REJECT\n",
sc->sc_dev.dv_xname);
NCR_BREAK();
goto reject;
@ -1731,7 +1731,7 @@ have_msg:
default:
NCR_TRACE("msg_in: eh? imsg=0x%x\n", sc->sc_imess[0]);
kprintf("%s: unrecognized MESSAGE; sending REJECT\n",
printf("%s: unrecognized MESSAGE; sending REJECT\n",
sc->sc_dev.dv_xname);
NCR_BREAK();
/* fallthrough */
@ -1848,7 +1848,7 @@ nextmsg:
case SEND_IDENTIFY:
NCR_TRACE("msg_out: SEND_IDENTIFY\n", 0);
if (sr == NULL) {
kprintf("%s: SEND_IDENTIFY while not connected; sending NOOP\n",
printf("%s: SEND_IDENTIFY while not connected; sending NOOP\n",
sc->sc_dev.dv_xname);
NCR_BREAK();
goto noop;
@ -1896,7 +1896,7 @@ nextmsg:
break;
case 0:
kprintf("%s: unexpected MESSAGE OUT; sending NOOP\n",
printf("%s: unexpected MESSAGE OUT; sending NOOP\n",
sc->sc_dev.dv_xname);
NCR_BREAK();
noop:
@ -1906,7 +1906,7 @@ nextmsg:
break;
default:
kprintf("%s: weird MESSAGE OUT; sending NOOP\n",
printf("%s: weird MESSAGE OUT; sending NOOP\n",
sc->sc_dev.dv_xname);
NCR_BREAK();
goto noop;
@ -2039,7 +2039,7 @@ ncr5380_command(sc)
if (len != xs->cmdlen) {
#ifdef DEBUG
kprintf("ncr5380_command: short transfer: wanted %d got %d.\n",
printf("ncr5380_command: short transfer: wanted %d got %d.\n",
xs->cmdlen, len);
ncr5380_show_scsi_cmd(xs);
NCR_BREAK();
@ -2072,7 +2072,7 @@ ncr5380_data_xfer(sc, phase)
if (sr->sr_flags & SR_SENSE) {
NCR_TRACE("data_xfer: get sense, sr=0x%x\n", (long)sr);
if (phase != PHASE_DATA_IN) {
kprintf("%s: sense phase error\n", sc->sc_dev.dv_xname);
printf("%s: sense phase error\n", sc->sc_dev.dv_xname);
goto abort;
}
/* acknowledge phase change */
@ -2087,7 +2087,7 @@ ncr5380_data_xfer(sc, phase)
* When aborting a command, disallow any data phase.
*/
if (sc->sc_state & NCR_ABORTING) {
kprintf("%s: aborting, but phase=%s (reset)\n",
printf("%s: aborting, but phase=%s (reset)\n",
sc->sc_dev.dv_xname,
phase_names[phase & 7]);
return ACT_RESET_BUS; /* XXX */
@ -2097,14 +2097,14 @@ ncr5380_data_xfer(sc, phase)
expected_phase = (xs->flags & SCSI_DATA_OUT) ?
PHASE_DATA_OUT : PHASE_DATA_IN;
if (phase != expected_phase) {
kprintf("%s: data phase error\n",
printf("%s: data phase error\n",
sc->sc_dev.dv_xname);
goto abort;
}
/* Make sure we have some data to move. */
if (sc->sc_datalen <= 0) {
kprintf("%s: can not transfer more data\n",
printf("%s: can not transfer more data\n",
sc->sc_dev.dv_xname);
goto abort;
}
@ -2167,7 +2167,7 @@ ncr5380_status(sc)
if (len) {
sr->sr_status = status;
} else {
kprintf("ncr5380_status: none?\n");
printf("ncr5380_status: none?\n");
}
return ACT_CONTINUE;
@ -2218,7 +2218,7 @@ next_phase:
if (!SCI_BUSY(sc)) {
/* Unexpected disconnect */
kprintf("ncr5380_machine: unexpected disconnect.\n");
printf("ncr5380_machine: unexpected disconnect.\n");
xs->error = XS_DRIVER_STUFFUP;
act_flags |= (ACT_DISCONNECT | ACT_CMD_DONE);
goto do_actions;
@ -2235,12 +2235,12 @@ next_phase:
break;
if (--timo <= 0) {
if (sc->sc_state & NCR_ABORTING) {
kprintf("%s: no REQ while aborting, reset\n",
printf("%s: no REQ while aborting, reset\n",
sc->sc_dev.dv_xname);
act_flags |= ACT_RESET_BUS;
goto do_actions;
}
kprintf("%s: no REQ for next phase, abort\n",
printf("%s: no REQ for next phase, abort\n",
sc->sc_dev.dv_xname);
sc->sc_state |= NCR_ABORTING;
ncr_sched_msgout(sc, SEND_ABORT);
@ -2292,7 +2292,7 @@ next_phase:
break;
default:
kprintf("ncr5380_machine: Unexpected phase 0x%x\n", phase);
printf("ncr5380_machine: Unexpected phase 0x%x\n", phase);
sc->sc_state |= NCR_ABORTING;
ncr_sched_msgout(sc, SEND_ABORT);
goto next_phase;
@ -2337,7 +2337,7 @@ do_actions:
* XXX - better place to check?
*/
if (*(sc->sci_csr) & SCI_CSR_PERR) {
kprintf("%s: parity error csr = %02x!\n",
printf("%s: parity error csr = %02x!\n",
sc->sc_dev.dv_xname, *(sc->sci_csr) );
/* XXX: sc->sc_state |= NCR_ABORTING; */
ncr_sched_msgout(sc, SEND_PARITY_ERROR);
@ -2356,7 +2356,7 @@ do_actions:
* The error code XS_TIMEOUT allows retries.
*/
sc->sc_state |= NCR_ABORTING;
kprintf("%s: reset SCSI bus for TID=%d LUN=%d\n",
printf("%s: reset SCSI bus for TID=%d LUN=%d\n",
sc->sc_dev.dv_xname,
sr->sr_target, sr->sr_lun);
ncr5380_reset_scsibus(sc);
@ -2367,7 +2367,7 @@ do_actions:
/* Need to call scsi_done() */
/* XXX: from the aic6360 driver, but why? */
if (sc->sc_datalen < 0) {
kprintf("%s: %d extra bytes from %d:%d\n",
printf("%s: %d extra bytes from %d:%d\n",
sc->sc_dev.dv_xname, -sc->sc_datalen,
sr->sr_target, sr->sr_lun);
sc->sc_datalen = 0;
@ -2433,17 +2433,17 @@ ncr5380_show_scsi_cmd(xs)
int i = 0;
if ( ! ( xs->flags & SCSI_RESET ) ) {
kprintf("si(%d:%d:%d)-",
printf("si(%d:%d:%d)-",
xs->sc_link->scsibus,
xs->sc_link->target,
xs->sc_link->lun);
while (i < xs->cmdlen) {
if (i) kprintf(",");
kprintf("%x",b[i++]);
if (i) printf(",");
printf("%x",b[i++]);
}
kprintf("-\n");
printf("-\n");
} else {
kprintf("si(%d:%d:%d)-RESET-\n",
printf("si(%d:%d:%d)-RESET-\n",
xs->sc_link->scsibus,
xs->sc_link->target,
xs->sc_link->lun);
@ -2458,10 +2458,10 @@ ncr5380_show_sense(xs)
u_char *b = (u_char *)&xs->sense;
int i;
kprintf("sense:");
printf("sense:");
for (i = 0; i < sizeof(xs->sense); i++)
kprintf(" %02x", b[i]);
kprintf("\n");
printf(" %02x", b[i]);
printf("\n");
}
int ncr5380_traceidx = 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pms.c,v 1.4 1996/10/11 00:07:25 christos Exp $ */
/* $NetBSD: pms.c,v 1.5 1996/10/13 03:06:27 christos Exp $ */
/*-
* Copyright (c) 1996 D.C. Tsen
@ -139,7 +139,7 @@ cmd_mouse(unsigned char cmd)
delay(2);
}
if (i == 1000)
kprintf("Mouse transmit not ready\n");
printf("Mouse transmit not ready\n");
resend:
outb(IOMD_MSDATA, cmd);
@ -162,7 +162,7 @@ resend:
goto resend;
}
kprintf("Mouse cmd failed, cmd = %x, status = %x\n", cmd, c);
printf("Mouse cmd failed, cmd = %x, status = %x\n", cmd, c);
return(1);
}
@ -203,7 +203,7 @@ pmsinit()
case RC7500_IOC_ID:
break;
default:
kprintf("pms: Unknown IOMD id=%04x", id);
printf("pms: Unknown IOMD id=%04x", id);
return(0);
break;
}
@ -213,7 +213,7 @@ pmsinit()
i = 0;
while ((inb(IOMD_MSCR) & 0x03) != 0x03) {
if (i++ > 10) {
kprintf("Mouse not found, status = <%x>.\n", inb(IOMD_MSCR));
printf("Mouse not found, status = <%x>.\n", inb(IOMD_MSCR));
return(0);
}
pms_flush();
@ -236,7 +236,7 @@ pmsinit()
while ((mid = inb(IOMD_MSDATA)) != 0xAA) {
if (++i > 500) {
if (--j < 0) {
kprintf("Mouse Reset failed, status = <%x>.\n", mid);
printf("Mouse Reset failed, status = <%x>.\n", mid);
return(0);
}
pms_flush();
@ -266,7 +266,7 @@ pmsattach(parent, self, aux)
struct pms_softc *sc = (void *)self;
struct mainbus_attach_args *mb = aux;
kprintf("\n");
printf("\n");
/* Other initialization was done by pmsprobe. */
sc->sc_state = 0;
@ -416,7 +416,7 @@ pmsioctl(dev, cmd, addr, flag, p)
switch (cmd) {
case MOUSEIOC_SETSTATE:
kprintf("MOUSEIOC_SETSTATE called\n");
printf("MOUSEIOC_SETSTATE called\n");
break;
case MOUSEIOC_WRITEX:
sc->sc_x = *(int *) addr;
@ -453,7 +453,7 @@ pmsioctl(dev, cmd, addr, flag, p)
break;
}
case MOUSEIOC_GETSTATE:
kprintf("MOUSEIOC_GETSTATE called\n");
printf("MOUSEIOC_GETSTATE called\n");
/*
* Fall through.
*/
@ -642,7 +642,7 @@ pmswatchdog(arg)
int s;
if ((inb(IOMD_MSCR) & 0x03) != 0x03) {
kprintf("Mouse is dead (%x), restart it\n", inb(IOMD_MSCR));
printf("Mouse is dead (%x), restart it\n", inb(IOMD_MSCR));
s = spltty();
pmsinit();
splx(s);

View File

@ -1,4 +1,4 @@
/* $NetBSD: qms.c,v 1.8 1996/10/11 00:07:27 christos Exp $ */
/* $NetBSD: qms.c,v 1.9 1996/10/13 03:06:28 christos Exp $ */
/*
* Copyright (c) Scott Stevens 1995 All rights reserved
@ -119,7 +119,7 @@ quadmouseprobe(parent, match, aux)
return(1);
break;
default:
kprintf("quadmouse: Unknown IOMD id=%04x", id);
printf("quadmouse: Unknown IOMD id=%04x", id);
break;
}
@ -172,7 +172,7 @@ quadmouseattach(parent, self, aux)
WriteWord(IOMD_MOUSEX, sc->origx);
WriteWord(IOMD_MOUSEY, sc->origy);
kprintf("\n");
printf("\n");
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: rtc.c,v 1.3 1996/10/11 00:07:28 christos Exp $ */
/* $NetBSD: rtc.c,v 1.4 1996/10/13 03:06:29 christos Exp $ */
/*
* Copyright (c) 1994-1996 Mark Brinicombe.
@ -250,7 +250,7 @@ rtcattach(parent, self, aux)
sc->sc_flags |= RTC_BROKEN;
if ((ib->ib_addr & IIC_PCF8583_MASK) == IIC_PCF8583_ADDR) {
kprintf(": PCF8583");
printf(": PCF8583");
buff[0] = 0;
@ -260,26 +260,26 @@ rtcattach(parent, self, aux)
if (iic_control(RTC_Read, buff, 1))
return;
kprintf(" clock base ");
printf(" clock base ");
switch (buff[0] & 0x30) {
case 0x00:
kprintf("32.768KHz");
printf("32.768KHz");
break;
case 0x10:
kprintf("50Hz");
printf("50Hz");
break;
case 0x20:
kprintf("event");
printf("event");
break;
case 0x30:
kprintf("test mode");
printf("test mode");
break;
}
if (buff[0] & 0x80)
kprintf(" stopped");
printf(" stopped");
if (buff[0] & 0x04)
kprintf(" alarm enabled");
printf(" alarm enabled");
sc->sc_flags &= ~RTC_BROKEN;
}
@ -292,7 +292,7 @@ rtcattach(parent, self, aux)
inittodr(0);
kprintf("\n");
printf("\n");
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: wd.c,v 1.9 1996/10/11 00:07:30 christos Exp $ */
/* $NetBSD: wd.c,v 1.10 1996/10/13 03:06:33 christos Exp $ */
/*
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
@ -252,7 +252,7 @@ wdprint(aux, wdc)
struct wdc_attach_args *wa = aux;
if (!wdc)
kprintf(" drive %d", wa->wa_drive);
printf(" drive %d", wa->wa_drive);
return QUIET;
}
@ -268,7 +268,7 @@ wdcattach(parent, self, aux)
TAILQ_INIT(&wdc->sc_drives);
wdc->sc_drq = mb->mb_drq;
kprintf("\n");
printf("\n");
wdc->sc_ih.ih_func = wdcintr;
wdc->sc_ih.ih_arg = wdc;
@ -338,7 +338,7 @@ wdattach(parent, self, aux)
}
*q++ = '\0';
kprintf(": %dMB, %d cyl, %d head, %d sec, %d bytes/sec <%s>\n",
printf(": %dMB, %d cyl, %d head, %d sec, %d bytes/sec <%s>\n",
wd->sc_params.wdp_cylinders *
(wd->sc_params.wdp_heads * wd->sc_params.wdp_sectors) /
(1048576 / DEV_BSIZE),
@ -359,16 +359,16 @@ wdattach(parent, self, aux)
wd->sc_multiple = 1;
}
kprintf("%s: using", wd->sc_dev.dv_xname);
printf("%s: using", wd->sc_dev.dv_xname);
if (wd->sc_mode == WDM_DMA)
kprintf(" dma transfers,");
printf(" dma transfers,");
else
kprintf(" %d-sector %d-bit pio transfers,",
printf(" %d-sector %d-bit pio transfers,",
wd->sc_multiple, (wd->sc_flags & WDF_32BIT) == 0 ? 16 : 32);
if ((wd->sc_params.wdp_capabilities & WD_CAP_LBA) != 0)
kprintf(" lba addressing\n");
printf(" lba addressing\n");
else
kprintf(" chs addressing\n");
printf(" chs addressing\n");
}
/*
@ -418,7 +418,7 @@ wdstrategy(bp)
else {
struct wdc_softc *wdc = (void *)wd->sc_dev.dv_parent;
if ((wdc->sc_flags & (WDCF_ACTIVE|WDCF_ERROR)) == 0) {
kprintf("wdstrategy: controller inactive\n");
printf("wdstrategy: controller inactive\n");
wdcstart(wdc);
}
}
@ -595,7 +595,7 @@ loop:
daddr_t blkno;
#ifdef WDDEBUG
kprintf("\n%s: wdcstart %s %d@%d; map ", wd->sc_dev.dv_xname,
printf("\n%s: wdcstart %s %d@%d; map ", wd->sc_dev.dv_xname,
(bp->b_flags & B_READ) ? "read" : "write", bp->b_bcount,
bp->b_blkno);
#endif
@ -606,7 +606,7 @@ loop:
wd->sc_blkno = blkno / (lp->d_secsize / DEV_BSIZE);
} else {
#ifdef WDDEBUG
kprintf(" %d)%x", wd->sc_skip, inb(wd->sc_iobase+wd_altsts));
printf(" %d)%x", wd->sc_skip, inb(wd->sc_iobase+wd_altsts));
#endif
}
@ -722,7 +722,7 @@ loop:
}
#ifdef WDDEBUG
kprintf("sector %d cylin %d head %d addr %x sts %x\n", sector,
printf("sector %d cylin %d head %d addr %x sts %x\n", sector,
cylin, head, bp->b_data, 0/*inb(wd->sc_iobase+wd_altsts*/));
#endif
} else if (wd->sc_nblks > 1) {
@ -786,7 +786,7 @@ wdcintr(arg)
bp = wd->sc_q.b_actf;
#ifdef WDDEBUG
kprintf("I%d ", ctrlr);
printf("I%d ", ctrlr);
#endif
if (wait_for_unbusy(wdc) < 0) {
@ -1092,7 +1092,7 @@ wdgetdisklabel(wd)
wdstrategy, lp, wd->sc_dk.dk_cpulabel);
}
if (errstring) {
kprintf("%s: %s\n", wd->sc_dev.dv_xname, errstring);
printf("%s: %s\n", wd->sc_dev.dv_xname, errstring);
return;
}
@ -1253,7 +1253,7 @@ wdsetctlr(wd)
{
#ifdef WDDEBUG
kprintf("wd(%d,%d) C%dH%dS%d\n", wd->sc_dev.dv_unit, wd->sc_drive,
printf("wd(%d,%d) C%dH%dS%d\n", wd->sc_dev.dv_unit, wd->sc_drive,
wd->sc_dk.dk_label->d_ncylinders, wd->sc_dk.dk_label->d_ntracks,
wd->sc_dk.dk_label->d_nsectors);
#endif
@ -1600,7 +1600,7 @@ wddump(dev, blkno, va, size)
}
#else /* WD_DUMP_NOT_TRUSTED */
/* Let's just talk about this first... */
kprintf("wd%d: dump addr 0x%x, cylin %d, head %d, sector %d\n",
printf("wd%d: dump addr 0x%x, cylin %d, head %d, sector %d\n",
unit, va, cylin, head, sector);
delay(500 * 1000); /* half a second */
#endif
@ -1668,7 +1668,7 @@ wdcreset(wdc)
}
if (wait_for_unbusy(wdc) < 0) {
kprintf("%s: reset failed\n", wdc->sc_dev.dv_xname);
printf("%s: reset failed\n", wdc->sc_dev.dv_xname);
return 1;
}
@ -1746,7 +1746,7 @@ wdcwait(wdc, mask)
#ifdef WDCNDELAY_DEBUG
/* After autoconfig, there should be no long delays. */
if (!cold && timeout > WDCNDELAY_DEBUG)
kprintf("%s: warning: busy-wait took %dus\n",
printf("%s: warning: busy-wait took %dus\n",
wdc->sc_dev.dv_xname, WDCDELAY * timeout);
#endif
return 0;
@ -1766,7 +1766,7 @@ wdctimeout(arg)
wdc->sc_flags &= ~WDCF_ACTIVE;
wderror(wdc, NULL, "lost interrupt");
kprintf("%s: lost interrupt: %sing %d@%s:%d\n",
printf("%s: lost interrupt: %sing %d@%s:%d\n",
wdc->sc_dev.dv_xname,
(bp->b_flags & B_READ) ? "read" : "writ",
wd->sc_nblks, wd->sc_dev.dv_xname, wd->sc_blkno);
@ -1788,8 +1788,8 @@ wderror(dev, bp, msg)
if (bp) {
diskerr(bp, "wd", msg, LOG_PRINTF, wd->sc_skip / DEV_BSIZE,
wd->sc_dk.dk_label);
kprintf("\n");
printf("\n");
} else
kprintf("%s: %s: status %b error %b\n", wdc->sc_dev.dv_xname,
printf("%s: %s: status %b error %b\n", wdc->sc_dev.dv_xname,
msg, wdc->sc_status, WDCS_BITS, wdc->sc_error, WDERR_BITS);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: fpe.c,v 1.3 1996/10/11 00:07:04 christos Exp $ */
/* $NetBSD: fpe.c,v 1.4 1996/10/13 03:06:05 christos Exp $ */
/*
* Copyright (c) 1995 Mark Brinicombe.
@ -624,7 +624,7 @@ fpetos(address, fpreg)
*(fpe_sprec_t *)address = real;
if (real.sign == 1 && real.mantissa == 0 && real.exponent == 0)
kprintf("single result = %08x", *address);
printf("single result = %08x", *address);
return(0);
}
@ -1202,7 +1202,7 @@ fpe_ldfstf(instruction, frame)
offset = -offset;
if (reg == 15)
kprintf("WARNING: LDF/STF using r15\n");
printf("WARNING: LDF/STF using r15\n");
address = regs[reg];
@ -1288,33 +1288,33 @@ fpe_dump()
void
fpe_dump_prof()
{
kprintf("adf : %6d\n", fp_profile[FPP_ADD]);
kprintf("suf : %6d\n", fp_profile[FPP_SUB]);
kprintf("muf : %6d\n", fp_profile[FPP_MUL]);
kprintf("dvf : %6d\n", fp_profile[FPP_DIV]);
kprintf("cmf : %6d\n", fp_profile[FPP_CMF]);
kprintf("cnf : %6d\n", fp_profile[FPP_CNF]);
kprintf("fix : %6d\n", fp_profile[FPP_FIX]);
kprintf("flt : %6d\n", fp_profile[FPP_FLT]);
kprintf("abs : %6d\n", fp_profile[FPP_ABS]);
kprintf("mvf : %6d\n", fp_profile[FPP_MOV]);
kprintf("mnf : %6d\n", fp_profile[FPP_MVN]);
kprintf("rdf : %6d\n", fp_profile[FPP_RDV]);
kprintf("rsf : %6d\n", fp_profile[FPP_RSB]);
kprintf("strs: %6d\n", fp_profile[FPP_STRS]);
kprintf("strd: %6d\n", fp_profile[FPP_STRD]);
kprintf("stre: %6d\n", fp_profile[FPP_STRE]);
kprintf("strp: %6d\n", fp_profile[FPP_STRP]);
kprintf("ldrs: %6d\n", fp_profile[FPP_LDRS]);
kprintf("ldrd: %6d\n", fp_profile[FPP_LDRD]);
kprintf("ldre: %6d\n", fp_profile[FPP_LDRE]);
kprintf("ldrp: %6d\n", fp_profile[FPP_LDRP]);
printf("adf : %6d\n", fp_profile[FPP_ADD]);
printf("suf : %6d\n", fp_profile[FPP_SUB]);
printf("muf : %6d\n", fp_profile[FPP_MUL]);
printf("dvf : %6d\n", fp_profile[FPP_DIV]);
printf("cmf : %6d\n", fp_profile[FPP_CMF]);
printf("cnf : %6d\n", fp_profile[FPP_CNF]);
printf("fix : %6d\n", fp_profile[FPP_FIX]);
printf("flt : %6d\n", fp_profile[FPP_FLT]);
printf("abs : %6d\n", fp_profile[FPP_ABS]);
printf("mvf : %6d\n", fp_profile[FPP_MOV]);
printf("mnf : %6d\n", fp_profile[FPP_MVN]);
printf("rdf : %6d\n", fp_profile[FPP_RDV]);
printf("rsf : %6d\n", fp_profile[FPP_RSB]);
printf("strs: %6d\n", fp_profile[FPP_STRS]);
printf("strd: %6d\n", fp_profile[FPP_STRD]);
printf("stre: %6d\n", fp_profile[FPP_STRE]);
printf("strp: %6d\n", fp_profile[FPP_STRP]);
printf("ldrs: %6d\n", fp_profile[FPP_LDRS]);
printf("ldrd: %6d\n", fp_profile[FPP_LDRD]);
printf("ldre: %6d\n", fp_profile[FPP_LDRE]);
printf("ldrp: %6d\n", fp_profile[FPP_LDRP]);
}
#else
void
fpe_dump_prof()
{
kprintf("kernel not compiled with FPE profiling\n");
printf("kernel not compiled with FPE profiling\n");
}
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: iomd_clock.c,v 1.8 1996/10/11 00:06:32 christos Exp $ */
/* $NetBSD: iomd_clock.c,v 1.9 1996/10/13 03:05:45 christos Exp $ */
/*
* Copyright (c) 1994-1996 Mark Brinicombe.
@ -128,7 +128,7 @@ setstatclockrate(hz)
count = TIMER_FREQUENCY / hz;
kprintf("Setting statclock to %dHz (%d ticks)\n", hz, count);
printf("Setting statclock to %dHz (%d ticks)\n", hz, count);
WriteByte(IOMD_T1LOW, (count >> 0) & 0xff);
WriteByte(IOMD_T1HIGH, (count >> 8) & 0xff);
@ -156,7 +156,7 @@ cpu_initclocks()
* This timer generates 100Hz interrupts for the system clock
*/
kprintf("clock: hz=%d stathz = %d profhz = %d\n", hz, stathz, profhz);
printf("clock: hz=%d stathz = %d profhz = %d\n", hz, stathz, profhz);
WriteByte(IOMD_T0LOW, (TIMER0_COUNT >> 0) & 0xff);
WriteByte(IOMD_T0HIGH, (TIMER0_COUNT >> 8) & 0xff);
@ -213,7 +213,7 @@ microtime(tvp)
deltatm = tm - oldtm;
if (deltatm < 0) deltatm += TIMER0_COUNT;
if (deltatm < 0) {
kprintf("opps deltatm < 0 tm=%d oldtm=%d deltatm=%d\n",
printf("opps deltatm < 0 tm=%d oldtm=%d deltatm=%d\n",
tm, oldtm, deltatm);
}
oldtm = tm;
@ -325,7 +325,7 @@ resettodr()
rtc.rtc_micro = 0;
/*
kprintf("resettod: %d/%d/%d%d %d:%d:%d\n", rtc.rtc_day,
printf("resettod: %d/%d/%d%d %d:%d:%d\n", rtc.rtc_day,
rtc.rtc_mon, rtc.rtc_cen, rtc.rtc_year, rtc.rtc_hour,
rtc.rtc_min, rtc.rtc_sec);
*/
@ -392,14 +392,14 @@ inittodr(base)
/* If the base was 0 then keep quiet */
if (base) {
kprintf("inittodr: %02d:%02d:%02d.%02d%02d %02d/%02d/%02d%02d\n",
printf("inittodr: %02d:%02d:%02d.%02d%02d %02d/%02d/%02d%02d\n",
rtc.rtc_hour, rtc.rtc_min, rtc.rtc_sec, rtc.rtc_centi,
rtc.rtc_micro, rtc.rtc_day, rtc.rtc_mon, rtc.rtc_cen,
rtc.rtc_year);
if (n > base + 60) {
days = (n - base) / SECPERDAY;
kprintf("Clock has gained %d day%c %ld hours %ld minutes %ld secs\n",
printf("Clock has gained %d day%c %ld hours %ld minutes %ld secs\n",
days, ((days == 1) ? 0 : 's'), ((n - base) / 3600) % 24,
((n - base) / 60) % 60, (n - base) % 60);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: iomd_irqhandler.c,v 1.8 1996/10/11 00:06:43 christos Exp $ */
/* $NetBSD: iomd_irqhandler.c,v 1.9 1996/10/13 03:05:52 christos Exp $ */
/*
* Copyright (c) 1994-1996 Mark Brinicombe.
@ -205,13 +205,13 @@ irq_claim(irq, handler)
if (/*handler->ih_next == NULL && */handler->ih_name) {
extern char *_intrnames;
char *ptr = _intrnames + (irq * 14);
/* kprintf("intrnames=%08x ptr=%08x irq=%d\n", (u_int)_intrnames, (u_int)ptr, irq);*/
/* printf("intrnames=%08x ptr=%08x irq=%d\n", (u_int)_intrnames, (u_int)ptr, irq);*/
strcpy(ptr, " ");
strncpy(ptr, handler->ih_name, min(strlen(handler->ih_name), 13));
} else {
extern char *_intrnames;
char *ptr = _intrnames + (irq * 14);
ksprintf(ptr, "irq %2d ", irq);
sprintf(ptr, "irq %2d ", irq);
}
#endif
@ -249,7 +249,7 @@ irq_claim(irq, handler)
/*
for (level = 0; level < IRQ_LEVELS; ++level)
kprintf("irqmask[%d] = %08x\n", level, irqmasks[level]);
printf("irqmask[%d] = %08x\n", level, irqmasks[level]);
*/
#if NPODULEBUS > 0
@ -336,7 +336,7 @@ irq_release(irq, handler)
} else {
extern char *_intrnames;
char *ptr = _intrnames + (irq * 14);
ksprintf(ptr, "irq %2d ", irq);
sprintf(ptr, "irq %2d ", irq);
}
#endif
@ -398,7 +398,7 @@ disable_interrupts(mask)
cpsr = SetCPSR(mask, mask);
#ifdef DIAGNOSTIC
if ((GetCPSR() & I32_bit) == 0)
kprintf("Alert ! disable_interrupts has failed\n");
printf("Alert ! disable_interrupts has failed\n");
#endif
return(cpsr);
}
@ -492,8 +492,8 @@ dosoftints()
softints = soft_interrupts & spl_mask;
/* if (soft_interrupts) {
kprintf("current_spl_level=%d ", current_spl_level);
kprintf("soft_interrupts=%08x spl_mask=%08x\n", soft_interrupts, spl_mask);
printf("current_spl_level=%d ", current_spl_level);
printf("soft_interrupts=%08x spl_mask=%08x\n", soft_interrupts, spl_mask);
}*/
/*
@ -592,14 +592,14 @@ validate_irq_address(irqf, mask)
if (irqf->if_pc > (int)SetCPSR && irqf->if_pc < (int)GetCPSR)
return;
if ((irqf->if_spsr & PSR_MODE) != PSR_USR32_MODE) {
kprintf("Alert! IRQ while in non USR mode (%08x) pc=%08x\n",
printf("Alert! IRQ while in non USR mode (%08x) pc=%08x\n",
irqf->if_spsr, irqf->if_pc);
}
if ((GetCPSR() & I32_bit) == 0) {
kprintf("Alert! IRQ's enabled during IRQ handler\n");
printf("Alert! IRQ's enabled during IRQ handler\n");
}
if (irqf->if_pc >= (int)vgone && irqf->if_pc < (int)vfinddev)
kprintf("Alert! IRQ between vgone & vfinddev : pc=%08x\n",
printf("Alert! IRQ between vgone & vfinddev : pc=%08x\n",
irqf->if_pc);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: dumphex.c,v 1.3 1996/10/11 00:07:06 christos Exp $ */
/* $NetBSD: dumphex.c,v 1.4 1996/10/13 03:06:06 christos Exp $ */
/*
* Copyright (c) 1994 Mark Brinicombe.
@ -58,32 +58,32 @@ dumpb(addr, count)
int loop;
for (; count > 0; count -= 16) {
kprintf("%08x: ", (int)addr);
printf("%08x: ", (int)addr);
for (loop = 0; loop < 16; ++loop) {
byte = addr[loop];
kprintf("%02x ", byte);
printf("%02x ", byte);
}
kprintf(" ");
printf(" ");
for (loop = 0; loop < 16; ++loop) {
byte = addr[loop];
if (byte < 0x20)
kprintf("\x1b[31m%c\x1b[0m", byte + '@');
printf("\x1b[31m%c\x1b[0m", byte + '@');
else if (byte == 0x7f)
kprintf("\x1b[31m?\x1b[0m");
printf("\x1b[31m?\x1b[0m");
else if (byte < 0x80)
kprintf("%c", byte);
printf("%c", byte);
else if (byte < 0xa0)
kprintf("\x1b[32m%c\x1b[0m", byte - '@');
printf("\x1b[32m%c\x1b[0m", byte - '@');
else if (byte == 0xff)
kprintf("\x1b[32m?\x1b[0m");
printf("\x1b[32m?\x1b[0m");
else
kprintf("%c", byte & 0x7f);
printf("%c", byte & 0x7f);
}
kprintf("\r\n");
printf("\r\n");
addr += 16;
}
}
@ -100,32 +100,32 @@ dumpw(addr, count)
int loop;
for (; count > 0; count -= 32) {
kprintf("%08x: ", (int)addr);
printf("%08x: ", (int)addr);
for (loop = 0; loop < 8; ++loop) {
byte = ((u_int *)addr)[loop];
kprintf("%08x ", byte);
printf("%08x ", byte);
}
kprintf(" ");
printf(" ");
for (loop = 0; loop < 32; ++loop) {
byte = addr[loop];
if (byte < 0x20)
kprintf("\x1b[31m%c\x1b[0m", byte + '@');
printf("\x1b[31m%c\x1b[0m", byte + '@');
else if (byte == 0x7f)
kprintf("\x1b[31m?\x1b[0m");
printf("\x1b[31m?\x1b[0m");
else if (byte < 0x80)
kprintf("%c", byte);
printf("%c", byte);
else if (byte < 0xa0)
kprintf("\x1b[32m%c\x1b[0m", byte - '@');
printf("\x1b[32m%c\x1b[0m", byte - '@');
else if (byte == 0xff)
kprintf("\x1b[32m?\x1b[0m");
printf("\x1b[32m?\x1b[0m");
else
kprintf("%c", byte & 0x7f);
printf("%c", byte & 0x7f);
}
kprintf("\r\n");
printf("\r\n");
addr += 32;
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: kshell_debug.c,v 1.3 1996/10/11 00:06:37 christos Exp $ */
/* $NetBSD: kshell_debug.c,v 1.4 1996/10/13 03:05:48 christos Exp $ */
/*
* Copyright (c) 1994 Melvin Tang-Richardson (Nut)
@ -65,7 +65,7 @@ debug_count_processes_on_q(queue)
queue_head=(struct proc *)&qs[queue];
for (lastproc=qs[queue].ph_link;lastproc!=queue_head;lastproc=lastproc->p_forw) {
if (lastproc != queue_head)
kprintf("Process queue=%8x proc=%08x p_addr=%8x, comm=%s\n",
printf("Process queue=%8x proc=%08x p_addr=%8x, comm=%s\n",
queue, (u_int) lastproc, (u_int) lastproc->p_addr,
lastproc->p_comm);
counter++;
@ -85,7 +85,7 @@ debug_show_q_details()
debug_count_processes_on_q(counter);
if (whichqs == 0)
kprintf("queues empty\n");
printf("queues empty\n");
(void)splx(s);
}
@ -103,22 +103,22 @@ debug_show_all_procs(argc, argv)
np = nprocs;
p = ap = (struct proc *)allproc.lh_first;
if (argc > 1)
kprintf(" pid proc addr map pcb pmap comm wchan\n");
printf(" pid proc addr map pcb pmap comm wchan\n");
else
kprintf(" pid proc addr uid ppid pgrp flag stat comm cputime \n");
printf(" pid proc addr uid ppid pgrp flag stat comm cputime \n");
while (--np >= 0) {
pp = p->p_pptr;
if (pp == 0)
pp = p;
if (p->p_stat) {
if (argc > 1)
kprintf("%5d %08x %08x %08x %08x %08x %12s ",
printf("%5d %08x %08x %08x %08x %08x %12s ",
p->p_pid, (u_int) ap, (u_int)p->p_addr,
(u_int) p->p_vmspace,
(u_int) &p->p_addr->u_pcb, (p->p_vmspace ? (u_int)&p->p_vmspace->vm_pmap : 0),
((p->p_comm == 0) ? "..." : p->p_comm));
else
kprintf("%5d %08x %08x %5d %5d %5d %08x %d %12s %5u.%02d ",
printf("%5d %08x %08x %5d %5d %5d %08x %d %12s %5u.%02d ",
p->p_pid, (u_int) ap, (u_int) p->p_addr,
p->p_cred->p_ruid,
pp->p_pid, p->p_pgrp->pg_id, p->p_flag,
@ -127,10 +127,10 @@ debug_show_all_procs(argc, argv)
(u_int)p->p_rtime.tv_usec / 10000);
if (p->p_wchan && argc > 1) {
if (p->p_wmesg)
kprintf("%12s ", p->p_wmesg);
kprintf("%x", (u_int)p->p_wchan);
printf("%12s ", p->p_wmesg);
printf("%x", (u_int)p->p_wchan);
}
kprintf("\n");
printf("\n");
}
ap = p->p_list.le_next;
if (ap == 0 && np > 0)
@ -152,12 +152,12 @@ debug_show_callout(argc, argv)
register int t;
s = splhigh();
kprintf(" cum ticks func arg\n");
printf(" cum ticks func arg\n");
for (cum = 0, p1 = calltodo.c_next; p1; p1 = p1->c_next) {
t = p1->c_time;
if (t > 0)
cum += t;
kprintf("%9d %9d %08x %08x\n", cum, t, (u_int) p1->c_func,
printf("%9d %9d %08x %08x\n", cum, t, (u_int) p1->c_func,
(u_int) p1->c_arg);
}
(void)splx(s);
@ -173,12 +173,12 @@ debug_show_fs(argc, argv)
s = splhigh();
kprintf("Registered filesystems (%d)\n", nvfssw);
printf("Registered filesystems (%d)\n", nvfssw);
for (vfsp = &vfssw[0]; vfsp < &vfssw[nvfssw]; vfsp++) {
if (*vfsp == NULL)
continue;
kprintf(" %s\n", (*vfsp)->vfs_name);
printf(" %s\n", (*vfsp)->vfs_name);
}
(void)splx(s);
}
@ -194,12 +194,12 @@ debug_show_vm_map(map, text)
s = splhigh();
kprintf("vm_map dump : %s\n", text);
printf("vm_map dump : %s\n", text);
mapentry = &map->header;
do {
kprintf("vm_map_entry: start = %08x end = %08x\n",
printf("vm_map_entry: start = %08x end = %08x\n",
(u_int) mapentry->start, (u_int) mapentry->end);
mapentry = mapentry->next;
} while (mapentry != &map->header);
@ -222,11 +222,11 @@ debug_show_pmap(pmap)
pd = (pd_entry_t *)pmap;
kprintf("pdir=%08x\n", (u_int) pd);
printf("pdir=%08x\n", (u_int) pd);
for (loop = 0; loop < 4096; ++loop) {
if (pd[loop] == 0)
continue;
kprintf("%08x : %08x\n", loop * 1024*1024, pd[loop]);
printf("%08x : %08x\n", loop * 1024*1024, pd[loop]);
if ((pd[loop] & 0xff) == 0x11) {
pt = (pt_entry_t *)(PROCESS_PAGE_TBLS_BASE
+ loop * 1024);
@ -237,7 +237,7 @@ debug_show_pmap(pmap)
++loop1;
while (loop1 < 256 && pt[loop1])
++loop1;
kprintf(" %08x -> %08x\n",
printf(" %08x -> %08x\n",
loop * 1024*1024 + start * 4096,
loop * 1024*1024 + loop1 * 4096 - 1);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: kshell_disassem.c,v 1.4 1996/10/11 00:07:08 christos Exp $ */
/* $NetBSD: kshell_disassem.c,v 1.5 1996/10/13 03:06:07 christos Exp $ */
/*
* Copyright (c) 1994 Mark Brinicombe.
@ -71,7 +71,7 @@ shell_disassem(argc, argv)
u_char *addr;
if (argc < 2) {
kprintf("Syntax: dis <addr>\n\r");
printf("Syntax: dis <addr>\n\r");
return;
}
@ -79,7 +79,7 @@ shell_disassem(argc, argv)
addr = (u_char *)readhex(argv[1]);
kprintf("Interactive disassembly\n\r");
printf("Interactive disassembly\n\r");
do_disassemble(addr);
}
@ -160,18 +160,18 @@ do_disassemble(addr)
case '/' :
case '?' :
kprintf("\'\xe3\' - Backwards 1 word\n\r");
kprintf("\'\xe4\' - Forwards 1 word\n\r");
kprintf("\'\xe5\' - Backwords 16 words\n\r");
kprintf("\'\xe6\' - Forwards 16 words\n\r");
kprintf("\'Q\' - Quit\n\r");
kprintf("\'B\' - Back a word\n\r");
kprintf("\'R\' - Disassemble 16 words\n\r");
kprintf("\'J\' - Jump to address\n\r");
kprintf("\' \' - Branch to address\n\r");
kprintf("<BS> - Return from branch\n\r");
kprintf("\'-\' - Skip backwards 128 words\n\r");
kprintf("\'+\' - Skip forwards 128 words\n\r");
printf("\'\xe3\' - Backwards 1 word\n\r");
printf("\'\xe4\' - Forwards 1 word\n\r");
printf("\'\xe5\' - Backwords 16 words\n\r");
printf("\'\xe6\' - Forwards 16 words\n\r");
printf("\'Q\' - Quit\n\r");
printf("\'B\' - Back a word\n\r");
printf("\'R\' - Disassemble 16 words\n\r");
printf("\'J\' - Jump to address\n\r");
printf("\' \' - Branch to address\n\r");
printf("<BS> - Return from branch\n\r");
printf("\'-\' - Skip backwards 128 words\n\r");
printf("\'+\' - Skip forwards 128 words\n\r");
break;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: kshell_dumphex.c,v 1.3 1996/10/11 00:07:06 christos Exp $ */
/* $NetBSD: kshell_dumphex.c,v 1.4 1996/10/13 03:06:06 christos Exp $ */
/*
* Copyright (c) 1994 Mark Brinicombe.
@ -58,32 +58,32 @@ dumpb(addr, count)
int loop;
for (; count > 0; count -= 16) {
kprintf("%08x: ", (int)addr);
printf("%08x: ", (int)addr);
for (loop = 0; loop < 16; ++loop) {
byte = addr[loop];
kprintf("%02x ", byte);
printf("%02x ", byte);
}
kprintf(" ");
printf(" ");
for (loop = 0; loop < 16; ++loop) {
byte = addr[loop];
if (byte < 0x20)
kprintf("\x1b[31m%c\x1b[0m", byte + '@');
printf("\x1b[31m%c\x1b[0m", byte + '@');
else if (byte == 0x7f)
kprintf("\x1b[31m?\x1b[0m");
printf("\x1b[31m?\x1b[0m");
else if (byte < 0x80)
kprintf("%c", byte);
printf("%c", byte);
else if (byte < 0xa0)
kprintf("\x1b[32m%c\x1b[0m", byte - '@');
printf("\x1b[32m%c\x1b[0m", byte - '@');
else if (byte == 0xff)
kprintf("\x1b[32m?\x1b[0m");
printf("\x1b[32m?\x1b[0m");
else
kprintf("%c", byte & 0x7f);
printf("%c", byte & 0x7f);
}
kprintf("\r\n");
printf("\r\n");
addr += 16;
}
}
@ -100,32 +100,32 @@ dumpw(addr, count)
int loop;
for (; count > 0; count -= 32) {
kprintf("%08x: ", (int)addr);
printf("%08x: ", (int)addr);
for (loop = 0; loop < 8; ++loop) {
byte = ((u_int *)addr)[loop];
kprintf("%08x ", byte);
printf("%08x ", byte);
}
kprintf(" ");
printf(" ");
for (loop = 0; loop < 32; ++loop) {
byte = addr[loop];
if (byte < 0x20)
kprintf("\x1b[31m%c\x1b[0m", byte + '@');
printf("\x1b[31m%c\x1b[0m", byte + '@');
else if (byte == 0x7f)
kprintf("\x1b[31m?\x1b[0m");
printf("\x1b[31m?\x1b[0m");
else if (byte < 0x80)
kprintf("%c", byte);
printf("%c", byte);
else if (byte < 0xa0)
kprintf("\x1b[32m%c\x1b[0m", byte - '@');
printf("\x1b[32m%c\x1b[0m", byte - '@');
else if (byte == 0xff)
kprintf("\x1b[32m?\x1b[0m");
printf("\x1b[32m?\x1b[0m");
else
kprintf("%c", byte & 0x7f);
printf("%c", byte & 0x7f);
}
kprintf("\r\n");
printf("\r\n");
addr += 32;
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: kshell_input.c,v 1.4 1996/10/11 00:07:09 christos Exp $ */
/* $NetBSD: kshell_input.c,v 1.5 1996/10/13 03:06:07 christos Exp $ */
/*
* Copyright (c) 1994 Mark Brinicombe.
@ -83,7 +83,7 @@ readstring(string, length, valid_string, insert)
if (insert && insert[0] != 0) {
strcpy(string, insert);
loop = strlen(insert);
kprintf("%s", insert);
printf("%s", insert);
} else
loop = 0;
@ -100,9 +100,9 @@ readstring(string, length, valid_string, insert)
* Display the cursor depending on what mode we are in
*/
if (!insert_mode)
kprintf("\xe2");
printf("\xe2");
else
kprintf("\xe1");
printf("\xe1");
#endif
/*
@ -117,9 +117,9 @@ readstring(string, length, valid_string, insert)
*/
if (loop == entered || entered == 0)
kprintf("\x7f");
printf("\x7f");
else
kprintf("\x08%c\x08", string[loop]);
printf("\x08%c\x08", string[loop]);
#endif
/*
@ -142,10 +142,10 @@ readstring(string, length, valid_string, insert)
}
--entered;
string[entered] = 0;
/* kprintf("\x1b[s%s \x1b[u", &string[loop]);*/
kprintf("\r%s \r", string);
/* printf("\x1b[s%s \x1b[u", &string[loop]);*/
printf("\r%s \r", string);
for (loop1 = 0; loop1 <= loop; ++loop1)
kprintf("\x09");
printf("\x09");
}
break;
@ -158,7 +158,7 @@ readstring(string, length, valid_string, insert)
int loop1;
if (loop == 0) {
kprintf("\x07");
printf("\x07");
break;
}
for (loop1 = loop-1; loop1 < (entered - 1); ++loop1) {
@ -167,10 +167,10 @@ readstring(string, length, valid_string, insert)
--loop;
--entered;
string[entered] = 0;
/* kprintf("\x1b[D\x1b[s%s \x1b[u", &string[loop]);*/
kprintf("\r%s \r", string);
/* printf("\x1b[D\x1b[s%s \x1b[u", &string[loop]);*/
printf("\r%s \r", string);
for (loop1 = 0; loop1 < loop; ++loop1)
kprintf("\x09");
printf("\x09");
}
break;
@ -206,7 +206,7 @@ readstring(string, length, valid_string, insert)
if (loop < 0)
loop = 0;
else
kprintf("\x1b[D");
printf("\x1b[D");
break;
/*
@ -218,7 +218,7 @@ readstring(string, length, valid_string, insert)
if (loop > entered)
loop = entered;
else
kprintf("\x1b[C");
printf("\x1b[C");
break;
/*
@ -243,7 +243,7 @@ readstring(string, length, valid_string, insert)
&& (valid_string == NULL || strchr(valid_string, key))) {
if (!insert_mode && loop < length) {
string[loop] = key;
kprintf("%c", key);
printf("%c", key);
++loop;
if (loop > entered) entered = loop;
}
@ -257,18 +257,18 @@ readstring(string, length, valid_string, insert)
++loop;
++entered;
string[entered] = 0;
if (loop != entered) kprintf("\x1b[s");
kprintf("%s", &string[loop-1]);
if (loop != entered) kprintf("\x1b[u\x1b[C");
if (loop != entered) printf("\x1b[s");
printf("%s", &string[loop-1]);
if (loop != entered) printf("\x1b[u\x1b[C");
} else {
kprintf("\x07");
printf("\x07");
}
}
break;
}
} while (key != 0x0d && key != 0x0a);
kprintf("\n\r");
printf("\n\r");
string[entered] = 0;
@ -285,13 +285,13 @@ deleteline(loop, entered)
{
while (loop < entered) {
++loop;
kprintf("\x1b[C");
printf("\x1b[C");
}
while (loop > 0) {
--loop;
--entered;
kprintf("\x7f");
printf("\x7f");
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: kshell_shell.c,v 1.8 1996/10/11 00:07:10 christos Exp $ */
/* $NetBSD: kshell_shell.c,v 1.9 1996/10/13 03:06:08 christos Exp $ */
/*
* Copyright (c) 1994-1996 Mark Brinicombe.
@ -146,7 +146,7 @@ shell_poke(argc, argv)
u_int data;
if (argc < 3) {
kprintf("Syntax: poke[bw] <addr> <data>\n\r");
printf("Syntax: poke[bw] <addr> <data>\n\r");
return;
}
@ -173,7 +173,7 @@ shell_peek(argc, argv)
u_int data;
if (argc < 2) {
kprintf("Syntax: peek[bw] <addr>\n\r");
printf("Syntax: peek[bw] <addr>\n\r");
return;
}
@ -186,7 +186,7 @@ shell_peek(argc, argv)
else
data = ReadWord(addr);
kprintf("%08x : %08x\n\r", addr, data);
printf("%08x : %08x\n\r", addr, data);
}
@ -201,7 +201,7 @@ shell_dumpb(argc, argv)
int count;
if (argc < 2) {
kprintf("Syntax: dumpb <addr> [<bytes>]\n\r");
printf("Syntax: dumpb <addr> [<bytes>]\n\r");
return;
}
@ -229,7 +229,7 @@ shell_dumpw(argc, argv)
int count;
if (argc < 2) {
kprintf("Syntax: dumpw <addr> [<bytes>]\n\r");
printf("Syntax: dumpw <addr> [<bytes>]\n\r");
return;
}
@ -256,7 +256,7 @@ shell_vmmap(argc, argv)
u_char *addr;
if (argc < 2) {
kprintf("Syntax: vmmap <map addr>\n\r");
printf("Syntax: vmmap <map addr>\n\r");
return;
}
@ -278,7 +278,7 @@ shell_pmap(argc, argv)
u_char *addr;
if (argc < 2) {
kprintf("Syntax: pmap <pmap addr>\n\r");
printf("Syntax: pmap <pmap addr>\n\r");
return;
}
@ -309,7 +309,7 @@ shell_devices(argc, argv)
int loop;
char *state;
kprintf(" driver unit state name\n");
printf(" driver unit state name\n");
for (cf = cfdata; cf->cf_driver; ++cf) {
cd = cf->cf_driver;
if (cf->cf_fstate & FSTATE_FOUND)
@ -317,18 +317,18 @@ shell_devices(argc, argv)
else
state = "NOT FOUND";
kprintf("%08x %2d %s %s\n", (u_int)cd, (u_int)cf->cf_unit,
printf("%08x %2d %s %s\n", (u_int)cd, (u_int)cf->cf_unit,
state, cd->cd_name);
if (cf->cf_fstate & FSTATE_FOUND) {
for (loop = 0; loop < cd->cd_ndevs; ++loop) {
dv = (struct device *)cd->cd_devs[loop];
if (dv != 0)
kprintf(" %s (%08x)\n",
printf(" %s (%08x)\n",
dv->dv_xname, (u_int) dv);
}
}
kprintf("\n");
printf("\n");
}
}
@ -338,7 +338,7 @@ shell_reboot(argc, argv)
int argc;
char *argv[];
{
kprintf("Running shutdown hooks ...\n");
printf("Running shutdown hooks ...\n");
doshutdownhooks();
IRQdisable;
@ -373,37 +373,37 @@ shell_vmstat(argc, argv)
struct vmmeter sum;
sum = cnt;
(void)kprintf("%9u cpu context switches\n", sum.v_swtch);
(void)kprintf("%9u device interrupts\n", sum.v_intr);
(void)kprintf("%9u software interrupts\n", sum.v_soft);
(void)kprintf("%9u traps\n", sum.v_trap);
(void)kprintf("%9u system calls\n", sum.v_syscall);
(void)kprintf("%9u total faults taken\n", sum.v_faults);
(void)kprintf("%9u swap ins\n", sum.v_swpin);
(void)kprintf("%9u swap outs\n", sum.v_swpout);
(void)kprintf("%9u pages swapped in\n", sum.v_pswpin / CLSIZE);
(void)kprintf("%9u pages swapped out\n", sum.v_pswpout / CLSIZE);
(void)kprintf("%9u page ins\n", sum.v_pageins);
(void)kprintf("%9u page outs\n", sum.v_pageouts);
(void)kprintf("%9u pages paged in\n", sum.v_pgpgin);
(void)kprintf("%9u pages paged out\n", sum.v_pgpgout);
(void)kprintf("%9u pages reactivated\n", sum.v_reactivated);
(void)kprintf("%9u intransit blocking page faults\n", sum.v_intrans);
(void)kprintf("%9u zero fill pages created\n", sum.v_nzfod / CLSIZE);
(void)kprintf("%9u zero fill page faults\n", sum.v_zfod / CLSIZE);
(void)kprintf("%9u pages examined by the clock daemon\n", sum.v_scan);
(void)kprintf("%9u revolutions of the clock hand\n", sum.v_rev);
(void)kprintf("%9u VM object cache lookups\n", sum.v_lookups);
(void)kprintf("%9u VM object hits\n", sum.v_hits);
(void)kprintf("%9u total VM faults taken\n", sum.v_vm_faults);
(void)kprintf("%9u copy-on-write faults\n", sum.v_cow_faults);
(void)kprintf("%9u pages freed by daemon\n", sum.v_dfree);
(void)kprintf("%9u pages freed by exiting processes\n", sum.v_pfree);
(void)kprintf("%9u pages free\n", sum.v_free_count);
(void)kprintf("%9u pages wired down\n", sum.v_wire_count);
(void)kprintf("%9u pages active\n", sum.v_active_count);
(void)kprintf("%9u pages inactive\n", sum.v_inactive_count);
(void)kprintf("%9u bytes per page\n", sum.v_page_size);
(void)printf("%9u cpu context switches\n", sum.v_swtch);
(void)printf("%9u device interrupts\n", sum.v_intr);
(void)printf("%9u software interrupts\n", sum.v_soft);
(void)printf("%9u traps\n", sum.v_trap);
(void)printf("%9u system calls\n", sum.v_syscall);
(void)printf("%9u total faults taken\n", sum.v_faults);
(void)printf("%9u swap ins\n", sum.v_swpin);
(void)printf("%9u swap outs\n", sum.v_swpout);
(void)printf("%9u pages swapped in\n", sum.v_pswpin / CLSIZE);
(void)printf("%9u pages swapped out\n", sum.v_pswpout / CLSIZE);
(void)printf("%9u page ins\n", sum.v_pageins);
(void)printf("%9u page outs\n", sum.v_pageouts);
(void)printf("%9u pages paged in\n", sum.v_pgpgin);
(void)printf("%9u pages paged out\n", sum.v_pgpgout);
(void)printf("%9u pages reactivated\n", sum.v_reactivated);
(void)printf("%9u intransit blocking page faults\n", sum.v_intrans);
(void)printf("%9u zero fill pages created\n", sum.v_nzfod / CLSIZE);
(void)printf("%9u zero fill page faults\n", sum.v_zfod / CLSIZE);
(void)printf("%9u pages examined by the clock daemon\n", sum.v_scan);
(void)printf("%9u revolutions of the clock hand\n", sum.v_rev);
(void)printf("%9u VM object cache lookups\n", sum.v_lookups);
(void)printf("%9u VM object hits\n", sum.v_hits);
(void)printf("%9u total VM faults taken\n", sum.v_vm_faults);
(void)printf("%9u copy-on-write faults\n", sum.v_cow_faults);
(void)printf("%9u pages freed by daemon\n", sum.v_dfree);
(void)printf("%9u pages freed by exiting processes\n", sum.v_pfree);
(void)printf("%9u pages free\n", sum.v_free_count);
(void)printf("%9u pages wired down\n", sum.v_wire_count);
(void)printf("%9u pages active\n", sum.v_active_count);
(void)printf("%9u pages inactive\n", sum.v_inactive_count);
(void)printf("%9u bytes per page\n", sum.v_page_size);
}
@ -417,7 +417,7 @@ shell_pextract(argc, argv)
int pind;
if (argc < 2) {
kprintf("Syntax: pextract <addr>\n\r");
printf("Syntax: pextract <addr>\n\r");
return;
}
@ -428,7 +428,7 @@ shell_pextract(argc, argv)
pa = pmap_extract(kernel_pmap, (vm_offset_t)addr);
pind = pmap_page_index(pa);
kprintf("va=%08x pa=%08x pind=%d\n", (u_int)addr, (u_int)pa, pind);
printf("va=%08x pa=%08x pind=%d\n", (u_int)addr, (u_int)pa, pind);
}
@ -440,7 +440,7 @@ shell_vnode(argc, argv)
struct vnode *vp;
if (argc < 2) {
kprintf("Syntax: vnode <vp>\n\r");
printf("Syntax: vnode <vp>\n\r");
return;
}
@ -448,12 +448,12 @@ shell_vnode(argc, argv)
vp = (struct vnode *)readhex(argv[1]);
kprintf("vp = %08x\n", (u_int)vp);
kprintf("vp->v_type = %d\n", vp->v_type);
kprintf("vp->v_flag = %ld\n", vp->v_flag);
kprintf("vp->v_usecount = %d\n", vp->v_usecount);
kprintf("vp->v_writecount = %d\n", vp->v_writecount);
kprintf("vp->v_numoutput = %ld\n", vp->v_numoutput);
printf("vp = %08x\n", (u_int)vp);
printf("vp->v_type = %d\n", vp->v_type);
printf("vp->v_flag = %ld\n", vp->v_flag);
printf("vp->v_usecount = %d\n", vp->v_usecount);
printf("vp->v_writecount = %d\n", vp->v_writecount);
printf("vp->v_numoutput = %ld\n", vp->v_numoutput);
vprint("vnode:", vp);
}
@ -467,7 +467,7 @@ shell_buf(argc, argv)
struct buf *bp;
if (argc < 2) {
kprintf("Syntax: buf <bp>\n\r");
printf("Syntax: buf <bp>\n\r");
return;
}
@ -475,20 +475,20 @@ shell_buf(argc, argv)
bp = (struct buf *)readhex(argv[1]);
kprintf("buf pointer=%08x\n", (u_int)bp);
printf("buf pointer=%08x\n", (u_int)bp);
if (bp->b_proc)
kprintf("proc=%08x pid=%d\n", (u_int)bp->b_proc, bp->b_proc->p_pid);
printf("proc=%08x pid=%d\n", (u_int)bp->b_proc, bp->b_proc->p_pid);
kprintf("flags=%08x\n", (u_int)bp->b_proc);
kprintf("b_error=%d\n", bp->b_error);
kprintf("b_bufsize=%08x\n", (u_int)bp->b_bufsize);
kprintf("b_bcount=%08x\n", (u_int)bp->b_bcount);
kprintf("b_resid=%d\n", (int)bp->b_resid);
kprintf("b_bdev=%04x\n", bp->b_dev);
kprintf("b_baddr=%08x\n", (u_int)bp->b_un.b_addr);
kprintf("b_lblkno=%08x\n", (u_int)bp->b_lblkno);
kprintf("b_blkno=%08x\n", bp->b_blkno);
kprintf("b_vp=%08x\n", (u_int)bp->b_vp);
printf("flags=%08x\n", (u_int)bp->b_proc);
printf("b_error=%d\n", bp->b_error);
printf("b_bufsize=%08x\n", (u_int)bp->b_bufsize);
printf("b_bcount=%08x\n", (u_int)bp->b_bcount);
printf("b_resid=%d\n", (int)bp->b_resid);
printf("b_bdev=%04x\n", bp->b_dev);
printf("b_baddr=%08x\n", (u_int)bp->b_un.b_addr);
printf("b_lblkno=%08x\n", (u_int)bp->b_lblkno);
printf("b_blkno=%08x\n", bp->b_blkno);
printf("b_vp=%08x\n", (u_int)bp->b_vp);
}
@ -511,7 +511,7 @@ shell_vndbuf(argc, argv)
struct vnode *vp;
if (argc < 2) {
kprintf("Syntax: vndbuf <vp>\n\r");
printf("Syntax: vndbuf <vp>\n\r");
return;
}
@ -531,7 +531,7 @@ shell_vncbuf(argc, argv)
struct vnode *vp;
if (argc < 2) {
kprintf("Syntax: vndbuf <vp>\n\r");
printf("Syntax: vndbuf <vp>\n\r");
return;
}
@ -555,13 +555,13 @@ shell()
int args;
char *argv[20];
kprintf("\nRiscBSD debug/monitor shell\n");
kprintf("CTRL-D, exit or reboot to terminate\n\n");
printf("\nRiscBSD debug/monitor shell\n");
printf("CTRL-D, exit or reboot to terminate\n\n");
do {
/* print prompt */
kprintf("kshell> ");
printf("kshell> ");
/* Read line from keyboard */
@ -688,39 +688,39 @@ shell()
#endif
else if (strcmp(argv[0], "help") == 0
|| strcmp(argv[0], "?") == 0) {
kprintf("peekb <hexaddr>\r\n");
kprintf("pokeb <hexaddr> <data>\r\n");
kprintf("peekw <hexaddr>\r\n");
kprintf("pokew <hexaddr <data>\r\n");
kprintf("dis <hexaddr>\r\n");
kprintf("dumpb <hexaddr> [length]\r\n");
kprintf("dumpw <hexaddr> [length]\r\n");
kprintf("dump <hexaddr> [length]\r\n");
kprintf("reboot\r\n");
kprintf("qs\r\n");
kprintf("ps [m]\r\n");
kprintf("vmstat\n");
kprintf("listfs\n");
kprintf("devices\n");
kprintf("callouts\n");
kprintf("prompt\r\n");
kprintf("vmmap <vmmap addr>\r\n");
kprintf("pmap <pmap addr>\r\n");
kprintf("pdstat\r\n");
kprintf("flush\r\n");
kprintf("exit\r\n");
kprintf("forceboot\r\n");
kprintf("dumppvs\r\n");
kprintf("pextract <phys addr>\r\n");
kprintf("vnode <vp>\r\n");
kprintf("buf <bp>\r\n");
printf("peekb <hexaddr>\r\n");
printf("pokeb <hexaddr> <data>\r\n");
printf("peekw <hexaddr>\r\n");
printf("pokew <hexaddr <data>\r\n");
printf("dis <hexaddr>\r\n");
printf("dumpb <hexaddr> [length]\r\n");
printf("dumpw <hexaddr> [length]\r\n");
printf("dump <hexaddr> [length]\r\n");
printf("reboot\r\n");
printf("qs\r\n");
printf("ps [m]\r\n");
printf("vmstat\n");
printf("listfs\n");
printf("devices\n");
printf("callouts\n");
printf("prompt\r\n");
printf("vmmap <vmmap addr>\r\n");
printf("pmap <pmap addr>\r\n");
printf("pdstat\r\n");
printf("flush\r\n");
printf("exit\r\n");
printf("forceboot\r\n");
printf("dumppvs\r\n");
printf("pextract <phys addr>\r\n");
printf("vnode <vp>\r\n");
printf("buf <bp>\r\n");
#if NASC > 0
kprintf("ascdump\r\n");
printf("ascdump\r\n");
#endif
#ifdef XXX1
kprintf("vndbuf\r\n");
kprintf("vncbuf\r\n");
kprintf("bufstats\r\n");
printf("vndbuf\r\n");
printf("vncbuf\r\n");
printf("bufstats\r\n");
#endif
}
} while (!quit);

View File

@ -1,4 +1,4 @@
/* $NetBSD: shell_disassem.c,v 1.4 1996/10/11 00:07:08 christos Exp $ */
/* $NetBSD: shell_disassem.c,v 1.5 1996/10/13 03:06:07 christos Exp $ */
/*
* Copyright (c) 1994 Mark Brinicombe.
@ -71,7 +71,7 @@ shell_disassem(argc, argv)
u_char *addr;
if (argc < 2) {
kprintf("Syntax: dis <addr>\n\r");
printf("Syntax: dis <addr>\n\r");
return;
}
@ -79,7 +79,7 @@ shell_disassem(argc, argv)
addr = (u_char *)readhex(argv[1]);
kprintf("Interactive disassembly\n\r");
printf("Interactive disassembly\n\r");
do_disassemble(addr);
}
@ -160,18 +160,18 @@ do_disassemble(addr)
case '/' :
case '?' :
kprintf("\'\xe3\' - Backwards 1 word\n\r");
kprintf("\'\xe4\' - Forwards 1 word\n\r");
kprintf("\'\xe5\' - Backwords 16 words\n\r");
kprintf("\'\xe6\' - Forwards 16 words\n\r");
kprintf("\'Q\' - Quit\n\r");
kprintf("\'B\' - Back a word\n\r");
kprintf("\'R\' - Disassemble 16 words\n\r");
kprintf("\'J\' - Jump to address\n\r");
kprintf("\' \' - Branch to address\n\r");
kprintf("<BS> - Return from branch\n\r");
kprintf("\'-\' - Skip backwards 128 words\n\r");
kprintf("\'+\' - Skip forwards 128 words\n\r");
printf("\'\xe3\' - Backwards 1 word\n\r");
printf("\'\xe4\' - Forwards 1 word\n\r");
printf("\'\xe5\' - Backwords 16 words\n\r");
printf("\'\xe6\' - Forwards 16 words\n\r");
printf("\'Q\' - Quit\n\r");
printf("\'B\' - Back a word\n\r");
printf("\'R\' - Disassemble 16 words\n\r");
printf("\'J\' - Jump to address\n\r");
printf("\' \' - Branch to address\n\r");
printf("<BS> - Return from branch\n\r");
printf("\'-\' - Skip backwards 128 words\n\r");
printf("\'+\' - Skip forwards 128 words\n\r");
break;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: shell_input.c,v 1.4 1996/10/11 00:07:09 christos Exp $ */
/* $NetBSD: shell_input.c,v 1.5 1996/10/13 03:06:07 christos Exp $ */
/*
* Copyright (c) 1994 Mark Brinicombe.
@ -83,7 +83,7 @@ readstring(string, length, valid_string, insert)
if (insert && insert[0] != 0) {
strcpy(string, insert);
loop = strlen(insert);
kprintf("%s", insert);
printf("%s", insert);
} else
loop = 0;
@ -100,9 +100,9 @@ readstring(string, length, valid_string, insert)
* Display the cursor depending on what mode we are in
*/
if (!insert_mode)
kprintf("\xe2");
printf("\xe2");
else
kprintf("\xe1");
printf("\xe1");
#endif
/*
@ -117,9 +117,9 @@ readstring(string, length, valid_string, insert)
*/
if (loop == entered || entered == 0)
kprintf("\x7f");
printf("\x7f");
else
kprintf("\x08%c\x08", string[loop]);
printf("\x08%c\x08", string[loop]);
#endif
/*
@ -142,10 +142,10 @@ readstring(string, length, valid_string, insert)
}
--entered;
string[entered] = 0;
/* kprintf("\x1b[s%s \x1b[u", &string[loop]);*/
kprintf("\r%s \r", string);
/* printf("\x1b[s%s \x1b[u", &string[loop]);*/
printf("\r%s \r", string);
for (loop1 = 0; loop1 <= loop; ++loop1)
kprintf("\x09");
printf("\x09");
}
break;
@ -158,7 +158,7 @@ readstring(string, length, valid_string, insert)
int loop1;
if (loop == 0) {
kprintf("\x07");
printf("\x07");
break;
}
for (loop1 = loop-1; loop1 < (entered - 1); ++loop1) {
@ -167,10 +167,10 @@ readstring(string, length, valid_string, insert)
--loop;
--entered;
string[entered] = 0;
/* kprintf("\x1b[D\x1b[s%s \x1b[u", &string[loop]);*/
kprintf("\r%s \r", string);
/* printf("\x1b[D\x1b[s%s \x1b[u", &string[loop]);*/
printf("\r%s \r", string);
for (loop1 = 0; loop1 < loop; ++loop1)
kprintf("\x09");
printf("\x09");
}
break;
@ -206,7 +206,7 @@ readstring(string, length, valid_string, insert)
if (loop < 0)
loop = 0;
else
kprintf("\x1b[D");
printf("\x1b[D");
break;
/*
@ -218,7 +218,7 @@ readstring(string, length, valid_string, insert)
if (loop > entered)
loop = entered;
else
kprintf("\x1b[C");
printf("\x1b[C");
break;
/*
@ -243,7 +243,7 @@ readstring(string, length, valid_string, insert)
&& (valid_string == NULL || strchr(valid_string, key))) {
if (!insert_mode && loop < length) {
string[loop] = key;
kprintf("%c", key);
printf("%c", key);
++loop;
if (loop > entered) entered = loop;
}
@ -257,18 +257,18 @@ readstring(string, length, valid_string, insert)
++loop;
++entered;
string[entered] = 0;
if (loop != entered) kprintf("\x1b[s");
kprintf("%s", &string[loop-1]);
if (loop != entered) kprintf("\x1b[u\x1b[C");
if (loop != entered) printf("\x1b[s");
printf("%s", &string[loop-1]);
if (loop != entered) printf("\x1b[u\x1b[C");
} else {
kprintf("\x07");
printf("\x07");
}
}
break;
}
} while (key != 0x0d && key != 0x0a);
kprintf("\n\r");
printf("\n\r");
string[entered] = 0;
@ -285,13 +285,13 @@ deleteline(loop, entered)
{
while (loop < entered) {
++loop;
kprintf("\x1b[C");
printf("\x1b[C");
}
while (loop > 0) {
--loop;
--entered;
kprintf("\x7f");
printf("\x7f");
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: shell_shell.c,v 1.8 1996/10/11 00:07:10 christos Exp $ */
/* $NetBSD: shell_shell.c,v 1.9 1996/10/13 03:06:08 christos Exp $ */
/*
* Copyright (c) 1994-1996 Mark Brinicombe.
@ -146,7 +146,7 @@ shell_poke(argc, argv)
u_int data;
if (argc < 3) {
kprintf("Syntax: poke[bw] <addr> <data>\n\r");
printf("Syntax: poke[bw] <addr> <data>\n\r");
return;
}
@ -173,7 +173,7 @@ shell_peek(argc, argv)
u_int data;
if (argc < 2) {
kprintf("Syntax: peek[bw] <addr>\n\r");
printf("Syntax: peek[bw] <addr>\n\r");
return;
}
@ -186,7 +186,7 @@ shell_peek(argc, argv)
else
data = ReadWord(addr);
kprintf("%08x : %08x\n\r", addr, data);
printf("%08x : %08x\n\r", addr, data);
}
@ -201,7 +201,7 @@ shell_dumpb(argc, argv)
int count;
if (argc < 2) {
kprintf("Syntax: dumpb <addr> [<bytes>]\n\r");
printf("Syntax: dumpb <addr> [<bytes>]\n\r");
return;
}
@ -229,7 +229,7 @@ shell_dumpw(argc, argv)
int count;
if (argc < 2) {
kprintf("Syntax: dumpw <addr> [<bytes>]\n\r");
printf("Syntax: dumpw <addr> [<bytes>]\n\r");
return;
}
@ -256,7 +256,7 @@ shell_vmmap(argc, argv)
u_char *addr;
if (argc < 2) {
kprintf("Syntax: vmmap <map addr>\n\r");
printf("Syntax: vmmap <map addr>\n\r");
return;
}
@ -278,7 +278,7 @@ shell_pmap(argc, argv)
u_char *addr;
if (argc < 2) {
kprintf("Syntax: pmap <pmap addr>\n\r");
printf("Syntax: pmap <pmap addr>\n\r");
return;
}
@ -309,7 +309,7 @@ shell_devices(argc, argv)
int loop;
char *state;
kprintf(" driver unit state name\n");
printf(" driver unit state name\n");
for (cf = cfdata; cf->cf_driver; ++cf) {
cd = cf->cf_driver;
if (cf->cf_fstate & FSTATE_FOUND)
@ -317,18 +317,18 @@ shell_devices(argc, argv)
else
state = "NOT FOUND";
kprintf("%08x %2d %s %s\n", (u_int)cd, (u_int)cf->cf_unit,
printf("%08x %2d %s %s\n", (u_int)cd, (u_int)cf->cf_unit,
state, cd->cd_name);
if (cf->cf_fstate & FSTATE_FOUND) {
for (loop = 0; loop < cd->cd_ndevs; ++loop) {
dv = (struct device *)cd->cd_devs[loop];
if (dv != 0)
kprintf(" %s (%08x)\n",
printf(" %s (%08x)\n",
dv->dv_xname, (u_int) dv);
}
}
kprintf("\n");
printf("\n");
}
}
@ -338,7 +338,7 @@ shell_reboot(argc, argv)
int argc;
char *argv[];
{
kprintf("Running shutdown hooks ...\n");
printf("Running shutdown hooks ...\n");
doshutdownhooks();
IRQdisable;
@ -373,37 +373,37 @@ shell_vmstat(argc, argv)
struct vmmeter sum;
sum = cnt;
(void)kprintf("%9u cpu context switches\n", sum.v_swtch);
(void)kprintf("%9u device interrupts\n", sum.v_intr);
(void)kprintf("%9u software interrupts\n", sum.v_soft);
(void)kprintf("%9u traps\n", sum.v_trap);
(void)kprintf("%9u system calls\n", sum.v_syscall);
(void)kprintf("%9u total faults taken\n", sum.v_faults);
(void)kprintf("%9u swap ins\n", sum.v_swpin);
(void)kprintf("%9u swap outs\n", sum.v_swpout);
(void)kprintf("%9u pages swapped in\n", sum.v_pswpin / CLSIZE);
(void)kprintf("%9u pages swapped out\n", sum.v_pswpout / CLSIZE);
(void)kprintf("%9u page ins\n", sum.v_pageins);
(void)kprintf("%9u page outs\n", sum.v_pageouts);
(void)kprintf("%9u pages paged in\n", sum.v_pgpgin);
(void)kprintf("%9u pages paged out\n", sum.v_pgpgout);
(void)kprintf("%9u pages reactivated\n", sum.v_reactivated);
(void)kprintf("%9u intransit blocking page faults\n", sum.v_intrans);
(void)kprintf("%9u zero fill pages created\n", sum.v_nzfod / CLSIZE);
(void)kprintf("%9u zero fill page faults\n", sum.v_zfod / CLSIZE);
(void)kprintf("%9u pages examined by the clock daemon\n", sum.v_scan);
(void)kprintf("%9u revolutions of the clock hand\n", sum.v_rev);
(void)kprintf("%9u VM object cache lookups\n", sum.v_lookups);
(void)kprintf("%9u VM object hits\n", sum.v_hits);
(void)kprintf("%9u total VM faults taken\n", sum.v_vm_faults);
(void)kprintf("%9u copy-on-write faults\n", sum.v_cow_faults);
(void)kprintf("%9u pages freed by daemon\n", sum.v_dfree);
(void)kprintf("%9u pages freed by exiting processes\n", sum.v_pfree);
(void)kprintf("%9u pages free\n", sum.v_free_count);
(void)kprintf("%9u pages wired down\n", sum.v_wire_count);
(void)kprintf("%9u pages active\n", sum.v_active_count);
(void)kprintf("%9u pages inactive\n", sum.v_inactive_count);
(void)kprintf("%9u bytes per page\n", sum.v_page_size);
(void)printf("%9u cpu context switches\n", sum.v_swtch);
(void)printf("%9u device interrupts\n", sum.v_intr);
(void)printf("%9u software interrupts\n", sum.v_soft);
(void)printf("%9u traps\n", sum.v_trap);
(void)printf("%9u system calls\n", sum.v_syscall);
(void)printf("%9u total faults taken\n", sum.v_faults);
(void)printf("%9u swap ins\n", sum.v_swpin);
(void)printf("%9u swap outs\n", sum.v_swpout);
(void)printf("%9u pages swapped in\n", sum.v_pswpin / CLSIZE);
(void)printf("%9u pages swapped out\n", sum.v_pswpout / CLSIZE);
(void)printf("%9u page ins\n", sum.v_pageins);
(void)printf("%9u page outs\n", sum.v_pageouts);
(void)printf("%9u pages paged in\n", sum.v_pgpgin);
(void)printf("%9u pages paged out\n", sum.v_pgpgout);
(void)printf("%9u pages reactivated\n", sum.v_reactivated);
(void)printf("%9u intransit blocking page faults\n", sum.v_intrans);
(void)printf("%9u zero fill pages created\n", sum.v_nzfod / CLSIZE);
(void)printf("%9u zero fill page faults\n", sum.v_zfod / CLSIZE);
(void)printf("%9u pages examined by the clock daemon\n", sum.v_scan);
(void)printf("%9u revolutions of the clock hand\n", sum.v_rev);
(void)printf("%9u VM object cache lookups\n", sum.v_lookups);
(void)printf("%9u VM object hits\n", sum.v_hits);
(void)printf("%9u total VM faults taken\n", sum.v_vm_faults);
(void)printf("%9u copy-on-write faults\n", sum.v_cow_faults);
(void)printf("%9u pages freed by daemon\n", sum.v_dfree);
(void)printf("%9u pages freed by exiting processes\n", sum.v_pfree);
(void)printf("%9u pages free\n", sum.v_free_count);
(void)printf("%9u pages wired down\n", sum.v_wire_count);
(void)printf("%9u pages active\n", sum.v_active_count);
(void)printf("%9u pages inactive\n", sum.v_inactive_count);
(void)printf("%9u bytes per page\n", sum.v_page_size);
}
@ -417,7 +417,7 @@ shell_pextract(argc, argv)
int pind;
if (argc < 2) {
kprintf("Syntax: pextract <addr>\n\r");
printf("Syntax: pextract <addr>\n\r");
return;
}
@ -428,7 +428,7 @@ shell_pextract(argc, argv)
pa = pmap_extract(kernel_pmap, (vm_offset_t)addr);
pind = pmap_page_index(pa);
kprintf("va=%08x pa=%08x pind=%d\n", (u_int)addr, (u_int)pa, pind);
printf("va=%08x pa=%08x pind=%d\n", (u_int)addr, (u_int)pa, pind);
}
@ -440,7 +440,7 @@ shell_vnode(argc, argv)
struct vnode *vp;
if (argc < 2) {
kprintf("Syntax: vnode <vp>\n\r");
printf("Syntax: vnode <vp>\n\r");
return;
}
@ -448,12 +448,12 @@ shell_vnode(argc, argv)
vp = (struct vnode *)readhex(argv[1]);
kprintf("vp = %08x\n", (u_int)vp);
kprintf("vp->v_type = %d\n", vp->v_type);
kprintf("vp->v_flag = %ld\n", vp->v_flag);
kprintf("vp->v_usecount = %d\n", vp->v_usecount);
kprintf("vp->v_writecount = %d\n", vp->v_writecount);
kprintf("vp->v_numoutput = %ld\n", vp->v_numoutput);
printf("vp = %08x\n", (u_int)vp);
printf("vp->v_type = %d\n", vp->v_type);
printf("vp->v_flag = %ld\n", vp->v_flag);
printf("vp->v_usecount = %d\n", vp->v_usecount);
printf("vp->v_writecount = %d\n", vp->v_writecount);
printf("vp->v_numoutput = %ld\n", vp->v_numoutput);
vprint("vnode:", vp);
}
@ -467,7 +467,7 @@ shell_buf(argc, argv)
struct buf *bp;
if (argc < 2) {
kprintf("Syntax: buf <bp>\n\r");
printf("Syntax: buf <bp>\n\r");
return;
}
@ -475,20 +475,20 @@ shell_buf(argc, argv)
bp = (struct buf *)readhex(argv[1]);
kprintf("buf pointer=%08x\n", (u_int)bp);
printf("buf pointer=%08x\n", (u_int)bp);
if (bp->b_proc)
kprintf("proc=%08x pid=%d\n", (u_int)bp->b_proc, bp->b_proc->p_pid);
printf("proc=%08x pid=%d\n", (u_int)bp->b_proc, bp->b_proc->p_pid);
kprintf("flags=%08x\n", (u_int)bp->b_proc);
kprintf("b_error=%d\n", bp->b_error);
kprintf("b_bufsize=%08x\n", (u_int)bp->b_bufsize);
kprintf("b_bcount=%08x\n", (u_int)bp->b_bcount);
kprintf("b_resid=%d\n", (int)bp->b_resid);
kprintf("b_bdev=%04x\n", bp->b_dev);
kprintf("b_baddr=%08x\n", (u_int)bp->b_un.b_addr);
kprintf("b_lblkno=%08x\n", (u_int)bp->b_lblkno);
kprintf("b_blkno=%08x\n", bp->b_blkno);
kprintf("b_vp=%08x\n", (u_int)bp->b_vp);
printf("flags=%08x\n", (u_int)bp->b_proc);
printf("b_error=%d\n", bp->b_error);
printf("b_bufsize=%08x\n", (u_int)bp->b_bufsize);
printf("b_bcount=%08x\n", (u_int)bp->b_bcount);
printf("b_resid=%d\n", (int)bp->b_resid);
printf("b_bdev=%04x\n", bp->b_dev);
printf("b_baddr=%08x\n", (u_int)bp->b_un.b_addr);
printf("b_lblkno=%08x\n", (u_int)bp->b_lblkno);
printf("b_blkno=%08x\n", bp->b_blkno);
printf("b_vp=%08x\n", (u_int)bp->b_vp);
}
@ -511,7 +511,7 @@ shell_vndbuf(argc, argv)
struct vnode *vp;
if (argc < 2) {
kprintf("Syntax: vndbuf <vp>\n\r");
printf("Syntax: vndbuf <vp>\n\r");
return;
}
@ -531,7 +531,7 @@ shell_vncbuf(argc, argv)
struct vnode *vp;
if (argc < 2) {
kprintf("Syntax: vndbuf <vp>\n\r");
printf("Syntax: vndbuf <vp>\n\r");
return;
}
@ -555,13 +555,13 @@ shell()
int args;
char *argv[20];
kprintf("\nRiscBSD debug/monitor shell\n");
kprintf("CTRL-D, exit or reboot to terminate\n\n");
printf("\nRiscBSD debug/monitor shell\n");
printf("CTRL-D, exit or reboot to terminate\n\n");
do {
/* print prompt */
kprintf("kshell> ");
printf("kshell> ");
/* Read line from keyboard */
@ -688,39 +688,39 @@ shell()
#endif
else if (strcmp(argv[0], "help") == 0
|| strcmp(argv[0], "?") == 0) {
kprintf("peekb <hexaddr>\r\n");
kprintf("pokeb <hexaddr> <data>\r\n");
kprintf("peekw <hexaddr>\r\n");
kprintf("pokew <hexaddr <data>\r\n");
kprintf("dis <hexaddr>\r\n");
kprintf("dumpb <hexaddr> [length]\r\n");
kprintf("dumpw <hexaddr> [length]\r\n");
kprintf("dump <hexaddr> [length]\r\n");
kprintf("reboot\r\n");
kprintf("qs\r\n");
kprintf("ps [m]\r\n");
kprintf("vmstat\n");
kprintf("listfs\n");
kprintf("devices\n");
kprintf("callouts\n");
kprintf("prompt\r\n");
kprintf("vmmap <vmmap addr>\r\n");
kprintf("pmap <pmap addr>\r\n");
kprintf("pdstat\r\n");
kprintf("flush\r\n");
kprintf("exit\r\n");
kprintf("forceboot\r\n");
kprintf("dumppvs\r\n");
kprintf("pextract <phys addr>\r\n");
kprintf("vnode <vp>\r\n");
kprintf("buf <bp>\r\n");
printf("peekb <hexaddr>\r\n");
printf("pokeb <hexaddr> <data>\r\n");
printf("peekw <hexaddr>\r\n");
printf("pokew <hexaddr <data>\r\n");
printf("dis <hexaddr>\r\n");
printf("dumpb <hexaddr> [length]\r\n");
printf("dumpw <hexaddr> [length]\r\n");
printf("dump <hexaddr> [length]\r\n");
printf("reboot\r\n");
printf("qs\r\n");
printf("ps [m]\r\n");
printf("vmstat\n");
printf("listfs\n");
printf("devices\n");
printf("callouts\n");
printf("prompt\r\n");
printf("vmmap <vmmap addr>\r\n");
printf("pmap <pmap addr>\r\n");
printf("pdstat\r\n");
printf("flush\r\n");
printf("exit\r\n");
printf("forceboot\r\n");
printf("dumppvs\r\n");
printf("pextract <phys addr>\r\n");
printf("vnode <vp>\r\n");
printf("buf <bp>\r\n");
#if NASC > 0
kprintf("ascdump\r\n");
printf("ascdump\r\n");
#endif
#ifdef XXX1
kprintf("vndbuf\r\n");
kprintf("vncbuf\r\n");
kprintf("bufstats\r\n");
printf("vndbuf\r\n");
printf("vncbuf\r\n");
printf("bufstats\r\n");
#endif
}
} while (!quit);

View File

@ -1,4 +1,4 @@
/* $NetBSD: beep.c,v 1.5 1996/10/11 00:07:12 christos Exp $ */
/* $NetBSD: beep.c,v 1.6 1996/10/13 03:06:10 christos Exp $ */
/*
* Copyright (c) 1995 Mark Brinicombe
@ -115,7 +115,7 @@ beepprobe(parent, match, aux)
return(1);
break;
default:
kprintf("beep: Unknown IOMD id=%04x", id);
printf("beep: Unknown IOMD id=%04x", id);
break;
}
return(0);
@ -173,11 +173,11 @@ beepattach(parent, self, aux)
disable_irq(IRQ_DMASCH0);
/*
kprintf(" [ buf0=%08x:%08x->%08x buf1=%08x:%08x->%08x ]",
printf(" [ buf0=%08x:%08x->%08x buf1=%08x:%08x->%08x ]",
(u_int)sc->sc_buffer0, sc->sc_sound_cur0, sc->sc_sound_end0,
(u_int)sc->sc_buffer1, sc->sc_sound_cur1, sc->sc_sound_end1);
*/
kprintf("\n");
printf("\n");
/* Set sample rate to 32us */
@ -258,14 +258,14 @@ beep_generate(void)
/* int status;*/
if (sc->sc_count > 0) {
/* kprintf("beep: active\n");*/
/* printf("beep: active\n");*/
return;
}
/* kprintf("beep: generate ");*/
/* printf("beep: generate ");*/
++sc->sc_count;
/* status = ReadByte(IOMD_SD0ST);
kprintf("st=%02x\n", status);*/
printf("st=%02x\n", status);*/
WriteByte(IOMD_SD0CR, 0x90);
WriteByte(IOMD_SD0CR, 0x30);
beepdma(sc, 0);
@ -299,8 +299,8 @@ beepioctl(dev, cmd, data, flag, p)
break;
case BEEP_SET:
kprintf("set %08x\n", (u_int)data);
kprintf("set %08x %08x\n", (u_int)wave->addr, wave->size);
printf("set %08x\n", (u_int)data);
printf("set %08x %08x\n", (u_int)wave->addr, wave->size);
if (wave->size < 16 || wave->size > NBPG)
return(ENXIO);
copyin(wave->addr, (char *)sc->sc_buffer0, wave->size);
@ -321,7 +321,7 @@ int
beepintr(sc)
struct beep_softc *sc;
{
/* kprintf("beepintr: %02x,%02x,%02x,%d\n", ReadByte(IOMD_DMARQ),
/* printf("beepintr: %02x,%02x,%02x,%d\n", ReadByte(IOMD_DMARQ),
ReadByte(IOMD_SD0CR), ReadByte(IOMD_SD0ST), sc->sc_count);*/
WriteByte(IOMD_DMARQ, 0x10);
--sc->sc_count;
@ -329,7 +329,7 @@ beepintr(sc)
WriteWord(IOMD_SD0CURB, sc->sc_sound_cur1);
WriteWord(IOMD_SD0ENDB, sc->sc_sound_end1 | (1 << 30));
disable_irq(IRQ_DMASCH0);
/* kprintf("stop:st=%02x\n", ReadByte(IOMD_SD0ST));*/
/* printf("stop:st=%02x\n", ReadByte(IOMD_SD0ST));*/
return(1);
}
@ -344,9 +344,9 @@ beepdma(sc, buf)
int buf;
{
int status;
/* kprintf("beep:dma %d", buf); */
/* printf("beep:dma %d", buf); */
status = ReadByte(IOMD_SD0ST);
/* kprintf("st=%02x\n", status);*/
/* printf("st=%02x\n", status);*/
if (buf == 0) {
WriteWord(IOMD_SD0CURA, sc->sc_sound_cur0);
@ -361,7 +361,7 @@ beepdma(sc, buf)
}
/* status = ReadByte(IOMD_SD0ST);
kprintf("st=%02x\n", status);*/
printf("st=%02x\n", status);*/
enable_irq(IRQ_DMASCH0);
}

Some files were not shown because too many files have changed in this diff Show More