Sync with HEAD ktrace-lwp
authorskrll <skrll@NetBSD.org>
Tue, 03 Aug 2004 10:51:04 +0000
branchktrace-lwp
changeset 290350 994f369760ce
parent 290349 3e3180fae7d1
child 290351 c6d4dfa593a1
Sync with HEAD
sys/dev/rasops/rasops.c
sys/dev/rasops/rasops.h
sys/dev/rasops/rasops8.c
sys/dev/rcons/files.rcons
sys/dev/rcons/raster.h
sys/dev/rcons/raster_op.c
sys/dev/rcons/raster_text.c
sys/dev/rcons/rcons.h
sys/dev/rcons/rcons_kern.c
sys/dev/rcons/rcons_subr.c
sys/dev/sbus/be.c
sys/dev/sbus/bereg.h
sys/dev/sbus/bpp.c
sys/dev/sbus/bwtwo_sbus.c
sys/dev/sbus/cgsix_sbus.c
sys/dev/sbus/cgthree_sbus.c
sys/dev/sbus/cs4231_sbus.c
sys/dev/sbus/dma_sbus.c
sys/dev/sbus/esp_sbus.c
sys/dev/sbus/files.sbus
sys/dev/sbus/if_hme_sbus.c
sys/dev/sbus/if_le.c
sys/dev/sbus/if_le_lebuffer.c
sys/dev/sbus/if_le_ledma.c
sys/dev/sbus/isp_sbus.c
sys/dev/sbus/lebuffer.c
sys/dev/sbus/lebuffervar.h
sys/dev/sbus/magma.c
sys/dev/sbus/p9100.c
sys/dev/sbus/qe.c
sys/dev/sbus/qec.c
sys/dev/sbus/qecvar.h
sys/dev/sbus/sbusvar.h
sys/dev/sbus/sio16.c
sys/dev/sbus/spif.c
sys/dev/sbus/spifreg.h
sys/dev/sbus/spifvar.h
sys/dev/sbus/stp4020.c
sys/dev/sbus/stp4020reg.h
sys/dev/sbus/tcx.c
sys/dev/sbus/xbox.c
sys/dev/sbus/zx.c
sys/dev/scsipi/atapi_base.c
sys/dev/scsipi/atapi_cd.h
sys/dev/scsipi/atapi_disk.h
sys/dev/scsipi/atapi_wdc.c
sys/dev/scsipi/atapiconf.c
sys/dev/scsipi/cd.c
sys/dev/scsipi/cd_atapi.c
sys/dev/scsipi/cd_scsi.c
sys/dev/scsipi/cdvar.h
sys/dev/scsipi/ch.c
sys/dev/scsipi/files.scsipi
sys/dev/scsipi/if_se.c
sys/dev/scsipi/scsi_cd.h
sys/dev/scsipi/scsi_disk.h
sys/dev/scsipi/scsiconf.c
sys/dev/scsipi/scsipi_all.h
sys/dev/scsipi/scsipi_base.c
sys/dev/scsipi/scsipi_cd.h
sys/dev/scsipi/scsipi_disk.h
sys/dev/scsipi/scsipi_verbose.c
sys/dev/scsipi/scsipiconf.h
sys/dev/scsipi/sd.c
sys/dev/scsipi/sd_atapi.c
sys/dev/scsipi/sd_scsi.c
sys/dev/scsipi/sdvar.h
sys/dev/scsipi/ss.c
sys/dev/scsipi/ss_scanjet.c
sys/dev/scsipi/ssvar.h
sys/dev/scsipi/st_atapi.c
sys/dev/scsipi/uk.c
sys/dev/smbus/m41t81reg.h
sys/dev/std/ieee1212.c
sys/dev/sun/bt_subr.c
sys/dev/sun/btreg.h
sys/dev/sun/btvar.h
sys/dev/sun/bwtwo.c
sys/dev/sun/bwtworeg.h
sys/dev/sun/bwtwovar.h
sys/dev/sun/cgsix.c
sys/dev/sun/cgsixreg.h
sys/dev/sun/cgthree.c
sys/dev/sun/cgthreereg.h
sys/dev/sun/disklabel.h
sys/dev/sun/disksubr.c
sys/dev/sun/event.c
sys/dev/sun/event_var.h
sys/dev/sun/fb.c
sys/dev/sun/fbio.h
sys/dev/sun/fbvar.h
sys/dev/sun/kbd.c
sys/dev/sun/kbd_ms_ttyvar.h
sys/dev/sun/kbd_reg.h
sys/dev/sun/kbd_xlate.h
sys/dev/sun/kbd_zs.c
sys/dev/sun/kbdsun.c
sys/dev/sun/kbdsunvar.h
sys/dev/sun/kbdvar.h
sys/dev/sun/kbio.h
sys/dev/sun/ms.c
sys/dev/sun/ms_zs.c
sys/dev/sun/msvar.h
sys/dev/sun/pfour_subr.c
sys/dev/sun/pfourreg.h
sys/dev/sun/sunkbd.c
sys/dev/sun/sunms.c
sys/dev/sun/vuid_event.h
sys/dev/sun/wskbdmap_sun.c
sys/dev/sysmon/sysmon_envsys.c
sys/dev/sysmon/sysmon_power.c
sys/dev/sysmon/sysmon_taskq.c
sys/dev/sysmon/sysmon_wdog.c
sys/dev/sysmon/sysmonvar.h
sys/dev/tc/bba.c
sys/dev/tc/cfb.c
sys/dev/tc/devlist2h.awk
sys/dev/tc/if_levar.h
sys/dev/tc/ioasic_subr.c
sys/dev/tc/ioasicreg.h
sys/dev/tc/ioasicvar.h
sys/dev/tc/mfb.c
sys/dev/tc/px.c
sys/dev/tc/pxg.c
sys/dev/tc/sfb.c
sys/dev/tc/sfbplus.c
sys/dev/tc/stic.c
sys/dev/tc/sticvar.h
sys/dev/tc/tc.c
sys/dev/tc/tcdevs
sys/dev/tc/tcdevs.h
sys/dev/tc/tcdevs_data.h
sys/dev/tc/tcdsreg.h
sys/dev/tc/tcvar.h
sys/dev/tc/tfb.c
sys/dev/tc/xcfb.c
sys/dev/tc/zskbd.c
sys/dev/tc/zsms.c
sys/dev/usb/devlist2h.awk
sys/dev/usb/ehci.c
sys/dev/usb/ehcireg.h
sys/dev/usb/ezload.c
sys/dev/usb/files.usb
sys/dev/usb/if_aue.c
sys/dev/usb/if_cue.c
sys/dev/usb/if_kue.c
sys/dev/usb/if_uax.c
sys/dev/usb/if_udav.c
sys/dev/usb/if_udavreg.h
sys/dev/usb/if_upl.c
sys/dev/usb/if_url.c
sys/dev/usb/if_urlreg.h
sys/dev/usb/ohci.c
sys/dev/usb/ohcivar.h
sys/dev/usb/uaudio.c
sys/dev/usb/ubsa.c
sys/dev/usb/ubt.c
sys/dev/usb/ubtbcmfw.c
sys/dev/usb/ubtbcmfw.h
sys/dev/usb/ucom.c
sys/dev/usb/udsbr.c
sys/dev/usb/uep.c
sys/dev/usb/uftdi.c
sys/dev/usb/ugen.c
sys/dev/usb/ugraphire_rdesc.h
sys/dev/usb/uhci.c
sys/dev/usb/uhid.c
sys/dev/usb/uhidev.c
sys/dev/usb/uhub.c
sys/dev/usb/uirda.c
sys/dev/usb/ukbdmap.c
sys/dev/usb/ulpt.c
sys/dev/usb/umass.c
sys/dev/usb/umass_isdata.c
sys/dev/usb/umass_quirks.c
sys/dev/usb/umass_scsipi.c
sys/dev/usb/umassvar.h
sys/dev/usb/umct.c
sys/dev/usb/umidi.c
sys/dev/usb/umidi_quirks.c
sys/dev/usb/umidi_quirks.h
sys/dev/usb/umidireg.h
sys/dev/usb/umidivar.h
sys/dev/usb/umodem.c
sys/dev/usb/uplcom.c
sys/dev/usb/urio.c
sys/dev/usb/usb.c
sys/dev/usb/usb.h
sys/dev/usb/usb_mem.c
sys/dev/usb/usb_quirks.c
sys/dev/usb/usb_subr.c
sys/dev/usb/usbdevs
sys/dev/usb/usbdevs.h
sys/dev/usb/usbdevs_data.h
sys/dev/usb/usbdi.c
sys/dev/usb/usbdi.h
sys/dev/usb/usbdi_util.h
sys/dev/usb/usbdivar.h
sys/dev/usb/uscanner.c
sys/dev/usb/usscanner.c
sys/dev/usb/ustir.c
sys/dev/usb/uvisor.c
sys/dev/usb/uvscom.c
sys/dev/usb/uyap.c
sys/dev/vinum/Makefile
sys/dev/vinum/files.vinum
sys/dev/vinum/makestatetext
sys/dev/vinum/makeuser
sys/dev/vinum/request.h
sys/dev/vinum/statetexts.h
sys/dev/vinum/vinum.c
sys/dev/vinum/vinumconfig.c
sys/dev/vinum/vinumdaemon.c
sys/dev/vinum/vinumext.h
sys/dev/vinum/vinumhdr.h
sys/dev/vinum/vinuminterrupt.c
sys/dev/vinum/vinumio.c
sys/dev/vinum/vinumio.h
sys/dev/vinum/vinumioctl.c
sys/dev/vinum/vinumkw.h
sys/dev/vinum/vinumlock.c
sys/dev/vinum/vinummemory.c
sys/dev/vinum/vinumobj.h
sys/dev/vinum/vinumparser.c
sys/dev/vinum/vinumqsort.c
sys/dev/vinum/vinumraid5.c
sys/dev/vinum/vinumrequest.c
sys/dev/vinum/vinumrevive.c
sys/dev/vinum/vinumstate.c
sys/dev/vinum/vinumstate.h
sys/dev/vinum/vinumutil.c
sys/dev/vinum/vinumutil.h
sys/dev/vinum/vinumvar.h
sys/dev/vme/if_ie_vme.c
sys/dev/vme/vme.c
sys/dev/vme/vmereg.h
sys/dev/vme/xd.c
sys/dev/vme/xdreg.h
sys/dev/vme/xy.c
sys/dev/vme/xyreg.h
sys/dev/wscons/files.wscons
sys/dev/wscons/mra.c
sys/dev/wscons/tpcalib.c
sys/dev/wscons/tpcalibvar.h
sys/dev/wscons/wscons_raster.h
sys/dev/wscons/wscons_rfont.h
sys/dev/wscons/wscons_rinit.c
sys/dev/wscons/wscons_rops.c
sys/dev/wscons/wsconsio.h
sys/dev/wscons/wsdisplay.c
sys/dev/wscons/wsdisplay_compat_usl.c
sys/dev/wscons/wsdisplayvar.h
sys/dev/wscons/wsemul_sun.c
sys/dev/wscons/wsemul_vt100.c
sys/dev/wscons/wsemul_vt100_chars.c
sys/dev/wscons/wsemul_vt100_keys.c
sys/dev/wscons/wsemul_vt100_subr.c
sys/dev/wscons/wsemul_vt100var.h
sys/dev/wscons/wsemulconf.c
sys/dev/wscons/wsemulvar.h
sys/dev/wscons/wsevent.c
sys/dev/wscons/wseventvar.h
sys/dev/wscons/wskbd.c
sys/dev/wscons/wsksymdef.h
sys/dev/wscons/wsmouse.c
sys/dev/wscons/wsmux.c
sys/dev/wsfont/files.wsfont
sys/dev/wsfont/gallant12x22.h
sys/dev/wsfont/omron12x20.h
sys/dev/wsfont/qvss8x15.h
sys/dev/wsfont/sony12x24.h
sys/dev/wsfont/sony8x16.h
sys/dev/wsfont/vt220koi8x10.h
sys/dev/wsfont/wsfont.c
sys/dist/pf/net/if_pflog.c
sys/dist/pf/net/if_pflog.h
sys/dist/pf/net/pf.c
sys/dist/pf/net/pf_if.c
sys/dist/pf/net/pf_ioctl.c
sys/dist/pf/net/pf_norm.c
sys/dist/pf/net/pf_osfp.c
sys/dist/pf/net/pf_table.c
sys/dist/pf/net/pfvar.h
sys/fs/adosfs/adlookup.c
sys/fs/adosfs/adosfs.h
sys/fs/adosfs/advfsops.c
sys/fs/adosfs/advnops.c
sys/fs/cd9660/cd9660_bmap.c
sys/fs/cd9660/cd9660_extern.h
sys/fs/cd9660/cd9660_lookup.c
sys/fs/cd9660/cd9660_mount.h
sys/fs/cd9660/cd9660_node.c
sys/fs/cd9660/cd9660_node.h
sys/fs/cd9660/cd9660_rrip.c
sys/fs/cd9660/cd9660_rrip.h
sys/fs/cd9660/cd9660_util.c
sys/fs/cd9660/cd9660_vfsops.c
sys/fs/cd9660/cd9660_vnops.c
sys/fs/cd9660/iso.h
sys/fs/cd9660/iso_rrip.h
sys/fs/filecorefs/filecore.h
sys/fs/filecorefs/filecore_bmap.c
sys/fs/filecorefs/filecore_extern.h
sys/fs/filecorefs/filecore_lookup.c
sys/fs/filecorefs/filecore_mount.h
sys/fs/filecorefs/filecore_node.c
sys/fs/filecorefs/filecore_node.h
sys/fs/filecorefs/filecore_utils.c
sys/fs/filecorefs/filecore_vfsops.c
sys/fs/filecorefs/filecore_vnops.c
sys/fs/msdosfs/bootsect.h
sys/fs/msdosfs/bpb.h
sys/fs/msdosfs/denode.h
sys/fs/msdosfs/direntry.h
sys/fs/msdosfs/msdosfs_conv.c
sys/fs/msdosfs/msdosfs_denode.c
sys/fs/msdosfs/msdosfs_fat.c
sys/fs/msdosfs/msdosfs_vfsops.c
sys/fs/msdosfs/msdosfs_vnops.c
sys/fs/msdosfs/msdosfsmount.h
sys/fs/ntfs/TODO
sys/fs/ntfs/ntfs_ihash.c
sys/fs/ntfs/ntfs_subr.c
sys/fs/ntfs/ntfs_vfsops.c
sys/fs/ntfs/ntfs_vfsops.h
sys/fs/ntfs/ntfs_vnops.c
sys/fs/ntfs/ntfsmount.h
sys/fs/smbfs/smbfs_io.c
sys/fs/smbfs/smbfs_kq.c
sys/fs/smbfs/smbfs_node.c
sys/fs/smbfs/smbfs_node.h
sys/fs/smbfs/smbfs_smb.c
sys/fs/smbfs/smbfs_subr.h
sys/fs/smbfs/smbfs_vfsops.c
sys/fs/smbfs/smbfs_vnops.c
sys/fs/union/union.h
sys/fs/union/union_subr.c
sys/fs/union/union_vfsops.c
sys/fs/union/union_vnops.c
sys/kern/Makefile
sys/kern/cnmagic.c
sys/kern/core_elf32.c
sys/kern/core_netbsd.c
sys/kern/exec_aout.c
sys/kern/exec_conf.c
sys/kern/exec_ecoff.c
sys/kern/exec_elf32.c
sys/kern/exec_elf_common.c
sys/kern/exec_macho.c
sys/kern/exec_script.c
sys/kern/exec_subr.c
sys/kern/init_main.c
sys/kern/init_sysctl.c
sys/kern/init_sysent.c
sys/kern/kern_acct.c
sys/kern/kern_allocsys.c
sys/kern/kern_clock.c
sys/kern/kern_descrip.c
sys/kern/kern_event.c
sys/kern/kern_exec.c
sys/kern/kern_exit.c
sys/kern/kern_fork.c
sys/kern/kern_kcont.c
sys/kern/kern_ksyms.c
sys/kern/kern_ktrace.c
sys/kern/kern_lkm.c
sys/kern/kern_lock.c
sys/kern/kern_lwp.c
sys/kern/kern_malloc.c
sys/kern/kern_malloc_debug.c
sys/kern/kern_microtime.c
sys/kern/kern_ntptime.c
sys/kern/kern_physio.c
sys/kern/kern_proc.c
sys/kern/kern_prot.c
sys/kern/kern_ras.c
sys/kern/kern_resource.c
sys/kern/kern_sa.c
sys/kern/kern_sig.c
sys/kern/kern_subr.c
sys/kern/kern_synch.c
sys/kern/kern_sysctl.c
sys/kern/kern_systrace.c
sys/kern/kern_time.c
sys/kern/kern_timeout.c
sys/kern/kern_uuid.c
sys/kern/kern_verifiedexec.c
sys/kern/kern_xxx.c
sys/kern/kgdb_stub.c
sys/kern/makesyscalls.sh
sys/kern/subr_autoconf.c
sys/kern/subr_devsw.c
sys/kern/subr_disk.c
sys/kern/subr_disk_mbr.c
sys/kern/subr_evcnt.c
sys/kern/subr_extent.c
sys/kern/subr_log.c
sys/kern/subr_pool.c
sys/kern/subr_prf.c
sys/kern/subr_prof.c
sys/kern/subr_prop.c
sys/kern/subr_userconf.c
sys/kern/subr_xxx.c
sys/kern/sys_generic.c
sys/kern/sys_pipe.c
sys/kern/sys_process.c
sys/kern/sys_socket.c
sys/kern/syscalls.c
sys/kern/syscalls.conf
sys/kern/syscalls.master
sys/kern/sysv_msg.c
sys/kern/sysv_sem.c
sys/kern/sysv_shm.c
sys/kern/tty.c
sys/kern/tty_conf.c
sys/kern/tty_pty.c
sys/kern/tty_subr.c
sys/kern/tty_tb.c
sys/kern/tty_tty.c
sys/kern/uipc_domain.c
sys/kern/uipc_mbuf.c
sys/kern/uipc_mbuf2.c
sys/kern/uipc_proto.c
sys/kern/uipc_sem.c
sys/kern/uipc_socket.c
sys/kern/uipc_socket2.c
sys/kern/uipc_syscalls.c
sys/kern/uipc_usrreq.c
sys/kern/vfs_bio.c
sys/kern/vfs_cache.c
sys/kern/vfs_getcwd.c
sys/kern/vfs_init.c
sys/kern/vfs_lockf.c
sys/kern/vfs_lookup.c
sys/kern/vfs_subr.c
sys/kern/vfs_syscalls.c
sys/kern/vfs_vnops.c
sys/kern/vnode_if.c
sys/kern/vnode_if.sh
sys/kern/vnode_if.src
sys/lib/libkern/Makefile
sys/lib/libkern/Makefile.inc
sys/lib/libkern/adddi3.c
sys/lib/libkern/anddi3.c
sys/lib/libkern/arc4random.c
sys/lib/libkern/arch/arm/bzero.S
sys/lib/libkern/arch/arm/memcmp.S
sys/lib/libkern/arch/arm/memcpy.S
sys/lib/libkern/arch/arm/memcpy_arm.S
sys/lib/libkern/arch/arm/memcpy_xscale.S
sys/lib/libkern/arch/arm/memmove.S
sys/lib/libkern/arch/arm/memset.S
sys/lib/libkern/arch/hppa/Makefile.inc
sys/lib/libkern/arch/hppa/bcopy.S
sys/lib/libkern/arch/hppa/strlcpy.S
sys/lib/libkern/arch/i386/Makefile.inc
sys/lib/libkern/arch/i386/bcmp.S
sys/lib/libkern/arch/i386/bcopy.S
sys/lib/libkern/arch/i386/byte_swap_2.S
sys/lib/libkern/arch/i386/byte_swap_4.S
sys/lib/libkern/arch/i386/bzero.S
sys/lib/libkern/arch/i386/ffs.S
sys/lib/libkern/arch/i386/index.S
sys/lib/libkern/arch/i386/memchr.S
sys/lib/libkern/arch/i386/memcmp.S
sys/lib/libkern/arch/i386/memcpy.S
sys/lib/libkern/arch/i386/memset.S
sys/lib/libkern/arch/i386/rindex.S
sys/lib/libkern/arch/i386/strcat.S
sys/lib/libkern/arch/i386/strchr.S
sys/lib/libkern/arch/i386/strcmp.S
sys/lib/libkern/arch/i386/strcpy.S
sys/lib/libkern/arch/i386/strlen.S
sys/lib/libkern/arch/i386/strrchr.S
sys/lib/libkern/arch/m68k/Makefile.inc
sys/lib/libkern/arch/m68k/SYS.h
sys/lib/libkern/arch/m68k/bcmp.S
sys/lib/libkern/arch/m68k/bcopy.S
sys/lib/libkern/arch/m68k/bzero.S
sys/lib/libkern/arch/m68k/ffs.S
sys/lib/libkern/arch/m68k/htonl.S
sys/lib/libkern/arch/m68k/htons.S
sys/lib/libkern/arch/m68k/index.S
sys/lib/libkern/arch/m68k/memcmp.S
sys/lib/libkern/arch/m68k/memset.S
sys/lib/libkern/arch/m68k/ntohl.S
sys/lib/libkern/arch/m68k/ntohs.S
sys/lib/libkern/arch/m68k/rindex.S
sys/lib/libkern/arch/m68k/scanc.S
sys/lib/libkern/arch/m68k/skpc.S
sys/lib/libkern/arch/m68k/strcat.S
sys/lib/libkern/arch/m68k/strcmp.S
sys/lib/libkern/arch/m68k/strcpy.S
sys/lib/libkern/arch/m68k/strlen.S
sys/lib/libkern/arch/m68k/strncmp.S
sys/lib/libkern/arch/m68k/strncpy.S
sys/lib/libkern/arch/mips/byte_swap_2.S
sys/lib/libkern/arch/mips/byte_swap_4.S
sys/lib/libkern/arch/mips/ffs.S
sys/lib/libkern/arch/ns32k/SYS.h
sys/lib/libkern/arch/pdp10/Makefile.inc
sys/lib/libkern/arch/pdp10/alloca.S
sys/lib/libkern/arch/pdp10/structcpy.c
sys/lib/libkern/arch/powerpc/Makefile.inc
sys/lib/libkern/arch/powerpc/bzero.S
sys/lib/libkern/arch/powerpc/memset.S
sys/lib/libkern/arch/powerpc/strlen.S
sys/lib/libkern/arch/sh3/Makefile.inc
sys/lib/libkern/arch/sh3/bcopy.S
sys/lib/libkern/arch/sh3/byte_swap_2.S
sys/lib/libkern/arch/sh3/byte_swap_4.S
sys/lib/libkern/arch/sh3/byte_swap_8.S
sys/lib/libkern/arch/sh3/bzero.S
sys/lib/libkern/arch/sh3/memmove.S
sys/lib/libkern/arch/sh3/sdivsi3.S
sys/lib/libkern/arch/sh3/udivsi3.S
sys/lib/libkern/arch/sparc/Makefile.inc
sys/lib/libkern/arch/sparc/SYS.h
sys/lib/libkern/arch/sparc/bzero.S
sys/lib/libkern/arch/sparc/divrem.m4
sys/lib/libkern/arch/sparc/ffs.S
sys/lib/libkern/arch/sparc/htonl.S
sys/lib/libkern/arch/sparc/htons.S
sys/lib/libkern/arch/sparc/mul.S
sys/lib/libkern/arch/sparc/ntohl.S
sys/lib/libkern/arch/sparc/ntohs.S
sys/lib/libkern/arch/sparc/saveregs.S
sys/lib/libkern/arch/sparc/strlen.S
sys/lib/libkern/arch/sparc/umul.S
sys/lib/libkern/arch/sparc64/DEFS.h
sys/lib/libkern/arch/sparc64/Makefile.inc
sys/lib/libkern/arch/sparc64/SYS.h
sys/lib/libkern/arch/sparc64/bzero.S
sys/lib/libkern/arch/sparc64/divrem.m4
sys/lib/libkern/arch/sparc64/ffs.S
sys/lib/libkern/arch/sparc64/htonl.S
sys/lib/libkern/arch/sparc64/htons.S
sys/lib/libkern/arch/sparc64/mul.S
sys/lib/libkern/arch/sparc64/ntohl.S
sys/lib/libkern/arch/sparc64/ntohs.S
sys/lib/libkern/arch/sparc64/saveregs.S
sys/lib/libkern/arch/sparc64/strlen.S
sys/lib/libkern/arch/sparc64/umul.S
sys/lib/libkern/arch/vax/Makefile.inc
sys/lib/libkern/arch/vax/blkcpy.S
sys/lib/libkern/arch/vax/udiv.S
sys/lib/libkern/arch/vax/urem.S
sys/lib/libkern/arch/x86_64/bcopy.S
sys/lib/libkern/arch/x86_64/byte_swap_2.S
sys/lib/libkern/arch/x86_64/byte_swap_4.S
sys/lib/libkern/arch/x86_64/bzero.S
sys/lib/libkern/arch/x86_64/ffs.S
sys/lib/libkern/arch/x86_64/index.S
sys/lib/libkern/arch/x86_64/memchr.S
sys/lib/libkern/arch/x86_64/memcmp.S
sys/lib/libkern/arch/x86_64/memset.S
sys/lib/libkern/arch/x86_64/rindex.S
sys/lib/libkern/arch/x86_64/strcat.S
sys/lib/libkern/arch/x86_64/strcmp.S
sys/lib/libkern/arch/x86_64/strcpy.S
sys/lib/libkern/arch/x86_64/strlen.S
sys/lib/libkern/ashldi3.c
sys/lib/libkern/ashrdi3.c
sys/lib/libkern/bcmp.c
sys/lib/libkern/bcopy.c
sys/lib/libkern/bswap16.c
sys/lib/libkern/bswap32.c
sys/lib/libkern/bswap64.c
sys/lib/libkern/cmpdi2.c
sys/lib/libkern/divdi3.c
sys/lib/libkern/ffs.c
sys/lib/libkern/htonl.c
sys/lib/libkern/htons.c
sys/lib/libkern/imax.c
sys/lib/libkern/imin.c
sys/lib/libkern/index.c
sys/lib/libkern/iordi3.c
sys/lib/libkern/libkern.h
sys/lib/libkern/lmax.c
sys/lib/libkern/lmin.c
sys/lib/libkern/lshldi3.c
sys/lib/libkern/lshrdi3.c
sys/lib/libkern/max.c
sys/lib/libkern/mcount.c
sys/lib/libkern/md4c.c
sys/lib/libkern/md5c.c
sys/lib/libkern/memchr.c
sys/lib/libkern/memcmp.c
sys/lib/libkern/memset.c
sys/lib/libkern/min.c
sys/lib/libkern/moddi3.c
sys/lib/libkern/muldi3.c
sys/lib/libkern/negdi2.c
sys/lib/libkern/notdi2.c
sys/lib/libkern/ntohl.c
sys/lib/libkern/ntohs.c
sys/lib/libkern/pmatch.c
sys/lib/libkern/qdivrem.c
sys/lib/libkern/quad.h
sys/lib/libkern/random.c
sys/lib/libkern/rindex.c
sys/lib/libkern/scanc.c
sys/lib/libkern/sha1.c
sys/lib/libkern/skpc.c
sys/lib/libkern/softfloat.c
sys/lib/libkern/strcat.c
sys/lib/libkern/strchr.c
sys/lib/libkern/strcmp.c
sys/lib/libkern/strcpy.c
sys/lib/libkern/strlen.c
sys/lib/libkern/strncmp.c
sys/lib/libkern/strncpy.c
sys/lib/libkern/strrchr.c
sys/lib/libkern/strstr.c
sys/lib/libkern/strtoul.c
sys/lib/libkern/subdi3.c
sys/lib/libkern/ucmpdi2.c
sys/lib/libkern/udivdi3.c
sys/lib/libkern/ulmax.c
sys/lib/libkern/ulmin.c
sys/lib/libkern/umoddi3.c
sys/lib/libkern/xlat_mbr_fstype.c
sys/lib/libkern/xordi3.c
sys/lib/libsa/Makefile
sys/lib/libsa/Makefile.inc
sys/lib/libsa/alloc.c
sys/lib/libsa/arp.c
sys/lib/libsa/bcmp.c
sys/lib/libsa/bcopy.c
sys/lib/libsa/bootp.c
sys/lib/libsa/cd9660.c
sys/lib/libsa/cd9660.h
sys/lib/libsa/close.c
sys/lib/libsa/closeall.c
sys/lib/libsa/cread.c
sys/lib/libsa/dev.c
sys/lib/libsa/disklabel.c
sys/lib/libsa/dkcksum.c
sys/lib/libsa/dosfs.c
sys/lib/libsa/dosfs.h
sys/lib/libsa/errno.c
sys/lib/libsa/ether.c
sys/lib/libsa/exec.c
sys/lib/libsa/ffsv1.c
sys/lib/libsa/ffsv2.c
sys/lib/libsa/fstat.c
sys/lib/libsa/getfile.c
sys/lib/libsa/gets.c
sys/lib/libsa/ioctl.c
sys/lib/libsa/lfs.h
sys/lib/libsa/loadfile.c
sys/lib/libsa/loadfile_aout.c
sys/lib/libsa/loadfile_elf32.c
sys/lib/libsa/lseek.c
sys/lib/libsa/memcmp.c
sys/lib/libsa/memcpy.c
sys/lib/libsa/memmove.c
sys/lib/libsa/net.c
sys/lib/libsa/nfs.c
sys/lib/libsa/nfs.h
sys/lib/libsa/nfsv2.h
sys/lib/libsa/nullfs.c
sys/lib/libsa/open.c
sys/lib/libsa/printf.c
sys/lib/libsa/qsort.c
sys/lib/libsa/rarp.c
sys/lib/libsa/read.c
sys/lib/libsa/rpc.c
sys/lib/libsa/rpcv2.h
sys/lib/libsa/saerrno.h
sys/lib/libsa/saioctl.h
sys/lib/libsa/snprintf.c
sys/lib/libsa/sprintf.c
sys/lib/libsa/stand.h
sys/lib/libsa/stat.c
sys/lib/libsa/strerror.c
sys/lib/libsa/subr_prf.c
sys/lib/libsa/tftp.c
sys/lib/libsa/tftp.h
sys/lib/libsa/twiddle.c
sys/lib/libsa/udp.c
sys/lib/libsa/ufs.c
sys/lib/libsa/ufs.h
sys/lib/libsa/ufs_ls.c
sys/lib/libsa/ustarfs.c
sys/lib/libsa/ustarfs.h
sys/lib/libsa/vsprintf.c
sys/lib/libsa/write.c
sys/lib/libz/Makefile.inc
sys/lib/libz/infblock.c
sys/lib/libz/infcodes.c
sys/lib/libz/inffast.c
sys/lib/libz/inftrees.c
sys/lib/libz/infutil.c
sys/lib/libz/uncompr.c
sys/lib/libz/zutil.h
sys/lkm/Makefile
sys/lkm/arch/arm/lkmhide.awk
sys/lkm/arch/arm/lkmtramp.awk
sys/lkm/arch/arm/lkmwrap.awk
sys/lkm/arch/mac68k/iwm/iwm_mod.c
sys/lkm/arch/powerpc/lkmtramp.awk
sys/lkm/arch/powerpc/lkmwrap.awk
sys/lkm/compat/Makefile.inc
sys/lkm/compat/ibcs2/Makefile
sys/lkm/compat/irix/lkminit_emul.c
sys/lkm/compat/linux/lkminit_emul.c
sys/lkm/compat/netbsd32/lkminit_emul.c
sys/lkm/compat/pecoff/Makefile
sys/lkm/compat/sunos32/Makefile
sys/lkm/compat/svr4_32/Makefile
sys/lkm/dev/pcilkm/Makefile
sys/lkm/dev/pcilkm/examples/auich/Makefile
sys/lkm/dev/pcilkm/examples/auich/README
sys/lkm/dev/pcilkm/examples/auich/auich_lkm.c
sys/lkm/dev/pcilkm/examples/pcienum/Makefile
sys/lkm/dev/pcilkm/examples/pcienum/pcienum_lkm.c
sys/lkm/dev/pcilkm/pcilkm.4
sys/lkm/dev/pcilkm/pcilkm.h
sys/lkm/dev/pcilkm/pcilkm_lkm.c
sys/lkm/dev/vnd/Makefile
sys/lkm/dev/vnd/lkminit_vnd.c
sys/lkm/exec/netbsd32_elf/Makefile
sys/lkm/exec/pecoff/lkminit_exec.c
sys/lkm/exec/sunos32_aout/Makefile
sys/lkm/exec/svr4_32_elf/Makefile
sys/lkm/exec/ultrix_ecoff/Makefile
sys/lkm/misc/example/example_misc.c
sys/lkm/misc/example/lkminit_misc.c
sys/lkm/misc/example/test/testmisc.c
sys/lkm/net/Makefile
sys/lkm/net/Makefile.inc
sys/lkm/net/bsdcomp/Makefile
sys/lkm/net/bsdcomp/lkminit_bsdcomp.c
sys/lkm/net/deflate/Makefile
sys/lkm/net/deflate/lkminit_deflate.c
sys/lkm/net/ethfoo/Makefile
sys/lkm/net/ethfoo/README
sys/lkm/net/ethfoo/ethfoo/Makefile
sys/lkm/net/ethfoo/ethfoo/ethfoo_lkm.c
sys/lkm/net/ethfoo/setaddr/Makefile
sys/lkm/net/ethfoo/setaddr/setaddr.c
sys/lkm/net/pf/Makefile
sys/lkm/net/pf/bpfilter.h
sys/lkm/net/pf/pf.h
sys/lkm/net/pf/pf_lkm.c
sys/lkm/net/pf/pflog.h
sys/lkm/net/pf/pfsync.h
sys/lkm/netinet/if_ipl/Makefile
sys/lkm/netinet/if_ipl/mln_ipl.c
sys/lkm/syscall/example/example_syscall.c
sys/lkm/syscall/example/lkminit_syscall.c
sys/lkm/syscall/example/test/testsyscall.c
sys/lkm/vfs/Makefile
sys/lkm/vfs/adosfs/lkminit_vfs.c
sys/lkm/vfs/cd9660/lkminit_vfs.c
sys/lkm/vfs/coda/lkminit_vfs.c
sys/lkm/vfs/coda5/Makefile
sys/lkm/vfs/filecorefs/lkminit_vfs.c
sys/lkm/vfs/miscfs/fdesc/lkminit_vfs.c
sys/lkm/vfs/miscfs/kernfs/Makefile
sys/lkm/vfs/miscfs/kernfs/lkminit_vfs.c
sys/lkm/vfs/miscfs/nullfs/lkminit_vfs.c
sys/lkm/vfs/miscfs/overlay/lkminit_vfs.c
sys/lkm/vfs/miscfs/portal/lkminit_vfs.c
sys/lkm/vfs/miscfs/procfs/lkminit_vfs.c
sys/lkm/vfs/miscfs/umapfs/lkminit_vfs.c
sys/lkm/vfs/miscfs/union/lkminit_vfs.c
sys/lkm/vfs/msdosfs/lkminit_vfs.c
sys/lkm/vfs/ntfs/lkminit_vfs.c
sys/lkm/vfs/smbfs/lkminit_vfs.c
sys/lkm/vfs/ufs/ext2fs/lkminit_vfs.c
sys/lkm/vfs/ufs/ffs/lkminit_vfs.c
sys/lkm/vfs/ufs/lfs/lkminit_vfs.c
sys/lkm/vfs/ufs/mfs/lkminit_vfs.c
sys/miscfs/deadfs/dead_vnops.c
sys/miscfs/fdesc/fdesc.h
sys/miscfs/fdesc/fdesc_vfsops.c
sys/miscfs/fdesc/fdesc_vnops.c
sys/miscfs/fifofs/fifo.h
sys/miscfs/fifofs/fifo_vnops.c
sys/miscfs/genfs/genfs_node.h
sys/miscfs/genfs/genfs_vnops.c
sys/miscfs/genfs/layer.h
sys/miscfs/genfs/layer_extern.h
sys/miscfs/genfs/layer_subr.c
sys/miscfs/genfs/layer_vfsops.c
sys/miscfs/genfs/layer_vnops.c
sys/miscfs/kernfs/files.kernfs
sys/miscfs/kernfs/kernfs.h
sys/miscfs/kernfs/kernfs_subr.c
sys/miscfs/kernfs/kernfs_vfsops.c
sys/miscfs/kernfs/kernfs_vnops.c
sys/miscfs/nullfs/null.h
sys/miscfs/nullfs/null_vfsops.c
sys/miscfs/nullfs/null_vnops.c
sys/miscfs/overlay/overlay.h
sys/miscfs/overlay/overlay_vfsops.c
sys/miscfs/overlay/overlay_vnops.c
sys/miscfs/portal/portal.h
sys/miscfs/portal/portal_vfsops.c
sys/miscfs/portal/portal_vnops.c
sys/miscfs/procfs/procfs.h
sys/miscfs/procfs/procfs_cmdline.c
sys/miscfs/procfs/procfs_ctl.c
sys/miscfs/procfs/procfs_fpregs.c
sys/miscfs/procfs/procfs_linux.c
sys/miscfs/procfs/procfs_map.c
sys/miscfs/procfs/procfs_mem.c
sys/miscfs/procfs/procfs_note.c
sys/miscfs/procfs/procfs_regs.c
sys/miscfs/procfs/procfs_status.c
sys/miscfs/procfs/procfs_subr.c
sys/miscfs/procfs/procfs_vfsops.c
sys/miscfs/procfs/procfs_vnops.c
sys/miscfs/specfs/spec_vnops.c
sys/miscfs/specfs/specdev.h
sys/miscfs/syncfs/sync_subr.c
sys/miscfs/syncfs/sync_vnops.c
sys/miscfs/umapfs/umap.h
sys/miscfs/umapfs/umap_subr.c
sys/miscfs/umapfs/umap_vfsops.c
sys/miscfs/umapfs/umap_vnops.c
sys/net/Makefile
sys/net/bpf.c
sys/net/bpf.h
sys/net/bpf_filter.c
sys/net/bpfdesc.h
sys/net/bridgestp.c
sys/net/bsd-comp.c
sys/net/dlt.h
sys/net/ethertypes.h
sys/net/files.pf
sys/net/if.c
sys/net/if.h
sys/net/if_arc.h
sys/net/if_arcsubr.c
sys/net/if_arp.h
sys/net/if_atmsubr.c
sys/net/if_bridge.c
sys/net/if_bridgevar.h
sys/net/if_dl.h
sys/net/if_ecosubr.c
sys/net/if_ether.h
sys/net/if_ethersubr.c
sys/net/if_faith.c
sys/net/if_fddisubr.c
sys/net/if_gif.c
sys/net/if_gre.c
sys/net/if_gre.h
sys/net/if_hippisubr.c
sys/net/if_ieee1394subr.c
sys/net/if_ieee80211.h
sys/net/if_ieee80211subr.c
sys/net/if_llc.h
sys/net/if_loop.c
sys/net/if_media.c
sys/net/if_media.h
sys/net/if_ppp.c
sys/net/if_ppp.h
sys/net/if_pppoe.c
sys/net/if_pppoe.h
sys/net/if_pppvar.h
sys/net/if_sl.c
sys/net/if_slvar.h
sys/net/if_sppp.h
sys/net/if_spppsubr.c
sys/net/if_spppvar.h
sys/net/if_stf.c
sys/net/if_strip.c
sys/net/if_token.h
sys/net/if_tokensubr.c
sys/net/if_tun.c
sys/net/if_tun.h
sys/net/if_types.h
sys/net/if_vlan.c
sys/net/netisr.h
sys/net/pfil.c
sys/net/pfil.h
sys/net/pfkeyv2.h
sys/net/ppp-comp.h
sys/net/ppp_defs.h
sys/net/ppp_tty.c
sys/net/radix.c
sys/net/radix.h
sys/net/raw_cb.c
sys/net/raw_cb.h
sys/net/raw_usrreq.c
sys/net/route.c
sys/net/route.h
sys/net/rtsock.c
sys/net/slcompress.c
sys/net/slcompress.h
sys/net/slip.h
sys/net/zlib.h
sys/net80211/Makefile
sys/net80211/ieee80211.c
sys/net80211/ieee80211.h
sys/net80211/ieee80211_channel.h
sys/net80211/ieee80211_compat.c
sys/net80211/ieee80211_compat.h
sys/net80211/ieee80211_crypto.c
sys/net80211/ieee80211_crypto.h
sys/net80211/ieee80211_input.c
sys/net80211/ieee80211_ioctl.c
sys/net80211/ieee80211_ioctl.h
sys/net80211/ieee80211_netbsd.h
sys/net80211/ieee80211_node.c
sys/net80211/ieee80211_node.h
sys/net80211/ieee80211_output.c
sys/net80211/ieee80211_proto.c
sys/net80211/ieee80211_proto.h
sys/net80211/ieee80211_radiotap.h
sys/net80211/ieee80211_rssadapt.c
sys/net80211/ieee80211_rssadapt.h
sys/net80211/ieee80211_sysctl.h
sys/net80211/ieee80211_var.h
sys/netatalk/at.h
sys/netatalk/at_control.c
sys/netatalk/at_proto.c
sys/netatalk/at_rmx.c
sys/netatalk/ddp_input.c
sys/netatalk/ddp_output.c
sys/netatalk/ddp_usrreq.c
sys/netccitt/README.hdlc
sys/netccitt/ccitt_proto.c
sys/netccitt/dll.h
sys/netccitt/hd_debug.c
sys/netccitt/hd_input.c
sys/netccitt/hd_output.c
sys/netccitt/hd_subr.c
sys/netccitt/hd_timer.c
sys/netccitt/hd_var.h
sys/netccitt/hdlc.h
sys/netccitt/if_x25subr.c
sys/netccitt/llc_input.c
sys/netccitt/llc_output.c
sys/netccitt/llc_subr.c
sys/netccitt/llc_timer.c
sys/netccitt/llc_var.h
sys/netccitt/pk.h
sys/netccitt/pk_acct.c
sys/netccitt/pk_debug.c
sys/netccitt/pk_input.c
sys/netccitt/pk_llcsubr.c
sys/netccitt/pk_output.c
sys/netccitt/pk_subr.c
sys/netccitt/pk_timer.c
sys/netccitt/pk_usrreq.c
sys/netccitt/pk_var.h
sys/netccitt/x25.h
sys/netccitt/x25acct.h
sys/netccitt/x25err.h
sys/netinet/Makefile
sys/netinet/fil.c
sys/netinet/files.ipfilter
sys/netinet/files.netinet
sys/netinet/icmp6.h
sys/netinet/icmp_var.h
sys/netinet/if_arp.c
sys/netinet/if_atm.h
sys/netinet/if_ether.h
sys/netinet/if_inarp.h
sys/netinet/igmp.c
sys/netinet/igmp.h
sys/netinet/igmp_var.h
sys/netinet/in.c
sys/netinet/in.h
sys/netinet/in4_cksum.c
sys/netinet/in_cksum.c
sys/netinet/in_gif.c
sys/netinet/in_gif.h
sys/netinet/in_pcb.c
sys/netinet/in_pcb.h
sys/netinet/in_pcb_hdr.h
sys/netinet/in_proto.c
sys/netinet/in_systm.h
sys/netinet/in_var.h
sys/netinet/ip.h
sys/netinet/ip6.h
sys/netinet/ip_auth.c
sys/netinet/ip_auth.h
sys/netinet/ip_compat.h
sys/netinet/ip_ecn.h
sys/netinet/ip_encap.c
sys/netinet/ip_encap.h
sys/netinet/ip_fil.c
sys/netinet/ip_fil.h
sys/netinet/ip_fil_netbsd.c
sys/netinet/ip_flow.c
sys/netinet/ip_frag.c
sys/netinet/ip_frag.h
sys/netinet/ip_ftp_pxy.c
sys/netinet/ip_gre.c
sys/netinet/ip_gre.h
sys/netinet/ip_h323_pxy.c
sys/netinet/ip_htable.c
sys/netinet/ip_htable.h
sys/netinet/ip_icmp.c
sys/netinet/ip_icmp.h
sys/netinet/ip_id.c
sys/netinet/ip_input.c
sys/netinet/ip_ipsec_pxy.c
sys/netinet/ip_irc_pxy.c
sys/netinet/ip_log.c
sys/netinet/ip_lookup.c
sys/netinet/ip_lookup.h
sys/netinet/ip_mroute.c
sys/netinet/ip_mroute.h
sys/netinet/ip_nat.c
sys/netinet/ip_nat.h
sys/netinet/ip_netbios_pxy.c
sys/netinet/ip_output.c
sys/netinet/ip_pool.c
sys/netinet/ip_pool.h
sys/netinet/ip_pptp_pxy.c
sys/netinet/ip_proxy.c
sys/netinet/ip_proxy.h
sys/netinet/ip_raudio_pxy.c
sys/netinet/ip_rcmd_pxy.c
sys/netinet/ip_rpcb_pxy.c
sys/netinet/ip_scan.c
sys/netinet/ip_scan.h
sys/netinet/ip_state.c
sys/netinet/ip_state.h
sys/netinet/ip_sync.c
sys/netinet/ip_sync.h
sys/netinet/ip_var.h
sys/netinet/ipl.h
sys/netinet/raw_ip.c
sys/netinet/tcp.h
sys/netinet/tcp_debug.c
sys/netinet/tcp_debug.h
sys/netinet/tcp_fsm.h
sys/netinet/tcp_input.c
sys/netinet/tcp_output.c
sys/netinet/tcp_seq.h
sys/netinet/tcp_subr.c
sys/netinet/tcp_timer.c
sys/netinet/tcp_timer.h
sys/netinet/tcp_usrreq.c
sys/netinet/tcp_var.h
sys/netinet/tcpip.h
sys/netinet/udp.h
sys/netinet/udp_usrreq.c
sys/netinet/udp_var.h
sys/netinet6/ah.h
sys/netinet6/ah_aesxcbcmac.c
sys/netinet6/ah_aesxcbcmac.h
sys/netinet6/ah_core.c
sys/netinet6/ah_input.c
sys/netinet6/ah_output.c
sys/netinet6/esp.h
sys/netinet6/esp_aesctr.c
sys/netinet6/esp_aesctr.h
sys/netinet6/esp_core.c
sys/netinet6/esp_input.c
sys/netinet6/esp_output.c
sys/netinet6/esp_rijndael.c
sys/netinet6/esp_rijndael.h
sys/netinet6/files.ipsec
sys/netinet6/files.netinet6
sys/netinet6/files.netipsec
sys/netinet6/frag6.c
sys/netinet6/icmp6.c
sys/netinet6/in6.c
sys/netinet6/in6.h
sys/netinet6/in6_cksum.c
sys/netinet6/in6_gif.c
sys/netinet6/in6_ifattach.c
sys/netinet6/in6_pcb.c
sys/netinet6/in6_pcb.h
sys/netinet6/in6_proto.c
sys/netinet6/in6_src.c
sys/netinet6/in6_var.h
sys/netinet6/ip6_forward.c
sys/netinet6/ip6_id.c
sys/netinet6/ip6_input.c
sys/netinet6/ip6_mroute.c
sys/netinet6/ip6_mroute.h
sys/netinet6/ip6_output.c
sys/netinet6/ip6_var.h
sys/netinet6/ip6protosw.h
sys/netinet6/ipcomp_input.c
sys/netinet6/ipcomp_output.c
sys/netinet6/ipsec.c
sys/netinet6/ipsec.h
sys/netinet6/mld6.c
sys/netinet6/nd6.c
sys/netinet6/nd6.h
sys/netinet6/nd6_nbr.c
sys/netinet6/nd6_rtr.c
sys/netinet6/raw_ip6.c
sys/netinet6/udp6_output.c
sys/netinet6/udp6_usrreq.c
sys/netinet6/udp6_var.h
sys/netipsec/Makefile
sys/netipsec/ah.h
sys/netipsec/ah_var.h
sys/netipsec/esp.h
sys/netipsec/esp_var.h
sys/netipsec/files.netipsec
sys/netipsec/ipcomp.h
sys/netipsec/ipcomp_var.h
sys/netipsec/ipip_var.h
sys/netipsec/ipsec.c
sys/netipsec/ipsec.h
sys/netipsec/ipsec6.h
sys/netipsec/ipsec_input.c
sys/netipsec/ipsec_mbuf.c
sys/netipsec/ipsec_netbsd.c
sys/netipsec/ipsec_osdep.h
sys/netipsec/ipsec_output.c
sys/netipsec/ipsec_var.h
sys/netipsec/key.c
sys/netipsec/key.h
sys/netipsec/key_debug.c
sys/netipsec/key_debug.h
sys/netipsec/key_var.h
sys/netipsec/keydb.h
sys/netipsec/keysock.c
sys/netipsec/keysock.h
sys/netipsec/xform.h
sys/netipsec/xform_ah.c
sys/netipsec/xform_esp.c
sys/netipsec/xform_ipcomp.c
sys/netipsec/xform_ipip.c
sys/netipsec/xform_tcp.c
sys/netisdn/i4b_capi.h
sys/netisdn/i4b_capi_l4if.c
sys/netisdn/i4b_capi_llif.c
sys/netisdn/i4b_capi_msgs.c
sys/netisdn/i4b_capi_msgs.h
sys/netisdn/i4b_ctl.c
sys/netisdn/i4b_debug.h
sys/netisdn/i4b_i4bdrv.c
sys/netisdn/i4b_ioctl.h
sys/netisdn/i4b_ipr.c
sys/netisdn/i4b_isppp.c
sys/netisdn/i4b_l1l2.h
sys/netisdn/i4b_l2.c
sys/netisdn/i4b_l2.h
sys/netisdn/i4b_l2if.c
sys/netisdn/i4b_l2timer.c
sys/netisdn/i4b_l3.h
sys/netisdn/i4b_l3l4.h
sys/netisdn/i4b_l4.c
sys/netisdn/i4b_l4.h
sys/netisdn/i4b_l4if.c
sys/netisdn/i4b_l4mgmt.c
sys/netisdn/i4b_lme.c
sys/netisdn/i4b_q931.c
sys/netisdn/i4b_q931.h
sys/netisdn/i4b_rbch.c
sys/netisdn/i4b_sframe.c
sys/netisdn/i4b_tei.c
sys/netisdn/i4b_tel.c
sys/netisdn/i4b_trace.c
sys/netisdn/i4b_trace.h
sys/netisdn/i4b_util.c
sys/netiso/README
sys/netiso/argo_debug.h
sys/netiso/clnl.h
sys/netiso/clnp.h
sys/netiso/clnp_debug.c
sys/netiso/clnp_er.c
sys/netiso/clnp_frag.c
sys/netiso/clnp_input.c
sys/netiso/clnp_options.c
sys/netiso/clnp_output.c
sys/netiso/clnp_raw.c
sys/netiso/clnp_stat.h
sys/netiso/clnp_subr.c
sys/netiso/clnp_timer.c
sys/netiso/cltp_usrreq.c
sys/netiso/cltp_var.h
sys/netiso/cons.h
sys/netiso/cons_pcb.h
sys/netiso/eonvar.h
sys/netiso/esis.c
sys/netiso/esis.h
sys/netiso/files.netiso
sys/netiso/idrp_usrreq.c
sys/netiso/idrp_var.h
sys/netiso/if_cons.c
sys/netiso/if_eon.c
sys/netiso/iso.c
sys/netiso/iso.h
sys/netiso/iso_chksum.c
sys/netiso/iso_errno.h
sys/netiso/iso_pcb.c
sys/netiso/iso_pcb.h
sys/netiso/iso_proto.c
sys/netiso/iso_snpac.c
sys/netiso/iso_snpac.h
sys/netiso/iso_var.h
sys/netiso/tp.trans
sys/netiso/tp_astring.c
sys/netiso/tp_clnp.h
sys/netiso/tp_cons.c
sys/netiso/tp_driver.c
sys/netiso/tp_emit.c
sys/netiso/tp_inet.c
sys/netiso/tp_input.c
sys/netiso/tp_ip.h
sys/netiso/tp_iso.c
sys/netiso/tp_meas.c
sys/netiso/tp_meas.h
sys/netiso/tp_output.c
sys/netiso/tp_param.h
sys/netiso/tp_pcb.c
sys/netiso/tp_pcb.h
sys/netiso/tp_seq.h
sys/netiso/tp_stat.h
sys/netiso/tp_subr.c
sys/netiso/tp_subr2.c
sys/netiso/tp_timer.c
sys/netiso/tp_timer.h
sys/netiso/tp_tpdu.h
sys/netiso/tp_trace.c
sys/netiso/tp_trace.h
sys/netiso/tp_user.h
sys/netiso/tp_usrreq.c
sys/netiso/tp_var.h
sys/netiso/xebec/main.c
sys/netiso/xebec/xebec.c
sys/netkey/key.c
sys/netkey/key.h
sys/netkey/key_debug.c
sys/netkey/key_var.h
sys/netkey/keydb.c
sys/netkey/keydb.h
sys/netkey/keysock.c
sys/netkey/keysock.h
sys/netnatm/natm.c
sys/netns/idp.h
sys/netns/idp_usrreq.c
sys/netns/idp_var.h
sys/netns/ns.c
sys/netns/ns.h
sys/netns/ns_cksum.c
sys/netns/ns_error.c
sys/netns/ns_error.h
sys/netns/ns_if.h
sys/netns/ns_input.c
sys/netns/ns_ip.c
sys/netns/ns_output.c
sys/netns/ns_pcb.c
sys/netns/ns_pcb.h
sys/netns/ns_proto.c
sys/netns/ns_var.h
sys/netns/sp.h
sys/netns/spidp.h
sys/netns/spp_debug.c
sys/netns/spp_debug.h
sys/netns/spp_timer.h
sys/netns/spp_usrreq.c
sys/netns/spp_var.h
sys/netsmb/iconv.c
sys/netsmb/iconv.h
sys/netsmb/netbios.h
sys/netsmb/smb.h
sys/netsmb/smb_conn.c
sys/netsmb/smb_dev.c
sys/netsmb/smb_iod.c
sys/netsmb/smb_rq.c
sys/netsmb/smb_rq.h
sys/netsmb/smb_smb.c
sys/netsmb/smb_subr.c
sys/netsmb/smb_subr.h
sys/netsmb/smb_trantcp.c
sys/netsmb/smb_usr.c
sys/netsmb/subr_mchain.c
sys/nfs/files.nfs
sys/nfs/krpc.h
sys/nfs/krpc_subr.c
sys/nfs/nfs.h
sys/nfs/nfs_bio.c
sys/nfs/nfs_boot.c
sys/nfs/nfs_bootdhcp.c
sys/nfs/nfs_bootparam.c
sys/nfs/nfs_bootstatic.c
sys/nfs/nfs_kq.c
sys/nfs/nfs_node.c
sys/nfs/nfs_nqlease.c
sys/nfs/nfs_serv.c
sys/nfs/nfs_socket.c
sys/nfs/nfs_srvcache.c
sys/nfs/nfs_subs.c
sys/nfs/nfs_syscalls.c
sys/nfs/nfs_var.h
sys/nfs/nfs_vfsops.c
sys/nfs/nfs_vnops.c
sys/nfs/nfsdiskless.h
sys/nfs/nfsm_subs.h
sys/nfs/nfsmount.h
sys/nfs/nfsnode.h
sys/nfs/nfsproto.h
sys/nfs/nfsrtt.h
sys/nfs/nfsrvcache.h
sys/nfs/nqnfs.h
sys/nfs/rpcv2.h
sys/nfs/xdr_subs.h
sys/opencrypto/Makefile
sys/opencrypto/criov.c
sys/opencrypto/crypto.c
sys/opencrypto/cryptodev.c
sys/opencrypto/cryptodev.h
sys/opencrypto/cryptosoft.c
sys/opencrypto/cryptosoft.h
sys/opencrypto/deflate.c
sys/opencrypto/deflate.h
sys/opencrypto/files.opencrypto
sys/opencrypto/xform.c
sys/opencrypto/xform.h
sys/stand/cat.c
sys/stand/copy.c
sys/stand/ls.c
sys/sys/Makefile
sys/sys/acct.h
sys/sys/ansi.h
sys/sys/ataio.h
sys/sys/boot_flag.h
sys/sys/bootblock.h
sys/sys/buf.h
sys/sys/callout.h
sys/sys/cdefs.h
sys/sys/cdefs_aout.h
sys/sys/cdefs_elf.h
sys/sys/cdio.h
sys/sys/clockctl.h
sys/sys/conf.h
sys/sys/device.h
sys/sys/dir.h
sys/sys/dirent.h
sys/sys/disk.h
sys/sys/disklabel.h
sys/sys/disklabel_mbr.h
sys/sys/dkbad.h
sys/sys/dkio.h
sys/sys/dkstat.h
sys/sys/domain.h
sys/sys/endian.h
sys/sys/errno.h
sys/sys/event.h
sys/sys/exec.h
sys/sys/exec_aout.h
sys/sys/exec_coff.h
sys/sys/exec_ecoff.h
sys/sys/exec_elf.h
sys/sys/exec_macho.h
sys/sys/fcntl.h
sys/sys/featuretest.h
sys/sys/file.h
sys/sys/filedesc.h
sys/sys/filio.h
sys/sys/float_ieee754.h
sys/sys/fstypes.h
sys/sys/gmon.h
sys/sys/ieee754.h
sys/sys/ioccom.h
sys/sys/ioctl.h
sys/sys/ioctl_compat.h
sys/sys/ipc.h
sys/sys/joystick.h
sys/sys/kcont.h
sys/sys/kernel.h
sys/sys/kgdb.h
sys/sys/kprintf.h
sys/sys/ksem.h
sys/sys/ksyms.h
sys/sys/ktrace.h
sys/sys/lkm.h
sys/sys/lock.h
sys/sys/lockf.h
sys/sys/lwp.h
sys/sys/malloc.h
sys/sys/mallocvar.h
sys/sys/mbuf.h
sys/sys/md4.h
sys/sys/md5.h
sys/sys/midiio.h
sys/sys/mman.h
sys/sys/mount.h
sys/sys/msgbuf.h
sys/sys/mtio.h
sys/sys/namei.h
sys/sys/null.h
sys/sys/param.h
sys/sys/pipe.h
sys/sys/pool.h
sys/sys/power.h
sys/sys/proc.h
sys/sys/properties.h
sys/sys/protosw.h
sys/sys/ptrace.h
sys/sys/queue.h
sys/sys/ras.h
sys/sys/reboot.h
sys/sys/resource.h
sys/sys/resourcevar.h
sys/sys/sa.h
sys/sys/savar.h
sys/sys/sched.h
sys/sys/select.h
sys/sys/sha1.h
sys/sys/shm.h
sys/sys/siginfo.h
sys/sys/signal.h
sys/sys/signalvar.h
sys/sys/sigtypes.h
sys/sys/socket.h
sys/sys/socketvar.h
sys/sys/sockio.h
sys/sys/stat.h
sys/sys/statvfs.h
sys/sys/stdint.h
sys/sys/syscall.h
sys/sys/syscallargs.h
sys/sys/sysctl.h
sys/sys/syslimits.h
sys/sys/syslog.h
sys/sys/systm.h
sys/sys/systrace.h
sys/sys/tablet.h
sys/sys/termios.h
sys/sys/time.h
sys/sys/timeb.h
sys/sys/timepps.h
sys/sys/times.h
sys/sys/tprintf.h
sys/sys/trace.h
sys/sys/tree.h
sys/sys/tty.h
sys/sys/ttychars.h
sys/sys/ttycom.h
sys/sys/ttydefaults.h
sys/sys/ttydev.h
sys/sys/types.h
sys/sys/ucontext.h
sys/sys/ucred.h
sys/sys/uio.h
sys/sys/un.h
sys/sys/unistd.h
sys/sys/unpcb.h
sys/sys/user.h
sys/sys/userret.h
sys/sys/utsname.h
sys/sys/uuid.h
sys/sys/vadvise.h
sys/sys/verified_exec.h
sys/sys/vmmeter.h
sys/sys/vnode.h
sys/sys/vnode_if.h
sys/sys/wait.h
sys/ufs/ext2fs/ext2fs.h
sys/ufs/ext2fs/ext2fs_alloc.c
sys/ufs/ext2fs/ext2fs_balloc.c
sys/ufs/ext2fs/ext2fs_bmap.c
sys/ufs/ext2fs/ext2fs_bswap.c
sys/ufs/ext2fs/ext2fs_dinode.h
sys/ufs/ext2fs/ext2fs_dir.h
sys/ufs/ext2fs/ext2fs_extern.h
sys/ufs/ext2fs/ext2fs_inode.c
sys/ufs/ext2fs/ext2fs_lookup.c
sys/ufs/ext2fs/ext2fs_readwrite.c
sys/ufs/ext2fs/ext2fs_subr.c
sys/ufs/ext2fs/ext2fs_vfsops.c
sys/ufs/ext2fs/ext2fs_vnops.c
sys/ufs/ffs/ffs_alloc.c
sys/ufs/ffs/ffs_appleufs.c
sys/ufs/ffs/ffs_balloc.c
sys/ufs/ffs/ffs_bswap.c
sys/ufs/ffs/ffs_extern.h
sys/ufs/ffs/ffs_inode.c
sys/ufs/ffs/ffs_snapshot.c
sys/ufs/ffs/ffs_snapshot.stub.c
sys/ufs/ffs/ffs_softdep.c
sys/ufs/ffs/ffs_softdep.stub.c
sys/ufs/ffs/ffs_subr.c
sys/ufs/ffs/ffs_tables.c
sys/ufs/ffs/ffs_vfsops.c
sys/ufs/ffs/ffs_vnops.c
sys/ufs/ffs/fs.h
sys/ufs/ffs/softdep.h
sys/ufs/files.ufs
sys/ufs/lfs/CHANGES
sys/ufs/lfs/lfs.h
sys/ufs/lfs/lfs_alloc.c
sys/ufs/lfs/lfs_balloc.c
sys/ufs/lfs/lfs_bio.c
sys/ufs/lfs/lfs_cksum.c
sys/ufs/lfs/lfs_debug.c
sys/ufs/lfs/lfs_extern.h
sys/ufs/lfs/lfs_inode.c
sys/ufs/lfs/lfs_segment.c
sys/ufs/lfs/lfs_subr.c
sys/ufs/lfs/lfs_syscalls.c
sys/ufs/lfs/lfs_vfsops.c
sys/ufs/lfs/lfs_vnops.c
sys/ufs/mfs/mfs_extern.h
sys/ufs/mfs/mfs_vfsops.c
sys/ufs/mfs/mfs_vnops.c
sys/ufs/mfs/mfsnode.h
sys/ufs/ufs/dinode.h
sys/ufs/ufs/dir.h
sys/ufs/ufs/inode.h
sys/ufs/ufs/quota.h
sys/ufs/ufs/ufs_bmap.c
sys/ufs/ufs/ufs_bswap.h
sys/ufs/ufs/ufs_extern.h
sys/ufs/ufs/ufs_ihash.c
sys/ufs/ufs/ufs_inode.c
sys/ufs/ufs/ufs_lookup.c
sys/ufs/ufs/ufs_quota.c
sys/ufs/ufs/ufs_readwrite.c
sys/ufs/ufs/ufs_vfsops.c
sys/ufs/ufs/ufs_vnops.c
sys/ufs/ufs/ufsmount.h
sys/uvm/uvm.h
sys/uvm/uvm_amap.c
sys/uvm/uvm_amap.h
sys/uvm/uvm_anon.c
sys/uvm/uvm_anon.h
sys/uvm/uvm_aobj.c
sys/uvm/uvm_aobj.h
sys/uvm/uvm_bio.c
sys/uvm/uvm_ddb.h
sys/uvm/uvm_device.c
sys/uvm/uvm_device.h
sys/uvm/uvm_extern.h
sys/uvm/uvm_fault.c
sys/uvm/uvm_fault.h
sys/uvm/uvm_fault_i.h
sys/uvm/uvm_glue.c
sys/uvm/uvm_glue.h
sys/uvm/uvm_init.c
sys/uvm/uvm_km.c
sys/uvm/uvm_km.h
sys/uvm/uvm_loan.c
sys/uvm/uvm_loan.h
sys/uvm/uvm_map.c
sys/uvm/uvm_map.h
sys/uvm/uvm_map_i.h
sys/uvm/uvm_meter.c
sys/uvm/uvm_mmap.c
sys/uvm/uvm_object.h
sys/uvm/uvm_page.c
sys/uvm/uvm_page.h
sys/uvm/uvm_page_i.h
sys/uvm/uvm_pager.c
sys/uvm/uvm_pager.h
sys/uvm/uvm_param.h
sys/uvm/uvm_pdaemon.c
sys/uvm/uvm_pdaemon.h
sys/uvm/uvm_pglist.c
sys/uvm/uvm_pmap.h
sys/uvm/uvm_prot.h
sys/uvm/uvm_stat.c
sys/uvm/uvm_stat.h
sys/uvm/uvm_swap.c
sys/uvm/uvm_swap.h
sys/uvm/uvm_unix.c
sys/uvm/uvm_vnode.c
--- a/sys/dev/rasops/rasops.c	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/rasops/rasops.c	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	 $NetBSD: rasops.c,v 1.43 2003/05/03 18:32:42 uwe Exp $	*/
+/*	 $NetBSD: rasops.c,v 1.43.2.1 2004/08/03 10:51:04 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.43 2003/05/03 18:32:42 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.43.2.1 2004/08/03 10:51:04 skrll Exp $");
 
 #include "opt_rasops.h"
 #include "rasops_glue.h"
@@ -90,9 +90,31 @@
 			_CMWHITE _CMWHITE _CMWHITE _CMWHITE
 	_CMWHITE16 _CMWHITE16 _CMWHITE16 _CMWHITE16 _CMWHITE16
 	_CMWHITE16 _CMWHITE16 _CMWHITE16 _CMWHITE16 _CMWHITE16
-	_CMWHITE16 _CMWHITE16 _CMWHITE16 _CMWHITE16 _CMWHITE16
+	_CMWHITE16 _CMWHITE16 _CMWHITE16 _CMWHITE16 /* but not the last one */
 #undef _CMWHITE16
 #undef _CMWHITE
