Add some missing documentation.
This commit is contained in:
parent
e839d267cd
commit
8752c2315f
@ -1,4 +1,4 @@
|
||||
# $NetBSD: mi,v 1.353 2001/06/30 21:24:06 tron Exp $
|
||||
# $NetBSD: mi,v 1.354 2001/07/01 04:11:15 gmcgarry Exp $
|
||||
./sys comp-sysutil-root
|
||||
./usr/bin/addr2line comp-debug-bin
|
||||
./usr/bin/ar comp-util-bin
|
||||
@ -392,11 +392,11 @@
|
||||
./usr/include/krb5/hdb_asn1.h comp-c-include
|
||||
./usr/include/krb5/hdb_err.h comp-c-include
|
||||
./usr/include/krb5/heim_err.h comp-c-include
|
||||
./usr/include/krb5/krb5_asn1.h comp-c-include
|
||||
./usr/include/krb5/krb5-private.h comp-c-include
|
||||
./usr/include/krb5/krb5-protos.h comp-c-include
|
||||
./usr/include/krb5/krb5-types.h comp-c-include
|
||||
./usr/include/krb5/krb5.h comp-c-include
|
||||
./usr/include/krb5/krb5_asn1.h comp-c-include
|
||||
./usr/include/krb5/krb5_err.h comp-c-include
|
||||
./usr/include/krb5/parse_bytes.h comp-c-include
|
||||
./usr/include/krb5/parse_time.h comp-c-include
|
||||
@ -2879,6 +2879,16 @@
|
||||
./usr/share/man/cat8/cvsbug.0 comp-cvs-catman
|
||||
./usr/share/man/cat8/kgmon.0 comp-sysutil-catman
|
||||
./usr/share/man/cat8/verify_krb5_conf.0 comp-sysutil-catman
|
||||
./usr/share/man/cat9/CARDBUS_PRODUCT.0 comp-sys-catman
|
||||
./usr/share/man/cat9/CARDBUS_VENDOR.0 comp-sys-catman
|
||||
./usr/share/man/cat9/Cardbus_conf_read.0 comp-sys-catman
|
||||
./usr/share/man/cat9/Cardbus_conf_write.0 comp-sys-catman
|
||||
./usr/share/man/cat9/Cardbus_free_tag.0 comp-sys-catman
|
||||
./usr/share/man/cat9/Cardbus_function_disable.0 comp-sys-catman
|
||||
./usr/share/man/cat9/Cardbus_function_enable.0 comp-sys-catman
|
||||
./usr/share/man/cat9/Cardbus_make_tag.0 comp-sys-catman
|
||||
./usr/share/man/cat9/Cardbus_mapreg_map.0 comp-sys-catman
|
||||
./usr/share/man/cat9/Cardbus_mapreg_unmap.0 comp-sys-catman
|
||||
./usr/share/man/cat9/ETHER_FIRST_MULTI.0 comp-sys-catman
|
||||
./usr/share/man/cat9/ETHER_IS_MULTICAST.0 comp-sys-catman
|
||||
./usr/share/man/cat9/ETHER_NEXT_MULTI.0 comp-sys-catman
|
||||
@ -2896,12 +2906,16 @@
|
||||
./usr/share/man/cat9/M_LEADINGSPACE.0 comp-sys-catman
|
||||
./usr/share/man/cat9/M_PREPEND.0 comp-sys-catman
|
||||
./usr/share/man/cat9/M_TRAILINGSPACE.0 comp-sys-catman
|
||||
./usr/share/man/cat9/PCI_PRODUCT.0 comp-sys-catman
|
||||
./usr/share/man/cat9/PCI_REVISION.0 comp-sys-catman
|
||||
./usr/share/man/cat9/PCI_VENDOR.0 comp-sys-catman
|
||||
./usr/share/man/cat9/access.0 comp-sys-catman
|
||||
./usr/share/man/cat9/arp.0 comp-sys-catman
|
||||
./usr/share/man/cat9/arp_ifinit.0 comp-sys-catman
|
||||
./usr/share/man/cat9/arpintr.0 comp-sys-catman
|
||||
./usr/share/man/cat9/arpresolve.0 comp-sys-catman
|
||||
./usr/share/man/cat9/audio.0 comp-sys-catman
|
||||
./usr/share/man/cat9/autoconf.0 comp-sys-catman
|
||||
./usr/share/man/cat9/bitmask_snprintf.0 comp-sys-catman
|
||||
./usr/share/man/cat9/boottime.0 comp-sys-catman
|
||||
./usr/share/man/cat9/bounds_check_with_label.0 comp-sys-catman
|
||||
@ -2965,6 +2979,20 @@
|
||||
./usr/share/man/cat9/callout_pending.0 comp-sys-catman
|
||||
./usr/share/man/cat9/callout_reset.0 comp-sys-catman
|
||||
./usr/share/man/cat9/callout_stop.0 comp-sys-catman
|
||||
./usr/share/man/cat9/cardbus.0 comp-sys-catman
|
||||
./usr/share/man/cat9/cardbus_attach_card.0 comp-sys-catman
|
||||
./usr/share/man/cat9/cardbus_conf_read.0 comp-sys-catman
|
||||
./usr/share/man/cat9/cardbus_conf_write.0 comp-sys-catman
|
||||
./usr/share/man/cat9/cardbus_detach_card.0 comp-sys-catman
|
||||
./usr/share/man/cat9/cardbus_free_tag.0 comp-sys-catman
|
||||
./usr/share/man/cat9/cardbus_function_disable.0 comp-sys-catman
|
||||
./usr/share/man/cat9/cardbus_function_enable.0 comp-sys-catman
|
||||
./usr/share/man/cat9/cardbus_get_capability.0 comp-sys-catman
|
||||
./usr/share/man/cat9/cardbus_intr_disestablish.0 comp-sys-catman
|
||||
./usr/share/man/cat9/cardbus_intr_establish.0 comp-sys-catman
|
||||
./usr/share/man/cat9/cardbus_make_tag.0 comp-sys-catman
|
||||
./usr/share/man/cat9/cardbus_mapreg_map.0 comp-sys-catman
|
||||
./usr/share/man/cat9/cardbus_mapreg_unmap.0 comp-sys-catman
|
||||
./usr/share/man/cat9/clock_secs_to_ymdhms.0 comp-sys-catman
|
||||
./usr/share/man/cat9/clock_ymdhms_to_secs.0 comp-sys-catman
|
||||
./usr/share/man/cat9/cltom.0 comp-sys-catman
|
||||
@ -2974,6 +3002,18 @@
|
||||
./usr/share/man/cat9/cnmagic.0 comp-sys-catman
|
||||
./usr/share/man/cat9/cnpollc.0 comp-sys-catman
|
||||
./usr/share/man/cat9/cnputc.0 comp-sys-catman
|
||||
./usr/share/man/cat9/config.0 comp-sys-catman
|
||||
./usr/share/man/cat9/config_activate.0 comp-sys-catman
|
||||
./usr/share/man/cat9/config_attach.0 comp-sys-catman
|
||||
./usr/share/man/cat9/config_deactivate.0 comp-sys-catman
|
||||
./usr/share/man/cat9/config_defer.0 comp-sys-catman
|
||||
./usr/share/man/cat9/config_detach.0 comp-sys-catman
|
||||
./usr/share/man/cat9/config_found.0 comp-sys-catman
|
||||
./usr/share/man/cat9/config_found_sm.0 comp-sys-catman
|
||||
./usr/share/man/cat9/config_interrupts.0 comp-sys-catman
|
||||
./usr/share/man/cat9/config_pending_decr.0 comp-sys-catman
|
||||
./usr/share/man/cat9/config_pending_incr.0 comp-sys-catman
|
||||
./usr/share/man/cat9/config_search.0 comp-sys-catman
|
||||
./usr/share/man/cat9/cons.0 comp-sys-catman
|
||||
./usr/share/man/cat9/copy.0 comp-sys-catman
|
||||
./usr/share/man/cat9/copyin.0 comp-sys-catman
|
||||
@ -2995,6 +3035,7 @@
|
||||
./usr/share/man/cat9/disklabel.0 comp-sys-catman
|
||||
./usr/share/man/cat9/dopowerhooks.0 comp-sys-catman
|
||||
./usr/share/man/cat9/doshutdownhooks.0 comp-sys-catman
|
||||
./usr/share/man/cat9/driver.0 comp-sys-catman
|
||||
./usr/share/man/cat9/ether_addmulti.0 comp-sys-catman
|
||||
./usr/share/man/cat9/ether_delmulti.0 comp-sys-catman
|
||||
./usr/share/man/cat9/ether_ifattach.0 comp-sys-catman
|
||||
@ -3026,15 +3067,50 @@
|
||||
./usr/share/man/cat9/fuword.0 comp-sys-catman
|
||||
./usr/share/man/cat9/gsignal.0 comp-sys-catman
|
||||
./usr/share/man/cat9/humanize_number.0 comp-sys-catman
|
||||
./usr/share/man/cat9/i386/bios32_service.0 comp-sys-catman
|
||||
./usr/share/man/cat9/i386/bioscall.0 comp-sys-catman
|
||||
./usr/share/man/cat9/in4_cksum.0 comp-sys-catman
|
||||
./usr/share/man/cat9/in6_cksum.0 comp-sys-catman
|
||||
./usr/share/man/cat9/in_cksum.0 comp-sys-catman
|
||||
./usr/share/man/cat9/inittodr.0 comp-sys-catman
|
||||
./usr/share/man/cat9/intro.0 comp-sys-catman
|
||||
./usr/share/man/cat9/ioasic.0 comp-sys-catman
|
||||
./usr/share/man/cat9/ioasic_attach_devs.0 comp-sys-catman
|
||||
./usr/share/man/cat9/ioasic_intr_disestablish.0 comp-sys-catman
|
||||
./usr/share/man/cat9/ioasic_intr_establish.0 comp-sys-catman
|
||||
./usr/share/man/cat9/ioasic_intr_evcnt.0 comp-sys-catman
|
||||
./usr/share/man/cat9/ioasic_submatch.0 comp-sys-catman
|
||||
./usr/share/man/cat9/ioctl.0 comp-sys-catman
|
||||
./usr/share/man/cat9/isa.0 comp-sys-catman
|
||||
./usr/share/man/cat9/isa_dmaabort.0 comp-sys-catman
|
||||
./usr/share/man/cat9/isa_dmacascade.0 comp-sys-catman
|
||||
./usr/share/man/cat9/isa_dmacount.0 comp-sys-catman
|
||||
./usr/share/man/cat9/isa_dmadone.0 comp-sys-catman
|
||||
./usr/share/man/cat9/isa_dmamap_create.0 comp-sys-catman
|
||||
./usr/share/man/cat9/isa_dmamap_destroy.0 comp-sys-catman
|
||||
./usr/share/man/cat9/isa_dmamaxsize.0 comp-sys-catman
|
||||
./usr/share/man/cat9/isa_dmamem_alloc.0 comp-sys-catman
|
||||
./usr/share/man/cat9/isa_dmamem_free.0 comp-sys-catman
|
||||
./usr/share/man/cat9/isa_dmamem_map.0 comp-sys-catman
|
||||
./usr/share/man/cat9/isa_dmamem_unmap.0 comp-sys-catman
|
||||
./usr/share/man/cat9/isa_dmastart.0 comp-sys-catman
|
||||
./usr/share/man/cat9/isa_drq_isfree.0 comp-sys-catman
|
||||
./usr/share/man/cat9/isa_free.0 comp-sys-catman
|
||||
./usr/share/man/cat9/isa_intr_alloc.0 comp-sys-catman
|
||||
./usr/share/man/cat9/isa_intr_disestablish.0 comp-sys-catman
|
||||
./usr/share/man/cat9/isa_intr_establish.0 comp-sys-catman
|
||||
./usr/share/man/cat9/isa_intr_evcnt.0 comp-sys-catman
|
||||
./usr/share/man/cat9/isa_malloc.0 comp-sys-catman
|
||||
./usr/share/man/cat9/isa_mappage.0 comp-sys-catman
|
||||
./usr/share/man/cat9/isapnp.0 comp-sys-catman
|
||||
./usr/share/man/cat9/isapnp_config.0 comp-sys-catman
|
||||
./usr/share/man/cat9/isapnp_devmatch.0 comp-sys-catman
|
||||
./usr/share/man/cat9/isapnp_unconfig.0 comp-sys-catman
|
||||
./usr/share/man/cat9/kernacc.0 comp-sys-catman
|
||||
./usr/share/man/cat9/kprintf.0 comp-sys-catman
|
||||
./usr/share/man/cat9/kthread_create.0 comp-sys-catman
|
||||
./usr/share/man/cat9/kthread_create1.0 comp-sys-catman
|
||||
./usr/share/man/cat9/kthread_exit.0 comp-sys-catman
|
||||
./usr/share/man/cat9/linedisc.0 comp-sys-catman
|
||||
./usr/share/man/cat9/lock.0 comp-sys-catman
|
||||
./usr/share/man/cat9/lockinit.0 comp-sys-catman
|
||||
@ -3068,9 +3144,41 @@
|
||||
./usr/share/man/cat9/mtocl.0 comp-sys-catman
|
||||
./usr/share/man/cat9/mtod.0 comp-sys-catman
|
||||
./usr/share/man/cat9/panic.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pci.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pci_conf_interrupt.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pci_conf_print.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pci_conf_read.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pci_conf_write.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pci_configure_bus.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pci_decompose_tag.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pci_devinfo.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pci_findvendor.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pci_get_capability.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pci_intr.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pci_make_tag.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pci_mapreg_info.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pci_mapreg_map.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pci_mapreg_type.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pcmcia.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pcmcia_cis_read_1.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pcmcia_cis_read_2.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pcmcia_cis_read_3.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pcmcia_cis_read_4.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pcmcia_cis_read_n.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pcmcia_function_disable.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pcmcia_function_enable.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pcmcia_function_init.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pcmcia_intr_disestablish.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pcmcia_intr_establish.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pcmcia_io_alloc.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pcmcia_io_free.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pcmcia_io_map.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pcmcia_io_unmap.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pcmcia_mem_alloc.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pcmcia_mem_free.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pcmcia_mem_map.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pcmcia_mem_unmap.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pcmcia_scan_cis.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pfil.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pfil_add_hook.0 comp-sys-catman
|
||||
./usr/share/man/cat9/pfil_hook_get.0 comp-sys-catman
|
||||
@ -3225,6 +3333,21 @@
|
||||
./usr/share/man/cat9/uvmspace_share.0 comp-sys-catman
|
||||
./usr/share/man/cat9/uvmspace_unshare.0 comp-sys-catman
|
||||
./usr/share/man/cat9/uvn_attach.0 comp-sys-catman
|
||||
./usr/share/man/cat9/vme.0 comp-sys-catman
|
||||
./usr/share/man/cat9/vme_dmamap_create.0 comp-sys-catman
|
||||
./usr/share/man/cat9/vme_dmamap_destroy.0 comp-sys-catman
|
||||
./usr/share/man/cat9/vme_dmamem_alloc.0 comp-sys-catman
|
||||
./usr/share/man/cat9/vme_dmamem_free.0 comp-sys-catman
|
||||
./usr/share/man/cat9/vme_intr_disestablish.0 comp-sys-catman
|
||||
./usr/share/man/cat9/vme_intr_establish.0 comp-sys-catman
|
||||
./usr/share/man/cat9/vme_intr_evcnt.0 comp-sys-catman
|
||||
./usr/share/man/cat9/vme_intr_map.0 comp-sys-catman
|
||||
./usr/share/man/cat9/vme_probe.0 comp-sys-catman
|
||||
./usr/share/man/cat9/vme_space_alloc.0 comp-sys-catman
|
||||
./usr/share/man/cat9/vme_space_free.0 comp-sys-catman
|
||||
./usr/share/man/cat9/vme_space_get.0 comp-sys-catman
|
||||
./usr/share/man/cat9/vme_space_map.0 comp-sys-catman
|
||||
./usr/share/man/cat9/vme_space_unmap.0 comp-sys-catman
|
||||
./usr/share/man/cat9/vprintf.0 comp-sys-catman
|
||||
./usr/share/man/cat9/vsnprintf.0 comp-sys-catman
|
||||
./usr/share/man/cat9/vsprintf.0 comp-sys-catman
|
||||
@ -4860,6 +4983,16 @@
|
||||
./usr/share/man/man8/cvsbug.8 comp-cvs-man
|
||||
./usr/share/man/man8/kgmon.8 comp-sysutil-man
|
||||
./usr/share/man/man8/verify_krb5_conf.8 comp-sysutil-man
|
||||
./usr/share/man/man9/CARDBUS_PRODUCT.9 comp-sys-man
|
||||
./usr/share/man/man9/CARDBUS_VENDOR.9 comp-sys-man
|
||||
./usr/share/man/man9/Cardbus_conf_read.9 comp-sys-man
|
||||
./usr/share/man/man9/Cardbus_conf_write.9 comp-sys-man
|
||||
./usr/share/man/man9/Cardbus_free_tag.9 comp-sys-man
|
||||
./usr/share/man/man9/Cardbus_function_disable.9 comp-sys-man
|
||||
./usr/share/man/man9/Cardbus_function_enable.9 comp-sys-man
|
||||
./usr/share/man/man9/Cardbus_make_tag.9 comp-sys-man
|
||||
./usr/share/man/man9/Cardbus_mapreg_map.9 comp-sys-man
|
||||
./usr/share/man/man9/Cardbus_mapreg_unmap.9 comp-sys-man
|
||||
./usr/share/man/man9/ETHER_FIRST_MULTI.9 comp-sys-man
|
||||
./usr/share/man/man9/ETHER_IS_MULTICAST.9 comp-sys-man
|
||||
./usr/share/man/man9/ETHER_NEXT_MULTI.9 comp-sys-man
|
||||
@ -4877,12 +5010,16 @@
|
||||
./usr/share/man/man9/M_LEADINGSPACE.9 comp-sys-man
|
||||
./usr/share/man/man9/M_PREPEND.9 comp-sys-man
|
||||
./usr/share/man/man9/M_TRAILINGSPACE.9 comp-sys-man
|
||||
./usr/share/man/man9/PCI_PRODUCT.9 comp-sys-man
|
||||
./usr/share/man/man9/PCI_REVISION.9 comp-sys-man
|
||||
./usr/share/man/man9/PCI_VENDOR.9 comp-sys-man
|
||||
./usr/share/man/man9/access.9 comp-sys-man
|
||||
./usr/share/man/man9/arp.9 comp-sys-man
|
||||
./usr/share/man/man9/arp_ifinit.9 comp-sys-man
|
||||
./usr/share/man/man9/arpintr.9 comp-sys-man
|
||||
./usr/share/man/man9/arpresolve.9 comp-sys-man
|
||||
./usr/share/man/man9/audio.9 comp-sys-man
|
||||
./usr/share/man/man9/autoconf.9 comp-sys-man
|
||||
./usr/share/man/man9/bitmask_snprintf.9 comp-sys-man
|
||||
./usr/share/man/man9/boottime.9 comp-sys-man
|
||||
./usr/share/man/man9/bounds_check_with_label.9 comp-sys-man
|
||||
@ -4946,6 +5083,20 @@
|
||||
./usr/share/man/man9/callout_pending.9 comp-sys-man
|
||||
./usr/share/man/man9/callout_reset.9 comp-sys-man
|
||||
./usr/share/man/man9/callout_stop.9 comp-sys-man
|
||||
./usr/share/man/man9/cardbus.9 comp-sys-man
|
||||
./usr/share/man/man9/cardbus_attach_card.9 comp-sys-man
|
||||
./usr/share/man/man9/cardbus_conf_read.9 comp-sys-man
|
||||
./usr/share/man/man9/cardbus_conf_write.9 comp-sys-man
|
||||
./usr/share/man/man9/cardbus_detach_card.9 comp-sys-man
|
||||
./usr/share/man/man9/cardbus_free_tag.9 comp-sys-man
|
||||
./usr/share/man/man9/cardbus_function_disable.9 comp-sys-man
|
||||
./usr/share/man/man9/cardbus_function_enable.9 comp-sys-man
|
||||
./usr/share/man/man9/cardbus_get_capability.9 comp-sys-man
|
||||
./usr/share/man/man9/cardbus_intr_disestablish.9 comp-sys-man
|
||||
./usr/share/man/man9/cardbus_intr_establish.9 comp-sys-man
|
||||
./usr/share/man/man9/cardbus_make_tag.9 comp-sys-man
|
||||
./usr/share/man/man9/cardbus_mapreg_map.9 comp-sys-man
|
||||
./usr/share/man/man9/cardbus_mapreg_unmap.9 comp-sys-man
|
||||
./usr/share/man/man9/clock_secs_to_ymdhms.9 comp-sys-man
|
||||
./usr/share/man/man9/clock_ymdhms_to_secs.9 comp-sys-man
|
||||
./usr/share/man/man9/cltom.9 comp-sys-man
|
||||
@ -4955,6 +5106,18 @@
|
||||
./usr/share/man/man9/cnmagic.9 comp-sys-man
|
||||
./usr/share/man/man9/cnpollc.9 comp-sys-man
|
||||
./usr/share/man/man9/cnputc.9 comp-sys-man
|
||||
./usr/share/man/man9/config.9 comp-sys-man
|
||||
./usr/share/man/man9/config_activate.9 comp-sys-man
|
||||
./usr/share/man/man9/config_attach.9 comp-sys-man
|
||||
./usr/share/man/man9/config_deactivate.9 comp-sys-man
|
||||
./usr/share/man/man9/config_defer.9 comp-sys-man
|
||||
./usr/share/man/man9/config_detach.9 comp-sys-man
|
||||
./usr/share/man/man9/config_found.9 comp-sys-man
|
||||
./usr/share/man/man9/config_found_sm.9 comp-sys-man
|
||||
./usr/share/man/man9/config_interrupts.9 comp-sys-man
|
||||
./usr/share/man/man9/config_pending_decr.9 comp-sys-man
|
||||
./usr/share/man/man9/config_pending_incr.9 comp-sys-man
|
||||
./usr/share/man/man9/config_search.9 comp-sys-man
|
||||
./usr/share/man/man9/cons.9 comp-sys-man
|
||||
./usr/share/man/man9/copy.9 comp-sys-man
|
||||
./usr/share/man/man9/copyin.9 comp-sys-man
|
||||
@ -4976,6 +5139,7 @@
|
||||
./usr/share/man/man9/disklabel.9 comp-sys-man
|
||||
./usr/share/man/man9/dopowerhooks.9 comp-sys-man
|
||||
./usr/share/man/man9/doshutdownhooks.9 comp-sys-man
|
||||
./usr/share/man/man9/driver.9 comp-sys-man
|
||||
./usr/share/man/man9/ether_addmulti.9 comp-sys-man
|
||||
./usr/share/man/man9/ether_delmulti.9 comp-sys-man
|
||||
./usr/share/man/man9/ether_ifattach.9 comp-sys-man
|
||||
@ -5007,15 +5171,50 @@
|
||||
./usr/share/man/man9/fuword.9 comp-sys-man
|
||||
./usr/share/man/man9/gsignal.9 comp-sys-man
|
||||
./usr/share/man/man9/humanize_number.9 comp-sys-man
|
||||
./usr/share/man/man9/i386/bios32_service.9 comp-sys-man
|
||||
./usr/share/man/man9/i386/bioscall.9 comp-sys-man
|
||||
./usr/share/man/man9/in4_cksum.9 comp-sys-man
|
||||
./usr/share/man/man9/in6_cksum.9 comp-sys-man
|
||||
./usr/share/man/man9/in_cksum.9 comp-sys-man
|
||||
./usr/share/man/man9/inittodr.9 comp-sys-man
|
||||
./usr/share/man/man9/intro.9 comp-sys-man
|
||||
./usr/share/man/man9/ioasic.9 comp-sys-man
|
||||
./usr/share/man/man9/ioasic_attach_devs.9 comp-sys-man
|
||||
./usr/share/man/man9/ioasic_intr_disestablish.9 comp-sys-man
|
||||
./usr/share/man/man9/ioasic_intr_establish.9 comp-sys-man
|
||||
./usr/share/man/man9/ioasic_intr_evcnt.9 comp-sys-man
|
||||
./usr/share/man/man9/ioasic_submatch.9 comp-sys-man
|
||||
./usr/share/man/man9/ioctl.9 comp-sys-man
|
||||
./usr/share/man/man9/isa.9 comp-sys-man
|
||||
./usr/share/man/man9/isa_dmaabort.9 comp-sys-man
|
||||
./usr/share/man/man9/isa_dmacascade.9 comp-sys-man
|
||||
./usr/share/man/man9/isa_dmacount.9 comp-sys-man
|
||||
./usr/share/man/man9/isa_dmadone.9 comp-sys-man
|
||||
./usr/share/man/man9/isa_dmamap_create.9 comp-sys-man
|
||||
./usr/share/man/man9/isa_dmamap_destroy.9 comp-sys-man
|
||||
./usr/share/man/man9/isa_dmamaxsize.9 comp-sys-man
|
||||
./usr/share/man/man9/isa_dmamem_alloc.9 comp-sys-man
|
||||
./usr/share/man/man9/isa_dmamem_free.9 comp-sys-man
|
||||
./usr/share/man/man9/isa_dmamem_map.9 comp-sys-man
|
||||
./usr/share/man/man9/isa_dmamem_unmap.9 comp-sys-man
|
||||
./usr/share/man/man9/isa_dmastart.9 comp-sys-man
|
||||
./usr/share/man/man9/isa_drq_isfree.9 comp-sys-man
|
||||
./usr/share/man/man9/isa_free.9 comp-sys-man
|
||||
./usr/share/man/man9/isa_intr_alloc.9 comp-sys-man
|
||||
./usr/share/man/man9/isa_intr_disestablish.9 comp-sys-man
|
||||
./usr/share/man/man9/isa_intr_establish.9 comp-sys-man
|
||||
./usr/share/man/man9/isa_intr_evcnt.9 comp-sys-man
|
||||
./usr/share/man/man9/isa_malloc.9 comp-sys-man
|
||||
./usr/share/man/man9/isa_mappage.9 comp-sys-man
|
||||
./usr/share/man/man9/isapnp.9 comp-sys-man
|
||||
./usr/share/man/man9/isapnp_config.9 comp-sys-man
|
||||
./usr/share/man/man9/isapnp_devmatch.9 comp-sys-man
|
||||
./usr/share/man/man9/isapnp_unconfig.9 comp-sys-man
|
||||
./usr/share/man/man9/kernacc.9 comp-sys-man
|
||||
./usr/share/man/man9/kprintf.9 comp-sys-man
|
||||
./usr/share/man/man9/kthread_create.9 comp-sys-man
|
||||
./usr/share/man/man9/kthread_create1.9 comp-sys-man
|
||||
./usr/share/man/man9/kthread_exit.9 comp-sys-man
|
||||
./usr/share/man/man9/linedisc.9 comp-sys-man
|
||||
./usr/share/man/man9/lock.9 comp-sys-man
|
||||
./usr/share/man/man9/lockinit.9 comp-sys-man
|
||||
@ -5049,9 +5248,41 @@
|
||||
./usr/share/man/man9/mtocl.9 comp-sys-man
|
||||
./usr/share/man/man9/mtod.9 comp-sys-man
|
||||
./usr/share/man/man9/panic.9 comp-sys-man
|
||||
./usr/share/man/man9/pci.9 comp-sys-man
|
||||
./usr/share/man/man9/pci_conf_interrupt.9 comp-sys-man
|
||||
./usr/share/man/man9/pci_conf_print.9 comp-sys-man
|
||||
./usr/share/man/man9/pci_conf_read.9 comp-sys-man
|
||||
./usr/share/man/man9/pci_conf_write.9 comp-sys-man
|
||||
./usr/share/man/man9/pci_configure_bus.9 comp-sys-man
|
||||
./usr/share/man/man9/pci_decompose_tag.9 comp-sys-man
|
||||
./usr/share/man/man9/pci_devinfo.9 comp-sys-man
|
||||
./usr/share/man/man9/pci_findvendor.9 comp-sys-man
|
||||
./usr/share/man/man9/pci_get_capability.9 comp-sys-man
|
||||
./usr/share/man/man9/pci_intr.9 comp-sys-man
|
||||
./usr/share/man/man9/pci_make_tag.9 comp-sys-man
|
||||
./usr/share/man/man9/pci_mapreg_info.9 comp-sys-man
|
||||
./usr/share/man/man9/pci_mapreg_map.9 comp-sys-man
|
||||
./usr/share/man/man9/pci_mapreg_type.9 comp-sys-man
|
||||
./usr/share/man/man9/pcmcia.9 comp-sys-man
|
||||
./usr/share/man/man9/pcmcia_cis_read_1.9 comp-sys-man
|
||||
./usr/share/man/man9/pcmcia_cis_read_2.9 comp-sys-man
|
||||
./usr/share/man/man9/pcmcia_cis_read_3.9 comp-sys-man
|
||||
./usr/share/man/man9/pcmcia_cis_read_4.9 comp-sys-man
|
||||
./usr/share/man/man9/pcmcia_cis_read_n.9 comp-sys-man
|
||||
./usr/share/man/man9/pcmcia_function_disable.9 comp-sys-man
|
||||
./usr/share/man/man9/pcmcia_function_enable.9 comp-sys-man
|
||||
./usr/share/man/man9/pcmcia_function_init.9 comp-sys-man
|
||||
./usr/share/man/man9/pcmcia_intr_disestablish.9 comp-sys-man
|
||||
./usr/share/man/man9/pcmcia_intr_establish.9 comp-sys-man
|
||||
./usr/share/man/man9/pcmcia_io_alloc.9 comp-sys-man
|
||||
./usr/share/man/man9/pcmcia_io_free.9 comp-sys-man
|
||||
./usr/share/man/man9/pcmcia_io_map.9 comp-sys-man
|
||||
./usr/share/man/man9/pcmcia_io_unmap.9 comp-sys-man
|
||||
./usr/share/man/man9/pcmcia_mem_alloc.9 comp-sys-man
|
||||
./usr/share/man/man9/pcmcia_mem_free.9 comp-sys-man
|
||||
./usr/share/man/man9/pcmcia_mem_map.9 comp-sys-man
|
||||
./usr/share/man/man9/pcmcia_mem_unmap.9 comp-sys-man
|
||||
./usr/share/man/man9/pcmcia_scan_cis.9 comp-sys-man
|
||||
./usr/share/man/man9/pfil.9 comp-sys-man
|
||||
./usr/share/man/man9/pfil_add_hook.9 comp-sys-man
|
||||
./usr/share/man/man9/pfil_hook_get.9 comp-sys-man
|
||||
@ -5206,6 +5437,21 @@
|
||||
./usr/share/man/man9/uvmspace_share.9 comp-sys-man
|
||||
./usr/share/man/man9/uvmspace_unshare.9 comp-sys-man
|
||||
./usr/share/man/man9/uvn_attach.9 comp-sys-man
|
||||
./usr/share/man/man9/vme.9 comp-sys-man
|
||||
./usr/share/man/man9/vme_dmamap_create.9 comp-sys-man
|
||||
./usr/share/man/man9/vme_dmamap_destroy.9 comp-sys-man
|
||||
./usr/share/man/man9/vme_dmamem_alloc.9 comp-sys-man
|
||||
./usr/share/man/man9/vme_dmamem_free.9 comp-sys-man
|
||||
./usr/share/man/man9/vme_intr_disestablish.9 comp-sys-man
|
||||
./usr/share/man/man9/vme_intr_establish.9 comp-sys-man
|
||||
./usr/share/man/man9/vme_intr_evcnt.9 comp-sys-man
|
||||
./usr/share/man/man9/vme_intr_map.9 comp-sys-man
|
||||
./usr/share/man/man9/vme_probe.9 comp-sys-man
|
||||
./usr/share/man/man9/vme_space_alloc.9 comp-sys-man
|
||||
./usr/share/man/man9/vme_space_free.9 comp-sys-man
|
||||
./usr/share/man/man9/vme_space_get.9 comp-sys-man
|
||||
./usr/share/man/man9/vme_space_map.9 comp-sys-man
|
||||
./usr/share/man/man9/vme_space_unmap.9 comp-sys-man
|
||||
./usr/share/man/man9/vprintf.9 comp-sys-man
|
||||
./usr/share/man/man9/vsnprintf.9 comp-sys-man
|
||||
./usr/share/man/man9/vsprintf.9 comp-sys-man
|
||||
|
@ -1,21 +1,35 @@
|
||||
# $NetBSD: Makefile,v 1.83 2001/06/28 23:04:39 itojun Exp $
|
||||
# $NetBSD: Makefile,v 1.84 2001/07/01 04:11:14 gmcgarry Exp $
|
||||
|
||||
# Makefile for section 9 (kernel function and variable) manual pages.
|
||||
|
||||
MAN= access.9 arp.9 audio.9 bitmask_snprintf.9 bus_dma.9 bus_space.9 \
|
||||
callout.9 cnmagic.9 cons.9 copy.9 cpu_reboot.9 ctxsw.9 disk.9 \
|
||||
disklabel.9 \
|
||||
dopowerhooks.9 doshutdownhooks.9 ethersubr.9 evcnt.9 \
|
||||
MAN= access.9 arp.9 audio.9 autoconf.9 bitmask_snprintf.9 \
|
||||
bus_dma.9 bus_space.9 \
|
||||
callout.9 cardbus.9 cnmagic.9 config.9 cons.9 copy.9 cpu_reboot.9 \
|
||||
ctxsw.9 disk.9 disklabel.9 \
|
||||
dopowerhooks.9 doshutdownhooks.9 driver.9 ethersubr.9 evcnt.9 \
|
||||
extent.9 fetch.9 fork1.9 humanize_number.9 in4_cksum.9 inittodr.9 \
|
||||
intro.9 ioctl.9 kprintf.9 linedisc.9 lock.9 log.9 malloc.9 mbuf.9 \
|
||||
microtime.9 panic.9 pci_configure_bus.9 pci_intr.9 pfil.9 physio.9 \
|
||||
intro.9 ioasic.9 ioctl.9 isa.9 isapnp.9 kprintf.9 kthread.9 \
|
||||
linedisc.9 lock.9 log.9 malloc.9 mbuf.9 \
|
||||
microtime.9 panic.9 pci.9 pci_configure_bus.9 pci_intr.9 \
|
||||
pcmcia.9 pfil.9 physio.9 \
|
||||
pmap.9 pool.9 powerhook_establish.9 ppsratecheck.9 psignal.9 \
|
||||
ratecheck.9 resettodr.9 rnd.9 rt_timer.9 \
|
||||
scsipi.9 shutdownhook_establish.9 sleep.9 softintr.9 \
|
||||
spl.9 store.9 time.9 todr.9 uiomove.9 ucom.9 \
|
||||
spl.9 store.9 time.9 todr.9 uiomove.9 ucom.9 vme.9 \
|
||||
usbdi.9 uvm.9 wdc.9
|
||||
MLINKS+=arp.9 arp_ifinit.9 arp.9 arpresolve.9 arp.9 arpintr.9
|
||||
MLINKS+=access.9 kernacc.9 access.9 useracc.9
|
||||
MLINKS+=autoconf.9 config_search.9 \
|
||||
autoconf.9 config_found_sm.9 \
|
||||
autoconf.9 config_found.9 \
|
||||
autoconf.9 config_attach.9 \
|
||||
autoconf.9 config_detach.9 \
|
||||
autoconf.9 config_activate.9 \
|
||||
autoconf.9 config_deactivate.9 \
|
||||
autoconf.9 config_defer.9 \
|
||||
autoconf.9 config_interrupts.9 \
|
||||
autoconf.9 config_pending_incr.9 \
|
||||
autoconf.9 config_pending_decr.9
|
||||
MLINKS+=bus_space.9 bus_space_alloc.9 bus_space.9 bus_space_barrier.9 \
|
||||
bus_space.9 bus_space_copy_region_1.9 \
|
||||
bus_space.9 bus_space_copy_region_2.9 \
|
||||
@ -58,6 +72,29 @@ MLINKS+=callout.9 callout_init.9 callout.9 callout_reset.9 \
|
||||
callout.9 callout_stop.9 callout.9 callout_active.9 \
|
||||
callout.9 callout_pending.9 callout.9 callout_deactivate.9 \
|
||||
callout.9 timeout.9 callout.9 untimeout.9
|
||||
MLINKS+=cardbus.9 cardbus_attach_card.9 \
|
||||
cardbus.9 cardbus_detach_card.9 \
|
||||
cardbus.9 cardbus_function_enable.9 \
|
||||
cardbus.9 cardbus_function_disable.9 \
|
||||
cardbus.9 cardbus_mapreg_map.9 \
|
||||
cardbus.9 cardbus_mapreg_unmap.9 \
|
||||
cardbus.9 cardbus_get_capability.9 \
|
||||
cardbus.9 cardbus_make_tag.9 \
|
||||
cardbus.9 cardbus_free_tag.9 \
|
||||
cardbus.9 cardbus_conf_read.9 \
|
||||
cardbus.9 cardbus_conf_write.9 \
|
||||
cardbus.9 cardbus_intr_establish.9 \
|
||||
cardbus.9 cardbus_intr_disestablish.9 \
|
||||
cardbus.9 CARDBUS_VENDOR.9 \
|
||||
cardbus.9 CARDBUS_PRODUCT.9 \
|
||||
cardbus.9 Cardbus_function_enable.9 \
|
||||
cardbus.9 Cardbus_function_disable.9 \
|
||||
cardbus.9 Cardbus_mapreg_map.9 \
|
||||
cardbus.9 Cardbus_mapreg_unmap.9 \
|
||||
cardbus.9 Cardbus_make_tag.9 \
|
||||
cardbus.9 Cardbus_free_tag.9 \
|
||||
cardbus.9 Cardbus_conf_read.9 \
|
||||
cardbus.9 Cardbus_conf_write.9
|
||||
MLINKS+=cons.9 cnbell.9 cons.9 cngetc.9 cons.9 cngetsn.9 cons.9 cnpollc.9 \
|
||||
cons.9 cnputc.9
|
||||
MLINKS+=copy.9 copyin.9 copy.9 copyout.9 copy.9 copystr.9 \
|
||||
@ -84,10 +121,41 @@ MLINKS+=fetch.9 fubyte.9 fetch.9 fuibyte.9 fetch.9 fusword.9 \
|
||||
MLINKS+=humanize_number.9 format_bytes.9
|
||||
MLINKS+=in4_cksum.9 in_cksum.9 \
|
||||
in4_cksum.9 in6_cksum.9
|
||||
MLINKS+=ioasic.9 ioasic_intr_establish.9 \
|
||||
ioasic.9 ioasic_intr_disestablish.9 \
|
||||
ioasic.9 ioasic_intr_evcnt.9 \
|
||||
ioasic.9 ioasic_attach_devs.9 \
|
||||
ioasic.9 ioasic_submatch.9
|
||||
MLINKS+=isa.9 isa_intr_alloc.9 \
|
||||
isa.9 isa_intr_establish.9 \
|
||||
isa.9 isa_intr_disestablish.9 \
|
||||
isa.9 isa_intr_evcnt.9 \
|
||||
isa.9 isa_dmamap_create.9 \
|
||||
isa.9 isa_dmamap_destroy.9 \
|
||||
isa.9 isa_dmamem_alloc.9 \
|
||||
isa.9 isa_dmamem_free.9 \
|
||||
isa.9 isa_dmamem_map.9 \
|
||||
isa.9 isa_dmamem_unmap.9 \
|
||||
isa.9 isa_malloc.9 \
|
||||
isa.9 isa_free.9 \
|
||||
isa.9 isa_dmastart.9 \
|
||||
isa.9 isa_dmaabort.9 \
|
||||
isa.9 isa_dmacount.9 \
|
||||
isa.9 isa_dmadone.9 \
|
||||
isa.9 isa_dmamaxsize.9 \
|
||||
isa.9 isa_drq_isfree.9 \
|
||||
isa.9 isa_dmacascade.9 \
|
||||
isa.9 isa_mappage.9
|
||||
MLINKS+=isapnp.9 isapnp_devmatch.9 \
|
||||
isapnp.9 isapnp_config.9 \
|
||||
isapnp.9 isapnp_unconfig.9
|
||||
MLINKS+=kprintf.9 printf.9 kprintf.9 sprintf.9 kprintf.9 snprintf.9 \
|
||||
kprintf.9 vprintf.9 kprintf.9 vsprintf.9 kprintf.9 vsnprintf.9 \
|
||||
kprintf.9 uprintf.9 kprintf.9 ttyprintf.9 \
|
||||
kprintf.9 tprintf.9 kprintf.9 tprintf_open.9 kprintf.9 tprintf_close.9
|
||||
MLINKS+=kthread.9 kthread_exit.9 \
|
||||
kthread.9 kthread_create.9 \
|
||||
kthread.9 kthread_create1.9
|
||||
MLINKS+=lock.9 simple_lock_init.9 lock.9 simple_lock.9 \
|
||||
lock.9 simple_lock_try.9 lock.9 simple_lock_unlock.9 \
|
||||
lock.9 simple_lock_freecheck.9 lock.9 simple_lock_dump.9 \
|
||||
@ -106,7 +174,45 @@ MLINKS+=mbuf.9 m_get.9 mbuf.9 m_getclr.9 mbuf.9 m_gethdr.9 mbuf.9 m_devget.9 \
|
||||
mbuf.9 M_ALIGN.9 mbuf.9 MH_ALIGN.9 mbuf.9 M_LEADINGSPACE.9 \
|
||||
mbuf.9 M_TRAILINGSPACE.9 mbuf.9 M_PREPEND.9 mbuf.9 MCHTYPE.9 \
|
||||
mbuf.9 MEXTREMOVE.9 mbuf.9 MFREE.9
|
||||
MLINKS+=pci.9 pci_conf_read.9 \
|
||||
pci.9 pci_conf_write.9 \
|
||||
pci.9 pci_conf_print.9 \
|
||||
pci.9 pci_get_capability.9 \
|
||||
pci.9 pci_mapreg_type.9 \
|
||||
pci.9 pci_mapreg_map.9 \
|
||||
pci.9 pci_mapreg_info.9 \
|
||||
pci.9 pci_intr_map.9 \
|
||||
pci.9 pci_intr_string.9 \
|
||||
pci.9 pci_intr_evcnt.9 \
|
||||
pci.9 pci_intr_establish.9 \
|
||||
pci.9 pci_intr_disestablish.9 \
|
||||
pci.9 pci_make_tag.9 \
|
||||
pci.9 pci_decompose_tag.9 \
|
||||
pci.9 pci_findvendor.9 \
|
||||
pci.9 pci_devinfo.9 \
|
||||
pci.9 PCI_VENDOR.9 \
|
||||
pci.9 PCI_PRODUCT.9 \
|
||||
pci.9 PCI_REVISION.9
|
||||
MLINKS+=pci_configure_bus.9 pci_conf_interrupt.9
|
||||
MLINKS+=pcmcia.9 pcmcia_function_init.9 \
|
||||
pcmcia.9 pcmcia_function_enable.9 \
|
||||
pcmcia.9 pcmcia_function_disable.9 \
|
||||
pcmcia.9 pcmcia_io_alloc.9 \
|
||||
pcmcia.9 pcmcia_io_free.9 \
|
||||
pcmcia.9 pcmcia_io_map.9 \
|
||||
pcmcia.9 pcmcia_io_unmap.9 \
|
||||
pcmcia.9 pcmcia_mem_alloc.9 \
|
||||
pcmcia.9 pcmcia_mem_free.9 \
|
||||
pcmcia.9 pcmcia_mem_map.9 \
|
||||
pcmcia.9 pcmcia_mem_unmap.9 \
|
||||
pcmcia.9 pcmcia_intr_establish.9 \
|
||||
pcmcia.9 pcmcia_intr_disestablish.9 \
|
||||
pcmcia.9 pcmcia_cis_read_1.9 \
|
||||
pcmcia.9 pcmcia_cis_read_2.9 \
|
||||
pcmcia.9 pcmcia_cis_read_3.9 \
|
||||
pcmcia.9 pcmcia_cis_read_4.9 \
|
||||
pcmcia.9 pcmcia_cis_read_n.9 \
|
||||
pcmcia.9 pcmcia_scan_cis.9
|
||||
MLINKS+=pool.9 pool_create.9 pool.9 pool_destroy.9 pool.9 pool_get.9 \
|
||||
pool.9 pool_init.9 pool.9 pool_put.9 pool.9 pool_prime.9 \
|
||||
pool.9 pool_sethiwat.9 pool.9 pool_setlowat.9
|
||||
@ -130,6 +236,9 @@ MLINKS+=spl.9 spl0.9 spl.9 splbio.9 spl.9 splclock.9 spl.9 splhigh.9 \
|
||||
MLINKS+=store.9 subyte.9 store.9 suibyte.9 store.9 susword.9 \
|
||||
store.9 suswintr.9 store.9 suword.9 store.9 suiword.9
|
||||
MLINKS+=time.9 boottime.9 time.9 mono_time.9 time.9 runtime.9
|
||||
MLINKS+=todr.9 todr_gettime.9 todr.9 todr_settime.9 \
|
||||
todr.9 todr_getcal.9 todr.9 todr_setcal.9 \
|
||||
todr.9 clock_ymdhms_to_secs.9 todr.9 clock_secs_to_ymdhms.9
|
||||
MLINKS+=uvm.9 uvm_init.9 uvm.9 uvm_init_limits.9 uvm.9 uvm_setpagesize.9 \
|
||||
uvm.9 uvm_swap_init.9 uvm.9 uvm_map.9 uvm.9 uvm_map_pageable.9 \
|
||||
uvm.9 uvm_map_checkprot.9 uvm.9 uvm_map_protect.9 \
|
||||
@ -148,9 +257,20 @@ MLINKS+=uvm.9 uvm_init.9 uvm.9 uvm_init_limits.9 uvm.9 uvm_setpagesize.9 \
|
||||
uvm.9 uvm_kernacc.9 uvm.9 uvm_useracc.9 uvm.9 uvm_vslock.9 \
|
||||
uvm.9 uvm_vsunlock.9 uvm.9 uvm_meter.9 uvm.9 uvm_sysctl.9 \
|
||||
uvm.9 uvm_fork.9 uvm.9 uvm_grow.9 uvm.9 uvm_coredump.9
|
||||
MLINKS+=todr.9 todr_gettime.9 todr.9 todr_settime.9 \
|
||||
todr.9 todr_getcal.9 todr.9 todr_setcal.9 \
|
||||
todr.9 clock_ymdhms_to_secs.9 todr.9 clock_secs_to_ymdhms.9
|
||||
MLINKS+=vme.9 vme_probe.9 \
|
||||
vme.9 vme_space_map.9 \
|
||||
vme.9 vme_space_unmap.9 \
|
||||
vme.9 vme_intr_map.9 \
|
||||
vme.9 vme_intr_establish.9 \
|
||||
vme.9 vme_intr_disestablish.9 \
|
||||
vme.9 vme_intr_evcnt.9 \
|
||||
vme.9 vme_dmamap_create.9 \
|
||||
vme.9 vme_dmamap_destroy.9 \
|
||||
vme.9 vme_dmamem_alloc.9 \
|
||||
vme.9 vme_dmamem_free.9 \
|
||||
vme.9 vme_space_alloc.9 \
|
||||
vme.9 vme_space_free.9 \
|
||||
vme.9 vme_space_get.9 \
|
||||
|
||||
SUBDIR= man9.i386 man9.sun3
|
||||
|
||||
|
270
share/man/man9/autoconf.9
Normal file
270
share/man/man9/autoconf.9
Normal file
@ -0,0 +1,270 @@
|
||||
.\" $NetBSD: autoconf.9,v 1.1 2001/07/01 04:11:13 gmcgarry Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" This code is derived from software contributed to The NetBSD Foundation
|
||||
.\" by Gregory McGarry.
|
||||
.\"
|
||||
.\" 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.
|
||||
.\" 3. All advertising materials mentioning features or use of this software
|
||||
.\" must display the following acknowledgement:
|
||||
.\" This product includes software developed by the NetBSD
|
||||
.\" Foundation, Inc. and its contributors.
|
||||
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
.\" contributors may be used to endorse or promote products derived
|
||||
.\" from this software without specific prior written permission.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
.\" ``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 FOUNDATION OR CONTRIBUTORS
|
||||
.\" 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.
|
||||
.\"
|
||||
.Dd June 17, 2001
|
||||
.Dt AUTOCONF 9
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm autoconf ,
|
||||
.Nm config_search ,
|
||||
.Nm config_found_sm ,
|
||||
.Nm config_found ,
|
||||
.Nm config_attach ,
|
||||
.Nm config_detach ,
|
||||
.Nm config_activate ,
|
||||
.Nm config_deactivate ,
|
||||
.Nm config_defer ,
|
||||
.Nm config_interrupts ,
|
||||
.Nm config_pending_incr ,
|
||||
.Nm config_pending_decr
|
||||
.Nd autoconfiguration framework
|
||||
.Sh SYNOPSIS
|
||||
.Fd #include <sys/param.h>
|
||||
.Fd #include <sys/device.h>
|
||||
.Fd #include <sys/error.h>
|
||||
.Ft struct cfdata *
|
||||
.Fn config_search "cfmatch_t func" "struct device *parent" "void *aux"
|
||||
.Ft struct device *
|
||||
.Fn config_found_sm "struct device *parent" "void *aux" "cfprint_t print" \
|
||||
"cfmatch_t submatch"
|
||||
.Ft struct device *
|
||||
.Fn config_found "struct device *parent" "void *aux" "cfprint_t print"
|
||||
.Ft struct device *
|
||||
.Fn config_attach "struct device *parent" "struct cfdata *cf" "void *aux" \
|
||||
"cprint_t print"
|
||||
.Ft int
|
||||
.Fn config_detach "struct device *dev" "int flags"
|
||||
.Ft int
|
||||
.Fn config_activate "struct device *dev"
|
||||
.Ft int
|
||||
.Fn config_deactivate "struct device *dev"
|
||||
.Ft int
|
||||
.Fn config_defer "struct device *dev" "void (*func)(struct device *)"
|
||||
.Ft void
|
||||
.Fn config_interrupts "struct device *dev" "void (*func)(struct device *)"
|
||||
.Ft void
|
||||
.Fn config_pending_incr
|
||||
.Ft void
|
||||
.Fn config_pending_decr
|
||||
.Sh DESCRIPTION
|
||||
Autoconfiguration is the process of matching hardware devices with an
|
||||
appropriate device driver. In its most basic form, autoconfiguration
|
||||
consists of the recursive process of finding and attaching all devices
|
||||
on a bus, including other busses.
|
||||
.Pp
|
||||
The autoconfiguration framework supports
|
||||
.Em direct configuration
|
||||
where the bus driver can determine the devices present. The
|
||||
autoconfiguration framework also supports
|
||||
.Em indirect configuration
|
||||
where the drivers must probe the bus looking the presence of a device.
|
||||
Direct configuration is preferred since it can find hardware
|
||||
regardless of the presence of proper drivers.
|
||||
.Pp
|
||||
The autoconfiguration process occurs at system bootstrap and is driven
|
||||
by a table generated from a
|
||||
.Do
|
||||
device definition
|
||||
.Dc
|
||||
file by
|
||||
.Xr config 8 .
|
||||
For a description of the
|
||||
.Xr config 8
|
||||
.Do
|
||||
machine description
|
||||
.Dc
|
||||
language, see
|
||||
.Xr config 9 .
|
||||
.Pp
|
||||
Each device must have a name consisting of an alphanumeric string that
|
||||
ends with a unit number. The unit number identifies an instance of
|
||||
the driver. Device data structures are allocated dynamically during
|
||||
autoconfiguration, giving a unique address for each instance.
|
||||
.Sh FUNCTIONS
|
||||
.Bl -tag -width compact
|
||||
|
||||
.It Fn config_search "func" "parent" "aux"
|
||||
Performs indirect configuration of physical devices.
|
||||
.Fn config_search
|
||||
iterates over all potential children, calling the given
|
||||
function
|
||||
.Fa func
|
||||
for each one. If
|
||||
.Fa func
|
||||
is NULL,
|
||||
.Fn config_search
|
||||
applies each child's match function instead. The argument
|
||||
.Fa parent
|
||||
is the pointer to the parent's device structure. The given
|
||||
.Fa aux
|
||||
argument describes the device that has been found and is simply passed
|
||||
on through
|
||||
.Fa func
|
||||
to the child.
|
||||
.Fn config_search
|
||||
returns a pointer to the best-matched child or NULL otherwise.
|
||||
.Pp
|
||||
The role of
|
||||
.Fa func
|
||||
is to call
|
||||
the match function for each device and call
|
||||
.Fa config_attach
|
||||
for any positive matches. If
|
||||
.Fa func
|
||||
is NULL, then the parent should record the return value from
|
||||
.Fn config_search
|
||||
and call
|
||||
.Fn config_attach
|
||||
itself.
|
||||
.Pp
|
||||
Note that this function is designed so that it can be used to apply an
|
||||
arbitrary function to all potential children. In this case callers
|
||||
may choose to ignore the return value.
|
||||
.It Fn config_found_sm "parent" "aux" "print" "submatch"
|
||||
Performs direct configuration on a physical device.
|
||||
.Fn config_found_sm
|
||||
is called by the parent and in turn calls the
|
||||
.Fa submatch
|
||||
function to call the match function as
|
||||
determined by the configuration table. If
|
||||
.Fa submatch
|
||||
is NULL, the driver match functions are called directly. The argument
|
||||
.Fa parent
|
||||
is the pointer to the parent's device structure. The given
|
||||
.Fa aux
|
||||
argument describes the device that has been found. The
|
||||
.Em softc
|
||||
structure for the matched device will be allocated, and the
|
||||
appropriate driver attach function will be called. If the device is
|
||||
matched, the system prints the name of the child and parent devices,
|
||||
and then calls the
|
||||
.Fa print
|
||||
function to produce addition information if desired. If no driver
|
||||
takes a match, the same
|
||||
.Fa print
|
||||
function is called to complain. The print function is called with the
|
||||
.Fa aux
|
||||
argument and, if the matches failed, the full name (including unit
|
||||
number) of the parent device, otherwise NULL. The
|
||||
.Fa print
|
||||
function must return an integer value.
|
||||
.Pp
|
||||
Two special strings,
|
||||
.Do
|
||||
not configured
|
||||
.Dc
|
||||
and
|
||||
.Do
|
||||
unsupported
|
||||
.Dc
|
||||
will be appended automatically to non-driver reports if the return
|
||||
value is UNCONF or UNSUPP respectively; otherwise the function shouuld
|
||||
return the value QUIET.
|
||||
.Pp
|
||||
.Fn config_found_sm
|
||||
returns 1 if the device get attached, 0 otherwise. Most callers can
|
||||
ignore this value, since the system will already have printed a
|
||||
diagnostic.
|
||||
.It Fn config_found "parent" "aux" "print"
|
||||
This function is equivalent to calling
|
||||
.Fn config_found_sm "parent" "aux" "print" "submatch"
|
||||
and is provided for compatibility with older drivers.
|
||||
.It Fn config_attach "parent" "cf" "aux" "print"
|
||||
Attach a found device. Allocates the memory for the
|
||||
.Em softc
|
||||
structure and calls the drivers attach function according to the
|
||||
configuration table.
|
||||
.It Fn config_detach "dev" "flags"
|
||||
Called by the parent to detach the child device. The second argument
|
||||
.Em flags
|
||||
contains detachment flags. Valid values are DETACH_FORCE (force
|
||||
detachment (eg. because of hardware removal) and DETACH_QUIET (do not
|
||||
print a notice).
|
||||
.Fn config_detach
|
||||
returns zero if successful and an error code otherwise.
|
||||
.It Fn config_activate "dev"
|
||||
Called by the parent to activate the child device
|
||||
.Fa dev .
|
||||
.It Fn config_deactivate "dev"
|
||||
Called by the parent to deactivate the child device
|
||||
.Fa dev .
|
||||
.It Fn config_defer "dev" "func"
|
||||
Called by the child to defer the remainder of its configuration until
|
||||
all its parent's devices have been attached. At this point, the
|
||||
function
|
||||
.Fa func
|
||||
is called with the argument
|
||||
.Fa dev .
|
||||
.It Fn config_interrupts "struct device *dev" "void (*func)(struct device *)"
|
||||
Called by the child to defer the remainder of its configuration until
|
||||
interrupts are enabled. At this point, the function
|
||||
.Fa func
|
||||
is called with the argument
|
||||
.Fa dev .
|
||||
.It Fn config_pending_incr
|
||||
Increment the
|
||||
.Va config_pending
|
||||
semaphore. It is used to account for deferred configurations before
|
||||
mounting the root filesystem.
|
||||
.It Fn config_pending_decr
|
||||
Decrement the
|
||||
.Va config_pending
|
||||
semaphore. It is used to account for deferred configurations before
|
||||
mounting the root filesystem.
|
||||
.El
|
||||
.Sh CODE REFERENCES
|
||||
This section describes places within the
|
||||
.Nx
|
||||
source tree where actual code implementing or utilising the
|
||||
autoconfiguration framework can be found. All pathnames are relative
|
||||
to
|
||||
.Pa /usr/src .
|
||||
.Pp
|
||||
The autoconfiguration framework itself is implemented within the file
|
||||
.Pa sys/kern/subr_autoconf.c .
|
||||
Data structures and function prototypes for the framework are located in
|
||||
.Pa sys/sys/device.h .
|
||||
.Sh SEE ALSO
|
||||
.Xr config 8 ,
|
||||
.Xr config 9 ,
|
||||
.Xr driver 9 .
|
||||
.Sh HISTORY
|
||||
Autoconfiguration first appeared in
|
||||
.Bx 4.1 .
|
||||
The autoconfiguration framework was completely revised in
|
||||
.Bx 4.4 .
|
||||
The detach and activate interfaces appeared in
|
||||
.Nx 1.5 .
|
352
share/man/man9/cardbus.9
Normal file
352
share/man/man9/cardbus.9
Normal file
@ -0,0 +1,352 @@
|
||||
.\" $NetBSD: cardbus.9,v 1.1 2001/07/01 04:11:13 gmcgarry Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" This code is derived from software contributed to The NetBSD Foundation
|
||||
.\" by Gregory McGarry.
|
||||
.\"
|
||||
.\" 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.
|
||||
.\" 3. All advertising materials mentioning features or use of this software
|
||||
.\" must display the following acknowledgement:
|
||||
.\" This product includes software developed by the NetBSD
|
||||
.\" Foundation, Inc. and its contributors.
|
||||
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
.\" contributors may be used to endorse or promote products derived
|
||||
.\" from this software without specific prior written permission.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
.\" ``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 FOUNDATION OR CONTRIBUTORS
|
||||
.\" 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.
|
||||
.\"
|
||||
.Dd June 20, 2001
|
||||
.Dt CARDBUS 9
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm Cardbus ,
|
||||
.Nm cardbus_attach_card ,
|
||||
.Nm cardbus_detach_card ,
|
||||
.Nm cardbus_function_enable ,
|
||||
.Nm cardbus_function_disable ,
|
||||
.Nm cardbus_mapreg_map ,
|
||||
.Nm cardbus_mapreg_unmap ,
|
||||
.Nm cardbus_get_capability ,
|
||||
.Nm cardbus_make_tag ,
|
||||
.Nm cardbus_free_tag ,
|
||||
.Nm cardbus_conf_read ,
|
||||
.Nm cardbus_conf_write ,
|
||||
.Nm cardbus_intr_establish ,
|
||||
.Nm cardbus_intr_disestablish ,
|
||||
.Nm CARDBUS_VENDOR ,
|
||||
.Nm CARDBUS_PRODUCT ,
|
||||
.Nm Cardbus_function_enable ,
|
||||
.Nm Cardbus_function_disable ,
|
||||
.Nm Cardbus_mapreg_map ,
|
||||
.Nm Cardbus_mapreg_unmap ,
|
||||
.Nm Cardbus_make_tag ,
|
||||
.Nm Cardbus_free_tag ,
|
||||
.Nm Cardbus_conf_read ,
|
||||
.Nm Cardbus_conf_write
|
||||
.Nd support for Cardbus PC-Card devices
|
||||
.Sh SYNOPSIS
|
||||
.Fd #include <machine/bus.h>
|
||||
.Fd #include <dev/cardbus/cardbusvar.h>
|
||||
.Fd #include <dev/cardbus/cardbusdevs.h>
|
||||
.Ft int
|
||||
.Fn cardbus_attach_card "struct cardbus_softc *csc"
|
||||
.Ft void
|
||||
.Fn cardbus_detach_card "struct cardbus_softc *csc"
|
||||
.Ft int
|
||||
.Fn cardbus_function_enable "struct cardbus_softc *csc" "int function"
|
||||
.Ft int
|
||||
.Fn cardbus_function_disable "struct cardbus_softc *csc" "int function"
|
||||
.Ft int
|
||||
.Fo cardbus_mapreg_map
|
||||
.Fa "struct cardbus_softc *csc" "int cf" "int reg"
|
||||
.Fa "cardbusreg_t type" "int busflags" "bus_space_tag_t *tagp"
|
||||
.Fa "bus_space_handle_t *handlep" "bus_addr_t *basep" "bus_size_t *sizep"
|
||||
.Fc
|
||||
.Ft int
|
||||
.Fn cardbus_mapreg_unmap "struct cardbus_softc *csc" "int cf" \
|
||||
"int reg" "bus_space_tag_t tag" "bus_space_handle_t handle" \
|
||||
"bus_size_t size"
|
||||
.Ft int
|
||||
.Fn cardbus_get_capability "cardbus_chipset_tag_t cc" \
|
||||
"cardbus_function_tag_t cf" "cardbustag_t tag" "int capid" \
|
||||
"int *offsetp" "cardbusreg_t *valuep"
|
||||
.Ft cardbustag_t
|
||||
.Fn cardbus_make_tag "cardbus_chipset_tag_t cc" "int cf" "int bus" \
|
||||
"int device" "int function"
|
||||
.Ft void
|
||||
.Fn cardbus_free_tag "cardbus_chipset_tag_t cc" "int cf" \
|
||||
"cardbustag_t tag"
|
||||
.Ft cardbusreg_t
|
||||
.Fn cardbus_conf_read "cardbus_chipset_tag_t cc" "int cf" \
|
||||
"cardbustag_t tag" "int offs"
|
||||
.Ft void
|
||||
.Fn cardbus_conf_write "cardbus_chipset_tag_t cc" "int cf" \
|
||||
"cardbustag_t tag" "int offs" "busreg_t val"
|
||||
.Ft void *
|
||||
.Fn cardbus_intr_establish "cardbus_chipset_tag_t cc" \
|
||||
"cardbus_function_tag_t cf" "cardbus_intr_handle_t irq" "int level" \
|
||||
"int (*handler)(void *)" "void *arg"
|
||||
.Ft void
|
||||
.Fn cardbus_intr_disestablish "cardbus_chipset_tag_t cc" \
|
||||
"cardbus_function_tag_t cf" "void *ih"
|
||||
.Ft int
|
||||
.Fn CARDBUS_VENDOR "cardbusreg_t id"
|
||||
.Ft int
|
||||
.Fn CARDBUS_PRODUCT "cardbusreg_t id"
|
||||
.Ft int
|
||||
.Fn Cardbus_function_enable "cardbus_devfunc_t ct"
|
||||
.Ft int
|
||||
.Fn Cardbus_function_disable "cardbus_devfunc_t ct"
|
||||
.Ft int
|
||||
.Fn Cardbus_mapreg_map "cardbus_devfunc_t ct" "int reg" \
|
||||
"cardbusreg_t type" "int busflags" "bus_space_tag_t *tagp" \
|
||||
"bus_space_handle_t *handlep" "bus_addr_t *basep" "bus_size_t *sizep"
|
||||
.Ft int
|
||||
.Fn Cardbus_mapreg_unmap "cardbus_devfunc_t ct" \
|
||||
"int reg" "bus_space_tag_t tag" "bus_space_handle_t handle" \
|
||||
"bus_size_t size"
|
||||
.Ft cardbustag_t
|
||||
.Fn Cardbus_make_tag "cardbus_devfunc_t ct "
|
||||
.Ft void
|
||||
.Fn Cardbus_free_tag "cardbus_devfunc_t ct" "cardbustag_t tag"
|
||||
.Ft cardbusreg_t
|
||||
.Fn Cardbus_conf_read "cardbus_devfunc_t ct" "cardbustag_t tag" \
|
||||
"int offs"
|
||||
.Ft void
|
||||
.Fn Cardbus_conf_write "cardbus_devfunc_t ct" "cardbustag_t tag" \
|
||||
"int offs" "busreg_t val"
|
||||
.Sh DESCRIPTION
|
||||
The machine-independent
|
||||
.Nm
|
||||
subsystem provides support for Cardbus devices.
|
||||
.Pp
|
||||
The Cardbus interface is an improvement to the PC-Card interface
|
||||
supported by
|
||||
.Xr PCMCIA 9 .
|
||||
It introduces several new capabilities such as 32-bit addressing,
|
||||
33MHz operation, busmaster operation and 3.3 volt low-voltage power.
|
||||
It remains compatible with all features of the PC-Card standard.
|
||||
.Pp
|
||||
The Cardbus interface signaling protocol is derived from the PCI
|
||||
signaling protocol. There are some differences between PCI and
|
||||
Cardbus, however operations are identical for most functions
|
||||
implemented. Since a 32-bit Cardbus interface is also defined for
|
||||
16-bit PC-Cards, the same Card Services client to be used to manage
|
||||
both Cardbus and PCMCIA PC-Cards. By interrogating the card upon
|
||||
detection of an insertion event,
|
||||
.Nx
|
||||
determines whether the card requires
|
||||
.Nm
|
||||
support or not, and then applies the appropriate power and signaling
|
||||
protocol requirements.
|
||||
.Sh DATA TYPES
|
||||
Drivers attached to the Cardbus bus will make use of the following
|
||||
data types:
|
||||
.Bl -tag -width compact
|
||||
.It struct cardbus_attach_args
|
||||
Devices have their identity recorded in this structure. It contains
|
||||
the following members:
|
||||
.Bd -literal
|
||||
cardbus_devfunc_t ca_ct;
|
||||
bus_space_tag_t ca_iot; /* Cardbus I/O space tag */
|
||||
bus_space_tag_t ca_memt; /* Cardbus MEM space tag */
|
||||
bus_dma_tag_t ca_dmat; /* DMA tag */
|
||||
u_int ca_device;
|
||||
cardbustag_t ca_tag;
|
||||
cardbusreg_t ca_id;
|
||||
cardbusreg_t ca_class;
|
||||
cardbus_intr_line_t ca_intrline; /* interrupt info */
|
||||
struct cardbus_cis_info ca_cis;
|
||||
.Ed
|
||||
.El
|
||||
.Sh FUNCTIONS
|
||||
.Bl -tag -width compact
|
||||
.It Fn cardbus_attach_card "csc"
|
||||
Attaches the card on the slot by turning on the power, read and
|
||||
analyse the tuple and sets configuration index. This function returns
|
||||
the number of recognised device functions. If no device functions are
|
||||
recognised it returns zero.
|
||||
.It Fn cardbus_detach_card "csc"
|
||||
Detaches the card on the slot by release resources and turning off the
|
||||
power. This function must not be called under interrupt context.
|
||||
.It Fn cardbus_function_enable "csc" "function"
|
||||
Enables device function
|
||||
.Fa function
|
||||
on the card. Power will be applied if it hasn't already.
|
||||
.It Fn cardbus_function_disable "csc" "function"
|
||||
Disables device function
|
||||
.Fa function
|
||||
on the card. When no device functions are enabled, the turn is turned
|
||||
off.
|
||||
.It Fo cardbus_mapreg_map
|
||||
.Fa "csc" "cf" "reg" "type" "busflags"
|
||||
.Fa "tagp" "handlep" "basep" "sizep"
|
||||
.Fc
|
||||
Maps bus-space on the value of Base Address Register (BAR) indexed by
|
||||
.Fa reg
|
||||
for device function
|
||||
.Fa cf .
|
||||
The bus-space configuration is returned in
|
||||
.Fa tagp ,
|
||||
.Fa handlep ,
|
||||
.Fa basep ,
|
||||
and
|
||||
.Fa sizep .
|
||||
.It Fn cardbus_mapreg_unmap "csc" "cf" "reg" "tag" "handle" "bus_size_t size"
|
||||
Releases bus-space region for device function
|
||||
.Fa cf
|
||||
specified by
|
||||
.Fa tag ,
|
||||
.Fa handle
|
||||
and
|
||||
.Fa size .
|
||||
.Fa reg
|
||||
is the offset of the BAR register.
|
||||
.It Fn cardbus_get_capability "cc" "cf" "tag" "capid" "offsetp" "valuep"
|
||||
Find the PCI capability for the device function
|
||||
.Fa cf
|
||||
specified by
|
||||
.Fa capid .
|
||||
Returns the capability in
|
||||
.Fa offsetp
|
||||
and
|
||||
.Fa valuep .
|
||||
.It Fn cardbus_make_tag "cc" "cf" "bus" "device" "function"
|
||||
Make a tag to access config space of a Cardbus card. It works the
|
||||
same as
|
||||
.Fn pci_make_tag .
|
||||
.It Fn cardbus_free_tag "cc" "cf" "tag"
|
||||
Release a tag used to access the config space of a Cardbus card. It
|
||||
works the same as
|
||||
.Fn pci_free_tag .
|
||||
.It Fn cardbus_conf_read "cc" "cf" "tag" "offs"
|
||||
Read the config space of a Cardbus card. It works the same as
|
||||
.Fn pci_conf_read .
|
||||
.It Fn cardbus_conf_write "cc" "cf" "tag" "offs" "val"
|
||||
Write to the config space of a Cardbus card. It works same as
|
||||
.Fn pci_conf_write .
|
||||
.It Fn cardbus_intr_establish "cc" "cf" "irq" "level" "handler" "arg"
|
||||
Establish an interrupt handler for device function
|
||||
.Fa cf .
|
||||
The priority of the interrupt is specified by
|
||||
.Fa level .
|
||||
When the interrupt occurs the function
|
||||
.Fa handler
|
||||
is called with argument
|
||||
.Fa arg .
|
||||
The return value is a handle for the interrupt handler.
|
||||
.Fn cardbus_intr_establish
|
||||
returns an opaque handle to an event descriptor if it succeeds, and
|
||||
returns NULL on failure.
|
||||
.It Fn cardbus_intr_disestablish "cc" "cf" "ih"
|
||||
Dis-establish the interrupt handler for device function
|
||||
.Fa cf
|
||||
with handle
|
||||
.Fa ih .
|
||||
The handle was returned from
|
||||
.Fn cardbus_intr_establish .
|
||||
.It Fn CARDBUS_VENDOR "id"
|
||||
Return the Cardbus vendor id for device
|
||||
.Fa id .
|
||||
.It Fn CARDBUS_PRODUCT "id"
|
||||
Return the Cardbus product id for device
|
||||
.Fa id .
|
||||
.El
|
||||
.Pp
|
||||
The
|
||||
.Fn Cardbus_*
|
||||
functions are convenience functions taking a
|
||||
.Fa cardbus_devfunc_t
|
||||
argument and perform the same operation as their namesake described
|
||||
above.
|
||||
.Sh AUTOCONFIGURATION
|
||||
During autoconfiguration, a
|
||||
.Nm
|
||||
driver will receive a pointer to
|
||||
.Fa struct isapnp_attach_args
|
||||
describing the device attaches to the Cardbus bus. Drivers match the
|
||||
device using the
|
||||
.Fa ca_id
|
||||
member using
|
||||
.Fn CARDBUS_VENDOR
|
||||
and
|
||||
.Fn CARDBUS_PRODUCT .
|
||||
.Pp
|
||||
During the driver attach step, drivers should initially map the device
|
||||
I/O and memory resources using
|
||||
.Fn cardbus_mapreg_map
|
||||
or
|
||||
.Fn Cardbus_mapreg_map .
|
||||
Upon successful allocation of resources, power can be
|
||||
applied to the device with
|
||||
.Fn cardbus_function_enable
|
||||
or
|
||||
.Fn Cardbus_function_enable .
|
||||
so that device-specific interrogation can be performed. Finally,
|
||||
power should be removed from the device using
|
||||
.Fn cardbus_function_disable
|
||||
or
|
||||
.Fn Cardbus_function_disable .
|
||||
.Pp
|
||||
Since Cardbus devices support dynamic configuration, drivers should
|
||||
make use of
|
||||
.Fn powerhook_establish 9 .
|
||||
Power can be applied and the interrupt handler should be established
|
||||
through this interface.
|
||||
.Sh DMA SUPPORT
|
||||
No additional support is provided for Cardbus DMA beyond the
|
||||
facilities provided by the
|
||||
.Xr bus_dma 9 interface.
|
||||
.Sh CODE REFERENCES
|
||||
This section describes places within the
|
||||
.Nx
|
||||
source tree where actual code implementing or utilising the
|
||||
machine-independent Cardbus subsystem can be found. All pathnames are
|
||||
relative to
|
||||
.Pa /usr/src.
|
||||
.Pp
|
||||
The Cardbus subsystem itself is implemented within the files
|
||||
.Pa sys/dev/cardbus/cardbus.c ,
|
||||
.Pa sys/dev/cardbus/cardbus_map.c
|
||||
and
|
||||
.Pa sys/dev/cardbus/cardslot.c .
|
||||
The database of known devices exists within the file
|
||||
.Pa sys/dev/cardbus/cardbus_data.h
|
||||
and is generated automatically from the file
|
||||
.Pa sys/dev/cardbus/cardbusdevs .
|
||||
New vendor and product identifiers should be added to this
|
||||
file. The database can be regenerated using the Makefile
|
||||
.Pa sys/dev/cardbus/Makefile.cardbusdevs .
|
||||
.Sh SEE ALSO
|
||||
.Xr cardbus 4 ,
|
||||
.Xr pcmcia 4 ,
|
||||
.Xr autoconf 9 ,
|
||||
.Xr bus_dma 9 ,
|
||||
.Xr bus_space 9 ,
|
||||
.Xr driver 9 ,
|
||||
.Xr pci 9 ,
|
||||
.Xr pcmcia 9 .
|
||||
.Sh HISTORY
|
||||
The machine-independent
|
||||
.Nm
|
||||
subsystem appeared in
|
||||
.Nx 1.5 .
|
271
share/man/man9/config.9
Normal file
271
share/man/man9/config.9
Normal file
@ -0,0 +1,271 @@
|
||||
.\" $NetBSD: config.9,v 1.1 2001/07/01 04:11:13 gmcgarry Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" This code is derived from software contributed to The NetBSD Foundation
|
||||
.\" by Gregory McGarry.
|
||||
.\"
|
||||
.\" 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.
|
||||
.\" 3. All advertising materials mentioning features or use of this software
|
||||
.\" must display the following acknowledgement:
|
||||
.\" This product includes software developed by the NetBSD
|
||||
.\" Foundation, Inc. and its contributors.
|
||||
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
.\" contributors may be used to endorse or promote products derived
|
||||
.\" from this software without specific prior written permission.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
.\" ``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 FOUNDATION OR CONTRIBUTORS
|
||||
.\" 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.
|
||||
.\"
|
||||
.Dd June 17, 2001
|
||||
.Dt CONFIG 9
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm config
|
||||
.Nd the autoconfiguration framework
|
||||
.Do
|
||||
device definition
|
||||
.Dc
|
||||
language
|
||||
.Sh DESCRIPTION
|
||||
In
|
||||
.Nx ,
|
||||
the
|
||||
.Xr config 8
|
||||
program reads and verifies a machine description file specifying the
|
||||
devices to include in the kernel. A table is produced by
|
||||
.Xr config 8
|
||||
which is used by the kernel during autoconfiguration (see
|
||||
.Xr autoconf 9 )
|
||||
giving needed hints and details on matching hardware devices with
|
||||
device drivers.
|
||||
.Pp
|
||||
Each device in the machine description file has:
|
||||
.Bl -tag -width xxxxxx
|
||||
.It A Name
|
||||
The name is simply an alphanumeric string that ends in a unit number
|
||||
(eg. "sd0", "sd1", and so forth). These unit numbers identify
|
||||
particular instances of a base device name; the base name in turn maps
|
||||
directly to a device driver. Device unit numbers are independent of
|
||||
hardware features.
|
||||
.It A Parent
|
||||
Every device must have a parent. The pairing is denoted by "child at
|
||||
parent". These pairings form the links in a directed graph. The root
|
||||
device is the only exception, as it does not have a parent.
|
||||
.It Locators
|
||||
Locators are used to augment the parent/child pairings the locate
|
||||
specific devices. Each locator value is simply an integer that
|
||||
represents some sort of device address on the parent bus or
|
||||
controller. This can be a memory address, and I/O port, a driver
|
||||
number, or any other value. Locators can sometimes be wildcarded on
|
||||
devices that support direct connection.
|
||||
.It Attributes
|
||||
An attribute describes the device's relationship with the code; it
|
||||
then serves to constrain the device graph. A
|
||||
.Em plain attribute
|
||||
describes some attribute of a device. An
|
||||
.Em interface attribute
|
||||
describes a kind of
|
||||
.Do
|
||||
software interface
|
||||
.Dc
|
||||
and declares the devices's ability to support other devices that use
|
||||
that interface. In addition, an interface attribute usually identifies
|
||||
additional locators.
|
||||
.El
|
||||
.Pp
|
||||
During autoconfiguration, the directed graph is turned into a tree by
|
||||
nominating one device as the root node and matching drivers with
|
||||
devices by doing a depth-first traversal through the graph stating at
|
||||
this root node.
|
||||
.Pp
|
||||
However, there must be constraints on the parent/child pairings that
|
||||
are possible. These constraints are embedded in the
|
||||
.Do
|
||||
device definition
|
||||
.Dc
|
||||
files. The remainder of this page describes the
|
||||
.Do
|
||||
device definition
|
||||
.Dc
|
||||
language and how to use this language to add new functionality to the
|
||||
.Nx
|
||||
kernel.
|
||||
.Sh DEVICE DEFINITION FILES
|
||||
The device definition files are separated into machine-dependent and
|
||||
machine-independent files. The machine-dependent file is located in
|
||||
.Pa sys/arch/<arch>/conf/files.<arch> ,
|
||||
where <arch> is the name of
|
||||
.Nx
|
||||
architecture. The machine-independent file is located in
|
||||
.Pa sys/conf/files .
|
||||
It in turn includes files for the machine-independent drivers located
|
||||
in
|
||||
.Pa sys/dev/<bus>/files.<bus> ,
|
||||
where <bus> is the name of the machine-independent bus.
|
||||
.Pp
|
||||
These files define all legal device and pseuo-deives. They also
|
||||
define all attributes and interfaces, establishign the ule that
|
||||
determine allowable machine descriptions, and list the source files
|
||||
that make up the kernel.
|
||||
.Pp
|
||||
Each device definition file consists of a list of statements,
|
||||
typically one per line. Comments may be inserted anywhere using the
|
||||
.Do
|
||||
#
|
||||
.Dc
|
||||
character, and any line that begins with white space continues the
|
||||
previous line. Valid statements are:
|
||||
.Bl -tag -width xxxxxx
|
||||
.It defopt [filename] {options}
|
||||
The space-separated list of pre-processor macros
|
||||
.Em options
|
||||
are defined in file
|
||||
.Em filename .
|
||||
If the filename field is not specified, the options are defined on the
|
||||
commandline invocation of make.
|
||||
The
|
||||
.Em option
|
||||
is case-sensitive.
|
||||
.It deffs [filename] name
|
||||
Define a filesystem
|
||||
.Em name .
|
||||
.It devclass name
|
||||
Define a device class
|
||||
.Em name .
|
||||
A device class is similar to an attribute.
|
||||
.It define name [{locators}]
|
||||
The attribute
|
||||
.Em name
|
||||
is defined and device definitions can then refer to it. If the
|
||||
attribute is an interface attribute and defines optional
|
||||
.Em locators ,
|
||||
device attributes that refer to
|
||||
.Em name
|
||||
are assumed to share the interface and require the same locators.
|
||||
.It device name [{locators}]: [attributes]
|
||||
The device
|
||||
.Em name
|
||||
is defined and requires the optional comma-separated list of locators
|
||||
.Em locators .
|
||||
The optional
|
||||
.Em attributes
|
||||
define attribute dependencies.
|
||||
.It attach name at interface [with ifname]: [attributes]
|
||||
The device
|
||||
.Em name
|
||||
is defined and supports the interface
|
||||
.Em interface .
|
||||
If
|
||||
.Em ifname
|
||||
is specified, it is used to specify the interface to the driver for
|
||||
device
|
||||
.Em name
|
||||
(see
|
||||
.Xr driver 9
|
||||
for details).
|
||||
The optional
|
||||
.Em attributes
|
||||
define attribute dependencies.
|
||||
.It defpseudo name: [{locators}]
|
||||
The pseudo-device
|
||||
.Em name
|
||||
is defined. The optional
|
||||
.Em locators
|
||||
may be defined, but are largely pointless since no device can attach
|
||||
to a pseudo-device.
|
||||
.It file pathname [attributes [flags]] [rule]
|
||||
The file
|
||||
.Em pathname
|
||||
is added to the list of files used to build the kernel. If no
|
||||
attributes are specific the file is always added to the kernel
|
||||
compilation. If any of the attributes are specified by other devices
|
||||
in the machine descripton file, then the file is included in
|
||||
compilation, otherwise it is omitted. Valid values for the optional
|
||||
flags are:
|
||||
.Bl -tag -width xxxxxx
|
||||
.It needs-count
|
||||
Specify that config should generate a file for each of the attributes
|
||||
notifying the driver how many of some particular device or set of
|
||||
devices are configured are configured in the kernel. This flags
|
||||
allows drivers to make calculations of driver used at compile time.
|
||||
This option prevents autoconfiguration cloning.
|
||||
.It needs-flag
|
||||
This flag performs the same operation and
|
||||
.Em needs-count
|
||||
but only records if the number is nonzero. Since the count is not
|
||||
extact,
|
||||
.Em needs-flag
|
||||
does not prevent autoconfiguration cloning.
|
||||
.El
|
||||
.It major major-list
|
||||
The devices listed in
|
||||
.Em major-list
|
||||
are associated with major device numbers, allowing them to be used for
|
||||
file system roots, swapping and crash dumps. Since major numbers are
|
||||
machine dependent, they should not appear in the machine-independent
|
||||
device definition files.
|
||||
.El
|
||||
.Pp
|
||||
To allow locators to be wildcarded in the machine description file,
|
||||
their default value must be defined in the attribute definition. To
|
||||
allow locators to be omitted entirely in the machine description file,
|
||||
enclose the locator in square brackets. This can be used when some
|
||||
locators do not make sense for some devices, but the software
|
||||
interface requires them.
|
||||
.Sh CODE REFERENCES
|
||||
This section describes places within the
|
||||
.Nx
|
||||
source tree where actual code implementing or utilising the
|
||||
autoconfiguration framework can be found. All pathnames are relative
|
||||
to
|
||||
.Pa /usr/src .
|
||||
.Pp
|
||||
The device definition files are in
|
||||
.Pa sys/conf/files ,
|
||||
.Pa sys/arch/<arch>/conf/files.<arch> ,
|
||||
and
|
||||
.Pa sys/dev/<bus>/files.<bus> .
|
||||
.Pp
|
||||
The grammar for machine description files can be found in
|
||||
.Xr config 8 ,
|
||||
in
|
||||
.Pa usr.sbin/config/gram.y .
|
||||
.Sh SEE ALSO
|
||||
.Rs
|
||||
.%T "Building 4.4 BSD Systems with Config"
|
||||
.Re
|
||||
.Rs
|
||||
.%A Chris Torek
|
||||
.%T "Device Configuration in 4.4BSD"
|
||||
.%D 1992
|
||||
.Re
|
||||
.sp
|
||||
.Xr config 8 ,
|
||||
.Xr autoconf 9 ,
|
||||
.Xr driver 9 .
|
||||
.Sh HISTORY
|
||||
Autoconfiguration first appeared in
|
||||
.Bx 4.1 .
|
||||
The autoconfiguration framework was completely revised in
|
||||
.Bx 4.4 .
|
||||
It has been modified within
|
||||
.Nx
|
||||
to support bus-independent drivers and bus-dependent attachments.
|
313
share/man/man9/driver.9
Normal file
313
share/man/man9/driver.9
Normal file
@ -0,0 +1,313 @@
|
||||
.\" $NetBSD: driver.9,v 1.1 2001/07/01 04:11:13 gmcgarry Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" This code is derived from software contributed to The NetBSD Foundation
|
||||
.\" by Gregory McGarry.
|
||||
.\"
|
||||
.\" 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.
|
||||
.\" 3. All advertising materials mentioning features or use of this software
|
||||
.\" must display the following acknowledgement:
|
||||
.\" This product includes software developed by the NetBSD
|
||||
.\" Foundation, Inc. and its contributors.
|
||||
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
.\" contributors may be used to endorse or promote products derived
|
||||
.\" from this software without specific prior written permission.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
.\" ``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 FOUNDATION OR CONTRIBUTORS
|
||||
.\" 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.
|
||||
.\"
|
||||
.Dd June 16, 2001
|
||||
.Dt DRIVER 9
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm driver
|
||||
.Nd description of a device driver
|
||||
.Sh SYNOPSIS
|
||||
.Fd #include <sys/param.h>
|
||||
.Fd #include <sys/device.h>
|
||||
.Fd #include <sys/error.h>
|
||||
.Ft static int
|
||||
.Fn foo_match "struct device *parent" "struct cfdata *match" "void *aux"
|
||||
.Ft static void
|
||||
.Fn foo_attach "struct device *parent" "struct device *self" "void *aux"
|
||||
.Ft static int
|
||||
.Fn foo_detach "struct device *self" "int flags"
|
||||
.Ft static int
|
||||
.Fn foo_activate "struct device *self" "enum devact act"
|
||||
.Sh DESCRIPTION
|
||||
This page briefly describes the basic
|
||||
.Nx
|
||||
autoconfiguration interface utilised by device drivers. For a detailed
|
||||
overview of the autoconfiguration framework see
|
||||
.Xr autoconf 9 .
|
||||
.Pp
|
||||
Each device driver must present to the system a standard
|
||||
autoconfiguration interface. This interface is provided by the
|
||||
.Em cfattach
|
||||
structure. The interface to the driver is constant and is defined
|
||||
statically inside the driver. For example, the interface to driver
|
||||
.Do
|
||||
foo
|
||||
.Dc
|
||||
is defined with:
|
||||
.Pp
|
||||
.Bd -literal
|
||||
struct cfattach foo_ca = {
|
||||
sizeof(struct foo_softc), /* size of instance data */
|
||||
foo_match, /* match/probe function */
|
||||
foo_attach, /* attach function */
|
||||
foo_detach, /* detach function */
|
||||
foo_activate /* activate function */
|
||||
};
|
||||
.Ed
|
||||
.Pp
|
||||
The structure variable must be named
|
||||
.Va foo_ca
|
||||
by appending the letters
|
||||
.Do
|
||||
_ca
|
||||
.Dc
|
||||
to the driver's base name. This convention is mandated by the
|
||||
autoconfiguration framework.
|
||||
.Pp
|
||||
For each device instance controlled by the driver, the
|
||||
autoconfiguration framework allocates a block of memory to record
|
||||
device-instance-specific driver variables. The size of this memory
|
||||
block is specified by the first field in the
|
||||
.Em cfattach
|
||||
structure. The memory block is referred to as the driver's
|
||||
.Em softc
|
||||
structure. The
|
||||
.Em softc
|
||||
structure is only accessed within the driver, so its definition is
|
||||
local to the driver. Nevertheless, the
|
||||
.Em softc
|
||||
structure should adopt the standard
|
||||
.Nx
|
||||
configuration and naming conventions. For example, the
|
||||
.Em softc
|
||||
structure for driver
|
||||
.Do
|
||||
foo
|
||||
.Dc
|
||||
is defined with:
|
||||
.Pp
|
||||
.Bd -literal
|
||||
struct foo_softc {
|
||||
struct device sc_dev; /* generic device info */
|
||||
/* device-specific state */
|
||||
};
|
||||
.Ed
|
||||
.Pp
|
||||
The autoconfiguration framework mandates that the first member of the
|
||||
.Em softc
|
||||
structure must be the driver-independent
|
||||
.Em struct device .
|
||||
Probably its most useful aspect to the driver is that it contains the
|
||||
device-instance name
|
||||
.Em dv_xname .
|
||||
.Pp
|
||||
During system bootstrap, the autoconfiguration framework searches the
|
||||
system for devices. For each device driver, its match function
|
||||
is called
|
||||
.Po
|
||||
via its
|
||||
.Em cfattach
|
||||
structure
|
||||
.Pc
|
||||
to match the driver with a device instance. The match function is
|
||||
called with three arguments. This first argument
|
||||
.Fa parent
|
||||
is a pointer to the driver's parent device structure. The second
|
||||
argument
|
||||
.Fa match
|
||||
is a pointer to a data structure describing the autoconfiguration
|
||||
framework's understanding of the driver. Both the
|
||||
.Fa parent
|
||||
and
|
||||
.Fa match
|
||||
arguments are ignored by most drivers. The third argument
|
||||
.Fa aux
|
||||
contains a pointer to a structure describing a potential
|
||||
device-instance. It is passed to the driver from the parent.
|
||||
The match function would type-cast the
|
||||
.Fa aux
|
||||
argument to its appropriate attachment structure and use its contents
|
||||
to determine whether it supports the device. Depending on the device
|
||||
hardware, the contents of the attachment structure may contain
|
||||
.Do
|
||||
locators
|
||||
.Dc
|
||||
to locate the device instance so that the driver can probe it for its
|
||||
identity. If the probe process identifies additional device
|
||||
properties, it may modify the members of the attachment structure.
|
||||
For these devices, the
|
||||
.Nx
|
||||
convention is to
|
||||
call the match routine
|
||||
.Fn foo_probe
|
||||
instead of
|
||||
.Fn foo_match
|
||||
to make this distinction clear. Either way, the match function
|
||||
returns a nonzero integer indicating the confidence of supporting this
|
||||
device and a value of 0 if the driver doesn't support the device.
|
||||
Generally, only a single driver exists for a device, so the match
|
||||
function returns 1 for a positive match.
|
||||
.Pp
|
||||
The autoconfiguration framework will call the attach function
|
||||
.Po
|
||||
via its
|
||||
.Em cfattach
|
||||
structure
|
||||
.Pc
|
||||
of the driver which returns the highest value from its match function.
|
||||
The attach function is called with three arguments. The attach
|
||||
function performs the necessary process to initialise the device for
|
||||
operation. The first argument
|
||||
.Fa parent
|
||||
is a pointer to the driver's parent device structure. The second
|
||||
argument
|
||||
.Fa self
|
||||
is a pointer to the driver's device structure. It is also a pointer
|
||||
to our
|
||||
.Em softc
|
||||
structure since the device structure is its first member. The third
|
||||
argument
|
||||
.Fa aux
|
||||
is a pointer to the attachment structure. The
|
||||
.Fa parent
|
||||
and
|
||||
.Fa aux
|
||||
arguments are the same as the match function.
|
||||
.Pp
|
||||
The driver's attach function is called before system interrupts are
|
||||
enabled. If interrupts are required during initialisation, then
|
||||
the attach function should make use of
|
||||
.Fn config_interrupts
|
||||
.Po
|
||||
see
|
||||
.Xr autoconf 9
|
||||
.Pc .
|
||||
.Pp
|
||||
Some devices can be removed from the system without requiring a system
|
||||
reboot. The autoconfiguration framework calls the driver's detach
|
||||
function
|
||||
.Po
|
||||
via its
|
||||
.Em cfattach
|
||||
structure
|
||||
.Pc
|
||||
during device detachment. If the device does not support detachment,
|
||||
then the driver does not have to provide a detach function. The
|
||||
detach function is used to relinquish resources allocated to the
|
||||
driver which are no longer needed. The first argument
|
||||
.Fa self
|
||||
is a pointer to the driver's device structure. It is the same
|
||||
structure as passed to the attach function. The second argument
|
||||
.Fa flags
|
||||
contains detachment flags. Valid values are DETACH_FORCE
|
||||
.Po
|
||||
force detachment; hardware gone
|
||||
.Pc and DETACH_QUIET
|
||||
.Po
|
||||
do not print a notice
|
||||
.Pc .
|
||||
.Pp
|
||||
The autoconfiguration framework calls the driver's activate function
|
||||
to notify the driver of a change in the resources that have been
|
||||
allocated to it. For example, an Ethernet driver has to be notified
|
||||
if the network stack is being added or removed from the kernel. The
|
||||
first argument to the activate function
|
||||
.Fa self
|
||||
is a pointer to the driver's device structure. It is the same
|
||||
argument as passed to the attach function. The second argument
|
||||
.Fa act
|
||||
describes the action. Valid actions are DVACT_ACTIVATE
|
||||
.Po
|
||||
activate the device
|
||||
.Pc and DVACT_DEACTIVATE
|
||||
.Po
|
||||
deactivate the device
|
||||
.Pc .
|
||||
If the action is not supported the activate function should return
|
||||
EOPNOSUPP.
|
||||
The activate function is called in interrupt context.
|
||||
.Pp
|
||||
Most drivers will want to make use of interrupt facilities. Interrupt
|
||||
locators provided through the attachment structure should be used to
|
||||
establish interrupts within the system. Generally, an interrupt
|
||||
interface is provided by the parent. The interface will require a
|
||||
handler and a driver-specific argument to be specified. This argument
|
||||
is usually a pointer to the device-instance-specific softc structure.
|
||||
When a hardware interrupt for the device occurs the handler is called
|
||||
with the argument. Interrupt handlers should return 0 for
|
||||
.Do
|
||||
interrupt not for me
|
||||
.Dc ,
|
||||
1 for
|
||||
.Do
|
||||
I took care of it
|
||||
.Dc ,
|
||||
or -1 for
|
||||
.Do
|
||||
I guess it was mine, but I wasn't expecting it
|
||||
.Dc .
|
||||
.Pp
|
||||
For a driver to be compiled into the kernel,
|
||||
.Xr config 8
|
||||
must be aware of its existence. This is done by including an entry in
|
||||
files.<bus> in the directory containing the driver. For example, the
|
||||
driver
|
||||
.Do
|
||||
foo
|
||||
.Dc
|
||||
attaching to bus
|
||||
.Do
|
||||
bar
|
||||
.Dc
|
||||
with dependency on kernel module
|
||||
.Do
|
||||
baz
|
||||
.Dc
|
||||
has the entry:
|
||||
.Bd -literal
|
||||
device foo: baz
|
||||
attach foo at bar
|
||||
file dev/bar/foo.c foo
|
||||
.Ed
|
||||
.Pp
|
||||
An entry can now be added to the machine description file:
|
||||
.Bd -literal
|
||||
foo* at bar?
|
||||
.Ed
|
||||
.Pp
|
||||
For a detailed description of the machine description file and the
|
||||
.Do
|
||||
device definition
|
||||
.Dc
|
||||
language see
|
||||
.Xr config 9 .
|
||||
.Sh SEE ALSO
|
||||
.Xr config 8 ,
|
||||
.Xr autoconf 9 ,
|
||||
.Xr config 9 ,
|
||||
.Xr powerhook_establish 9 ,
|
||||
.Xr shutdownhook_establish 9 .
|
222
share/man/man9/ioasic.9
Normal file
222
share/man/man9/ioasic.9
Normal file
@ -0,0 +1,222 @@
|
||||
.\" $NetBSD: ioasic.9,v 1.1 2001/07/01 04:11:13 gmcgarry Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" This code is derived from software contributed to The NetBSD Foundation
|
||||
.\" by Gregory McGarry.
|
||||
.\"
|
||||
.\" 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.
|
||||
.\" 3. All advertising materials mentioning features or use of this software
|
||||
.\" must display the following acknowledgement:
|
||||
.\" This product includes software developed by the NetBSD
|
||||
.\" Foundation, Inc. and its contributors.
|
||||
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
.\" contributors may be used to endorse or promote products derived
|
||||
.\" from this software without specific prior written permission.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
.\" ``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 FOUNDATION OR CONTRIBUTORS
|
||||
.\" 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.
|
||||
.\"
|
||||
.Dd August 6, 2000
|
||||
.Dt IOASIC 9
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm IOASIC ,
|
||||
.Nm ioasic_intr_establish ,
|
||||
.Nm ioasic_intr_disestablish ,
|
||||
.Nm ioasic_intr_evcnt ,
|
||||
.Nm ioasic_attach_devs ,
|
||||
.Nm ioasic_submatch
|
||||
.Nd baseboard I/O control ASIC for DEC TURBOchannel systems
|
||||
.Sh SYNOPSIS
|
||||
.Fd #include <machine/bus.h>
|
||||
.Fd #include <dev/tc/tcvar.h>
|
||||
.Fd #include <dev/tc/ioasicreg.h>
|
||||
.Fd #include <dev/tc/ioasicvar.h>
|
||||
.Ft void
|
||||
.Fn ioasic_intr_establish "struct device *dev" "void *cookie" "int level" \
|
||||
"int (*handler)(void *)" "void *arg"
|
||||
.Ft void
|
||||
.Fn ioasic_intr_disestablish "struct device *dev" "void *cookie"
|
||||
.Ft const struct evcnt *
|
||||
.Fn ioasic_intr_evcnt "struct device *dev" "void *cookie"
|
||||
.Ft void
|
||||
.Fn ioasic_attach_devs "struct ioasic_softc *sc" \
|
||||
"struct ioasic_dev *ioasic_devs" "int ioasic_ndevs"
|
||||
.Ft int
|
||||
.Fn ioasic_submatch "struct cfdata *match" "struct ioasicdev_attach_args *ia"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
device provides support for the DEC proprietary IOCTL ASIC) found on
|
||||
all DEC TURBOchannel machines with MIPS (DECstation 5000 series,
|
||||
excluding the 5000/200) and Alpha (3000-series) systems. The
|
||||
.Nm
|
||||
is memory-mapped into the TURBOchannel system slot to interface up to
|
||||
sixteen I/O devices. It connects the TURBOchannel to a 16-bit wide
|
||||
I/O bus and supplies various control signals to the devices that share
|
||||
this bus.
|
||||
.Pp
|
||||
The
|
||||
.Nm
|
||||
provides hardware DMA channels and interrupt support. DMA transfers
|
||||
are between one and four 32-bit words (16 bytes) in length, depending
|
||||
on the device. The
|
||||
.Nm
|
||||
stores the data in internal data registers. The data is transferred
|
||||
to and from the registers in 16-bit words to the device. Various
|
||||
interrupts are signalled on DMA pointer-related conditions.
|
||||
.Sh DATA TYPES
|
||||
Drivers for devices attached to the
|
||||
.Nm
|
||||
will make use of the following data types:
|
||||
.Bl -tag -width compact
|
||||
.It Fa struct ioasicdev_attach_args
|
||||
A structure used to inform the driver of the
|
||||
.Nm
|
||||
device properties. It contains the following members:
|
||||
.Bd -literal
|
||||
char iada_modname
|
||||
tc_offset_t iada_offset
|
||||
tc_addr_t iada_addr
|
||||
void *iada_cookie;
|
||||
.Ed
|
||||
.It Fa struct ioasic_softc
|
||||
The parent structure which contains at the following members which are
|
||||
useful for drivers:
|
||||
.Bd -literal
|
||||
bus_space_tag_t sc_bst;
|
||||
bus_space_handle_t sc_bsh;
|
||||
bus_dma_tag_t sc_dmat;
|
||||
.Ed
|
||||
.It Fa struct ioasic_dev
|
||||
A structure describing the machine-dependent devices attached to the
|
||||
.Nm
|
||||
containing the following members:
|
||||
.Bd -literal
|
||||
char *iad_modname;
|
||||
tc_offset_t iad_offset;
|
||||
void *iad_cookie;
|
||||
u_int32_t iad_intrbits;
|
||||
.Ed
|
||||
.El
|
||||
.Sh FUNCTIONS
|
||||
.Bl -tag -width compact
|
||||
.It Fn ioasic_intr_establish "dev" "cookie" "level" "handler" "arg"
|
||||
Establish an interrupt handler with device
|
||||
.Fa dev
|
||||
for the interrupt described completely by
|
||||
.Fa cookie .
|
||||
The priority of the interrupt is specified by
|
||||
.Fa level .
|
||||
When the interrupt occurs the function
|
||||
.Fa handler
|
||||
is called with argument
|
||||
.Fa arg .
|
||||
.It Fn ioasic_intr_disestablish "dev" "cookie"
|
||||
Dis-establish the interrupt handler with device
|
||||
.Fa dev
|
||||
for the interrupt described complete ly
|
||||
.Fa cookie .
|
||||
.It Fn ioasic_intr_evcnt "dev" "cookie"
|
||||
Do interrupt event counting with device
|
||||
.Fa dev
|
||||
for the event described completely by
|
||||
.Fa cookie .
|
||||
.It Fn ioasic_attach_devs "sc" "ioasic_devs" "ioasic_ndevs"
|
||||
Configure each of the
|
||||
.Fa ioasic_ndevs
|
||||
devices in
|
||||
.Fa ioasic_devs .
|
||||
.It Fn ioasic_submatch "match" "ia"
|
||||
Check that the device offset is not OASIC_OFFSET_UNKNOWN.
|
||||
.El
|
||||
.Pp
|
||||
The
|
||||
.Fn ioasic_intr_establish ,
|
||||
.Fn ioasic_intr_disestablish ,
|
||||
and
|
||||
.Fn ioasic_intr_evcnt
|
||||
functions are likely to used by all
|
||||
.Nm
|
||||
device drivers. The
|
||||
.Fn ioasic_attach_devs
|
||||
function is used by ioasic driver internally and is of interest to
|
||||
driver writers because it must be aware of your device for it to be
|
||||
found during autoconfiguration.
|
||||
.Sh AUTOCONFIGURATION
|
||||
The IOASIC is a direct-connection bus. During autoconfiguration,
|
||||
machine-dependent code will provide an array of
|
||||
.Fa struct ioasic_devs
|
||||
describing devices attached to the
|
||||
.Nm
|
||||
to be used by the ioasic driver. The ioasic driver will pass this array to
|
||||
.Fn ioasic_attach_devs
|
||||
to attach the drivers with the devices.
|
||||
.Pp
|
||||
Drivers match the device using
|
||||
.Fa iada_modname .
|
||||
.Pp
|
||||
During attach, all drivers should use the parent's bus_space and
|
||||
bus_dma resources, and map the appropriate bus_space region using
|
||||
.Fn bus_space_subregion
|
||||
with
|
||||
.Fa iada_offset.
|
||||
.Sh DMA SUPPORT
|
||||
No additional support is provided for
|
||||
.Nm
|
||||
DMA beyond the facilities provided by the
|
||||
.Xr bus_dma 9
|
||||
interface.
|
||||
.Pp
|
||||
The
|
||||
.Nm
|
||||
provides two pairs of DMA address pointers (transmitting and
|
||||
receiving) for each DMA-capable device. The pair of address pointers
|
||||
point to consecutive (but not necesarily contiguous) DMA blocks of
|
||||
size IOASIC_DMA_BLOCKSIZE. Upon successful transfer of the first
|
||||
block, DMA continues to the next block and an interrupt is posted to
|
||||
signal an address pointer update. DMA transfers are enabled and
|
||||
disabled by bits inside the
|
||||
.Nm
|
||||
status (CSR) register.
|
||||
.Pp
|
||||
The interrupt handler must update the address pointers to point to the
|
||||
next block in the DMA transfer. The address pointer update must be
|
||||
completed before the completion of the second DMA block, otherwise a
|
||||
DMA overrun error condition will occur.
|
||||
.Sh CODE REFERENCES
|
||||
This section describes places within the
|
||||
.Nx
|
||||
source tree where actual code implementing or utilising the
|
||||
machine-independent IOASIC subsystem can be found. All pathnames are
|
||||
relative to
|
||||
.Pa /usr/src.
|
||||
.Pp
|
||||
The IOASIC subsystem itself is implemented within the file
|
||||
.Pa sys/dev/tc/ioasic_subr.c .
|
||||
Machine-dependent portions can be found in
|
||||
.Pa sys/arch/<arch>/tc/ioasic.c .
|
||||
.Sh SEE ALSO
|
||||
.Xr ioasic 4 ,
|
||||
.Xr autoconf 9 ,
|
||||
.Xr bus_dma 9 ,
|
||||
.Xr bus_space 9 ,
|
||||
.Xr driver 9 .
|
485
share/man/man9/isa.9
Normal file
485
share/man/man9/isa.9
Normal file
@ -0,0 +1,485 @@
|
||||
.\" $NetBSD: isa.9,v 1.1 2001/07/01 04:11:14 gmcgarry Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" This code is derived from software contributed to The NetBSD Foundation
|
||||
.\" by Gregory McGarry.
|
||||
.\"
|
||||
.\" 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.
|
||||
.\" 3. All advertising materials mentioning features or use of this software
|
||||
.\" must display the following acknowledgement:
|
||||
.\" This product includes software developed by the NetBSD
|
||||
.\" Foundation, Inc. and its contributors.
|
||||
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
.\" contributors may be used to endorse or promote products derived
|
||||
.\" from this software without specific prior written permission.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
.\" ``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 FOUNDATION OR CONTRIBUTORS
|
||||
.\" 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.
|
||||
.\"
|
||||
.Dd June 19, 2001
|
||||
.Dt ISA 9
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm ISA ,
|
||||
.Nm isa_intr_alloc ,
|
||||
.Nm isa_intr_establish ,
|
||||
.Nm isa_intr_disestablish ,
|
||||
.Nm isa_intr_evcnt ,
|
||||
.Nm isa_dmamap_create ,
|
||||
.Nm isa_dmamap_destroy ,
|
||||
.Nm isa_dmamem_alloc ,
|
||||
.Nm isa_dmamem_free ,
|
||||
.Nm isa_dmamem_map ,
|
||||
.Nm isa_dmamem_unmap ,
|
||||
.Nm isa_malloc ,
|
||||
.Nm isa_free ,
|
||||
.Nm isa_dmastart ,
|
||||
.Nm isa_dmaabort ,
|
||||
.Nm isa_dmacount ,
|
||||
.Nm isa_dmadone ,
|
||||
.Nm isa_dmamaxsize ,
|
||||
.Nm isa_drq_isfree ,
|
||||
.Nm isa_dmacascade ,
|
||||
.Nm isa_mappage
|
||||
.Nd Industry-standard Architecture
|
||||
.Sh SYNOPSIS
|
||||
.Fd #include <machine/bus.h>
|
||||
.Fd #include <dev/isa/isareg.h>
|
||||
.Fd #include <dev/isa/isavar.h>
|
||||
.Ft int
|
||||
.Fn isa_intr_alloc "isa_chipset_tag_t ic" "int mask" "int type" \
|
||||
"int *irq"
|
||||
.Ft const struct evcnt *
|
||||
.Fn isa_intr_evcnt "isa_chipset_tag_t ic" "int irq"
|
||||
.Ft void *
|
||||
.Fn isa_intr_establish "isa_chipset_tag_t ic" "int irq" "int type" \
|
||||
"int level" "int (*handler)(void *)" "void *arg"
|
||||
.Ft void
|
||||
.Fn isa_intr_disestablish "isa_chipset_tag_t ic" "void *ih"
|
||||
.Fd #include <dev/isa/isadmareg.h>
|
||||
.Fd #include <dev/isa/isadmavar.h>
|
||||
.Ft int
|
||||
.Fn isa_dmamap_create "isa_chipset_tag_t ic" "int chan" "bus_size_t size" \
|
||||
"int flags"
|
||||
.Ft void
|
||||
.Fn isa_dmamap_destroy "isa_chipset_tag_t ic" "int chan"
|
||||
.Ft int
|
||||
.Fn isa_dmamem_alloc "isa_chipset_tag_t ic" "int chan" "bus_size_t size" \
|
||||
"bus_addr_t *addrp" "int flags"
|
||||
.Ft void
|
||||
.Fn isa_dmamem_free "isa_chipset_tag_t ic" "int chan" "bus_addr_t addr" \
|
||||
"bus_size_t size"
|
||||
.Ft int
|
||||
.Fn isa_dmamem_map "isa_chipset_tag_t ic" "int chan" "bus_addr_t addr" \
|
||||
"bus_size_t size" "caddr_t *kvap" "int flags"
|
||||
.Ft void
|
||||
.Fn isa_dmamem_unmap "isa_chipset_tag_t ic" "int chan" "caddr_t kva" \
|
||||
"size_t size"
|
||||
.Ft void *
|
||||
.Fn isa_malloc "isa_chipset_tag_t ic" "int chan" "size_t size" \
|
||||
"int pool" "int flags"
|
||||
.Ft void
|
||||
.Fn isa_free "void *addrp" "int pool"
|
||||
.Ft int
|
||||
.Fn isa_dmastart "isa_chipset_tag_t ic" "int chan" "bus_addr_t addr" \
|
||||
"bus_size_t size" "struct proc *proc" "int flags" "int bf"
|
||||
.Ft void
|
||||
.Fn isa_dmaabort "isa_chipset_tag_t ic" "int chan"
|
||||
.Ft bus_size_t
|
||||
.Fn isa_dmacount "isa_chipset_tag_t ic" "int chan"
|
||||
.Ft void
|
||||
.Fn isa_dmadone "isa_chipset_tag_t ic" "int chan"
|
||||
.Ft bus_size_t
|
||||
.Fn isa_dmamaxsize "isa_chipset_tag_t ic" "int chan"
|
||||
.Ft int
|
||||
.Fn isa_drq_isfree "isa_chipset_tag_t ic" "int chan"
|
||||
.Ft int
|
||||
.Fn isa_dmacascade "isa_chipset_tag_t ic" "int chan"
|
||||
.Ft paddr_t
|
||||
.Fn isa_mappage "void *mem" "off_t offset" "int prot"
|
||||
.Sh DESCRIPTION
|
||||
The machine-independent
|
||||
.Nm
|
||||
subsystem provides support for the ISA bus.
|
||||
.Pp
|
||||
The ISA bus was introduced on the IBM PC/AT. It is an extension to
|
||||
the original bus found on the original IBM PC. The ISA bus is
|
||||
essentially the host bus of the Intel 80286 processor, however the
|
||||
widespread acceptance of the bus as a defacto standard has seen it
|
||||
appear on systems without Intel processors.
|
||||
.Pp
|
||||
The ISA bus has a 16-bit data bus, a 24-bit memory address bus, a
|
||||
10-bit I/O address bus and operates at 8MHz. It provides 15 interrupt
|
||||
lines and 8 DMA channels supporting DMA transfers of 64KB or 128KB
|
||||
transfers depending on the width of the channel being used.
|
||||
.Pp
|
||||
On newer machines, the ISA bus is no longer connected directly to the
|
||||
host bus, and is usually connected via a PCI-ISA bridge. Either way,
|
||||
the bus looks the same to the device driver.
|
||||
.Sh DATA TYPES
|
||||
Drivers for devices attached to the
|
||||
.Nm
|
||||
bus will make use of the following data types:
|
||||
.Bl -tag -width compact
|
||||
.It Fa isa_chipset_tag_t
|
||||
Chipset tag for the ISA bus.
|
||||
.It Fa struct isa_attach_args
|
||||
Location hints for devices are recorded in this structure. It
|
||||
contains the following members:
|
||||
.Bd -literal
|
||||
bus_space_tag_t ia_iot; /* isa i/o space tag */
|
||||
bus_space_tag_t ia_memt; /* isa mem space tag */
|
||||
bus_dma_tag_t ia_dmat; /* DMA tag */
|
||||
isa_chipset_tag_t ia_ic;
|
||||
int ia_iobase; /* base i/o address */
|
||||
int ia_iosize; /* span of ports used */
|
||||
int ia_maddr; /* physical mem addr */
|
||||
u_int ia_msize; /* size of memory */
|
||||
int ia_irq; /* interrupt request */
|
||||
int ia_drq; /* DMA request */
|
||||
int ia_drq2; /* second DMA request */
|
||||
void *ia_aux; /* driver specific */
|
||||
.Ed
|
||||
.El
|
||||
.Sh FUNCTIONS
|
||||
.Bl -tag -width compact
|
||||
.It Fn isa_intr_alloc "ic" "mask" "type" "irq"
|
||||
This function is generally not required by device drivers. It is used
|
||||
by bridges attaching other busses to the ISA bus.
|
||||
.It Fn isa_intr_evcnt "ic" "irq"
|
||||
Returns the event counter associated with interrupt line
|
||||
.Fa irq .
|
||||
.It Fn isa_intr_establish "ic" "irq" "type" "level" "handler" "arg"
|
||||
To establish an ISA interrupt handler, a driver calls
|
||||
.Fn isa_intr_establish
|
||||
with the interrupt number
|
||||
.Fa irq ,
|
||||
type
|
||||
.Fa type ,
|
||||
and level
|
||||
.Fa level .
|
||||
When the interrupt occurs the function
|
||||
.Fa handler
|
||||
is called with argument
|
||||
.Fa arg .
|
||||
Valid values for
|
||||
.Fa type
|
||||
are:
|
||||
.Bl -tag -width compact
|
||||
.It IST_NONE
|
||||
Reserve interrupt, but don't actually establish.
|
||||
.It IST_EDGE
|
||||
Edge-triggered interrupt.
|
||||
.It IST_LEVEL
|
||||
Level-triggered interrupt.
|
||||
.It IST_PULSE
|
||||
Pulse-triggered interrupt.
|
||||
.El
|
||||
.sp
|
||||
.Fn isa_intr_establish
|
||||
returns an opaque handle to an event descriptor if it succeeds, and
|
||||
returns NULL on failure.
|
||||
.Pp
|
||||
.It Fn isa_intr_disestablish "ic" "ih"
|
||||
Dis-establish the interrupt handler with handle
|
||||
.Fa ih .
|
||||
The handle was returned from
|
||||
.Fn isa_intr_establish .
|
||||
.It Fn isa_dmamap_create "ic" "chan" "size" "flags"
|
||||
Creates a DMA map for channel
|
||||
.Fa chan .
|
||||
It is initialised to accept maximum DMA transfers of size
|
||||
.Fa size .
|
||||
Valid values for the
|
||||
.Fa flags
|
||||
argument are the same as for
|
||||
.Fn bus_dmamap_create
|
||||
(see
|
||||
.Xr bus_dma 9 ).
|
||||
This function returns zero on success or an error value on failure.
|
||||
.It Fn isa_dmamap_destroy "ic" "chan"
|
||||
Destroy the DMA map for DMA channel
|
||||
.Fa chan .
|
||||
.It Fn isa_dmamem_alloc "ic" "chan" "size" "addrp" "flags"
|
||||
Allocate DMA-safe memory of size
|
||||
.Fa size
|
||||
for channel
|
||||
.Fa chan .
|
||||
Valid values for the
|
||||
.Fa flags
|
||||
argument are the same as for
|
||||
.Fn bus_dmamem_alloc
|
||||
(see
|
||||
.Xr bus_dma 9 ).
|
||||
The bus-address of the memory is returned in
|
||||
.Fa addrp .
|
||||
This function returns zero on success or an error value on failure.
|
||||
.It Fn isa_dmamem_free "ic" "chan" "addr" "size"
|
||||
Frees memory previously allocated by
|
||||
.Fn isa_dmamem_alloc
|
||||
for channel
|
||||
.Fa chan .
|
||||
The bus-address and size of the memory are specified by
|
||||
.Fa addr
|
||||
and
|
||||
.Fa size
|
||||
respectively.
|
||||
.It Fn isa_dmamem_map "ic" "chan" "addr" "size" "kvap" "flags"
|
||||
Maps DMA-safe memory (allocated with
|
||||
.Fn isa_dmamem_alloc )
|
||||
specified by bus-address
|
||||
.Fa addr
|
||||
and of size
|
||||
.Fa size
|
||||
into kernel virtual address space for DMA channel
|
||||
.Fa chan .
|
||||
Valid values for the
|
||||
.Fa flags
|
||||
argument are the same as for
|
||||
.Fn bus_dmamem_map
|
||||
(see
|
||||
.Xr bus_dma 9 ).
|
||||
The kernel virtual address is returned in
|
||||
.Fa kvap .
|
||||
This function returns zero on success or an error value on failure.
|
||||
.It Fn isa_dmamem_unmap "ic" "chan" "kva" "size"
|
||||
Unmaps memory (previously mapped with
|
||||
.Fn isa_dmamem_map )
|
||||
of size
|
||||
.Fa size
|
||||
for channel
|
||||
.Fa chan .
|
||||
The kernel virtual address space used by the mapping is freed.
|
||||
.It Fn isa_malloc "ic" "chan" "size" "pool" "flags"
|
||||
This function is a shortcut for allocating and mapping DMA-safe memory
|
||||
in a single step. The arguments correspond with the arguments to
|
||||
.Fn isa_dmamem_alloc
|
||||
and
|
||||
.Fn isa_dmamem_map .
|
||||
The argument
|
||||
.Fa pool
|
||||
is a pool to record the memory allocation. This function returns
|
||||
a pointer to the DMA-safe memory.
|
||||
.It Fn isa_free "addrp" "pool"
|
||||
This function is a shortcut for unmapping and deallocating DMA-safe
|
||||
memory in a single step. It replaces
|
||||
.Fn isa_dmamem_unmap
|
||||
and
|
||||
.Fn isa_dmamem_free .
|
||||
The argument
|
||||
.Fa addrp
|
||||
is the pointer to the DMA-safe memory returned by
|
||||
.Fn isa_malloc .
|
||||
The argument
|
||||
.Fa pool
|
||||
is the same as the value passed to
|
||||
.Fn isa_malloc .
|
||||
.It Fn isa_dmastart "ic" "chan" "addr" "size" "proc" "flags" "bf"
|
||||
Load DMA memory specified by address
|
||||
.Fa addr
|
||||
of size
|
||||
.Fa size
|
||||
into the DMA controller at channel
|
||||
.Fa chan
|
||||
and set it in motion.
|
||||
The argument
|
||||
.Fa proc
|
||||
is used to indicate the address space in which the buffer is located.
|
||||
If NULL, the buffer is assumed to be in kernel space. Otherwise, the
|
||||
buffer is assumed to be in process
|
||||
.Fa proc 's
|
||||
address space.
|
||||
The argument
|
||||
.Fa flags
|
||||
describes the type of ISA DMA. Valid values are:
|
||||
.Bl -tag -width compact
|
||||
.It DMAMODE_WRITE
|
||||
DMA transfer from host to device.
|
||||
.It DMAMODE_READ
|
||||
DMA transfer to host from device.
|
||||
.It DMAMODE_SINGLE
|
||||
Transfer buffer once and stop.
|
||||
.It DMAMODE_DEMAND
|
||||
Demand mode.
|
||||
.It DMAMODE_LOOP
|
||||
Transfer buffer continuously in loop until notified to stop.
|
||||
.It DMAMODE_LOOPDEMAND
|
||||
Transfer buffer continuously in loop and demand mode.
|
||||
.El
|
||||
.sp
|
||||
The argument
|
||||
.Fa bf
|
||||
is the bus-space flags. Valid values are the same as for
|
||||
.Fn bus_dmamap_load
|
||||
(see
|
||||
.Xr bus_dma 9 ).
|
||||
.It Fn isa_dmaabort "ic" "chan"
|
||||
Abort a DMA transfer on channel
|
||||
.Fa chan .
|
||||
.It Fn isa_dmacount "ic" "chan"
|
||||
Returns the offset in the DMA memory of the current DMA transfer on
|
||||
channel
|
||||
.Fa chan .
|
||||
.It Fn isa_dmadone "ic" "chan"
|
||||
Unloads the DMA memory
|
||||
on channel
|
||||
.Fa chan
|
||||
after a DMA transfer has completed.
|
||||
.It Fn isa_dmamaxsize "ic" "chan"
|
||||
Returns the maximum allowable DMA transfer size for channel
|
||||
.Fa chan .
|
||||
.It Fn isa_drq_isfree "ic" "chan"
|
||||
If the
|
||||
.Fa ia_drq
|
||||
or
|
||||
.Fa ia_drq2
|
||||
members of
|
||||
.Fa struct isa_attach_args
|
||||
are wildcarded, then the driver is expected to probe the hardware for
|
||||
valid DMA channels. In this case, the driver can check to see if the
|
||||
hardware-supported DMA channel
|
||||
.Fa chan
|
||||
is available for use.
|
||||
.It Fn isa_dmacascade "ic" "chan"
|
||||
Programs the 8237 DMA controller channel
|
||||
.Fa chan
|
||||
to accept external DMA control by the device hardware.
|
||||
.It Fn isa_mappage "mem" "offset" "prot"
|
||||
Provides support for user
|
||||
.Xr mmap 2 'ing
|
||||
of DMA-safe memory.
|
||||
.El
|
||||
.Sh AUTOCONFIGURATION
|
||||
The ISA bus is an indirect-connection bus. During autoconfiguration
|
||||
each driver is required to probe the bus for the presence of a device.
|
||||
An ISA driver will receive a pointer to
|
||||
.Fa struct isa_attach_args
|
||||
hinting at "locations" on the ISA bus where the device may be located.
|
||||
They should use the
|
||||
.Em ia_iobase ,
|
||||
.Em ia_iosize ,
|
||||
.Em ia_maddr ,
|
||||
and
|
||||
.Em ia_msize
|
||||
members. Not all of these hints will be necessary; locators may
|
||||
be wildcarded with IOBASEUNK and MADDRUNK for
|
||||
.Em ia_iobase
|
||||
and
|
||||
.Em ia_maddr
|
||||
respectively. If a driver can probe the device for configuration
|
||||
information at default locations, it may update the members of
|
||||
.Fa struct isa_attach_args .
|
||||
The IRQ and DMA locators can also be wildcarded with IRQUNK and DRQUNK
|
||||
respectively.
|
||||
.Pp
|
||||
During the driver attach step, the I/O and memory address spaces
|
||||
should be mapped (see
|
||||
.Xr bus_space 9 ).
|
||||
.Sh DMA SUPPORT
|
||||
Extensive DMA facilities are provided for the ISA bus. A driver can
|
||||
use up to two DMA channels simultaneously. The DMA channels allocated
|
||||
during autoconfiguration are passed to the driver during the driver
|
||||
attach using the
|
||||
.Fa ia_drq
|
||||
and
|
||||
.Fa ia_drq2
|
||||
members of
|
||||
.Fa struct isa_attach_args .
|
||||
.Pp
|
||||
Before allocating resources for DMA transfers on the ISA bus, a driver
|
||||
should check the maximum allowable DMA transfer size for the DMA
|
||||
channel using
|
||||
.Fn isa_dmamaxsize .
|
||||
.Pp
|
||||
A DMA map should be created first using
|
||||
.Fn isa_dmamap_create .
|
||||
A DMA map describes how DMA memory is loaded into the DMA controllers.
|
||||
Only DMA-safe memory can be used for DMA transfers. DMA-safe memory
|
||||
is allocated using
|
||||
.Fn isa_dmamem_alloc .
|
||||
The memory allocated by
|
||||
.Fn isa_dmamem_alloc
|
||||
must now be mapped into kernel virtual address space by
|
||||
.Fn isa_dmamem_map
|
||||
so that it can be accessed by the driver.
|
||||
.Pp
|
||||
For a DMA transfer from the host to the device, the driver will fill
|
||||
the DMA memory with the data to be transferred. The DMA-transfer of
|
||||
the memory is started using
|
||||
.Fn isa_dmastart
|
||||
with
|
||||
.Fa flags
|
||||
containing DMAMODE_WRITE.
|
||||
When the DMA transfer is completed, a call to
|
||||
.Fn isa_dmadone
|
||||
cleans up the DMA transfer by unloading the memory from the
|
||||
controller.
|
||||
.Pp
|
||||
For a DMA transfer from the device to the host, the DMA-transfer is
|
||||
started using
|
||||
.Fn isa_dmastart
|
||||
with
|
||||
.Fa flags
|
||||
containing DMAMODE_READ.
|
||||
When the DMA transfer is completed, a call to
|
||||
.Fn isa_dmadone
|
||||
cleans up the DMA transfer by unloading the memory from the
|
||||
controller. The memory can now be access by the driver.
|
||||
.Pp
|
||||
When the DMA resources are no longer required they should be released
|
||||
using
|
||||
.Fn isa_dmamem_unmap ,
|
||||
.Fn isa_dmamem_free
|
||||
and
|
||||
.Fn isa_dmamap_destroy .
|
||||
.Sh CODE REFERENCES
|
||||
This section describes places within the
|
||||
.Nx
|
||||
source tree where actual code implementing or utilising the
|
||||
machine-independent ISA subsystem can be found. All pathnames are
|
||||
relative to
|
||||
.Pa /usr/src.
|
||||
.Pp
|
||||
The ISA subsystem itself is implemented within the files
|
||||
.Pa sys/dev/isa/isa.c
|
||||
and
|
||||
.Pa sys/dev/isa/isadma.c .
|
||||
.Sh SEE ALSO
|
||||
.Xr isa 4 ,
|
||||
.Xr autoconf 9 ,
|
||||
.Xr bus_dma 9 ,
|
||||
.Xr bus_space 9 ,
|
||||
.Xr driver 9 ,
|
||||
.Xr isapnp 9 .
|
||||
.Sh HISTORY
|
||||
The machine-independent
|
||||
.Nm
|
||||
subsystem appeared in
|
||||
.Nx 1.2 .
|
||||
.Sh BUGS
|
||||
The previous behaviour of
|
||||
.Fn isa_intr_establish
|
||||
was to invoke
|
||||
.Fn panic
|
||||
on failure.
|
||||
.Fn isa_intr_establish
|
||||
now returns NULL on failure. Some old drivers written for the former
|
||||
behaviour discard the return value.
|
251
share/man/man9/isapnp.9
Normal file
251
share/man/man9/isapnp.9
Normal file
@ -0,0 +1,251 @@
|
||||
.\" $NetBSD: isapnp.9,v 1.1 2001/07/01 04:11:14 gmcgarry Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" This code is derived from software contributed to The NetBSD Foundation
|
||||
.\" by Gregory McGarry.
|
||||
.\"
|
||||
.\" 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.
|
||||
.\" 3. All advertising materials mentioning features or use of this software
|
||||
.\" must display the following acknowledgement:
|
||||
.\" This product includes software developed by the NetBSD
|
||||
.\" Foundation, Inc. and its contributors.
|
||||
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
.\" contributors may be used to endorse or promote products derived
|
||||
.\" from this software without specific prior written permission.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
.\" ``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 FOUNDATION OR CONTRIBUTORS
|
||||
.\" 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.
|
||||
.\"
|
||||
.Dd June 19, 2001
|
||||
.Dt ISAPNP 9
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm ISAPNP ,
|
||||
.Nm isapnp_devmatch ,
|
||||
.Nm isapnp_config ,
|
||||
.Nm isapnp_unconfig
|
||||
.Nd Plug 'n' Play ISA bus
|
||||
.Sh SYNOPSIS
|
||||
.Fd #include <machine/bus.h>
|
||||
.Fd #include <dev/isa/isareg.h>
|
||||
.Fd #include <dev/isa/isavar.h>
|
||||
.Fd #include <dev/isapnp/isapnpreg.h>
|
||||
.Fd #include <dev/isapnp/isapnpvar.h>
|
||||
.Fd #include <dev/isapnp/isapnpdevs.h>
|
||||
.Ft int
|
||||
.Fn isapnp_devmatch "const struct isapnp_attach_args *ipa" \
|
||||
"const struct isapnp_devinfo *dinfo" "int *variant"
|
||||
.Ft int
|
||||
.Fn isapnp_config "bus_space_tag_t iot" "bus_space_tag_t memt" \
|
||||
"struct isapnp_attach_args *ipa"
|
||||
.Ft void
|
||||
.Fn isapnp_unconfig "bus_space_tag_t iot" "bus_space_tag_t memt" \
|
||||
"struct isapnp_attach_args *ipa"
|
||||
.Sh DESCRIPTION
|
||||
The machine-independent
|
||||
.Nm
|
||||
subsystem provides support for ISAPNP devices. ISAPNP devices were
|
||||
developed to support "plug and play" connection on the ISA bus. In
|
||||
all other aspects, the ISAPNP bus is same as the ISA bus (see
|
||||
.Xr ISA 9 ).
|
||||
.Pp
|
||||
Devices on the ISAPNP bus are uniquely identified by a 7-character
|
||||
string. Resources, such as I/O address space and interrupts, should
|
||||
be allocated to the devices by the machine firmware. On some machine
|
||||
the firmware seems doesn't work correctly and
|
||||
.Nx
|
||||
will attempt to allocate resources as necessary.
|
||||
.Sh DATA TYPES
|
||||
Drivers attached to the ISAPNP bus will make use of the following data
|
||||
types:
|
||||
.Bl -tag -width compact
|
||||
.It Fa struct isapnp_matchinfo
|
||||
.Nx
|
||||
kernel contains a database of known ISAPNP devices. Each entry in the
|
||||
database has a
|
||||
.Em struct isapnp_matchinfo .
|
||||
It contains the following members:
|
||||
.Bd -literal
|
||||
const char *name; /* device id string */
|
||||
int variant; /* variant flag */
|
||||
.Ed
|
||||
.It Fa struct isapnp_devinfo
|
||||
Defines the devices supported by a driver. It contains pointer to an
|
||||
array of supported
|
||||
.Em struct isapnp_matchinfo
|
||||
structures and a pointer to another array of compatibility devices.
|
||||
It contains the following members:
|
||||
.Bd -literal
|
||||
struct isapnp_matchinfo *devlogic;
|
||||
int nlogic;
|
||||
struct isapnp_matchinfo *devcompat;
|
||||
int ncompat;
|
||||
.Ed
|
||||
.It Fa struct isapnp_region
|
||||
Describes ISAPNP bus-space regions. It contains the following
|
||||
members:
|
||||
.Bd -literal
|
||||
bus_space_handle_t h;
|
||||
u_int32_t base;
|
||||
u_int32_t length;
|
||||
.Ed
|
||||
.It Fa struct isapnp_pin
|
||||
Describes the wiring of interrupts and DMA pins from the ISAPNP bus
|
||||
onto the host processor. It contains the following members:
|
||||
.Bd -literal
|
||||
u_int8_t num;
|
||||
u_int8_t flags:4;
|
||||
u_int8_t type:4;
|
||||
u_int16_t bits;
|
||||
.Ed
|
||||
.It Fa struct isapnp_attach_args
|
||||
A structure used to inform the driver of the device properties. It
|
||||
contains the following members:
|
||||
.Bd -literal
|
||||
bus_space_tag_t ipa_iot; /* isa i/o space tag */
|
||||
bus_space_tag_t ipa_memt; /* isa mem space tag */
|
||||
bus_dma_tag_t ipa_dmat; /* isa dma tag */
|
||||
isa_chipset_tag_t ipa_ic;
|
||||
struct isapnp_region ipa_io[ISAPNP_NUM_IO];
|
||||
struct isapnp_region ipa_mem[ISAPNP_NUM_MEM];
|
||||
struct isapnp_region ipa_mem32[ISAPNP_NUM_MEM32];
|
||||
struct isapnp_pin ipa_irq[ISAPNP_NUM_IRQ];
|
||||
struct isapnp_pin ipa_drq[ISAPNP_NUM_DRQ];
|
||||
.Ed
|
||||
.El
|
||||
.Sh FUNCTIONS
|
||||
.Bl -tag -width compact
|
||||
.It Fn isapnp_devmatch "ipa" "dinfo" "variant"
|
||||
Matches the device described by the attachment
|
||||
.Fa ipa
|
||||
with the device-match information in
|
||||
.Fa dinfo .
|
||||
If the device is matched,
|
||||
.Fn isapnp_devmatch
|
||||
returns a non-zero value and variant is the flag describing the device
|
||||
variant.
|
||||
.Fn isapnp_devmatch
|
||||
returns zero if the device is not found.
|
||||
.It Fn isapnp_config "iot" "memt" "ipa"
|
||||
Allocate device resources specified by
|
||||
.Fa ipa .
|
||||
The device is mapped into the I/O and memory bus spaces specified by
|
||||
bus-space tags
|
||||
.Fa iot
|
||||
and
|
||||
.Fa memt
|
||||
respectively. The
|
||||
.Fa ipa_io ,
|
||||
.Fa ipa_mem ,
|
||||
.Fa ipa_mem32 ,
|
||||
.Fa ipa_irq ,
|
||||
and
|
||||
.Fa ipa_drq
|
||||
members of
|
||||
.Fa ipa
|
||||
are updated to reflect the allocated and mapped resources.
|
||||
.Fn isapnp_config
|
||||
returns zero on success and non-zero on error.
|
||||
.It Fn isapnp_unconfig "iot" "memt" "ipa"
|
||||
Free the resources allocated by
|
||||
.Fn isapnp_config .
|
||||
.El
|
||||
.Sh AUTOCONFIGURATION
|
||||
During autoconfiguration, an ISAPNP driver will receive a pointer to
|
||||
.Fa struct isapnp_attach_args
|
||||
describing the device attached to the ISAPNP bus. Drivers match the
|
||||
device using
|
||||
.Fn ispnp_devmatch .
|
||||
.Pp
|
||||
During the driver attach step, driver should initially allocate and
|
||||
map resources using
|
||||
.Fn isapnp_config .
|
||||
The I/O (memory) bus-space resources can be accessed using the
|
||||
bus-space tag
|
||||
.Fa ipa_iot
|
||||
.Po
|
||||
.Fa ipa_memt
|
||||
.Pc
|
||||
and the bus-space handle
|
||||
.Fa ipa_io[0].h
|
||||
.Po
|
||||
.Fa ipa_mem[0].h
|
||||
.Pc
|
||||
members of
|
||||
.Fa ipa .
|
||||
.Pp
|
||||
Interrupts should be established using
|
||||
.Fn isa_intr_establish
|
||||
.Po
|
||||
see
|
||||
.Xr ISA 9
|
||||
.Pc
|
||||
with the IRQ specified by the
|
||||
.Fa ipa_irq[0].num
|
||||
member of
|
||||
.Fa ipa .
|
||||
Similarly, the standard
|
||||
.Xr ISA 9
|
||||
DMA interface should be used with the
|
||||
.Fa ipa_drq[0].num
|
||||
member of
|
||||
.Fa ipa .
|
||||
.Sh DMA SUPPORT
|
||||
Extensive DMA facilities are provided through the
|
||||
.Xr ISA 9
|
||||
DMA facilities.
|
||||
.Sh CODE REFERENCES
|
||||
This section describes places within the
|
||||
.Nx
|
||||
source tree where actual code implementing or utilising the
|
||||
machine-independent
|
||||
.Nm
|
||||
subsystem can be found. All pathnames are relative to
|
||||
.Pa /usr/src .
|
||||
.Pp
|
||||
The
|
||||
.Nm
|
||||
subsystem itself is implemented within the file
|
||||
.Pa sys/dev/isapnp/isapnp.c .
|
||||
The database of the known devices exists within the file
|
||||
.Pa sys/dev/isapnp/isapnpdevs.c
|
||||
and is generated automatically from the file
|
||||
.Pa sys/dev/isapnp/isapnpdevs .
|
||||
New devices should be added to this file. The database can be
|
||||
regenerated using the Makefile
|
||||
.Pa sys/dev/isapnp/Makefile.isapnpdevs .
|
||||
.Sh SEE ALSO
|
||||
.Rs
|
||||
.%T "Plug and Play ISA Specification V1.0a"
|
||||
.%D May 5 1994
|
||||
.Re
|
||||
.sp
|
||||
.Xr isa 4 ,
|
||||
.Xr isapnp 4 ,
|
||||
.Xr pnpbios 4 ,
|
||||
.Xr autoconf 9 ,
|
||||
.Xr bus_dma 9 ,
|
||||
.Xr bus_space 9 .
|
||||
.Xr driver 9 ,
|
||||
.Xr isa 9 .
|
||||
.Sh HISTORY
|
||||
The machine-independent ISAPNP subsystem appear in
|
||||
.Nx 1.3 .
|
112
share/man/man9/kthread.9
Normal file
112
share/man/man9/kthread.9
Normal file
@ -0,0 +1,112 @@
|
||||
.\" $NetBSD: kthread.9,v 1.1 2001/07/01 04:11:14 gmcgarry Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" This code is derived from software contributed to The NetBSD Foundation
|
||||
.\" by Gregory McGarry.
|
||||
.\"
|
||||
.\" 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.
|
||||
.\" 3. All advertising materials mentioning features or use of this software
|
||||
.\" must display the following acknowledgement:
|
||||
.\" This product includes software developed by the NetBSD
|
||||
.\" Foundation, Inc. and its contributors.
|
||||
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
.\" contributors may be used to endorse or promote products derived
|
||||
.\" from this software without specific prior written permission.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
.\" ``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 FOUNDATION OR CONTRIBUTORS
|
||||
.\" 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.
|
||||
.\"
|
||||
.Dd July 9, 2000
|
||||
.Dt KTHREAD 9
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm kthread_create1 ,
|
||||
.Nm kthread_exit ,
|
||||
.Nm kthread_create
|
||||
.Nd kernel threads
|
||||
.Sh SYNOPSIS
|
||||
.Fd #include <sys/kthread.h>
|
||||
.Ft void
|
||||
.Fn kthread_create "void (*func)(void)" "void *arg"
|
||||
.Ft void
|
||||
.Fn kthread_exit "int ecode"
|
||||
.Ft int
|
||||
.Fn kthread_create1 "void (*func)(void)" "void *arg" "struct proc **newpp" \
|
||||
"const char *fmt" "..."
|
||||
.Sh DESCRIPTION
|
||||
Kernel threads are light-weight processes which execute entirely
|
||||
within the kernel. Any process can request the creation of a new
|
||||
kernel thread. Kernel threads are not swapped out during memory
|
||||
congestion. The VM space and limits are shaed with proc0 (usually
|
||||
.Xr init 8 ).
|
||||
.Sh FUNCTIONS
|
||||
.Bl -tag -width compact
|
||||
.It Fn kthread_create1 "func" "arg" "newpp" "fmt" "..."
|
||||
Fork a kernel thread.
|
||||
.Fa newpp
|
||||
is a pointer the the new proc structure for the kernel thread.
|
||||
The function
|
||||
.Fa func
|
||||
is called with arguments
|
||||
.Fa arg
|
||||
to commence execution.
|
||||
.Fa fmt
|
||||
is a string containing format information used to display the kernel
|
||||
thread name.
|
||||
.It Fn kthread_create "void (*func)(void)" "void *arg"
|
||||
Register function
|
||||
.Fa func
|
||||
to defer creation of the kernel thread. Deferral of kernel thread
|
||||
creation is required during system startup when kernel thread resources
|
||||
are not available.
|
||||
.It Fn kthread_exit "int ecode"
|
||||
Exit from a kernel thread.
|
||||
.El
|
||||
.Sh RETURN VALUES
|
||||
Upon successful completion,
|
||||
.Fn kthread_create1
|
||||
returns 0. Otherwise, the following error values are returned:
|
||||
.Bl -tag -width [EAGAIN]
|
||||
.It Bq Er EAGAIN
|
||||
The limit on the total number of system processes would be exceeded.
|
||||
.It Bq Er EAGAIN
|
||||
The limit
|
||||
.Dv RLIMIT_NPROC
|
||||
on the total number of processes under execution by this
|
||||
user id would be exceeded.
|
||||
.El
|
||||
.Sh CODE REFERENCES
|
||||
This section describes places within the
|
||||
.Nx
|
||||
source tree where actual code implementing or utilising the kthread
|
||||
framework can be found. All pathnames are relative to
|
||||
.Pa /usr/src.
|
||||
.Pp
|
||||
The kthread framework itself is implemented within the file
|
||||
.Pa sys/kern/kern_kthread.c .
|
||||
Data structures and function prototypes for the framework are located in
|
||||
.Pa sys/sys/kthread.h .
|
||||
.Sh SEE ALSO
|
||||
.Xr fork1 9 ,
|
||||
.Xr driver 9 .
|
||||
.Sh HISTORY
|
||||
The kthread framework appeared in
|
||||
.Nx 1.4 .
|
@ -1,6 +1,6 @@
|
||||
# $NetBSD: Makefile,v 1.1 1998/10/01 02:33:50 jtk Exp $
|
||||
# $NetBSD: Makefile,v 1.2 2001/07/01 04:11:15 gmcgarry Exp $
|
||||
|
||||
MAN= bioscall.9
|
||||
MAN= bioscall.9 bios32_service.9
|
||||
MANSUBDIR=/i386
|
||||
|
||||
.include <bsd.man.mk>
|
||||
|
58
share/man/man9/man9.i386/bios32_service.9
Normal file
58
share/man/man9/man9.i386/bios32_service.9
Normal file
@ -0,0 +1,58 @@
|
||||
.\" $NetBSD: bios32_service.9,v 1.1 2001/07/01 04:11:14 gmcgarry Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" This code is derived from software contributed to The NetBSD Foundation
|
||||
.\" by Gregory McGarry.
|
||||
.\"
|
||||
.\" 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.
|
||||
.\" 3. All advertising materials mentioning features or use of this software
|
||||
.\" must display the following acknowledgement:
|
||||
.\" This product includes software developed by the NetBSD
|
||||
.\" Foundation, Inc. and its contributors.
|
||||
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
.\" contributors may be used to endorse or promote products derived
|
||||
.\" from this software without specific prior written permission.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
.\" ``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 FOUNDATION OR CONTRIBUTORS
|
||||
.\" 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.
|
||||
.\"
|
||||
.Dd June 17, 2001
|
||||
.Dt BIOS32_SERVICE 9 i386
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm bios32_service
|
||||
.Nd locate BIOS32 service
|
||||
.Sh SYNOPSIS
|
||||
.Fd #include <i386/bios32.h>
|
||||
.Ft int
|
||||
.Fn bios32_service "u_int32_t service " "bios32_entry_t e" \
|
||||
"bios32_entry_info_t ei"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Fn bios32_service
|
||||
function calls the BIOS32 to locate the specified BIOS32 service
|
||||
.Fa service
|
||||
and fills in the entry point information
|
||||
.Fa e
|
||||
and
|
||||
.Fa ei .
|
||||
.Sh SEE ALSO
|
||||
.Xr bioscall 9
|
460
share/man/man9/pci.9
Normal file
460
share/man/man9/pci.9
Normal file
@ -0,0 +1,460 @@
|
||||
.\" $NetBSD: pci.9,v 1.1 2001/07/01 04:11:14 gmcgarry Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" This code is derived from software contributed to The NetBSD Foundation
|
||||
.\" by Gregory McGarry.
|
||||
.\"
|
||||
.\" 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.
|
||||
.\" 3. All advertising materials mentioning features or use of this software
|
||||
.\" must display the following acknowledgement:
|
||||
.\" This product includes software developed by the NetBSD
|
||||
.\" Foundation, Inc. and its contributors.
|
||||
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
.\" contributors may be used to endorse or promote products derived
|
||||
.\" from this software without specific prior written permission.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
.\" ``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 FOUNDATION OR CONTRIBUTORS
|
||||
.\" 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.
|
||||
.\"
|
||||
.Dd June 19, 2001
|
||||
.Dt PCI 9
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm PCI ,
|
||||
.Nm pci_conf_read ,
|
||||
.Nm pci_conf_write ,
|
||||
.Nm pci_conf_print ,
|
||||
.Nm pci_get_capability ,
|
||||
.Nm pci_mapreg_type ,
|
||||
.Nm pci_mapreg_map ,
|
||||
.Nm pci_mapreg_info ,
|
||||
.Nm pci_intr_map ,
|
||||
.Nm pci_intr_string ,
|
||||
.Nm pci_intr_evcnt ,
|
||||
.Nm pci_intr_establish ,
|
||||
.Nm pci_intr_disestablish ,
|
||||
.Nm pci_make_tag ,
|
||||
.Nm pci_decompose_tag ,
|
||||
.Nm pci_findvendor ,
|
||||
.Nm pci_devinfo ,
|
||||
.Nm PCI_VENDOR ,
|
||||
.Nm PCI_PRODUCT ,
|
||||
.Nm PCI_REVISION
|
||||
.Nd Peripheral Component Interconnect
|
||||
.Sh SYNOPSIS
|
||||
.Fd #include <machine/bus.h>
|
||||
.Fd #include <dev/pci/pcivar.h>
|
||||
.Fd #include <dev/pci/pcireg.h>
|
||||
.Fd #include <dev/pci/pcidevs.h>
|
||||
.Ft pcireg_t
|
||||
.Fn pci_conf_read "pci_chipset_tag_t pc" "pcitag_t tag" "int reg"
|
||||
.Ft void
|
||||
.Fn pci_conf_write "pci_chipset_tag_t pc" "pcitag_t tag" "int reg" \
|
||||
"pcireg_t val"
|
||||
.Ft void
|
||||
.Fn pci_conf_print "pci_chipset_tag_t pc" "pcitag_t tag" \
|
||||
"void (*func)(pci_chipset_tag_t, pcitag_t, const pcireg_t *)"
|
||||
.Ft int
|
||||
.Fn pci_get_capability "pci_chipset_tag_t pc" "pcitag_t tag" \
|
||||
"int capid" "int *offsetp" "pcireg_t *valuep"
|
||||
.Ft pcireg_t
|
||||
.Fn pci_mapreg_type "pci_chipset_tag_t pc" "pcitag_t tag" "int reg"
|
||||
.Ft int
|
||||
.Fn pci_mapreg_map "struct pci_attach_args *pa" "int reg" \
|
||||
"pcireg_t type" "int busflags" "bus_space_tag_t *tagp" \
|
||||
"bus_space_handle_t *handlep" "bus_addr_t *basep" "bus_size_t *sizep"
|
||||
.Ft int
|
||||
.Fn pci_mapreg_info "pci_chipset_tag_t pc" "pcitag_t tag" "int reg" \
|
||||
"pcireg_t type" "bus_addr_t *basep" "bus_size_t *sizep" "int *flagsp"
|
||||
.Ft int
|
||||
.Fn pci_intr_map "struct pci_attach_args *pa" "pci_intr_handle_t *ih"
|
||||
.Ft const char *
|
||||
.Fn pci_intr_string "pci_chipset_tag_t pc" "pci_intr_handle_t ih"
|
||||
.Ft const struct evcnt *
|
||||
.Fn pci_intr_evcnt "pci_chipset_tag_t pc" "pci_intr_handle_t ih"
|
||||
.Ft void *
|
||||
.Fn pci_intr_establish "pci_chipset_tag_t pc" "pci_intr_handle_t ih" \
|
||||
"int level" "int (*handler)(void *)" "void *arg"
|
||||
.Ft void
|
||||
.Fn pci_intr_disestablish "pci_chipset_tag_t pc" "void *ih"
|
||||
.Ft pcitag_t
|
||||
.Fn pci_make_tag "pci_chipset_tag_t pc" "int bus" "int device" \
|
||||
"int function"
|
||||
.Ft void
|
||||
.Fn pci_decompose_tag "pci_chipset_tag_t pc" "pcitag_t tag" \
|
||||
"int *busp" "int *devicep" "int *functionp"
|
||||
.Ft char *
|
||||
.Fn pci_findvendor "pcireg_t id"
|
||||
.Ft void
|
||||
.Fn pci_devinfo "pcireg_t id" "pcireg_t class" "int show" "char *cp"
|
||||
.Ft int
|
||||
.Fn PCI_VENDOR "pcireg_t id"
|
||||
.Ft int
|
||||
.Fn PCI_PRODUCT "pcireg_t id"
|
||||
.Ft int
|
||||
.Fn PCI_REVISION "pcireg_t id"
|
||||
.Sh DESCRIPTION
|
||||
The machine-independent
|
||||
.Nm
|
||||
subsystem provides support for PCI devices.
|
||||
.Pp
|
||||
The PCI bus was initially developed by Intel in the early 1990's to
|
||||
replace the ISA bus for interfacing to their Pentium processor. The
|
||||
PCI specification is widely regarded as well designed, and the PCI bus
|
||||
has found widespread acceptable in machines ranging from Apple's
|
||||
PowerPC-based machines to Sun's UltraSPARC-based machines.
|
||||
.Pp
|
||||
The PCI bus a multiplexed bus, allowing addresses and data on the same
|
||||
pins for a reduced number of pins. Data transfers can be 8-bit,
|
||||
16-bit or 32-bit. A 64-bit extended PCI bus is also defined.
|
||||
Multi-byte transfers are little-endian. The PCI bus operates up to
|
||||
33MHz and any device on the bus can be the bus master.
|
||||
.Pp
|
||||
AGP is a version of PCI optimised for high-throughput data rates,
|
||||
particularly for accelerated frame buffers.
|
||||
.Pp
|
||||
The PCI bus is a "plug and play" bus, in the sense that devices can be
|
||||
configured dynamically by software. The PCI interface chip on a PCI
|
||||
device bus presents a small window of registers into the PCI
|
||||
configuration space. These registers contain information about the
|
||||
device such as the vendor and a product ID. The configuration
|
||||
registers can also be written to by software to alter how the device
|
||||
interfaces to the PCI bus. An important register in the configuration
|
||||
space is the Base Address Register (BAR). The BAR is written by
|
||||
software to map the device registers into a window of processor
|
||||
address space. Once this mapping is done, the device registers can be
|
||||
accessed relative to the base address.
|
||||
.Sh DATA TYPES
|
||||
Drivers for devices attached to the
|
||||
.Nm
|
||||
will make use of the following data types:
|
||||
.Bl -tag -width compact
|
||||
.It Fa pcireg_t
|
||||
Configuration space register.
|
||||
.It Fa pci_chipset_tag_t
|
||||
Chipset tag for the PCI bus.
|
||||
.It Fa pcitag_t
|
||||
Configuration tag describing the location and function of the PCI
|
||||
device. It contains the tuple
|
||||
.Ao
|
||||
bus, device, function
|
||||
.Ac .
|
||||
.It Fa pci_intr_handle_t
|
||||
The opaque handle describing an established interrupt handler.
|
||||
.It Fa struct pci_attach_args
|
||||
Devices have their identity recorded in this structure. it contains
|
||||
the following members:
|
||||
.Bd -literal
|
||||
bus_space_tag_t pa_iot; /* pci i/o space tag */
|
||||
bus_space_tag_t pa_memt; /* pci mem space tag */
|
||||
bus_dma_tag_t pa_dmat; /* DMA tag */
|
||||
pci_chipset_tag_t pa_pc;
|
||||
int pa_flags; /* flags */
|
||||
pcitag_t pa_tag;
|
||||
pcireg_t pa_id;
|
||||
pcireg_t pa_class;
|
||||
.Ed
|
||||
.El
|
||||
.Sh FUNCTIONS
|
||||
.Bl -tag -width compact
|
||||
.It Fn pci_conf_read "pc" "tag" "reg"
|
||||
Read from register
|
||||
.Fa reg
|
||||
in PCI configuration space. The argument
|
||||
.Fa tag
|
||||
is the PCI tag for the current device attached to PCI chipset
|
||||
.Fa pc .
|
||||
.It Fn pci_conf_write "pc" "tag" "reg" "val"
|
||||
Write to register
|
||||
.Fa reg
|
||||
in PCI configuration space. The argument
|
||||
.Fa tag
|
||||
is the PCI tag for the current device attached to PCI chipset
|
||||
.Fa pc .
|
||||
.It Fn pci_conf_print "pc" "tag" "func"
|
||||
Print out most of the registers in the PCI configuration for the
|
||||
device. The argument
|
||||
.Fa tag
|
||||
is the PCI tag for the current device attached to PCI chipset
|
||||
.Fa pc .
|
||||
The argument
|
||||
.Fa func
|
||||
is a function called by
|
||||
.Fn pci_conf_print
|
||||
to print the device-dependent registers. This function is only useful
|
||||
for driver development and is usually wrapped in pre-processor
|
||||
declarations.
|
||||
.It Fn pci_get_capability "pc" "tag" "capid" "offsetp" "valuep"
|
||||
Parse the device capability list in configuration space looking for
|
||||
capability
|
||||
.Fa capid .
|
||||
If
|
||||
.Fa offsetp
|
||||
is not NULL, the register offset in configuration space is returned in
|
||||
.Fa offsetp.
|
||||
If
|
||||
.Fa valuep
|
||||
is not NULL, the value of the capability is returned in
|
||||
.Fa valuep .
|
||||
The argument
|
||||
.Fa tag
|
||||
is the PCI tag for the current device attached to PCI chipset
|
||||
.Fa pc .
|
||||
This function returns 1 if the capability was found. If the
|
||||
capability was not found, it returns zero, and
|
||||
.Fa offsetp
|
||||
and
|
||||
.Fa valuep
|
||||
remain unchanged.
|
||||
.It Fn pci_mapreg_type "pc" "tag" "reg"
|
||||
Interrogates the Base Address Register (BAR) in configuration space
|
||||
specified by
|
||||
.Fa reg
|
||||
and returns the default (or current) mapping type. Valid returns
|
||||
values are:
|
||||
.Bl -tag -width compact
|
||||
.It PCI_MAPREG_TYPE_IO
|
||||
The mapping is to I/O address space.
|
||||
.It PCI_MAPREG_TYPE_MEM
|
||||
The mapping is to memory address space.
|
||||
.It PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_64BIT
|
||||
The mapping is to 64-bit memory address space.
|
||||
.It PCI_MAPREG_TYPE_ROM
|
||||
The mapping is to ROM.
|
||||
.El
|
||||
.sp
|
||||
The argument
|
||||
.Fa tag
|
||||
is the PCI tag for the current device attached to PCI chipset
|
||||
.Fa pc .
|
||||
.It Fo pci_mapreg_map
|
||||
.Fa "pa" "reg" "type" "busflags" "tagp" "handlep"
|
||||
.Fa "basep" "sizep"
|
||||
.Fc
|
||||
Maps the register windows for the device into kernel virtual address
|
||||
space. This function is generally only called during the driver
|
||||
attach step and takes a pointer to the
|
||||
.Em struct pci_attach_args
|
||||
in
|
||||
.Fa pa .
|
||||
The physical address of the mapping is in the Base Address Register
|
||||
(BAR) in configuration space specified by
|
||||
.Fa reg .
|
||||
Valid values for the type of mapping
|
||||
.Fa type
|
||||
are:
|
||||
.Bl -tag -width compact
|
||||
.It PCI_MAPREG_TYPE_IO
|
||||
The mapping should be to I/O address space.
|
||||
.It PCI_MAPREG_TYPE_MEM
|
||||
The mapping should be to memory address space.
|
||||
.It PCI_MAPREG_TYPE_ROM
|
||||
The mapping is to access ROM.
|
||||
.El
|
||||
.sp
|
||||
The argument
|
||||
.Fa busflags
|
||||
are bus-space flags passed to
|
||||
.Fn bus_space_map
|
||||
to perform the mapping (see
|
||||
.Xr bus_space 9 ).
|
||||
The bus-space tag and handle for the mapped register window are
|
||||
returned in
|
||||
.Fa tagp
|
||||
and
|
||||
.Fa handlep
|
||||
respectively. The bus-address and size of the mapping are returned in
|
||||
.Fa basep
|
||||
and
|
||||
.Fa sizep
|
||||
respectively. If any of
|
||||
.Fa tagp ,
|
||||
.Fa handlep ,
|
||||
.Fa basep ,
|
||||
or
|
||||
.Fa sizep
|
||||
are NULL then
|
||||
.Fn pci_mapreg_map
|
||||
does not define their return value. This function returns zero on
|
||||
success and non-zero on error.
|
||||
.It Fn pci_mapreg_info "pc" "tag" "reg" "type" "basep" "sizep" "flagsp"
|
||||
Performs the same operations as
|
||||
.Fn pci_mapreg_map
|
||||
but doesn't actually map the register window into kernel virtual
|
||||
address space. Returns the bus-address, size and bus flags in
|
||||
.Fa basep ,
|
||||
.Fa sizep
|
||||
and
|
||||
.Fa flagsp
|
||||
respectively. These return values can be used by
|
||||
.Fn bus_space_map
|
||||
to actually map the register window into kernel virtual address space.
|
||||
This function is useful for setting up the registers in configuration
|
||||
space and deferring the mapping to a later time, such as in a
|
||||
bus-independent attachment routine.
|
||||
.Fa pci_mapreg_info
|
||||
returns zero on success and non-zero on failure.
|
||||
.It Fn pci_intr_map "pa" "ih"
|
||||
See
|
||||
.Xr pci_intr 9 .
|
||||
.It Fn pci_intr_string "pc" "ih"
|
||||
See
|
||||
.Xr pci_intr 9 .
|
||||
.It Fn pci_intr_evcnt "pc" "ih"
|
||||
See
|
||||
.Xr pci_intr 9 .
|
||||
.It Fn pci_intr_establish "pc" "ih" "level" "handler" "arg"
|
||||
See
|
||||
.Xr pci_intr 9 .
|
||||
.It Fn pci_intr_disestablish "pc" "ih"
|
||||
See
|
||||
.Xr pci_intr 9 .
|
||||
.It Fn pci_make_tag "pc" "bus" "device" "function"
|
||||
Create a new PCI tag for the PCI device specified by the tuple
|
||||
.Ao
|
||||
bus, device, function
|
||||
.Ac .
|
||||
This function is not useful to the usual PCI device driver. It is
|
||||
generally used by drivers of multi-function devices when attaching
|
||||
other PCI device drivers to each function.
|
||||
.It Fn pci_decompose_tag "pc" "tag" "busp" "devicep" "fnp"
|
||||
Decompose the PCI tag
|
||||
.Fa tag
|
||||
generated by
|
||||
.Fn pci_make_tag
|
||||
into its
|
||||
.Ao
|
||||
bus, device, function
|
||||
.Ac
|
||||
tuple.
|
||||
.It Fn pci_findvendor "id"
|
||||
Return the string of the vendor name for the device specified by
|
||||
.Fa id .
|
||||
.It Fn pci_devinfo "id" "class" "show" "cp"
|
||||
Returns the description string from the in-kernel PCI database for the
|
||||
device described by
|
||||
.Fa id
|
||||
and
|
||||
.Fa class .
|
||||
The description string is returned in
|
||||
.Fa cp .
|
||||
The argument
|
||||
.Fa show
|
||||
specifies whether the PCI subsystem should report the string to the
|
||||
console.
|
||||
.It Fn PCI_VENDOR "id"
|
||||
Return the PCI vendor id for device
|
||||
.Fa id .
|
||||
.It Fn PCI_PRODUCT "id"
|
||||
Return the PCI product id for device
|
||||
.Fa id .
|
||||
.It Fn PCI_REVISION "id"
|
||||
Return the PCI product revision for device
|
||||
.Fa id .
|
||||
.El
|
||||
.Sh AUTOCONFIGURATION
|
||||
During autoconfiguration, a
|
||||
.Nm
|
||||
driver will receive a pointer to
|
||||
.Fa struct pci_attach_args
|
||||
describing the device attaches to the PCI bus. Drivers match the
|
||||
device using the
|
||||
.Fa pa_id
|
||||
member using
|
||||
.Fn PCI_VENDOR .
|
||||
.Fn PCI_PRODUCT
|
||||
and
|
||||
.Fn PCI_REVISION .
|
||||
.Pp
|
||||
During the driver attach step, drivers can read the device
|
||||
configuration space using
|
||||
.Fn pci_conf_read .
|
||||
The meaning attached to registers in the PCI configuration space are
|
||||
device-dependent, but will usually contain physical addresses of the
|
||||
device register windows. Device options can also be stored into the
|
||||
PCI configuration space using
|
||||
.Fn pci_conf_write .
|
||||
For example, the driver can request support for bus-mastering DMA by
|
||||
writing the option to the PCI configuration space.
|
||||
.Pp
|
||||
Device capabilities can be queried using
|
||||
.Fn pci_get_capability ,
|
||||
and returns device-specific information which can be found in the PCI
|
||||
configuration space to alter device operation.
|
||||
.Pp
|
||||
After reading the physical addresses of the device register windows
|
||||
from configuration space, these windows must be mapped into kernel
|
||||
virtual address space using
|
||||
.Fn pci_mapreg_map .
|
||||
Device registers can now be accessed using the standard bus-space API
|
||||
(see
|
||||
.Xr bus_space 9 ).
|
||||
.Pp
|
||||
Details of using PCI interrupts is described in
|
||||
.Xr pci_intr 9 .
|
||||
.Sh DMA SUPPORT
|
||||
The PCI bus supports bus-mastering operations from any device on the
|
||||
bus. The DMA facilities are accessed through the standard
|
||||
.Xr bus_dma 9
|
||||
interface. To support DMA transfers from the device to the host, it
|
||||
is necessary to enable bus-mastering in the PCI configuration space
|
||||
for the device.
|
||||
.Pp
|
||||
During system shutdown, it is necessary to abort any DMA transfers in
|
||||
progress by registering a shutdown hook (see
|
||||
.Xr shutdownhook_establish 9 ).
|
||||
.Sh CODE REFERENCES
|
||||
This section describes places within the
|
||||
.Nx
|
||||
source tree where actual code implementing or utilising the
|
||||
machine-independent PCI subsystem can be found. All pathnames are
|
||||
relative to
|
||||
.Pa /usr/src.
|
||||
.Pp
|
||||
The PCI subsystem itself is implemented within the files
|
||||
.Pa sys/dev/pci/pci.c ,
|
||||
.Pa sys/dev/pci/pci_subr.c ,
|
||||
.Pa sys/dev/pci/pci_map.c ,
|
||||
.Pa sys/dev/pci/pci_quirks.c ,
|
||||
and
|
||||
.Pa sys/dev/pci/pciconf.c .
|
||||
Machine-dependent portions are implemented within the file
|
||||
.Pa sys/arch/<arch>/pci/pci_machdep.c .
|
||||
.Pp
|
||||
The database of known devices exists within the file
|
||||
.Pa sys/dev/pci/pcidevs_data.h
|
||||
and is generated automatically from the file
|
||||
.Pa sys/dev/pci/pcidevs .
|
||||
New vendor and product identifiers should be added to this
|
||||
file. The database can be regenerated using the Makefile
|
||||
.Pa sys/dev/pci/Makefile.pcidevs .
|
||||
.Sh SEE ALSO
|
||||
.Xr pci 4 ,
|
||||
.Xr autoconf 9 ,
|
||||
.Xr bus_dma 9 ,
|
||||
.Xr bus_space 9 ,
|
||||
.Xr driver 9 ,
|
||||
.Xr pci_configure_bus 9 ,
|
||||
.Xr pci_intr 9 ,
|
||||
.Xr shutdownhook_establish 9 .
|
||||
.Sh HISTORY
|
||||
The machine-independent PCI subsystem appeared in
|
||||
.Nx 1.2 .
|
443
share/man/man9/pcmcia.9
Normal file
443
share/man/man9/pcmcia.9
Normal file
@ -0,0 +1,443 @@
|
||||
.\" $NetBSD: pcmcia.9,v 1.1 2001/07/01 04:11:14 gmcgarry Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" This code is derived from software contributed to The NetBSD Foundation
|
||||
.\" by Gregory McGarry.
|
||||
.\"
|
||||
.\" 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.
|
||||
.\" 3. All advertising materials mentioning features or use of this software
|
||||
.\" must display the following acknowledgement:
|
||||
.\" This product includes software developed by the NetBSD
|
||||
.\" Foundation, Inc. and its contributors.
|
||||
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
.\" contributors may be used to endorse or promote products derived
|
||||
.\" from this software without specific prior written permission.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
.\" ``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 FOUNDATION OR CONTRIBUTORS
|
||||
.\" 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.
|
||||
.\"
|
||||
.Dd June 4, 2001
|
||||
.Dt PCMCIA 9
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm PCMCIA
|
||||
.Nm pcmcia_function_init ,
|
||||
.Nm pcmcia_function_enable ,
|
||||
.Nm pcmcia_function_disable ,
|
||||
.Nm pcmcia_io_alloc ,
|
||||
.Nm pcmcia_io_free ,
|
||||
.Nm pcmcia_io_map ,
|
||||
.Nm pcmcia_io_unmap ,
|
||||
.Nm pcmcia_mem_alloc ,
|
||||
.Nm pcmcia_mem_free ,
|
||||
.Nm pcmcia_mem_map ,
|
||||
.Nm pcmcia_mem_unmap ,
|
||||
.Nm pcmcia_intr_establish ,
|
||||
.Nm pcmcia_intr_disestablish ,
|
||||
.Nm pcmcia_cis_read_1 ,
|
||||
.Nm pcmcia_cis_read_2 ,
|
||||
.Nm pcmcia_cis_read_3 ,
|
||||
.Nm pcmcia_cis_read_4 ,
|
||||
.Nm pcmcia_cis_read_n ,
|
||||
.Nm pcmcia_scan_cis
|
||||
.Nd support for PC-Card devices
|
||||
.Sh SYNOPSIS
|
||||
.Fd #include <machine/bus.h>
|
||||
.Fd #include <dev/pcmcia/pcmciareg.h>
|
||||
.Fd #include <dev/pcmcia/pcmciavar.h>
|
||||
.Fd #include <dev/pcmcia/pcmciadevs.h>
|
||||
.Ft void
|
||||
.Fn pcmcia_function_init "struct pcmcia_function *pf" \
|
||||
"struct pcmcia_config_entry *cfe"
|
||||
.Ft int
|
||||
.Fn pcmcia_function_enable "struct pcmcia_function *pf"
|
||||
.Ft void
|
||||
.Fn pcmcia_function_disable "struct pcmcia_function *pf"
|
||||
.Ft int
|
||||
.Fn pcmcia_io_alloc "struct pcmcia_function *pf" "bus_addr_t start" \
|
||||
"bus_size_t size" "bus_size_t align" "struct pcmcia_io_handle *pciop"
|
||||
.Ft void
|
||||
.Fn pcmcia_io_free "struct pcmcia_function *pf" \
|
||||
"struct pcmcia_io_handle *pcihp"
|
||||
.Ft int
|
||||
.Fn pcmcia_io_map "struct pcmcia_function *pf" "int width" \
|
||||
"bus_addr_t offset" "bus_size_t size" "struct pcmcia_io_handle *pcihp" \
|
||||
"int *windowp"
|
||||
.Ft void
|
||||
.Fn pcmcia_io_unmap "struct pcmcia_function *pf" "int window"
|
||||
.Ft int
|
||||
.Fn pcmcia_mem_alloc "struct pcmcia_function *pf" "bus_size_t size" \
|
||||
"struct pcmcia_mem_handle *pcmhp"
|
||||
.Ft void
|
||||
.Fn pcmcia_mem_free "struct pcmcia_function *pf" \
|
||||
"struct pcmcia_mem_handle *pcmhp"
|
||||
.Ft int
|
||||
.Fn pcmcia_mem_map "struct pcmcia_function *pf" "int width" \
|
||||
"bus_addr_t card_addr" "bus_size_t size" "struct pcmcia_mem_handle *pcmhp" \
|
||||
"bus_addr_t *offsetp" "int *windowp"
|
||||
.Ft void
|
||||
.Fn pcmcia_mem_unmap "struct pcmcia_function *pf" "int window"
|
||||
.Ft void *
|
||||
.Fn pcmcia_intr_establish "struct pcmcia_function *pf" "int level" \
|
||||
"int (*handler)(void *)" "void *arg"
|
||||
.Ft void
|
||||
.Fn pcmcia_intr_disestablish "struct pcmcia_function *pf" "void *ih"
|
||||
.Ft u_int8_t
|
||||
.Fn pcmcia_cis_read_1 "struct pcmcia_tuple *tuple" "int index"
|
||||
.Ft u_int16_t
|
||||
.Fn pcmcia_cis_read_2 "struct pcmcia_tuple *tuple" "int index"
|
||||
.Ft u_int32_t
|
||||
.Fn pcmcia_cis_read_3 "struct pcmcia_tuple *tuple" "int index"
|
||||
.Ft u_int32_t
|
||||
.Fn pcmcia_cis_read_4 "struct pcmcia_tuple *tuple" "int index"
|
||||
.Ft u_int32_t
|
||||
.Fn pcmcia_cis_read_n "struct pcmcia_tuple *tuple" "int number" "int index"
|
||||
.Ft int
|
||||
.Fn pcmcia_scan_cis "struct device *dev" \
|
||||
"int (*func)(struct pcmcia_tuple *, void *)" "void *arg";
|
||||
.Sh DESCRIPTION
|
||||
The machine-independent
|
||||
.Nm
|
||||
subsystem provides support for PC-Card devices defined by the Personal
|
||||
Computer Memory Card International Assocation (PCMCIA). The
|
||||
.Nn
|
||||
bus supports insertion and removal of cards while a system is
|
||||
powered-on (ie, dynamic reconfiguration). The socket must be
|
||||
powered-off when a card is not present. To the user, this appears as
|
||||
though the socket is "hot" during insertion and removal events.
|
||||
.Pp
|
||||
A PCMCIA controller interfaces the PCMCIA bus with the ISA or PCI
|
||||
busses on the host system. The controller is responsible for
|
||||
detecting and enabling devices and for allocating and mapping
|
||||
resources such as memory and interrupts to devices on the
|
||||
PCMCIA bus.
|
||||
.Pp
|
||||
Each device has a table called the Card Information Structure (CIS)
|
||||
which contains configuration information. The tuples in the CIS are
|
||||
used by the controller to uniquely identify the device. Additional
|
||||
information may be present in the CIS, such as the ethernet MAC
|
||||
address, that can be accessed and utilised within a device driver.
|
||||
.Pp
|
||||
Devices on the PCMCIA bus are uniquely identified by a 32-bit
|
||||
manufacturer ID and a 32-bit product ID. Additionally, devices can
|
||||
perform multiple functions (such a ethernet and modem) and these
|
||||
functions are identified by a function ID.
|
||||
.Pp
|
||||
PCMCIA devices do not support DMA, however memory on the device can be
|
||||
mapped into the address space of the host.
|
||||
.Sh DATA TYPES
|
||||
Drivers attached to the
|
||||
.Nm
|
||||
bus will make use of the following data types:
|
||||
.Bl -tag -width compact
|
||||
.It Fa struct pcmcia_card
|
||||
Devices (cards) have their identity recorded in this structure. It
|
||||
contains the following members:
|
||||
.Bd -literal
|
||||
char *cis1_info[4];
|
||||
int32_t manufacturer;
|
||||
int32_t product;
|
||||
u_int16_t error;
|
||||
SIMPLEQ_HEAD(, pcmcia_function) pf_head;
|
||||
.Ed
|
||||
.It Fa struct pcmcia_function
|
||||
Identifies the function of the devices. A device can have multiple
|
||||
functions. Consider it an opaque type for identifying a particular
|
||||
function of a device.
|
||||
.It struct pcmcia_config_entry
|
||||
Contains information about the resources requested by the device.
|
||||
It contains the following members:
|
||||
.Bd -literal
|
||||
int number;
|
||||
u_int32_t flags;
|
||||
int iftype;
|
||||
int num_iospace;
|
||||
u_long iomask;
|
||||
struct {
|
||||
u_long length;
|
||||
u_long start;
|
||||
} iospace[4];
|
||||
u_int16_t irqmask;
|
||||
int num_memspace;
|
||||
struct {
|
||||
u_long length;
|
||||
u_long cardaddr;
|
||||
u_long hostaddr;
|
||||
} memspace[2];
|
||||
int maxtwins;
|
||||
SIMPLEQ_ENTRY(pcmcia_config_entry) cfe_list;
|
||||
.Ed
|
||||
.It Fa struct pcmcia_tuple
|
||||
A handle for identifying an entry in the CIS.
|
||||
.It Fa struct pcmcia_io_handle
|
||||
A handle for mapping and allocating I/O address spaces. It contains
|
||||
the tag and handle for accessing the bus-space.
|
||||
.It Fa struct pcmcia_mem_handle
|
||||
A handle for mapping and allocating memory address spaces. It contains
|
||||
the tag and handle for accessing the bus-space.
|
||||
.It Fa struct pcmcia_attach_args
|
||||
A structure used to inform the driver of the
|
||||
device properties. It contains the following members:
|
||||
.Bd -literal
|
||||
int32_t manufacturer;
|
||||
int32_t product;
|
||||
struct pcmcia_card *card;
|
||||
struct pcmcia_function *pf;
|
||||
.Ed
|
||||
.El
|
||||
.Sh FUNCTIONS
|
||||
.Bl -tag -width compact
|
||||
.It Fn pcmcia_function_init "pf" "cfe"
|
||||
Initialise the machine-independent
|
||||
.Nm
|
||||
state with the config entry
|
||||
.Fa cfe .
|
||||
.It Fn pcmcia_function_enable "pf"
|
||||
Provide power to the socket containing the device specified by
|
||||
device function
|
||||
.Fa pf .
|
||||
.It Fn pcmcia_function_disable "pf"
|
||||
Remove power from the socket containing the device specified by
|
||||
device function
|
||||
.Fa pf .
|
||||
.It Fn pcmcia_io_alloc "pf" "start" "size" "align" "pciop"
|
||||
Request I/O space for device function
|
||||
.Fa pf
|
||||
at address
|
||||
.Fa start
|
||||
of size
|
||||
.Fa size .
|
||||
Alignment is specified by
|
||||
.Fa align .
|
||||
A handle for the I/O space is returned in
|
||||
.Fa pciop .
|
||||
.It Fn pcmcia_io_free "pf" "pcihp"
|
||||
Release I/O space with handle
|
||||
.Fa pcihp
|
||||
for device function
|
||||
.Fa pf .
|
||||
.It Fn pcmcia_io_map "pf" "width" "offset" "size" "pcihp" "windowp"
|
||||
Map device I/O for device function
|
||||
.Fa pf
|
||||
to the I/O space with handle
|
||||
.Fa pcihp .
|
||||
An I/O window of size
|
||||
.Fa size
|
||||
is mapped at offset
|
||||
.Fa offset
|
||||
in the chipset I/O window. The width of data access is specified by
|
||||
.Fa width .
|
||||
Valid values for the width are:
|
||||
.Bl -tag -width PCMCIA_WIDTH_AUTO
|
||||
.It PCMCIA_WIDTH_AUTO
|
||||
Use the largest I/O width reported by the device.
|
||||
.It PCMCIA_WIDTH_IO8
|
||||
Force 8-bit I/O width.
|
||||
.It PCMCIA_WIDTH_IO16
|
||||
Force 16-bit I/O width.
|
||||
.El
|
||||
.sp
|
||||
A handle for the mapped I/O window is returned in
|
||||
.Fa windowp .
|
||||
.It Fn pcmcia_io_unmap "pf" "window"
|
||||
Unmap the I/O window
|
||||
.Fa window
|
||||
for device function
|
||||
.Fa pf .
|
||||
.It Fn pcmcia_mem_alloc "pf" "size" "pcmhp"
|
||||
Request memory space for device function
|
||||
.Fa pf
|
||||
of size
|
||||
.Fa size .
|
||||
A handle for the memory space is returned in
|
||||
.Fa pcmhp .
|
||||
.It Fn pcmcia_mem_free "pf" "pcmhp"
|
||||
Release memory space with handle
|
||||
.Fa pcmhp
|
||||
for device function
|
||||
.Fa pf .
|
||||
.It Fn pcmcia_mem_map "pf" "width" "card_addr" "size" "pcmhp" "offsetp" \
|
||||
"windowp"
|
||||
Map device memory for device function
|
||||
.Fa pf
|
||||
to the memory space with handle
|
||||
.Fa pcmhp .
|
||||
The address of the device memory starts at
|
||||
.Fa card_addr
|
||||
and is size
|
||||
.Fa size .
|
||||
The width of data access is specified by
|
||||
.Fa width .
|
||||
Valid values for the width are:
|
||||
.Bl -tag -width PCMCIA_WIDTH_MEM16
|
||||
.It PCMCIA_WIDTH_MEM8
|
||||
Force 8-bit memory width.
|
||||
.It PCMCIA_WIDTH_MEM16
|
||||
Force 16-bit memory width.
|
||||
.El
|
||||
.sp
|
||||
A handle for the mapped memory window is returned in
|
||||
.Fa windowp
|
||||
and a bus-space handle for the memory window is returned in
|
||||
.Fa offsetp .
|
||||
.It Fn pcmcia_mem_unmap "pf" "window"
|
||||
Unmap the memory window
|
||||
.Fa window
|
||||
for device function
|
||||
.Fa pf .
|
||||
.It Fn pcmcia_intr_establish "pf" "level" "handler" "arg"
|
||||
Establish an interrupt handler for device function
|
||||
.Fa pf .
|
||||
The priority of the interrupt is specified by
|
||||
.Fa level .
|
||||
When the interrupt occurs the function
|
||||
.Fa handler
|
||||
is called with argument
|
||||
.Fa arg .
|
||||
The return value is a handle for the interrupt handler.
|
||||
.Fn pcmcia_intr_establish
|
||||
returns an opaque handle to an event descriptor if it succeeds, and
|
||||
returns NULL on failure.
|
||||
.It Fn pcmcia_intr_disestablish "pf" "ih"
|
||||
Dis-establish the interrupt handler for device function
|
||||
.Fa pf
|
||||
with handle
|
||||
.Fa ih .
|
||||
The handle was returned from
|
||||
.Fn pcmcia_intr_establish .
|
||||
.It Fn pcmcia_cis_read_1 "tuple" "index"
|
||||
Read one byte from tuple
|
||||
.Fa tuple
|
||||
at index
|
||||
.Fa index
|
||||
in the CIS.
|
||||
.It Fn pcmcia_cis_read_2 "tuple" "index"
|
||||
Read two bytes from tuple
|
||||
.Fa tuple
|
||||
at index
|
||||
.Fa index
|
||||
in the CIS.
|
||||
.It Fn pcmcia_cis_read_3 "tuple" "index"
|
||||
Read three bytes from tuple
|
||||
.Fa tuple
|
||||
at index
|
||||
.Fa index
|
||||
in the CIS.
|
||||
.It Fn pcmcia_cis_read_4 "tuple" "index"
|
||||
Read four bytes from tuple
|
||||
.Fa tuple
|
||||
at index
|
||||
.Fa index
|
||||
in the CIS.
|
||||
.It Fn pcmcia_cis_read_n "tuple" "number" "index"
|
||||
Read
|
||||
.Fa n
|
||||
bytes from tuple
|
||||
.Fa tuple
|
||||
at index
|
||||
.Fa index
|
||||
in the CIS.
|
||||
.It Fn pcmcia_scan_cis "dev" "func" "arg"
|
||||
Scan the CIS for device
|
||||
.Fa dev .
|
||||
For each tuple in the CIS, function
|
||||
.Fa func
|
||||
is called with the tuple and the argument
|
||||
.Fa arg .
|
||||
.Fa func
|
||||
should return 0 if the tuple it was called with is the one it was
|
||||
looking for, or 1 otherwise.
|
||||
.El
|
||||
.Sh AUTOCONFIGURATION
|
||||
During autoconfiguration, a
|
||||
.Nm
|
||||
driver will receive a pointer to
|
||||
.Fa struct pcmcia_attach_args
|
||||
describing the device attached to the PCMCIA bus. Drivers match the
|
||||
device using the
|
||||
.Em manufacturer
|
||||
and
|
||||
.Em product
|
||||
members.
|
||||
.Pp
|
||||
During the driver attach step, drivers will use the pcmcia function
|
||||
.Em pf .
|
||||
The driver should traverse the list of config entries searching for a
|
||||
useful configuration. This config entry is passed to
|
||||
.Fn pcmcia_function_init
|
||||
to initialise the machine-independent interface. I/O and memory
|
||||
resources should be initialised using
|
||||
.Fn pcmcia_io_alloc
|
||||
and
|
||||
.Fn pcmcia_mem_alloc
|
||||
using the specified resources in the config entry. These resources
|
||||
can then be mapped into processor bus space using
|
||||
.Fn pcmcia_io_map
|
||||
and
|
||||
.Fn pcmcia_mem_map
|
||||
respectively. Upon successful allocation of resources, power can be
|
||||
applied to the device with
|
||||
.Fn pcmcia_function_enable
|
||||
so that device-specific interrogation can be performed. Finally,
|
||||
power should be removed from the device using
|
||||
.Fn pcmcia_function_disable .
|
||||
.Pp
|
||||
Since PCMCIA devices support dynamic configuration, drivers should
|
||||
make use of
|
||||
.Fn powerhook_establish 9 .
|
||||
Power can be applied and the interrupt handler should be established
|
||||
through this interface.
|
||||
.Sh DMA SUPPORT
|
||||
PCMCIA devices do not support DMA.
|
||||
.Sh CODE REFERENCES
|
||||
This section describes places within the
|
||||
.Nx
|
||||
source tree where actual code implementing or utilising the
|
||||
machine-independent PCMCIA subsystem can be found. All pathnames are
|
||||
relative to
|
||||
.Pa /usr/src.
|
||||
.Pp
|
||||
The PCMCIA subsystem itself is implemented within the file
|
||||
.Pa sys/dev/pcmcia/pcmcia.c .
|
||||
The database of known devices exists within the file
|
||||
.Pa sys/dev/pcmcia/pcmciadevs_data.h
|
||||
and is generated automatically from the file
|
||||
.Pa sys/dev/pcmcia/pcmciadevs .
|
||||
New manufacturer and product identifiers should be added to this
|
||||
file. The database can be regenerated using the Makefile
|
||||
.Pa sys/dev/pcmcia/Makefile.pcmciadevs .
|
||||
.Sh SEE ALSO
|
||||
.Rs
|
||||
.%A Personal Computer Memory Card International Association (PCMCIA)
|
||||
.%T "PC Card 95 Standard"
|
||||
.%D 1995
|
||||
.Re
|
||||
.sp
|
||||
.Xr pcic 4 ,
|
||||
.Xr pcmcia 4 ,
|
||||
.Xr tcic 4 ,
|
||||
.Xr autoconf 9 ,
|
||||
.Xr bus_dma 9 ,
|
||||
.Xr bus_space 9 ,
|
||||
.Xr driver 9 .
|
||||
.Sh HISTORY
|
||||
The machine-independent PCMCIA subsystem appeared in
|
||||
.Nx 1.3 .
|
362
share/man/man9/vme.9
Normal file
362
share/man/man9/vme.9
Normal file
@ -0,0 +1,362 @@
|
||||
.\" $NetBSD: vme.9,v 1.1 2001/07/01 04:11:14 gmcgarry Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" This code is derived from software contributed to The NetBSD Foundation
|
||||
.\" by Gregory McGarry.
|
||||
.\"
|
||||
.\" 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.
|
||||
.\" 3. All advertising materials mentioning features or use of this software
|
||||
.\" must display the following acknowledgement:
|
||||
.\" This product includes software developed by the NetBSD
|
||||
.\" Foundation, Inc. and its contributors.
|
||||
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
.\" contributors may be used to endorse or promote products derived
|
||||
.\" from this software without specific prior written permission.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
.\" ``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 FOUNDATION OR CONTRIBUTORS
|
||||
.\" 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.
|
||||
.\"
|
||||
.Dd June 12, 2001
|
||||
.Dt VME 9
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm VME ,
|
||||
.Nm vme_probe ,
|
||||
.Nm vme_space_map ,
|
||||
.Nm vme_space_unmap ,
|
||||
.Nm vme_intr_map ,
|
||||
.Nm vme_intr_establish ,
|
||||
.Nm vme_intr_disestablish ,
|
||||
.Nm vme_intr_evcnt ,
|
||||
.Nm vme_dmamap_create ,
|
||||
.Nm vme_dmamap_destroy ,
|
||||
.Nm vme_dmamem_alloc ,
|
||||
.Nm vme_dmamem_free ,
|
||||
.Nm vme_space_alloc ,
|
||||
.Nm vme_space_free ,
|
||||
.Nm vme_space_get
|
||||
.Nd Versa Module Euroboard bus
|
||||
.Sh SYNOPSIS
|
||||
.Fd #include <machine/bus.h>
|
||||
.Fd #include <dev/vme/vmereg.h>
|
||||
.Fd #include <dev/vme/vmevar.h>
|
||||
.Ft int
|
||||
.Fn vme_probe "void *vc" "vme_addr_t vmeaddr" "vme_size_t len" "vme_am_t am" \
|
||||
"vme_datasize_t datasize" \
|
||||
"int (*callback)()" "void *arg"
|
||||
.Ft int
|
||||
.Fo vme_space_map
|
||||
.Fa "void *vc" "vme_addr_t vmeaddr" "vme_size_t len" \
|
||||
"vme_am_t am" "vme_datasize_t datasize" "vme_swap_t swap" \
|
||||
"bus_space_tag_t *tag" "bus_space_handle_t *handle" "vme_mapresc_t *resc"
|
||||
.Fc
|
||||
.Ft void
|
||||
.Fn vme_space_unmap "void *vc" "vme_mapresc_t resc"
|
||||
.Ft int
|
||||
.Fn vme_intr_map "void *vc" "int level" "int vector" \
|
||||
"vme_intr_handle_t *handlep"
|
||||
.Ft void *
|
||||
.Fn vme_intr_establish "void *vc" "vme_intr_handle_t handle" "int prio" \
|
||||
"int (*func)(void *)" "void *arg"
|
||||
.Ft void
|
||||
.Fn vme_intr_disestablish "void *vc" "void *cookie"
|
||||
.Ft const struct evcnt *
|
||||
.Fn vme_intr_evcnt "void *vc" "vme_intr_handle_t handle"
|
||||
.Ft int
|
||||
.Fo vme_dmamap_create
|
||||
.Fa "void *vc" "vme_size_t size" "vme_am_t am" "vme_datasize_t datasize"
|
||||
.Fa "vme_swap_t swap" "int nsegs" "vme_size_t segsz" "vme_addr_t bound"
|
||||
.Fa "int flags" "bus_dmamap_t *map"
|
||||
.Fc
|
||||
.Ft void
|
||||
.Fn vme_dmamap_destroy "void *vc" "bus_dmamap_t map"
|
||||
.Ft int
|
||||
.Fo vme_dmamem_alloc
|
||||
.Fa "void *vc" "vme_size_t size" "vme_am_t am" \
|
||||
"vme_datasize_t datasize" "vme_swap_t swap" "bus_dma_segment_t *segs" \
|
||||
"int nsegs" "int *rsegs" "int flags"
|
||||
.Fc
|
||||
.Ft void
|
||||
.Fn vme_dmamem_free "void *vc" "bus_dma_segment_t *segs" "int nsegs"
|
||||
.Ft int
|
||||
.Fn vme_space_alloc "struct vmebus_softc *tag" "vme_addr_t addr" "vme_size_t size" "vme_am_t ams"
|
||||
.Ft void
|
||||
.Fn vme_space_free "void *vc" "vme_addr_t addr" "vme_size_t size" \
|
||||
"vme_am_t ams"
|
||||
.Ft int
|
||||
.Fn vme_space_get "void *vc" "vme_size_t size" "vme_am_t ams" \
|
||||
"u_long align" "vme_addr_t *addr"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
bus provides support for VME devices. The VME bus is a
|
||||
high-performance backplane bus for use in computer systems. It is
|
||||
based on the VMEbus specification initially released by the VMEbus
|
||||
International Trade Association (VITA) in August of 1982. It has
|
||||
since undergone IEC and IEEE standardisation.
|
||||
.Pp
|
||||
The VME bus supports 8, 16, and 32-bit transfers over non-multiplexed
|
||||
32-bit data and address paths. The latest revisions allow 64-bit,
|
||||
multiplexed transfers. It supports asynchronous, fully handshaken
|
||||
transfers at speeds up to 80 MB/sec. It has a master-slave
|
||||
architecture, encouraging multiprocessing and supports up to seven
|
||||
interrupt levels.
|
||||
.Sh DATA TYPES
|
||||
Drivers attached to the
|
||||
.Nm
|
||||
bus will make use of the following data types:
|
||||
.Bl -tag -width compact
|
||||
.It Fa vme_chipset_tag_t
|
||||
An opaque type identifying the bus controller.
|
||||
.It Fa vme_addr_t
|
||||
Addresses on the bus.
|
||||
.It Fa vme_am_t
|
||||
Address modifiers. Valid values are VME_AM_A32, VME_AM_A16,
|
||||
VME_AM_A24, VME_AM_USERDEF (user/vendor definable), VME_AM_MBO,
|
||||
VME_AM_SUPER, VME_AM_USER, VME_AM_DATA, VME_AM_PRG, VME_AM_BLT32 and
|
||||
VME_AM_BLT64.
|
||||
.It Fa vme_datasize_t
|
||||
The datasize of the address space. Valid values are
|
||||
VME_D8, VME_D16, and VME_D32.
|
||||
.It Fa vme_mapresc_t
|
||||
Generic placeholder for any resources needed for a mapping.
|
||||
.It Fa vme_intr_handle_t
|
||||
An opaque type describing an interrupt mapping.
|
||||
.It Fa vme_swap_t
|
||||
Hardware swap capabilities for controlling data endianness. Valid
|
||||
values have not been specified yet.
|
||||
.It Fa struct vme_range
|
||||
A structure used to describe an address range on the VME bus. It
|
||||
contains the following members:
|
||||
.Bd -literal
|
||||
vme_addr_t offset;
|
||||
vme_size_t size;
|
||||
vme_am_t am;
|
||||
.Ed
|
||||
.It Fa struct vme_attach_args
|
||||
A structure used to inform the driver of the
|
||||
device properties. It contains the following members:
|
||||
.Bd -literal
|
||||
vme_chipset_tag_t va_vct;
|
||||
bus_dma_tag_t va_bdt;
|
||||
int ivector;
|
||||
int ilevel;
|
||||
int numcfranges;
|
||||
struct vme_range r[VME_MAXCFRANGES];
|
||||
.Ed
|
||||
.El
|
||||
.Sh FUNCTIONS
|
||||
.Bl -tag -width compact
|
||||
.It Fn vme_probe "vc" "vmeaddr" "len" "am" "datasize" "callback" "arg"
|
||||
Probes the VME space managed by controller
|
||||
.Fa vc
|
||||
at address
|
||||
.Fa vmeaddr ,
|
||||
length
|
||||
.Fa len ,
|
||||
with address modifiers
|
||||
.Fa am
|
||||
and datasize
|
||||
.Fa datasize
|
||||
for a device. If a VME device is found, the function
|
||||
.Fa callback()
|
||||
(if it is not NULL) is called to perform device-specific
|
||||
identification.
|
||||
.Fa callback()
|
||||
is called with the argument
|
||||
.Fa arg ,
|
||||
and the bus-space tag and bus-space handle for accessing the VME space
|
||||
mapping and should return a nonzero positive integer for a positive
|
||||
device match.
|
||||
.It Fo vme_space_map
|
||||
.Fa "vc" "vmeaddr" "len" "am" "datasize" "swap" "tag" "handle" "resc"
|
||||
.Fc
|
||||
Maps the VME space managed by controller
|
||||
.Fa vc
|
||||
at address
|
||||
.Fa vmeaddr ,
|
||||
length
|
||||
.Fa len ,
|
||||
with address modifiers
|
||||
.Fa am ,
|
||||
datasize
|
||||
.Fa datasize
|
||||
and endianness
|
||||
.Fa swap
|
||||
for a device. If the mapping is successful
|
||||
.Fa tag
|
||||
contains the bus-space tag and
|
||||
.Fa handle
|
||||
contains the bus-space handle for accessing the VME space mapping.
|
||||
.Fa resc
|
||||
contains the resources for the mappings.
|
||||
.Fn vme_space_map
|
||||
returns 0 on success, and nonzero on error.
|
||||
.It Fn vme_space_unmap "vc" "resc"
|
||||
Unmaps the VME space mapping managed by controller
|
||||
.Fa vc
|
||||
and resources
|
||||
.Fa resc .
|
||||
.It Fn vme_intr_map "vc" "level" "vector" "handlep"
|
||||
Sets
|
||||
.Fa handlep
|
||||
to a machine-dependant value which identifies a particular interrupt
|
||||
source at level
|
||||
.Fa level
|
||||
and vector
|
||||
.Fa vector
|
||||
on the controller
|
||||
.Fa vc .
|
||||
.Fn vme_intr_map
|
||||
returns zero on success, and nonzero on failure.
|
||||
.It Fn vme_intr_establish "vc" "handle" "prio" "func" "arg"
|
||||
Establishes the interrupt handler
|
||||
.Fa handlep .
|
||||
When the device interrupts,
|
||||
.Fa func()
|
||||
will be called with a single argument
|
||||
.Fa arg
|
||||
and will run at the interrupt priority level
|
||||
.Fa prio .
|
||||
The return value of
|
||||
.Fn vme_intr_establish
|
||||
may be saved and passed to
|
||||
.Fn vme_intr_disestablish .
|
||||
.It Fn vme_intr_disestablish "vc" "cookie"
|
||||
Disables the interrupt handler when the driver is no longer interested
|
||||
in interrupts from the device.
|
||||
.Fa cookie
|
||||
is the value returned by
|
||||
.Fn vme_intr_establish .
|
||||
.It Fn vme_intr_evcnt "vc" "handle"
|
||||
Increment the interrupt event counter for the interrupt specified by
|
||||
.Fa handle .
|
||||
.It Fo vme_dmamap_create
|
||||
.Fa "vc" "size" "am" "datasize" "swap" "nsegs" "segsz" "bound"
|
||||
.Fa "flags" "map"
|
||||
.Fc
|
||||
Allocates a DMA handle and initializes it according to the parameters
|
||||
provided. The VME-specific parameters describe the
|
||||
address-space modifiers
|
||||
.Fa am ,
|
||||
datasize
|
||||
.Fa datasize ,
|
||||
and endianness
|
||||
.Fa swap .
|
||||
The remaining parameters are described in
|
||||
.Xr bus_dma 9 .
|
||||
.It Fn vme_dmamap_destroy "vc" "map"
|
||||
Frees all resources associated with a given DMA handle. The parameters
|
||||
are described in
|
||||
.Xr bus_dma 9 .
|
||||
.It Fo vme_dmamem_alloc
|
||||
.Fa "vc" "size" "am" "datasize" "swap" "segs" "nsegs" "rsegs" "flags"
|
||||
.Fc
|
||||
Allocates memory that is
|
||||
.Do
|
||||
DMA safe
|
||||
.Dc for the VME bus managed by
|
||||
controller
|
||||
.Fa vc .
|
||||
The VME-specific parameters describe the
|
||||
address-space modifiers
|
||||
.Fa am ,
|
||||
datasize
|
||||
.Fa datasize ,
|
||||
and endianness
|
||||
.Fa swap .
|
||||
The remaining parameters are described in
|
||||
.Xr bus_dma 9 .
|
||||
.It Fn vme_dmamem_free "vc" "segs" "nsegs"
|
||||
Frees memory previously allocated by
|
||||
.Fn vme_dmamem_alloc
|
||||
for the VME space managed by controller
|
||||
.Fa vc .
|
||||
.It Fn vme_space_alloc "tag" "addr" "size" "ams"
|
||||
Allocate VME space for the bus-space
|
||||
.Fa tag
|
||||
at address
|
||||
.Fa addr
|
||||
of size
|
||||
.Fa size
|
||||
and address-space modifiers
|
||||
.Fa ams.
|
||||
.Fn vme_space_alloc
|
||||
returns EINVAL on invalid inputs.
|
||||
.It Fn vme_space_free "vc" "addr" "size" "ams"
|
||||
Deallocate VME space for the bus-space
|
||||
.Fa tag
|
||||
at address
|
||||
.Fa addr
|
||||
of size
|
||||
.Fa size
|
||||
and address-space modifiers
|
||||
.Fa ams.
|
||||
.It Fn vme_space_get "vc" "size" "ams" "align" "addr"
|
||||
Returns EINVAL on invalid inputs.
|
||||
.El
|
||||
.Sh AUTOCONFIGURATION
|
||||
The VME bus is an indirect-connection bus. During autoconfiguration
|
||||
each driver is required to probe the bus for the presence of a
|
||||
device. A VME driver will receive a pointer to a
|
||||
.Fa struct vme_attach_args
|
||||
hinting at "locations" (address ranges) on the VME bus where the
|
||||
device may be located. The driver should check the number of address
|
||||
ranges, allocate the address space of these ranges using
|
||||
.Fn vme_space_alloc ,
|
||||
and probe the address space for the device using
|
||||
.Fn vme_probe .
|
||||
.Pp
|
||||
During driver attach the driver should also map the address ranges
|
||||
using
|
||||
.Fn vme_space_map .
|
||||
The interrupt locators in
|
||||
.Fa struct vme_attach_args
|
||||
are used by
|
||||
.Fn vme_intr_map
|
||||
and
|
||||
.Fn vme_intr_establish .
|
||||
.Sh DMA SUPPORT
|
||||
Extensive DMA facilities are provided.
|
||||
.Sh CODE REFERENCES
|
||||
This section describes places within the
|
||||
.Nx
|
||||
source tree where actual code implementing or utilising the
|
||||
machine-independent
|
||||
.Nm
|
||||
subsystem can be found. All pathnames are relative to
|
||||
.Pa /usr/src .
|
||||
.Pp
|
||||
The
|
||||
.Nm
|
||||
subsystem itself is implemented within the file
|
||||
.Pa sys/dev/vme/vme.c .
|
||||
.Sh SEE ALSO
|
||||
.Xr vme 4 ,
|
||||
.Xr autoconf 9 ,
|
||||
.Xr bus_dma 9 ,
|
||||
.Xr bus_space 9 ,
|
||||
.Xr driver 9 .
|
||||
.Sh HISTORY
|
||||
The machine-independent VME subsystem appeared in
|
||||
.Nx 1.5 .
|
||||
.Sh BUGS
|
||||
This page is incomplete.
|
Loading…
Reference in New Issue
Block a user