+
+	/*
+	 * For the cursor the fg/bg indices are bit inverted, so
+	 * provide complimentary colors in the upper 16 entries.
+	 */
+	0x7f, 0x7f, 0x7f, /* black */
+	0xff, 0x00, 0x00, /* red */
+	0x00, 0xff, 0x00, /* green */
+	0xff, 0xff, 0x00, /* brown */
+	0x00, 0x00, 0xff, /* blue */
+	0xff, 0x00, 0xff, /* magenta */
+	0x00, 0xff, 0xff, /* cyan */
+	0xff, 0xff, 0xff, /* white */
+
+	0x00, 0x00, 0x00, /* black */
+	0x7f, 0x00, 0x00, /* red */
+	0x00, 0x7f, 0x00, /* green */
+	0x7f, 0x7f, 0x00, /* brown */
+	0x00, 0x00, 0x7f, /* blue */
+	0x7f, 0x00, 0x7f, /* magenta */
+	0x00, 0x7f, 0x7f, /* cyan */
+	0xc7, 0xc7, 0xc7, /* white - XXX too dim? */
 };
 
 /* True if color is gray */
--- a/sys/dev/rasops/rasops.h	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/rasops/rasops.h	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/* 	$NetBSD: rasops.h,v 1.15 2001/09/18 18:15:53 wiz Exp $ */
+/* 	$NetBSD: rasops.h,v 1.15.18.1 2004/08/03 10:51:04 skrll Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -108,6 +108,10 @@
 
 #define DELTA(p, d, cast) ((p) = (cast)((caddr_t)(p) + (d)))
 
+#define CHAR_IN_FONT(c,font) 					\
+       ((c) >= (font)->firstchar && 				\
+	((c) - (font)->firstchar) < (font)->numchars)
+
 /*
  * rasops_init().
  *
--- a/sys/dev/rasops/rasops8.c	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/rasops/rasops8.c	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/* 	$NetBSD: rasops8.c,v 1.16 2002/02/11 20:50:58 uwe Exp $	*/
+/* 	$NetBSD: rasops8.c,v 1.16.16.1 2004/08/03 10:51:04 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rasops8.c,v 1.16 2002/02/11 20:50:58 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops8.c,v 1.16.16.1 2004/08/03 10:51:04 skrll Exp $");
 
 #include "opt_rasops.h"
 
@@ -118,6 +118,9 @@
 
 	ri = (struct rasops_info *)cookie;
 
+	if (!CHAR_IN_FONT(uc, ri->ri_font))
+		return;
+
 #ifdef RASOPS_CLIPPING
 	/* Catches 'row < 0' case too */
 	if ((unsigned)row >= (unsigned)ri->ri_rows)
@@ -234,6 +237,9 @@
 
 	ri = (struct rasops_info *)cookie;
 
+	if (!CHAR_IN_FONT(uc, ri->ri_font))
+		return;
+
 #ifdef RASOPS_CLIPPING
 	if ((unsigned)row >= (unsigned)ri->ri_rows) {
 		stamp_mutex--;
@@ -305,6 +311,9 @@
 
 	ri = (struct rasops_info *)cookie;
 
+	if (!CHAR_IN_FONT(uc, ri->ri_font))
+	    return;
+
 #ifdef RASOPS_CLIPPING
 	if ((unsigned)row >= (unsigned)ri->ri_rows) {
 		stamp_mutex--;
@@ -379,6 +388,9 @@
 
 	ri = (struct rasops_info *)cookie;
 
+	if (!CHAR_IN_FONT(uc, ri->ri_font))
+		return;
+
 #ifdef RASOPS_CLIPPING
 	if ((unsigned)row >= (unsigned)ri->ri_rows) {
 		stamp_mutex--;
--- a/sys/dev/rcons/files.rcons	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/rcons/files.rcons	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.rcons,v 1.10 2001/11/28 10:21:24 lukem Exp $
+# $NetBSD: files.rcons,v 1.10.16.1 2004/08/03 10:51:04 skrll Exp $
 #
 # Configuration file for RASTER Console.
 #
--- a/sys/dev/rcons/raster.h	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/rcons/raster.h	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: raster.h,v 1.5 2000/09/29 06:29:47 deberg Exp $ */
+/*	$NetBSD: raster.h,v 1.5.24.1 2004/08/03 10:51:04 skrll Exp $ */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -16,11 +16,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
--- a/sys/dev/rcons/raster_op.c	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/rcons/raster_op.c	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: raster_op.c,v 1.11 2001/11/13 06:58:44 lukem Exp $ */
+/*	$NetBSD: raster_op.c,v 1.11.16.1 2004/08/03 10:51:04 skrll Exp $ */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -16,11 +16,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -71,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: raster_op.c,v 1.11 2001/11/13 06:58:44 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: raster_op.c,v 1.11.16.1 2004/08/03 10:51:04 skrll Exp $");
 
 #include <sys/types.h>
 #ifdef _KERNEL
--- a/sys/dev/rcons/raster_text.c	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/rcons/raster_text.c	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: raster_text.c,v 1.6 2001/11/15 09:48:15 lukem Exp $ */
+/*	$NetBSD: raster_text.c,v 1.6.16.1 2004/08/03 10:51:04 skrll Exp $ */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -16,11 +16,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -44,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: raster_text.c,v 1.6 2001/11/15 09:48:15 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: raster_text.c,v 1.6.16.1 2004/08/03 10:51:04 skrll Exp $");
 
 #include <sys/param.h>
 #ifdef _KERNEL
--- a/sys/dev/rcons/rcons.h	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/rcons/rcons.h	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: rcons.h,v 1.12 2000/04/16 21:49:49 pk Exp $ */
+/*	$NetBSD: rcons.h,v 1.12.28.1 2004/08/03 10:51:04 skrll Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -21,11 +21,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
--- a/sys/dev/rcons/rcons_kern.c	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/rcons/rcons_kern.c	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: rcons_kern.c,v 1.13 2001/11/13 06:58:44 lukem Exp $ */
+/*	$NetBSD: rcons_kern.c,v 1.13.16.1 2004/08/03 10:51:04 skrll Exp $ */
 
 /*
  * Copyright (c) 1991, 1993
@@ -21,11 +21,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -45,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rcons_kern.c,v 1.13 2001/11/13 06:58:44 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rcons_kern.c,v 1.13.16.1 2004/08/03 10:51:04 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
--- a/sys/dev/rcons/rcons_subr.c	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/rcons/rcons_subr.c	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: rcons_subr.c,v 1.11 2002/07/04 14:37:12 junyoung Exp $ */
+/*	$NetBSD: rcons_subr.c,v 1.11.6.1 2004/08/03 10:51:04 skrll Exp $ */
 
 /*
  * Copyright (c) 1991, 1993
@@ -21,11 +21,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -45,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rcons_subr.c,v 1.11 2002/07/04 14:37:12 junyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rcons_subr.c,v 1.11.6.1 2004/08/03 10:51:04 skrll Exp $");
 
 #include <sys/param.h>
 #ifdef _KERNEL
--- a/sys/dev/sbus/be.c	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/sbus/be.c	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: be.c,v 1.39 2003/05/03 18:11:38 wiz Exp $	*/
+/*	$NetBSD: be.c,v 1.39.2.1 2004/08/03 10:51:04 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: be.c,v 1.39 2003/05/03 18:11:38 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: be.c,v 1.39.2.1 2004/08/03 10:51:04 skrll Exp $");
 
 #include "opt_ddb.h"
 #include "opt_inet.h"
@@ -168,6 +168,9 @@
 
 	/* MAC address */
 	u_int8_t sc_enaddr[6];
+#ifdef BEDEBUG
+	int	sc_debug;
+#endif
 };
 
 int	bematch __P((struct device *, struct cfdata *, void *));
@@ -248,7 +251,6 @@
 	int instance;
 	int rseg, error;
 	u_int32_t v;
-	extern void myetheraddr __P((u_char *));
 
 	if (sa->sa_nreg < 3) {
 		printf("%s: only %d register sets\n",
@@ -290,16 +292,16 @@
 	sc->sc_qec = qec;
 	sc->sc_qr = qec->sc_regs;
 
-	sc->sc_rev = PROM_getpropint(node, "board-version", -1);
+	sc->sc_rev = prom_getpropint(node, "board-version", -1);
 	printf(" rev %x", sc->sc_rev);
 
 	bestop(sc);
 
-	sc->sc_channel = PROM_getpropint(node, "channel#", -1);
+	sc->sc_channel = prom_getpropint(node, "channel#", -1);
 	if (sc->sc_channel == -1)
 		sc->sc_channel = 0;
 
-	sc->sc_burst = PROM_getpropint(node, "burst-sizes", -1);
+	sc->sc_burst = prom_getpropint(node, "burst-sizes", -1);
 	if (sc->sc_burst == -1)
 		sc->sc_burst = qec->sc_burst;
 
@@ -311,7 +313,7 @@
 		(void)bus_intr_establish(sa->sa_bustag, sa->sa_pri, IPL_NET,
 					 beintr, sc);
 
-	myetheraddr(sc->sc_enaddr);
+	prom_getether(node, sc->sc_enaddr);
 	printf(" address %s\n", ether_sprintf(sc->sc_enaddr));
 
 	/*
@@ -479,6 +481,9 @@
 		IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST;
 	IFQ_SET_READY(&ifp->if_snd);
 
+	/* claim 802.1q capability */
+	sc->sc_ethercom.ec_capabilities |= ETHERCAP_VLAN_MTU;
+
 	/* Attach the interface. */
 	if_attach(ifp);
 	ether_ifattach(ifp, sc->sc_enaddr);
@@ -583,11 +588,12 @@
 	struct mbuf *m;
 
 	if (len <= sizeof(struct ether_header) ||
-	    len > ETHERMTU + sizeof(struct ether_header)) {
-
-		printf("%s: invalid packet size %d; dropping\n",
-			ifp->if_xname, len);
-
+	    len > ETHER_MAX_LEN + ETHERCAP_VLAN_MTU) {
+#ifdef BEDEBUG
+		if (sc->sc_debug)
+			printf("%s: invalid packet size %d; dropping\n",
+				ifp->if_xname, len);
+#endif
 		ifp->if_ierrors++;
 		return;
 	}
@@ -1163,6 +1169,13 @@
 	bus_space_write_4(t, cr, BE_CRI_BMASK, 0);
 	bus_space_write_4(t, cr, BE_CRI_CCNT, 0);
 
+	/* Set max packet length */
+	v = ETHER_MAX_LEN;
+	if (sc->sc_ethercom.ec_capenable & ETHERCAP_VLAN_MTU)
+		v += ETHER_VLAN_ENCAP_LEN;
+	bus_space_write_4(t, br, BE_BRI_RXMAX, v);
+	bus_space_write_4(t, br, BE_BRI_TXMAX, v);
+
 	/* Enable transmitter */
 	bus_space_write_4(t, br, BE_BRI_TXCFG,
 			  BE_BR_TXCFG_FIFO | BE_BR_TXCFG_ENABLE);
--- a/sys/dev/sbus/bereg.h	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/sbus/bereg.h	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: bereg.h,v 1.5 2003/05/03 18:11:38 wiz Exp $	*/
+/*	$NetBSD: bereg.h,v 1.5.2.1 2004/08/03 10:51:04 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -124,12 +124,16 @@
 #define BE_BRI_IMASK	(65*4)
 #define BE_BRI_TXCFG	(131*4)
 #define BE_BRI_JSIZE	(139*4)
+#define BE_BRI_TXMAX	(140*4)
+#define BE_BRI_TXMIN	(141*4)
 #define BE_BRI_NCCNT	(144*4)
 #define BE_BRI_FCCNT	(145*4)
 #define BE_BRI_EXCNT	(146*4)
 #define BE_BRI_LTCNT	(147*4)
 #define BE_BRI_RANDSEED	(148*4)
 #define BE_BRI_RXCFG	(195*4)
+#define BE_BRI_RXMAX	(196*4)
+#define BE_BRI_RXMIN	(197*4)
 #define BE_BRI_MACADDR2	(198*4)
 #define BE_BRI_MACADDR1	(199*4)
 #define BE_BRI_MACADDR0	(200*4)
--- a/sys/dev/sbus/bpp.c	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/sbus/bpp.c	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpp.c,v 1.21 2003/06/29 22:30:35 fvdl Exp $ */
+/*	$NetBSD: bpp.c,v 1.21.2.1 2004/08/03 10:51:04 skrll Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bpp.c,v 1.21 2003/06/29 22:30:35 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bpp.c,v 1.21.2.1 2004/08/03 10:51:04 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/ioctl.h>
@@ -182,7 +182,7 @@
 	if (sbusburst == 0)
 		sbusburst = SBUS_BURST_32 - 1; /* 1->16 */
 
-	burst = PROM_getpropint(node, "burst-sizes", -1);
+	burst = prom_getpropint(node, "burst-sizes", -1);
 	if (burst == -1)
 		/* take SBus burst sizes */
 		burst = sbusburst;
--- a/sys/dev/sbus/bwtwo_sbus.c	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/sbus/bwtwo_sbus.c	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: bwtwo_sbus.c,v 1.12 2003/04/24 05:06:32 martin Exp $ */
+/*	$NetBSD: bwtwo_sbus.c,v 1.12.2.1 2004/08/03 10:51:04 skrll Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -57,11 +57,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -85,12 +81,12 @@
  *
  * Does not handle interrupts, even though they can occur.
  *
- * P4 and overlay plane support by Jason R. Thorpe <thorpej@NetBSD.ORG>.
+ * P4 and overlay plane support by Jason R. Thorpe <thorpej@NetBSD.org>.
  * Overlay plane handling hints and ideas provided by Brad Spencer.
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bwtwo_sbus.c,v 1.12 2003/04/24 05:06:32 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bwtwo_sbus.c,v 1.12.2.1 2004/08/03 10:51:04 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -190,7 +186,7 @@
 	sc->sc_pixeloffset = BWREG_MEM;
 
 	isconsole = fb_is_console(node);
-	name = PROM_getpropstring(node, "model");
+	name = prom_getpropstring(node, "model");
 
 	/* Assume `bwtwo at sbus' only happens at sun4c's */
 	sc->sc_get_video = bwtwo_get_video;
--- a/sys/dev/sbus/cgsix_sbus.c	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/sbus/cgsix_sbus.c	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: cgsix_sbus.c,v 1.12 2002/10/02 16:52:33 thorpej Exp $ */
+/*	$NetBSD: cgsix_sbus.c,v 1.12.6.1 2004/08/03 10:51:04 skrll Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cgsix_sbus.c,v 1.12 2002/10/02 16:52:33 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cgsix_sbus.c,v 1.12.6.1 2004/08/03 10:51:04 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -183,7 +183,7 @@
 	sc->sc_fbc = (struct cg6_fbc *)bus_space_vaddr(sa->sa_bustag, bh);
 
 	sbus_establish(sd, &sc->sc_dev);
-	name = PROM_getpropstring(node, "model");
+	name = prom_getpropstring(node, "model");
 
 	isconsole = fb_is_console(node);
 	if (isconsole && cgsix_use_rasterconsole) {
--- a/sys/dev/sbus/cgthree_sbus.c	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/sbus/cgthree_sbus.c	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: cgthree_sbus.c,v 1.12 2003/04/24 05:06:33 martin Exp $ */
+/*	$NetBSD: cgthree_sbus.c,v 1.12.2.1 2004/08/03 10:51:04 skrll Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -57,11 +57,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -89,7 +85,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cgthree_sbus.c,v 1.12 2003/04/24 05:06:33 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cgthree_sbus.c,v 1.12.2.1 2004/08/03 10:51:04 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -187,7 +183,7 @@
 	sc->sc_fbc = (struct fbcontrol *)bus_space_vaddr(sa->sa_bustag, bh);
 
 	isconsole = fb_is_console(node);
-	name = PROM_getpropstring(node, "model");
+	name = prom_getpropstring(node, "model");
 	if (name == NULL)
 		name = "cgthree";
 
--- a/sys/dev/sbus/cs4231_sbus.c	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/sbus/cs4231_sbus.c	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: cs4231_sbus.c,v 1.28 2003/05/03 18:11:39 wiz Exp $	*/
+/*	$NetBSD: cs4231_sbus.c,v 1.28.2.1 2004/08/03 10:51:04 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cs4231_sbus.c,v 1.28 2003/05/03 18:11:39 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cs4231_sbus.c,v 1.28.2.1 2004/08/03 10:51:04 skrll Exp $");
 
 #include "audio.h"
 #if NAUDIO > 0
@@ -107,7 +107,7 @@
 	NULL,			/* drain */
 	ad1848_query_encoding,
 	ad1848_set_params,
-	cs4231_round_blocksize,
+	NULL,			/* round_blocksize */
 	ad1848_commit_settings,
 	NULL,			/* init_output */
 	NULL,			/* init_input */
@@ -123,7 +123,7 @@
 	cs4231_query_devinfo,
 	cs4231_malloc,
 	cs4231_free,
-	cs4231_round_buffersize,
+	NULL,			/* round_buffersize */
         NULL,			/* mappage */
 	cs4231_get_props,
 	cs4231_sbus_trigger_output,
@@ -182,7 +182,7 @@
 	}
 
 	bus_space_subregion(sa->sa_bustag, bh, CS4231_APCDMA_OFFSET,
-		sizeof(struct apc_dma), &sbsc->sc_bh);
+		APC_DMA_SIZE, &sbsc->sc_bh);
 
 	cs4231_common_attach(sc, bh);
 	printf("\n");
@@ -206,29 +206,28 @@
 	struct cs4231_sbus_softc *sc;
 {
 	char bits[128];
-	volatile struct apc_dma *dma = NULL;
 
 	printf("cs4231regdump(%s): regs:", label);
 	printf("dmapva: 0x%x; ",
-		bus_space_read_4(sc->sc_bh, sc->sc_bh, &dma->dmapva));
+		bus_space_read_4(sc->sc_bh, sc->sc_bh, APC_DMA_PVA));
 	printf("dmapc: 0x%x; ",
-		bus_space_read_4(sc->sc_bh, sc->sc_bh, &dma->dmapc));
+		bus_space_read_4(sc->sc_bh, sc->sc_bh, APC_DMA_PC));
 	printf("dmapnva: 0x%x; ",
-		bus_space_read_4(sc->sc_bh, sc->sc_bh, &dma->dmapnva));
+		bus_space_read_4(sc->sc_bh, sc->sc_bh, APC_DMA_PNVA));
 	printf("dmapnc: 0x%x\n",
-		bus_space_read_4(sc->sc_bh, sc->sc_bh, &dma->dmapnc));
+		bus_space_read_4(sc->sc_bh, sc->sc_bh, APC_DMA_PNC));
 	printf("dmacva: 0x%x; ", 
-		bus_space_read_4(sc->sc_bh, sc->sc_bh, &dma->dmacva));
+		bus_space_read_4(sc->sc_bh, sc->sc_bh, APC_DMA_CVA));
 	printf("dmacc: 0x%x; ", 
-		bus_space_read_4(sc->sc_bh, sc->sc_bh, &dma->dmacc));
+		bus_space_read_4(sc->sc_bh, sc->sc_bh, APC_DMA_CC));
 	printf("dmacnva: 0x%x; ", 
-		bus_space_read_4(sc->sc_bh, sc->sc_bh, &dma->dmacnva));
+		bus_space_read_4(sc->sc_bh, sc->sc_bh, APC_DMA_CNVA));
 	printf("dmacnc: 0x%x\n", 
-		bus_space_read_4(sc->sc_bh, sc->sc_bh, &dma->dmacnc));
+		bus_space_read_4(sc->sc_bh, sc->sc_bh, APC_DMA_CNC));
 
 	printf("apc_dmacsr=%s\n",
 		bitmask_snprintf(
-			bus_space_read_4(sc->sc_bh, sc->sc_bh, &dma->dmacsr),
+			bus_space_read_4(sc->sc_bh, sc->sc_bh, APC_DMA_CSR),
 				APC_BITS, bits, sizeof(bits)));
 
 	ad1848_dump_regs(&sc->sc_cs4231.sc_ad1848);
@@ -248,7 +247,6 @@
 	struct cs4231_sbus_softc *sbsc = addr;
 	struct cs4231_softc *sc = &sbsc->sc_cs4231;
 	struct cs_transfer *t = &sc->sc_playback;
-	volatile struct apc_dma *dma = NULL;
 	u_int32_t csr;
 	bus_addr_t dmaaddr;
 	bus_size_t dmasize;
@@ -263,34 +261,34 @@
 		return (ret);
 
 	DPRINTF(("trigger_output: was: %x %d, %x %d\n",
-		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmapva), 
-		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmapc),
-		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmapnva),
-		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmapnc)));
+		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_PVA), 
+		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_PC),
+		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_PNVA),
+		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_PNC)));
 
 	/* load first block */
-	bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmapnva, dmaaddr);
-	bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmapnc, dmasize);
+	bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_PNVA, dmaaddr);
+	bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_PNC, dmasize);
 
 	DPRINTF(("trigger_output: 1st: %x %d, %x %d\n",
-		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmapva),
-		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmapc),
-		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmapnva),
-		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmapnc)));
+		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_PVA),
+		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_PC),
+		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_PNVA),
+		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_PNC)));
 
-	csr = bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacsr);
+	csr = bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CSR);
 	DPRINTF(("trigger_output: csr=%s\n",
 		 bitmask_snprintf(csr, APC_BITS, bits, sizeof(bits))));
 	if ((csr & PDMA_GO) == 0 || (csr & APC_PPAUSE) != 0) {
 		int cfg;
 
 		csr &= ~(APC_PPAUSE | APC_PMIE | APC_INTR_MASK);
-		bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacsr, csr);
+		bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CSR, csr);
 
-		csr = bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacsr);
+		csr = bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CSR);
 		csr &= ~APC_INTR_MASK;
 		csr |= APC_ENABLE | APC_PIE | APC_PMIE | PDMA_GO;
-		bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacsr, csr);
+		bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CSR, csr);
 
 		ad_write(&sc->sc_ad1848, SP_LOWER_BASE_COUNT, 0xff);
 		ad_write(&sc->sc_ad1848, SP_UPPER_BASE_COUNT, 0xff);
@@ -304,17 +302,17 @@
 	}
 
 	/* load next block if we can */
-	csr = bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacsr);
+	csr = bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CSR);
 	if (csr & APC_PD) {
 		cs4231_transfer_advance(t, &dmaaddr, &dmasize);
-		bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmapnva, dmaaddr);
-		bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmapnc, dmasize);
+		bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_PNVA, dmaaddr);
+		bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_PNC, dmasize);
 
 		DPRINTF(("trigger_output: 2nd: %x %d, %x %d\n",
-		    bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmapva),
-		    bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmapc),
-		    bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmapnva),
-		    bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmapnc)));
+		    bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_PVA),
+		    bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_PC),
+		    bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_PNVA),
+		    bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_PNC)));
 	}
 
 	return (0);
@@ -327,7 +325,6 @@
 {
 	struct cs4231_sbus_softc *sbsc = addr;
 	struct cs4231_softc *sc = &sbsc->sc_cs4231;
-	volatile struct apc_dma *dma = NULL;
 	u_int32_t csr;
 	int cfg;
 #ifdef AUDIO_DEBUG
@@ -336,19 +333,19 @@
 
 	sc->sc_playback.t_active = 0;
 
-	csr = bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacsr);
+	csr = bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CSR);
 	DPRINTF(("halt_output: csr=%s\n",
 		 bitmask_snprintf(csr, APC_BITS, bits, sizeof(bits))));
 
 	csr &= ~APC_INTR_MASK;	/* do not clear interrupts accidentally */
 	csr |= APC_PPAUSE;	/* pause playback (let current complete) */
-	bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacsr, csr);
+	bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CSR, csr);
 	
 	/* let the curernt transfer complete */
 	if (csr & PDMA_GO)
 		do {
 			csr = bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, 
-				(vaddr_t)&dma->dmacsr);
+				APC_DMA_CSR);
 			DPRINTF(("halt_output: csr=%s\n",
 				 bitmask_snprintf(csr, APC_BITS,
 						  bits, sizeof(bits))));
@@ -374,7 +371,6 @@
 	struct cs4231_sbus_softc *sbsc = addr;
 	struct cs4231_softc *sc = &sbsc->sc_cs4231;
 	struct cs_transfer *t = &sc->sc_capture;
-	volatile struct apc_dma *dma = NULL;
 	u_int32_t csr;
 	bus_addr_t dmaaddr;
 	bus_size_t dmasize;
@@ -388,36 +384,36 @@
 	if (ret != 0)
 		return (ret);
 
-	csr = bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacsr);
+	csr = bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CSR);
 	DPRINTF(("trigger_input: csr=%s\n",
 		 bitmask_snprintf(csr, APC_BITS, bits, sizeof(bits))));
 	DPRINTF(("trigger_input: was: %x %d, %x %d\n",
-		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacva), 
-		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacc),
-		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacnva),
-		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacnc)));
+		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CVA), 
+		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CC),
+		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CNVA),
+		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CNC)));
 
 	/* supply first block */
-	bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacnva, dmaaddr);
-	bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacnc, dmasize);
+	bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CNVA, dmaaddr);
+	bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CNC, dmasize);
 
 	DPRINTF(("trigger_input: 1st: %x %d, %x %d\n",
-		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacva), 
-		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacc),
-		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacnva),
-		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacnc)));
+		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CVA), 
+		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CC),
+		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CNVA),
+		bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CNC)));
 
-	csr = bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacsr);
+	csr = bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CSR);
 	if ((csr & CDMA_GO) == 0 || (csr & APC_CPAUSE) != 0) {
 		int cfg;
 
 		csr &= ~(APC_CPAUSE | APC_CMIE | APC_INTR_MASK);
-		bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacsr, csr);
+		bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CSR, csr);
 
-		csr = bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacsr);
+		csr = bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CSR);
 		csr &= ~APC_INTR_MASK;
 		csr |= APC_ENABLE | APC_CIE | CDMA_GO;
-		bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacsr, csr);
+		bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CSR, csr);
 
 		ad_write(&sc->sc_ad1848, CS_LOWER_REC_CNT, 0xff);
 		ad_write(&sc->sc_ad1848, CS_UPPER_REC_CNT, 0xff);
@@ -431,16 +427,16 @@
 	}
 
 	/* supply next block if we can */
-	csr = bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacsr);
+	csr = bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CSR);
 	if (csr & APC_CD) {
 		cs4231_transfer_advance(t, &dmaaddr, &dmasize);
-		bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacnva, dmaaddr);
-		bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacnc, dmasize);
+		bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CNVA, dmaaddr);
+		bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CNC, dmasize);
 		DPRINTF(("trigger_input: 2nd: %x %d, %x %d\n",
-		    bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacva),
-		    bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacc),
-		    bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacnva),
-		    bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacnc)));
+		    bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CVA),
+		    bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CC),
+		    bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CNVA),
+		    bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CNC)));
 	}
 
 	return (0);
@@ -453,7 +449,6 @@
 {
 	struct cs4231_sbus_softc *sbsc = addr;
 	struct cs4231_softc *sc = &sbsc->sc_cs4231;
-	volatile struct apc_dma *dma = NULL;
 	u_int32_t csr;
 	int cfg;
 #ifdef AUDIO_DEBUG
@@ -462,19 +457,19 @@
 
 	sc->sc_capture.t_active = 0;
 
-	csr = bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacsr);
+	csr = bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CSR);
 	DPRINTF(("halt_input: csr=%s\n",
 		 bitmask_snprintf(csr, APC_BITS, bits, sizeof(bits))));
 
 	csr &= ~APC_INTR_MASK;	/* do not clear interrupts accidentally */
 	csr |= APC_CPAUSE;
-	bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacsr, csr);
+	bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CSR, csr);
 
 	/* let the curernt transfer complete */
 	if (csr & CDMA_GO)
 		do {
 			csr = bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh,
-				(vaddr_t)&dma->dmacsr);
+				APC_DMA_CSR);
 			DPRINTF(("halt_input: csr=%s\n",
 				 bitmask_snprintf(csr, APC_BITS,
 						  bits, sizeof(bits))));
@@ -493,7 +488,6 @@
 {
 	struct cs4231_sbus_softc *sbsc = arg;
 	struct cs4231_softc *sc = &sbsc->sc_cs4231;
-	volatile struct apc_dma *dma = NULL;
 	u_int32_t csr;
 	int status;
 	bus_addr_t dmaaddr;
@@ -503,12 +497,12 @@
 	char bits[128];
 #endif
 
-	csr = bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacsr);
+	csr = bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CSR);
 	if ((csr & APC_INTR_MASK) == 0)	/* any interrupt pedning? */
 		return (0);
 
 	/* write back DMA status to clear interrupt */
-	bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacsr, csr);
+	bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, APC_DMA_CSR, csr);
 	++sc->sc_intrcnt.ev_count;
 	served = 0;
 
@@ -538,9 +532,9 @@
 
 			cs4231_transfer_advance(t, &dmaaddr, &dmasize);
 			bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh,
-				(vaddr_t)&dma->dmacnva, dmaaddr);
+				APC_DMA_CNVA, dmaaddr);
 			bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh,
-				(vaddr_t)&dma->dmacnc, dmasize);
+				APC_DMA_CNC, dmasize);
 
 			if (t->t_intr != NULL)
 				(*t->t_intr)(t->t_arg);
@@ -561,9 +555,9 @@
 			if (t->t_active) {
 				cs4231_transfer_advance(t, &dmaaddr, &dmasize);
 				bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh,
-					(vaddr_t)&dma->dmapnva, dmaaddr);
+					APC_DMA_PNVA, dmaaddr);
 				bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh,
-					(vaddr_t)&dma->dmapnc, dmasize);
+					APC_DMA_PNC, dmasize);
 			}
 
 			if (t->t_intr != NULL)
--- a/sys/dev/sbus/dma_sbus.c	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/sbus/dma_sbus.c	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: dma_sbus.c,v 1.20 2003/02/06 16:20:05 hannken Exp $ */
+/*	$NetBSD: dma_sbus.c,v 1.20.2.1 2004/08/03 10:51:04 skrll Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dma_sbus.c,v 1.20 2003/02/06 16:20:05 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dma_sbus.c,v 1.20.2.1 2004/08/03 10:51:04 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -102,8 +102,6 @@
 		void *,			/*handler arg*/
 		void (*) __P((void))));	/*optional fast trap handler*/
 
-static	bus_space_tag_t dma_alloc_bustag __P((struct dma_softc *sc));
-
 CFATTACH_DECL(dma_sbus, sizeof(struct dma_softc),
     dmamatch_sbus, dmaattach_sbus, NULL, NULL);
 
@@ -176,7 +174,7 @@
 	if (sbusburst == 0)
 		sbusburst = SBUS_BURST_32 - 1; /* 1->16 */
 
-	burst = PROM_getpropint(node,"burst-sizes", -1);
+	burst = prom_getpropint(node,"burst-sizes", -1);
 	if (burst == -1)
 		/* take SBus burst sizes */
 		burst = sbusburst;
@@ -196,7 +194,7 @@
 		 * the "cable-selection" property; default to TP and then
 		 * the user can change it via a "media" option to ifconfig.
 		 */
-		cabletype = PROM_getpropstring(node, "cable-selection");
+		cabletype = prom_getpropstring(node, "cable-selection");
 		csr = L64854_GCSR(sc);
 		if (strcmp(cabletype, "tpe") == 0) {
 			csr |= E_TP_AUI;
@@ -214,7 +212,11 @@
 	}
 
 	sbus_establish(&dsc->sc_sd, &sc->sc_dev);
-	sbt = dma_alloc_bustag(dsc);
+	if ((sbt = bus_space_tag_alloc(sc->sc_bustag, dsc)) == NULL) {
+		printf("%s: attach: out of memory\n", self->dv_xname);
+		return;
+	}
+	sbt->sparc_intr_establish = dmabus_intr_establish;
 	lsi64854_attach(sc);
 
 	/* Attach children */
@@ -248,20 +250,3 @@
 	return (bus_intr_establish(sc->sc_bustag, pri, level,
 				   handler, arg));
 }
-
-bus_space_tag_t
-dma_alloc_bustag(sc)
-	struct dma_softc *sc;
-{
-	bus_space_tag_t sbt;
-
-	sbt = (bus_space_tag_t) malloc(sizeof(struct sparc_bus_space_tag),
-	    M_DEVBUF, M_NOWAIT|M_ZERO);
-	if (sbt == NULL)
-		return (NULL);
-
-	sbt->cookie = sc;
-	sbt->parent = sc->sc_lsi64854.sc_bustag;
-	sbt->sparc_intr_establish = dmabus_intr_establish;
-	return (sbt);
-}
--- a/sys/dev/sbus/esp_sbus.c	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/sbus/esp_sbus.c	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: esp_sbus.c,v 1.28 2003/02/22 05:11:15 tsutsui Exp $	*/
+/*	$NetBSD: esp_sbus.c,v 1.28.2.1 2004/08/03 10:51:04 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: esp_sbus.c,v 1.28 2003/02/22 05:11:15 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: esp_sbus.c,v 1.28.2.1 2004/08/03 10:51:04 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -164,8 +164,8 @@
 	esc->sc_bustag = sa->sa_bustag;
 	esc->sc_dmatag = sa->sa_dmatag;
 
-	sc->sc_id = PROM_getpropint(sa->sa_node, "initiator-id", 7);
-	sc->sc_freq = PROM_getpropint(sa->sa_node, "clock-frequency", -1);
+	sc->sc_id = prom_getpropint(sa->sa_node, "initiator-id", 7);
+	sc->sc_freq = prom_getpropint(sa->sa_node, "clock-frequency", -1);
 	if (sc->sc_freq < 0)
 		sc->sc_freq = ((struct sbus_softc *)
 		    sc->sc_dev.dv_parent)->sc_clockfreq;
@@ -231,7 +231,7 @@
 		if (sbusburst == 0)
 			sbusburst = SBUS_BURST_32 - 1; /* 1->16 */
 
-		burst = PROM_getpropint(sa->sa_node, "burst-sizes", -1);
+		burst = prom_getpropint(sa->sa_node, "burst-sizes", -1);
 
 #if ESP_SBUS_DEBUG
 		printf("espattach_sbus: burst 0x%x, sbus 0x%x\n",
@@ -371,8 +371,8 @@
 	esc->sc_bustag = sa->sa_bustag;
 	esc->sc_dmatag = sa->sa_dmatag;
 
-	sc->sc_id = PROM_getpropint(sa->sa_node, "initiator-id", 7);
-	sc->sc_freq = PROM_getpropint(sa->sa_node, "clock-frequency", -1);
+	sc->sc_id = prom_getpropint(sa->sa_node, "initiator-id", 7);
+	sc->sc_freq = prom_getpropint(sa->sa_node, "clock-frequency", -1);
 
 	esc->sc_dma = (struct lsi64854_softc *)parent;
 	esc->sc_dma->sc_client = sc;
--- a/sys/dev/sbus/files.sbus	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/sbus/files.sbus	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: files.sbus,v 1.18 2002/09/13 14:03:53 ad Exp $
+#	$NetBSD: files.sbus,v 1.18.6.1 2004/08/03 10:51:04 skrll Exp $
 #
 # Config file and device description for machine-independent SBUS code.
 # Included by ports that need it.
@@ -79,6 +79,15 @@
 attach	mbpp at magma
 file	dev/sbus/magma.c		magma | mtty | mbpp needs-flag
 
+# XXX this should use the cd18xx code when it (the cd18xx code) works.
+device spif {}
+attach spif at sbus
+device stty: tty
+attach stty at spif
+device sbpp
+attach sbpp at spif
+file   dev/sbus/spif.c                 spif | stty | sbpp needs-flag
+
 device siosixteen { channel = -1 }
 attach siosixteen at sbus
 device clcd: tty, cd18xx
--- a/sys/dev/sbus/if_hme_sbus.c	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/sbus/if_hme_sbus.c	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_hme_sbus.c,v 1.17 2002/12/10 13:44:47 pk Exp $	*/
+/*	$NetBSD: if_hme_sbus.c,v 1.17.6.1 2004/08/03 10:51:04 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_hme_sbus.c,v 1.17 2002/12/10 13:44:47 pk Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_hme_sbus.c,v 1.17.6.1 2004/08/03 10:51:04 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -101,9 +101,6 @@
 	u_int32_t burst, sbusburst;
 	int node;
 
-	/* XXX the following declarations should be elsewhere */
-	extern void myetheraddr __P((u_char *));
-
 	node = sa->sa_node;
 
 	/* Pass on the bus tags */
@@ -173,7 +170,7 @@
 	sd->sd_reset = (void *)hme_reset;
 	sbus_establish(sd, self);
 
-	myetheraddr(sc->sc_enaddr);
+	prom_getether(node, sc->sc_enaddr);
 
 	/*
 	 * Get transfer burst size from PROM and pass it on
@@ -183,7 +180,7 @@
 	if (sbusburst == 0)
 		sbusburst = SBUS_BURST_32 - 1; /* 1->16 */
 
-	burst = PROM_getpropint(node, "burst-sizes", -1);
+	burst = prom_getpropint(node, "burst-sizes", -1);
 	if (burst == -1)
 		/* take SBus burst sizes */
 		burst = sbusburst;
--- a/sys/dev/sbus/if_le.c	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/sbus/if_le.c	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_le.c,v 1.27 2002/12/10 13:44:48 pk Exp $	*/
+/*	$NetBSD: if_le.c,v 1.27.6.1 2004/08/03 10:51:04 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_le.c,v 1.27 2002/12/10 13:44:48 pk Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_le.c,v 1.27.6.1 2004/08/03 10:51:04 skrll Exp $");
 
 #include "opt_inet.h"
 #include "bpfilter.h"
@@ -104,14 +104,6 @@
 #include "opt_ddb.h"
 #endif
 
-#ifdef DDB
-#define	integrate
-#define hide
-#else
-#define	integrate	static __inline
-#define hide		static
-#endif
-
 static void lewrcsr __P((struct lance_softc *, u_int16_t, u_int16_t));
 static u_int16_t lerdcsr __P((struct lance_softc *, u_int16_t));
 
@@ -121,9 +113,11 @@
 	u_int16_t port, val;
 {
 	struct le_softc *lesc = (struct le_softc *)sc;
+	bus_space_tag_t t = lesc->sc_bustag;
+	bus_space_handle_t h = lesc->sc_reg;
 
-	bus_space_write_2(lesc->sc_bustag, lesc->sc_reg, LEREG1_RAP, port);
-	bus_space_write_2(lesc->sc_bustag, lesc->sc_reg, LEREG1_RDP, val);
+	bus_space_write_2(t, h, LEREG1_RAP, port);
+	bus_space_write_2(t, h, LEREG1_RDP, val);
 
 #if defined(SUN4M)
 	/*
@@ -131,11 +125,7 @@
 	 * easily be accomplished by reading back the register that we
 	 * just wrote (thanks to Chris Torek for this solution).
 	 */
-	if (CPU_ISSUN4M) {
-		volatile u_int16_t discard;
-		discard = bus_space_read_2(lesc->sc_bustag, lesc->sc_reg,
-					   LEREG1_RDP);
-	}
+	(void)bus_space_read_2(t, h, LEREG1_RDP);
 #endif
 }
 
@@ -145,9 +135,11 @@
 	u_int16_t port;
 {
 	struct le_softc *lesc = (struct le_softc *)sc;
+	bus_space_tag_t t = lesc->sc_bustag;
+	bus_space_handle_t h = lesc->sc_reg;
 
-	bus_space_write_2(lesc->sc_bustag, lesc->sc_reg, LEREG1_RAP, port);
-	return (bus_space_read_2(lesc->sc_bustag, lesc->sc_reg, LEREG1_RDP));
+	bus_space_write_2(t, h, LEREG1_RAP, port);
+	return (bus_space_read_2(t, h, LEREG1_RDP));
 }
 
 
@@ -172,9 +164,6 @@
 	struct lance_softc *sc = &lesc->sc_am7990.lsc;
 	bus_dma_tag_t dmatag;
 	struct sbusdev *sd;
-	/* XXX the following declarations should be elsewhere */
-	extern void myetheraddr __P((u_char *));
-
 
 	lesc->sc_bustag = sa->sa_bustag;
 	lesc->sc_dmatag = dmatag = sa->sa_dmatag;
@@ -211,7 +200,7 @@
 		lebuf->attached = 1;
 
 		/* That old black magic... */
-		sc->sc_conf3 = PROM_getpropint(sa->sa_node,
+		sc->sc_conf3 = prom_getpropint(sa->sa_node,
 					  "busmaster-regval",
 					  LE_C3_BSWP | LE_C3_ACON | LE_C3_BCON);
 		break;
@@ -271,7 +260,7 @@
 		sc->sc_conf3 = LE_C3_BSWP | LE_C3_ACON | LE_C3_BCON;
 	}
 
-	myetheraddr(sc->sc_enaddr);
+	prom_getether(sa->sa_node, sc->sc_enaddr);
 
 	sc->sc_supmedia = lemedia;
 	sc->sc_nsupmedia = NLEMEDIA;
--- a/sys/dev/sbus/if_le_lebuffer.c	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/sbus/if_le_lebuffer.c	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_le_lebuffer.c,v 1.16 2002/12/10 13:44:48 pk Exp $	*/
+/*	$NetBSD: if_le_lebuffer.c,v 1.16.6.1 2004/08/03 10:51:04 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_le_lebuffer.c,v 1.16 2002/12/10 13:44:48 pk Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_le_lebuffer.c,v 1.16.6.1 2004/08/03 10:51:04 skrll Exp $");
 
 #include "opt_inet.h"
 #include "bpfilter.h"
@@ -107,14 +107,6 @@
 #include "opt_ddb.h"
 #endif
 
-#ifdef DDB
-#define	integrate
-#define hide
-#else
-#define	integrate	static __inline
-#define hide		static
-#endif
-
 static void lewrcsr __P((struct lance_softc *, u_int16_t, u_int16_t));
 static u_int16_t lerdcsr __P((struct lance_softc *, u_int16_t));
 
@@ -124,9 +116,11 @@
 	u_int16_t port, val;
 {
 	struct le_softc *lesc = (struct le_softc *)sc;
+	bus_space_tag_t t = lesc->sc_bustag;
+	bus_space_handle_t h = lesc->sc_reg;
 
-	bus_space_write_2(lesc->sc_bustag, lesc->sc_reg, LEREG1_RAP, port);
-	bus_space_write_2(lesc->sc_bustag, lesc->sc_reg, LEREG1_RDP, val);
+	bus_space_write_2(t, h, LEREG1_RAP, port);
+	bus_space_write_2(t, h, LEREG1_RDP, val);
 
 #if defined(SUN4M)
 	/*
@@ -134,11 +128,7 @@
 	 * easily be accomplished by reading back the register that we
 	 * just wrote (thanks to Chris Torek for this solution).
 	 */
-	if (CPU_ISSUN4M) {
-		volatile u_int16_t discard;
-		discard = bus_space_read_2(lesc->sc_bustag, lesc->sc_reg,
-					   LEREG1_RDP);
-	}
+	(void)bus_space_read_2(t, h, LEREG1_RDP);
 #endif
 }
 
@@ -148,9 +138,11 @@
 	u_int16_t port;
 {
 	struct le_softc *lesc = (struct le_softc *)sc;
+	bus_space_tag_t t = lesc->sc_bustag;
+	bus_space_handle_t h = lesc->sc_reg;
 
-	bus_space_write_2(lesc->sc_bustag, lesc->sc_reg, LEREG1_RAP, port);
-	return (bus_space_read_2(lesc->sc_bustag, lesc->sc_reg, LEREG1_RDP));
+	bus_space_write_2(t, h, LEREG1_RAP, port);
+	return (bus_space_read_2(t, h, LEREG1_RDP));
 }
 
 int
@@ -174,8 +166,6 @@
 	struct le_softc *lesc = (struct le_softc *)self;
 	struct lance_softc *sc = &lesc->sc_am7990.lsc;
 	struct lebuf_softc *lebuf = (struct lebuf_softc *)parent;
-	/* XXX the following declarations should be elsewhere */
-	extern void myetheraddr __P((u_char *));
 
 	lesc->sc_bustag = sa->sa_bustag;
 	lesc->sc_dmatag = sa->sa_dmatag;
@@ -195,7 +185,7 @@
 	lebuf->attached = 1;
 
 	/* That old black magic... */
-	sc->sc_conf3 = PROM_getpropint(sa->sa_node, "busmaster-regval",
+	sc->sc_conf3 = prom_getpropint(sa->sa_node, "busmaster-regval",
 				  LE_C3_BSWP | LE_C3_ACON | LE_C3_BCON);
 
 	/* Assume SBus is grandparent */
@@ -206,7 +196,7 @@
 	sc->sc_nsupmedia = NLEMEDIA;
 	sc->sc_defaultmedia = lemedia[0];
 
-	myetheraddr(sc->sc_enaddr);
+	prom_getether(sa->sa_node, sc->sc_enaddr);
 
 	sc->sc_copytodesc = lance_copytobuf_contig;
 	sc->sc_copyfromdesc = lance_copyfrombuf_contig;
--- a/sys/dev/sbus/if_le_ledma.c	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/sbus/if_le_ledma.c	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_le_ledma.c,v 1.22 2002/12/10 13:44:48 pk Exp $	*/
+/*	$NetBSD: if_le_ledma.c,v 1.22.6.1 2004/08/03 10:51:04 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_le_ledma.c,v 1.22 2002/12/10 13:44:48 pk Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_le_ledma.c,v 1.22.6.1 2004/08/03 10:51:04 skrll Exp $");
 
 #include "opt_inet.h"
 #include "bpfilter.h"
@@ -62,6 +62,7 @@
 
 #include <machine/bus.h>
 #include <machine/intr.h>
+#include <machine/autoconf.h>
 
 #include <dev/sbus/sbusvar.h>
 
@@ -120,19 +121,11 @@
 #include "opt_ddb.h"
 #endif
 
-#ifdef DDB
-#define	integrate
-#define hide
-#else
-#define	integrate	static __inline
-#define hide		static
-#endif
-
 static void lewrcsr __P((struct lance_softc *, u_int16_t, u_int16_t));
 static u_int16_t lerdcsr __P((struct lance_softc *, u_int16_t));
-hide void lehwreset __P((struct lance_softc *));
-hide void lehwinit __P((struct lance_softc *));
-hide void lenocarrier __P((struct lance_softc *));
+static void lehwreset __P((struct lance_softc *));
+static void lehwinit __P((struct lance_softc *));
+static void lenocarrier __P((struct lance_softc *));
 
 static void
 lewrcsr(sc, port, val)
@@ -140,9 +133,11 @@
 	u_int16_t port, val;
 {
 	struct le_softc *lesc = (struct le_softc *)sc;
+	bus_space_tag_t t = lesc->sc_bustag;
+	bus_space_handle_t h = lesc->sc_reg;
 
-	bus_space_write_2(lesc->sc_bustag, lesc->sc_reg, LEREG1_RAP, port);
-	bus_space_write_2(lesc->sc_bustag, lesc->sc_reg, LEREG1_RDP, val);
+	bus_space_write_2(t, h, LEREG1_RAP, port);
+	bus_space_write_2(t, h, LEREG1_RDP, val);
 
 #if defined(SUN4M)
 	/*
@@ -150,11 +145,7 @@
 	 * easily be accomplished by reading back the register that we
 	 * just wrote (thanks to Chris Torek for this solution).
 	 */
-	if (CPU_ISSUN4M) {
-		volatile u_int16_t discard;
-		discard = bus_space_read_2(lesc->sc_bustag, lesc->sc_reg,
-					   LEREG1_RDP);
-	}
+	(void)bus_space_read_2(t, h, LEREG1_RDP);
 #endif
 }
 
@@ -164,9 +155,11 @@
 	u_int16_t port;
 {
 	struct le_softc *lesc = (struct le_softc *)sc;
+	bus_space_tag_t t = lesc->sc_bustag;
+	bus_space_handle_t h = lesc->sc_reg;
 
-	bus_space_write_2(lesc->sc_bustag, lesc->sc_reg, LEREG1_RAP, port);
-	return (bus_space_read_2(lesc->sc_bustag, lesc->sc_reg, LEREG1_RDP));
+	bus_space_write_2(t, h, LEREG1_RAP, port);
+	return (bus_space_read_2(t, h, LEREG1_RDP));
 }
 
 void
@@ -245,7 +238,7 @@
 		ifmr->ifm_active = IFM_ETHER|IFM_10_5;
 }
 
-hide void
+static void
 lehwreset(sc)
 	struct lance_softc *sc;
 {
@@ -277,7 +270,7 @@
 	delay(20000);	/* must not touch le for 20ms */
 }
 
-hide void
+static void
 lehwinit(sc)
 	struct lance_softc *sc;
 {
@@ -297,7 +290,7 @@
 	}
 }
 
-hide void
+static void
 lenocarrier(sc)
 	struct lance_softc *sc;
 {
@@ -353,8 +346,6 @@
 	bus_dma_tag_t dmatag = sa->sa_dmatag;
 	bus_dma_segment_t seg;
 	int rseg, error;
-	/* XXX the following declarations should be elsewhere */
-	extern void myetheraddr __P((u_char *));
 
 	lesc->sc_bustag = sa->sa_bustag;
 
@@ -426,7 +417,7 @@
 	sc->sc_nsupmedia = NLEMEDIA;
 	sc->sc_defaultmedia = IFM_ETHER|IFM_AUTO;
 
-	myetheraddr(sc->sc_enaddr);
+	prom_getether(sa->sa_node, sc->sc_enaddr);
 
 	sc->sc_copytodesc = lance_copytobuf_contig;
 	sc->sc_copyfromdesc = lance_copyfrombuf_contig;
--- a/sys/dev/sbus/isp_sbus.c	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/sbus/isp_sbus.c	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isp_sbus.c,v 1.60 2003/05/03 18:11:39 wiz Exp $ */
+/* $NetBSD: isp_sbus.c,v 1.60.2.1 2004/08/03 10:51:04 skrll Exp $ */
 /*
  * This driver, which is contained in NetBSD in the files:
  *
@@ -21,7 +21,7 @@
  *	sys/pci/isp_pci.c
  *	sys/sbus/isp_sbus.c
  *
- * Is being actively maintained by Matthew Jacob (mjacob@netbsd.org).
+ * Is being actively maintained by Matthew Jacob (mjacob@NetBSD.org).
  * This driver also is shared source with FreeBSD, OpenBSD, Linux, Solaris,
  * Linux versions. This tends to be an interesting maintenance problem.
  *
@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isp_sbus.c,v 1.60 2003/05/03 18:11:39 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isp_sbus.c,v 1.60.2.1 2004/08/03 10:51:04 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -175,7 +175,7 @@
 	}
 	sbc->sbus_node = sa->sa_node;
 
-	freq = PROM_getpropint(sa->sa_node, "clock-frequency", 0);
+	freq = prom_getpropint(sa->sa_node, "clock-frequency", 0);
 	if (freq) {
 		/*
 		 * Convert from HZ to MHz, rounding up.
@@ -196,7 +196,7 @@
 	sbusburst = ((struct sbus_softc *)parent)->sc_burst;
 	if (sbusburst == 0)
 		sbusburst = SBUS_BURST_32 - 1;
-	ispburst = PROM_getpropint(sa->sa_node, "burst-sizes", -1);
+	ispburst = prom_getpropint(sa->sa_node, "burst-sizes", -1);
 	if (ispburst == -1) {
 		ispburst = sbusburst;
 	}
--- a/sys/dev/sbus/lebuffer.c	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/sbus/lebuffer.c	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: lebuffer.c,v 1.18 2002/10/02 16:52:40 thorpej Exp $ */
+/*	$NetBSD: lebuffer.c,v 1.18.6.1 2004/08/03 10:51:04 skrll Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lebuffer.c,v 1.18 2002/10/02 16:52:40 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lebuffer.c,v 1.18.6.1 2004/08/03 10:51:04 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -65,13 +65,8 @@
 	void *aux;
 	const char *busname;
 {
-	struct sbus_attach_args *sa = aux;
-	bus_space_tag_t t = sa->sa_bustag;
-	struct lebuf_softc *sc = t->cookie;
 
-	sa->sa_bustag = sc->sc_bustag;	/* XXX */
-	sbus_print(aux, busname);	/* XXX */
-	sa->sa_bustag = t;		/* XXX */
+	sbus_print(aux, busname);
 	return (UNCONF);
 }
 
@@ -98,14 +93,11 @@
 	struct lebuf_softc *sc = (void *)self;
 	int node;
 	int sbusburst;
-	bus_space_tag_t sbt;
+	bus_space_tag_t bt = sa->sa_bustag;
+	bus_dma_tag_t	dt = sa->sa_dmatag;
 	bus_space_handle_t bh;
 
-	sc->sc_bustag = sa->sa_bustag;
-	sc->sc_dmatag = sa->sa_dmatag;
-
-	if (sbus_bus_map(sa->sa_bustag,
-			 sa->sa_slot, sa->sa_offset, sa->sa_size,
+	if (sbus_bus_map(bt, sa->sa_slot, sa->sa_offset, sa->sa_size,
 			 BUS_SPACE_MAP_LINEAR, &bh) != 0) {
 		printf("%s: attach: cannot map registers\n", self->dv_xname);
 		return;
@@ -116,7 +108,7 @@
 	 * Lance ring-buffers can be stored. Note the buffer's location
 	 * and size, so the `le' driver can pick them up.
 	 */
-	sc->sc_buffer = bus_space_vaddr(sa->sa_bustag, bh);
+	sc->sc_buffer = bus_space_vaddr(bt, bh);
 	sc->sc_bufsiz = sa->sa_size;
 
 	node = sc->sc_node = sa->sa_node;
@@ -128,7 +120,7 @@
 	if (sbusburst == 0)
 		sbusburst = SBUS_BURST_32 - 1; /* 1->16 */
 
-	sc->sc_burst = PROM_getpropint(node, "burst-sizes", -1);
+	sc->sc_burst = prom_getpropint(node, "burst-sizes", -1);
 	if (sc->sc_burst == -1)
 		/* take SBus burst sizes */
 		sc->sc_burst = sbusburst;
@@ -138,24 +130,13 @@
 
 	sbus_establish(&sc->sc_sd, &sc->sc_dev);
 
-	/* Allocate a bus tag */
-	sbt = (bus_space_tag_t) malloc(sizeof(struct sparc_bus_space_tag), 
-	    M_DEVBUF, M_NOWAIT|M_ZERO);
-	if (sbt == NULL) {
-		printf("%s: attach: out of memory\n", self->dv_xname);
-		return;
-	}
-
 	printf(": %dK memory\n", sc->sc_bufsiz / 1024);
 
-	sbt->cookie = sc;
-	sbt->parent = sc->sc_bustag;
-
 	/* search through children */
 	for (node = firstchild(node); node; node = nextsibling(node)) {
 		struct sbus_attach_args sa;
 		sbus_setup_attach_args((struct sbus_softc *)parent,
-				       sbt, sc->sc_dmatag, node, &sa);
+				       bt, dt, node, &sa);
 		(void)config_found(&sc->sc_dev, (void *)&sa, lebufprint);
 		sbus_destroy_attach_args(&sa);
 	}
--- a/sys/dev/sbus/lebuffervar.h	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/sbus/lebuffervar.h	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: lebuffervar.h,v 1.2 1998/07/27 19:25:34 pk Exp $ */
+/*	$NetBSD: lebuffervar.h,v 1.2.48.1 2004/08/03 10:51:04 skrll Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -38,8 +38,6 @@
 
 struct lebuf_softc {
 	struct device sc_dev;		/* us as a device */
-	bus_space_tag_t	sc_bustag;
-	bus_dma_tag_t	sc_dmatag;
 	struct sbusdev sc_sd;		/* sbus device */
 	u_int	sc_rev;			/* revision */
 	int	sc_node;		/* PROM node ID */
--- a/sys/dev/sbus/magma.c	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/sbus/magma.c	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: magma.c,v 1.27 2003/06/29 22:30:35 fvdl Exp $	*/
+/*	$NetBSD: magma.c,v 1.27.2.1 2004/08/03 10:51:04 skrll Exp $	*/
 /*
  * magma.c
  *
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: magma.c,v 1.27 2003/06/29 22:30:35 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: magma.c,v 1.27.2.1 2004/08/03 10:51:04 skrll Exp $");
 
 #if 0
 #define MAGMA_DEBUG
@@ -339,13 +339,13 @@
 
 	dprintf(("magma: matched `%s'\n", sa->sa_name));
 	dprintf(("magma: magma_prom `%s'\n",
-		PROM_getpropstring(sa->sa_node, "magma_prom")));
+		prom_getpropstring(sa->sa_node, "magma_prom")));
 	dprintf(("magma: intlevels `%s'\n",
-		PROM_getpropstring(sa->sa_node, "intlevels")));
+		prom_getpropstring(sa->sa_node, "intlevels")));
 	dprintf(("magma: chiprev `%s'\n",
-		PROM_getpropstring(sa->sa_node, "chiprev")));
+		prom_getpropstring(sa->sa_node, "chiprev")));
 	dprintf(("magma: clock `%s'\n",
-		PROM_getpropstring(sa->sa_node, "clock")));
+		prom_getpropstring(sa->sa_node, "clock")));
 
 	return (1);
 }
@@ -372,7 +372,7 @@
 	 * `supported_cards[]' above), and must be distinguished
 	 * by the `magma_prom' property.
 	 */
-	magma_prom = PROM_getpropstring(node, "magma_prom");
+	magma_prom = prom_getpropstring(node, "magma_prom");
 
 	for (card = supported_cards; card->mb_name != NULL; card++) {
 		if (strcmp(sa->sa_name, card->mb_sbusname) != 0)
@@ -414,7 +414,7 @@
 	 * Find the clock speed; it's the same for all CD1400 chips
 	 * on the board.
 	 */
-	clockstr = PROM_getpropstring(node, "clock");
+	clockstr = prom_getpropstring(node, "clock");
 	if (*clockstr == '\0')
 		/* Default to 25MHz */
 		cd_clock = 25;
@@ -431,7 +431,7 @@
 		cd->cd_clock = cd_clock;
 		cd->cd_reg = (caddr_t)bh + card->mb_cd1400[chip];
 
-		/* PROM_getpropstring(node, "chiprev"); */
+		/* prom_getpropstring(node, "chiprev"); */
 		/* seemingly the Magma drivers just ignore the propstring */
 		cd->cd_chiprev = cd1400_read_reg(cd, CD1400_GFRCR);
 
--- a/sys/dev/sbus/p9100.c	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/sbus/p9100.c	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: p9100.c,v 1.16 2003/06/29 22:30:36 fvdl Exp $ */
+/*	$NetBSD: p9100.c,v 1.16.2.1 2004/08/03 10:51:05 skrll Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -45,7 +45,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: p9100.c,v 1.16 2003/06/29 22:30:36 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: p9100.c,v 1.16.2.1 2004/08/03 10:51:05 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -264,7 +264,7 @@
 	       (i & 7), fb->fb_type.fb_width, fb->fb_type.fb_height,
 	       fb->fb_type.fb_depth);
 
-	fb->fb_type.fb_cmsize = PROM_getpropint(node, "cmsize", 256);
+	fb->fb_type.fb_cmsize = prom_getpropint(node, "cmsize", 256);
 	if ((1 << fb->fb_type.fb_depth) != fb->fb_type.fb_cmsize)
 		printf(", %d entry colormap", fb->fb_type.fb_cmsize);
 
--- a/sys/dev/sbus/qe.c	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/sbus/qe.c	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: qe.c,v 1.30 2003/05/03 18:11:39 wiz Exp $	*/
+/*	$NetBSD: qe.c,v 1.30.2.1 2004/08/03 10:51:05 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: qe.c,v 1.30 2003/05/03 18:11:39 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: qe.c,v 1.30.2.1 2004/08/03 10:51:05 skrll Exp $");
 
 #define QEDEBUG
 
@@ -215,7 +215,6 @@
 	bus_dma_segment_t seg;
 	bus_size_t size;
 	int rseg, error;
-	extern void myetheraddr __P((u_char *));
 
 	if (sa->sa_nreg < 2) {
 		printf("%s: only %d register sets\n",
@@ -243,7 +242,7 @@
 		return;
 	}
 
-	sc->sc_rev = PROM_getpropint(node, "mace-version", -1);
+	sc->sc_rev = prom_getpropint(node, "mace-version", -1);
 	printf(" rev %x", sc->sc_rev);
 
 	sc->sc_bustag = sa->sa_bustag;
@@ -251,14 +250,14 @@
 	sc->sc_qec = qec;
 	sc->sc_qr = qec->sc_regs;
 
-	sc->sc_channel = PROM_getpropint(node, "channel#", -1);
+	sc->sc_channel = prom_getpropint(node, "channel#", -1);
 	sc->sc_burst = qec->sc_burst;
 
 	qestop(sc);
 
 	/* Note: no interrupt level passed */
 	(void)bus_intr_establish(sa->sa_bustag, 0, IPL_NET, qeintr, sc);
-	myetheraddr(sc->sc_enaddr);
+	prom_getether(node, sc->sc_enaddr);
 
 	/*
 	 * Allocate descriptor ring and buffers.
--- a/sys/dev/sbus/qec.c	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/sbus/qec.c	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: qec.c,v 1.26 2002/12/10 13:44:48 pk Exp $ */
+/*	$NetBSD: qec.c,v 1.26.6.1 2004/08/03 10:51:05 skrll Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: qec.c,v 1.26 2002/12/10 13:44:48 pk Exp $");
+__KERNEL_RCSID(0, "$NetBSD: qec.c,v 1.26.6.1 2004/08/03 10:51:05 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -155,7 +155,7 @@
 	sc->sc_bufsiz = (bus_size_t)sa->sa_reg[1].oa_size;
 
 	/* Get number of on-board channels */
-	sc->sc_nchannels = PROM_getpropint(node, "#channels", -1);
+	sc->sc_nchannels = prom_getpropint(node, "#channels", -1);
 	if (sc->sc_nchannels == -1) {
 		printf(": no channels\n");
 		return;
@@ -168,7 +168,7 @@
 	if (sbusburst == 0)
 		sbusburst = SBUS_BURST_32 - 1; /* 1->16 */
 
-	sc->sc_burst = PROM_getpropint(node, "burst-sizes", -1);
+	sc->sc_burst = prom_getpropint(node, "burst-sizes", -1);
 	if (sc->sc_burst == -1)
 		/* take SBus burst sizes */
 		sc->sc_burst = sbusburst;
@@ -178,11 +178,21 @@
 
 	sbus_establish(&sc->sc_sd, &sc->sc_dev);
 
+	/* Allocate a bus tag */
+	sbt = bus_space_tag_alloc(sc->sc_bustag, sc);
+	if (sbt == NULL) {
+		printf("%s: attach: out of memory\n", self->dv_xname);
+		return;
+	}
+
+	sbt->sparc_bus_map = qec_bus_map;
+	sbt->sparc_intr_establish = qec_intr_establish;
+
 	/*
 	 * Collect address translations from the OBP.
 	 */
-	error = PROM_getprop(node, "ranges", sizeof(struct openprom_range),
-			 &sc->sc_nrange, (void **)&sc->sc_range);
+	error = prom_getprop(node, "ranges", sizeof(struct openprom_range),
+			 &sbt->nranges, &sbt->ranges);
 	switch (error) {
 	case 0:
 		break;
@@ -191,19 +201,6 @@
 		panic("%s: error getting ranges property", self->dv_xname);
 	}
 
-	/* Allocate a bus tag */
-	sbt = (bus_space_tag_t) malloc(sizeof(struct sparc_bus_space_tag), 
-	    M_DEVBUF, M_NOWAIT|M_ZERO);
-	if (sbt == NULL) {
-		printf("%s: attach: out of memory\n", self->dv_xname);
-		return;
-	}
-
-	sbt->cookie = sc;
-	sbt->parent = sc->sc_bustag;
-	sbt->sparc_bus_map = qec_bus_map;
-	sbt->sparc_intr_establish = qec_intr_establish;
-
 	/*
 	 * Save interrupt information for use in our qec_intr_establish()
 	 * function below. Apparently, the intr level for the quad
@@ -230,32 +227,21 @@
 }
 
 int
-qec_bus_map(t, baddr, size, flags, va, hp)
+qec_bus_map(t, ba, size, flags, va, hp)
 	bus_space_tag_t t;
-	bus_addr_t baddr;
+	bus_addr_t ba;
 	bus_size_t size;
 	int	flags;
 	vaddr_t va;	/* Ignored */
 	bus_space_handle_t *hp;
 {
-	struct qec_softc *sc = t->cookie;
-	int slot = BUS_ADDR_IOSPACE(baddr);
-	int i;
-
-	for (i = 0; i < sc->sc_nrange; i++) {
-		struct openprom_range *rp = &sc->sc_range[i];
+	int error;
 
-		if (sc->sc_range[i].or_child_space != slot)
-			continue;
+	if ((error = bus_space_translate_address_generic(
+				t->ranges, t->nranges, &ba)) != 0)
+		return (error);
 
-		/* We've found the connection to the parent bus */
-		return (bus_space_map(sc->sc_bustag,
-		    BUS_ADDR(rp->or_parent_space,
-			     rp->or_parent_base + BUS_ADDR_PADDR(baddr)),
-		    size, flags, hp));
-	}
-
-	return (EINVAL);
+	return (bus_space_map(t->parent, ba, size, flags, hp));
 }
 
 void *
--- a/sys/dev/sbus/qecvar.h	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/sbus/qecvar.h	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: qecvar.h,v 1.6 2003/05/03 18:11:39 wiz Exp $	*/
+/*	$NetBSD: qecvar.h,v 1.6.2.1 2004/08/03 10:51:05 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -41,8 +41,6 @@
 	struct sbusdev sc_sd;		/* sbus device */
 	bus_space_tag_t	sc_bustag;	/* bus & DMA tags */
 	bus_dma_tag_t	sc_dmatag;
-	struct	openprom_range *sc_range;/* PROM ranges */
-	int	sc_nrange;		/*	       */
 	struct	openprom_intr *sc_intr;	/* interrupt info */
 
 	bus_space_handle_t sc_regs;	/* QEC registers */
--- a/sys/dev/sbus/sbusvar.h	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/sbus/sbusvar.h	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: sbusvar.h,v 1.19 2002/09/27 20:41:35 thorpej Exp $ */
+/*	$NetBSD: sbusvar.h,v 1.19.6.1 2004/08/03 10:51:05 skrll Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -135,7 +135,7 @@
 #define SBUS_BURST_64	0x40
 
 /* We use #defined(SUN4*) here while the ports are in flux */
-#if defined(SUN4) || defined(SUN4C) || defined(SUN4M)
+#if defined(SUN4) || defined(SUN4C) || defined(SUN4M) || defined(SUN4D)
 #include <sparc/dev/sbusvar.h>
 #elif defined(SUN4U)
 #include <sparc64/dev/sbusvar.h>
--- a/sys/dev/sbus/sio16.c	Tue Aug 03 10:40:55 2004 +0000
+++ b/sys/dev/sbus/sio16.c	Tue Aug 03 10:51:04 2004 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: sio16.c,v 1.11 2002/12/10 13:44:48 pk Exp $	*/
+/*	$NetBSD: sio16.c,v 1.11.6.1 2004/08/03 10:51:05 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sio16.c,v 1.11 2002/12/10 13:44:48 pk Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sio16.c,v 1.11.6.1 2004/08/03 10:51:05 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -191,14 +191,14 @@
 	}
 	sc->sc_ack = h;
 
-	mode = PROM_getpropstring(sa->sa_node, "mode");
+	mode = prom_getpropstring(sa->sa_node, "mode");
 	if (mode)
 		printf(", %s mode", mode);
 
 	/* get the clock frequency */
-	sc->sc_clk = PROM_getpropint(sa->sa_node, "clk", 24000);
+	sc->sc_clk = prom_getpropint(sa->sa_node, "clk", 24000);
 
-	model = PROM_getpropstring(sa->sa_node, "model");
+	model = prom_getpropstring(sa->sa_node, "model");
 	if (model == 0) {
 		printf(", no model property, bailing\n");
 		return;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/dev/sbus/spif.c	Tue Aug 03 10:51:04 2004 +0000
@@ -0,0 +1,1147 @@
+/*	$NetBSD: spif.c,v 1.1.2.2 2004/08/03 10:51:05 skrll Exp $	*/
+/*	$OpenBSD: spif.c,v 1.12 2003/10/03 16:44:51 miod Exp $	*/
+
+/*
+ * Copyright (c) 1999-2002 Jason L. Wright (jason@thought.net)
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Effort sponsored in part by the Defense Advanced Research Projects
+ * Agency (DARPA) and Air Force Research Laboratory, Air Force
+ * Materiel Command, USAF, under agreement number F30602-01-2-0537.
+ *
+ */
+
+/*
+ * Driver for the SUNW,spif: 8 serial, 1 parallel sbus board
+ * based heavily on Iain Hibbert's driver for the MAGMA cards
+ */
+
+/* Ported to NetBSD 2.0 by Hauke Fath */
+
+
+#include <sys/cdefs.h>
+__KERNEL_RCSID(0, "$NetBSD: spif.c,v 1.1.2.2 2004/08/03 10:51:05 skrll Exp $");
+
+#include "spif.h"
+#if NSPIF > 0
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/proc.h>
+#include <sys/device.h>
+#include <sys/file.h>
+#include <sys/ioctl.h>
+#include <sys/malloc.h>
+#include <sys/tty.h>
+#include <sys/time.h>
+#include <sys/kernel.h>
+#include <sys/syslog.h>
+#include <sys/conf.h>
+#include <sys/errno.h>
+
+#include <machine/bus.h>
+#include <machine/intr.h>
+#include <machine/autoconf.h>
+#include <machine/promlib.h>
+
+#include <dev/sbus/sbusvar.h>
+
+#include <dev/sbus/spifvar.h>
+#include <dev/sbus/spifreg.h>
+
+
+/* Autoconfig stuff */
+
+CFATTACH_DECL(spif, sizeof(struct spif_softc),
+    spif_match, spif_attach, NULL, NULL);
+
+CFATTACH_DECL(stty, sizeof(struct stty_softc),
+    stty_match, stty_attach, NULL, NULL);
+
+CFATTACH_DECL(sbpp, sizeof(struct sbpp_softc),
+    sbpp_match, sbpp_attach, NULL, NULL);
+
+extern struct cfdriver spif_cd;
+extern struct cfdriver stty_cd;
+extern struct cfdriver sbpp_cd;
+
+dev_type_open(stty_open);
+dev_type_close(stty_close);
+dev_type_read(stty_read);
+dev_type_write(stty_write);
+dev_type_ioctl(stty_ioctl);
+dev_type_stop(stty_stop);
+dev_type_tty(stty_tty);
+dev_type_poll(stty_poll);
+
+const struct cdevsw stty_cdevsw = {
+	stty_open, stty_close, stty_read, stty_write, stty_ioctl,
+	stty_stop, stty_tty, stty_poll, nommap, ttykqfilter, D_TTY
+};
+
+dev_type_open(sbpp_open);
+dev_type_close(sbpp_close);
+dev_type_read(sbpp_read);
+dev_type_write(sbpp_write);
+dev_type_ioctl(sbpp_ioctl);
+dev_type_poll(sbpp_poll);
+
+const struct cdevsw sbpp_cdevsw = {
+	sbpp_open, sbpp_close, sbpp_read, sbpp_write, sbpp_ioctl,
+	nostop, notty, sbpp_poll, nommap, nokqfilter,
+};
+
+
+/* normal STC access */
+#define	STC_WRITE(sc,r,v)	\
+    bus_space_write_1((sc)->sc_bustag, (sc)->sc_stch, (r), (v))
+#define	STC_READ(sc,r)		\
+    bus_space_read_1((sc)->sc_bustag, (sc)->sc_stch, (r))
+
+/* IACK STC access */
+#define	ISTC_WRITE(sc,r,v)	\
+    bus_space_write_1((sc)->sc_bustag, (sc)->sc_istch, (r), (v))
+#define	ISTC_READ(sc,r)		\
+    bus_space_read_1((sc)->sc_bustag, (sc)->sc_istch, (r))
+
+/* PPC access */
+#define	PPC_WRITE(sc,r,v)	\
+    bus_space_write_1((sc)->sc_bustag, (sc)->sc_ppch, (r), (v))
+#define	PPC_READ(sc,r)		\
+    bus_space_read_1((sc)->sc_bustag, (sc)->sc_ppch, (r))
+
+#define	DTR_WRITE(sc,port,v)						\
+    do {								\
+	sc->sc_ttys->sc_port[(port)].sp_dtr = v;			\
+	bus_space_write_1((sc)->sc_bustag,				\
+	    sc->sc_dtrh, port, (v == 0) ? 1 : 0);			\
+    } while (0)
+
+#define	DTR_READ(sc,port)	((sc)->sc_ttys->sc_port[(port)].sp_dtr)
+
+
+int
+spif_match(parent, vcf, aux)
+	struct device *parent;
+	struct cfdata *vcf;
+	void *aux;
+{
+	struct sbus_attach_args *sa = aux;
+
+	if (strcmp(vcf->cf_name, sa->sa_name) &&
+	    strcmp("SUNW,spif", sa->sa_name))
+		return (0);
+	return (1);
+}
+
+void    
+spif_attach(parent, self, aux)
+	struct device *parent, *self;
+	void *aux;
+{
+	struct spif_softc *sc = (struct spif_softc *)self;
+	struct sbus_attach_args *sa = aux;
+
+	if (sa->sa_nintr != 2) {
+		printf(": expected %d interrupts, got %d\n", 2, sa->sa_nintr);
+		return;
+	}
+
+	if (sa->sa_nreg != 1) {
+		printf(": expected %d registers, got %d\n", 1, sa->sa_nreg);
+		return;
+	}
+
+	sc->sc_bustag = sa->sa_bustag;
+	if (sbus_bus_map(sa->sa_bustag, sa->sa_slot,
+	    sa->sa_offset, sa->sa_size,
+	    0, &sc->sc_regh) != 0) {
+		printf(": can't map registers\n");
+		return;
+	}
+
+	if (bus_space_subregion(sc->sc_bustag, sc->sc_regh,
+	    DTR_REG_OFFSET, DTR_REG_LEN, &sc->sc_dtrh) != 0) {
+		printf(": can't map dtr regs\n");
+		goto fail_unmapregs;
+	}
+
+	if (bus_space_subregion(sc->sc_bustag, sc->sc_regh,
+	    STC_REG_OFFSET, STC_REG_LEN, &sc->sc_stch) != 0) {
+		printf(": can't map dtr regs\n");
+		goto fail_unmapregs;
+	}
+
+	if (bus_space_subregion(sc->sc_bustag, sc->sc_regh,
+	    ISTC_REG_OFFSET, ISTC_REG_LEN, &sc->sc_istch) != 0) {
+		printf(": can't map dtr regs\n");
+		goto fail_unmapregs;
+	}
+
+	if (bus_space_subregion(sc->sc_bustag, sc->sc_regh,
+	    PPC_REG_OFFSET, PPC_REG_LEN, &sc->sc_ppch) != 0) {
+		printf(": can't map dtr regs\n");
+		goto fail_unmapregs;
+	}
+
+	sc->sc_ppcih = bus_intr_establish(sa->sa_bustag,
+	    sa->sa_intr[PARALLEL_INTR].oi_pri, IPL_SERIAL, spif_ppcintr, sc);
+	if (sc->sc_ppcih == NULL) {
+		printf(": failed to establish ppc interrupt\n");
+		goto fail_unmapregs;
+	}
+
+	sc->sc_stcih = bus_intr_establish(sa->sa_bustag,
+	    sa->sa_intr[SERIAL_INTR].oi_pri, IPL_SERIAL, spif_stcintr, sc);
+	if (sc->sc_stcih == NULL) {
+		printf(": failed to establish stc interrupt\n");
+		goto fail_unmapregs;
+	}
+
+	sc->sc_softih = softintr_establish(IPL_TTY, spif_softintr, sc);
+	if (sc->sc_softih == NULL) {
+		printf(": can't get soft intr\n");
+		goto fail_unmapregs;
+	}
+
+	sc->sc_node = sa->sa_node;
+
+	sc->sc_rev = prom_getpropint(sc->sc_node, "revlev", 0);
+
+	sc->sc_osc = prom_getpropint(sc->sc_node, "verosc", 0);
+	switch (sc->sc_osc) {
+	case SPIF_OSC10:
+		sc->sc_osc = 10000000;
+		break;
+	case SPIF_OSC9:
+	default:
+		sc->sc_osc = 9830400;
+		break;
+	}
+
+	sc->sc_nser = 8;
+	sc->sc_npar = 1;
+
+	sc->sc_rev2 = STC_READ(sc, STC_GFRCR);
+	STC_WRITE(sc, STC_GSVR, 0);
+
+	stty_write_ccr(sc, CD180_CCR_CMD_RESET | CD180_CCR_RESETALL);
+	while (STC_READ(sc, STC_GSVR) != 0xff);
+	while (STC_READ(sc, STC_GFRCR) != sc->sc_rev2);
+
+	STC_WRITE(sc, STC_PPRH, CD180_PPRH);
+	STC_WRITE(sc, STC_PPRL, CD180_PPRL);
+	STC_WRITE(sc, STC_MSMR, SPIF_MSMR);
+	STC_WRITE(sc, STC_TSMR, SPIF_TSMR);
+	STC_WRITE(sc, STC_RSMR, SPIF_RSMR);
+	STC_WRITE(sc, STC_GSVR, 0);
+	STC_WRITE(sc, STC_GSCR1, 0);
+	STC_WRITE(sc, STC_GSCR2, 0);
+	STC_WRITE(sc, STC_GSCR3, 0);
+
+	printf(": rev %x chiprev %x osc %sMHz\n",
+	    sc->sc_rev, sc->sc_rev2, clockfreq(sc->sc_osc));
+
+	(void)config_found(self, stty_match, NULL);
+	(void)config_found(self, sbpp_match, NULL);
+
+	return;
+
+fail_unmapregs:
+	bus_space_unmap(sa->sa_bustag, sc->sc_regh, sa->sa_size);
+}
+
+int
+stty_match(parent, vcf, aux)
+	struct device *parent;
+	struct cfdata *vcf;
+	void *aux;
+{
+	struct spif_softc *sc = (struct spif_softc *)parent;
+
+	return (aux == stty_match && sc->sc_ttys == NULL);
+}
+
+void
+stty_attach(parent, dev, aux)
+	struct device *parent, *dev;
+	void *aux;
+{
+	struct spif_softc *sc = (struct spif_softc *)parent;
+	struct stty_softc *ssc = (struct stty_softc *)dev;
+	int port;
+
+	sc->sc_ttys = ssc;
+
+	for (port = 0; port < sc->sc_nser; port++) {
+		struct stty_port *sp = &ssc->sc_port[port];
+		struct tty *tp;
+
+		DTR_WRITE(sc, port, 0);
+
+		tp = ttymalloc();
+
+		tp->t_oproc = stty_start;
+		tp->t_param = stty_param;
+
+		sp->sp_tty = tp;
+		sp->sp_sc = sc;
+		sp->sp_channel = port;
+
+		sp->sp_rbuf = malloc(STTY_RBUF_SIZE, M_DEVBUF, M_NOWAIT);
+		if(sp->sp_rbuf == NULL)
+			break;
+
+		sp->sp_rend = sp->sp_rbuf + STTY_RBUF_SIZE;
+	}
+
+	ssc->sc_nports = port;
+
+	printf(": %d tty%s\n", port, port == 1 ? "" : "s");
+}
+
+int
+stty_open(dev, flags, mode, p)
+	dev_t dev;
+	int flags;
+	int mode;
+	struct proc *p;
+{
+	struct spif_softc *csc;
+	struct stty_softc *sc;
+	struct stty_port *sp;
+	struct tty *tp;
+	int card = SPIF_CARD(dev);
+	int port = SPIF_PORT(dev);
+	int s;
+
+	if (card >= stty_cd.cd_ndevs || card >= spif_cd.cd_ndevs)
+		return (ENXIO);
+
+	sc = stty_cd.cd_devs[card];
+	csc = spif_cd.cd_devs[card];
+	if (sc == NULL || csc == NULL)
+		return (ENXIO);
+
+	if (port >= sc->sc_nports)
+		return (ENXIO);
+
+	sp = &sc->sc_port[port];
+	tp = sp->sp_tty;
+	tp->t_dev = dev;
+
+	if (!ISSET(tp->t_state, TS_ISOPEN) && tp->t_wopen == 0) {
+		ttychars(tp);
+		tp->t_iflag = TTYDEF_IFLAG;
+		tp->t_oflag = TTYDEF_OFLAG;
+		tp->t_cflag = TTYDEF_CFLAG;
+		if (ISSET(sp->sp_openflags, TIOCFLAG_CLOCAL))
+			SET(tp->t_cflag, CLOCAL);
+		if (ISSET(sp->sp_openflags, TIOCFLAG_CRTSCTS))