Index: head/sys/conf/NOTES =================================================================== --- head/sys/conf/NOTES (revision 104444) +++ head/sys/conf/NOTES (revision 104445) @@ -1,2280 +1,2286 @@ # $FreeBSD$ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # # Lines that begin with 'device', 'options', 'machine', 'ident', 'maxusers', # 'makeoptions', 'hints', etc. go into the kernel configuration that you # run config(8) with. # # Lines that begin with 'hint.' are NOT for config(8), they go into your # hints file. See /boot/device.hints and/or the 'hints' config(8) directive. # # Please use ``make LINT'' to create an old-style LINT file if you want to # do kernel test-builds. # # This file contains machine independent kernel configuration notes. For # machine dependent notes, look in /sys//conf/NOTES. # # # NOTES conventions and style guide: # # Large block comments should begin and end with a line containing only a # comment character. # # To describe a particular object, a block comment (if it exists) should # come first. Next should come device, options, and hints lines in that # order. All device and option lines must be described by a comment that # doesn't just expand the device or option name. Use only a concise # comment on the same line if possible. Very detailed descriptions of # devices and subsystems belong in manpages. # # A space followed by a tab separates 'option' from an option name. Two # spaces followed by a tab separate 'device' from a device name. Comments # after an option or device should use one space after the comment character. # To comment out a negative option that disables code and thus should not be # enabled for LINT builds, precede 'option' with "#!". # # # This is the ``identification'' of the kernel. Usually this should # be the same as the name of your kernel. # ident LINT # # The `maxusers' parameter controls the static sizing of a number of # internal system tables by a formula defined in subr_param.c. Setting # maxusers to 0 will cause the system to auto-size based on physical # memory. # maxusers 10 # # The `makeoptions' parameter allows variables to be passed to the # generated Makefile in the build area. # # CONF_CFLAGS gives some extra compiler flags that are added to ${CFLAGS} # after most other flags. Here we use it to inhibit use of non-optimal # gcc builtin functions (e.g., memcmp). # # DEBUG happens to be magic. # The following is equivalent to 'config -g KERNELNAME' and creates # 'kernel.debug' compiled with -g debugging as well as a normal # 'kernel'. Use 'make install.debug' to install the debug kernel # but that isn't normally necessary as the debug symbols are not loaded # by the kernel and are not useful there anyway. # # KERNEL can be overridden so that you can change the default name of your # kernel. # # MODULES_OVERRIDE can be used to limit modules built to a specific list. # makeoptions CONF_CFLAGS=-fno-builtin #Don't allow use of memcmp, etc. #makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols #makeoptions KERNEL=foo #Build kernel "foo" and install "/foo" # Only build Linux API modules and plus those parts of the sound system I need. #makeoptions MODULES_OVERRIDE="linux sound/snd sound/pcm sound/driver/maestro3" # # Certain applications can grow to be larger than the 512M limit # that FreeBSD initially imposes. Below are some options to # allow that limit to grow to 1GB, and can be increased further # with changing the parameters. MAXDSIZ is the maximum that the # limit can be set to, and the DFLDSIZ is the default value for # the limit. MAXSSIZ is the maximum that the stack limit can be # set to. You might want to set the default lower than the max, # and explicitly set the maximum with a shell command for processes # that regularly exceed the limit like INND. # options MAXDSIZ="(1024UL*1024*1024)" options MAXSSIZ="(128UL*1024*1024)" options DFLDSIZ="(1024UL*1024*1024)" # # BLKDEV_IOSIZE sets the default block size used in user block # device I/O. Note that this value will be overriden by the label # when specifying a block device from a label with a non-0 # partition blocksize. The default is PAGE_SIZE. # options BLKDEV_IOSIZE=8192 # Options for the VM subsystem options PQ_CACHESIZE=512 # color for 512k/16k cache # Deprecated options supported for backwards compatibility #options PQ_NOOPT # No coloring #options PQ_LARGECACHE # color for 512k/16k cache #options PQ_HUGECACHE # color for 1024k/16k cache #options PQ_MEDIUMCACHE # color for 256k/16k cache #options PQ_NORMALCACHE # color for 64k/16k cache # This allows you to actually store this configuration file into # the kernel binary itself, where it may be later read by saying: # strings -n 3 /boot/kernel/kernel | sed -n 's/^___//p' > MYKERNEL # options INCLUDE_CONFIG_FILE # Include this file in kernel options GEOM # Use the GEOMetry system for # disk-I/O transformations. # # The root device and filesystem type can be compiled in; # this provides a fallback option if the root device cannot # be correctly guessed by the bootstrap code, or an override if # the RB_DFLTROOT flag (-r) is specified when booting the kernel. # options ROOTDEVNAME=\"ufs:da0s2e\" ##################################################################### # SMP OPTIONS: # # SMP enables building of a Symmetric MultiProcessor Kernel. # Mandatory: options SMP # Symmetric MultiProcessor Kernel # ADAPTIVE_MUTEXES changes the behavior of blocking mutexes to spin # if the thread that currently owns the mutex is executing on another # CPU. options ADAPTIVE_MUTEXES # SMP Debugging Options: # # MUTEX_DEBUG enables various extra assertions in the mutex code. # WITNESS enables the witness code which detects deadlocks and cycles # during locking operations. # WITNESS_DDB causes the witness code to drop into the kernel debugger if # a lock heirarchy violation occurs or if locks are held when going to # sleep. # WITNESS_SKIPSPIN disables the witness checks on spin mutexes. options MUTEX_DEBUG options WITNESS options WITNESS_DDB options WITNESS_SKIPSPIN # # MUTEX_PROFILING - Profiling mutual exclusion locks (mutexes). This # records four numbers for each acquisition point (identified by # source file name and line number): longest time held, total time held, # number of non-recursive acquisitions, and average time held. Measurements # are made and stored in nanoseconds (using nanotime(9)), but are presented # in microseconds, which should be sufficient for the locks which actually # want this (those that are held long and / or often). The MUTEX_PROFILING # option has the following sysctl namespace for controlling and viewing its # operation: # # debug.mutex.prof.enable - enable / disable profiling # debug.mutex.prof.acquisitions - number of mutex acquisitions held # debug.mutex.prof.records - number of acquisition points recorded # debug.mutex.prof.maxrecords - max number of acquisition points # debug.mutex.prof.rejected - number of rejections (due to full table) # debug.mutex.prof.hashsize - hash size # debug.mutex.prof.collisions - number of hash collisions # debug.mutex.prof.stats - profiling statistics # options MUTEX_PROFILING ##################################################################### # COMPATIBILITY OPTIONS # # Implement system calls compatible with 4.3BSD and older versions of # FreeBSD. You probably do NOT want to remove this as much current code # still relies on the 4.3 emulation. # options COMPAT_43 # Enable FreeBSD4 compatibility syscalls options COMPAT_FREEBSD4 # # These three options provide support for System V Interface # Definition-style interprocess communication, in the form of shared # memory, semaphores, and message queues, respectively. # options SYSVSHM options SYSVSEM options SYSVMSG ##################################################################### # DEBUGGING OPTIONS # # Enable the kernel debugger. # options DDB # # Use direct symbol lookup routines for ddb instead of the kernel linker # ones, so that symbols (mostly) work before the kernel linker has been # initialized. This is not the default because it breaks ddb's lookup of # symbols in loaded modules. # #!options DDB_NOKLDSYM # # Print a stack trace of the current thread out on the console for a panic. # options DDB_TRACE # # Don't drop into DDB for a panic. Intended for unattended operation # where you may want to drop to DDB from the console, but still want # the machine to recover from a panic # options DDB_UNATTENDED # # If using GDB remote mode to debug the kernel, there's a non-standard # extension to the remote protocol that can be used to use the serial # port as both the debugging port and the system console. It's non- # standard and you're on your own if you enable it. See also the # "remotechat" variables in the FreeBSD specific version of gdb. # options GDB_REMOTE_CHAT # # KTRACE enables the system-call tracing facility ktrace(2). To be more # SMP-friendly, KTRACE uses a worker thread to process most trace events # asynchronously to the thread generating the event. This requires a # pre-allocated store of objects representing trace events. The # KTRACE_REQUEST_POOL option specifies the initial size of this store. # The size of the pool can be adjusted both at boottime and runtime via # the kern.ktrace_request_pool tunable and sysctl. # options KTRACE #kernel tracing options KTRACE_REQUEST_POOL=101 # # KTR is a kernel tracing mechanism imported from BSD/OS. Currently it # has no userland interface aside from a few sysctl's. It is enabled with # the KTR option. KTR_ENTRIES defines the number of entries in the circular # trace buffer. KTR_COMPILE defines the mask of events to compile into the # kernel as defined by the KTR_* constants in . KTR_MASK defines the # initial value of the ktr_mask variable which determines at runtime what # events to trace. KTR_CPUMASK determines which CPU's log events, with # bit X corresponding to cpu X. KTR_VERBOSE enables dumping of KTR events # to the console by default. This functionality can be toggled via the # debug.ktr_verbose sysctl and defaults to off if KTR_VERBOSE is not defined. # options KTR options KTR_ENTRIES=1024 options KTR_COMPILE="(KTR_INTR|KTR_PROC)" options KTR_MASK=KTR_INTR options KTR_CPUMASK=0x3 options KTR_VERBOSE # # The INVARIANTS option is used in a number of source files to enable # extra sanity checking of internal structures. This support is not # enabled by default because of the extra time it would take to check # for these conditions, which can only occur as a result of # programming errors. # options INVARIANTS # # The INVARIANT_SUPPORT option makes us compile in support for # verifying some of the internal structures. It is a prerequisite for # 'INVARIANTS', as enabling 'INVARIANTS' will make these functions be # called. The intent is that you can set 'INVARIANTS' for single # source files (by changing the source file or specifying it on the # command line) if you have 'INVARIANT_SUPPORT' enabled. Also, if you # wish to build a kernel module with 'INVARIANTS', then adding # 'INVARIANT_SUPPORT' to your kernel will provide all the necessary # infrastructure without the added overhead. # options INVARIANT_SUPPORT # # The DIAGNOSTIC option is used to enable extra debugging information # from some parts of the kernel. As this makes everything more noisy, # it is disabled by default. # options DIAGNOSTIC # # REGRESSION causes optional kernel interfaces necessary only for regression # testing to be enabled. These interfaces may consitute security risks # when enabled, as they permit processes to easily modify aspects of the # run-time environment to reproduce unlikely or unusual (possibly normally # impossible) scenarios. # options REGRESSION # # RESTARTABLE_PANICS allows one to continue from a panic as if it were # a call to the debugger via the Debugger() function instead. It is only # useful if a kernel debugger is present. To restart from a panic, reset # the panicstr variable to NULL and continue execution. This option is # for development use only and should NOT be used in production systems # to "workaround" a panic. # #options RESTARTABLE_PANICS # # This option let some drivers co-exist that can't co-exist in a running # system. This is used to be able to compile all kernel code in one go for # quality assurance purposes (like this file, which the option takes it name # from.) # options COMPILING_LINT ##################################################################### # NETWORKING OPTIONS # # Protocol families: # Only the INET (Internet) family is officially supported in FreeBSD. # Source code for the NS (Xerox Network Service) is provided for amusement # value. # options INET #Internet communications protocols options INET6 #IPv6 communications protocols options IPSEC #IP security options IPSEC_ESP #IP security (crypto; define w/ IPSEC) options IPSEC_DEBUG #debug for IP security options IPX #IPX/SPX communications protocols options IPXIP #IPX in IP encapsulation (not available) options IPTUNNEL #IP in IPX encapsulation (not available) #options NCP #NetWare Core protocol options NETATALK #Appletalk communications protocols options NETATALKDEBUG #Appletalk debugging # These are currently broken but are shipped due to interest. #options NS #Xerox NS protocols #options NSIP #XNS over IP # # SMB/CIFS requester # NETSMB enables support for SMB protocol, it requires LIBMCHAIN and LIBICONV # options. # NETSMBCRYPTO enables support for encrypted passwords. options NETSMB #SMB/CIFS requester options NETSMBCRYPTO #encrypted password support for SMB # mchain library. It can be either loaded as KLD or compiled into kernel options LIBMCHAIN # netgraph(4). Enable the base netgraph code with the NETGRAPH option. # Individual node types can be enabled with the corresponding option # listed below; however, this is not strictly necessary as netgraph # will automatically load the corresponding KLD module if the node type # is not already compiled into the kernel. Each type below has a # corresponding man page, e.g., ng_async(8). options NETGRAPH #netgraph(4) system options NETGRAPH_ASYNC options NETGRAPH_BPF options NETGRAPH_BRIDGE options NETGRAPH_CISCO options NETGRAPH_ECHO options NETGRAPH_ETHER options NETGRAPH_FRAME_RELAY options NETGRAPH_GIF options NETGRAPH_GIF_DEMUX options NETGRAPH_HOLE options NETGRAPH_IFACE options NETGRAPH_IP_INPUT options NETGRAPH_KSOCKET options NETGRAPH_L2TP options NETGRAPH_LMI # MPPC compression requires proprietary files (not included) #options NETGRAPH_MPPC_COMPRESSION options NETGRAPH_MPPC_ENCRYPTION options NETGRAPH_ONE2MANY options NETGRAPH_PPP options NETGRAPH_PPPOE options NETGRAPH_PPTPGRE options NETGRAPH_RFC1490 options NETGRAPH_SOCKET options NETGRAPH_SPLIT options NETGRAPH_TEE options NETGRAPH_TTY options NETGRAPH_UI options NETGRAPH_VJC device mn # Munich32x/Falc54 Nx64kbit/sec cards. device lmc # tulip based LanMedia WAN cards device musycc # LMC/SBE LMC1504 quad T1/E1 # # Network interfaces: # The `loop' device is MANDATORY when networking is enabled. # The `ether' device provides generic code to handle # Ethernets; it is MANDATORY when a Ethernet device driver is # configured or token-ring is enabled. # The `fddi' device provides generic code to support FDDI. # The `arcnet' device provides generic code to support Arcnet. # The `sppp' device serves a similar role for certain types # of synchronous PPP links (like `cx', `ar'). # The `sl' device implements the Serial Line IP (SLIP) service. # The `ppp' device implements the Point-to-Point Protocol. # The `bpf' device enables the Berkeley Packet Filter. Be # aware of the legal and administrative consequences of enabling this # option. The number of devices determines the maximum number of # simultaneous BPF clients programs runnable. # The `disc' device implements a minimal network interface, # which throws away all packets sent and never receives any. It is # included for testing purposes. This shows up as the `ds' interface. # The `tap' device is a pty-like virtual Ethernet interface # The `tun' device implements (user-)ppp and nos-tun # The `gif' device implements IPv6 over IP4 tunneling, # IPv4 over IPv6 tunneling, IPv4 over IPv4 tunneling and # IPv6 over IPv6 tunneling. # The `gre' device implements two types of IP4 over IP4 tunneling: # GRE and MOBILE, as specified in the RFC1701 and RFC2004. # The XBONEHACK option allows the same pair of addresses to be configured on # multiple gif interfaces. # The `faith' device captures packets sent to it and diverts them # to the IPv4/IPv6 translation daemon. # The `stf' device implements 6to4 encapsulation. # The `ef' device provides support for multiple ethernet frame types # specified via ETHER_* options. See ef(4) for details. # # The PPP_BSDCOMP option enables support for compress(1) style entire # packet compression, the PPP_DEFLATE is for zlib/gzip style compression. # PPP_FILTER enables code for filtering the ppp data stream and selecting # events for resetting the demand dial activity timer - requires bpf. # See pppd(8) for more details. # device ether #Generic Ethernet device vlan #VLAN support device token #Generic TokenRing device fddi #Generic FDDI device arcnet #Generic Arcnet device sppp #Generic Synchronous PPP device loop #Network loopback device device bpf #Berkeley packet filter device disc #Discard device (ds0, ds1, etc) device tap #Virtual Ethernet driver device tun #Tunnel driver (ppp(8), nos-tun(8)) device sl #Serial Line IP device gre #IP over IP tunneling device ppp #Point-to-point protocol options PPP_BSDCOMP #PPP BSD-compress support options PPP_DEFLATE #PPP zlib/deflate/gzip support options PPP_FILTER #enable bpf filtering (needs bpf) device ef # Multiple ethernet frames support options ETHER_II # enable Ethernet_II frame options ETHER_8023 # enable Ethernet_802.3 (Novell) frame options ETHER_8022 # enable Ethernet_802.2 frame options ETHER_SNAP # enable Ethernet_802.2/SNAP frame # for IPv6 device gif #IPv6 and IPv4 tunneling options XBONEHACK device faith #for IPv6 and IPv4 translation device stf #6to4 IPv6 over IPv4 encapsulation # # Internet family options: # # MROUTING enables the kernel multicast packet forwarder, which works # with mrouted(8). # # IPFIREWALL enables support for IP firewall construction, in # conjunction with the `ipfw' program. IPFIREWALL_VERBOSE sends # logged packets to the system logger. IPFIREWALL_VERBOSE_LIMIT # limits the number of times a matching entry can be logged. # # WARNING: IPFIREWALL defaults to a policy of "deny ip from any to any" # and if you do not add other rules during startup to allow access, # YOU WILL LOCK YOURSELF OUT. It is suggested that you set firewall_type=open # in /etc/rc.conf when first enabling this feature, then refining the # firewall rules in /etc/rc.firewall after you've tested that the new kernel # feature works properly. # # IPFIREWALL_DEFAULT_TO_ACCEPT causes the default rule (at boot) to # allow everything. Use with care, if a cracker can crash your # firewall machine, they can get to your protected machines. However, # if you are using it as an as-needed filter for specific problems as # they arise, then this may be for you. Changing the default to 'allow' # means that you won't get stuck if the kernel and /sbin/ipfw binary get # out of sync. # # IPDIVERT enables the divert IP sockets, used by ``ipfw divert'' # # IPSTEALTH enables code to support stealth forwarding (i.e., forwarding # packets without touching the ttl). This can be useful to hide firewalls # from traceroute and similar tools. # # PFIL_HOOKS enables an abtraction layer which is meant to be used in # network code where filtering is required. See the pfil(9) man page. # This option is a subset of the IPFILTER option. # # TCPDEBUG enables code which keeps traces of the TCP state machine # for sockets with the SO_DEBUG option set, which can then be examined # using the trpt(8) utility. # options MROUTING # Multicast routing options IPFIREWALL #firewall options IPFIREWALL_VERBOSE #enable logging to syslogd(8) options IPFIREWALL_FORWARD #enable transparent proxy support options IPFIREWALL_VERBOSE_LIMIT=100 #limit verbosity options IPFIREWALL_DEFAULT_TO_ACCEPT #allow everything by default options IPV6FIREWALL #firewall for IPv6 options IPV6FIREWALL_VERBOSE options IPV6FIREWALL_VERBOSE_LIMIT=100 options IPV6FIREWALL_DEFAULT_TO_ACCEPT options IPDIVERT #divert sockets options IPFILTER #ipfilter support options IPFILTER_LOG #ipfilter logging options IPFILTER_DEFAULT_BLOCK #block all packets by default options IPSTEALTH #support for stealth forwarding options PFIL_HOOKS options TCPDEBUG # RANDOM_IP_ID causes the ID field in IP packets to be randomized # instead of incremented by 1 with each packet generated. This # option closes a minor information leak which allows remote # observers to determine the rate of packet generation on the # machine by watching the counter. options RANDOM_IP_ID # Statically Link in accept filters options ACCEPT_FILTER_DATA options ACCEPT_FILTER_HTTP # TCP_DROP_SYNFIN adds support for ignoring TCP packets with SYN+FIN. This # prevents nmap et al. from identifying the TCP/IP stack, but breaks support # for RFC1644 extensions and is not recommended for web servers. # options TCP_DROP_SYNFIN #drop TCP packets with SYN+FIN # DUMMYNET enables the "dummynet" bandwidth limiter. You need # IPFIREWALL as well. See the dummynet(4) and ipfw(8) manpages for more info. # When you run DUMMYNET it is advisable to also have "options HZ=1000" # to achieve a smoother scheduling of the traffic. # # BRIDGE enables bridging between ethernet cards -- see bridge(4). # You can use IPFIREWALL and DUMMYNET together with bridging. # options DUMMYNET options BRIDGE # Zero copy sockets support. This enables "zero copy" for sending and # receving data via a socket. The send side works for any type of NIC, # the receive side only works for NICs that support MTUs greater than the # page size of your architecture and that support header splitting. See # zero_copy(9) for more details. options ZERO_COPY_SOCKETS # # ATM (HARP version) options # # ATM_CORE includes the base ATM functionality code. This must be included # for ATM support. # # ATM_IP includes support for running IP over ATM. # # At least one (and usually only one) of the following signalling managers # must be included (note that all signalling managers include PVC support): # ATM_SIGPVC includes support for the PVC-only signalling manager `sigpvc'. # ATM_SPANS includes support for the `spans' signalling manager, which runs # the FORE Systems's proprietary SPANS signalling protocol. # ATM_UNI includes support for the `uni30' and `uni31' signalling managers, # which run the ATM Forum UNI 3.x signalling protocols. # # The `hea' driver provides support for the Efficient Networks, Inc. # ENI-155p ATM PCI Adapter. # # The `hfa' driver provides support for the FORE Systems, Inc. # PCA-200E ATM PCI Adapter. # options ATM_CORE #core ATM protocol family options ATM_IP #IP over ATM support options ATM_SIGPVC #SIGPVC signalling manager options ATM_SPANS #SPANS signalling manager options ATM_UNI #UNI signalling manager device hea #Efficient ENI-155p ATM PCI device hfa #FORE PCA-200E ATM PCI ##################################################################### # FILESYSTEM OPTIONS # # Only the root, /usr, and /tmp filesystems need be statically # compiled; everything else will be automatically loaded at mount # time. (Exception: the UFS family--- FFS --- cannot # currently be demand-loaded.) Some people still prefer to statically # compile other filesystems as well. # # NB: The NULL, PORTAL, UMAP and UNION filesystems are known to be # buggy, and WILL panic your system if you attempt to do anything with # them. They are included here as an incentive for some enterprising # soul to sit down and fix them. # # One of these is mandatory: options FFS #Fast filesystem options NFSCLIENT #Network File System options NFSSERVER #Network File System # The rest are optional: options CD9660 #ISO 9660 filesystem options FDESCFS #File descriptor filesystem options HPFS #OS/2 File system options MSDOSFS #MS DOS File System (FAT, FAT32) options NTFS #NT File System options NULLFS #NULL filesystem #options NWFS #NetWare filesystem options PORTALFS #Portal filesystem options PROCFS #Process filesystem (requires PSEUDOFS) options PSEUDOFS #Pseudo-filesystem framework options SMBFS #SMB/CIFS filesystem options UDF #Universal Disk Format options UMAPFS #UID map filesystem options UNIONFS #Union filesystem # options NODEVFS #disable devices filesystem # The xFS_ROOT options REQUIRE the associated ``options xFS'' options NFS_ROOT #NFS usable as root device # Soft updates is a technique for improving filesystem speed and # making abrupt shutdown less risky. # options SOFTUPDATES # Extended attributes allow additional data to be associated with files, # and is used for ACLs, Capabilities, and MAC labels. # See src/sys/ufs/ufs/README.extattr for more information. options UFS_EXTATTR options UFS_EXTATTR_AUTOSTART # Access Control List support for UFS filesystems. The current ACL # implementation requires extended attribute support, UFS_EXTATTR, # for the underlying filesystem. # See src/sys/ufs/ufs/README.acls for more information. options UFS_ACL # Directory hashing improves the speed of operations on very large # directories at the expense of some memory. options UFS_DIRHASH # Make space in the kernel for a root filesystem on a md device. # Define to the number of kilobytes to reserve for the filesystem. options MD_ROOT_SIZE=10 # Make the md device a potential root device, either with preloaded # images of type mfs_root or md_root. options MD_ROOT # Allow this many swap-devices. # # In order to manage swap, the system must reserve bitmap space that # scales with the largest mounted swap device multiplied by NSWAPDEV, # irregardless of whether other swap devices exist or not. So it # is not a good idea to make this value too large. options NSWAPDEV=5 # Disk quotas are supported when this option is enabled. options QUOTA #enable disk quotas # If you are running a machine just as a fileserver for PC and MAC # users, using SAMBA or Netatalk, you may consider setting this option # and keeping all those users' directories on a filesystem that is # mounted with the suiddir option. This gives new files the same # ownership as the directory (similar to group). It's a security hole # if you let these users run programs, so confine it to file-servers # (but it'll save you lots of headaches in those cases). Root owned # directories are exempt and X bits are cleared. The suid bit must be # set on the directory as well; see chmod(1) PC owners can't see/set # ownerships so they keep getting their toes trodden on. This saves # you all the support calls as the filesystem it's used on will act as # they expect: "It's my dir so it must be my file". # options SUIDDIR # NFS options: options NFS_MINATTRTIMO=3 # VREG attrib cache timeout in sec options NFS_MAXATTRTIMO=60 options NFS_MINDIRATTRTIMO=30 # VDIR attrib cache timeout in sec options NFS_MAXDIRATTRTIMO=60 options NFS_GATHERDELAY=10 # Default write gather delay (msec) options NFS_WDELAYHASHSIZ=16 # and with this options NFS_DEBUG # Enable NFS Debugging # Coda stuff: options CODA #CODA filesystem. device vcoda 4 #coda minicache <-> venus comm. # # Add support for the EXT2FS filesystem of Linux fame. Be a bit # careful with this - the ext2fs code has a tendency to lag behind # changes and not be exercised very much, so mounting read/write could # be dangerous (and even mounting read only could result in panics.) # options EXT2FS # Use real implementations of the aio_* system calls. There are numerous # stability and security issues in the current aio code that make it # unsuitable for inclusion on machines with untrusted local users. options VFS_AIO # Enable the code UFS IO optimization through the VM system. This allows # use VM operations instead of copying operations when possible. # # Even with this enabled, actual use of the code is still controlled by the # sysctl vfs.ioopt. 0 gives no optimization, 1 gives normal (use VM # operations if a request happens to fit), 2 gives agressive optimization # (the operations are split to do as much as possible through the VM system.) # # Enabling this will probably not give an overall speedup except for # special workloads. options ENABLE_VFS_IOOPT # Cryptographically secure random number generator; /dev/[u]random device random ##################################################################### # POSIX P1003.1B # Real time extensions added in the 1993 Posix # P1003_1B: Infrastructure # _KPOSIX_PRIORITY_SCHEDULING: Build in _POSIX_PRIORITY_SCHEDULING # _KPOSIX_VERSION: Version kernel is built for options P1003_1B options _KPOSIX_PRIORITY_SCHEDULING options _KPOSIX_VERSION=199309L options P1003_1B_SEMAPHORES ##################################################################### # SECURITY POLICY PARAMETERS # Support for Mandatory Access Control (MAC): options MAC options MAC_DEBUG options MAC_NONE # Statically link mac_none policy ##################################################################### # CLOCK OPTIONS # The granularity of operation is controlled by the kernel option HZ whose # default value (100) means a granularity of 10ms (1s/HZ). # Some subsystems, such as DUMMYNET, might benefit from a smaller # granularity such as 1ms or less, for a smoother scheduling of packets. # Consider, however, that reducing the granularity too much might # cause excessive overhead in clock interrupt processing, # potentially causing ticks to be missed and thus actually reducing # the accuracy of operation. options HZ=100 # If you see the "calcru: negative time of %ld usec for pid %d (%s)\n" # message you probably have some broken sw/hw which disables interrupts # for too long. You can make the system more resistant to this by # choosing a high value for NTIMECOUNTER. The default is 5, there # is no upper limit but more than a couple of hundred are not productive. options NTIMECOUNTER=20 # Enable support for the kernel PLL to use an external PPS signal, # under supervision of [x]ntpd(8) # More info in ntpd documentation: http://www.eecis.udel.edu/~ntp options PPS_SYNC ##################################################################### # SCSI DEVICES # SCSI DEVICE CONFIGURATION # The SCSI subsystem consists of the `base' SCSI code, a number of # high-level SCSI device `type' drivers, and the low-level host-adapter # device drivers. The host adapters are listed in the ISA and PCI # device configuration sections below. # # Beginning with FreeBSD 2.0.5 you can wire down your SCSI devices so # that a given bus, target, and LUN always come on line as the same # device unit. In earlier versions the unit numbers were assigned # in the order that the devices were probed on the SCSI bus. This # means that if you removed a disk drive, you may have had to rewrite # your /etc/fstab file, and also that you had to be careful when adding # a new disk as it may have been probed earlier and moved your device # configuration around. # This old behavior is maintained as the default behavior. The unit # assignment begins with the first non-wired down unit for a device # type. For example, if you wire a disk as "da3" then the first # non-wired disk will be assigned da4. # The syntax for wiring down devices is: hint.scbus.0.at="ahc0" hint.scbus.1.at="ahc1" hint.scbus.1.bus="0" hint.scbus.3.at="ahc2" hint.scbus.3.bus="0" hint.scbus.2.at="ahc2" hint.scbus.2.bus="1" hint.da.0.at="scbus0" hint.da.0.target="0" hint.da.0.unit="0" hint.da.1.at="scbus3" hint.da.1.target="1" hint.da.2.at="scbus2" hint.da.2.target="3" hint.sa.1.at="scbus1" hint.sa.1.target="6" # "units" (SCSI logical unit number) that are not specified are # treated as if specified as LUN 0. # All SCSI devices allocate as many units as are required. # The ch driver drives SCSI Media Changer ("jukebox") devices. # # The da driver drives SCSI Direct Access ("disk") and Optical Media # ("WORM") devices. # # The sa driver drives SCSI Sequential Access ("tape") devices. # # The cd driver drives SCSI Read Only Direct Access ("cd") devices. # # The ses driver drives SCSI Envinronment Services ("ses") and # SAF-TE ("SCSI Accessable Fault-Tolerant Enclosure") devices. # # The pt driver drives SCSI Processor devices. # # # Target Mode support is provided here but also requires that a SIM # (SCSI Host Adapter Driver) provide support as well. # # The targ driver provides target mode support as a Processor type device. # It exists to give the minimal context necessary to respond to Inquiry # commands. There is a sample user application that shows how the rest # of the command support might be done in /usr/share/examples/scsi_target. # # The targbh driver provides target mode support and exists to respond # to incoming commands that do not otherwise have a logical unit assigned # to them. # # The "unknown" device (uk? in pre-2.0.5) is now part of the base SCSI # configuration as the "pass" driver. device scbus #base SCSI code device ch #SCSI media changers device da #SCSI direct access devices (aka disks) device sa #SCSI tapes device cd #SCSI CD-ROMs device ses #SCSI Environmental Services (and SAF-TE) device pt #SCSI processor device targ #SCSI Target Mode Code device targbh #SCSI Target Mode Blackhole Device device pass #CAM passthrough driver # CAM OPTIONS: # debugging options: # -- NOTE -- If you specify one of the bus/target/lun options, you must # specify them all! # CAMDEBUG: When defined enables debugging macros # CAM_DEBUG_BUS: Debug the given bus. Use -1 to debug all busses. # CAM_DEBUG_TARGET: Debug the given target. Use -1 to debug all targets. # CAM_DEBUG_LUN: Debug the given lun. Use -1 to debug all luns. # CAM_DEBUG_FLAGS: OR together CAM_DEBUG_INFO, CAM_DEBUG_TRACE, # CAM_DEBUG_SUBTRACE, and CAM_DEBUG_CDB # # CAM_MAX_HIGHPOWER: Maximum number of concurrent high power (start unit) cmds # CAM_NEW_TRAN_CODE: this is the new transport layer code that will be switched # to soon # SCSI_NO_SENSE_STRINGS: When defined disables sense descriptions # SCSI_NO_OP_STRINGS: When defined disables opcode descriptions # SCSI_DELAY: The number of MILLISECONDS to freeze the SIM (scsi adapter) # queue after a bus reset, and the number of milliseconds to # freeze the device queue after a bus device reset. This # can be changed at boot and runtime with the # kern.cam.scsi_delay tunable/sysctl. options CAMDEBUG options CAM_DEBUG_BUS=-1 options CAM_DEBUG_TARGET=-1 options CAM_DEBUG_LUN=-1 options CAM_DEBUG_FLAGS="CAM_DEBUG_INFO|CAM_DEBUG_TRACE|CAM_DEBUG_CDB" options CAM_MAX_HIGHPOWER=4 options SCSI_NO_SENSE_STRINGS options SCSI_NO_OP_STRINGS options SCSI_DELAY=8000 # Be pessimistic about Joe SCSI device # Options for the CAM CDROM driver: # CHANGER_MIN_BUSY_SECONDS: Guaranteed minimum time quantum for a changer LUN # CHANGER_MAX_BUSY_SECONDS: Maximum time quantum per changer LUN, only # enforced if there is I/O waiting for another LUN # The compiled in defaults for these variables are 2 and 10 seconds, # respectively. # # These can also be changed on the fly with the following sysctl variables: # kern.cam.cd.changer.min_busy_seconds # kern.cam.cd.changer.max_busy_seconds # options CHANGER_MIN_BUSY_SECONDS=2 options CHANGER_MAX_BUSY_SECONDS=10 # Options for the CAM sequential access driver: # SA_IO_TIMEOUT: Timeout for read/write/wfm operations, in minutes # SA_SPACE_TIMEOUT: Timeout for space operations, in minutes # SA_REWIND_TIMEOUT: Timeout for rewind operations, in minutes # SA_ERASE_TIMEOUT: Timeout for erase operations, in minutes # SA_1FM_AT_EOD: Default to model which only has a default one filemark at EOT. options SA_IO_TIMEOUT="(4)" options SA_SPACE_TIMEOUT="(60)" options SA_REWIND_TIMEOUT="(2*60)" options SA_ERASE_TIMEOUT="(4*60)" options SA_1FM_AT_EOD # Optional timeout for the CAM processor target (pt) device # This is specified in seconds. The default is 60 seconds. options SCSI_PT_DEFAULT_TIMEOUT="60" # Optional enable of doing SES passthrough on other devices (e.g., disks) # # Normally disabled because a lot of newer SCSI disks report themselves # as having SES capabilities, but this can then clot up attempts to build # build a topology with the SES device that's on the box these drives # are in.... options SES_ENABLE_PASSTHROUGH ##################################################################### # MISCELLANEOUS DEVICES AND OPTIONS # The `pty' device usually turns out to be ``effectively mandatory'', # as it is required for `telnetd', `rlogind', `screen', `emacs', and # `xterm', among others. device pty #Pseudo ttys device nmdm #back-to-back tty devices device md #Memory/malloc disk device snp #Snoop device - to look at pty/vty/etc.. device ccd #Concatenated disk driver # Configuring Vinum into the kernel is not necessary, since the kld # module gets started automatically when vinum(8) starts. This # device is also untested. Use at your own risk. # # The option VINUMDEBUG must match the value set in CFLAGS # in src/sbin/vinum/Makefile. Failure to do so will result in # the following message from vinum(8): # # Can't get vinum config: Invalid argument # # see vinum(4) for more reasons not to use these options. device vinum #Vinum concat/mirror/raid driver options VINUMDEBUG #enable Vinum debugging hooks # Kernel side iconv library options LIBICONV # Size of the kernel message buffer. Should be N * pagesize. options MSGBUF_SIZE=40960 ##################################################################### # HARDWARE DEVICE CONFIGURATION # For ISA the required hints are listed. # EISA, MCA, PCI and pccard are self identifying buses, so no hints # are needed. # # Mandatory devices: # # The keyboard controller; it controls the keyboard and the PS/2 mouse. device atkbdc hint.atkbdc.0.at="isa" hint.atkbdc.0.port="0x060" # The AT keyboard device atkbd hint.atkbd.0.at="atkbdc" hint.atkbd.0.irq="1" # Options for atkbd: options ATKBD_DFLT_KEYMAP # specify the built-in keymap makeoptions ATKBD_DFLT_KEYMAP="jp.106" # These options are valid for other keyboard drivers as well. options KBD_DISABLE_KEYMAP_LOAD # refuse to load a keymap options KBD_INSTALL_CDEV # install a CDEV entry in /dev # `flags' for atkbd: # 0x01 Force detection of keyboard, else we always assume a keyboard # 0x02 Don't reset keyboard, useful for some newer ThinkPads # 0x03 Force detection and avoid reset, might help with certain # dockingstations # 0x04 Old-style (XT) keyboard support, useful for older ThinkPads # PS/2 mouse device psm hint.psm.0.at="atkbdc" hint.psm.0.irq="12" # Options for psm: options PSM_HOOKRESUME #hook the system resume event, useful #for some laptops options PSM_RESETAFTERSUSPEND #reset the device at the resume event # Video card driver for VGA adapters. device vga hint.vga.0.at="isa" # Options for vga: # Try the following option if the mouse pointer is not drawn correctly # or font does not seem to be loaded properly. May cause flicker on # some systems. options VGA_ALT_SEQACCESS # If you can dispense with some vga driver features, you may want to # use the following options to save some memory. #options VGA_NO_FONT_LOADING # don't save/load font #options VGA_NO_MODE_CHANGE # don't change video modes # Older video cards may require this option for proper operation. options VGA_SLOW_IOACCESS # do byte-wide i/o's to TS and GDC regs # The following option probably won't work with the LCD displays. options VGA_WIDTH90 # support 90 column modes options FB_DEBUG # Frame buffer debugging options FB_INSTALL_CDEV # install a CDEV entry in /dev device splash # Splash screen and screen saver support # Various screen savers. device blank_saver device daemon_saver device fade_saver device fire_saver device green_saver device logo_saver device rain_saver device star_saver device warp_saver # The syscons console driver (sco color console compatible). device sc hint.sc.0.at="isa" options MAXCONS=16 # number of virtual consoles options SC_ALT_MOUSE_IMAGE # simplified mouse cursor in text mode options SC_DFLT_FONT # compile font in makeoptions SC_DFLT_FONT=cp850 options SC_DISABLE_DDBKEY # disable `debug' key options SC_DISABLE_REBOOT # disable reboot key sequence options SC_HISTORY_SIZE=200 # number of history buffer lines options SC_MOUSE_CHAR=0x3 # char code for text mode mouse cursor options SC_PIXEL_MODE # add support for the raster text mode # The following options will let you change the default colors of syscons. options SC_NORM_ATTR="(FG_GREEN|BG_BLACK)" options SC_NORM_REV_ATTR="(FG_YELLOW|BG_GREEN)" options SC_KERNEL_CONS_ATTR="(FG_RED|BG_BLACK)" options SC_KERNEL_CONS_REV_ATTR="(FG_BLACK|BG_RED)" # The following options will let you change the default behaviour of # cut-n-paste feature options SC_CUT_SPACES2TABS # convert leading spaces into tabs options SC_CUT_SEPCHARS="\x20" # set of characters that delimit words # (default is single space - "\x20") # If you have a two button mouse, you may want to add the following option # to use the right button of the mouse to paste text. options SC_TWOBUTTON_MOUSE # You can selectively disable features in syscons. options SC_NO_CUTPASTE options SC_NO_FONT_LOADING options SC_NO_HISTORY options SC_NO_SYSMOUSE # `flags' for sc # 0x80 Put the video card in the VESA 800x600 dots, 16 color mode # 0x100 Probe for a keyboard device periodically if one is not present # # Optional devices: # # DRM options: # gammadrm: 3Dlabs Oxygen GMX 2000 # mgadrm: AGP Matrox G200, G400, G450, G550 # tdfxdrm: 3dfx Voodoo 3/4/5 and Banshee # r128drm: AGP ATI Rage 128 # radeondrm: AGP ATI Radeon, including 7200 and 7500 # DRM_LINUX: include linux compatibility, requires COMPAT_LINUX # DRM_DEBUG: inlcude debugging code, very slow # # mga, r128, and radeon require AGP in the kernel device gammadrm device mgadrm device "r128drm" device radeondrm device tdfxdrm options DRM_DEBUG options DRM_LINUX # 3Dfx Voodoo Graphics, Voodoo II /dev/3dfx CDEV support. This will create # the /dev/3dfx0 device to work with glide implementations. This should get # linked to /dev/3dfx and /dev/voodoo. Note that this is not the same as # the tdfx DRI module from XFree86 and is completely unrelated. # # To enable Linuxulator support, one must also include COMPAT_LINUX in the # config as well, or you will not have the dependencies. The other option # is to load both as modules. device tdfx # Enable 3Dfx Voodoo support options TDFX_LINUX # Enable Linuxulator support # # SCSI host adapters: # # adv: All Narrow SCSI bus AdvanSys controllers. # adw: Second Generation AdvanSys controllers including the ADV940UW. # aha: Adaptec 154x/1535/1640 # ahb: Adaptec 174x EISA controllers # ahc: Adaptec 274x/284x/2910/293x/294x/394x/3950x/3960x/398X/4944/ # 19160x/29160x, aic7770/aic78xx # ahd: Adaptec 29320/39320 Controllers. # aic: Adaptec 6260/6360, APA-1460 (PC Card), NEC PC9801-100 (C-BUS) # amd: Support for the AMD 53C974 SCSI host adapter chip as found on devices # such as the Tekram DC-390(T). # bt: Most Buslogic controllers: including BT-445, BT-54x, BT-64x, BT-74x, # BT-75x, BT-946, BT-948, BT-956, BT-958, SDC3211B, SDC3211F, SDC3222F # isp: Qlogic ISP 1020, 1040 and 1040B PCI SCSI host adapters, # ISP 1240 Dual Ultra SCSI, ISP 1080 and 1280 (Dual) Ultra2, # ISP 12160 Ultra3 SCSI, # Qlogic ISP 2100 and ISP 2200 1Gb Fibre Channel host adapters. # Qlogic ISP 2300 and ISP 2312 2Gb Fibre Channel host adapters. # ispfw: Firmware module for Qlogic host adapters # ncr: NCR 53C810, 53C825 self-contained SCSI host adapters. # sym: Symbios/Logic 53C8XX family of PCI-SCSI I/O processors: # 53C810, 53C810A, 53C815, 53C825, 53C825A, 53C860, 53C875, # 53C876, 53C885, 53C895, 53C895A, 53C896, 53C897, 53C1510D, # 53C1010-33, 53C1010-66. # wds: WD7000 # # Note that the order is important in order for Buslogic ISA/EISA cards to be # probed correctly. # device bt hint.bt.0.at="isa" hint.bt.0.port="0x330" device adv hint.adv.0.at="isa" device adw device aha hint.aha.0.at="isa" device aic hint.aic.0.at="isa" device ahb device ahc device ahd device amd device isp hint.isp.0.disable="1" hint.isp.0.role="3" hint.isp.0.prefer_iomap="1" hint.isp.0.prefer_memmap="1" hint.isp.0.fwload_disable="1" hint.isp.0.ignore_nvram="1" hint.isp.0.fullduplex="1" hint.isp.0.topology="lport" hint.isp.0.topology="nport" hint.isp.0.topology="lport-only" hint.isp.0.topology="nport-only" # we can't get u_int64_t types, nor can we get strings if it's got # a leading 0x, hence this silly dodge. hint.isp.0.portwnn="w50000000aaaa0000" hint.isp.0.nodewnn="w50000000aaaa0001" device ispfw device ncr device sym device wds hint.wds.0.at="isa" hint.wds.0.port="0x350" hint.wds.0.irq="11" hint.wds.0.drq="6" # The aic7xxx driver will attempt to use memory mapped I/O for all PCI # controllers that have it configured only if this option is set. Unfortunately, # this doesn't work on some motherboards, which prevents it from being the # default. options AHC_ALLOW_MEMIO # Dump the contents of the ahc controller configuration PROM. options AHC_DUMP_EEPROM # Bitmap of units to enable targetmode operations. options AHC_TMODE_ENABLE # Compile in aic79xx debugging code. options AHD_DEBUG # Aic79xx driver debugging options. # See the ahd(4) manpage options AHD_DEBUG_OPTS=0xFFFFFFFF # Print human-readable register definitions when debugging options AHD_REG_PRETTY_PRINT # The adw driver will attempt to use memory mapped I/O for all PCI # controllers that have it configured only if this option is set. options ADW_ALLOW_MEMIO # Options used in dev/isp/ (Qlogic SCSI/FC driver). # # ISP_TARGET_MODE - enable target mode operation # #options ISP_TARGET_MODE=1 # Options used in dev/sym/ (Symbios SCSI driver). #options SYM_SETUP_LP_PROBE_MAP #-Low Priority Probe Map (bits) # Allows the ncr to take precedence # 1 (1<<0) -> 810a, 860 # 2 (1<<1) -> 825a, 875, 885, 895 # 4 (1<<2) -> 895a, 896, 1510d #options SYM_SETUP_SCSI_DIFF #-HVD support for 825a, 875, 885 # disabled:0 (default), enabled:1 #options SYM_SETUP_PCI_PARITY #-PCI parity checking # disabled:0, enabled:1 (default) #options SYM_SETUP_MAX_LUN #-Number of LUNs supported # default:8, range:[1..64] # The 'asr' driver provides support for current DPT/Adaptec SCSI RAID # controllers (SmartRAID V and VI and later). # These controllers require the CAM infrastructure. # device asr # The 'dpt' driver provides support for old DPT controllers (http://www.dpt.com/). # These have hardware RAID-{0,1,5} support, and do multi-initiator I/O. # The DPT controllers are commonly re-licensed under other brand-names - # some controllers by Olivetti, Dec, HP, AT&T, SNI, AST, Alphatronic, NEC and # Compaq are actually DPT controllers. # # See src/sys/dev/dpt for debugging and other subtle options. # DPT_MEASURE_PERFORMANCE Enables a set of (semi)invasive metrics. Various # instruments are enabled. The tools in # /usr/sbin/dpt_* assume these to be enabled. # DPT_HANDLE_TIMEOUTS Normally device timeouts are handled by the DPT. # If you ant the driver to handle timeouts, enable # this option. If your system is very busy, this # option will create more trouble than solve. # DPT_TIMEOUT_FACTOR Used to compute the excessive amount of time to # wait when timing out with the above option. # DPT_DEBUG_xxxx These are controllable from sys/dev/dpt/dpt.h # DPT_LOST_IRQ When enabled, will try, once per second, to catch # any interrupt that got lost. Seems to help in some # DPT-firmware/Motherboard combinations. Minimal # cost, great benefit. # DPT_RESET_HBA Make "reset" actually reset the controller # instead of fudging it. Only enable this if you # are 100% certain you need it. device dpt # DPT options #!CAM# options DPT_MEASURE_PERFORMANCE #!CAM# options DPT_HANDLE_TIMEOUTS options DPT_TIMEOUT_FACTOR=4 options DPT_LOST_IRQ options DPT_RESET_HBA options DPT_ALLOW_MEMIO # # Compaq "CISS" RAID controllers (SmartRAID 5* series) # These controllers have a SCSI-like interface, and require the # CAM infrastructure. # device ciss # # Intel Integrated RAID controllers. # This driver was developed and is maintained by Intel. Contacts # at Intel for this driver are # "Kannanthanam, Boji T" and # "Leubner, Achim" . # device iir # # Mylex AcceleRAID and eXtremeRAID controllers with v6 and later # firmware. These controllers have a SCSI-like interface, and require # the CAM infrastructure. # device mly # # Compaq Smart RAID, Mylex DAC960 and AMI MegaRAID controllers. Only # one entry is needed; the code will find and configure all supported # controllers. # device ida # Compaq Smart RAID device mlx # Mylex DAC960 device amr # AMI MegaRAID # # 3ware ATA RAID # device twe # 3ware ATA RAID # # The 'ATA' driver supports all ATA and ATAPI devices, including PC Card # devices. You only need one "device ata" for it to find all # PCI and PC Card ATA/ATAPI devices on modern machines. device ata device atadisk # ATA disk drives device atapicd # ATAPI CDROM drives device atapifd # ATAPI floppy drives device atapist # ATAPI tape drives device atapicam # emulate ATAPI devices as SCSI ditto via CAM # needs CAM to be present (scbus & pass) # # For older non-PCI, non-PnPBIOS systems, these are the hints lines to add: hint.ata.0.at="isa" hint.ata.0.port="0x1f0" hint.ata.0.irq="14" hint.ata.1.at="isa" hint.ata.1.port="0x170" hint.ata.1.irq="15" # # The following options are valid on the ATA driver: # # ATA_STATIC_ID: controller numbering is static ie depends on location # else the device numbers are dynamically allocated. options ATA_STATIC_ID # # Standard floppy disk controllers and floppy tapes, supports # the Y-E DATA External FDD (PC Card) # device fdc hint.fdc.0.at="isa" hint.fdc.0.port="0x3F0" hint.fdc.0.irq="6" hint.fdc.0.drq="2" # # FDC_DEBUG enables floppy debugging. Since the debug output is huge, you # gotta turn it actually on by setting the variable fd_debug with DDB, # however. options FDC_DEBUG # # Activate this line if you happen to have an Insight floppy tape. # Probing them proved to be dangerous for people with floppy disks only, # so it's "hidden" behind a flag: #hint.fdc.0.flags="1" # Specify floppy devices hint.fd.0.at="fdc0" hint.fd.0.drive="0" hint.fd.1.at="fdc0" hint.fd.1.drive="1" # # sio: serial ports (see sio(4)), including support for various # PC Card devices, such as Modem and NICs (see etc/defaults/pccard.conf) device sio hint.sio.0.at="isa" hint.sio.0.port="0x3F8" hint.sio.0.flags="0x10" hint.sio.0.irq="4" # # `flags' for serial drivers that support consoles (only for sio now): # 0x10 enable console support for this unit. The other console flags # are ignored unless this is set. Enabling console support does # not make the unit the preferred console - boot with -h or set # the 0x20 flag for that. Currently, at most one unit can have # console support; the first one (in config file order) with # this flag set is preferred. Setting this flag for sio0 gives # the old behaviour. # 0x20 force this unit to be the console (unless there is another # higher priority console). This replaces the COMCONSOLE option. # 0x40 reserve this unit for low level console operations. Do not # access the device in any normal way. # 0x80 use this port for serial line gdb support in ddb. # # PnP `flags' # 0x1 disable probing of this device. Used to prevent your modem # from being attached as a PnP modem. # # Options for serial drivers that support consoles (only for sio now): options BREAK_TO_DEBUGGER #a BREAK on a comconsole goes to #DDB, if available. options CONSPEED=115200 # speed for serial console # (default 9600) # Solaris implements a new BREAK which is initiated by a character # sequence CR ~ ^b which is similar to a familiar pattern used on # Sun servers by the Remote Console. options ALT_BREAK_TO_DEBUGGER # Options for sio: options COM_ESP #code for Hayes ESP options COM_MULTIPORT #code for some cards with shared IRQs # Other flags for sio that aren't documented in the man page. # 0x20000 enable hardware RTS/CTS and larger FIFOs. Only works for # ST16650A-compatible UARTs. # PCI Universal Communications driver # Supports various single and multi port PCI serial cards. Maybe later # also the parallel ports on combination serial/parallel cards. New cards # can be added in src/sys/dev/puc/pucdata.c. # # If the PUC_FASTINTR option is used the driver will try to use fast # interrupts. The card must then be the only user of that interrupt. # Interrupts cannot be shared when using PUC_FASTINTR. device puc options PUC_FASTINTR # # Network interfaces: # # MII bus support is required for some PCI 10/100 ethernet NICs, # namely those which use MII-compliant transceivers or implement # tranceiver control interfaces that operate like an MII. Adding # "device miibus0" to the kernel config pulls in support for # the generic miibus API and all of the PHY drivers, including a # generic one for PHYs that aren't specifically handled by an # individual driver. device miibus # an: Aironet 4500/4800 802.11 wireless adapters. Supports the PCMCIA, # PCI and ISA varieties. # ar: Arnet SYNC/570i hdlc sync 2/4 port V.35/X.21 serial driver # (requires sppp) # awi: Support for IEEE 802.11 PC Card devices using the AMD Am79C930 and # Harris (Intersil) Chipset with PCnetMobile firmware by AMD. # bge: Support for gigabit ethernet adapters based on the Broadcom # BCM570x family of controllers, including the 3Com 3c996-T, # the Netgear GA302T, the SysKonnect SK-9D21 and SK-9D41, and # the embedded gigE NICs on Dell PowerEdge 2550 servers. # cm: Arcnet SMC COM90c26 / SMC COM90c56 # (and SMC COM90c66 in '56 compatibility mode) adapters. # cnw: Xircom CNW/Netware Airsurfer PC Card adapter # cs: IBM Etherjet and other Crystal Semi CS89x0-based adapters # dc: Support for PCI fast ethernet adapters based on the DEC/Intel 21143 # and various workalikes including: # the ADMtek AL981 Comet and AN985 Centaur, the ASIX Electronics # AX88140A and AX88141, the Davicom DM9100 and DM9102, the Lite-On # 82c168 and 82c169 PNIC, the Lite-On/Macronix LC82C115 PNIC II # and the Macronix 98713/98713A/98715/98715A/98725 PMAC. This driver # replaces the old al, ax, dm, pn and mx drivers. List of brands: # Digital DE500-BA, Kingston KNE100TX, D-Link DFE-570TX, SOHOware SFA110, # SVEC PN102-TX, CNet Pro110B, 120A, and 120B, Compex RL100-TX, # LinkSys LNE100TX, LNE100TX V2.0, Jaton XpressNet, Alfa Inc GFC2204, # KNE110TX. # de: Digital Equipment DC21040 # ed: Western Digital and SMC 80xx; Novell NE1000 and NE2000; 3Com 3C503 # HP PC Lan+, various PC Card devices (refer to etc/defauls/pccard.conf) # (requires miibus) # em: Intel Pro/1000 Gigabit Ethernet 82542, 82543, 82544 based adapters. # ep: 3Com 3C509, 3C529, 3C556, 3C562D, 3C563D, 3C572, 3C574X, 3C579, 3C589 # and PC Card devices using these chipsets. # ex: Intel EtherExpress Pro/10 and other i82595-based adapters, # Olicom Ethernet PC Card devices. # fe: Fujitsu MB86960A/MB86965A Ethernet # fea: DEC DEFEA EISA FDDI adapter # fpa: Support for the Digital DEFPA PCI FDDI. `device fddi' is also needed. # fxp: Intel EtherExpress Pro/100B # (hint of prefer_iomap can be done to prefer I/O instead of Mem mapping) # gx: Intel Pro/1000 Gigabit Ethernet (82542, 82543-F, 82543-T) # lge: Support for PCI gigabit ethernet adapters based on the Level 1 # LXT1001 NetCellerator chipset. This includes the D-Link DGE-500SX, # SMC TigerCard 1000 (SMC9462SX), and some Addtron cards. # lnc: Lance/PCnet cards (Isolan, Novell NE2100, NE32-VL, AMD Am7990 and # Am79C960) # nge: Support for PCI gigabit ethernet adapters based on the National # Semiconductor DP83820 and DP83821 chipset. This includes the # SMC EZ Card 1000 (SMC9462TX), D-Link DGE-500T, Asante FriendlyNet # GigaNIX 1000TA and 1000TPC, the Addtron AEG320T, the LinkSys # EG1032 and EG1064, the Surecom EP-320G-TX and the Netgear GA622T. # pcn: Support for PCI fast ethernet adapters based on the AMD Am79c97x # chipsets, including the PCnet/FAST, PCnet/FAST+, PCnet/PRO and # PCnet/Home. These were previously handled by the lnc driver (and # still will be if you leave this driver out of the kernel). # rl: Support for PCI fast ethernet adapters based on the RealTek 8129/8139 # chipset. Note that the RealTek driver defaults to using programmed # I/O to do register accesses because memory mapped mode seems to cause # severe lockups on SMP hardware. This driver also supports the # Accton EN1207D `Cheetah' adapter, which uses a chip called # the MPX 5030/5038, which is either a RealTek in disguise or a # RealTek workalike. Note that the D-Link DFE-530TX+ uses the RealTek # chipset and is supported by this driver, not the 'vr' driver. # sf: Support for Adaptec Duralink PCI fast ethernet adapters based on the # Adaptec AIC-6915 "starfire" controller. # This includes dual and quad port cards, as well as one 100baseFX card. # Most of these are 64-bit PCI devices, except for one single port # card which is 32-bit. # sis: Support for NICs based on the Silicon Integrated Systems SiS 900, # SiS 7016 and NS DP83815 PCI fast ethernet controller chips. # sk: Support for the SysKonnect SK-984x series PCI gigabit ethernet NICs. # This includes the SK-9841 and SK-9842 single port cards (single mode # and multimode fiber) and the SK-9843 and SK-9844 dual port cards # (also single mode and multimode). # The driver will autodetect the number of ports on the card and # attach each one as a separate network interface. # sn: Support for ISA and PC Card Ethernet devices using the # SMC91C90/92/94/95 chips. # sr: RISCom/N2 hdlc sync 1/2 port V.35/X.21 serial driver (requires sppp) # ste: Sundance Technologies ST201 PCI fast ethernet controller, includes # the D-Link DFE-550TX. # ti: Support for PCI gigabit ethernet NICs based on the Alteon Networks # Tigon 1 and Tigon 2 chipsets. This includes the Alteon AceNIC, the # 3Com 3c985, the Netgear GA620 and various others. Note that you will # probably want to bump up NMBCLUSTERS a lot to use this driver. # tl: Support for the Texas Instruments TNETE100 series 'ThunderLAN' # cards and integrated ethernet controllers. This includes several # Compaq Netelligent 10/100 cards and the built-in ethernet controllers # in several Compaq Prosignia, Proliant and Deskpro systems. It also # supports several Olicom 10Mbps and 10/100 boards. # tx: SMC 9432 TX, BTX and FTX cards. (SMC EtherPower II serie) # txp: Support for 3Com 3cR990 cards with the "Typhoon" chipset # vr: Support for various fast ethernet adapters based on the VIA # Technologies VT3043 `Rhine I' and VT86C100A `Rhine II' chips, # including the D-Link DFE530TX (see 'rl' for DFE530TX+), the Hawking # Technologies PN102TX, and the AOpen/Acer ALN-320. # vx: 3Com 3C590 and 3C595 # wb: Support for fast ethernet adapters based on the Winbond W89C840F chip. # Note: this is not the same as the Winbond W89C940F, which is a # NE2000 clone. # wi: Lucent WaveLAN/IEEE 802.11 PCMCIA adapters. Note: this supports both # the PCMCIA and ISA cards: the ISA card is really a PCMCIA to ISA # bridge with a PCMCIA adapter plugged into it. # xe: Xircom/Intel EtherExpress Pro100/16 PC Card ethernet controller, # Accton Fast EtherCard-16, Compaq Netelligent 10/100 PC Card, # Toshiba 10/100 Ethernet PC Card, Xircom 16-bit Ethernet + Modem 56 # xl: Support for the 3Com 3c900, 3c905, 3c905B and 3c905C (Fast) # Etherlink XL cards and integrated controllers. This includes the # integrated 3c905B-TX chips in certain Dell Optiplex and Dell # Precision desktop machines and the integrated 3c905-TX chips # in Dell Latitude laptop docking stations. # Also supported: 3Com 3c980(C)-TX, 3Com 3cSOHO100-TX, 3Com 3c450-TX # Order for ISA/EISA devices is important here device ar hint.ar.0.at="isa" hint.ar.0.port="0x300" hint.ar.0.irq="10" hint.ar.0.maddr="0xd0000" device cm hint.cm.0.at="isa" hint.cm.0.port="0x2e0" hint.cm.0.irq="9" hint.cm.0.maddr="0xdc000" device cs hint.cs.0.at="isa" hint.cs.0.port="0x300" device ed #options ED_NO_MIIBUS # Disable ed miibus support hint.ed.0.at="isa" hint.ed.0.port="0x280" hint.ed.0.irq="5" hint.ed.0.maddr="0xd8000" device ep device ex device fe hint.fe.0.at="isa" hint.fe.0.port="0x300" device fea device lnc hint.lnc.0.at="isa" hint.lnc.0.port="0x280" hint.lnc.0.irq="10" hint.lnc.0.drq="0" device sr hint.sr.0.at="isa" hint.sr.0.port="0x300" hint.sr.0.irq="5" hint.sr.0.maddr="0xd0000" device sn hint.sn.0.at="isa" hint.sn.0.port="0x300" hint.sn.0.irq="10" device an device awi device cnw device wi device xe # PCI Ethernet NICs that use the common MII bus controller code. device dc # DEC/Intel 21143 and various workalikes device fxp # Intel EtherExpress PRO/100B (82557, 82558) hint.fxp.0.prefer_iomap="0" device rl # RealTek 8129/8139 device pcn # AMD Am79C97x PCI 10/100 NICs device sf # Adaptec AIC-6915 (``Starfire'') device sis # Silicon Integrated Systems SiS 900/SiS 7016 device ste # Sundance ST201 (D-Link DFE-550TX) device tl # Texas Instruments ThunderLAN device tx # SMC EtherPower II (83c170 ``EPIC'') device vr # VIA Rhine, Rhine II device wb # Winbond W89C840F device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') # PCI Ethernet NICs. device de # DEC/Intel DC21x4x (``Tulip'') device txp # 3Com 3cR990 (``Typhoon'') device vx # 3Com 3c590, 3c595 (``Vortex'') device my # Myson controllers # PCI Gigabit & FDDI NICs. device bge device gx device lge device nge device sk device ti device fpa # Use "private" jumbo buffers allocated exclusively for the ti(4) driver. # This option is incompatible with the TI_JUMBO_HDRSPLIT option below. #options TI_PRIVATE_JUMBOS # Turn on the header splitting option for the ti(4) driver firmware. This # only works for Tigon II chips, and has no effect for Tigon I chips. options TI_JUMBO_HDRSPLIT # These two options allow manipulating the mbuf cluster size and mbuf size, # respectively. Be very careful with NIC driver modules when changing # these from their default values, because that can potentially cause a # mismatch between the mbuf size assumed by the kernel and the mbuf size # assumed by a module. The only driver that currently has the ability to # detect a mismatch is ti(4). options MCLSHIFT=12 # mbuf cluster shift in bits, 12 == 4KB options MSIZE=512 # mbuf size in bytes # # ATM related options (Cranor version) # (note: this driver cannot be used with the HARP ATM stack) # # The `en' device provides support for Efficient Networks (ENI) # ENI-155 PCI midway cards, and the Adaptec 155Mbps PCI ATM cards (ANA-59x0). # # atm device provides generic atm functions and is required for # atm devices. # NATM enables the netnatm protocol family that can be used to # bypass TCP/IP. # # the current driver supports only PVC operations (no atm-arp, no multicast). # for more details, please read the original documents at # http://www.ccrc.wustl.edu/pub/chuck/tech/bsdatm/bsdatm.html # device atm device en options NATM #native ATM # # Audio drivers: `pcm', `sbc', `gusc' # # pcm: PCM audio through various sound cards. # # This has support for a large number of new audio cards, based on # CS423x, OPTi931, Yamaha OPL-SAx, and also for SB16, GusPnP. # For more information about this driver and supported cards, # see the pcm.4 man page. # # The flags of the device tells the device a bit more info about the # device that normally is obtained through the PnP interface. # bit 2..0 secondary DMA channel; # bit 4 set if the board uses two dma channels; # bit 15..8 board type, overrides autodetection; leave it # zero if don't know what to put in (and you don't, # since this is unsupported at the moment...). # # Supported cards include: # Creative SoundBlaster ISA PnP/non-PnP # Supports ESS and Avance ISA chips as well. # Gravis UltraSound ISA PnP/non-PnP # Crystal Semiconductor CS461x/428x PCI # Neomagic 256AV (ac97) # Most of the more common ISA/PnP sb/mss/ess compatable cards. device pcm # For non-pnp sound cards with no bridge drivers only: hint.pcm.0.at="isa" hint.pcm.0.irq="10" hint.pcm.0.drq="1" hint.pcm.0.flags="0x0" # # midi: MIDI interfaces and synthesizers # device midi # For non-pnp sound cards with no bridge drivers: hint.midi.0.at="isa" hint.midi.0.irq="5" hint.midi.0.flags="0x0" # For serial ports (this example configures port 2): # TODO: implement generic tty-midi interface so that we can use # other uarts. hint.midi.0.at="isa" hint.midi.0.port="0x2F8" hint.midi.0.irq="3" # # seq: MIDI sequencer # device seq # The bridge drivers for sound cards. These can be separately configured # for providing services to the likes of new-midi. # When used with 'device pcm' they also provide pcm sound services. # # sbc: Creative SoundBlaster ISA PnP/non-PnP # Supports ESS and Avance ISA chips as well. # gusc: Gravis UltraSound ISA PnP/non-PnP # csa: Crystal Semiconductor CS461x/428x PCI # For non-PnP cards: device sbc hint.sbc.0.at="isa" hint.sbc.0.port="0x220" hint.sbc.0.irq="5" hint.sbc.0.drq="1" hint.sbc.0.flags="0x15" device gusc hint.gusc.0.at="isa" hint.gusc.0.port="0x220" hint.gusc.0.irq="5" hint.gusc.0.drq="1" hint.gusc.0.flags="0x13" # # Miscellaneous hardware: # +# mcd: Mitsumi CD-ROM using proprietary (non-ATAPI) interface # meteor: Matrox Meteor video capture board # bktr: Brooktree bt848/848a/849a/878/879 video capture and TV Tuner board # cy: Cyclades serial driver # digi: Digiboard driver # joy: joystick (including IO DATA PCJOY PC Card joystick) # rp: Comtrol Rocketport(ISA/PCI) - single card # si: Specialix SI/XIO 4-32 port terminal multiplexor # nmdm: nullmodem terminal driver (see nmdm(4)) # Notes on the Digiboard driver: # # The following flag values have special meanings in dgb: # 0x01 - alternate layout of pins # 0x02 - use the windowed PC/Xe in 64K mode # Notes on the Comtrol Rocketport driver: # # The exact values used for rp0 depend on how many boards you have # in the system. The manufacturer's sample configs are listed as: # # device rp # core driver support # # Comtrol Rocketport ISA single card # hint.rp.0.at="isa" # hint.rp.0.port="0x280" # # If instead you have two ISA cards, one installed at 0x100 and the # second installed at 0x180, then you should add the following to # your kernel probe hints: # hint.rp.0.at="isa" # hint.rp.0.port="0x100" # hint.rp.1.at="isa" # hint.rp.1.port="0x180" # # For 4 ISA cards, it might be something like this: # hint.rp.0.at="isa" # hint.rp.0.port="0x180" # hint.rp.1.at="isa" # hint.rp.1.port="0x100" # hint.rp.2.at="isa" # hint.rp.2.port="0x340" # hint.rp.3.at="isa" # hint.rp.3.port="0x240" # # For PCI cards, you need no hints. + +# Mitsumi CD-ROM +device mcd +hint.mcd.0.at="isa" +hint.mcd.0.port="0x300" device joy # PnP aware, hints for nonpnp only hint.joy.0.at="isa" hint.joy.0.port="0x201" device digi hint.digi.0.at="isa" hint.digi.0.port="0x104" hint.digi.0.maddr="0xd0000" # BIOS & FEP/OS components of device digi. device digi_CX device digi_CX_PCI device digi_EPCX device digi_EPCX_PCI device digi_Xe device digi_Xem device digi_Xr device rp hint.rp.0.at="isa" hint.rp.0.port="0x280" device si options SI_DEBUG hint.si.0.at="isa" hint.si.0.maddr="0xd0000" hint.si.0.irq="12" device nmdm # HOT1 Xilinx 6200 card (http://www.vcc.com/) device xrpu # # The `meteor' device is a PCI video capture board. It can also have the # following options: # options METEOR_ALLOC_PAGES=xxx preallocate kernel pages for data entry # figure (ROWS*COLUMN*BYTES_PER_PIXEL*FRAME+PAGE_SIZE-1)/PAGE_SIZE # options METEOR_DEALLOC_PAGES remove all allocated pages on close(2) # options METEOR_DEALLOC_ABOVE=xxx remove all allocated pages above the # specified amount. If this value is below the allocated amount no action # taken # options METEOR_SYSTEM_DEFAULT={METEOR_PAL|METEOR_NTSC|METEOR_SECAM}, used # for initialization of fps routine when a signal is not present. # # The 'bktr' device is a PCI video capture device using the Brooktree # bt848/bt848a/bt849a/bt878/bt879 chipset. When used with a TV Tuner it forms a # TV card, eg Miro PC/TV, Hauppauge WinCast/TV WinTV, VideoLogic Captivator, # Intel Smart Video III, AverMedia, IMS Turbo, FlyVideo. # # options OVERRIDE_CARD=xxx # options OVERRIDE_TUNER=xxx # options OVERRIDE_MSP=1 # options OVERRIDE_DBX=1 # These options can be used to override the auto detection # The current values for xxx are found in src/sys/dev/bktr/bktr_card.h # Using sysctl(8) run-time overrides on a per-card basis can be made # # options BROOKTREE_SYSTEM_DEFAULT=BROOKTREE_PAL # or # options BROOKTREE_SYSTEM_DEFAULT=BROOKTREE_NTSC # Specifes the default video capture mode. # This is required for Dual Crystal (28&35Mhz) boards where PAL is used # to prevent hangs during initialisation. eg VideoLogic Captivator PCI. # # options BKTR_USE_PLL # PAL or SECAM users who have a 28Mhz crystal (and no 35Mhz crystal) # must enable PLL mode with this option. eg some new Bt878 cards. # # options BKTR_GPIO_ACCESS # This enable IOCTLs which give user level access to the GPIO port. # # options BKTR_NO_MSP_RESET # Prevents the MSP34xx reset. Good if you initialise the MSP in another OS first # # options BKTR_430_FX_MODE # Switch Bt878/879 cards into Intel 430FX chipset compatibility mode. # # options BKTR_SIS_VIA_MODE # Switch Bt878/879 cards into SIS/VIA chipset compatibility mode which is # needed for some old SiS and VIA chipset motherboards. # This also allows Bt878/879 chips to work on old OPTi (<1997) chipset # motherboards and motherboards with bad or incomplete PCI 2.1 support. # As a rough guess, old = before 1998 # device meteor 1 # # options BKTR_USE_FREEBSD_SMBUS # Compile with FreeBSD SMBus implementation # # Brooktree driver has been ported to the new I2C framework. Thus, # you'll need to have the following 3 lines in the kernel config. # device smbus # device iicbus # device iicbb # device iicsmb # The iic and smb devices are only needed if you want to control other # I2C slaves connected to the external connector of some cards. # device bktr # # PC Card/PCMCIA # (OLDCARD) # # card: pccard slots # pcic: isa/pccard bridge #device pcic #hint.pcic.0.at="isa" #hint.pcic.1.at="isa" #device card 1 # # PC Card/PCMCIA and Cardbus # (NEWCARD) # # Note that NEWCARD and OLDCARD are incompatible. Do not use both at the same # time. # # pccbb: pci/cardbus bridge implementing YENTA interface # pccard: pccard slots # cardbus: cardbus slots device cbb device pccard device cardbus #device pcic ISA attachment currently busted #hint.pcic.0.at="isa" #hint.pcic.1.at="isa" # # SMB bus # # System Management Bus support is provided by the 'smbus' device. # Access to the SMBus device is via the 'smb' device (/dev/smb*), # which is a child of the 'smbus' device. # # Supported devices: # smb standard io through /dev/smb* # # Supported SMB interfaces: # iicsmb I2C to SMB bridge with any iicbus interface # bktr brooktree848 I2C hardware interface # intpm Intel PIIX4 (82371AB, 82443MX) Power Management Unit # alpm Acer Aladdin-IV/V/Pro2 Power Management Unit # ichsmb Intel ICH SMBus controller chips (82801AA, 82801AB, 82801BA) # viapm VIA VT82C586B/596B/686A and VT8233 Power Management Unit # amdpm AMD 756 Power Management Unit # nfpm NVIDIA nForce Power Management Unit # device smbus # Bus support, required for smb below. device intpm device alpm device ichsmb device viapm device amdpm device nfpm device smb # # I2C Bus # # Philips i2c bus support is provided by the `iicbus' device. # # Supported devices: # ic i2c network interface # iic i2c standard io # iicsmb i2c to smb bridge. Allow i2c i/o with smb commands. # # Supported interfaces: # bktr brooktree848 I2C software interface # # Other: # iicbb generic I2C bit-banging code (needed by lpbb, bktr) # device iicbus # Bus support, required for ic/iic/iicsmb below. device iicbb device ic device iic device iicsmb # smb over i2c bridge # Parallel-Port Bus # # Parallel port bus support is provided by the `ppbus' device. # Multiple devices may be attached to the parallel port, devices # are automatically probed and attached when found. # # Supported devices: # vpo Iomega Zip Drive # Requires SCSI disk support ('scbus' and 'da'), best # performance is achieved with ports in EPP 1.9 mode. # lpt Parallel Printer # plip Parallel network interface # ppi General-purpose I/O ("Geek Port") + IEEE1284 I/O # pps Pulse per second Timing Interface # lpbb Philips official parallel port I2C bit-banging interface # # Supported interfaces: # ppc ISA-bus parallel port interfaces. # options PPC_PROBE_CHIPSET # Enable chipset specific detection # (see flags in ppc(4)) options DEBUG_1284 # IEEE1284 signaling protocol debug options PERIPH_1284 # Makes your computer act as a IEEE1284 # compliant peripheral options DONTPROBE_1284 # Avoid boot detection of PnP parallel devices options VP0_DEBUG # ZIP/ZIP+ debug options LPT_DEBUG # Printer driver debug options PPC_DEBUG # Parallel chipset level debug options PLIP_DEBUG # Parallel network IP interface debug options PCFCLOCK_VERBOSE # Verbose pcfclock driver options PCFCLOCK_MAX_RETRIES=5 # Maximum read tries (default 10) device ppc hint.ppc.0.at="isa" hint.ppc.0.irq="7" device ppbus device vpo device lpt device plip device ppi device pps device lpbb device pcfclock # Kernel BOOTP support options BOOTP # Use BOOTP to obtain IP address/hostname # Requires NFSCLIENT and NFS_ROOT options BOOTP_NFSROOT # NFS mount root filesystem using BOOTP info options BOOTP_NFSV3 # Use NFS v3 to NFS mount root options BOOTP_COMPAT # Workaround for broken bootp daemons. options BOOTP_WIRED_TO=fxp0 # Use interface fxp0 for BOOTP # # Add tie-ins for a hardware watchdog. This only enable the hooks; # the user must still supply the actual driver. # options HW_WDOG # # Disable swapping. This option removes all code which actually performs # swapping, so it's not possible to turn it back on at run-time. # # This is sometimes usable for systems which don't have any swap space # (see also sysctls "vm.defer_swapspace_pageouts" and # "vm.disable_swapspace_pageouts") # #options NO_SWAPPING # Set the number of sf_bufs to allocate. sf_bufs are virtual buffers # for sendfile(2) that are used to map file VM pages, and normally # default to a quantity that is roughly 16*MAXUSERS+512. You would # typically want about 4 of these for each simultaneous file send. # options NSFBUFS=1024 # # Enable extra debugging code for locks. This stores the filename and # line of whatever acquired the lock in the lock itself, and change a # number of function calls to pass around the relevant data. This is # not at all useful unless you are debugging lock code. Also note # that it is likely to break e.g. fstat(1) unless you recompile your # userland with -DDEBUG_LOCKS as well. # options DEBUG_LOCKS ##################################################################### # USB support # UHCI controller device uhci # OHCI controller device ohci # General USB code (mandatory for USB) device usb # # USB Double Bulk Pipe devices device udbp # Generic USB device driver device ugen # Human Interface Device (anything with buttons and dials) device uhid # USB keyboard device ukbd # USB printer device ulpt # USB Iomega Zip 100 Drive (Requires scbus and da) device umass # USB modem support device umodem # USB mouse device ums # Diamond Rio 500 Mp3 player device urio # USB scanners device uscanner # USB serial support device ucom # USB support for serial adapters based on the FT8U100AX and FT8U232AM device uftdi # USB support for Prolific PL-2303 serial adapters device uplcom # USB serial support for DDI pocket's PHS device uvscom # USB Visor and Palm devices device uvisor # USB Fm Radio device ufm # # ADMtek USB ethernet. Supports the LinkSys USB100TX, # the Billionton USB100, the Melco LU-ATX, the D-Link DSB-650TX # and the SMC 2202USB. Also works with the ADMtek AN986 Pegasus # eval board. device aue # # CATC USB-EL1201A USB ethernet. Supports the CATC Netmate # and Netmate II, and the Belkin F5U111. device cue # # Kawasaki LSI ethernet. Supports the LinkSys USB10T, # Entrega USB-NET-E45, Peracom Ethernet Adapter, the # 3Com 3c19250, the ADS Technologies USB-10BT, the ATen UC10T, # the Netgear EA101, the D-Link DSB-650, the SMC 2102USB # and 2104USB, and the Corega USB-T. device kue # debugging options for the USB subsystem # options USB_DEBUG # options for ukbd: options UKBD_DFLT_KEYMAP # specify the built-in keymap makeoptions UKBD_DFLT_KEYMAP=it.iso # # Embedded system options: # # An embedded system might want to run something other than init. options INIT_PATH="/sbin/init:/stand/sysinstall" # Debug options options BUS_DEBUG # enable newbus debugging options DEBUG_VFS_LOCKS # enable vfs lock debugging options NPX_DEBUG # enable npx debugging (FPU/math emu) ##################################################################### # SYSV IPC KERNEL PARAMETERS # # Maximum number of entries in a semaphore map. options SEMMAP=31 # Maximum number of System V semaphores that can be used on the system at # one time. options SEMMNI=11 # Total number of semaphores system wide options SEMMNS=61 # Total number of undo structures in system options SEMMNU=31 # Maximum number of System V semaphores that can be used by a single process # at one time. options SEMMSL=61 # Maximum number of operations that can be outstanding on a single System V # semaphore at one time. options SEMOPM=101 # Maximum number of undo operations that can be outstanding on a single # System V semaphore at one time. options SEMUME=11 # Maximum number of shared memory pages system wide. options SHMALL=1025 # Maximum size, in bytes, of a single System V shared memory region. options SHMMAX="(SHMMAXPGS*PAGE_SIZE+1)" options SHMMAXPGS=1025 # Minimum size, in bytes, of a single System V shared memory region. options SHMMIN=2 # Maximum number of shared memory regions that can be used on the system # at one time. options SHMMNI=33 # Maximum number of System V shared memory regions that can be attached to # a single process at one time. options SHMSEG=9 # Set the amount of time (in seconds) the system will wait before # rebooting automatically when a kernel panic occurs. If set to (-1), # the system will wait indefinitely until a key is pressed on the # console. options PANIC_REBOOT_WAIT_TIME=16 ##################################################################### # More undocumented options for linting. # Note that documenting these are not considered an affront. options CAM_DEBUG_DELAY # VFS cluster debugging. options CLUSTERDEBUG options DEBUG # Kernel filelock debugging. options LOCKF_DEBUG # System V compatible message queues # Please note that the values provided here are used to test kernel # building. The defaults in the sources provide almost the same numbers. # MSGSSZ must be a power of 2 between 8 and 1024. options MSGMNB=2049 # Max number of chars in queue options MSGMNI=41 # Max number of message queue identifiers options MSGSEG=2049 # Max number of message segments options MSGSSZ=16 # Size of a message segment options MSGTQL=41 # Max number of messages in system options NBUF=512 # Number of buffer headers options NMBCLUSTERS=1024 # Number of mbuf clusters options SCSI_NCR_DEBUG options SCSI_NCR_MAX_SYNC=10000 options SCSI_NCR_MAX_WIDE=1 options SCSI_NCR_MYADDR=7 options SC_DEBUG_LEVEL=5 # Syscons debug level options SC_RENDER_DEBUG # syscons rendering debugging options SHOW_BUSYBUFS # List buffers that prevent root unmount options SLIP_IFF_OPTS options VFS_BIO_DEBUG # VFS buffer I/O debugging options KSTACK_MAX_PAGES=32 # Maximum pages to give the kernel stack # Yet more undocumented options for linting. options AAC_DEBUG options ACD_DEBUG options ACPI_MAX_THREADS=1 #!options ACPI_NO_SEMAPHORES # Broken: ##options ASR_MEASURE_PERFORMANCE options AST_DEBUG options ATAPI_DEBUG options ATA_DEBUG # BKTR_ALLOC_PAGES has no effect except to cause warnings, and # BROOKTREE_ALLOC_PAGES hasn't actually been superseded by it, since the # driver still mostly spells this option BROOKTREE_ALLOC_PAGES. ##options BKTR_ALLOC_PAGES="(217*4+1)" options BROOKTREE_ALLOC_PAGES="(217*4+1)" options MAXFILES=999 # METEOR_TEST_VIDEO has no effect since meteor is broken. options METEOR_TEST_VIDEO options NDEVFSINO=1025 options NDEVFSOVERFLOW=32769 # Yet more undocumented options for linting. options VGA_DEBUG Index: head/sys/conf/files =================================================================== --- head/sys/conf/files (revision 104444) +++ head/sys/conf/files (revision 104445) @@ -1,1431 +1,1433 @@ # $FreeBSD$ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and # dependency lines other than the first are silently ignored. # aicasm optional ahc \ dependency "$S/dev/aic7xxx/aicasm/*.[chyl]" \ compile-with "${MAKE} -f $S/dev/aic7xxx/aicasm/Makefile MAKESRCPATH=$S/dev/aic7xxx/aicasm" \ no-obj no-implicit-rule \ clean "aicasm* y.tab.h" aicasm optional ahd \ dependency "$S/dev/aic7xxx/aicasm/*.[chyl]" \ compile-with "${MAKE} -f $S/dev/aic7xxx/aicasm/Makefile MAKESRCPATH=$S/dev/aic7xxx/aicasm" \ no-obj no-implicit-rule \ clean "aicasm* y.tab.h" aic7xxx_{seq.h,reg.h,reg_print.c} optional ahc \ compile-with "./aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic7xxx_seq.h -r aic7xxx_reg.h -p aic7xxx_reg_print.c -i $S/dev/aic7xxx/aic7xxx_osm.h $S/dev/aic7xxx/aic7xxx.seq" \ no-obj no-implicit-rule before-depend \ clean "aic7xxx_seq.h aic7xxx_reg.h aic7xxx_reg_print.c" \ dependency "$S/dev/aic7xxx/aic7xxx.{reg,seq} $S/cam/scsi/scsi_message.h aicasm" aic7xxx_reg_print.o optional ahc ahc_reg_pretty_print \ compile-with "${NORMAL_C}" \ no-implicit-rule local aic79xx_{seq.h,reg.h,reg_print.c} optional ahd pci \ compile-with "./aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic79xx_seq.h -r aic79xx_reg.h -p aic79xx_reg_print.c -i $S/dev/aic7xxx/aic79xx_osm.h $S/dev/aic7xxx/aic79xx.seq" \ no-obj no-implicit-rule before-depend \ clean "aic79xx_seq.h aic79xx_reg.h aic79xx_reg_print.c" \ dependency "$S/dev/aic7xxx/aic79xx.{reg,seq} $S/cam/scsi/scsi_message.h aicasm" aic79xx_reg_print.o optional ahd pci ahd_reg_pretty_print \ compile-with "${NORMAL_C}" \ no-implicit-rule local kern/device_if.m standard kern/bus_if.m standard kern/clock_if.m optional genclock kern/linker_if.m standard cam/cam.c optional scbus cam/cam_periph.c optional scbus cam/cam_queue.c optional scbus cam/cam_sim.c optional scbus cam/cam_xpt.c optional scbus cam/scsi/scsi_all.c optional scbus cam/scsi/scsi_cd.c optional cd cam/scsi/scsi_ch.c optional ch cam/scsi/scsi_da.c optional da cam/scsi/scsi_low.c optional ct cam/scsi/scsi_low.c optional ncv cam/scsi/scsi_low.c optional nsp cam/scsi/scsi_low.c optional stg cam/scsi/scsi_low_pisa.c optional ct cam/scsi/scsi_low_pisa.c optional ncv cam/scsi/scsi_low_pisa.c optional nsp cam/scsi/scsi_low_pisa.c optional stg cam/scsi/scsi_pass.c optional pass cam/scsi/scsi_pt.c optional pt cam/scsi/scsi_sa.c optional sa cam/scsi/scsi_ses.c optional ses cam/scsi/scsi_targ_bh.c optional targbh cam/scsi/scsi_target.c optional targ coda/coda_fbsd.c count vcoda coda/coda_namecache.c optional vcoda coda/coda_psdev.c optional vcoda coda/coda_subr.c optional vcoda coda/coda_venus.c optional vcoda coda/coda_vfsops.c optional vcoda coda/coda_vnops.c optional vcoda compat/linprocfs/linprocfs.c optional linprocfs contrib/dev/acpica/dbcmds.c optional acpica acpi_debug nowerror contrib/dev/acpica/dbdisply.c optional acpica acpi_debug nowerror contrib/dev/acpica/dbexec.c optional acpica acpi_debug nowerror contrib/dev/acpica/dbfileio.c optional acpica acpi_debug nowerror contrib/dev/acpica/dbhistry.c optional acpica acpi_debug nowerror contrib/dev/acpica/dbinput.c optional acpica acpi_debug nowerror contrib/dev/acpica/dbstats.c optional acpica acpi_debug nowerror contrib/dev/acpica/dbutils.c optional acpica acpi_debug nowerror contrib/dev/acpica/dbxface.c optional acpica acpi_debug nowerror contrib/dev/acpica/dmbuffer.c optional acpica acpi_debug nowerror contrib/dev/acpica/dmnames.c optional acpica acpi_debug nowerror contrib/dev/acpica/dmopcode.c optional acpica acpi_debug nowerror contrib/dev/acpica/dmresrc.c optional acpica acpi_debug nowerror contrib/dev/acpica/dmresrcl.c optional acpica acpi_debug nowerror contrib/dev/acpica/dmresrcs.c optional acpica acpi_debug nowerror contrib/dev/acpica/dmutils.c optional acpica acpi_debug nowerror contrib/dev/acpica/dmwalk.c optional acpica acpi_debug nowerror contrib/dev/acpica/dsfield.c optional acpica nowerror contrib/dev/acpica/dsmethod.c optional acpica contrib/dev/acpica/dsmthdat.c optional acpica contrib/dev/acpica/dsobject.c optional acpica contrib/dev/acpica/dsopcode.c optional acpica nowerror contrib/dev/acpica/dsutils.c optional acpica contrib/dev/acpica/dswexec.c optional acpica contrib/dev/acpica/dswload.c optional acpica contrib/dev/acpica/dswscope.c optional acpica contrib/dev/acpica/dswstate.c optional acpica contrib/dev/acpica/evevent.c optional acpica contrib/dev/acpica/evmisc.c optional acpica contrib/dev/acpica/evregion.c optional acpica contrib/dev/acpica/evrgnini.c optional acpica contrib/dev/acpica/evsci.c optional acpica contrib/dev/acpica/evxface.c optional acpica contrib/dev/acpica/evxfevnt.c optional acpica contrib/dev/acpica/evxfregn.c optional acpica contrib/dev/acpica/exconfig.c optional acpica contrib/dev/acpica/exconvrt.c optional acpica nowerror contrib/dev/acpica/excreate.c optional acpica contrib/dev/acpica/exdump.c optional acpica nowerror contrib/dev/acpica/exfield.c optional acpica contrib/dev/acpica/exfldio.c optional acpica contrib/dev/acpica/exmisc.c optional acpica contrib/dev/acpica/exmutex.c optional acpica contrib/dev/acpica/exnames.c optional acpica contrib/dev/acpica/exoparg1.c optional acpica contrib/dev/acpica/exoparg2.c optional acpica contrib/dev/acpica/exoparg3.c optional acpica contrib/dev/acpica/exoparg6.c optional acpica nowerror contrib/dev/acpica/exprep.c optional acpica contrib/dev/acpica/exregion.c optional acpica contrib/dev/acpica/exresnte.c optional acpica contrib/dev/acpica/exresolv.c optional acpica contrib/dev/acpica/exresop.c optional acpica nowerror contrib/dev/acpica/exstore.c optional acpica contrib/dev/acpica/exstoren.c optional acpica contrib/dev/acpica/exstorob.c optional acpica contrib/dev/acpica/exsystem.c optional acpica contrib/dev/acpica/exutils.c optional acpica contrib/dev/acpica/hwacpi.c optional acpica contrib/dev/acpica/hwgpe.c optional acpica nowerror contrib/dev/acpica/hwregs.c optional acpica nowerror contrib/dev/acpica/hwsleep.c optional acpica contrib/dev/acpica/hwtimer.c optional acpica contrib/dev/acpica/nsaccess.c optional acpica contrib/dev/acpica/nsalloc.c optional acpica contrib/dev/acpica/nsdump.c optional acpica nowerror contrib/dev/acpica/nseval.c optional acpica contrib/dev/acpica/nsinit.c optional acpica contrib/dev/acpica/nsload.c optional acpica contrib/dev/acpica/nsnames.c optional acpica nowerror contrib/dev/acpica/nsobject.c optional acpica contrib/dev/acpica/nssearch.c optional acpica contrib/dev/acpica/nsutils.c optional acpica contrib/dev/acpica/nswalk.c optional acpica contrib/dev/acpica/nsxfeval.c optional acpica nowerror contrib/dev/acpica/nsxfname.c optional acpica nowerror contrib/dev/acpica/nsxfobj.c optional acpica nowerror contrib/dev/acpica/psargs.c optional acpica contrib/dev/acpica/psfind.c optional acpica contrib/dev/acpica/psopcode.c optional acpica contrib/dev/acpica/psparse.c optional acpica contrib/dev/acpica/psscope.c optional acpica contrib/dev/acpica/pstree.c optional acpica contrib/dev/acpica/psutils.c optional acpica contrib/dev/acpica/pswalk.c optional acpica contrib/dev/acpica/psxface.c optional acpica contrib/dev/acpica/rsaddr.c optional acpica contrib/dev/acpica/rscalc.c optional acpica contrib/dev/acpica/rscreate.c optional acpica contrib/dev/acpica/rsdump.c optional acpica nowerror contrib/dev/acpica/rsio.c optional acpica contrib/dev/acpica/rsirq.c optional acpica contrib/dev/acpica/rslist.c optional acpica contrib/dev/acpica/rsmemory.c optional acpica contrib/dev/acpica/rsmisc.c optional acpica contrib/dev/acpica/rsutils.c optional acpica contrib/dev/acpica/rsxface.c optional acpica contrib/dev/acpica/tbconvrt.c optional acpica contrib/dev/acpica/tbget.c optional acpica contrib/dev/acpica/tbgetall.c optional acpica contrib/dev/acpica/tbinstal.c optional acpica contrib/dev/acpica/tbrsdt.c optional acpica contrib/dev/acpica/tbutils.c optional acpica contrib/dev/acpica/tbxface.c optional acpica contrib/dev/acpica/tbxfroot.c optional acpica contrib/dev/acpica/utalloc.c optional acpica contrib/dev/acpica/utclib.c optional acpica nowerror contrib/dev/acpica/utcopy.c optional acpica nowerror contrib/dev/acpica/utdebug.c optional acpica nowerror contrib/dev/acpica/utdelete.c optional acpica contrib/dev/acpica/uteval.c optional acpica contrib/dev/acpica/utglobal.c optional acpica nowerror contrib/dev/acpica/utinit.c optional acpica contrib/dev/acpica/utmath.c optional acpica contrib/dev/acpica/utmisc.c optional acpica nowerror contrib/dev/acpica/utobject.c optional acpica nowerror contrib/dev/acpica/utxface.c optional acpica contrib/ipfilter/netinet/fil.c optional ipfilter inet contrib/ipfilter/netinet/ip_auth.c optional ipfilter inet contrib/ipfilter/netinet/ip_fil.c optional ipfilter inet contrib/ipfilter/netinet/ip_frag.c optional ipfilter inet contrib/ipfilter/netinet/ip_log.c optional ipfilter inet contrib/ipfilter/netinet/ip_nat.c optional ipfilter inet contrib/ipfilter/netinet/ip_proxy.c optional ipfilter inet contrib/ipfilter/netinet/ip_state.c optional ipfilter inet contrib/ipfilter/netinet/mlfk_ipl.c optional ipfilter inet crypto/blowfish/bf_skey.c optional ipsec ipsec_esp crypto/cast128/cast128.c optional ipsec ipsec_esp crypto/des/des_ecb.c optional ipsec ipsec_esp crypto/des/des_setkey.c optional ipsec ipsec_esp crypto/rijndael/rijndael-alg-fst.c optional ipsec ipsec_esp crypto/rijndael/rijndael-api-fst.c optional ipsec ipsec_esp crypto/sha1.c optional ipsec crypto/sha2/sha2.c optional ipsec ddb/db_access.c optional ddb ddb/db_break.c optional ddb ddb/db_command.c optional ddb ddb/db_elf.c optional ddb ddb/db_examine.c optional ddb ddb/db_expr.c optional ddb ddb/db_input.c optional ddb ddb/db_kld.c optional ddb ddb/db_lex.c optional ddb ddb/db_output.c optional ddb ddb/db_print.c optional ddb ddb/db_ps.c optional ddb ddb/db_run.c optional ddb ddb/db_sym.c optional ddb ddb/db_sysctl.c optional ddb ddb/db_trap.c optional ddb ddb/db_variables.c optional ddb ddb/db_watch.c optional ddb ddb/db_write_cmd.c optional ddb dev/aac/aac.c optional aac dev/aac/aac_debug.c optional aac dev/aac/aac_disk.c optional aac dev/aac/aac_pci.c optional aac pci dev/aac/aac_cam.c optional aacp aac dev/aac/aac_linux.c optional aac compat_linux dev/acpica/acpi.c optional acpica dev/acpica/acpica_support.c optional acpica dev/acpica/acpi_acad.c optional acpica nowerror dev/acpica/acpi_battery.c optional acpica dev/acpica/acpi_button.c optional acpica dev/acpica/acpi_cmbat.c optional acpica nowerror dev/acpica/acpi_cpu.c optional acpica dev/acpica/acpi_ec.c optional acpica dev/acpica/acpi_lid.c optional acpica dev/acpica/acpi_pci.c optional acpica pci dev/acpica/acpi_pcib.c optional acpica pci dev/acpica/acpi_pcib_acpi.c optional acpica pci dev/acpica/acpi_pcib_pci.c optional acpica pci dev/acpica/acpi_powerres.c optional acpica nowerror dev/acpica/acpi_resource.c optional acpica dev/acpica/acpi_thermal.c optional acpica dev/acpica/acpi_timer.c optional acpica dev/acpica/Osd/OsdDebug.c optional acpica dev/acpica/Osd/OsdHardware.c optional acpica dev/acpica/Osd/OsdInterrupt.c optional acpica dev/acpica/Osd/OsdMemory.c optional acpica dev/acpica/Osd/OsdSchedule.c optional acpica dev/acpica/Osd/OsdStream.c optional acpica dev/acpica/Osd/OsdSynch.c optional acpica dev/acpica/Osd/OsdTable.c optional acpica dev/advansys/adv_eisa.c optional adv eisa dev/advansys/adv_pci.c optional adv pci dev/advansys/advansys.c optional adv dev/advansys/advlib.c optional adv dev/advansys/advmcode.c optional adv dev/advansys/adw_pci.c optional adw pci dev/advansys/adwcam.c optional adw dev/advansys/adwlib.c optional adw dev/advansys/adwmcode.c optional adw dev/aha/aha.c optional aha dev/aha/aha_isa.c optional aha isa dev/aha/aha_mca.c optional aha mca dev/ahb/ahb.c optional ahb eisa dev/aic/aic.c optional aic dev/aic/aic_pccard.c optional aic card dev/aic/aic_pccard.c optional aic pccard dev/aic7xxx/aic7770.c optional ahc eisa dev/aic7xxx/ahc_eisa.c optional ahc eisa #dev/aic7xxx/ahc_isa.c optional ahc isa dev/aic7xxx/ahc_pci.c optional ahc pci dev/aic7xxx/aic7xxx.c optional ahc dev/aic7xxx/aic7xxx_93cx6.c optional ahc dev/aic7xxx/aic7xxx_osm.c optional ahc dev/aic7xxx/aic7xxx_pci.c optional ahc pci dev/aic7xxx/ahd_pci.c optional ahd pci dev/aic7xxx/aic79xx.c optional ahd pci dev/aic7xxx/aic79xx_osm.c optional ahd pci dev/aic7xxx/aic79xx_pci.c optional ahd pci dev/amr/amr.c optional amr dev/amr/amr_disk.c optional amr dev/amr/amr_pci.c optional amr dev/an/if_an.c optional an dev/an/if_an_isa.c optional an isa dev/an/if_an_pccard.c optional an card dev/an/if_an_pccard.c optional an pccard dev/an/if_an_pci.c optional an pci dev/ar/if_ar.c optional ar dev/ar/if_ar_pci.c optional ar pci dev/asr/asr.c optional asr pci dev/ata/ata-all.c optional ata dev/ata/ata-isa.c optional ata isa dev/ata/ata-card.c optional ata card dev/ata/ata-card.c optional ata pccard dev/ata/ata-pci.c optional ata pci dev/ata/ata-dma.c optional ata pci dev/ata/ata-disk.c optional atadisk dev/ata/ata-raid.c optional atadisk dev/ata/atapi-all.c optional atapicd dev/ata/atapi-all.c optional atapifd dev/ata/atapi-all.c optional atapist dev/ata/atapi-all.c optional atapicam dev/ata/atapi-cd.c optional atapicd dev/ata/atapi-fd.c optional atapifd dev/ata/atapi-tape.c optional atapist dev/ata/atapi-cam.c optional atapicam dev/awi/am79c930.c optional awi dev/awi/awi.c optional awi dev/awi/awi_wep.c optional awi dev/awi/awi_wicfg.c optional awi dev/awi/if_awi_pccard.c optional awi card dev/awi/if_awi_pccard.c optional awi pccard dev/bge/if_bge.c optional bge dev/bktr/bktr_audio.c optional bktr pci dev/bktr/bktr_card.c optional bktr pci dev/bktr/bktr_core.c optional bktr pci dev/bktr/bktr_i2c.c optional bktr pci smbus dev/bktr/bktr_os.c optional bktr pci dev/bktr/bktr_tuner.c optional bktr pci dev/buslogic/bt.c optional bt dev/buslogic/bt_eisa.c optional bt eisa dev/buslogic/bt_isa.c optional bt isa dev/buslogic/bt_mca.c optional bt mca dev/buslogic/bt_pci.c optional bt pci dev/cardbus/cardbus.c optional cardbus dev/cardbus/cardbus_cis.c optional cardbus dev/ccd/ccd.c optional ccd dev/ciss/ciss.c optional ciss dev/cm/smc90cx6.c optional cm dev/cnw/if_cnw.c optional cnw card #dev/cnw/if_cnw.c optional cnw pccard dev/cs/if_cs.c optional cs dev/cs/if_cs_isa.c optional cs isa dev/cs/if_cs_pccard.c optional cs card dev/cs/if_cs_pccard.c optional cs pccard dev/dgb/dgb.c count dgb dev/digi/digi.c optional digi dev/digi/digi_isa.c optional digi dev/digi/digi_pci.c optional digi dev/digi/CX.c optional digi_CX dev/digi/CX_PCI.c optional digi_CX_PCI dev/digi/EPCX.c optional digi_EPCX dev/digi/EPCX_PCI.c optional digi_EPCX_PCI dev/digi/Xe.c optional digi_Xe dev/digi/Xem.c optional digi_Xem dev/digi/Xr.c optional digi_Xr #dev/dpt/dpt_control.c optional dpt dev/dpt/dpt_eisa.c optional dpt eisa dev/dpt/dpt_pci.c optional dpt pci dev/dpt/dpt_scsi.c optional dpt dev/drm/gamma_dma.c optional gammadrm dev/drm/gamma_drv.c optional gammadrm dev/drm/mga_dma.c optional mgadrm dev/drm/mga_drv.c optional mgadrm dev/drm/mga_state.c optional mgadrm dev/drm/mga_warp.c optional mgadrm dev/drm/r128_cce.c optional r128drm dev/drm/r128_drv.c optional r128drm dev/drm/r128_state.c optional r128drm dev/drm/radeon_cp.c optional radeondrm dev/drm/radeon_drv.c optional radeondrm dev/drm/radeon_state.c optional radeondrm dev/drm/tdfx_drv.c optional tdfxdrm dev/ed/if_ed.c optional ed dev/ed/if_ed_pccard.c optional ed card dev/ed/if_ed_pccard.c optional ed pccard dev/ed/if_ed_pci.c optional ed pci dev/em/if_em.c optional em dev/em/if_em_hw.c optional em dev/en/midway.c optional en dev/ep/if_ep.c optional ep dev/ep/if_ep_eisa.c optional ep eisa dev/ep/if_ep_isa.c optional ep isa dev/ep/if_ep_mca.c optional ep mca dev/ep/if_ep_pccard.c optional ep card dev/ep/if_ep_pccard.c optional ep pccard dev/ex/if_ex.c optional ex dev/ex/if_ex_isa.c optional ex isa dev/ex/if_ex_pccard.c optional ex card #dev/ex/if_ex_pccard.c optional ex pccard dev/exca/exca.c optional cbb dev/fe/if_fe.c optional fe dev/fe/if_fe_pccard.c optional fe card dev/fe/if_fe_pccard.c optional fe pccard dev/fxp/if_fxp.c optional fxp dev/gem/if_gem.c optional gem dev/gem/if_gem_pci.c optional gem pci dev/gx/if_gx.c optional gx dev/hea/eni.c optional hea nowerror dev/hea/eni_buffer.c optional hea nowerror dev/hea/eni_globals.c optional hea dev/hea/eni_if.c optional hea dev/hea/eni_init.c optional hea dev/hea/eni_intr.c optional hea dev/hea/eni_receive.c optional hea dev/hea/eni_transmit.c optional hea dev/hea/eni_vcm.c optional hea nowerror dev/hea/hea_pci.c optional hea pci dev/hea/hea_freebsd.c optional hea dev/hfa/fore_buffer.c optional hfa dev/hfa/fore_command.c optional hfa dev/hfa/fore_globals.c optional hfa dev/hfa/fore_if.c optional hfa dev/hfa/fore_init.c optional hfa dev/hfa/fore_intr.c optional hfa #dev/hfa/fore_load.c optional hfa nowerror dev/hfa/fore_output.c optional hfa dev/hfa/fore_receive.c optional hfa dev/hfa/fore_stats.c optional hfa dev/hfa/fore_timer.c optional hfa dev/hfa/fore_transmit.c optional hfa dev/hfa/fore_vcm.c optional hfa dev/hfa/hfa_freebsd.c optional hfa #dev/hfa/hfa_eisa.c optional hfa eisa dev/hfa/hfa_pci.c optional hfa pci #dev/hfa/hfa_sbus.c optional hfa sbus dev/hme/if_hme.c optional hme dev/hme/if_hme_pci.c optional hme pci dev/hme/if_hme_sbus.c optional hme sbus dev/ichsmb/ichsmb.c optional ichsmb dev/ichsmb/ichsmb_pci.c optional ichsmb pci dev/ida/ida.c optional ida dev/ida/ida_disk.c optional ida dev/ida/ida_eisa.c optional ida eisa dev/ida/ida_pci.c optional ida pci dev/ie/if_ie.c count ie isa nowerror dev/iicbus/iicbb_if.m optional iicbb dev/iicbus/iicbus_if.m optional iicbus dev/iicbus/if_ic.c optional ic dev/iicbus/iic.c optional iic dev/iicbus/iicbb.c optional iicbb dev/iicbus/iicbus.c optional iicbus dev/iicbus/iiconf.c optional iicbus dev/iicbus/iicsmb.c optional iicsmb \ dependency "iicbus_if.h" dev/iir/iir.c optional iir dev/iir/iir_ctrl.c optional iir dev/iir/iir_pci.c optional iir pci dev/isp/isp.c optional isp dev/isp/isp_freebsd.c optional isp dev/isp/isp_target.c optional isp dev/isp/isp_pci.c optional isp pci dev/isp/isp_sbus.c optional isp sbus dev/ispfw/ispfw.c optional ispfw dev/joy/joy.c optional joy dev/joy/joy_isa.c optional joy isa dev/joy/joy_pccard.c optional joy pccard dev/lge/if_lge.c optional lge dev/lmc/if_lmc.c optional lmc nowerror dev/lnc/if_lnc.c optional lnc dev/lnc/if_lnc_pci.c optional lnc pci dev/ncv/ncr53c500.c optional ncv dev/ncv/ncr53c500_pccard.c optional ncv card #dev/ncv/ncr53c500_pccard.c optional ncv pccard dev/nsp/nsp.c optional nsp dev/nsp/nsp_pccard.c optional nsp card #dev/nsp/nsp_pccard.c optional nsp pccard dev/mca/mca_bus.c optional mca +dev/mcd/mcd.c optional mcd isa +dev/mcd/mcd_isa.c optional mcd isa dev/md/md.c optional md dev/mii/amphy.c optional miibus dev/mii/bmtphy.c optional miibus dev/mii/brgphy.c optional miibus dev/mii/dcphy.c optional miibus pci dev/mii/e1000phy.c optional miibus dev/mii/exphy.c optional miibus dev/mii/inphy.c optional miibus dev/mii/mii.c optional miibus dev/mii/mii_physubr.c optional miibus dev/mii/mlphy.c optional miibus dev/mii/nsphy.c optional miibus dev/mii/nsgphy.c optional miibus dev/mii/pnphy.c optional miibus dev/mii/pnaphy.c optional miibus dev/mii/rlphy.c optional miibus dev/mii/tdkphy.c optional miibus dev/mii/tlphy.c optional miibus dev/mii/ukphy.c optional miibus dev/mii/ukphy_subr.c optional miibus dev/mii/xmphy.c optional miibus dev/mii/lxtphy.c optional miibus dev/mii/qsphy.c optional miibus dev/mii/acphy.c optional miibus dev/mii/miibus_if.m optional miibus dev/mk48txx/mk48txx.c optional mk48txx dev/mlx/mlx.c optional mlx dev/mlx/mlx_disk.c optional mlx dev/mlx/mlx_pci.c optional mlx dev/mly/mly.c optional mly dev/mpt/mpt.c optional mpt dev/mpt/mpt_debug.c optional mpt dev/mpt/mpt_freebsd.c optional mpt dev/mpt/mpt_pci.c optional mpt dev/my/if_my.c optional my dev/musycc/musycc.c optional musycc dev/nge/if_nge.c optional nge dev/null/null.c standard dev/nmdm/nmdm.c optional nmdm dev/pccard/card_if.m standard dev/pccard/pccard.c optional pccard dev/pccard/pccard_cis.c optional pccard dev/pccard/pccard_cis_quirks.c optional pccard dev/pccard/power_if.m standard dev/pccbb/pccbb.c optional cbb dev/pci/eisa_pci.c optional pci dev/pci/fixup_pci.c optional pci dev/pci/ignore_pci.c optional pci dev/pci/isa_pci.c optional pci dev/pci/pci.c optional pci dev/pci/pci_if.m standard dev/pci/pci_pci.c optional pci dev/pci/pci_user.c optional pci dev/pci/pcib_if.m standard dev/pcic/i82365.c optional pcic pccard dev/pcic/i82365_isa.c optional pcic pccard isa dev/pdq/if_fea.c optional fea eisa dev/pdq/if_fpa.c optional fpa pci dev/pdq/pdq.c optional fea eisa nowerror dev/pdq/pdq.c optional fpa pci nowerror dev/pdq/pdq_ifsubr.c optional fea eisa nowerror dev/pdq/pdq_ifsubr.c optional fpa pci nowerror dev/ppbus/ppbus_if.m optional ppbus dev/ppbus/if_plip.c optional plip dev/ppbus/immio.c optional vpo dev/ppbus/lpbb.c optional lpbb dev/ppbus/lpt.c optional lpt dev/ppbus/pcfclock.c optional pcfclock dev/ppbus/ppb_1284.c optional ppbus dev/ppbus/ppb_base.c optional ppbus dev/ppbus/ppb_msq.c optional ppbus dev/ppbus/ppbconf.c optional ppbus dev/ppbus/ppi.c optional ppi dev/ppbus/pps.c optional pps dev/ppbus/vpo.c optional vpo dev/ppbus/vpoio.c optional vpo dev/puc/puc.c optional puc dev/puc/puc_pci.c optional puc pci dev/puc/puc_pccard.c optional puc pccard dev/puc/pucdata.c optional puc pci dev/random/harvest.c standard dev/random/randomdev.c optional random dev/random/yarrow.c optional random dev/random/hash.c optional random crypto/rijndael/rijndael-alg-fst.c optional random crypto/rijndael/rijndael-api-fst.c optional random crypto/sha2/sha2.c optional random dev/ray/if_ray.c optional ray card dev/ray/if_ray.c optional ray pccard dev/rp/rp.c optional rp dev/rp/rp_isa.c optional rp isa dev/rp/rp_pci.c optional rp pci dev/sab/sab.c optional sab ebus dev/si/si.c optional si dev/si/si2_z280.c optional si dev/si/si3_t225.c optional si dev/si/si_eisa.c optional si eisa dev/si/si_isa.c optional si isa dev/si/si_pci.c optional si pci dev/sio/sio_ebus.c optional sio ebus dev/sio/sio_pccard.c optional sio card dev/sio/sio_pccard.c optional sio pccard dev/sio/sio_pci.c optional sio pci dev/sio/sio_puc.c optional sio puc pci dev/smbus/smbus_if.m optional smbus dev/smbus/smb.c optional smb dev/smbus/smbconf.c optional smbus dev/smbus/smbus.c optional smbus dev/sn/if_sn.c optional sn dev/sn/if_sn_isa.c optional sn isa dev/sn/if_sn_pccard.c optional sn card dev/sn/if_sn_pccard.c optional sn pccard dev/snp/snp.c optional snp dev/sound/isa/ad1816.c optional pcm isa dev/sound/isa/emu8000.c optional midi isa dev/sound/isa/es1888.c optional pcm isa dev/sound/isa/ess.c optional pcm isa dev/sound/isa/gusc.c optional gusc isa dev/sound/isa/gusc.c optional pcm isa dev/sound/isa/gusmidi.c optional midi isa dev/sound/isa/mpu.c optional midi isa dev/sound/isa/mss.c optional pcm isa dev/sound/isa/opl.c optional midi isa dev/sound/isa/sb16.c optional pcm isa dev/sound/isa/sb8.c optional pcm isa dev/sound/isa/sbc.c optional pcm isa dev/sound/isa/sbc.c optional sbc isa dev/sound/isa/uartsio.c optional midi isa dev/sound/midi/midi.c optional midi dev/sound/midi/midibuf.c optional midi dev/sound/midi/midisynth.c optional midi dev/sound/midi/sequencer.c optional seq midi dev/sound/midi/timer.c optional seq midi dev/sound/pci/als4000.c optional pcm pci dev/sound/pci/cmi.c optional pcm pci dev/sound/pci/cs4281.c optional pcm pci dev/sound/pci/csa.c optional csa pci dev/sound/pci/csa.c optional pcm pci dev/sound/pci/csamidi.c optional midi csa dev/sound/pci/csapcm.c optional pcm pci dev/sound/pci/ds1.c optional pcm pci dev/sound/pci/emu10k1.c optional pcm pci dev/sound/pci/es137x.c optional pcm pci dev/sound/pci/fm801.c optional pcm pci dev/sound/pci/ich.c optional pcm pci dev/sound/pci/maestro.c optional pcm pci dev/sound/pci/neomagic.c optional pcm pci dev/sound/pci/solo.c optional pcm pci dev/sound/pci/t4dwave.c optional pcm pci dev/sound/pci/via8233.c optional pcm pci dev/sound/pci/via82c686.c optional pcm pci dev/sound/pci/vibes.c optional pcm pci #dev/sound/pci/vortex1.c optional pcm pci dev/sound/pcm/ac97.c optional pcm dev/sound/pcm/ac97_if.m optional pcm dev/sound/pcm/buffer.c optional pcm dev/sound/pcm/channel.c optional pcm dev/sound/pcm/channel_if.m optional pcm dev/sound/pcm/dsp.c optional pcm dev/sound/pcm/fake.c optional pcm dev/sound/pcm/feeder.c optional pcm dev/sound/pcm/feeder_if.m optional pcm dev/sound/pcm/feeder_fmt.c optional pcm dev/sound/pcm/feeder_rate.c optional pcm dev/sound/pcm/mixer.c optional pcm dev/sound/pcm/mixer_if.m optional pcm dev/sound/pcm/sndstat.c optional pcm dev/sound/pcm/sound.c optional pcm dev/sound/pcm/vchan.c optional pcm #dev/sound/usb/upcm.c optional pcm usb dev/sound/usb/uaudio.c optional pcm usb dev/sound/usb/uaudio_pcm.c optional pcm usb dev/sr/if_sr.c optional sr dev/sr/if_sr_pci.c optional sr pci dev/streams/streams.c optional streams dev/stg/tmc18c30.c optional stg dev/stg/tmc18c30_pccard.c optional stg card #dev/stg/tmc18c30_pccard.c optional stg pccard dev/stg/tmc18c30_isa.c optional stg isa dev/sym/sym_hipd.c optional sym \ dependency "$S/dev/sym/sym_{conf,defs}.h" dev/syscons/blank/blank_saver.c optional blank_saver dev/syscons/daemon/daemon_saver.c optional daemon_saver dev/syscons/fade/fade_saver.c optional fade_saver dev/syscons/fire/fire_saver.c optional fire_saver dev/syscons/green/green_saver.c optional green_saver dev/syscons/logo/logo_saver.c optional logo_saver dev/syscons/logo/logo.c optional logo_saver dev/syscons/rain/rain_saver.c optional rain_saver dev/syscons/star/star_saver.c optional star_saver dev/syscons/warp/warp_saver.c optional warp_saver dev/tdfx/tdfx_pci.c optional tdfx pci dev/twe/twe.c optional twe dev/twe/twe_freebsd.c optional twe dev/tx/if_tx.c optional tx dev/txp/if_txp.c optional txp # # USB support dev/usb/usb_if.m optional usb dev/usb/hid.c optional usb dev/usb/if_aue.c optional aue dev/usb/if_cue.c optional cue dev/usb/if_kue.c optional kue dev/usb/ohci.c optional ohci dev/usb/ucom.c optional ucom dev/usb/udbp.c optional udbp dev/usb/ufm.c optional ufm dev/usb/uftdi.c optional uftdi ucom dev/usb/ugen.c optional ugen dev/usb/uhci.c optional uhci dev/usb/uhid.c optional uhid dev/usb/uhub.c optional usb dev/usb/ukbd.c optional ukbd dev/usb/ulpt.c optional ulpt dev/usb/umass.c optional umass dev/usb/umodem.c optional umodem dev/usb/ums.c optional ums dev/usb/uplcom.c optional uplcom ucom dev/usb/urio.c optional urio dev/usb/uscanner.c optional uscanner dev/usb/uvisor.c optional uvisor ucom dev/usb/uvscom.c optional uvscom ucom dev/usb/usb.c optional usb dev/usb/usb_ethersubr.c optional usb #dev/usb/usb_mem.c optional usb dev/usb/usb_quirks.c optional usb dev/usb/usb_subr.c optional usb dev/usb/usbdi.c optional usb dev/usb/usbdi_util.c optional usb dev/vinum/vinum.c optional vinum dev/vinum/vinumconfig.c optional vinum dev/vinum/vinumdaemon.c optional vinum dev/vinum/vinuminterrupt.c optional vinum dev/vinum/vinumio.c optional vinum dev/vinum/vinumioctl.c optional vinum dev/vinum/vinumlock.c optional vinum dev/vinum/vinummemory.c optional vinum dev/vinum/vinumparser.c optional vinum dev/vinum/vinumraid5.c optional vinum dev/vinum/vinumrequest.c optional vinum dev/vinum/vinumrevive.c optional vinum dev/vinum/vinumstate.c optional vinum dev/vinum/vinumutil.c optional vinum dev/vx/if_vx.c optional vx dev/vx/if_vx_eisa.c optional vx eisa dev/vx/if_vx_pci.c optional vx pci #dev/wlp/if_wlp.c optional wlp card dev/wds/wd7000.c optional wds isa dev/wi/if_wi.c optional wi dev/wi/if_wi_pccard.c optional wi pccard dev/wi/if_wi_pccard.c optional wi card dev/wi/if_wi_pci.c optional wi pci dev/wi/wi_hostap.c optional wi dev/wl/if_wl.c optional wl isa dev/xe/if_xe.c optional xe dev/xe/if_xe_pccard.c optional xe card dev/xe/if_xe_pccard.c optional xe pccard fs/deadfs/dead_vnops.c standard fs/devfs/devfs_devs.c standard fs/devfs/devfs_rule.c standard fs/devfs/devfs_vfsops.c standard fs/devfs/devfs_vnops.c standard fs/fdescfs/fdesc_vfsops.c optional fdescfs fs/fdescfs/fdesc_vnops.c optional fdescfs fs/fifofs/fifo_vnops.c standard fs/hpfs/hpfs_alsubr.c optional hpfs fs/hpfs/hpfs_hash.c optional hpfs fs/hpfs/hpfs_lookup.c optional hpfs fs/hpfs/hpfs_subr.c optional hpfs fs/hpfs/hpfs_vfsops.c optional hpfs fs/hpfs/hpfs_vnops.c optional hpfs fs/msdosfs/msdosfs_conv.c optional msdosfs fs/msdosfs/msdosfs_denode.c optional msdosfs fs/msdosfs/msdosfs_fat.c optional msdosfs fs/msdosfs/msdosfs_lookup.c optional msdosfs fs/msdosfs/msdosfs_vfsops.c optional msdosfs fs/msdosfs/msdosfs_vnops.c optional msdosfs fs/ntfs/ntfs_compr.c optional ntfs fs/ntfs/ntfs_ihash.c optional ntfs fs/ntfs/ntfs_subr.c optional ntfs fs/ntfs/ntfs_vfsops.c optional ntfs fs/ntfs/ntfs_vnops.c optional ntfs fs/nullfs/null_subr.c optional nullfs fs/nullfs/null_vfsops.c optional nullfs fs/nullfs/null_vnops.c optional nullfs fs/nwfs/nwfs_io.c optional nwfs fs/nwfs/nwfs_ioctl.c optional nwfs fs/nwfs/nwfs_node.c optional nwfs fs/nwfs/nwfs_subr.c optional nwfs fs/nwfs/nwfs_vfsops.c optional nwfs fs/nwfs/nwfs_vnops.c optional nwfs fs/portalfs/portal_vfsops.c optional portalfs fs/portalfs/portal_vnops.c optional portalfs fs/procfs/procfs.c optional procfs fs/procfs/procfs_ctl.c optional procfs fs/procfs/procfs_dbregs.c optional procfs fs/procfs/procfs_fpregs.c optional procfs fs/procfs/procfs_ioctl.c optional procfs fs/procfs/procfs_mac.c optional procfs fs/procfs/procfs_map.c optional procfs fs/procfs/procfs_mem.c optional procfs fs/procfs/procfs_note.c optional procfs fs/procfs/procfs_regs.c optional procfs fs/procfs/procfs_rlimit.c optional procfs fs/procfs/procfs_status.c optional procfs fs/procfs/procfs_type.c optional procfs fs/pseudofs/pseudofs.c optional pseudofs fs/pseudofs/pseudofs_fileno.c optional pseudofs fs/pseudofs/pseudofs_vncache.c optional pseudofs fs/pseudofs/pseudofs_vnops.c optional pseudofs fs/smbfs/smbfs_io.c optional smbfs fs/smbfs/smbfs_node.c optional smbfs fs/smbfs/smbfs_smb.c optional smbfs fs/smbfs/smbfs_subr.c optional smbfs fs/smbfs/smbfs_vfsops.c optional smbfs fs/smbfs/smbfs_vnops.c optional smbfs fs/specfs/spec_vnops.c standard fs/udf/udf_vfsops.c optional udf fs/udf/udf_vnops.c optional udf fs/udf/osta.c optional udf fs/umapfs/umap_subr.c optional umapfs fs/umapfs/umap_vfsops.c optional umapfs fs/umapfs/umap_vnops.c optional umapfs fs/unionfs/union_subr.c optional unionfs fs/unionfs/union_vfsops.c optional unionfs fs/unionfs/union_vnops.c optional unionfs geom/geom_aes.c optional geom geom/geom_bsd.c optional geom geom/geom_dev.c optional geom geom/geom_disk.c optional geom geom/geom_dump.c optional geom geom/geom_enc.c optional geom geom/geom_event.c optional geom geom/geom_gpt.c optional geom geom/geom_io.c optional geom geom/geom_kern.c optional geom geom/geom_mbr.c optional geom geom/geom_pc98.c optional geom geom/geom_slice.c optional geom geom/geom_subr.c optional geom geom/geom_sunlabel.c optional geom crypto/rijndael/rijndael-alg-fst.c optional geom crypto/rijndael/rijndael-api-fst.c optional geom gnu/ext2fs/ext2_alloc.c optional ext2fs \ warning "kernel contains GPL contaminated ext2fs filesystem" gnu/ext2fs/ext2_balloc.c optional ext2fs gnu/ext2fs/ext2_bmap.c optional ext2fs gnu/ext2fs/ext2_ihash.c optional ext2fs gnu/ext2fs/ext2_inode.c optional ext2fs gnu/ext2fs/ext2_inode_cnv.c optional ext2fs gnu/ext2fs/ext2_linux_balloc.c optional ext2fs gnu/ext2fs/ext2_linux_ialloc.c optional ext2fs gnu/ext2fs/ext2_lookup.c optional ext2fs gnu/ext2fs/ext2_subr.c optional ext2fs gnu/ext2fs/ext2_vfsops.c optional ext2fs gnu/ext2fs/ext2_vnops.c optional ext2fs # # isdn4bsd device drivers # i4b/driver/i4b_trace.c count i4btrc i4b/driver/i4b_rbch.c count i4brbch i4b/driver/i4b_tel.c count i4btel i4b/driver/i4b_ipr.c count i4bipr net/slcompress.c optional i4bipr i4b/driver/i4b_ctl.c optional i4bctl i4b/driver/i4b_ing.c count i4bing i4b/driver/i4b_isppp.c count i4bisppp net/slcompress.c optional i4bisppp # # isdn4bsd CAPI driver # i4b/capi/capi_l4if.c optional i4bcapi i4b/capi/capi_llif.c optional i4bcapi i4b/capi/capi_msgs.c optional i4bcapi # # isdn4bsd AVM B1/T1 CAPI driver # i4b/capi/iavc/iavc_pci.c optional iavc i4bcapi pci i4b/capi/iavc/iavc_isa.c optional iavc i4bcapi isa i4b/capi/iavc/iavc_lli.c optional iavc i4bcapi i4b/capi/iavc/iavc_card.c optional iavc i4bcapi # # isdn4bsd support # i4b/layer2/i4b_mbuf.c optional i4btrc # # isdn4bsd Q.921 handler # i4b/layer2/i4b_l2.c optional i4bq921 i4b/layer2/i4b_l2fsm.c optional i4bq921 i4b/layer2/i4b_uframe.c optional i4bq921 i4b/layer2/i4b_tei.c optional i4bq921 i4b/layer2/i4b_sframe.c optional i4bq921 i4b/layer2/i4b_iframe.c optional i4bq921 i4b/layer2/i4b_l2timer.c optional i4bq921 i4b/layer2/i4b_util.c optional i4bq921 i4b/layer2/i4b_lme.c optional i4bq921 # # isdn4bsd Q.931 handler # i4b/layer3/i4b_q931.c optional i4bq931 i4b/layer3/i4b_l3fsm.c optional i4bq931 i4b/layer3/i4b_l3timer.c optional i4bq931 i4b/layer3/i4b_l2if.c optional i4bq931 i4b/layer3/i4b_l4if.c optional i4bq931 i4b/layer3/i4b_q932fac.c optional i4bq931 # # isdn4bsd control device driver, interface to isdnd # i4b/layer4/i4b_i4bdrv.c optional i4b i4b/layer4/i4b_l4.c optional i4b i4b/layer4/i4b_l4mgmt.c optional i4b i4b/layer4/i4b_l4timer.c optional i4b # isa/isa_if.m standard isa/isa_common.c optional isa isa/isahint.c optional isa isa/orm.c optional isa isa/pnp.c optional isa isa/pnpparse.c optional isa isofs/cd9660/cd9660_bmap.c optional cd9660 isofs/cd9660/cd9660_lookup.c optional cd9660 isofs/cd9660/cd9660_node.c optional cd9660 isofs/cd9660/cd9660_rrip.c optional cd9660 isofs/cd9660/cd9660_util.c optional cd9660 isofs/cd9660/cd9660_vfsops.c optional cd9660 isofs/cd9660/cd9660_vnops.c optional cd9660 kern/imgact_elf32.c standard kern/imgact_elf64.c standard kern/imgact_elfN.c standard kern/imgact_shell.c standard kern/inflate.c optional gzip kern/init_main.c standard kern/init_sysent.c standard kern/kern_acct.c standard kern/kern_acl.c standard kern/kern_alq.c optional alq kern/kern_clock.c standard kern/kern_condvar.c standard kern/kern_conf.c standard kern/kern_descrip.c standard kern/kern_poll.c optional device_polling kern/kern_environment.c standard kern/kern_event.c standard kern/kern_exec.c standard kern/kern_exit.c standard kern/kern_fork.c standard kern/kern_idle.c standard kern/kern_intr.c standard kern/kern_jail.c standard kern/kern_kthread.c standard kern/kern_ktr.c optional ktr kern/kern_ktrace.c standard kern/kern_linker.c standard kern/kern_lock.c standard kern/kern_lockf.c standard kern/kern_mac.c standard kern/kern_malloc.c standard kern/kern_mib.c standard kern/kern_module.c standard kern/kern_mutex.c standard kern/kern_mtxpool.c standard kern/kern_ntptime.c standard kern/kern_physio.c standard kern/kern_proc.c standard kern/kern_prot.c standard kern/kern_resource.c standard kern/kern_sema.c standard kern/kern_shutdown.c standard kern/kern_sig.c standard kern/kern_subr.c standard kern/kern_switch.c standard kern/kern_sx.c standard kern/kern_synch.c standard kern/kern_syscalls.c standard kern/kern_sysctl.c standard kern/kern_tc.c standard kern/kern_thread.c standard kern/kern_time.c standard kern/kern_timeout.c standard kern/kern_uuid.c standard kern/kern_xxx.c standard kern/link_elf.c standard kern/md5c.c standard kern/subr_autoconf.c standard kern/subr_blist.c standard kern/subr_bus.c standard kern/subr_clock.c optional genclock kern/subr_devstat.c standard kern/subr_disk.c standard kern/subr_disklabel.c standard kern/subr_diskslice.c standard kern/subr_eventhandler.c standard kern/subr_hints.c standard kern/subr_kobj.c standard kern/subr_log.c standard kern/subr_mbuf.c standard kern/subr_mchain.c optional libmchain kern/subr_module.c standard kern/subr_param.c standard kern/subr_pcpu.c standard kern/subr_power.c standard kern/subr_prf.c standard kern/subr_prof.c standard kern/subr_rman.c standard kern/subr_sbuf.c standard kern/subr_scanf.c standard kern/subr_smp.c optional smp kern/subr_taskqueue.c standard kern/subr_trap.c standard kern/subr_witness.c optional witness kern/subr_xxx.c standard kern/sys_generic.c standard kern/sys_pipe.c standard kern/sys_process.c standard kern/sys_socket.c standard kern/syscalls.c optional witness kern/sysv_ipc.c standard kern/sysv_msg.c optional sysvmsg kern/sysv_sem.c optional sysvsem kern/sysv_shm.c optional sysvshm kern/tty.c standard kern/tty_compat.c standard kern/tty_conf.c standard kern/tty_cons.c standard kern/tty_pty.c optional pty kern/tty_subr.c standard kern/tty_tty.c standard kern/uipc_accf.c optional inet kern/uipc_cow.c optional zero_copy_sockets kern/uipc_domain.c standard kern/uipc_jumbo.c standard kern/uipc_mbuf.c standard kern/uipc_mbuf2.c standard kern/uipc_proto.c standard kern/uipc_socket.c standard kern/uipc_socket2.c standard kern/uipc_syscalls.c standard kern/uipc_usrreq.c standard kern/vfs_aio.c optional vfs_aio kern/vfs_bio.c standard kern/vfs_cache.c standard kern/vfs_cluster.c standard kern/vfs_default.c standard kern/vfs_export.c standard kern/vfs_init.c standard kern/vfs_lookup.c standard kern/vfs_mount.c standard kern/vfs_subr.c standard kern/vfs_syscalls.c standard kern/vfs_vnops.c standard # # These files in libkern/ are those needed by all architectures. Some # of the files in libkern/ are only needed on some architectures, e.g., # libkern/divdi3.c is needed by i386 but not alpha. Also, some of these # routines may be optimized for a particular platform. In either case, # the file should be moved to conf/files. from here. # libkern/arc4random.c standard libkern/bcd.c standard libkern/bsearch.c standard libkern/crc32.c standard libkern/iconv.c optional libiconv libkern/iconv_converter_if.m optional libiconv libkern/iconv_xlat.c optional libiconv libkern/index.c standard libkern/inet_ntoa.c standard libkern/mcount.c optional profiling-routine libkern/qsort.c standard libkern/random.c standard libkern/rindex.c standard libkern/scanc.c standard libkern/skpc.c standard libkern/strcat.c standard libkern/strcmp.c standard libkern/strcpy.c standard libkern/strlcat.c standard libkern/strlcpy.c standard libkern/strlen.c standard libkern/strncmp.c standard libkern/strncpy.c standard libkern/strtol.c standard libkern/strtoq.c standard libkern/strtoul.c standard libkern/strtouq.c standard libkern/strvalid.c standard net/bpf.c standard net/bpf_filter.c optional bpf bpf.h standard \ compile-with "echo '#define NBPF 1' > bpf.h" \ no-obj no-implicit-rule before-depend net/bridge.c optional bridge net/bsd_comp.c optional ppp_bsdcomp net/if.c standard net/if_arcsubr.c optional arcnet net/if_atmsubr.c optional atm net/if_disc.c optional disc net/if_ef.c optional ef net/if_ethersubr.c optional ether net/if_faith.c optional faith net/if_fddisubr.c optional fddi net/if_gif.c optional gif net/if_gre.c optional gre net/if_iso88025subr.c optional token net/if_loop.c optional loop net/if_media.c standard net/if_mib.c standard net/if_ppp.c optional ppp net/if_sl.c optional sl net/if_spppsubr.c optional sppp net/if_spppsubr.c optional i4bisppp net/if_stf.c optional stf net/if_tun.c optional tun net/if_tap.c optional tap net/if_vlan.c optional vlan net/intrq.c standard net/net_osdep.c standard net/netisr.c standard net/ppp_deflate.c optional ppp_deflate net/ppp_tty.c optional ppp net/pfil.c optional pfil_hooks net/pfil.c optional ipfilter net/radix.c standard net/raw_cb.c standard net/raw_usrreq.c standard net/route.c standard net/rtsock.c standard net/slcompress.c optional ppp net/slcompress.c optional sl net/slcompress.c optional sppp net/zlib.c optional ppp_deflate net/zlib.c optional ipsec netatalk/aarp.c optional netatalk netatalk/at_control.c optional netatalk netatalk/at_proto.c optional netatalk netatalk/at_rmx.c optional netatalkdebug netatalk/ddp_input.c optional netatalk netatalk/ddp_output.c optional netatalk netatalk/ddp_usrreq.c optional netatalk netatm/atm_aal5.c optional atm_core netatm/atm_cm.c optional atm_core netatm/atm_device.c optional atm_core netatm/atm_if.c optional atm_core netatm/atm_proto.c optional atm_core netatm/atm_signal.c optional atm_core netatm/atm_socket.c optional atm_core netatm/atm_subr.c optional atm_core netatm/atm_usrreq.c optional atm_core netatm/ipatm/ipatm_event.c optional atm_ip atm_core netatm/ipatm/ipatm_if.c optional atm_ip atm_core netatm/ipatm/ipatm_input.c optional atm_ip atm_core netatm/ipatm/ipatm_load.c optional atm_ip atm_core netatm/ipatm/ipatm_output.c optional atm_ip atm_core netatm/ipatm/ipatm_usrreq.c optional atm_ip atm_core netatm/ipatm/ipatm_vcm.c optional atm_ip atm_core netatm/sigpvc/sigpvc_if.c optional atm_sigpvc atm_core netatm/sigpvc/sigpvc_subr.c optional atm_sigpvc atm_core netatm/spans/spans_arp.c optional atm_spans atm_core \ dependency "spans_xdr.h" netatm/spans/spans_cls.c optional atm_spans atm_core netatm/spans/spans_if.c optional atm_spans atm_core netatm/spans/spans_kxdr.c optional atm_spans atm_core netatm/spans/spans_msg.c optional atm_spans atm_core netatm/spans/spans_print.c optional atm_spans atm_core netatm/spans/spans_proto.c optional atm_spans atm_core netatm/spans/spans_subr.c optional atm_spans atm_core netatm/spans/spans_util.c optional atm_spans atm_core spans_xdr.h optional atm_spans atm_core \ before-depend \ dependency "$S/netatm/spans/spans_xdr.x" \ compile-with "rpcgen -h -C $S/netatm/spans/spans_xdr.x | grep -v rpc/rpc.h > spans_xdr.h" \ clean "spans_xdr.h" \ no-obj no-implicit-rule spans_xdr.c optional atm_spans atm_core \ before-depend \ dependency "$S/netatm/spans/spans_xdr.x" \ compile-with "rpcgen -c -C $S/netatm/spans/spans_xdr.x | grep -v rpc/rpc.h > spans_xdr.c" \ clean "spans_xdr.c" \ no-obj no-implicit-rule local spans_xdr.o optional atm_spans atm_core \ dependency "$S/netatm/spans/spans_xdr.x" \ compile-with "${NORMAL_C}" \ no-implicit-rule local netatm/uni/q2110_sigaa.c optional atm_uni atm_core netatm/uni/q2110_sigcpcs.c optional atm_uni atm_core netatm/uni/q2110_subr.c optional atm_uni atm_core netatm/uni/qsaal1_sigaa.c optional atm_uni atm_core netatm/uni/qsaal1_sigcpcs.c optional atm_uni atm_core netatm/uni/qsaal1_subr.c optional atm_uni atm_core netatm/uni/sscf_uni.c optional atm_uni atm_core netatm/uni/sscf_uni_lower.c optional atm_uni atm_core netatm/uni/sscf_uni_upper.c optional atm_uni atm_core netatm/uni/sscop.c optional atm_uni atm_core netatm/uni/sscop_lower.c optional atm_uni atm_core netatm/uni/sscop_pdu.c optional atm_uni atm_core netatm/uni/sscop_sigaa.c optional atm_uni atm_core netatm/uni/sscop_sigcpcs.c optional atm_uni atm_core netatm/uni/sscop_subr.c optional atm_uni atm_core netatm/uni/sscop_timer.c optional atm_uni atm_core netatm/uni/sscop_upper.c optional atm_uni atm_core netatm/uni/uni_load.c optional atm_uni atm_core netatm/uni/uniarp.c optional atm_uni atm_core netatm/uni/uniarp_cache.c optional atm_uni atm_core netatm/uni/uniarp_input.c optional atm_uni atm_core netatm/uni/uniarp_output.c optional atm_uni atm_core netatm/uni/uniarp_timer.c optional atm_uni atm_core netatm/uni/uniarp_vcm.c optional atm_uni atm_core netatm/uni/uniip.c optional atm_uni atm_core netatm/uni/unisig_decode.c optional atm_uni atm_core netatm/uni/unisig_encode.c optional atm_uni atm_core netatm/uni/unisig_if.c optional atm_uni atm_core netatm/uni/unisig_mbuf.c optional atm_uni atm_core netatm/uni/unisig_msg.c optional atm_uni atm_core netatm/uni/unisig_print.c optional atm_uni atm_core netatm/uni/unisig_proto.c optional atm_uni atm_core netatm/uni/unisig_sigmgr_state.c optional atm_uni atm_core netatm/uni/unisig_subr.c optional atm_uni atm_core netatm/uni/unisig_util.c optional atm_uni atm_core netatm/uni/unisig_vc_state.c optional atm_uni atm_core netgraph/ng_UI.c optional netgraph_UI netgraph/ng_async.c optional netgraph_async netgraph/ng_base.c optional netgraph netgraph/ng_bpf.c optional netgraph_bpf net/bpf_filter.c optional netgraph_bpf netgraph/ng_bridge.c optional netgraph_bridge netgraph/ng_cisco.c optional netgraph_cisco netgraph/ng_device.c optional netgraph_device netgraph/ng_echo.c optional netgraph_echo netgraph/ng_ether.c optional netgraph_ether netgraph/ng_frame_relay.c optional netgraph_frame_relay netgraph/ng_gif.c optional netgraph_gif netgraph/ng_gif_demux.c optional netgraph_gif_demux netgraph/ng_hole.c optional netgraph_hole netgraph/ng_iface.c optional netgraph_iface netgraph/ng_ip_input.c optional netgraph_ip_input netgraph/ng_ksocket.c optional netgraph_ksocket netgraph/ng_lmi.c optional netgraph_lmi netgraph/ng_l2tp.c optional netgraph_l2tp netgraph/ng_mppc.c optional netgraph_mppc_compression # The next two files (plus the header file net/mppc.h) are proprietary and # must be obtained elsewhere in order to enable NETGRAPH_MPPC_COMPRESSION net/mppcc.c optional netgraph_mppc_compression net/mppcd.c optional netgraph_mppc_compression netgraph/ng_mppc.c optional netgraph_mppc_encryption crypto/rc4/rc4.c optional awi crypto/rc4/rc4.c optional netgraph_mppc_encryption crypto/sha1.c optional netgraph_mppc_encryption netgraph/ng_one2many.c optional netgraph_one2many netgraph/ng_parse.c optional netgraph netgraph/ng_ppp.c optional netgraph_ppp netgraph/ng_pppoe.c optional netgraph_pppoe netgraph/ng_pptpgre.c optional netgraph_pptpgre netgraph/ng_rfc1490.c optional netgraph_rfc1490 netgraph/ng_socket.c optional netgraph_socket netgraph/ng_split.c optional netgraph_split netgraph/ng_tee.c optional netgraph_tee netgraph/ng_tty.c optional netgraph_tty netgraph/ng_vjc.c optional netgraph_vjc net/slcompress.c optional netgraph_vjc netinet/accf_data.c optional accept_filter_data netinet/accf_http.c optional accept_filter_http netinet/if_atm.c optional atm netinet/if_ether.c optional ether netinet/igmp.c optional inet netinet/in.c optional inet netinet/in_gif.c optional gif inet netinet/ip_gre.c optional gre inet netinet/ip_id.c optional inet netinet/in_pcb.c optional inet netinet/in_proto.c optional inet netinet/in_rmx.c optional inet netinet/ip_divert.c optional ipdivert netinet/ip_dummynet.c optional dummynet netinet/ip_ecn.c optional inet netinet/ip_ecn.c optional inet6 netinet/ip_encap.c optional inet netinet/ip_encap.c optional inet6 netinet/ip_flow.c optional inet netinet/ip_fw2.c optional ipfirewall netinet/ip_icmp.c optional inet netinet/ip_input.c optional inet netinet/ip_mroute.c optional inet netinet/ip_output.c optional inet netinet/raw_ip.c optional inet netinet/tcp_debug.c optional tcpdebug netinet/tcp_input.c optional inet netinet/tcp_output.c optional inet netinet/tcp_subr.c optional inet netinet/tcp_syncache.c optional inet netinet/tcp_timer.c optional inet netinet/tcp_usrreq.c optional inet netinet/udp_usrreq.c optional inet netinet6/ah_core.c optional ipsec netinet6/ah_input.c optional ipsec netinet6/ah_output.c optional ipsec netinet6/dest6.c optional inet6 netinet6/esp_core.c optional ipsec ipsec_esp netinet6/esp_input.c optional ipsec ipsec_esp netinet6/esp_output.c optional ipsec ipsec_esp netinet6/esp_rijndael.c optional ipsec ipsec_esp netinet6/frag6.c optional inet6 netinet6/icmp6.c optional inet6 netinet6/in6.c optional inet6 netinet6/in6_cksum.c optional inet6 netinet6/in6_gif.c optional gif inet6 netinet6/in6_ifattach.c optional inet6 netinet6/in6_pcb.c optional inet6 netinet6/in6_prefix.c optional inet6 netinet6/in6_proto.c optional inet6 netinet6/in6_rmx.c optional inet6 netinet6/in6_src.c optional inet6 netinet6/ip6_forward.c optional inet6 netinet6/ip6_fw.c optional inet6 ipv6firewall netinet6/ip6_input.c optional inet6 netinet6/ip6_mroute.c optional inet6 netinet6/ip6_output.c optional inet6 netinet6/ipcomp_core.c optional ipsec netinet6/ipcomp_input.c optional ipsec netinet6/ipcomp_output.c optional ipsec netinet6/ipsec.c optional ipsec netinet6/mld6.c optional inet6 netinet6/nd6.c optional inet6 netinet6/nd6_nbr.c optional inet6 netinet6/nd6_rtr.c optional inet6 netinet6/raw_ip6.c optional inet6 netinet6/route6.c optional inet6 netinet6/scope6.c optional inet6 netinet6/udp6_output.c optional inet6 netinet6/udp6_usrreq.c optional inet6 netipx/ipx.c optional ipx netipx/ipx_cksum.c optional ipx netipx/ipx_input.c optional ipx netipx/ipx_ip.c optional ipx netipx/ipx_outputfl.c optional ipx netipx/ipx_pcb.c optional ipx netipx/ipx_proto.c optional ipx netipx/ipx_tun.c optional ipx netipx/ipx_usrreq.c optional ipx netipx/spx_debug.c optional ipx netipx/spx_usrreq.c optional ipx netkey/key.c optional ipsec netkey/key_debug.c optional ipsec netkey/keydb.c optional ipsec netkey/keysock.c optional ipsec netnatm/natm.c optional natm netnatm/natm_pcb.c optional natm netnatm/natm_proto.c optional natm netncp/ncp_conn.c optional ncp netncp/ncp_crypt.c optional ncp netncp/ncp_login.c optional ncp netncp/ncp_mod.c optional ncp netncp/ncp_ncp.c optional ncp netncp/ncp_nls.c optional ncp netncp/ncp_rq.c optional ncp netncp/ncp_sock.c optional ncp netncp/ncp_subr.c optional ncp netns/idp_usrreq.c optional ns netns/ns.c optional ns netns/ns_error.c optional ns netns/ns_input.c optional ns netns/ns_ip.c optional ns netns/ns_output.c optional ns netns/ns_pcb.c optional ns netns/ns_proto.c optional ns netns/spp_debug.c optional ns netns/spp_usrreq.c optional ns nfs/nfs_common.c optional nfsclient nfs/nfs_common.c optional nfsserver nfsclient/bootp_subr.c optional bootp nfsclient nfsclient/krpc_subr.c optional bootp nfsclient nfsclient/nfs_bio.c optional nfsclient nfsclient/nfs_diskless.c optional nfsclient nfs_root nfsclient/nfs_node.c optional nfsclient nfsclient/nfs_socket.c optional nfsclient nfsclient/nfs_subs.c optional nfsclient nfsclient/nfs_nfsiod.c optional nfsclient nfsclient/nfs_vfsops.c optional nfsclient nfsclient/nfs_vnops.c optional nfsclient nfsclient/nfs_lock.c optional nfsclient nfsserver/nfs_serv.c optional nfsserver nfsserver/nfs_srvsock.c optional nfsserver nfsserver/nfs_srvcache.c optional nfsserver nfsserver/nfs_srvsubs.c optional nfsserver nfsserver/nfs_syscalls.c optional nfsserver pccard/pccard.c count card pccard/pccard_beep.c optional card pccard/pccard_nbk.c optional card pccard/pcic.c optional pcic card pccard/pcic_isa.c optional pcic card isa pccard/pcic_pci.c optional pcic card pci pci/agp.c optional agp pci/agp_if.m optional agp pci/agp_intel.c optional agp pci/agp_via.c optional agp pci/agp_sis.c optional agp pci/agp_ali.c optional agp pci/agp_amd.c optional agp pci/agp_i810.c optional agp pci/alpm.c optional alpm pci/amd.c optional amd pci/amdpm.c optional amdpm pci/amdpm.c optional nfpm pci/if_dc.c optional dc pci/if_de.c optional de pci/if_en_pci.c optional en pci pci/if_mn.c optional mn pci/if_pcn.c optional pcn pci/if_rl.c optional rl pci/if_sf.c optional sf pci/if_sis.c optional sis pci/if_sk.c optional sk pci/if_ste.c optional ste pci/if_ti.c optional ti pci/if_tl.c optional tl pci/if_vr.c optional vr pci/if_wb.c optional wb pci/if_xl.c optional xl pci/intpm.c optional intpm pci/meteor.c count meteor pci nowerror pci/ncr.c optional ncr pci/ohci_pci.c optional ohci pci/simos.c optional simos pci/uhci_pci.c optional uhci pci/viapm.c optional viapm pci/xrpu.c optional xrpu posix4/ksched.c optional _kposix_priority_scheduling posix4/p1003_1b.c standard posix4/posix4_mib.c standard kern/uipc_sem.c optional p1003_1b_semaphores security/mac_none/mac_none.c optional mac_none ufs/ffs/ffs_alloc.c optional ffs ufs/ffs/ffs_balloc.c optional ffs ufs/ffs/ffs_inode.c optional ffs ufs/ffs/ffs_snapshot.c optional ffs ufs/ffs/ffs_softdep.c optional softupdates ffs ufs/ffs/ffs_softdep_stub.c optional ffs ufs/ffs/ffs_subr.c optional ffs ufs/ffs/ffs_tables.c optional ffs ufs/ffs/ffs_vfsops.c optional ffs ufs/ffs/ffs_vnops.c optional ffs ufs/ufs/ufs_acl.c optional ffs ufs/ufs/ufs_bmap.c optional ffs ufs/ufs/ufs_dirhash.c optional ffs ufs/ufs/ufs_extattr.c optional ffs ufs/ufs/ufs_ihash.c optional ffs ufs/ufs/ufs_inode.c optional ffs ufs/ufs/ufs_lookup.c optional ffs ufs/ufs/ufs_quota.c optional ffs ufs/ufs/ufs_vfsops.c optional ffs ufs/ufs/ufs_vnops.c optional ffs vm/default_pager.c standard vm/device_pager.c standard vm/phys_pager.c standard vm/swap_pager.c standard vm/vm_fault.c standard vm/vm_glue.c standard vm/vm_init.c standard vm/vm_kern.c standard vm/vm_map.c standard vm/vm_meter.c standard vm/vm_mmap.c standard vm/vm_object.c standard vm/vm_page.c standard vm/vm_pageq.c standard vm/vm_contig.c standard vm/vm_zeroidle.c standard vm/vm_pageout.c standard vm/vm_pager.c standard vm/vm_swap.c standard vm/vm_unix.c standard vm/uma_core.c standard vm/uma_dbg.c standard vm/vnode_pager.c standard Index: head/sys/conf/files.i386 =================================================================== --- head/sys/conf/files.i386 (revision 104444) +++ head/sys/conf/files.i386 (revision 104445) @@ -1,419 +1,418 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # # $FreeBSD$ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and # dependency lines other than the first are silently ignored. # linux_genassym.o optional compat_linux \ dependency "$S/i386/linux/linux_genassym.c" \ compile-with "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}" \ no-obj no-implicit-rule \ clean "linux_genassym.o" # linux_assym.h optional compat_linux \ dependency "$S/kern/genassym.sh linux_genassym.o" \ compile-with "sh $S/kern/genassym.sh linux_genassym.o > ${.TARGET}" \ no-obj no-implicit-rule before-depend \ clean "linux_assym.h" # svr4_genassym.o optional compat_svr4 \ dependency "$S/i386/svr4/svr4_genassym.c" \ compile-with "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}" \ no-obj no-implicit-rule \ clean "svr4_genassym.o" # svr4_assym.h optional compat_svr4 \ dependency "$S/kern/genassym.sh svr4_genassym.o" \ compile-with "sh $S/kern/genassym.sh svr4_genassym.o > ${.TARGET}" \ no-obj no-implicit-rule before-depend \ clean "svr4_assym.h" # font.h optional sc_dflt_font \ compile-with "uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'static u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'static u_char dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'static u_char dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h" \ no-obj no-implicit-rule before-depend \ clean "font.h ${SC_DFLT_FONT}-8x14 ${SC_DFLT_FONT}-8x16 ${SC_DFLT_FONT}-8x8" # atkbdmap.h optional atkbd_dflt_keymap \ compile-with "/usr/sbin/kbdcontrol -L ${ATKBD_DFLT_KEYMAP} | sed -e 's/^static keymap_t.* = /static keymap_t key_map = /' -e 's/^static accentmap_t.* = /static accentmap_t accent_map = /' > atkbdmap.h" \ no-obj no-implicit-rule before-depend \ clean "atkbdmap.h" # ukbdmap.h optional ukbd_dflt_keymap \ compile-with "/usr/sbin/kbdcontrol -L ${UKBD_DFLT_KEYMAP} | sed -e 's/^static keymap_t.* = /static keymap_t key_map = /' -e 's/^static accentmap_t.* = /static accentmap_t accent_map = /' > ukbdmap.h" \ no-obj no-implicit-rule before-depend \ clean "ukbdmap.h" # msysosak.o optional fla \ dependency "$S/contrib/dev/fla/i386/msysosak.o.uu" \ compile-with "uudecode < $S/contrib/dev/fla/i386/msysosak.o.uu" \ no-implicit-rule # trlld.o optional oltr \ dependency "$S/contrib/dev/oltr/i386-elf.trlld.o.uu" \ compile-with "uudecode < $S/contrib/dev/oltr/i386-elf.trlld.o.uu" \ no-implicit-rule # compat/linux/linux_file.c optional compat_linux compat/linux/linux_getcwd.c optional compat_linux compat/linux/linux_ioctl.c optional compat_linux compat/linux/linux_ipc.c optional compat_linux compat/linux/linux_mib.c optional compat_linux compat/linux/linux_misc.c optional compat_linux compat/linux/linux_signal.c optional compat_linux compat/linux/linux_socket.c optional compat_linux compat/linux/linux_stats.c optional compat_linux compat/linux/linux_sysctl.c optional compat_linux compat/linux/linux_uid16.c optional compat_linux compat/linux/linux_util.c optional compat_linux compat/pecoff/imgact_pecoff.c optional pecoff_support compat/svr4/imgact_svr4.c optional compat_svr4 compat/svr4/svr4_fcntl.c optional compat_svr4 compat/svr4/svr4_filio.c optional compat_svr4 compat/svr4/svr4_ioctl.c optional compat_svr4 compat/svr4/svr4_ipc.c optional compat_svr4 compat/svr4/svr4_misc.c optional compat_svr4 compat/svr4/svr4_resource.c optional compat_svr4 compat/svr4/svr4_signal.c optional compat_svr4 compat/svr4/svr4_socket.c optional compat_svr4 compat/svr4/svr4_sockio.c optional compat_svr4 compat/svr4/svr4_stat.c optional compat_svr4 compat/svr4/svr4_stream.c optional compat_svr4 compat/svr4/svr4_syscallnames.c optional compat_svr4 compat/svr4/svr4_sysent.c optional compat_svr4 compat/svr4/svr4_sysvec.c optional compat_svr4 compat/svr4/svr4_termios.c optional compat_svr4 compat/svr4/svr4_ttold.c optional compat_svr4 contrib/dev/fla/fla.c optional fla contrib/dev/oltr/if_oltr.c optional oltr contrib/dev/oltr/trlldbm.c optional oltr contrib/dev/oltr/trlldhm.c optional oltr contrib/dev/oltr/trlldmac.c optional oltr bf_enc.o optional ipsec ipsec_esp \ dependency "$S/crypto/blowfish/arch/i386/bf_enc.S $S/crypto/blowfish/arch/i386/bf_enc_586.S $S/crypto/blowfish/arch/i386/bf_enc_686.S" \ compile-with "${CC} -c -I$S/crypto/blowfish/arch/i386 ${ASM_CFLAGS} ${WERROR} ${.IMPSRC}" \ no-implicit-rule crypto/des/arch/i386/des_enc.S optional ipsec ipsec_esp crypto/des/des_ecb.c optional netsmbcrypto crypto/des/arch/i386/des_enc.S optional netsmbcrypto crypto/des/des_setkey.c optional netsmbcrypto dev/advansys/adv_isa.c optional adv isa dev/aic/aic_isa.c optional aic isa dev/ar/if_ar_isa.c optional ar isa dev/cm/if_cm_isa.c optional cm isa dev/ed/if_ed_isa.c optional ed isa dev/eisa/eisaconf.c optional eisa dev/fb/fb.c optional fb dev/fb/fb.c optional vga dev/fb/splash.c optional splash dev/fb/vga.c optional vga dev/fe/if_fe_isa.c optional fe isa dev/kbd/atkbd.c optional atkbd dev/kbd/atkbdc.c optional atkbdc dev/kbd/kbd.c optional atkbd dev/kbd/kbd.c optional kbd dev/kbd/kbd.c optional sc dev/kbd/kbd.c optional ukbd dev/kbd/kbd.c optional vt dev/lnc/if_lnc_isa.c optional lnc isa dev/pst/pst-pci.c optional pst pci dev/pst/pst-iop.c optional pst dev/pst/pst-raid.c optional pst dev/sbni/if_sbni.c optional sbni dev/sbni/if_sbni_isa.c optional sbni isa dev/sbni/if_sbni_pci.c optional sbni pci dev/sio/sio.c optional sio dev/sio/sio_isa.c optional sio isa dev/sr/if_sr_isa.c optional sr isa dev/syscons/apm/apm_saver.c optional apm_saver apm dev/syscons/schistory.c optional sc dev/syscons/scmouse.c optional sc dev/syscons/scterm.c optional sc dev/syscons/scterm-dumb.c optional sc dev/syscons/scterm-sc.c optional sc dev/syscons/scvesactl.c optional sc vga vesa dev/syscons/scvgarndr.c optional sc vga dev/syscons/scvidctl.c optional sc dev/syscons/scvtb.c optional sc dev/syscons/syscons.c optional sc dev/syscons/sysmouse.c optional sc gnu/i386/fpemul/div_small.s optional gpl_math_emulate \ warning "kernel contains GPL contaminated math emulator" gnu/i386/fpemul/errors.c optional gpl_math_emulate gnu/i386/fpemul/fpu_arith.c optional gpl_math_emulate gnu/i386/fpemul/fpu_aux.c optional gpl_math_emulate gnu/i386/fpemul/fpu_entry.c optional gpl_math_emulate gnu/i386/fpemul/fpu_etc.c optional gpl_math_emulate gnu/i386/fpemul/fpu_trig.c optional gpl_math_emulate gnu/i386/fpemul/get_address.c optional gpl_math_emulate gnu/i386/fpemul/load_store.c optional gpl_math_emulate gnu/i386/fpemul/poly_2xm1.c optional gpl_math_emulate gnu/i386/fpemul/poly_atan.c optional gpl_math_emulate gnu/i386/fpemul/poly_div.s optional gpl_math_emulate gnu/i386/fpemul/poly_l2.c optional gpl_math_emulate gnu/i386/fpemul/poly_mul64.s optional gpl_math_emulate gnu/i386/fpemul/poly_sin.c optional gpl_math_emulate gnu/i386/fpemul/poly_tan.c optional gpl_math_emulate gnu/i386/fpemul/polynomial.s optional gpl_math_emulate gnu/i386/fpemul/reg_add_sub.c optional gpl_math_emulate gnu/i386/fpemul/reg_compare.c optional gpl_math_emulate gnu/i386/fpemul/reg_constant.c optional gpl_math_emulate gnu/i386/fpemul/reg_div.s optional gpl_math_emulate gnu/i386/fpemul/reg_ld_str.c optional gpl_math_emulate gnu/i386/fpemul/reg_mul.c optional gpl_math_emulate gnu/i386/fpemul/reg_norm.s optional gpl_math_emulate gnu/i386/fpemul/reg_round.s optional gpl_math_emulate gnu/i386/fpemul/reg_u_add.s optional gpl_math_emulate gnu/i386/fpemul/reg_u_div.s optional gpl_math_emulate gnu/i386/fpemul/reg_u_mul.s optional gpl_math_emulate gnu/i386/fpemul/reg_u_sub.s optional gpl_math_emulate gnu/i386/fpemul/wm_shrx.s optional gpl_math_emulate gnu/i386/fpemul/wm_sqrt.s optional gpl_math_emulate i386/acpica/OsdEnvironment.c optional acpica i386/acpica/acpi_machdep.c optional acpica i386/acpica/acpi_wakeup.c optional acpica acpi_wakecode.h optional acpica \ dependency "$S/i386/acpica/acpi_wakecode.S" \ compile-with "${MAKE} -f $S/i386/acpica/Makefile MAKESRCPATH=$S/i386/acpica" \ no-obj no-implicit-rule before-depend \ clean "acpi_wakecode.h acpi_wakecode.o acpi_wakecode.bin" # i386/apm/apm.c optional apm i386/i386/atomic.c standard \ compile-with "${CC} -c ${CFLAGS} ${DEFINED_PROF:S/^$/-fomit-frame-pointer/} ${.IMPSRC}" i386/i386/autoconf.c standard i386/i386/bios.c standard i386/i386/bioscall.s standard i386/i386/busdma_machdep.c standard i386/i386/critical.c standard i386/i386/db_disasm.c optional ddb i386/i386/db_interface.c optional ddb i386/i386/db_trace.c optional ddb i386/i386/dump_machdep.c standard i386/i386/elan-mmcr.c optional cpu_elan i386/i386/elf_machdep.c standard i386/i386/exception.s standard i386/i386/i386-gdbstub.c optional ddb i386/i386/i686_mem.c standard i386/i386/identcpu.c standard i386/i386/in_cksum.c optional inet i386/i386/initcpu.c standard i386/i386/k6_mem.c standard i386/i386/legacy.c standard # locore.s needs to be handled in Makefile to put it first. Otherwise it's # now normal. # i386/i386/locore.s standard i386/i386/machdep.c standard i386/i386/math_emulate.c optional math_emulate i386/i386/mem.c standard i386/i386/mp_clock.c optional smp i386/i386/mp_machdep.c optional smp i386/i386/mpapic.c optional smp i386/i386/mpboot.s optional smp i386/i386/nexus.c standard i386/i386/perfmon.c optional perfmon i386/i386/perfmon.c optional perfmon profiling-routine i386/i386/pmap.c standard i386/i386/support.s standard i386/i386/swtch.s standard i386/i386/sys_machdep.c standard i386/i386/trap.c standard i386/i386/vm86.c standard i386/i386/vm_machdep.c standard i386/ibcs2/ibcs2_errno.c optional ibcs2 i386/ibcs2/ibcs2_fcntl.c optional ibcs2 i386/ibcs2/ibcs2_ioctl.c optional ibcs2 i386/ibcs2/ibcs2_ipc.c optional ibcs2 i386/ibcs2/ibcs2_isc.c optional ibcs2 i386/ibcs2/ibcs2_isc_sysent.c optional ibcs2 i386/ibcs2/ibcs2_misc.c optional ibcs2 i386/ibcs2/ibcs2_msg.c optional ibcs2 i386/ibcs2/ibcs2_other.c optional ibcs2 i386/ibcs2/ibcs2_signal.c optional ibcs2 i386/ibcs2/ibcs2_socksys.c optional ibcs2 i386/ibcs2/ibcs2_stat.c optional ibcs2 i386/ibcs2/ibcs2_sysent.c optional ibcs2 i386/ibcs2/ibcs2_sysi86.c optional ibcs2 i386/ibcs2/ibcs2_sysvec.c optional ibcs2 i386/ibcs2/ibcs2_util.c optional ibcs2 i386/ibcs2/ibcs2_xenix.c optional ibcs2 i386/ibcs2/ibcs2_xenix_sysent.c optional ibcs2 i386/ibcs2/imgact_coff.c optional ibcs2 i386/isa/asc.c count asc i386/isa/clock.c standard i386/isa/cronyx.c optional cx i386/isa/ctx.c count ctx i386/isa/cx.c count cx i386/isa/cy.c count cy i386/isa/elink.c optional ep i386/isa/elink.c optional ie i386/isa/gpib.c optional gp i386/isa/gsc.c count gsc i386/isa/if_cx.c optional cx i386/isa/if_el.c count el i386/isa/if_le.c count le i386/isa/if_rdp.c count rdp i386/isa/if_wlp.c optional wlp i386/isa/intr_machdep.c standard i386/isa/ithread.c standard i386/isa/isa.c optional isa i386/isa/isa_compat.c optional isa compat_oldisa \ warning "Old ISA driver compatibility shims present." i386/isa/isa_dma.c optional isa i386/isa/istallion.c optional stli nowerror i386/isa/loran.c optional loran i386/isa/mca_machdep.c optional mca -i386/isa/mcd.c count mcd i386/isa/mse.c optional mse i386/isa/npx.c optional npx i386/isa/pcaudio.c optional pca i386/isa/pcf.c optional pcf i386/isa/pcvt/pcvt_drv.c optional vt i386/isa/pcvt/pcvt_ext.c optional vt i386/isa/pcvt/pcvt_kbd.c optional vt i386/isa/pcvt/pcvt_out.c optional vt i386/isa/pcvt/pcvt_sup.c optional vt i386/isa/pcvt/pcvt_vtf.c optional vt i386/isa/pmtimer.c optional pmtimer i386/isa/prof_machdep.c optional profiling-routine i386/isa/rc.c count rc i386/isa/scd.c count scd i386/isa/spic.c optional spic i386/isa/spigot.c count spigot i386/isa/spkr.c optional speaker i386/isa/stallion.c optional stl nowerror i386/isa/tw.c count tw i386/isa/vesa.c optional vga vesa i386/isa/wt.c count wt i386/linux/imgact_linux.c optional compat_linux i386/linux/linux_dummy.c optional compat_linux i386/linux/linux_locore.s optional compat_linux \ dependency "linux_assym.h" i386/linux/linux_machdep.c optional compat_linux i386/linux/linux_ptrace.c optional compat_linux i386/linux/linux_sysent.c optional compat_linux i386/linux/linux_sysvec.c optional compat_linux i386/pci/pci_cfgreg.c optional pci i386/pci/pci_bus.c optional pci i386/svr4/svr4_locore.s optional compat_svr4 \ dependency "svr4_assym.h" \ warning "COMPAT_SVR4 is broken and should be avoided" i386/svr4/svr4_machdep.c optional compat_svr4 # # isdn4bsd, needed for isic | iwic | ifpi | ifpi2 | ihfc | ifpnp | itjc # i4b/layer1/i4b_hdlc.c optional itjc i4b/layer1/i4b_hdlc.c optional ihfc i4b/layer1/i4b_l1dmux.c optional isic i4b/layer1/i4b_l1lib.c optional isic i4b/layer1/i4b_l1dmux.c optional iwic i4b/layer1/i4b_l1lib.c optional iwic i4b/layer1/i4b_l1dmux.c optional ifpi i4b/layer1/i4b_l1lib.c optional ifpi i4b/layer1/i4b_l1dmux.c optional ifpi2 i4b/layer1/i4b_l1lib.c optional ifpi2 i4b/layer1/i4b_l1dmux.c optional ihfc i4b/layer1/i4b_l1lib.c optional ihfc i4b/layer1/i4b_l1dmux.c optional ifpnp i4b/layer1/i4b_l1lib.c optional ifpnp i4b/layer1/i4b_l1dmux.c optional itjc i4b/layer1/i4b_l1lib.c optional itjc # # isdn4bsd, isic # i4b/layer1/isic/i4b_asuscom_ipac.c optional isic i4b/layer1/isic/i4b_avm_a1.c optional isic i4b/layer1/isic/i4b_bchan.c optional isic i4b/layer1/isic/i4b_ctx_s0P.c optional isic i4b/layer1/isic/i4b_drn_ngo.c optional isic i4b/layer1/isic/i4b_dynalink.c optional isic i4b/layer1/isic/i4b_elsa_qs1i.c optional isic i4b/layer1/isic/i4b_elsa_qs1p.c optional isic pci i4b/layer1/isic/i4b_elsa_pcc16.c optional isic i4b/layer1/isic/i4b_hscx.c optional isic i4b/layer1/isic/i4b_isac.c optional isic i4b/layer1/isic/i4b_isic.c optional isic i4b/layer1/isic/i4b_isic_isa.c optional isic i4b/layer1/isic/i4b_isic_pnp.c optional isic i4b/layer1/isic/i4b_itk_ix1.c optional isic i4b/layer1/isic/i4b_l1.c optional isic i4b/layer1/isic/i4b_l1fsm.c optional isic i4b/layer1/isic/i4b_siemens_isurf.c optional isic i4b/layer1/isic/i4b_sws.c optional isic i4b/layer1/isic/i4b_tel_s016.c optional isic i4b/layer1/isic/i4b_tel_s0163.c optional isic i4b/layer1/isic/i4b_tel_s08.c optional isic i4b/layer1/isic/i4b_usr_sti.c optional isic i4b/layer1/isic/i4b_diva.c optional isic # # isdn4bsd, iwic # i4b/layer1/iwic/i4b_iwic_pci.c optional iwic pci i4b/layer1/iwic/i4b_iwic_dchan.c optional iwic pci i4b/layer1/iwic/i4b_iwic_bchan.c optional iwic pci i4b/layer1/iwic/i4b_iwic_fsm.c optional iwic pci i4b/layer1/iwic/i4b_iwic_l1if.c optional iwic pci # # isdn4bsd, ifpi # i4b/layer1/ifpi/i4b_ifpi_pci.c optional ifpi pci i4b/layer1/ifpi/i4b_ifpi_isac.c optional ifpi pci i4b/layer1/ifpi/i4b_ifpi_l1.c optional ifpi pci i4b/layer1/ifpi/i4b_ifpi_l1fsm.c optional ifpi pci # # isdn4bsd, ifpi2 # i4b/layer1/ifpi2/i4b_ifpi2_pci.c optional ifpi2 pci i4b/layer1/ifpi2/i4b_ifpi2_isacsx.c optional ifpi2 pci i4b/layer1/ifpi2/i4b_ifpi2_l1.c optional ifpi2 pci i4b/layer1/ifpi2/i4b_ifpi2_l1fsm.c optional ifpi2 pci # # isdn4bsd, ifpnp # i4b/layer1/ifpnp/i4b_ifpnp_avm.c optional ifpnp i4b/layer1/ifpnp/i4b_ifpnp_isac.c optional ifpnp i4b/layer1/ifpnp/i4b_ifpnp_l1.c optional ifpnp i4b/layer1/ifpnp/i4b_ifpnp_l1fsm.c optional ifpnp # # isdn4bsd, ihfc # i4b/layer1/ihfc/i4b_ihfc_l1if.c optional ihfc i4b/layer1/ihfc/i4b_ihfc_pnp.c optional ihfc i4b/layer1/ihfc/i4b_ihfc_drv.c optional ihfc # # isdn4bsd, itjc # i4b/layer1/itjc/i4b_itjc_pci.c optional itjc i4b/layer1/itjc/i4b_itjc_isac.c optional itjc i4b/layer1/itjc/i4b_itjc_l1.c optional itjc i4b/layer1/itjc/i4b_itjc_l1fsm.c optional itjc # isa/atkbd_isa.c optional atkbd isa/atkbdc_isa.c optional atkbdc isa/fd.c optional fdc isa/ppc.c optional ppc isa/psm.c optional psm isa/syscons_isa.c optional sc isa/vga_isa.c optional vga kern/imgact_aout.c optional compat_aout kern/imgact_gzip.c optional gzip kern/md4c.c optional netsmb kern/subr_diskmbr.c standard libkern/divdi3.c standard libkern/moddi3.c standard libkern/qdivrem.c standard libkern/ucmpdi2.c standard libkern/udivdi3.c standard libkern/umoddi3.c standard netsmb/smb_conn.c optional netsmb netsmb/smb_crypt.c optional netsmb netsmb/smb_dev.c optional netsmb netsmb/smb_iod.c optional netsmb netsmb/smb_rq.c optional netsmb netsmb/smb_smb.c optional netsmb netsmb/smb_subr.c optional netsmb netsmb/smb_trantcp.c optional netsmb netsmb/smb_usr.c optional netsmb pci/cy_pci.c optional cy pci Index: head/sys/conf/files.pc98 =================================================================== --- head/sys/conf/files.pc98 (revision 104444) +++ head/sys/conf/files.pc98 (revision 104445) @@ -1,409 +1,408 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # # modified for PC-9801 # # $FreeBSD$ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and # dependency lines other than the first are silently ignored. # linux_genassym.o optional compat_linux \ dependency "$S/i386/linux/linux_genassym.c" \ compile-with "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}" \ no-obj no-implicit-rule \ clean "linux_genassym.o" # linux_assym.h optional compat_linux \ dependency "$S/kern/genassym.sh linux_genassym.o" \ compile-with "sh $S/kern/genassym.sh linux_genassym.o > ${.TARGET}" \ no-obj no-implicit-rule before-depend \ clean "linux_assym.h" # svr4_genassym.o optional compat_svr4 \ dependency "$S/i386/svr4/svr4_genassym.c" \ compile-with "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}" \ no-obj no-implicit-rule \ clean "svr4_genassym.o" # svr4_assym.h optional compat_svr4 \ dependency "$S/kern/genassym.sh svr4_genassym.o" \ compile-with "sh $S/kern/genassym.sh svr4_genassym.o > ${.TARGET}" \ no-obj no-implicit-rule before-depend \ clean "svr4_assym.h" # atkbdmap.h optional atkbd_dflt_keymap \ compile-with "/usr/sbin/kbdcontrol -L ${ATKBD_DFLT_KEYMAP} | sed -e 's/^static keymap_t.* = /static keymap_t key_map = /' -e 's/^static accentmap_t.* = /static accentmap_t accent_map = /' > atkbdmap.h" \ no-obj no-implicit-rule before-depend \ clean "atkbdmap.h" # ukbdmap.h optional ukbd_dflt_keymap \ compile-with "/usr/sbin/kbdcontrol -L ${UKBD_DFLT_KEYMAP} | sed -e 's/^static keymap_t.* = /static keymap_t key_map = /' -e 's/^static accentmap_t.* = /static accentmap_t accent_map = /' > ukbdmap.h" \ no-obj no-implicit-rule before-depend \ clean "ukbdmap.h" # msysosak.o optional fla \ dependency "$S/contrib/dev/fla/i386/msysosak.o.uu" \ compile-with "uudecode < $S/contrib/dev/fla/i386/msysosak.o.uu" \ no-implicit-rule # trlld.o optional oltr \ dependency "$S/contrib/dev/oltr/i386-elf.trlld.o.uu" \ compile-with "uudecode < $S/contrib/dev/oltr/i386-elf.trlld.o.uu" \ no-implicit-rule # compat/linux/linux_file.c optional compat_linux compat/linux/linux_getcwd.c optional compat_linux compat/linux/linux_ioctl.c optional compat_linux compat/linux/linux_ipc.c optional compat_linux compat/linux/linux_mib.c optional compat_linux compat/linux/linux_misc.c optional compat_linux compat/linux/linux_signal.c optional compat_linux compat/linux/linux_socket.c optional compat_linux compat/linux/linux_stats.c optional compat_linux compat/linux/linux_sysctl.c optional compat_linux compat/linux/linux_uid16.c optional compat_linux compat/linux/linux_util.c optional compat_linux compat/pecoff/imgact_pecoff.c optional pecoff_support compat/svr4/imgact_svr4.c optional compat_svr4 compat/svr4/svr4_fcntl.c optional compat_svr4 compat/svr4/svr4_filio.c optional compat_svr4 compat/svr4/svr4_ioctl.c optional compat_svr4 compat/svr4/svr4_ipc.c optional compat_svr4 compat/svr4/svr4_misc.c optional compat_svr4 compat/svr4/svr4_resource.c optional compat_svr4 compat/svr4/svr4_signal.c optional compat_svr4 compat/svr4/svr4_socket.c optional compat_svr4 compat/svr4/svr4_sockio.c optional compat_svr4 compat/svr4/svr4_stat.c optional compat_svr4 compat/svr4/svr4_stream.c optional compat_svr4 compat/svr4/svr4_syscallnames.c optional compat_svr4 compat/svr4/svr4_sysent.c optional compat_svr4 compat/svr4/svr4_sysvec.c optional compat_svr4 compat/svr4/svr4_termios.c optional compat_svr4 compat/svr4/svr4_ttold.c optional compat_svr4 contrib/dev/fla/fla.c optional fla contrib/dev/oltr/if_oltr.c optional oltr contrib/dev/oltr/trlldbm.c optional oltr contrib/dev/oltr/trlldhm.c optional oltr contrib/dev/oltr/trlldmac.c optional oltr bf_enc.o optional ipsec ipsec_esp \ dependency "$S/crypto/blowfish/arch/i386/bf_enc.S $S/crypto/blowfish/arch/i386/bf_enc_586.S $S/crypto/blowfish/arch/i386/bf_enc_686.S" \ compile-with "${CC} -c -I$S/crypto/blowfish/arch/i386 ${ASM_CFLAGS} ${WERROR} ${.IMPSRC}" \ no-implicit-rule crypto/des/arch/i386/des_enc.S optional ipsec ipsec_esp crypto/des/des_ecb.c optional netsmbcrypto crypto/des/arch/i386/des_enc.S optional netsmbcrypto crypto/des/des_setkey.c optional netsmbcrypto dev/aic/aic_cbus.c optional aic isa dev/ar/if_ar_isa.c optional ar isa dev/cm/if_cm_isa.c optional cm isa dev/ct/bshw_machdep.c optional ct dev/ct/ct.c optional ct dev/ct/ct_isa.c optional ct isa dev/ed/if_ed_cbus.c optional ed isa dev/fb/fb.c optional fb dev/fb/fb.c optional gdc dev/fb/splash.c optional splash dev/fe/if_fe_cbus.c optional fe isa dev/kbd/kbd.c optional kbd dev/kbd/kbd.c optional sc dev/kbd/kbd.c optional ukbd dev/kbd/kbd.c optional pckbd dev/lnc/if_lnc_cbus.c optional lnc isa dev/sbni/if_sbni.c optional sbni dev/sbni/if_sbni_isa.c optional sbni isa dev/sbni/if_sbni_pci.c optional sbni pci dev/snc/dp83932.c optional snc dev/snc/dp83932subr.c optional snc dev/snc/if_snc.c optional snc dev/snc/if_snc_cbus.c optional snc isa dev/snc/if_snc_pccard.c optional snc card dev/sr/if_sr_isa.c optional sr isa dev/syscons/apm/apm_saver.c optional apm_saver apm dev/syscons/schistory.c optional sc dev/syscons/scmouse.c optional sc dev/syscons/scterm.c optional sc dev/syscons/scterm-dumb.c optional sc dev/syscons/scvidctl.c optional sc dev/syscons/sysmouse.c optional sc gnu/i386/fpemul/div_small.s optional gpl_math_emulate \ warning "kernel contains GPL contaminated math emulator" gnu/i386/fpemul/errors.c optional gpl_math_emulate gnu/i386/fpemul/fpu_arith.c optional gpl_math_emulate gnu/i386/fpemul/fpu_aux.c optional gpl_math_emulate gnu/i386/fpemul/fpu_entry.c optional gpl_math_emulate gnu/i386/fpemul/fpu_etc.c optional gpl_math_emulate gnu/i386/fpemul/fpu_trig.c optional gpl_math_emulate gnu/i386/fpemul/get_address.c optional gpl_math_emulate gnu/i386/fpemul/load_store.c optional gpl_math_emulate gnu/i386/fpemul/poly_2xm1.c optional gpl_math_emulate gnu/i386/fpemul/poly_atan.c optional gpl_math_emulate gnu/i386/fpemul/poly_div.s optional gpl_math_emulate gnu/i386/fpemul/poly_l2.c optional gpl_math_emulate gnu/i386/fpemul/poly_mul64.s optional gpl_math_emulate gnu/i386/fpemul/poly_sin.c optional gpl_math_emulate gnu/i386/fpemul/poly_tan.c optional gpl_math_emulate gnu/i386/fpemul/polynomial.s optional gpl_math_emulate gnu/i386/fpemul/reg_add_sub.c optional gpl_math_emulate gnu/i386/fpemul/reg_compare.c optional gpl_math_emulate gnu/i386/fpemul/reg_constant.c optional gpl_math_emulate gnu/i386/fpemul/reg_div.s optional gpl_math_emulate gnu/i386/fpemul/reg_ld_str.c optional gpl_math_emulate gnu/i386/fpemul/reg_mul.c optional gpl_math_emulate gnu/i386/fpemul/reg_norm.s optional gpl_math_emulate gnu/i386/fpemul/reg_round.s optional gpl_math_emulate gnu/i386/fpemul/reg_u_add.s optional gpl_math_emulate gnu/i386/fpemul/reg_u_div.s optional gpl_math_emulate gnu/i386/fpemul/reg_u_mul.s optional gpl_math_emulate gnu/i386/fpemul/reg_u_sub.s optional gpl_math_emulate gnu/i386/fpemul/wm_shrx.s optional gpl_math_emulate gnu/i386/fpemul/wm_sqrt.s optional gpl_math_emulate i386/i386/atomic.c standard \ compile-with "${CC} -c ${CFLAGS} ${DEFINED_PROF:S/^$/-fomit-frame-pointer/} ${.IMPSRC}" i386/i386/autoconf.c standard i386/i386/bios.c standard i386/i386/bioscall.s standard i386/i386/busdma_machdep.c standard i386/i386/critical.c standard i386/i386/db_disasm.c optional ddb i386/i386/db_interface.c optional ddb i386/i386/db_trace.c optional ddb i386/i386/dump_machdep.c standard i386/i386/elf_machdep.c standard i386/i386/exception.s standard i386/i386/i386-gdbstub.c optional ddb i386/i386/i686_mem.c standard i386/i386/identcpu.c standard i386/i386/in_cksum.c optional inet i386/i386/initcpu.c standard i386/i386/k6_mem.c standard i386/i386/legacy.c standard # locore.s needs to be handled in Makefile to put it first. Otherwise it's # now normal. # i386/i386/locore.s standard i386/i386/math_emulate.c optional math_emulate i386/i386/mem.c standard i386/i386/mp_clock.c optional smp i386/i386/mp_machdep.c optional smp i386/i386/mpapic.c optional smp i386/i386/mpboot.s optional smp i386/i386/nexus.c standard i386/i386/perfmon.c optional perfmon i386/i386/perfmon.c optional perfmon profiling-routine i386/i386/pmap.c standard i386/i386/support.s standard i386/i386/swtch.s standard i386/i386/sys_machdep.c standard i386/i386/trap.c standard i386/i386/vm86.c standard i386/i386/vm_machdep.c standard i386/ibcs2/ibcs2_errno.c optional ibcs2 i386/ibcs2/ibcs2_fcntl.c optional ibcs2 i386/ibcs2/ibcs2_ioctl.c optional ibcs2 i386/ibcs2/ibcs2_ipc.c optional ibcs2 i386/ibcs2/ibcs2_isc.c optional ibcs2 i386/ibcs2/ibcs2_isc_sysent.c optional ibcs2 i386/ibcs2/ibcs2_misc.c optional ibcs2 i386/ibcs2/ibcs2_msg.c optional ibcs2 i386/ibcs2/ibcs2_other.c optional ibcs2 i386/ibcs2/ibcs2_signal.c optional ibcs2 i386/ibcs2/ibcs2_socksys.c optional ibcs2 i386/ibcs2/ibcs2_stat.c optional ibcs2 i386/ibcs2/ibcs2_sysent.c optional ibcs2 i386/ibcs2/ibcs2_sysi86.c optional ibcs2 i386/ibcs2/ibcs2_sysvec.c optional ibcs2 i386/ibcs2/ibcs2_util.c optional ibcs2 i386/ibcs2/ibcs2_xenix.c optional ibcs2 i386/ibcs2/ibcs2_xenix_sysent.c optional ibcs2 i386/ibcs2/imgact_coff.c optional ibcs2 i386/isa/bs/bs.c optional bs i386/isa/bs/bsfunc.c optional bs i386/isa/bs/bshw.c optional bs i386/isa/bs/bsif.c count bs i386/isa/asc.c count asc i386/isa/cronyx.c optional cx i386/isa/ctx.c count ctx i386/isa/cx.c count cx i386/isa/cy.c count cy i386/isa/elink.c optional ep i386/isa/elink.c optional ie i386/isa/gpib.c optional gp i386/isa/gsc.c count gsc i386/isa/if_cx.c optional cx i386/isa/if_el.c count el i386/isa/if_le.c count le i386/isa/if_rdp.c count rdp i386/isa/intr_machdep.c standard i386/isa/ithread.c standard i386/isa/isa.c optional isa i386/isa/isa_compat.c optional isa compat_oldisa \ warning "Old ISA driver compatibility shims present." i386/isa/istallion.c optional stli nowerror i386/isa/loran.c optional loran -i386/isa/mcd.c count mcd i386/isa/npx.c optional npx i386/isa/pcf.c optional pcf i386/isa/pmtimer.c optional pmtimer i386/isa/prof_machdep.c optional profiling-routine i386/isa/rc.c count rc i386/isa/scd.c count scd i386/isa/spigot.c count spigot i386/isa/stallion.c optional stl nowerror i386/isa/tw.c count tw i386/isa/wt.c count wt i386/linux/imgact_linux.c optional compat_linux i386/linux/linux_dummy.c optional compat_linux i386/linux/linux_locore.s optional compat_linux \ dependency "linux_assym.h" i386/linux/linux_machdep.c optional compat_linux i386/linux/linux_ptrace.c optional compat_linux i386/linux/linux_sysent.c optional compat_linux i386/linux/linux_sysvec.c optional compat_linux i386/pci/pci_cfgreg.c optional pci i386/pci/pci_bus.c optional pci i386/svr4/svr4_locore.s optional compat_svr4 \ dependency "svr4_assym.h" \ warning "COMPAT_SVR4 is broken and should be avoided" i386/svr4/svr4_machdep.c optional compat_svr4 # # isdn4bsd, needed for isic | iwic | ifpi | ifpi2 | ihfc | ifpnp | itjc # i4b/layer1/i4b_hdlc.c optional itjc i4b/layer1/i4b_hdlc.c optional ihfc i4b/layer1/i4b_l1dmux.c optional isic i4b/layer1/i4b_l1lib.c optional isic i4b/layer1/i4b_l1dmux.c optional iwic i4b/layer1/i4b_l1lib.c optional iwic i4b/layer1/i4b_l1dmux.c optional ifpi i4b/layer1/i4b_l1lib.c optional ifpi i4b/layer1/i4b_l1dmux.c optional ifpi2 i4b/layer1/i4b_l1lib.c optional ifpi2 i4b/layer1/i4b_l1dmux.c optional ihfc i4b/layer1/i4b_l1lib.c optional ihfc i4b/layer1/i4b_l1dmux.c optional ifpnp i4b/layer1/i4b_l1lib.c optional ifpnp i4b/layer1/i4b_l1dmux.c optional itjc i4b/layer1/i4b_l1lib.c optional itjc # # isdn4bsd, isic # i4b/layer1/isic/i4b_asuscom_ipac.c optional isic i4b/layer1/isic/i4b_avm_a1.c optional isic i4b/layer1/isic/i4b_bchan.c optional isic i4b/layer1/isic/i4b_ctx_s0P.c optional isic i4b/layer1/isic/i4b_drn_ngo.c optional isic i4b/layer1/isic/i4b_dynalink.c optional isic i4b/layer1/isic/i4b_elsa_qs1i.c optional isic i4b/layer1/isic/i4b_elsa_qs1p.c optional isic pci i4b/layer1/isic/i4b_elsa_pcc16.c optional isic i4b/layer1/isic/i4b_hscx.c optional isic i4b/layer1/isic/i4b_isac.c optional isic i4b/layer1/isic/i4b_isic.c optional isic i4b/layer1/isic/i4b_isic_isa.c optional isic i4b/layer1/isic/i4b_isic_pnp.c optional isic i4b/layer1/isic/i4b_itk_ix1.c optional isic i4b/layer1/isic/i4b_l1.c optional isic i4b/layer1/isic/i4b_l1fsm.c optional isic i4b/layer1/isic/i4b_siemens_isurf.c optional isic i4b/layer1/isic/i4b_sws.c optional isic i4b/layer1/isic/i4b_tel_s016.c optional isic i4b/layer1/isic/i4b_tel_s0163.c optional isic i4b/layer1/isic/i4b_tel_s08.c optional isic i4b/layer1/isic/i4b_usr_sti.c optional isic i4b/layer1/isic/i4b_diva.c optional isic # # isdn4bsd, iwic # i4b/layer1/iwic/i4b_iwic_pci.c optional iwic pci i4b/layer1/iwic/i4b_iwic_dchan.c optional iwic pci i4b/layer1/iwic/i4b_iwic_bchan.c optional iwic pci i4b/layer1/iwic/i4b_iwic_fsm.c optional iwic pci i4b/layer1/iwic/i4b_iwic_l1if.c optional iwic pci # # isdn4bsd, ifpi # i4b/layer1/ifpi/i4b_ifpi_pci.c optional ifpi pci i4b/layer1/ifpi/i4b_ifpi_isac.c optional ifpi pci i4b/layer1/ifpi/i4b_ifpi_l1.c optional ifpi pci i4b/layer1/ifpi/i4b_ifpi_l1fsm.c optional ifpi pci # # isdn4bsd, ifpi2 # i4b/layer1/ifpi2/i4b_ifpi2_pci.c optional ifpi2 pci i4b/layer1/ifpi2/i4b_ifpi2_isacsx.c optional ifpi2 pci i4b/layer1/ifpi2/i4b_ifpi2_l1.c optional ifpi2 pci i4b/layer1/ifpi2/i4b_ifpi2_l1fsm.c optional ifpi2 pci # # isdn4bsd, ifpnp # i4b/layer1/ifpnp/i4b_ifpnp_avm.c optional ifpnp i4b/layer1/ifpnp/i4b_ifpnp_isac.c optional ifpnp i4b/layer1/ifpnp/i4b_ifpnp_l1.c optional ifpnp i4b/layer1/ifpnp/i4b_ifpnp_l1fsm.c optional ifpnp # # isdn4bsd, ihfc # i4b/layer1/ihfc/i4b_ihfc_l1if.c optional ihfc i4b/layer1/ihfc/i4b_ihfc_pnp.c optional ihfc i4b/layer1/ihfc/i4b_ihfc_drv.c optional ihfc # # isdn4bsd, itjc # i4b/layer1/itjc/i4b_itjc_pci.c optional itjc i4b/layer1/itjc/i4b_itjc_isac.c optional itjc i4b/layer1/itjc/i4b_itjc_l1.c optional itjc i4b/layer1/itjc/i4b_itjc_l1fsm.c optional itjc # kern/imgact_aout.c optional compat_aout kern/imgact_gzip.c optional gzip kern/md4c.c optional netsmb kern/subr_diskmbr.c count compat_atdisk libkern/divdi3.c standard libkern/moddi3.c standard libkern/qdivrem.c standard libkern/ucmpdi2.c standard libkern/udivdi3.c standard libkern/umoddi3.c standard netsmb/smb_conn.c optional netsmb netsmb/smb_crypt.c optional netsmb netsmb/smb_dev.c optional netsmb netsmb/smb_iod.c optional netsmb netsmb/smb_rq.c optional netsmb netsmb/smb_smb.c optional netsmb netsmb/smb_subr.c optional netsmb netsmb/smb_trantcp.c optional netsmb netsmb/smb_usr.c optional netsmb pc98/apm/apm.c optional apm pc98/apm/apm_bioscall.s optional apm pc98/i386/busio.s standard pc98/i386/busiosubr.c standard pc98/i386/machdep.c standard pc98/pc98/atapi.c optional wdc pc98/pc98/clock.c standard pc98/pc98/diskslice_machdep.c standard pc98/pc98/fd.c optional fdc pc98/pc98/isa_dma.c optional isa pc98/pc98/mse.c optional mse pc98/pc98/olpt.c optional olpt pc98/pc98/pc98gdc.c optional gdc pc98/pc98/pc98kbd.c optional pckbd pc98/pc98/pc98_machdep.c standard pc98/pc98/pcaudio.c optional pca pc98/pc98/pmc.c optional pmc pc98/pc98/ppc.c optional ppc pc98/pc98/scgdcrndr.c optional sc gdc pc98/pc98/scterm-sck.c optional sc pc98/pc98/scvtbpc98.c optional sc pc98/pc98/sio.c optional sio pc98/pc98/sio_cbus.c optional sio isa pc98/pc98/spkr.c optional speaker pc98/pc98/syscons.c optional sc pc98/pc98/syscons_pc98.c optional sc pc98/pc98/wd.c count wdc pc98/pc98/wd_cd.c count wcd wdc pc98/pc98/wfd.c count wfd wdc pc98/pc98/wst.c count wst wdc pccard/mecia.c optional mecia card pci/cy_pci.c optional cy pci Index: head/sys/dev/mcd/mcd.c =================================================================== --- head/sys/dev/mcd/mcd.c (revision 104444) +++ head/sys/dev/mcd/mcd.c (revision 104445) @@ -1,1831 +1,1787 @@ #include "opt_geom.h" #ifndef GEOM /* * Copyright 1993 by Holger Veit (data part) * Copyright 1993 by Brian Moore (audio part) * Changes Copyright 1993 by Gary Clark II * Changes Copyright (C) 1994-1995 by Andrey A. Chernov, Moscow, Russia * * Rewrote probe routine to work on newer Mitsumi drives. * Additional changes (C) 1994 by Jordan K. Hubbard * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This software was developed by Holger Veit and Brian Moore * for use with "386BSD" and similar operating systems. * "Similar operating systems" includes mainly non-profit oriented * systems for research and education, including but not restricted to * "NetBSD", "FreeBSD", "Mach" (by CMU). * 4. Neither the name of the developer(s) nor the name "386BSD" * may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE DEVELOPER(S) ``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 DEVELOPER(S) 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. * * $FreeBSD$ */ static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; -#include "mcd.h" #include #include #include #include #include #include #include #include #include +#include +#include +#include +#include -#include -#include +#include + +#include +#include #define MCD_TRACE(format, args...) \ { \ - if (mcd_data[unit].debug) { \ - printf("mcd%d: status=0x%02x: ", \ - unit, mcd_data[unit].status); \ + if (sc->debug) { \ + device_printf(sc->dev, "status=0x%02x: ", \ + sc->data.status); \ printf(format, ## args); \ } \ } #define mcd_part(dev) ((minor(dev)) & 7) #define mcd_unit(dev) (((minor(dev)) & 0x38) >> 3) #define mcd_phys(dev) (((minor(dev)) & 0x40) >> 6) #define RAW_PART 2 /* flags */ #define MCDVALID 0x0001 /* parameters loaded */ #define MCDINIT 0x0002 /* device is init'd */ #define MCDNEWMODEL 0x0004 /* device is new model */ #define MCDLABEL 0x0008 /* label is read */ #define MCDPROBING 0x0010 /* probing */ #define MCDREADRAW 0x0020 /* read raw mode (2352 bytes) */ #define MCDVOLINFO 0x0040 /* already read volinfo */ #define MCDTOC 0x0080 /* already read toc */ #define MCDMBXBSY 0x0100 /* local mbx is busy */ /* status */ #define MCDAUDIOBSY MCD_ST_AUDIOBSY /* playing audio */ #define MCDDSKCHNG MCD_ST_DSKCHNG /* sensed change of disk */ #define MCDDSKIN MCD_ST_DSKIN /* sensed disk in drive */ #define MCDDOOROPEN MCD_ST_DOOROPEN /* sensed door open */ /* These are apparently the different states a mitsumi can get up to */ #define MCDCDABSENT 0x0030 #define MCDCDPRESENT 0x0020 #define MCDSCLOSED 0x0080 #define MCDSOPEN 0x00a0 #define MCD_MD_UNKNOWN (-1) -/* toc */ -#define MCD_MAXTOCS 104 /* from the Linux driver */ -#define MCD_LASTPLUS1 170 /* special toc entry */ - #define MCD_TYPE_UNKNOWN 0 #define MCD_TYPE_LU002S 1 #define MCD_TYPE_LU005S 2 #define MCD_TYPE_LU006S 3 #define MCD_TYPE_FX001 4 #define MCD_TYPE_FX001D 5 -struct mcd_mbx { - short unit; - short port; - short retry; - short nblk; - int sz; - u_long skip; - struct bio *bp; - int p_offset; - short count; - short mode; -}; - -static struct mcd_data { - short type; - char *name; - short config; - short flags; - u_char read_command; - short status; - int blksize; - u_long disksize; - int iobase; - struct disklabel dlabel; - int partflags[MAXPARTITIONS]; - int openflags; - struct mcd_volinfo volinfo; - struct mcd_qchninfo toc[MCD_MAXTOCS]; - short audio_status; - short curr_mode; - struct mcd_read2 lastpb; - short debug; - struct bio_queue_head head; /* head of bio queue */ - struct mcd_mbx mbx; -} mcd_data[NMCD]; - /* reader state machine */ #define MCD_S_BEGIN 0 #define MCD_S_BEGIN1 1 #define MCD_S_WAITSTAT 2 #define MCD_S_WAITMODE 3 #define MCD_S_WAITREAD 4 /* prototypes */ -static void mcd_start(int unit); -static int mcd_getdisklabel(int unit); +static void mcd_start(struct mcd_softc *); +static int mcd_getdisklabel(struct mcd_softc *); #ifdef NOTYET -static void mcd_configure(struct mcd_data *cd); +static void mcd_configure(struct mcd_softc *sc); #endif -static int mcd_get(int unit, char *buf, int nmax); -static int mcd_setflags(int unit,struct mcd_data *cd); -static int mcd_getstat(int unit,int sflg); -static int mcd_send(int unit, int cmd,int nretrys); -static void hsg2msf(int hsg, bcd_t *msf); -static int msf2hsg(bcd_t *msf, int relative); -static int mcd_volinfo(int unit); -static ointhand2_t mcdintr; -static int mcd_waitrdy(int port,int dly); -static timeout_t mcd_timeout; -static void mcd_doread(int state, struct mcd_mbx *mbxin); -static void mcd_soft_reset(int unit); -static int mcd_hard_reset(int unit); -static int mcd_setmode(int unit, int mode); -static int mcd_getqchan(int unit, struct mcd_qchninfo *q); -static int mcd_subchan(int unit, struct ioc_read_subchannel *sc); -static int mcd_toc_header(int unit, struct ioc_toc_header *th); -static int mcd_read_toc(int unit); -static int mcd_toc_entrys(int unit, struct ioc_read_toc_entry *te); +static int mcd_get(struct mcd_softc *, char *buf, int nmax); +static int mcd_setflags(struct mcd_softc *); +static int mcd_getstat(struct mcd_softc *,int sflg); +static int mcd_send(struct mcd_softc *, int cmd,int nretrys); +static void hsg2msf(int hsg, bcd_t *msf); +static int msf2hsg(bcd_t *msf, int relative); +static int mcd_volinfo(struct mcd_softc *); +static int mcd_waitrdy(struct mcd_softc *,int dly); +static timeout_t mcd_timeout; +static void mcd_doread(struct mcd_softc *, int state, struct mcd_mbx *mbxin); +static void mcd_soft_reset(struct mcd_softc *); +static int mcd_hard_reset(struct mcd_softc *); +static int mcd_setmode(struct mcd_softc *, int mode); +static int mcd_getqchan(struct mcd_softc *, struct mcd_qchninfo *q); +static int mcd_subchan(struct mcd_softc *, struct ioc_read_subchannel *sc); +static int mcd_toc_header(struct mcd_softc *, struct ioc_toc_header *th); +static int mcd_read_toc(struct mcd_softc *); +static int mcd_toc_entrys(struct mcd_softc *, struct ioc_read_toc_entry *te); #if 0 -static int mcd_toc_entry(int unit, struct ioc_read_toc_single_entry *te); +static int mcd_toc_entry(struct mcd_softc *, struct ioc_read_toc_single_entry *te); #endif -static int mcd_stop(int unit); -static int mcd_eject(int unit); -static int mcd_inject(int unit); -static int mcd_playtracks(int unit, struct ioc_play_track *pt); -static int mcd_play(int unit, struct mcd_read2 *pb); -static int mcd_playmsf(int unit, struct ioc_play_msf *pt); -static int mcd_playblocks(int unit, struct ioc_play_blocks *); -static int mcd_pause(int unit); -static int mcd_resume(int unit); -static int mcd_lock_door(int unit, int lock); -static int mcd_close_tray(int unit); +static int mcd_stop(struct mcd_softc *); +static int mcd_eject(struct mcd_softc *); +static int mcd_inject(struct mcd_softc *); +static int mcd_playtracks(struct mcd_softc *, struct ioc_play_track *pt); +static int mcd_play(struct mcd_softc *, struct mcd_read2 *pb); +static int mcd_playmsf(struct mcd_softc *, struct ioc_play_msf *pt); +static int mcd_playblocks(struct mcd_softc *, struct ioc_play_blocks *); +static int mcd_pause(struct mcd_softc *); +static int mcd_resume(struct mcd_softc *); +static int mcd_lock_door(struct mcd_softc *, int lock); +static int mcd_close_tray(struct mcd_softc *); -static int mcd_probe(struct isa_device *dev); -static int mcd_attach(struct isa_device *dev); -struct isa_driver mcddriver = { - INTR_TYPE_BIO, - mcd_probe, - mcd_attach, - "mcd" -}; -COMPAT_ISA_DRIVER(mcd, mcddriver); +static d_open_t mcdopen; +static d_close_t mcdclose; +static d_ioctl_t mcdioctl; +static d_psize_t mcdsize; +static d_strategy_t mcdstrategy; -static d_open_t mcdopen; -static d_close_t mcdclose; -static d_ioctl_t mcdioctl; -static d_psize_t mcdsize; -static d_strategy_t mcdstrategy; - #define CDEV_MAJOR 29 static struct cdevsw mcd_cdevsw = { /* open */ mcdopen, /* close */ mcdclose, /* read */ physread, /* write */ nowrite, /* ioctl */ mcdioctl, /* poll */ nopoll, /* mmap */ nommap, /* strategy */ mcdstrategy, /* name */ "mcd", /* maj */ CDEV_MAJOR, /* dump */ nodump, /* psize */ nopsize, /* flags */ D_DISK, }; -#define mcd_put(port,byte) outb(port,byte) - #define MCD_RETRYS 5 #define MCD_RDRETRYS 8 #define CLOSE_TRAY_SECS 8 #define DISK_SENSE_SECS 3 #define WAIT_FRAC 4 /* several delays */ #define RDELAY_WAITSTAT 300 #define RDELAY_WAITMODE 300 #define RDELAY_WAITREAD 800 #define MIN_DELAY 15 #define DELAY_GETREPLY 5000000 -static int -mcd_attach(struct isa_device *dev) +int +mcd_attach(struct mcd_softc *sc) { - int unit = dev->id_unit; - struct mcd_data *cd = mcd_data + unit; + struct mcd_data *cd; + int unit; - dev->id_ointr = mcdintr; - cd->iobase = dev->id_iobase; + cd = &sc->data; + unit = device_get_unit(sc->dev); + cd->flags |= MCDINIT; - mcd_soft_reset(unit); + mcd_soft_reset(sc); bioq_init(&cd->head); #ifdef NOTYET /* wire controller for interrupts and dma */ - mcd_configure(cd); + mcd_configure(sc); #endif /* name filled in probe */ - make_dev(&mcd_cdevsw, dkmakeminor(unit, 0, 0), - UID_ROOT, GID_OPERATOR, 0640, "mcd%da", unit); - make_dev(&mcd_cdevsw, dkmakeminor(unit, 0, RAW_PART), - UID_ROOT, GID_OPERATOR, 0640, "mcd%dc", unit); - return 1; + sc->mcd_dev_t[0] = make_dev(&mcd_cdevsw, 0, + UID_ROOT, GID_OPERATOR, 0640, "mcd%d", unit); + sc->mcd_dev_t[1] = make_dev_alias(sc->mcd_dev_t[0], "mcd%da", unit); + sc->mcd_dev_t[2] = make_dev_alias(sc->mcd_dev_t[0], "mcd%dc", unit); + + sc->mcd_dev_t[0]->si_drv1 = sc->mcd_dev_t[1]->si_drv1 = + sc->mcd_dev_t[2]->si_drv1 = (void *)sc; + + return 0; } static int mcdopen(dev_t dev, int flags, int fmt, struct thread *td) { - int unit,part,phys,r,retry; + struct mcd_softc *sc; struct mcd_data *cd; + int part,phys,r,retry; - unit = mcd_unit(dev); - if (unit >= NMCD) - return ENXIO; - - cd = mcd_data + unit; + sc = (struct mcd_softc *)dev->si_drv1; + cd = &sc->data; part = mcd_part(dev); phys = mcd_phys(dev); /* not initialized*/ if (!(cd->flags & MCDINIT)) return ENXIO; /* invalidated in the meantime? mark all open part's invalid */ if (!(cd->flags & MCDVALID) && cd->openflags) return ENXIO; - if (mcd_getstat(unit,1) == -1) + if (mcd_getstat(sc, 1) == -1) return EIO; if ( (cd->status & (MCDDSKCHNG|MCDDOOROPEN)) || !(cd->status & MCDDSKIN)) for (retry = 0; retry < DISK_SENSE_SECS * WAIT_FRAC; retry++) { (void) tsleep((caddr_t)cd, PSOCK | PCATCH, "mcdsn1", hz/WAIT_FRAC); - if ((r = mcd_getstat(unit,1)) == -1) + if ((r = mcd_getstat(sc, 1)) == -1) return EIO; if (r != -2) break; } if (( (cd->status & (MCDDOOROPEN|MCDDSKCHNG)) || !(cd->status & MCDDSKIN) ) && major(dev) == CDEV_MAJOR && part == RAW_PART ) { cd->openflags |= (1<partflags[part] |= MCDREADRAW; return 0; } if (cd->status & MCDDOOROPEN) { - printf("mcd%d: door is open\n", unit); + device_printf(sc->dev, "door is open\n"); return ENXIO; } if (!(cd->status & MCDDSKIN)) { - printf("mcd%d: no CD inside\n", unit); + device_printf(sc->dev, "no CD inside\n"); return ENXIO; } if (cd->status & MCDDSKCHNG) { - printf("mcd%d: CD not sensed\n", unit); + device_printf(sc->dev, "CD not sensed\n"); return ENXIO; } if (mcdsize(dev) < 0) { if (major(dev) == CDEV_MAJOR && part == RAW_PART) { cd->openflags |= (1<partflags[part] |= MCDREADRAW; return 0; } - printf("mcd%d: failed to get disk size\n",unit); + device_printf(sc->dev, "failed to get disk size\n"); return ENXIO; } else cd->flags |= MCDVALID; /* XXX get a default disklabel */ - mcd_getdisklabel(unit); + mcd_getdisklabel(sc); MCD_TRACE("open: partition=%d, disksize = %ld, blksize=%d\n", part, cd->disksize, cd->blksize); dev->si_bsize_phys = cd->blksize; if (part == RAW_PART || (part < cd->dlabel.d_npartitions && cd->dlabel.d_partitions[part].p_fstype != FS_UNUSED)) { cd->openflags |= (1<partflags[part] |= MCDREADRAW; - (void) mcd_lock_door(unit, MCD_LK_LOCK); + (void) mcd_lock_door(sc, MCD_LK_LOCK); if (!(cd->flags & MCDVALID)) return ENXIO; return 0; } return ENXIO; } static int mcdclose(dev_t dev, int flags, int fmt, struct thread *td) { - int unit,part; + struct mcd_softc *sc; struct mcd_data *cd; + int part; - unit = mcd_unit(dev); - if (unit >= NMCD) - return ENXIO; - - cd = mcd_data + unit; + sc = (struct mcd_softc *)dev->si_drv1; + cd = &sc->data; part = mcd_part(dev); if (!(cd->flags & MCDINIT) || !(cd->openflags & (1<openflags &= ~(1<partflags[part] &= ~MCDREADRAW; return 0; } static void mcdstrategy(struct bio *bp) { + struct mcd_softc *sc; struct mcd_data *cd; int s; int unit = mcd_unit(bp->bio_dev); - cd = mcd_data + unit; + sc = (struct mcd_softc *)bp->bio_dev->si_drv1; + cd = &sc->data; /* test validity */ /*MCD_TRACE("strategy: buf=0x%lx, unit=%ld, block#=%ld bcount=%ld\n", bp,unit,bp->bio_blkno,bp->bio_bcount);*/ - if (unit >= NMCD || bp->bio_blkno < 0) { + if (bp->bio_blkno < 0) { printf("mcdstrategy: unit = %d, blkno = %ld, bcount = %ld\n", unit, (long)bp->bio_blkno, bp->bio_bcount); printf("mcd: mcdstratregy failure"); bp->bio_error = EINVAL; bp->bio_flags |= BIO_ERROR; goto bad; } /* if device invalidated (e.g. media change, door open), error */ if (!(cd->flags & MCDVALID)) { MCD_TRACE("strategy: drive not valid\n"); bp->bio_error = EIO; goto bad; } /* read only */ if (!(bp->bio_cmd == BIO_READ)) { bp->bio_error = EROFS; goto bad; } /* no data to read */ if (bp->bio_bcount == 0) goto done; /* for non raw access, check partition limits */ if (mcd_part(bp->bio_dev) != RAW_PART) { if (!(cd->flags & MCDLABEL)) { bp->bio_error = EIO; goto bad; } /* adjust transfer if necessary */ if (bounds_check_with_label(bp,&cd->dlabel,1) <= 0) { goto done; } } else { bp->bio_pblkno = bp->bio_blkno; bp->bio_resid = 0; } /* queue it */ s = splbio(); bioqdisksort(&cd->head, bp); splx(s); /* now check whether we can perform processing */ - mcd_start(unit); + mcd_start(sc); return; bad: bp->bio_flags |= BIO_ERROR; done: bp->bio_resid = bp->bio_bcount; biodone(bp); return; } static void -mcd_start(int unit) +mcd_start(struct mcd_softc *sc) { - struct mcd_data *cd = mcd_data + unit; + struct mcd_data *cd = &sc->data; struct partition *p; struct bio *bp; int s = splbio(); if (cd->flags & MCDMBXBSY) { splx(s); return; } bp = bioq_first(&cd->head); if (bp != 0) { /* block found to process, dequeue */ /*MCD_TRACE("mcd_start: found block bp=0x%x\n",bp,0,0,0);*/ bioq_remove(&cd->head, bp); splx(s); } else { /* nothing to do */ splx(s); return; } /* changed media? */ if (!(cd->flags & MCDVALID)) { MCD_TRACE("mcd_start: drive not valid\n"); return; } p = cd->dlabel.d_partitions + mcd_part(bp->bio_dev); cd->flags |= MCDMBXBSY; if (cd->partflags[mcd_part(bp->bio_dev)] & MCDREADRAW) cd->flags |= MCDREADRAW; - cd->mbx.unit = unit; - cd->mbx.port = cd->iobase; + cd->mbx.unit = device_get_unit(sc->dev); cd->mbx.retry = MCD_RETRYS; cd->mbx.bp = bp; cd->mbx.p_offset = p->p_offset; /* calling the read routine */ - mcd_doread(MCD_S_BEGIN,&(cd->mbx)); + mcd_doread(sc, MCD_S_BEGIN,&(cd->mbx)); /* triggers mcd_start, when successful finished */ return; } static int mcdioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct thread *td) { + struct mcd_softc *sc; struct mcd_data *cd; int unit,part,retry,r; unit = mcd_unit(dev); part = mcd_part(dev); - cd = mcd_data + unit; + sc = (struct mcd_softc *)dev->si_drv1; + cd = &sc->data; - if (mcd_getstat(unit, 1) == -1) /* detect disk change too */ + if (mcd_getstat(sc, 1) == -1) /* detect disk change too */ return EIO; MCD_TRACE("ioctl called 0x%lx\n", cmd); switch (cmd) { case CDIOCSETPATCH: case CDIOCGETVOL: case CDIOCSETVOL: case CDIOCSETMONO: case CDIOCSETSTERIO: case CDIOCSETMUTE: case CDIOCSETLEFT: case CDIOCSETRIGHT: return EINVAL; case CDIOCEJECT: - return mcd_eject(unit); + return mcd_eject(sc); case CDIOCSETDEBUG: cd->debug = 1; return 0; case CDIOCCLRDEBUG: cd->debug = 0; return 0; case CDIOCRESET: - return mcd_hard_reset(unit); + return mcd_hard_reset(sc); case CDIOCALLOW: - return mcd_lock_door(unit, MCD_LK_UNLOCK); + return mcd_lock_door(sc, MCD_LK_UNLOCK); case CDIOCPREVENT: - return mcd_lock_door(unit, MCD_LK_LOCK); + return mcd_lock_door(sc, MCD_LK_LOCK); case CDIOCCLOSE: - return mcd_inject(unit); + return mcd_inject(sc); } if (!(cd->flags & MCDVALID)) { if ( major(dev) != CDEV_MAJOR || part != RAW_PART || !(cd->openflags & (1<status & (MCDDSKCHNG|MCDDOOROPEN)) || !(cd->status & MCDDSKIN)) for (retry = 0; retry < DISK_SENSE_SECS * WAIT_FRAC; retry++) { (void) tsleep((caddr_t)cd, PSOCK | PCATCH, "mcdsn2", hz/WAIT_FRAC); - if ((r = mcd_getstat(unit,1)) == -1) + if ((r = mcd_getstat(sc, 1)) == -1) return EIO; if (r != -2) break; } if ( (cd->status & (MCDDOOROPEN|MCDDSKCHNG)) || !(cd->status & MCDDSKIN) || mcdsize(dev) < 0 ) return ENXIO; cd->flags |= MCDVALID; - mcd_getdisklabel(unit); + mcd_getdisklabel(sc); if (mcd_phys(dev)) cd->partflags[part] |= MCDREADRAW; - (void) mcd_lock_door(unit, MCD_LK_LOCK); + (void) mcd_lock_door(sc, MCD_LK_LOCK); if (!(cd->flags & MCDVALID)) return ENXIO; } switch (cmd) { case DIOCGDINFO: *(struct disklabel *) addr = cd->dlabel; return 0; /* * a bit silly, but someone might want to test something on a * section of cdrom. */ case DIOCWDINFO: case DIOCSDINFO: if ((flags & FWRITE) == 0) return EBADF; else { return setdisklabel(&cd->dlabel, (struct disklabel *) addr, 0); } case DIOCWLABEL: return EBADF; case CDIOCPLAYTRACKS: - return mcd_playtracks(unit, (struct ioc_play_track *) addr); + return mcd_playtracks(sc, (struct ioc_play_track *) addr); case CDIOCPLAYBLOCKS: - return mcd_playblocks(unit, (struct ioc_play_blocks *) addr); + return mcd_playblocks(sc, (struct ioc_play_blocks *) addr); case CDIOCPLAYMSF: - return mcd_playmsf(unit, (struct ioc_play_msf *) addr); + return mcd_playmsf(sc, (struct ioc_play_msf *) addr); case CDIOCREADSUBCHANNEL: - return mcd_subchan(unit, (struct ioc_read_subchannel *) addr); + return mcd_subchan(sc, (struct ioc_read_subchannel *) addr); case CDIOREADTOCHEADER: - return mcd_toc_header(unit, (struct ioc_toc_header *) addr); + return mcd_toc_header(sc, (struct ioc_toc_header *) addr); case CDIOREADTOCENTRYS: - return mcd_toc_entrys(unit, (struct ioc_read_toc_entry *) addr); + return mcd_toc_entrys(sc, (struct ioc_read_toc_entry *) addr); case CDIOCRESUME: - return mcd_resume(unit); + return mcd_resume(sc); case CDIOCPAUSE: - return mcd_pause(unit); + return mcd_pause(sc); case CDIOCSTART: - if (mcd_setmode(unit, MCD_MD_COOKED) != 0) + if (mcd_setmode(sc, MCD_MD_COOKED) != 0) return EIO; return 0; case CDIOCSTOP: - return mcd_stop(unit); + return mcd_stop(sc); default: return ENOTTY; } /*NOTREACHED*/ } /* this could have been taken from scsi/cd.c, but it is not clear * whether the scsi cd driver is linked in */ static int -mcd_getdisklabel(int unit) +mcd_getdisklabel(struct mcd_softc *sc) { - struct mcd_data *cd = mcd_data + unit; + struct mcd_data *cd = &sc->data; if (cd->flags & MCDLABEL) return -1; bzero(&cd->dlabel,sizeof(struct disklabel)); /* filled with spaces first */ strncpy(cd->dlabel.d_typename," ", sizeof(cd->dlabel.d_typename)); strncpy(cd->dlabel.d_typename, cd->name, min(strlen(cd->name), sizeof(cd->dlabel.d_typename) - 1)); strncpy(cd->dlabel.d_packname,"unknown ", sizeof(cd->dlabel.d_packname)); cd->dlabel.d_secsize = cd->blksize; cd->dlabel.d_nsectors = 100; cd->dlabel.d_ntracks = 1; cd->dlabel.d_ncylinders = (cd->disksize/100)+1; cd->dlabel.d_secpercyl = 100; cd->dlabel.d_secperunit = cd->disksize; cd->dlabel.d_rpm = 300; cd->dlabel.d_interleave = 1; cd->dlabel.d_flags = D_REMOVABLE; cd->dlabel.d_npartitions= 1; cd->dlabel.d_partitions[0].p_offset = 0; cd->dlabel.d_partitions[0].p_size = cd->disksize; cd->dlabel.d_partitions[0].p_fstype = 9; cd->dlabel.d_magic = DISKMAGIC; cd->dlabel.d_magic2 = DISKMAGIC; cd->dlabel.d_checksum = dkcksum(&cd->dlabel); cd->flags |= MCDLABEL; return 0; } static int mcdsize(dev_t dev) { + struct mcd_softc *sc; + struct mcd_data *cd; int size; - int unit = mcd_unit(dev); - struct mcd_data *cd = mcd_data + unit; + int unit; - if (mcd_volinfo(unit) == 0) { + unit = mcd_unit(dev); + sc = (struct mcd_softc *)dev->si_drv1; + cd = &sc->data; + + if (mcd_volinfo(sc) == 0) { cd->blksize = MCDBLK; size = msf2hsg(cd->volinfo.vol_msf, 0); cd->disksize = size * (MCDBLK/DEV_BSIZE); return 0; } return -1; } /*************************************************************** * lower level of driver starts here **************************************************************/ #ifdef NOTDEF static char irqs[] = { 0x00,0x00,0x10,0x20,0x00,0x30,0x00,0x00, 0x00,0x10,0x40,0x50,0x00,0x00,0x00,0x00 }; static char drqs[] = { 0x00,0x01,0x00,0x03,0x00,0x05,0x06,0x07, }; #endif #ifdef NOT_YET static void -mcd_configure(struct mcd_data *cd) +mcd_configure(struct mcd_softc *sc) { - outb(cd->iobase+mcd_config,cd->config); + MCD_WRITE(sc, MCD_REG_CONFIG, sc->data.config); } #endif /* Wait for non-busy - return 0 on timeout */ static int -twiddle_thumbs(int port, int unit, int count, char *whine) +twiddle_thumbs(struct mcd_softc *sc, int count, char *whine) { int i; for (i = 0; i < count; i++) { - if (!(inb(port+MCD_FLAGS) & MFL_STATUS_NOT_AVAIL)) + if (!(MCD_READ(sc, MCD_FLAGS) & MFL_STATUS_NOT_AVAIL)) return 1; } if (bootverbose) - printf("mcd%d: timeout %s\n", unit, whine); + device_printf(sc->dev, "timeout %s\n", whine); return 0; } /* check to see if a Mitsumi CD-ROM is attached to the ISA bus */ -static int -mcd_probe(struct isa_device *dev) +int +mcd_probe(struct mcd_softc *sc) { - int port = dev->id_iobase; - int unit = dev->id_unit; + int unit; int i, j; unsigned char stbytes[3]; - mcd_data[unit].flags = MCDPROBING; + unit = device_get_unit(sc->dev); + sc->data.flags = MCDPROBING; #ifdef NOTDEF /* get irq/drq configuration word */ - mcd_data[unit].config = irqs[dev->id_irq]; /* | drqs[dev->id_drq];*/ + sc->data.config = irqs[dev->id_irq]; /* | drqs[dev->id_drq];*/ #else - mcd_data[unit].config = 0; + sc->data.config = 0; #endif /* send a reset */ - outb(port+MCD_FLAGS, M_RESET); + MCD_WRITE(sc, MCD_FLAGS, M_RESET); /* * delay awhile by getting any pending garbage (old data) and * throwing it away. */ for (i = 1000000; i != 0; i--) - inb(port+MCD_FLAGS); + (void)MCD_READ(sc, MCD_FLAGS); /* Get status */ - outb(port+MCD_DATA, MCD_CMDGETSTAT); - if (!twiddle_thumbs(port, unit, 1000000, "getting status")) - return 0; /* Timeout */ + MCD_WRITE(sc, MCD_DATA, MCD_CMDGETSTAT); + if (!twiddle_thumbs(sc, 1000000, "getting status")) + return (ENXIO); /* Timeout */ /* Get version information */ - outb(port+MCD_DATA, MCD_CMDCONTINFO); + MCD_WRITE(sc, MCD_DATA, MCD_CMDCONTINFO); for (j = 0; j < 3; j++) { - if (!twiddle_thumbs(port, unit, 3000, "getting version info")) - return 0; - stbytes[j] = (inb(port+MCD_DATA) & 0xFF); + if (!twiddle_thumbs(sc, 3000, "getting version info")) + return (ENXIO); + stbytes[j] = (MCD_READ(sc, MCD_DATA) & 0xFF); } if (stbytes[1] == stbytes[2]) - return 0; + return (ENXIO); if (stbytes[2] >= 4 || stbytes[1] != 'M') { - outb(port+MCD_CTRL, M_PICKLE); - mcd_data[unit].flags |= MCDNEWMODEL; + MCD_WRITE(sc, MCD_CTRL, M_PICKLE); + sc->data.flags |= MCDNEWMODEL; } - mcd_data[unit].read_command = MCD_CMDSINGLESPEEDREAD; + sc->data.read_command = MCD_CMDSINGLESPEEDREAD; switch (stbytes[1]) { case 'M': if (stbytes[2] <= 2) { - mcd_data[unit].type = MCD_TYPE_LU002S; - mcd_data[unit].name = "Mitsumi LU002S"; + sc->data.type = MCD_TYPE_LU002S; + sc->data.name = "Mitsumi LU002S"; } else if (stbytes[2] <= 5) { - mcd_data[unit].type = MCD_TYPE_LU005S; - mcd_data[unit].name = "Mitsumi LU005S"; + sc->data.type = MCD_TYPE_LU005S; + sc->data.name = "Mitsumi LU005S"; } else { - mcd_data[unit].type = MCD_TYPE_LU006S; - mcd_data[unit].name = "Mitsumi LU006S"; + sc->data.type = MCD_TYPE_LU006S; + sc->data.name = "Mitsumi LU006S"; } break; case 'F': - mcd_data[unit].type = MCD_TYPE_FX001; - mcd_data[unit].name = "Mitsumi FX001"; + sc->data.type = MCD_TYPE_FX001; + sc->data.name = "Mitsumi FX001"; break; case 'D': - mcd_data[unit].type = MCD_TYPE_FX001D; - mcd_data[unit].name = "Mitsumi FX001D"; - mcd_data[unit].read_command = MCD_CMDDOUBLESPEEDREAD; + sc->data.type = MCD_TYPE_FX001D; + sc->data.name = "Mitsumi FX001D"; + sc->data.read_command = MCD_CMDDOUBLESPEEDREAD; break; default: - mcd_data[unit].type = MCD_TYPE_UNKNOWN; - mcd_data[unit].name = "Mitsumi ???"; + sc->data.type = MCD_TYPE_UNKNOWN; + sc->data.name = "Mitsumi ???"; break; } - printf("mcd%d: type %s, version info: %c %x\n", unit, mcd_data[unit].name, - stbytes[1], stbytes[2]); - return 4; + if (bootverbose) + device_printf(sc->dev, "type %s, version info: %c %x\n", + sc->data.name, stbytes[1], stbytes[2]); + + return 0; } static int -mcd_waitrdy(int port,int dly) +mcd_waitrdy(struct mcd_softc *sc, int dly) { int i; /* wait until flag port senses status ready */ for (i=0; iiobase; /* wait data to become ready */ - if (mcd_waitrdy(port,dly)<0) { - printf("mcd%d: timeout getreply\n",unit); + if (mcd_waitrdy(sc, dly)<0) { + device_printf(sc->dev, "timeout getreply\n"); return -1; } /* get the data */ - return inb(port+mcd_status) & 0xFF; + return MCD_READ(sc, MCD_REG_STATUS) & 0xFF; } static int -mcd_getstat(int unit,int sflg) +mcd_getstat(struct mcd_softc *sc, int sflg) { int i; - struct mcd_data *cd = mcd_data + unit; - int port = cd->iobase; + struct mcd_data *cd = &sc->data; /* get the status */ if (sflg) - outb(port+mcd_command, MCD_CMDGETSTAT); - i = mcd_getreply(unit,DELAY_GETREPLY); + MCD_WRITE(sc, MCD_REG_COMMAND, MCD_CMDGETSTAT); + i = mcd_getreply(sc, DELAY_GETREPLY); if (i<0 || (i & MCD_ST_CMDCHECK)) { cd->curr_mode = MCD_MD_UNKNOWN; return -1; } cd->status = i; - if (mcd_setflags(unit,cd) < 0) + if (mcd_setflags(sc) < 0) return -2; return cd->status; } static int -mcd_setflags(int unit, struct mcd_data *cd) +mcd_setflags(struct mcd_softc *sc) { + struct mcd_data *cd = &sc->data; + /* check flags */ if ( (cd->status & (MCDDSKCHNG|MCDDOOROPEN)) || !(cd->status & MCDDSKIN)) { MCD_TRACE("setflags: sensed DSKCHNG or DOOROPEN or !DSKIN\n"); - mcd_soft_reset(unit); + mcd_soft_reset(sc); return -1; } if (cd->status & MCDAUDIOBSY) cd->audio_status = CD_AS_PLAY_IN_PROGRESS; else if (cd->audio_status == CD_AS_PLAY_IN_PROGRESS) cd->audio_status = CD_AS_PLAY_COMPLETED; return 0; } static int -mcd_get(int unit, char *buf, int nmax) +mcd_get(struct mcd_softc *sc, char *buf, int nmax) { int i,k; for (i=0; idev, "timeout mcd_get\n"); return -1; } buf[i] = k; } return i; } static int -mcd_send(int unit, int cmd,int nretrys) +mcd_send(struct mcd_softc *sc, int cmd,int nretrys) { int i,k=0; - int port = mcd_data[unit].iobase; /*MCD_TRACE("mcd_send: command = 0x%02x\n",cmd,0,0,0);*/ for (i=0; idev, "media changed\n"); return -1; } if (i == nretrys) { - printf("mcd%d: mcd_send retry cnt exceeded\n",unit); + device_printf(sc->dev, "mcd_send retry cnt exceeded\n"); return -1; } /*MCD_TRACE("mcd_send: done\n",0,0,0,0);*/ return 0; } static void hsg2msf(int hsg, bcd_t *msf) { hsg += 150; F_msf(msf) = bin2bcd(hsg % 75); hsg /= 75; S_msf(msf) = bin2bcd(hsg % 60); hsg /= 60; M_msf(msf) = bin2bcd(hsg); } static int msf2hsg(bcd_t *msf, int relative) { return (bcd2bin(M_msf(msf)) * 60 + bcd2bin(S_msf(msf))) * 75 + bcd2bin(F_msf(msf)) - (!relative) * 150; } static int -mcd_volinfo(int unit) +mcd_volinfo(struct mcd_softc *sc) { - struct mcd_data *cd = mcd_data + unit; + struct mcd_data *cd = &sc->data; /* Just return if we already have it */ if (cd->flags & MCDVOLINFO) return 0; /*MCD_TRACE("mcd_volinfo: enter\n",0,0,0,0);*/ /* send volume info command */ - if (mcd_send(unit,MCD_CMDGETVOLINFO,MCD_RETRYS) < 0) + if (mcd_send(sc, MCD_CMDGETVOLINFO,MCD_RETRYS) < 0) return EIO; /* get data */ - if (mcd_get(unit,(char*) &cd->volinfo,sizeof(struct mcd_volinfo)) < 0) { - printf("mcd%d: mcd_volinfo: error read data\n",unit); + if (mcd_get(sc, (char*) &cd->volinfo,sizeof(struct mcd_volinfo)) < 0) { + device_printf(sc->dev, "mcd_volinfo: error read data\n"); return EIO; } if (cd->volinfo.trk_low > 0 && cd->volinfo.trk_high >= cd->volinfo.trk_low ) { cd->flags |= MCDVOLINFO; /* volinfo is OK */ return 0; } return EINVAL; } -static void -mcdintr(unit) - int unit; -{ - MCD_TRACE("stray interrupt\n"); -} - /* state machine to process read requests * initialize with MCD_S_BEGIN: calculate sizes, and read status * MCD_S_WAITSTAT: wait for status reply, set mode * MCD_S_WAITMODE: waits for status reply from set mode, set read command * MCD_S_WAITREAD: wait for read ready, read data */ -static struct mcd_mbx *mbxsave; -static struct callout_handle tohandle = CALLOUT_HANDLE_INITIALIZER(&tohandle); - static void mcd_timeout(void *arg) { - mcd_doread((int)arg, mbxsave); + struct mcd_softc *sc; + + sc = (struct mcd_softc *)arg; + + mcd_doread(sc, sc->ch_state, sc->ch_mbxsave); } static void -mcd_doread(int state, struct mcd_mbx *mbxin) +mcd_doread(struct mcd_softc *sc, int state, struct mcd_mbx *mbxin) { - struct mcd_mbx *mbx = (state!=MCD_S_BEGIN) ? mbxsave : mbxin; - int unit = mbx->unit; - int port = mbx->port; - int com_port = mbx->port + mcd_command; - int data_port = mbx->port + mcd_rdata; - struct bio *bp = mbx->bp; - struct mcd_data *cd = mcd_data + unit; - - int rm,i,k; + struct mcd_mbx *mbx; + struct bio *bp; + struct mcd_data *cd; + int rm, i, k; struct mcd_read2 rbuf; - int blknum; + int blknum; caddr_t addr; + mbx = (state!=MCD_S_BEGIN) ? sc->ch_mbxsave : mbxin; + bp = mbx->bp; + cd = &sc->data; + loop: switch (state) { case MCD_S_BEGIN: - mbx = mbxsave = mbxin; + mbx = sc->ch_mbxsave = mbxin; case MCD_S_BEGIN1: retry_status: /* get status */ - outb(com_port, MCD_CMDGETSTAT); + MCD_WRITE(sc, MCD_REG_COMMAND, MCD_CMDGETSTAT); mbx->count = RDELAY_WAITSTAT; - tohandle = timeout(mcd_timeout, - (caddr_t)MCD_S_WAITSTAT,hz/100); /* XXX */ + sc->ch_state = MCD_S_WAITSTAT; + sc->ch = timeout(mcd_timeout, (caddr_t)sc, hz/100); /* XXX */ return; case MCD_S_WAITSTAT: - untimeout(mcd_timeout,(caddr_t)MCD_S_WAITSTAT, tohandle); + sc->ch_state = MCD_S_WAITSTAT; + untimeout(mcd_timeout,(caddr_t)sc, sc->ch); if (mbx->count-- >= 0) { - if (inb(port+MCD_FLAGS) & MFL_STATUS_NOT_AVAIL) { - timeout(mcd_timeout, - (caddr_t)MCD_S_WAITSTAT,hz/100); /* XXX */ + if (MCD_READ(sc, MCD_FLAGS) & MFL_STATUS_NOT_AVAIL) { + sc->ch_state = MCD_S_WAITSTAT; + timeout(mcd_timeout, (caddr_t)sc, hz/100); /* XXX */ return; } - cd->status = inb(port+mcd_status) & 0xFF; + cd->status = MCD_READ(sc, MCD_REG_STATUS) & 0xFF; if (cd->status & MCD_ST_CMDCHECK) goto retry_status; - if (mcd_setflags(unit,cd) < 0) + if (mcd_setflags(sc) < 0) goto changed; MCD_TRACE("got WAITSTAT delay=%d\n", RDELAY_WAITSTAT-mbx->count); /* reject, if audio active */ if (cd->status & MCDAUDIOBSY) { - printf("mcd%d: audio is active\n",unit); + device_printf(sc->dev, "audio is active\n"); goto readerr; } retry_mode: /* to check for raw/cooked mode */ if (cd->flags & MCDREADRAW) { rm = MCD_MD_RAW; mbx->sz = MCDRBLK; } else { rm = MCD_MD_COOKED; mbx->sz = cd->blksize; } if (rm == cd->curr_mode) goto modedone; mbx->count = RDELAY_WAITMODE; cd->curr_mode = MCD_MD_UNKNOWN; mbx->mode = rm; - mcd_put(com_port, MCD_CMDSETMODE); - mcd_put(com_port, rm); + MCD_WRITE(sc, MCD_REG_COMMAND, MCD_CMDSETMODE); + MCD_WRITE(sc, MCD_REG_COMMAND, rm); - tohandle = timeout(mcd_timeout, - (caddr_t)MCD_S_WAITMODE,hz/100); /* XXX */ + sc->ch_state = MCD_S_WAITMODE; + sc->ch = timeout(mcd_timeout, (caddr_t)sc, hz/100); /* XXX */ return; } else { - printf("mcd%d: timeout getstatus\n",unit); + device_printf(sc->dev, "timeout getstatus\n"); goto readerr; } case MCD_S_WAITMODE: - untimeout(mcd_timeout,(caddr_t)MCD_S_WAITMODE, tohandle); + sc->ch_state = MCD_S_WAITMODE; + untimeout(mcd_timeout, (caddr_t)sc, sc->ch); if (mbx->count-- < 0) { - printf("mcd%d: timeout set mode\n",unit); + device_printf(sc->dev, "timeout set mode\n"); goto readerr; } - if (inb(port+MCD_FLAGS) & MFL_STATUS_NOT_AVAIL) { - tohandle = timeout(mcd_timeout, - (caddr_t)MCD_S_WAITMODE,hz/100); + if (MCD_READ(sc, MCD_FLAGS) & MFL_STATUS_NOT_AVAIL) { + sc->ch_state = MCD_S_WAITMODE; + sc->ch = timeout(mcd_timeout, (caddr_t)sc, hz/100); return; } - cd->status = inb(port+mcd_status) & 0xFF; + cd->status = MCD_READ(sc, MCD_REG_STATUS) & 0xFF; if (cd->status & MCD_ST_CMDCHECK) { cd->curr_mode = MCD_MD_UNKNOWN; goto retry_mode; } - if (mcd_setflags(unit,cd) < 0) + if (mcd_setflags(sc) < 0) goto changed; cd->curr_mode = mbx->mode; MCD_TRACE("got WAITMODE delay=%d\n", RDELAY_WAITMODE-mbx->count); modedone: /* for first block */ mbx->nblk = (bp->bio_bcount + (mbx->sz-1)) / mbx->sz; mbx->skip = 0; nextblock: blknum = (bp->bio_blkno / (mbx->sz/DEV_BSIZE)) + mbx->p_offset + mbx->skip/mbx->sz; MCD_TRACE("mcd_doread: read blknum=%d for bp=%p\n", blknum, bp); /* build parameter block */ hsg2msf(blknum,rbuf.start_msf); retry_read: /* send the read command */ disable_intr(); - mcd_put(com_port,cd->read_command); - mcd_put(com_port,rbuf.start_msf[0]); - mcd_put(com_port,rbuf.start_msf[1]); - mcd_put(com_port,rbuf.start_msf[2]); - mcd_put(com_port,0); - mcd_put(com_port,0); - mcd_put(com_port,1); + MCD_WRITE(sc, MCD_REG_COMMAND, cd->read_command); + MCD_WRITE(sc, MCD_REG_COMMAND, rbuf.start_msf[0]); + MCD_WRITE(sc, MCD_REG_COMMAND, rbuf.start_msf[1]); + MCD_WRITE(sc, MCD_REG_COMMAND, rbuf.start_msf[2]); + MCD_WRITE(sc, MCD_REG_COMMAND, 0); + MCD_WRITE(sc, MCD_REG_COMMAND, 0); + MCD_WRITE(sc, MCD_REG_COMMAND, 1); enable_intr(); /* Spin briefly (<= 2ms) to avoid missing next block */ for (i = 0; i < 20; i++) { - k = inb(port+MCD_FLAGS); + k = MCD_READ(sc, MCD_FLAGS); if (!(k & MFL_DATA_NOT_AVAIL)) goto got_it; DELAY(100); } mbx->count = RDELAY_WAITREAD; - tohandle = timeout(mcd_timeout, - (caddr_t)MCD_S_WAITREAD,hz/100); /* XXX */ + sc->ch_state = MCD_S_WAITREAD; + sc->ch = timeout(mcd_timeout, (caddr_t)sc, hz/100); /* XXX */ return; case MCD_S_WAITREAD: - untimeout(mcd_timeout,(caddr_t)MCD_S_WAITREAD, tohandle); + sc->ch_state = MCD_S_WAITREAD; + untimeout(mcd_timeout, (caddr_t)sc, sc->ch); if (mbx->count-- > 0) { - k = inb(port+MCD_FLAGS); + k = MCD_READ(sc, MCD_FLAGS); if (!(k & MFL_DATA_NOT_AVAIL)) { /* XXX */ MCD_TRACE("got data delay=%d\n", RDELAY_WAITREAD-mbx->count); got_it: /* data is ready */ addr = bp->bio_data + mbx->skip; - outb(port+mcd_ctl2,0x04); /* XXX */ + MCD_WRITE(sc, MCD_REG_CTL2,0x04); /* XXX */ for (i=0; isz; i++) - *addr++ = inb(data_port); - outb(port+mcd_ctl2,0x0c); /* XXX */ + *addr++ = MCD_READ(sc, MCD_REG_RDATA); + MCD_WRITE(sc, MCD_REG_CTL2,0x0c); /* XXX */ - k = inb(port+MCD_FLAGS); + k = MCD_READ(sc, MCD_FLAGS); /* If we still have some junk, read it too */ if (!(k & MFL_DATA_NOT_AVAIL)) { - outb(port+mcd_ctl2,0x04); /* XXX */ - (void)inb(data_port); - (void)inb(data_port); - outb(port+mcd_ctl2,0x0c); /* XXX */ + MCD_WRITE(sc, MCD_REG_CTL2, 0x04); /* XXX */ + (void)MCD_READ(sc, MCD_REG_RDATA); + (void)MCD_READ(sc, MCD_REG_RDATA); + MCD_WRITE(sc, MCD_REG_CTL2, 0x0c); /* XXX */ } if (--mbx->nblk > 0) { mbx->skip += mbx->sz; goto nextblock; } /* return buffer */ bp->bio_resid = 0; biodone(bp); cd->flags &= ~(MCDMBXBSY|MCDREADRAW); - mcd_start(mbx->unit); + mcd_start(sc); return; } if (!(k & MFL_STATUS_NOT_AVAIL)) { - cd->status = inb(port+mcd_status) & 0xFF; + cd->status = MCD_READ(sc, MCD_REG_STATUS) & 0xFF; if (cd->status & MCD_ST_CMDCHECK) goto retry_read; - if (mcd_setflags(unit,cd) < 0) + if (mcd_setflags(sc) < 0) goto changed; } - tohandle = timeout(mcd_timeout, - (caddr_t)MCD_S_WAITREAD,hz/100); /* XXX */ + sc->ch_state = MCD_S_WAITREAD; + sc->ch = timeout(mcd_timeout, (caddr_t)sc, hz/100); /* XXX */ return; } else { - printf("mcd%d: timeout read data\n",unit); + device_printf(sc->dev, "timeout read data\n"); goto readerr; } } readerr: if (mbx->retry-- > 0) { - printf("mcd%d: retrying\n",unit); + device_printf(sc->dev, "retrying\n"); state = MCD_S_BEGIN1; goto loop; } harderr: /* invalidate the buffer */ bp->bio_flags |= BIO_ERROR; bp->bio_resid = bp->bio_bcount; biodone(bp); cd->flags &= ~(MCDMBXBSY|MCDREADRAW); - mcd_start(mbx->unit); + mcd_start(sc); return; changed: - printf("mcd%d: media changed\n", unit); + device_printf(sc->dev, "media changed\n"); goto harderr; #ifdef NOTDEF - printf("mcd%d: unit timeout, resetting\n",mbx->unit); - outb(mbx->port+mcd_reset,MCD_CMDRESET); + device_printf(sc->dev, "unit timeout, resetting\n"); + MCD_WRITE(sc, MCD_REG_RESET, MCD_CMDRESET); DELAY(300000); - (void)mcd_getstat(mbx->unit,1); - (void)mcd_getstat(mbx->unit,1); + (void)mcd_getstat(sc, 1); + (void)mcd_getstat(sc, 1); /*cd->status &= ~MCDDSKCHNG; */ cd->debug = 1; /* preventive set debug mode */ #endif } static int -mcd_lock_door(int unit, int lock) +mcd_lock_door(struct mcd_softc *sc, int lock) { - struct mcd_data *cd = mcd_data + unit; - int port = cd->iobase; - outb(port+mcd_command, MCD_CMDLOCKDRV); - outb(port+mcd_command, lock); - if (mcd_getstat(unit,0) == -1) + MCD_WRITE(sc, MCD_REG_COMMAND, MCD_CMDLOCKDRV); + MCD_WRITE(sc, MCD_REG_COMMAND, lock); + if (mcd_getstat(sc, 0) == -1) return EIO; return 0; } static int -mcd_close_tray(int unit) +mcd_close_tray(struct mcd_softc *sc) { - struct mcd_data *cd = mcd_data + unit; - int port = cd->iobase; + struct mcd_data *cd = &sc->data; int retry, r; - if (mcd_getstat(unit,1) == -1) + if (mcd_getstat(sc, 1) == -1) return EIO; if (cd->status & MCDDOOROPEN) { - outb(port+mcd_command, MCD_CMDCLOSETRAY); + MCD_WRITE(sc, MCD_REG_COMMAND, MCD_CMDCLOSETRAY); for (retry = 0; retry < CLOSE_TRAY_SECS * WAIT_FRAC; retry++) { - if (inb(port+MCD_FLAGS) & MFL_STATUS_NOT_AVAIL) + if (MCD_READ(sc, MCD_FLAGS) & MFL_STATUS_NOT_AVAIL) (void) tsleep((caddr_t)cd, PSOCK | PCATCH, "mcdcls", hz/WAIT_FRAC); else { - if ((r = mcd_getstat(unit,0)) == -1) + if ((r = mcd_getstat(sc, 0)) == -1) return EIO; return 0; } } return ENXIO; } return 0; } static int -mcd_eject(int unit) +mcd_eject(struct mcd_softc *sc) { - struct mcd_data *cd = mcd_data + unit; - int port = cd->iobase, r; + struct mcd_data *cd = &sc->data; + int r; - if (mcd_getstat(unit,1) == -1) /* detect disk change too */ + if (mcd_getstat(sc, 1) == -1) /* detect disk change too */ return EIO; if (cd->status & MCDDOOROPEN) return 0; - if ((r = mcd_stop(unit)) == EIO) + if ((r = mcd_stop(sc)) == EIO) return r; - outb(port+mcd_command, MCD_CMDEJECTDISK); - if (mcd_getstat(unit,0) == -1) + MCD_WRITE(sc, MCD_REG_COMMAND, MCD_CMDEJECTDISK); + if (mcd_getstat(sc, 0) == -1) return EIO; return 0; } static int -mcd_inject(int unit) +mcd_inject(struct mcd_softc *sc) { - struct mcd_data *cd = mcd_data + unit; + struct mcd_data *cd = &sc->data; - if (mcd_getstat(unit,1) == -1) /* detect disk change too */ + if (mcd_getstat(sc, 1) == -1) /* detect disk change too */ return EIO; if (cd->status & MCDDOOROPEN) - return mcd_close_tray(unit); + return mcd_close_tray(sc); return 0; } static int -mcd_hard_reset(int unit) +mcd_hard_reset(struct mcd_softc *sc) { - struct mcd_data *cd = mcd_data + unit; - int port = cd->iobase; + struct mcd_data *cd = &sc->data; - outb(port+mcd_reset,MCD_CMDRESET); + MCD_WRITE(sc, MCD_REG_RESET, MCD_CMDRESET); cd->curr_mode = MCD_MD_UNKNOWN; cd->audio_status = CD_AS_AUDIO_INVALID; return 0; } static void -mcd_soft_reset(int unit) +mcd_soft_reset(struct mcd_softc *sc) { - struct mcd_data *cd = mcd_data + unit; + struct mcd_data *cd = &sc->data; int i; cd->flags &= (MCDINIT|MCDPROBING|MCDNEWMODEL); cd->curr_mode = MCD_MD_UNKNOWN; for (i=0; ipartflags[i] = 0; cd->audio_status = CD_AS_AUDIO_INVALID; } static int -mcd_setmode(int unit, int mode) +mcd_setmode(struct mcd_softc *sc, int mode) { - struct mcd_data *cd = mcd_data + unit; - int port = cd->iobase; + struct mcd_data *cd = &sc->data; int retry, st; if (cd->curr_mode == mode) return 0; if (cd->debug) - printf("mcd%d: setting mode to %d\n", unit, mode); + device_printf(sc->dev, "setting mode to %d\n", mode); for(retry=0; retrycurr_mode = MCD_MD_UNKNOWN; - outb(port+mcd_command, MCD_CMDSETMODE); - outb(port+mcd_command, mode); - if ((st = mcd_getstat(unit, 0)) >= 0) { + MCD_WRITE(sc, MCD_REG_COMMAND, MCD_CMDSETMODE); + MCD_WRITE(sc, MCD_REG_COMMAND, mode); + if ((st = mcd_getstat(sc, 0)) >= 0) { cd->curr_mode = mode; return 0; } if (st == -2) { - printf("mcd%d: media changed\n", unit); + device_printf(sc->dev, "media changed\n"); break; } } return -1; } static int -mcd_toc_header(int unit, struct ioc_toc_header *th) +mcd_toc_header(struct mcd_softc *sc, struct ioc_toc_header *th) { - struct mcd_data *cd = mcd_data + unit; + struct mcd_data *cd = &sc->data; int r; - if ((r = mcd_volinfo(unit)) != 0) + if ((r = mcd_volinfo(sc)) != 0) return r; th->starting_track = bcd2bin(cd->volinfo.trk_low); th->ending_track = bcd2bin(cd->volinfo.trk_high); th->len = 2 * sizeof(u_char) /* start & end tracks */ + (th->ending_track + 1 - th->starting_track + 1) * sizeof(struct cd_toc_entry); return 0; } static int -mcd_read_toc(int unit) +mcd_read_toc(struct mcd_softc *sc) { - struct mcd_data *cd = mcd_data + unit; + struct mcd_data *cd = &sc->data; struct ioc_toc_header th; struct mcd_qchninfo q; int rc, trk, idx, retry; /* Only read TOC if needed */ if (cd->flags & MCDTOC) return 0; if (cd->debug) - printf("mcd%d: reading toc header\n", unit); + device_printf(sc->dev, "reading toc header\n"); - if ((rc = mcd_toc_header(unit, &th)) != 0) + if ((rc = mcd_toc_header(sc, &th)) != 0) return rc; - if (mcd_send(unit, MCD_CMDSTOPAUDIO, MCD_RETRYS) < 0) + if (mcd_send(sc, MCD_CMDSTOPAUDIO, MCD_RETRYS) < 0) return EIO; - if (mcd_setmode(unit, MCD_MD_TOC) != 0) + if (mcd_setmode(sc, MCD_MD_TOC) != 0) return EIO; if (cd->debug) - printf("mcd%d: get_toc reading qchannel info\n",unit); + device_printf(sc->dev, "get_toc reading qchannel info\n"); for(trk=th.starting_track; trk<=th.ending_track; trk++) cd->toc[trk].idx_no = 0; trk = th.ending_track - th.starting_track + 1; for(retry=0; retry<600 && trk>0; retry++) { - if (mcd_getqchan(unit, &q) < 0) break; + if (mcd_getqchan(sc, &q) < 0) break; idx = bcd2bin(q.idx_no); if (idx>=th.starting_track && idx<=th.ending_track && q.trk_no==0) { if (cd->toc[idx].idx_no == 0) { cd->toc[idx] = q; trk--; } } } - if (mcd_setmode(unit, MCD_MD_COOKED) != 0) + if (mcd_setmode(sc, MCD_MD_COOKED) != 0) return EIO; if (trk != 0) return ENXIO; /* add a fake last+1 */ idx = th.ending_track + 1; cd->toc[idx].control = cd->toc[idx-1].control; cd->toc[idx].addr_type = cd->toc[idx-1].addr_type; cd->toc[idx].trk_no = 0; cd->toc[idx].idx_no = MCD_LASTPLUS1; cd->toc[idx].hd_pos_msf[0] = cd->volinfo.vol_msf[0]; cd->toc[idx].hd_pos_msf[1] = cd->volinfo.vol_msf[1]; cd->toc[idx].hd_pos_msf[2] = cd->volinfo.vol_msf[2]; if (cd->debug) { int i; for (i = th.starting_track; i <= idx; i++) - printf("mcd%d: trk %d idx %d pos %d %d %d\n", - unit, i, + device_printf(sc->dev, "trk %d idx %d pos %d %d %d\n", + i, cd->toc[i].idx_no > 0x99 ? cd->toc[i].idx_no : bcd2bin(cd->toc[i].idx_no), bcd2bin(cd->toc[i].hd_pos_msf[0]), bcd2bin(cd->toc[i].hd_pos_msf[1]), bcd2bin(cd->toc[i].hd_pos_msf[2])); } cd->flags |= MCDTOC; return 0; } #if 0 static int -mcd_toc_entry(int unit, struct ioc_read_toc_single_entry *te) +mcd_toc_entry(struct mcd_softc *sc, struct ioc_read_toc_single_entry *te) { - struct mcd_data *cd = mcd_data + unit; + struct mcd_data *cd = &sc->data; struct ioc_toc_header th; int rc, trk; if (te->address_format != CD_MSF_FORMAT && te->address_format != CD_LBA_FORMAT) return EINVAL; /* Copy the toc header */ - if ((rc = mcd_toc_header(unit, &th)) != 0) + if ((rc = mcd_toc_header(sc, &th)) != 0) return rc; /* verify starting track */ trk = te->track; if (trk == 0) trk = th.starting_track; else if (trk == MCD_LASTPLUS1) trk = th.ending_track + 1; else if (trk < th.starting_track || trk > th.ending_track + 1) return EINVAL; /* Make sure we have a valid toc */ - if ((rc=mcd_read_toc(unit)) != 0) + if ((rc=mcd_read_toc(sc)) != 0) return rc; /* Copy the TOC data. */ if (cd->toc[trk].idx_no == 0) return EIO; te->entry.control = cd->toc[trk].control; te->entry.addr_type = cd->toc[trk].addr_type; te->entry.track = cd->toc[trk].idx_no > 0x99 ? cd->toc[trk].idx_no : bcd2bin(cd->toc[trk].idx_no); switch (te->address_format) { case CD_MSF_FORMAT: te->entry.addr.msf.unused = 0; te->entry.addr.msf.minute = bcd2bin(cd->toc[trk].hd_pos_msf[0]); te->entry.addr.msf.second = bcd2bin(cd->toc[trk].hd_pos_msf[1]); te->entry.addr.msf.frame = bcd2bin(cd->toc[trk].hd_pos_msf[2]); break; case CD_LBA_FORMAT: te->entry.addr.lba = htonl(msf2hsg(cd->toc[trk].hd_pos_msf, 0)); break; } return 0; } #endif static int -mcd_toc_entrys(int unit, struct ioc_read_toc_entry *te) +mcd_toc_entrys(struct mcd_softc *sc, struct ioc_read_toc_entry *te) { - struct mcd_data *cd = mcd_data + unit; + struct mcd_data *cd = &sc->data; struct cd_toc_entry entries[MCD_MAXTOCS]; struct ioc_toc_header th; int rc, n, trk, len; if ( te->data_len < sizeof(entries[0]) || (te->data_len % sizeof(entries[0])) != 0 || (te->address_format != CD_MSF_FORMAT && te->address_format != CD_LBA_FORMAT) ) return EINVAL; /* Copy the toc header */ - if ((rc = mcd_toc_header(unit, &th)) != 0) + if ((rc = mcd_toc_header(sc, &th)) != 0) return rc; /* verify starting track */ trk = te->starting_track; if (trk == 0) trk = th.starting_track; else if (trk == MCD_LASTPLUS1) trk = th.ending_track + 1; else if (trk < th.starting_track || trk > th.ending_track + 1) return EINVAL; len = ((th.ending_track + 1 - trk) + 1) * sizeof(entries[0]); if (te->data_len < len) len = te->data_len; if (len > sizeof(entries)) return EINVAL; /* Make sure we have a valid toc */ - if ((rc=mcd_read_toc(unit)) != 0) + if ((rc=mcd_read_toc(sc)) != 0) return rc; /* Copy the TOC data. */ for (n = 0; len > 0 && trk <= th.ending_track + 1; trk++) { if (cd->toc[trk].idx_no == 0) continue; entries[n].control = cd->toc[trk].control; entries[n].addr_type = cd->toc[trk].addr_type; entries[n].track = cd->toc[trk].idx_no > 0x99 ? cd->toc[trk].idx_no : bcd2bin(cd->toc[trk].idx_no); switch (te->address_format) { case CD_MSF_FORMAT: entries[n].addr.msf.unused = 0; entries[n].addr.msf.minute = bcd2bin(cd->toc[trk].hd_pos_msf[0]); entries[n].addr.msf.second = bcd2bin(cd->toc[trk].hd_pos_msf[1]); entries[n].addr.msf.frame = bcd2bin(cd->toc[trk].hd_pos_msf[2]); break; case CD_LBA_FORMAT: entries[n].addr.lba = htonl(msf2hsg(cd->toc[trk].hd_pos_msf, 0)); break; } len -= sizeof(struct cd_toc_entry); n++; } /* copy the data back */ return copyout(entries, te->data, n * sizeof(struct cd_toc_entry)); } static int -mcd_stop(int unit) +mcd_stop(struct mcd_softc *sc) { - struct mcd_data *cd = mcd_data + unit; + struct mcd_data *cd = &sc->data; /* Verify current status */ if (cd->audio_status != CD_AS_PLAY_IN_PROGRESS && cd->audio_status != CD_AS_PLAY_PAUSED && cd->audio_status != CD_AS_PLAY_COMPLETED) { if (cd->debug) - printf("mcd%d: stop attempted when not playing, audio status %d\n", - unit, cd->audio_status); + device_printf(sc->dev, + "stop attempted when not playing, audio status %d\n", + cd->audio_status); return EINVAL; } if (cd->audio_status == CD_AS_PLAY_IN_PROGRESS) - if (mcd_send(unit, MCD_CMDSTOPAUDIO, MCD_RETRYS) < 0) + if (mcd_send(sc, MCD_CMDSTOPAUDIO, MCD_RETRYS) < 0) return EIO; cd->audio_status = CD_AS_PLAY_COMPLETED; return 0; } static int -mcd_getqchan(int unit, struct mcd_qchninfo *q) +mcd_getqchan(struct mcd_softc *sc, struct mcd_qchninfo *q) { - struct mcd_data *cd = mcd_data + unit; + struct mcd_data *cd = &sc->data; - if (mcd_send(unit, MCD_CMDGETQCHN, MCD_RETRYS) < 0) + if (mcd_send(sc, MCD_CMDGETQCHN, MCD_RETRYS) < 0) return -1; - if (mcd_get(unit, (char *) q, sizeof(struct mcd_qchninfo)) < 0) + if (mcd_get(sc, (char *) q, sizeof(struct mcd_qchninfo)) < 0) return -1; if (cd->debug) { - printf("mcd%d: getqchan control=0x%x addr_type=0x%x trk=%d ind=%d ttm=%d:%d.%d dtm=%d:%d.%d\n", - unit, - q->control, q->addr_type, bcd2bin(q->trk_no), - bcd2bin(q->idx_no), - bcd2bin(q->trk_size_msf[0]), bcd2bin(q->trk_size_msf[1]), - bcd2bin(q->trk_size_msf[2]), - bcd2bin(q->hd_pos_msf[0]), bcd2bin(q->hd_pos_msf[1]), - bcd2bin(q->hd_pos_msf[2])); + device_printf(sc->dev, + "getqchan control=0x%x addr_type=0x%x trk=%d ind=%d ttm=%d:%d.%d dtm=%d:%d.%d\n", + q->control, q->addr_type, + bcd2bin(q->trk_no), + bcd2bin(q->idx_no), + bcd2bin(q->trk_size_msf[0]), + bcd2bin(q->trk_size_msf[1]), + bcd2bin(q->trk_size_msf[2]), + bcd2bin(q->hd_pos_msf[0]), + bcd2bin(q->hd_pos_msf[1]), + bcd2bin(q->hd_pos_msf[2])); } return 0; } static int -mcd_subchan(int unit, struct ioc_read_subchannel *sc) +mcd_subchan(struct mcd_softc *sc, struct ioc_read_subchannel *sch) { - struct mcd_data *cd = mcd_data + unit; + struct mcd_data *cd = &sc->data; struct mcd_qchninfo q; struct cd_sub_channel_info data; int lba; if (cd->debug) - printf("mcd%d: subchan af=%d, df=%d\n", unit, - sc->address_format, - sc->data_format); + device_printf(sc->dev, "subchan af=%d, df=%d\n", + sch->address_format, + sch->data_format); - if (sc->address_format != CD_MSF_FORMAT && - sc->address_format != CD_LBA_FORMAT) + if (sch->address_format != CD_MSF_FORMAT && + sch->address_format != CD_LBA_FORMAT) return EINVAL; - if (sc->data_format != CD_CURRENT_POSITION && - sc->data_format != CD_MEDIA_CATALOG) + if (sch->data_format != CD_CURRENT_POSITION && + sch->data_format != CD_MEDIA_CATALOG) return EINVAL; - if (mcd_setmode(unit, MCD_MD_COOKED) != 0) + if (mcd_setmode(sc, MCD_MD_COOKED) != 0) return EIO; - if (mcd_getqchan(unit, &q) < 0) + if (mcd_getqchan(sc, &q) < 0) return EIO; data.header.audio_status = cd->audio_status; - data.what.position.data_format = sc->data_format; + data.what.position.data_format = sch->data_format; - switch (sc->data_format) { + switch (sch->data_format) { case CD_MEDIA_CATALOG: data.what.media_catalog.mc_valid = 1; data.what.media_catalog.mc_number[0] = '\0'; break; case CD_CURRENT_POSITION: data.what.position.control = q.control; data.what.position.addr_type = q.addr_type; data.what.position.track_number = bcd2bin(q.trk_no); data.what.position.index_number = bcd2bin(q.idx_no); - switch (sc->address_format) { + switch (sch->address_format) { case CD_MSF_FORMAT: data.what.position.reladdr.msf.unused = 0; data.what.position.reladdr.msf.minute = bcd2bin(q.trk_size_msf[0]); data.what.position.reladdr.msf.second = bcd2bin(q.trk_size_msf[1]); data.what.position.reladdr.msf.frame = bcd2bin(q.trk_size_msf[2]); data.what.position.absaddr.msf.unused = 0; data.what.position.absaddr.msf.minute = bcd2bin(q.hd_pos_msf[0]); data.what.position.absaddr.msf.second = bcd2bin(q.hd_pos_msf[1]); data.what.position.absaddr.msf.frame = bcd2bin(q.hd_pos_msf[2]); break; case CD_LBA_FORMAT: lba = msf2hsg(q.trk_size_msf, 1); /* * Pre-gap has index number of 0, and decreasing MSF * address. Must be converted to negative LBA, per * SCSI spec. */ if (data.what.position.index_number == 0) lba = -lba; data.what.position.reladdr.lba = htonl(lba); data.what.position.absaddr.lba = htonl(msf2hsg(q.hd_pos_msf, 0)); break; } break; } - return copyout(&data, sc->data, min(sizeof(struct cd_sub_channel_info), sc->data_len)); + return copyout(&data, sch->data, min(sizeof(struct cd_sub_channel_info), sch->data_len)); } static int -mcd_playmsf(int unit, struct ioc_play_msf *p) +mcd_playmsf(struct mcd_softc *sc, struct ioc_play_msf *p) { - struct mcd_data *cd = mcd_data + unit; + struct mcd_data *cd = &sc->data; struct mcd_read2 pb; if (cd->debug) - printf("mcd%d: playmsf: from %d:%d.%d to %d:%d.%d\n", - unit, + device_printf(sc->dev, "playmsf: from %d:%d.%d to %d:%d.%d\n", p->start_m, p->start_s, p->start_f, p->end_m, p->end_s, p->end_f); if ((p->start_m * 60 * 75 + p->start_s * 75 + p->start_f) >= (p->end_m * 60 * 75 + p->end_s * 75 + p->end_f) || (p->end_m * 60 * 75 + p->end_s * 75 + p->end_f) > M_msf(cd->volinfo.vol_msf) * 60 * 75 + S_msf(cd->volinfo.vol_msf) * 75 + F_msf(cd->volinfo.vol_msf)) return EINVAL; pb.start_msf[0] = bin2bcd(p->start_m); pb.start_msf[1] = bin2bcd(p->start_s); pb.start_msf[2] = bin2bcd(p->start_f); pb.end_msf[0] = bin2bcd(p->end_m); pb.end_msf[1] = bin2bcd(p->end_s); pb.end_msf[2] = bin2bcd(p->end_f); - if (mcd_setmode(unit, MCD_MD_COOKED) != 0) + if (mcd_setmode(sc, MCD_MD_COOKED) != 0) return EIO; - return mcd_play(unit, &pb); + return mcd_play(sc, &pb); } static int -mcd_playtracks(int unit, struct ioc_play_track *pt) +mcd_playtracks(struct mcd_softc *sc, struct ioc_play_track *pt) { - struct mcd_data *cd = mcd_data + unit; + struct mcd_data *cd = &sc->data; struct mcd_read2 pb; int a = pt->start_track; int z = pt->end_track; int rc, i; - if ((rc = mcd_read_toc(unit)) != 0) + if ((rc = mcd_read_toc(sc)) != 0) return rc; if (cd->debug) - printf("mcd%d: playtracks from %d:%d to %d:%d\n", unit, + device_printf(sc->dev, "playtracks from %d:%d to %d:%d\n", a, pt->start_index, z, pt->end_index); if ( a < bcd2bin(cd->volinfo.trk_low) || a > bcd2bin(cd->volinfo.trk_high) || a > z || z < bcd2bin(cd->volinfo.trk_low) || z > bcd2bin(cd->volinfo.trk_high)) return EINVAL; for (i = 0; i < 3; i++) { pb.start_msf[i] = cd->toc[a].hd_pos_msf[i]; pb.end_msf[i] = cd->toc[z+1].hd_pos_msf[i]; } - if (mcd_setmode(unit, MCD_MD_COOKED) != 0) + if (mcd_setmode(sc, MCD_MD_COOKED) != 0) return EIO; - return mcd_play(unit, &pb); + return mcd_play(sc, &pb); } static int -mcd_playblocks(int unit, struct ioc_play_blocks *p) +mcd_playblocks(struct mcd_softc *sc, struct ioc_play_blocks *p) { - struct mcd_data *cd = mcd_data + unit; + struct mcd_data *cd = &sc->data; struct mcd_read2 pb; if (cd->debug) - printf("mcd%d: playblocks: blkno %d length %d\n", - unit, p->blk, p->len); + device_printf(sc->dev, "playblocks: blkno %d length %d\n", + p->blk, p->len); if (p->blk > cd->disksize || p->len > cd->disksize || p->blk < 0 || p->len < 0 || (p->blk + p->len) > cd->disksize) return EINVAL; hsg2msf(p->blk, pb.start_msf); hsg2msf(p->blk + p->len, pb.end_msf); - if (mcd_setmode(unit, MCD_MD_COOKED) != 0) + if (mcd_setmode(sc, MCD_MD_COOKED) != 0) return EIO; - return mcd_play(unit, &pb); + return mcd_play(sc, &pb); } static int -mcd_play(int unit, struct mcd_read2 *pb) +mcd_play(struct mcd_softc *sc, struct mcd_read2 *pb) { - struct mcd_data *cd = mcd_data + unit; - int com_port = cd->iobase + mcd_command; + struct mcd_data *cd = &sc->data; int retry, st = -1, status; cd->lastpb = *pb; for(retry=0; retrystart_msf[0]); - outb(com_port, pb->start_msf[1]); - outb(com_port, pb->start_msf[2]); - outb(com_port, pb->end_msf[0]); - outb(com_port, pb->end_msf[1]); - outb(com_port, pb->end_msf[2]); + MCD_WRITE(sc, MCD_REG_COMMAND, MCD_CMDSINGLESPEEDREAD); + MCD_WRITE(sc, MCD_REG_COMMAND, pb->start_msf[0]); + MCD_WRITE(sc, MCD_REG_COMMAND, pb->start_msf[1]); + MCD_WRITE(sc, MCD_REG_COMMAND, pb->start_msf[2]); + MCD_WRITE(sc, MCD_REG_COMMAND, pb->end_msf[0]); + MCD_WRITE(sc, MCD_REG_COMMAND, pb->end_msf[1]); + MCD_WRITE(sc, MCD_REG_COMMAND, pb->end_msf[2]); enable_intr(); - status=mcd_getstat(unit, 0); + status=mcd_getstat(sc, 0); if (status == -1) continue; else if (status != -2) st = 0; break; } if (status == -2) { - printf("mcd%d: media changed\n", unit); + device_printf(sc->dev, "media changed\n"); return ENXIO; } if (cd->debug) - printf("mcd%d: mcd_play retry=%d, status=0x%02x\n", unit, retry, status); + device_printf(sc->dev, + "mcd_play retry=%d, status=0x%02x\n", retry, status); if (st < 0) return ENXIO; cd->audio_status = CD_AS_PLAY_IN_PROGRESS; return 0; } static int -mcd_pause(int unit) +mcd_pause(struct mcd_softc *sc) { - struct mcd_data *cd = mcd_data + unit; + struct mcd_data *cd = &sc->data; struct mcd_qchninfo q; int rc; /* Verify current status */ if (cd->audio_status != CD_AS_PLAY_IN_PROGRESS && cd->audio_status != CD_AS_PLAY_PAUSED) { if (cd->debug) - printf("mcd%d: pause attempted when not playing, audio status %d\n", - unit, cd->audio_status); + device_printf(sc->dev, + "pause attempted when not playing, audio status %d\n", + cd->audio_status); return EINVAL; } /* Get the current position */ - if (mcd_getqchan(unit, &q) < 0) + if (mcd_getqchan(sc, &q) < 0) return EIO; /* Copy it into lastpb */ cd->lastpb.start_msf[0] = q.hd_pos_msf[0]; cd->lastpb.start_msf[1] = q.hd_pos_msf[1]; cd->lastpb.start_msf[2] = q.hd_pos_msf[2]; /* Stop playing */ - if ((rc=mcd_stop(unit)) != 0) + if ((rc=mcd_stop(sc)) != 0) return rc; /* Set the proper status and exit */ cd->audio_status = CD_AS_PLAY_PAUSED; return 0; } static int -mcd_resume(int unit) +mcd_resume(struct mcd_softc *sc) { - struct mcd_data *cd = mcd_data + unit; + struct mcd_data *cd = &sc->data; if (cd->audio_status != CD_AS_PLAY_PAUSED) return EINVAL; - return mcd_play(unit, &cd->lastpb); + return mcd_play(sc, &cd->lastpb); } #endif /* GEOM */ Index: head/sys/dev/mcd/mcd_isa.c =================================================================== --- head/sys/dev/mcd/mcd_isa.c (nonexistent) +++ head/sys/dev/mcd/mcd_isa.c (revision 104445) @@ -0,0 +1,211 @@ +/* + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include + +#include +#include + +static int mcd_isa_probe (device_t); +static int mcd_isa_attach (device_t); +static int mcd_isa_detach (device_t); + +static int mcd_alloc_resources (device_t); +static void mcd_release_resources (device_t); + +static int +mcd_isa_probe (device_t dev) +{ + struct mcd_softc * sc; + int error; + + /* No pnp support */ + if (isa_get_vendorid(dev)) + return (ENXIO); + + /* IO port must be configured. */ + if (bus_get_resource_start(dev, SYS_RES_IOPORT, 0) == 0) + return (ENXIO); + + sc = device_get_softc(dev); + sc->dev = dev; + sc->port_rid = 0; + sc->port_type = SYS_RES_IOPORT; + error = mcd_alloc_resources(dev); + if (error) + goto fail; + + error = mcd_probe(sc); + if (error) { + device_printf(dev, "Probe failed.\n"); + goto fail; + } + + device_set_desc(dev, sc->data.name); + +fail: + mcd_release_resources(dev); + return (error); +} + +static int +mcd_isa_attach (device_t dev) +{ + struct mcd_softc * sc; + int error; + + sc = device_get_softc(dev); + error = 0; + + sc->dev = dev; + sc->port_rid = 0; + sc->port_type = SYS_RES_IOPORT; + error = mcd_alloc_resources(dev); + if (error) + goto fail; + + error = mcd_probe(sc); + if (error) { + device_printf(dev, "Re-Probe failed.\n"); + goto fail; + } + + error = mcd_attach(sc); + if (error) { + device_printf(dev, "Attach failed.\n"); + goto fail; + } + + return (0); +fail: + mcd_release_resources(dev); + return (error); +} + +static int +mcd_isa_detach (device_t dev) +{ + struct mcd_softc * sc; + int error; + + sc = device_get_softc(dev); + error = 0; + + destroy_dev(sc->mcd_dev_t[2]); + destroy_dev(sc->mcd_dev_t[1]); + destroy_dev(sc->mcd_dev_t[0]); + + mcd_release_resources(dev); + + return (error); +} + +static int +mcd_alloc_resources (device_t dev) +{ + struct mcd_softc * sc; + int error; + + sc = device_get_softc(dev); + error = 0; + + if (sc->port_type) { + sc->port = bus_alloc_resource(dev, sc->port_type, &sc->port_rid, + 0, ~0, 1, RF_ACTIVE); + if (sc->port == NULL) { + device_printf(dev, "Unable to allocate PORT resource.\n"); + error = ENOMEM; + goto bad; + } + sc->port_bst = rman_get_bustag(sc->port); + sc->port_bsh = rman_get_bushandle(sc->port); + } + + if (sc->irq_type) { + sc->irq = bus_alloc_resource(dev, sc->irq_type, &sc->irq_rid, + 0, ~0, 1, RF_ACTIVE); + if (sc->irq == NULL) { + device_printf(dev, "Unable to allocate IRQ resource.\n"); + error = ENOMEM; + goto bad; + } + } + + if (sc->drq_type) { + sc->drq = bus_alloc_resource(dev, sc->drq_type, &sc->drq_rid, + 0, ~0, 1, RF_ACTIVE); + if (sc->drq == NULL) { + device_printf(dev, "Unable to allocate DRQ resource.\n"); + error = ENOMEM; + goto bad; + } + } + + mtx_init(&sc->mtx, device_get_nameunit(dev), + "Interrupt lock", MTX_DEF | MTX_RECURSE); + +bad: + return (error); +} + +void +mcd_release_resources (device_t dev) +{ + struct mcd_softc * sc; + + sc = device_get_softc(dev); + + if (sc->irq_ih) + bus_teardown_intr(dev, sc->irq, sc->irq_ih); + if (sc->port) { + bus_release_resource(dev, sc->port_type, sc->port_rid, sc->port); + sc->port_bst = 0; + sc->port_bsh = 0; + } + if (sc->irq) + bus_release_resource(dev, sc->irq_type, sc->irq_rid, sc->irq); + if (sc->drq) + bus_release_resource(dev, sc->drq_type, sc->drq_rid, sc->drq); + + if (mtx_initialized(&sc->mtx) != 0) + mtx_destroy(&sc->mtx); + + return; +} + +static device_method_t mcd_isa_methods[] = { + DEVMETHOD(device_probe, mcd_isa_probe), + DEVMETHOD(device_attach, mcd_isa_attach), + DEVMETHOD(device_detach, mcd_isa_detach), + + { 0, 0 } +}; + +static driver_t mcd_isa_driver = { + "mcd", + mcd_isa_methods, + sizeof(struct mcd_softc) +}; + +static devclass_t mcd_devclass; + +DRIVER_MODULE(mcd, isa, mcd_isa_driver, mcd_devclass, NULL, 0); Property changes on: head/sys/dev/mcd/mcd_isa.c ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/sys/dev/mcd/mcdreg.h =================================================================== --- head/sys/dev/mcd/mcdreg.h (revision 104444) +++ head/sys/dev/mcd/mcdreg.h (revision 104445) @@ -1,226 +1,230 @@ /* * Copyright 1993 by Holger Veit (data part) * Copyright 1993 by Brian Moore (audio part) * Changes Copyright 1993 by Gary Clark II * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This software was developed by Holger Veit and Brian Moore * for use with "386BSD" and similar operating systems. * "Similar operating systems" includes mainly non-profit oriented * systems for research and education, including but not restricted to * "NetBSD", "FreeBSD", "Mach" (by CMU). * 4. Neither the name of the developer(s) nor the name "386BSD" * may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE DEVELOPER(S) ``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 DEVELOPER(S) 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. * * This file contains definitions for some cdrom control commands * and status codes. This info was "inherited" from the DOS MTMCDE.SYS * driver, and is thus not complete (and may even be wrong). Some day * the manufacturer or anyone else might provide better documentation, * so this file (and the driver) will then have a better quality. * * $FreeBSD$ */ #ifndef MCD_H #define MCD_H #ifdef __GNUC__ #if __GNUC__ >= 2 #pragma pack(1) #endif #endif +/* toc */ +#define MCD_MAXTOCS 104 /* from the Linux driver */ +#define MCD_LASTPLUS1 170 /* special toc entry */ + typedef unsigned char bcd_t; #define M_msf(msf) msf[0] #define S_msf(msf) msf[1] #define F_msf(msf) msf[2] /* io lines used */ #define MCD_IO_BASE 0x300 -#define mcd_command 0 -#define mcd_status 0 -#define mcd_rdata 0 +#define MCD_REG_COMMAND 0 +#define MCD_REG_STATUS 0 +#define MCD_REG_RDATA 0 -#define mcd_reset 1 -#define mcd_ctl2 2 /* XXX Is this right? */ -#define mcd_config 3 +#define MCD_REG_RESET 1 +#define MCD_REG_CTL2 2 /* XXX Is this right? */ +#define MCD_REG_CONFIG 3 #define MCD_MASK_DMA 0x07 /* bits 2-0 = DMA channel */ #define MCD_MASK_IRQ 0x70 /* bits 6-4 = INT number */ /* 001 = int 2,9 */ /* 010 = int 3 */ /* 011 = int 5 */ /* 100 = int 10 */ /* 101 = int 11 */ /* flags */ #define MFL_DATA_NOT_AVAIL 0x02 #define MFL_STATUS_NOT_AVAIL 0x04 /* New Commands */ #define M_RESET 0x00 #define M_PICKLE 0x04 /* ports */ #define MCD_DATA 0 #define MCD_FLAGS 1 #define MCD_CTRL 2 #define CHANNEL 3 /* XXX ??? */ /* Status bits */ #define MCD_ST_DOOROPEN 0x80 #define MCD_ST_DSKIN 0x40 #define MCD_ST_DSKCHNG 0x20 #define MCD_ST_SPINNING 0x10 #define MCD_ST_AUDIODISK 0x08 /* Audio Disk is in */ #define MCD_ST_BUSY 0x04 #define MCD_ST_AUDIOBSY 0x02 /* Audio Disk is Playing */ #define MCD_ST_CMDCHECK 0x01 /* Command error */ /* commands known by the controller */ #define MCD_CMDRESET 0x00 #define MCD_CMDGETVOLINFO 0x10 /* gets mcd_volinfo */ #define MCD_CMDGETDISKINFO 0x11 /* gets mcd_disk information */ #define MCD_CMDGETQCHN 0x20 /* gets mcd_qchninfo */ #define MCD_CMDGETSENSE 0x30 /* gets sense info */ #define MCD_CMDGETSTAT 0x40 /* gets a byte of status */ #define MCD_CMDSETMODE 0x50 /* set transmission mode, needs byte */ #define MCD_MDBIT_TESTMODE 0x80 /* 0 = DATALENGTH setting is valid */ #define MCD_MDBIT_DATALENGTH 0x40 /* 0 = Read User Data Only */ /* 1 = Read Raw sectors (2352 bytes) */ #define MCDBLK 2048 /* for cooked mode */ #define MCDRBLK sizeof(struct mcd_rawsector) /* for raw mode */ #define MCD_MDBIT_ECCMODE 0x20 /* 0 = Use secondary correction */ /* 1 = Don't use secondary ECC */ #define MCD_MDBIT_SPINDOWN 0x08 /* 0 = Spin Up, 1 = Spin Down */ #define MCD_MDBIT_GET_TOC 0x04 /* 0 = Get UPC on next GETQCHAN */ /* 1 = Get TOC on GETQCHAN */ #define MCD_MDBIT_MUTEDATA 0x01 /* 1 = Don't play back Data as audio */ #define MCD_MD_RAW (MCD_MDBIT_DATALENGTH|MCD_MDBIT_ECCMODE|MCD_MDBIT_MUTEDATA) #define MCD_MD_COOKED (MCD_MDBIT_MUTEDATA) #define MCD_MD_TOC (MCD_MDBIT_GET_TOC|MCD_MDBIT_MUTEDATA) #define MCD_CMDSTOPAUDIO 0x70 #define MCD_CMDSTOPAUDIOTIME 0x80 #define MCD_CMDGETVOLUME 0x8E /* gets mcd_volume */ #define MCD_CMDSETDRIVEMODE 0xA0 /* Set drive mode */ #define MCD_READUPC 0xA2 /* Get UPC info */ #define MCD_CMDSETVOLUME 0xAE /* sets mcd_volume */ #define MCD_CMDREAD1 0xB0 /* read n sectors */ #define MCD_CMDSINGLESPEEDREAD 0xC0 /* read from-to */ #define MCD_CMDSTARTAUDIOMSF 0xC1 /* read audio data */ #define MCD_CMDDOUBLESPEEDREAD 0xC1 /* Read lots of data from the drive */ #define MCD_CMDGETDRIVEMODE 0xC2 /* Get the drive mode */ #define MCD_CMDREAD 0xC3 /* Read data from the drive */ #define MCD_CMDSETINTERLEAVE 0xC8 /* Adjust the interleave */ #define MCD_CMDCONTINFO 0xDC /* Get controller info */ #define MCD_CMDSTOP 0xF0 /* Stop everything */ #define MCD_CMDEJECTDISK 0xF6 #define MCD_CMDCLOSETRAY 0xF8 #define MCD_CMDLOCKDRV 0xFE /* needs byte */ #define MCD_LK_UNLOCK 0x00 #define MCD_LK_LOCK 0x01 #define MCD_LK_TEST 0x02 /* DMA Enable Stuff */ #define MCD_DMA_IRQFLAGS 0x10 /* Set data0 for IRQ click */ #define MCD_DMA_PREIRQ 0x01 /* All of these are for */ #define MCD_DMA_POSTIRQ 0x02 /* MCD_DMA_IRQFLAG... */ #define MCD_DMA_ERRIRQ 0x04 /* */ #define MCD_DMA_TIMEOUT 0x08 /* Set data0 for DMA timeout */ #define MCD_DMA_UPCFLAG 0x04 /* 1 = Next command will be READUPC */ #define MCD_DMA_DMAMODE 0x02 /* 1 = Data uses DMA */ #define MCD_DMA_TRANSFERLENGTH 0x01 /* data0 = MSB, data1 = LSB of block length */ struct mcd_dma_mode { u_char dma_mode; u_char data0; /* If dma_mode & 0x10: Use IRQ settings */ u_char data1; /* Used if dma_mode & 0x01 */ }; struct mcd_volinfo { bcd_t trk_low; bcd_t trk_high; bcd_t vol_msf[3]; bcd_t trk1_msf[3]; }; struct mcd_qchninfo { u_char addr_type:4; u_char control:4; u_char trk_no; u_char idx_no; bcd_t trk_size_msf[3]; u_char :8; bcd_t hd_pos_msf[3]; }; struct mcd_volume { u_char v0l; u_char v0rs; u_char v0r; u_char v0ls; }; struct mcd_holdtime { u_char units_of_ten_seconds; /* If this is 0, the default (12) is used */ }; struct mcd_read1 { bcd_t start_msf[3]; u_char nsec[3]; }; struct mcd_read2 { bcd_t start_msf[3]; bcd_t end_msf[3]; }; struct mcd_rawsector { u_char sync1[12]; u_char header[4]; u_char subheader1[4]; u_char subheader2[4]; u_char data[MCDBLK]; u_char ecc_bits[280]; }; #ifdef __GNUC__ #if __GNUC__ >= 2 #pragma pack(4) #endif #endif #endif /* MCD_H */ Index: head/sys/dev/mcd/mcdvar.h =================================================================== --- head/sys/dev/mcd/mcdvar.h (nonexistent) +++ head/sys/dev/mcd/mcdvar.h (revision 104445) @@ -0,0 +1,79 @@ +/* + * $FreeBSD$ + */ + +struct mcd_mbx { + short unit; + short port; + short retry; + short nblk; + int sz; + u_long skip; + struct bio * bp; + int p_offset; + short count; + short mode; +}; + +struct mcd_data { + short type; + char * name; + short config; + short flags; + u_char read_command; + short status; + int blksize; + u_long disksize; + int iobase; + struct disklabel dlabel; + int partflags[MAXPARTITIONS]; + int openflags; + struct mcd_volinfo volinfo; + struct mcd_qchninfo toc[MCD_MAXTOCS]; + short audio_status; + short curr_mode; + struct mcd_read2 lastpb; + short debug; + struct bio_queue_head head; /* head of bio queue */ + struct mcd_mbx mbx; +}; + +struct mcd_softc { + device_t dev; + dev_t mcd_dev_t[3]; + int debug; + + struct resource * port; + int port_rid; + int port_type; + bus_space_tag_t port_bst; + bus_space_handle_t port_bsh; + + struct resource * irq; + int irq_rid; + int irq_type; + void * irq_ih; + + struct resource * drq; + int drq_rid; + int drq_type; + + struct mtx mtx; + + struct callout_handle ch; + int ch_state; + struct mcd_mbx * ch_mbxsave; + + struct mcd_data data; +}; + +#define MCD_LOCK(_sc) splx(&(_sc)->mtx +#define MCD_UNLOCK(_sc) splx(&(_sc)->mtx + +#define MCD_READ(_sc, _reg) \ + bus_space_read_1(_sc->port_bst, _sc->port_bsh, _reg) +#define MCD_WRITE(_sc, _reg, _val) \ + bus_space_write_1(_sc->port_bst, _sc->port_bsh, _reg, _val) + +int mcd_probe (struct mcd_softc *); +int mcd_attach (struct mcd_softc *); Property changes on: head/sys/dev/mcd/mcdvar.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/sys/i386/conf/NOTES =================================================================== --- head/sys/i386/conf/NOTES (revision 104444) +++ head/sys/i386/conf/NOTES (revision 104445) @@ -1,1021 +1,1016 @@ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. # # $FreeBSD$ # # # This directive is mandatory; it defines the architecture to be # configured for; in this case, the 386 family based IBM-PC and # compatibles. # machine i386 # # We want LINT to cover profiling as well profile 2 ##################################################################### # SMP OPTIONS: # # APIC_IO enables the use of the IO APIC for Symmetric I/O. # # Notes: # # An SMP kernel will ONLY run on an Intel MP spec. qualified motherboard. # # Be sure to disable 'cpu I386_CPU' && 'cpu I486_CPU' for SMP kernels. # # Check the 'Rogue SMP hardware' section to see if additional options # are required by your hardware. # # Mandatory: options APIC_IO # Symmetric (APIC) I/O # # Rogue SMP hardware: # # Bridged PCI cards: # # The MP tables of most of the current generation MP motherboards # do NOT properly support bridged PCI cards. To use one of these # cards you should refer to ??? ##################################################################### # CPU OPTIONS # # You must specify at least one CPU (the one you intend to run on); # deleting the specification for CPUs you don't need to use may make # parts of the system run faster. # I386_CPU is mutually exclusive with the other CPU types. # #cpu I386_CPU cpu I486_CPU cpu I586_CPU # aka Pentium(tm) cpu I686_CPU # aka Pentium Pro(tm) # # Options for CPU features. # # CPU_ATHLON_SSE_HACK tries to enable SSE instructions when the BIOS has # forgotten to enable them. # # CPU_BLUELIGHTNING_FPU_OP_CACHE enables FPU operand cache on IBM # BlueLightning CPU. It works only with Cyrix FPU, and this option # should not be used with Intel FPU. # # CPU_BLUELIGHTNING_3X enables triple-clock mode on IBM Blue Lightning # CPU if CPU supports it. The default is double-clock mode on # BlueLightning CPU box. # # CPU_BTB_EN enables branch target buffer on Cyrix 5x86 (NOTE 1). # # CPU_DIRECT_MAPPED_CACHE sets L1 cache of Cyrix 486DLC CPU in direct # mapped mode. Default is 2-way set associative mode. # # CPU_CYRIX_NO_LOCK enables weak locking for the entire address space # of Cyrix 6x86 and 6x86MX CPUs by setting the NO_LOCK bit of CCR1. # Otherwise, the NO_LOCK bit of CCR1 is cleared. (NOTE 3) # # CPU_DISABLE_5X86_LSSER disables load store serialize (i.e. enables # reorder). This option should not be used if you use memory mapped # I/O device(s). # # CPU_ELAN enables support for AMDs ElanSC520 CPU. # # CPU_ENABLE_SSE enables SSE/MMX2 instructions support. This is default # on I686_CPU and above. # CPU_DISABLE_SSE explicitly prevent I686_CPU from turning on SSE. # # CPU_FASTER_5X86_FPU enables faster FPU exception handler. # # CPU_I486_ON_386 enables CPU cache on i486 based CPU upgrade products # for i386 machines. # # CPU_IORT defines I/O clock delay time (NOTE 1). Default values of # I/O clock delay time on Cyrix 5x86 and 6x86 are 0 and 7,respectively # (no clock delay). # # CPU_L2_LATENCY specifed the L2 cache latency value. This option is used # only when CPU_PPRO2CELERON is defined and Mendocino Celeron is detected. # The default value is 5. # # CPU_LOOP_EN prevents flushing the prefetch buffer if the destination # of a jump is already present in the prefetch buffer on Cyrix 5x86(NOTE # 1). # # CPU_PPRO2CELERON enables L2 cache of Mendocino Celeron CPUs. This option # is useful when you use Socket 8 to Socket 370 converter, because most Pentium # Pro BIOSs do not enable L2 cache of Mendocino Celeron CPUs. # # CPU_RSTK_EN enables return stack on Cyrix 5x86 (NOTE 1). # # CPU_SUSP_HLT enables suspend on HALT. If this option is set, CPU # enters suspend mode following execution of HALT instruction. # # CPU_UPGRADE_HW_CACHE eliminates unneeded cache flush instruction(s). # # CPU_WT_ALLOC enables write allocation on Cyrix 6x86/6x86MX and AMD # K5/K6/K6-2 cpus. # # CYRIX_CACHE_WORKS enables CPU cache on Cyrix 486 CPUs with cache # flush at hold state. # # CYRIX_CACHE_REALLY_WORKS enables (1) CPU cache on Cyrix 486 CPUs # without cache flush at hold state, and (2) write-back CPU cache on # Cyrix 6x86 whose revision < 2.7 (NOTE 2). # # NO_F00F_HACK disables the hack that prevents Pentiums (and ONLY # Pentiums) from locking up when a LOCK CMPXCHG8B instruction is # executed. This option is only needed if I586_CPU is also defined, # and should be included for any non-Pentium CPU that defines it. # # NO_MEMORY_HOLE is an optimisation for systems with AMD K6 processors # which indicates that the 15-16MB range is *definitely* not being # occupied by an ISA memory hole. # # NOTE 1: The options, CPU_BTB_EN, CPU_LOOP_EN, CPU_IORT, # CPU_LOOP_EN and CPU_RSTK_EN should not be used because of CPU bugs. # These options may crash your system. # # NOTE 2: If CYRIX_CACHE_REALLY_WORKS is not set, CPU cache is enabled # in write-through mode when revision < 2.7. If revision of Cyrix # 6x86 >= 2.7, CPU cache is always enabled in write-back mode. # # NOTE 3: This option may cause failures for software that requires # locked cycles in order to operate correctly. # options CPU_ATHLON_SSE_HACK options CPU_BLUELIGHTNING_FPU_OP_CACHE options CPU_BLUELIGHTNING_3X options CPU_BTB_EN options CPU_DIRECT_MAPPED_CACHE options CPU_DISABLE_5X86_LSSER options CPU_ELAN options CPU_ENABLE_SSE #options CPU_DISABLE_SSE options CPU_FASTER_5X86_FPU options CPU_I486_ON_386 options CPU_IORT options CPU_L2_LATENCY=5 options CPU_LOOP_EN options CPU_PPRO2CELERON options CPU_RSTK_EN options CPU_SUSP_HLT options CPU_UPGRADE_HW_CACHE options CPU_WT_ALLOC options CYRIX_CACHE_WORKS options CYRIX_CACHE_REALLY_WORKS #options NO_F00F_HACK # # A math emulator is mandatory if you wish to run on hardware which # does not have a floating-point processor. Pick either the original, # bogus (but freely-distributable) math emulator, or a much more # fully-featured but GPL-licensed emulator taken from Linux. # options MATH_EMULATE #Support for x87 emulation # Don't enable both of these in a real config. options GPL_MATH_EMULATE #Support for x87 emulation via #new math emulator # # PERFMON causes the driver for Pentium/Pentium Pro performance counters # to be compiled. See perfmon(4) for more information. # options PERFMON ##################################################################### # NETWORKING OPTIONS # # DEVICE_POLLING adds support for mixed interrupt-polling handling # of network device drivers, which has significant benefits in terms # of robustness to overloads and responsivity, as well as permitting # accurate scheduling of the CPU time between kernel network processing # and other activities. The drawback is a moderate (up to 1/HZ seconds) # potential increase in response times. # It is strongly recommended to use HZ=1000 or 2000 with DEVICE_POLLING # to achieve smoother behaviour. # Additionally, you can enable/disable polling at runtime with the # sysctl variable kern.polling.enable (defaults off), and select # the CPU fraction reserved to userland with the sysctl variable # kern.polling.user_frac (default 50, range 0..100). # # Only the "dc" "fxp" and "sis" devices support this mode of operation at # the time of this writing. options DEVICE_POLLING ##################################################################### # CLOCK OPTIONS # The following options are used for debugging clock behavior only, and # should not be used for production systems. # # CLK_CALIBRATION_LOOP will run the clock calibration loop at startup # until the user presses a key. options CLK_CALIBRATION_LOOP # The following two options measure the frequency of the corresponding # clock relative to the RTC (onboard mc146818a). options CLK_USE_I8254_CALIBRATION options CLK_USE_TSC_CALIBRATION ##################################################################### # MISCELLANEOUS DEVICES AND OPTIONS device speaker #Play IBM BASIC-style noises out your speaker device gzip #Exec gzipped a.out's. REQUIRES COMPAT_AOUT! device apm_saver # Requires APM ##################################################################### # HARDWARE BUS CONFIGURATION # # ISA bus # device isa # # Options for `isa': # # AUTO_EOI_1 enables the `automatic EOI' feature for the master 8259A # interrupt controller. This saves about 0.7-1.25 usec for each interrupt. # This option breaks suspend/resume on some portables. # # AUTO_EOI_2 enables the `automatic EOI' feature for the slave 8259A # interrupt controller. This saves about 0.7-1.25 usec for each interrupt. # Automatic EOI is documented not to work for for the slave with the # original i8259A, but it works for some clones and some integrated # versions. # # MAXMEM specifies the amount of RAM on the machine; if this is not # specified, FreeBSD will first read the amount of memory from the CMOS # RAM, so the amount of memory will initially be limited to 64MB or 16MB # depending on the BIOS. If the BIOS reports 64MB, a memory probe will # then attempt to detect the installed amount of RAM. If this probe # fails to detect >64MB RAM you will have to use the MAXMEM option. # The amount is in kilobytes, so for a machine with 128MB of RAM, it would # be 131072 (128 * 1024). # # BROKEN_KEYBOARD_RESET disables the use of the keyboard controller to # reset the CPU for reboot. This is needed on some systems with broken # keyboard controllers. options COMPAT_OLDISA #Use ISA shims and glue for old drivers options AUTO_EOI_1 #options AUTO_EOI_2 options MAXMEM="(128*1024)" #options BROKEN_KEYBOARD_RESET # # EISA bus # # The EISA bus device is `eisa'. It provides auto-detection and # configuration support for all devices on the EISA bus. device eisa # By default, only 10 EISA slots are probed, since the slot numbers # above clash with the configuration address space of the PCI subsystem, # and the EISA probe is not very smart about this. This is sufficient # for most machines, but in particular the HP NetServer LC series comes # with an onboard AIC7770 dual-channel SCSI controller on EISA slot #11, # thus you need to bump this figure to 12 for them. options EISA_SLOTS=12 # # MCA bus: # # The MCA bus device is `mca'. It provides auto-detection and # configuration support for all devices on the MCA bus. # No hints are required for MCA. device mca # # PCI bus & PCI options: # device pci # # AGP GART support device agp ##################################################################### # HARDWARE DEVICE CONFIGURATION # # Mandatory devices: # # To include support for VGA VESA video modes options VESA # Turn on extra debugging checks and output for VESA support. options VESA_DEBUG # The pcvt console driver (vt220 compatible). device vt hint.vt.0.at="isa" options XSERVER # support for running an X server on vt options FAT_CURSOR # start with block cursor # This PCVT option is for keyboards such as those used on really old ThinkPads options PCVT_SCANSET=2 # Other PCVT options are documented in pcvt(4). options PCVT_24LINESDEF options PCVT_CTRL_ALT_DEL options PCVT_META_ESC options PCVT_NSCREENS=9 options PCVT_PRETTYSCRNS options PCVT_SCREENSAVER options PCVT_USEKBDSEC options PCVT_VT220KEYB options PCVT_GREENSAVER # # The Numeric Processing eXtension driver. In addition to this, you # may configure a math emulator (see above). If your machine has a # hardware FPU and the kernel configuration includes the npx device # *and* a math emulator compiled into the kernel, the hardware FPU # will be used, unless it is found to be broken or unless "flags" to # npx0 includes "0x08", which requests preference for the emulator. device npx hint.npx.0.at="nexus" hint.npx.0.port="0x0F0" hint.npx.0.flags="0x0" hint.npx.0.irq="13" # # `flags' for npx0: # 0x01 don't use the npx registers to optimize bcopy. # 0x02 don't use the npx registers to optimize bzero. # 0x04 don't use the npx registers to optimize copyin or copyout. # 0x08 use emulator even if hardware FPU is available. # The npx registers are normally used to optimize copying and zeroing when # all of the following conditions are satisfied: # I586_CPU is an option # the cpu is an i586 (perhaps not a Pentium) # the probe for npx0 succeeds # INT 16 exception handling works. # Then copying and zeroing using the npx registers is normally 30-100% faster. # The flags can be used to control cases where it doesn't work or is slower. # Setting them at boot time using userconfig works right (the optimizations # are not used until later in the bootstrap when npx0 is attached). # Flag 0x08 automatically disables the i586 optimized routines. # # # Optional devices: # # # ACPI support using the Intel ACPI Component Architecture reference # implementation. # # ACPI_DEBUG enables the use of the debug.acpi.level and debug.acpi.layer # kernel environment variables to select initial debugging levels for the # Intel ACPICA code. (Note that the Intel code must also have USE_DEBUGGER # defined when it is built). # # Note that building ACPI into the kernel is deprecated; the module is # normally loaded automatically by the loader. # device acpica options ACPI_DEBUG # M-systems DiskOnchip products see src/sys/contrib/dev/fla/README device fla hint.fla.0.at="isa" # # mse: Logitech and ATI InPort bus mouse ports device mse hint.mse.0.at="isa" hint.mse.0.port="0x23c" hint.mse.0.irq="5" # # Network interfaces: # # cx: Cronyx/Sigma multiport sync/async (with Cisco or PPP framing) # el: 3Com 3C501 (slow!) # ie: AT&T StarLAN 10 and EN100; 3Com 3C507; unknown NI5210; # Intel EtherExpress # le: Digital Equipment EtherWorks 2 and EtherWorks 3 (DEPCA, DE100, # DE101, DE200, DE201, DE202, DE203, DE204, DE205, DE422) # oltr: Olicom ISA token-ring adapters OC-3115, OC-3117, OC-3118 and OC-3133 # (no hints needed). # Olicom PCI token-ring adapters OC-3136, OC-3137, OC-3139, OC-3140, # OC-3141, OC-3540, OC-3250 # rdp: RealTek RTL 8002-based pocket ethernet adapters # sbni: Granch SBNI12-xx ISA and PCI adapters # wl: Lucent Wavelan (ISA card only). # Order for ISA/EISA devices is important here device cx 1 hint.cx.0.at="isa" hint.cx.0.port="0x240" hint.cx.0.irq="15" hint.cx.0.drq="7" device el 1 hint.el.0.at="isa" hint.el.0.port="0x300" hint.el.0.irq="9" device ie 2 hint.ie.0.at="isa" hint.ie.0.port="0x300" hint.ie.0.irq="5" hint.ie.0.maddr="0xd0000" hint.ie.1.at="isa" hint.ie.1.port="0x360" hint.ie.1.irq="7" hint.ie.1.maddr="0xd0000" device le 1 hint.le.0.at="isa" hint.le.0.port="0x300" hint.le.0.irq="5" hint.le.0.maddr="0xd0000" device rdp 1 hint.rdp.0.at="isa" hint.rdp.0.port="0x378" hint.rdp.0.irq="7" hint.rdp.0.flags="2" device sbni hint.sbni.0.at="isa" hint.sbni.0.port="0x210" hint.sbni.0.irq="0xefdead" hint.sbni.0.flags="0" device oltr hint.oltr.0.at="isa" device wl hint.wl.0.at="isa" hint.wl.0.port="0x300" options WLCACHE # enables the signal-strength cache options WLDEBUG # enables verbose debugging output # # Audio drivers: `pca' # # pca: PCM audio through your PC speaker device pca hint.pca.0.at="isa" hint.pca.0.port="0x040" # # SCSI host adapters: # # ncv: NCR 53C500 based SCSI host adapters. # nsp: Workbit Ninja SCSI-3 based PC Card SCSI host adapters. # stg: TMC 18C30, 18C50 based SCSI host adapters. device ncv device nsp device stg hint.stg.0.at="isa" hint.stg.0.port="0x140" hint.stg.0.port="11" # # Adaptec FSA RAID controllers, including integrated DELL controllers, # the Dell PERC 2/QC and the HP NetRAID-4M device aac device aacp # SCSI Passthrough interface (optional, CAM required) # # Miscellaneous hardware: # -# mcd: Mitsumi CD-ROM using proprietary (non-ATAPI) interface # scd: Sony CD-ROM using proprietary (non-ATAPI) interface # wt: Wangtek and Archive QIC-02/QIC-36 tape drives # ctx: Cortex-I frame grabber # apm: Laptop Advanced Power Management (experimental) # pmtimer: Timer device driver for power management events (APM or ACPI) # spigot: The Creative Labs Video Spigot video-acquisition board # gp: National Instruments AT-GPIB and AT-GPIB/TNT board, PCMCIA-GPIB # asc: GI1904-based hand scanners, e.g. the Trust Amiscan Grey # gsc: Genius GS-4500 hand scanner. # rc: RISCom/8 multiport card # tw: TW-523 power line interface for use with X-10 home control products # spic: Sony Programmable I/O controller (VAIO notebooks) # stl: Stallion EasyIO and EasyConnection 8/32 (cd1400 based) # stli: Stallion EasyConnection 8/64, ONboard, Brumby (intelligent) # dgb: Digiboard PC/Xi and PC/Xe series driver (ALPHA QUALITY!) # Notes on APM # The flags takes the following meaning for apm0: # 0x0020 Statclock is broken. # If apm is omitted, some systems require sysctl kern.timecounter.method=1 # for correct timekeeping. # Notes on the spigot: # The video spigot is at 0xad6. This port address can not be changed. # The irq values may only be 10, 11, or 15 # I/O memory is an 8kb region. Possible values are: # 0a0000, 0a2000, ..., 0fffff, f00000, f02000, ..., ffffff # The start address must be on an even boundary. # Add the following option if you want to allow non-root users to be able # to access the spigot. This option is not secure because it allows users # direct access to the I/O page. # options SPIGOT_UNSECURE # Notes on the Specialix SI/XIO driver: # The host card is memory, not IO mapped. # The Rev 1 host cards use a 64K chunk, on a 32K boundary. # The Rev 2 host cards use a 32K chunk, on a 32K boundary. # The cards can use an IRQ of 11, 12 or 15. # Notes on the Sony Programmable I/O controller # This is a temporary driver that should someday be replaced by something # that hooks into the ACPI layer. The device is hooked to the PIIX4's # General Device 10 decoder, which means you have to fiddle with PCI # registers to map it in, even though it is otherwise treated here as # an ISA device. At the moment, the driver polls, although the device # is capable of generating interrupts. It largely undocumented. # The port location in the hint is where you WANT the device to be # mapped. 0x10a0 seems to be traditional. At the moment the jogdial # is the only thing truly supported, but aparently a fair percentage # of the Vaio extra features are controlled by this device. # Notes on the Stallion stl and stli drivers: # See src/i386/isa/README.stl for complete instructions. # This is version 0.0.5alpha, unsupported by Stallion. # The stl driver has a secondary IO port hard coded at 0x280. You need # to change src/i386/isa/stallion.c if you reconfigure this on the boards. # The "flags" and "msize" settings on the stli driver depend on the board: # EasyConnection 8/64 ISA: flags 23 msize 0x1000 # EasyConnection 8/64 EISA: flags 24 msize 0x10000 # EasyConnection 8/64 MCA: flags 25 msize 0x1000 # ONboard ISA: flags 4 msize 0x10000 # ONboard EISA: flags 7 msize 0x10000 # ONboard MCA: flags 3 msize 0x10000 # Brumby: flags 2 msize 0x4000 # Stallion: flags 1 msize 0x10000 # Notes on the Digiboard PC/Xi and PC/Xe series driver # # The NDGBPORTS option specifies the number of ports controlled by the # dgb(4) driver. The default value is 16 ports per device. -device mcd 1 -hint.mcd.0.at="isa" -hint.mcd.0.port="0x300" -hint.mcd.0.irq="10" # for the Sony CDU31/33A CDROM device scd 1 hint.scd.0.at="isa" hint.scd.0.port="0x230" device wt 1 hint.wt.0.at="isa" hint.wt.0.port="0x300" hint.wt.0.irq="5" hint.wt.0.drq="1" device ctx 1 hint.ctx.0.at="isa" hint.ctx.0.port="0x230" hint.ctx.0.maddr="0xd0000" device spigot 1 hint.spigot.0.at="isa" hint.spigot.0.port="0xad6" hint.spigot.0.irq="15" hint.spigot.0.maddr="0xee000" device apm hint.apm.0.flags="0x20" device pmtimer # Adjust system timer at wakeup time hint.pmtimer.0.at="isa" device gp hint.gp.0.at="isa" hint.gp.0.port="0x2c0" device gsc 1 hint.gsc.0.at="isa" hint.gsc.0.port="0x270" hint.gsc.0.drq="3" device rc 1 hint.rc.0.at="isa" hint.rc.0.port="0x220" hint.rc.0.irq="12" # the port and irq for tw0 are fictitious device tw 1 hint.tw.0.at="isa" hint.tw.0.port="0x380" hint.tw.0.irq="11" device asc 1 hint.asc.0.at="isa" hint.asc.0.port="0x3EB" hint.asc.0.drq="3" hint.asc.0.irq="10" device spic hint.spic.0.at="isa" hint.spic.0.port="0x10a0" device stl hint.stl.0.at="isa" hint.stl.0.port="0x2a0" hint.stl.0.irq="10" device stli hint.stli.0.at="isa" hint.stli.0.port="0x2a0" hint.stli.0.maddr="0xcc000" hint.stli.0.flags="23" hint.stli.0.msize="0x1000" device dgb 1 options NDGBPORTS=17 hint.dgb.0.at="isa" hint.dgb.0.port="0x220" hint.dgb.0.maddr="0xfc000" # You are unlikely to have the hardware for loran device loran hint.loran.0.at="isa" hint.loran.0.irq="5" # # Laptop/Notebook options: # # See also: # apm under `Miscellaneous hardware' # above. # For older notebooks that signal a powerfail condition (external # power supply dropped, or battery state low) by issuing an NMI: options POWERFAIL_NMI # make it beep instead of panicing # # I2C Bus # # Philips i2c bus support is provided by the `iicbus' device. # # Supported interfaces: # pcf Philips PCF8584 ISA-bus controller # device pcf hint.pcf.0.at="isa" hint.pcf.0.port="0x320" hint.pcf.0.irq="5" #--------------------------------------------------------------------------- # ISDN4BSD # # See /usr/share/examples/isdn/ROADMAP for an introduction to isdn4bsd. # # i4b passive ISDN cards support contains the following hardware drivers: # # isic - Siemens/Infineon ISDN ISAC/HSCX/IPAC chipset driver # iwic - Winbond W6692 PCI bus ISDN S/T interface controller # ifpi - AVM Fritz!Card PCI driver # ifpi2 - AVM Fritz!Card PCI version 2 driver # ihfc - Cologne Chip HFC ISA/ISA-PnP chipset driver # ifpnp - AVM Fritz!Card PnP driver # itjc - Siemens ISAC / TJNet Tiger300/320 chipset # # i4b active ISDN cards support contains the following hardware drivers: # # iavc - AVM B1 PCI, AVM B1 ISA, AVM T1 # # Note that the ``options'' (if given) and ``device'' lines must BOTH # be uncommented to enable support for a given card ! # # In addition to a hardware driver (and probably an option) the mandatory # ISDN protocol stack devices and the mandatory support device must be # enabled as well as one or more devices from the optional devices section. # #--------------------------------------------------------------------------- # isic driver (Siemens/Infineon chipsets) # device isic # # ISA bus non-PnP Cards: # ---------------------- # # Teles S0/8 or Niccy 1008 options TEL_S0_8 hint.isic.0.at="isa" hint.isic.0.maddr="0xd0000" hint.isic.0.irq="5" hint.isic.0.flags="1" # # Teles S0/16 or Creatix ISDN-S0 or Niccy 1016 options TEL_S0_16 hint.isic.0.at="isa" hint.isic.0.port="0xd80" hint.isic.0.maddr="0xd0000" hint.isic.0.irq="5" hint.isic.0.flags="2" # # Teles S0/16.3 options TEL_S0_16_3 hint.isic.0.at="isa" hint.isic.0.port="0xd80" hint.isic.0.irq="5" hint.isic.0.flags="3" # # AVM A1 or AVM Fritz!Card options AVM_A1 hint.isic.0.at="isa" hint.isic.0.port="0x340" hint.isic.0.irq="5" hint.isic.0.flags="4" # # USRobotics Sportster ISDN TA intern options USR_STI hint.isic.0.at="isa" hint.isic.0.port="0x268" hint.isic.0.irq="5" hint.isic.0.flags="7" # # ITK ix1 Micro ( < V.3, non-PnP version ) options ITKIX1 hint.isic.0.at="isa" hint.isic.0.port="0x398" hint.isic.0.irq="10" hint.isic.0.flags="18" # # ELSA PCC-16 options ELSA_PCC16 hint.isic.0.at="isa" hint.isic.0.port="0x360" hint.isic.0.irq="10" hint.isic.0.flags="20" # # ISA bus PnP Cards: # ------------------ # # Teles S0/16.3 PnP options TEL_S0_16_3_P # # Creatix ISDN-S0 P&P options CRTX_S0_P # # Dr. Neuhaus Niccy Go@ options DRN_NGO # # Sedlbauer Win Speed options SEDLBAUER # # Dynalink IS64PH options DYNALINK # # ELSA QuickStep 1000pro ISA options ELSA_QS1ISA # # Siemens I-Surf 2.0 options SIEMENS_ISURF2 # # Asuscom ISDNlink 128K ISA options ASUSCOM_IPAC # # Eicon Diehl DIVA 2.0 and 2.02 options EICON_DIVA # # Compaq Microcom 610 ISDN card (Compaq series PSB2222I) options COMPAQ_M610 # # PCI bus Cards: # -------------- # # Cyclades Cyclom-Y PCI serial driver device cy 1 options CY_PCI_FASTINTR # Use with cy_pci unless irq is shared hint.cy.0.at="isa" hint.cy.0.irq="10" hint.cy.0.maddr="0xd4000" hint.cy.0.msize="0x2000" # #--------------------------------------------------------------------------- # ELSA MicroLink ISDN/PCI (same as ELSA QuickStep 1000pro PCI) options ELSA_QS1PCI # # #--------------------------------------------------------------------------- # ifpnp driver for AVM Fritz!Card PnP # # AVM Fritz!Card PnP device ifpnp # #--------------------------------------------------------------------------- # ihfc driver for Cologne Chip ISA chipsets (experimental!) # # Teles 16.3c ISA PnP # AcerISDN P10 ISA PnP # TELEINT ISDN SPEED No.1 device ihfc # #--------------------------------------------------------------------------- # ifpi driver for AVM Fritz!Card PCI # # AVM Fritz!Card PCI device ifpi # #--------------------------------------------------------------------------- # ifpi2 driver for AVM Fritz!Card PCI version 2 # # AVM Fritz!Card PCI version 2 device "ifpi2" # #--------------------------------------------------------------------------- # iwic driver for Winbond W6692 chipset # # ASUSCOM P-IN100-ST-D (and other Winbond W6692 based cards) device iwic # #--------------------------------------------------------------------------- # itjc driver for Simens ISAC / TJNet Tiger300/320 chipset # # Traverse Technologies NETjet-S # Teles PCI-TJ device itjc # #--------------------------------------------------------------------------- # iavc driver (AVM active cards, needs i4bcapi driver!) # device iavc # # AVM B1 ISA bus (PnP mode not supported!) # ---------------------------------------- hint.iavc.0.at="isa" hint.iavc.0.port="0x150" hint.iavc.0.irq="5" # #--------------------------------------------------------------------------- # ISDN Protocol Stack - mandatory for all hardware drivers # # Q.921 / layer 2 - i4b passive cards D channel handling device "i4bq921" # # Q.931 / layer 3 - i4b passive cards D channel handling device "i4bq931" # # layer 4 - i4b common passive and active card handling device "i4b" # #--------------------------------------------------------------------------- # ISDN devices - mandatory for all hardware drivers # # userland driver to do ISDN tracing (for passive cards only) device "i4btrc" 4 # # userland driver to control the whole thing device "i4bctl" # #--------------------------------------------------------------------------- # ISDN devices - optional # # userland driver for access to raw B channel device "i4brbch" 4 # # userland driver for telephony device "i4btel" 2 # # network driver for IP over raw HDLC ISDN device "i4bipr" 4 # enable VJ header compression detection for ipr i/f options IPR_VJ # enable logging of the first n IP packets to isdnd (n=32 here) options IPR_LOG=32 # # network driver for sync PPP over ISDN; requires an equivalent # number of sppp device to be configured device "i4bisppp" 4 # # B-channel interface to the netgraph subsystem device "i4bing" 2 # # CAPI driver needed for active ISDN cards (see iavc driver above) device "i4bcapi" # #--------------------------------------------------------------------------- # # Set the number of PV entries per process. Increasing this can # stop panics related to heavy use of shared memory. However, that can # (combined with large amounts of physical memory) cause panics at # boot time due the kernel running out of VM space. # # If you're tweaking this, you might also want to increase the sysctls # "vm.v_free_min", "vm.v_free_reserved", and "vm.v_free_target". # # The value below is the one more than the default. # options PMAP_SHPGPERPROC=201 # # Change the size of the kernel virtual address space. Due to # constraints in loader(8) on i386, this must be a multiple of 4. # 256 = 1 GB of kernel address space. Increasing this also causes # a reduction of the address space in user processes. 512 splits # the 4GB cpu address space in half (2GB user, 2GB kernel). # options KVA_PAGES=260 ##################################################################### # ABI Emulation # Enable iBCS2 runtime support for SCO and ISC binaries options IBCS2 # Emulate spx device for client side of SVR3 local X interface options SPX_HACK # Enable Linux ABI emulation options COMPAT_LINUX # Enable i386 a.out binary support options COMPAT_AOUT # Enable the linux-like proc filesystem support (requires COMPAT_LINUX # and PSEUDOFS) options LINPROCFS # # SysVR4 ABI emulation # # The svr4 ABI emulator can be statically compiled into the kernel or loaded as # a KLD module. # The STREAMS network emulation code can also be compiled statically or as a # module. If loaded as a module, it must be loaded before the svr4 module # (the /usr/sbin/svr4 script does this for you). If compiling statically, # the `streams' device must be configured into any kernel which also # specifies COMPAT_SVR4. It is possible to have a statically-configured # STREAMS device and a dynamically loadable svr4 emulator; the /usr/sbin/svr4 # script understands that it doesn't need to load the `streams' module under # those circumstances. # Caveat: At this time, `options KTRACE' is required for the svr4 emulator # (whether static or dynamic). # options COMPAT_SVR4 # build emulator statically options DEBUG_SVR4 # enable verbose debugging device streams # STREAMS network driver (required for svr4). ##################################################################### # VM OPTIONS # Disable the 4 MByte page PSE CPU feature. The PSE feature allows the # kernel to use a 4 MByte pages to map the kernel instead of 4k pages. # This saves on the amount of memory needed for page tables needed to # map the kernel. You should only disable this feature as a temporary # workaround if you are having problems with it enabled. # #options DISABLE_PSE # Disable the global pages PGE CPU feature. The PGE feature allows pages # to be marked with the PG_G bit. TLB entries for these pages are not # flushed from the cache when %cr3 is reloaded. This can make context # switches less expensive. You should only disable this feature as a # temporary workaround if you are having problems with it enabled. # #options DISABLE_PG_G # KSTACK_PAGES is the number of memory pages to assign to the kernel # stack of each thread. options KSTACK_PAGES=3 ##################################################################### # More undocumented options for linting. # Note that documenting these are not considered an affront. # PECOFF module (Win32 Execution Format) options PECOFF_SUPPORT options PECOFF_DEBUG options ENABLE_ALART options I4B_SMP_WORKAROUND options I586_PMC_GUPROF=0x70000 options KBDIO_DEBUG=2 options KBD_MAXRETRY=4 options KBD_MAXWAIT=6 options KBD_RESETDELAY=201 options PSM_DEBUG=1 options TIMER_FREQ="((14318182+6)/12)" options VM_KMEM_SIZE options VM_KMEM_SIZE_MAX options VM_KMEM_SIZE_SCALE # Yet more undocumented options for linting. options COMPAT_SUNOS Index: head/sys/i386/isa/mcdreg.h =================================================================== --- head/sys/i386/isa/mcdreg.h (revision 104444) +++ head/sys/i386/isa/mcdreg.h (nonexistent) @@ -1,226 +0,0 @@ -/* - * Copyright 1993 by Holger Veit (data part) - * Copyright 1993 by Brian Moore (audio part) - * Changes Copyright 1993 by Gary Clark II - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This software was developed by Holger Veit and Brian Moore - * for use with "386BSD" and similar operating systems. - * "Similar operating systems" includes mainly non-profit oriented - * systems for research and education, including but not restricted to - * "NetBSD", "FreeBSD", "Mach" (by CMU). - * 4. Neither the name of the developer(s) nor the name "386BSD" - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPER(S) ``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 DEVELOPER(S) 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. - * - * This file contains definitions for some cdrom control commands - * and status codes. This info was "inherited" from the DOS MTMCDE.SYS - * driver, and is thus not complete (and may even be wrong). Some day - * the manufacturer or anyone else might provide better documentation, - * so this file (and the driver) will then have a better quality. - * - * $FreeBSD$ - */ - -#ifndef MCD_H -#define MCD_H - -#ifdef __GNUC__ -#if __GNUC__ >= 2 -#pragma pack(1) -#endif -#endif - -typedef unsigned char bcd_t; -#define M_msf(msf) msf[0] -#define S_msf(msf) msf[1] -#define F_msf(msf) msf[2] - -/* io lines used */ -#define MCD_IO_BASE 0x300 - -#define mcd_command 0 -#define mcd_status 0 -#define mcd_rdata 0 - -#define mcd_reset 1 -#define mcd_ctl2 2 /* XXX Is this right? */ -#define mcd_config 3 - -#define MCD_MASK_DMA 0x07 /* bits 2-0 = DMA channel */ -#define MCD_MASK_IRQ 0x70 /* bits 6-4 = INT number */ - /* 001 = int 2,9 */ - /* 010 = int 3 */ - /* 011 = int 5 */ - /* 100 = int 10 */ - /* 101 = int 11 */ -/* flags */ -#define MFL_DATA_NOT_AVAIL 0x02 -#define MFL_STATUS_NOT_AVAIL 0x04 - -/* New Commands */ -#define M_RESET 0x00 -#define M_PICKLE 0x04 - -/* ports */ -#define MCD_DATA 0 -#define MCD_FLAGS 1 -#define MCD_CTRL 2 -#define CHANNEL 3 /* XXX ??? */ - -/* Status bits */ -#define MCD_ST_DOOROPEN 0x80 -#define MCD_ST_DSKIN 0x40 -#define MCD_ST_DSKCHNG 0x20 -#define MCD_ST_SPINNING 0x10 -#define MCD_ST_AUDIODISK 0x08 /* Audio Disk is in */ -#define MCD_ST_BUSY 0x04 -#define MCD_ST_AUDIOBSY 0x02 /* Audio Disk is Playing */ -#define MCD_ST_CMDCHECK 0x01 /* Command error */ - -/* commands known by the controller */ -#define MCD_CMDRESET 0x00 -#define MCD_CMDGETVOLINFO 0x10 /* gets mcd_volinfo */ -#define MCD_CMDGETDISKINFO 0x11 /* gets mcd_disk information */ -#define MCD_CMDGETQCHN 0x20 /* gets mcd_qchninfo */ -#define MCD_CMDGETSENSE 0x30 /* gets sense info */ -#define MCD_CMDGETSTAT 0x40 /* gets a byte of status */ - -#define MCD_CMDSETMODE 0x50 /* set transmission mode, needs byte */ - -#define MCD_MDBIT_TESTMODE 0x80 /* 0 = DATALENGTH setting is valid */ -#define MCD_MDBIT_DATALENGTH 0x40 /* 0 = Read User Data Only */ - /* 1 = Read Raw sectors (2352 bytes) */ - -#define MCDBLK 2048 /* for cooked mode */ -#define MCDRBLK sizeof(struct mcd_rawsector) /* for raw mode */ - -#define MCD_MDBIT_ECCMODE 0x20 /* 0 = Use secondary correction */ - /* 1 = Don't use secondary ECC */ -#define MCD_MDBIT_SPINDOWN 0x08 /* 0 = Spin Up, 1 = Spin Down */ -#define MCD_MDBIT_GET_TOC 0x04 /* 0 = Get UPC on next GETQCHAN */ - /* 1 = Get TOC on GETQCHAN */ -#define MCD_MDBIT_MUTEDATA 0x01 /* 1 = Don't play back Data as audio */ - -#define MCD_MD_RAW (MCD_MDBIT_DATALENGTH|MCD_MDBIT_ECCMODE|MCD_MDBIT_MUTEDATA) -#define MCD_MD_COOKED (MCD_MDBIT_MUTEDATA) -#define MCD_MD_TOC (MCD_MDBIT_GET_TOC|MCD_MDBIT_MUTEDATA) - -#define MCD_CMDSTOPAUDIO 0x70 -#define MCD_CMDSTOPAUDIOTIME 0x80 -#define MCD_CMDGETVOLUME 0x8E /* gets mcd_volume */ -#define MCD_CMDSETDRIVEMODE 0xA0 /* Set drive mode */ -#define MCD_READUPC 0xA2 /* Get UPC info */ -#define MCD_CMDSETVOLUME 0xAE /* sets mcd_volume */ -#define MCD_CMDREAD1 0xB0 /* read n sectors */ -#define MCD_CMDSINGLESPEEDREAD 0xC0 /* read from-to */ -#define MCD_CMDSTARTAUDIOMSF 0xC1 /* read audio data */ -#define MCD_CMDDOUBLESPEEDREAD 0xC1 /* Read lots of data from the drive */ -#define MCD_CMDGETDRIVEMODE 0xC2 /* Get the drive mode */ -#define MCD_CMDREAD 0xC3 /* Read data from the drive */ -#define MCD_CMDSETINTERLEAVE 0xC8 /* Adjust the interleave */ -#define MCD_CMDCONTINFO 0xDC /* Get controller info */ -#define MCD_CMDSTOP 0xF0 /* Stop everything */ -#define MCD_CMDEJECTDISK 0xF6 -#define MCD_CMDCLOSETRAY 0xF8 - -#define MCD_CMDLOCKDRV 0xFE /* needs byte */ -#define MCD_LK_UNLOCK 0x00 -#define MCD_LK_LOCK 0x01 -#define MCD_LK_TEST 0x02 - -/* DMA Enable Stuff */ -#define MCD_DMA_IRQFLAGS 0x10 /* Set data0 for IRQ click */ - -#define MCD_DMA_PREIRQ 0x01 /* All of these are for */ -#define MCD_DMA_POSTIRQ 0x02 /* MCD_DMA_IRQFLAG... */ -#define MCD_DMA_ERRIRQ 0x04 /* */ - -#define MCD_DMA_TIMEOUT 0x08 /* Set data0 for DMA timeout */ -#define MCD_DMA_UPCFLAG 0x04 /* 1 = Next command will be READUPC */ - -#define MCD_DMA_DMAMODE 0x02 /* 1 = Data uses DMA */ -#define MCD_DMA_TRANSFERLENGTH 0x01 /* data0 = MSB, data1 = LSB of block length */ - -struct mcd_dma_mode { - u_char dma_mode; - u_char data0; /* If dma_mode & 0x10: Use IRQ settings */ - u_char data1; /* Used if dma_mode & 0x01 */ -}; - -struct mcd_volinfo { - bcd_t trk_low; - bcd_t trk_high; - bcd_t vol_msf[3]; - bcd_t trk1_msf[3]; -}; - -struct mcd_qchninfo { - u_char addr_type:4; - u_char control:4; - u_char trk_no; - u_char idx_no; - bcd_t trk_size_msf[3]; - u_char :8; - bcd_t hd_pos_msf[3]; -}; - -struct mcd_volume { - u_char v0l; - u_char v0rs; - u_char v0r; - u_char v0ls; -}; - -struct mcd_holdtime { - u_char units_of_ten_seconds; - /* If this is 0, the default (12) is used */ -}; - -struct mcd_read1 { - bcd_t start_msf[3]; - u_char nsec[3]; -}; - -struct mcd_read2 { - bcd_t start_msf[3]; - bcd_t end_msf[3]; -}; - -struct mcd_rawsector { - u_char sync1[12]; - u_char header[4]; - u_char subheader1[4]; - u_char subheader2[4]; - u_char data[MCDBLK]; - u_char ecc_bits[280]; -}; - -#ifdef __GNUC__ -#if __GNUC__ >= 2 -#pragma pack(4) -#endif -#endif -#endif /* MCD_H */ Property changes on: head/sys/i386/isa/mcdreg.h ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/sys/i386/isa/mcd.c =================================================================== --- head/sys/i386/isa/mcd.c (revision 104444) +++ head/sys/i386/isa/mcd.c (nonexistent) @@ -1,1831 +0,0 @@ -#include "opt_geom.h" -#ifndef GEOM -/* - * Copyright 1993 by Holger Veit (data part) - * Copyright 1993 by Brian Moore (audio part) - * Changes Copyright 1993 by Gary Clark II - * Changes Copyright (C) 1994-1995 by Andrey A. Chernov, Moscow, Russia - * - * Rewrote probe routine to work on newer Mitsumi drives. - * Additional changes (C) 1994 by Jordan K. Hubbard - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This software was developed by Holger Veit and Brian Moore - * for use with "386BSD" and similar operating systems. - * "Similar operating systems" includes mainly non-profit oriented - * systems for research and education, including but not restricted to - * "NetBSD", "FreeBSD", "Mach" (by CMU). - * 4. Neither the name of the developer(s) nor the name "386BSD" - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPER(S) ``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 DEVELOPER(S) 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. - * - * $FreeBSD$ - */ -static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; - -#include "mcd.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#include -#include - -#define MCD_TRACE(format, args...) \ -{ \ - if (mcd_data[unit].debug) { \ - printf("mcd%d: status=0x%02x: ", \ - unit, mcd_data[unit].status); \ - printf(format, ## args); \ - } \ -} - -#define mcd_part(dev) ((minor(dev)) & 7) -#define mcd_unit(dev) (((minor(dev)) & 0x38) >> 3) -#define mcd_phys(dev) (((minor(dev)) & 0x40) >> 6) -#define RAW_PART 2 - -/* flags */ -#define MCDVALID 0x0001 /* parameters loaded */ -#define MCDINIT 0x0002 /* device is init'd */ -#define MCDNEWMODEL 0x0004 /* device is new model */ -#define MCDLABEL 0x0008 /* label is read */ -#define MCDPROBING 0x0010 /* probing */ -#define MCDREADRAW 0x0020 /* read raw mode (2352 bytes) */ -#define MCDVOLINFO 0x0040 /* already read volinfo */ -#define MCDTOC 0x0080 /* already read toc */ -#define MCDMBXBSY 0x0100 /* local mbx is busy */ - -/* status */ -#define MCDAUDIOBSY MCD_ST_AUDIOBSY /* playing audio */ -#define MCDDSKCHNG MCD_ST_DSKCHNG /* sensed change of disk */ -#define MCDDSKIN MCD_ST_DSKIN /* sensed disk in drive */ -#define MCDDOOROPEN MCD_ST_DOOROPEN /* sensed door open */ - -/* These are apparently the different states a mitsumi can get up to */ -#define MCDCDABSENT 0x0030 -#define MCDCDPRESENT 0x0020 -#define MCDSCLOSED 0x0080 -#define MCDSOPEN 0x00a0 - -#define MCD_MD_UNKNOWN (-1) - -/* toc */ -#define MCD_MAXTOCS 104 /* from the Linux driver */ -#define MCD_LASTPLUS1 170 /* special toc entry */ - -#define MCD_TYPE_UNKNOWN 0 -#define MCD_TYPE_LU002S 1 -#define MCD_TYPE_LU005S 2 -#define MCD_TYPE_LU006S 3 -#define MCD_TYPE_FX001 4 -#define MCD_TYPE_FX001D 5 - -struct mcd_mbx { - short unit; - short port; - short retry; - short nblk; - int sz; - u_long skip; - struct bio *bp; - int p_offset; - short count; - short mode; -}; - -static struct mcd_data { - short type; - char *name; - short config; - short flags; - u_char read_command; - short status; - int blksize; - u_long disksize; - int iobase; - struct disklabel dlabel; - int partflags[MAXPARTITIONS]; - int openflags; - struct mcd_volinfo volinfo; - struct mcd_qchninfo toc[MCD_MAXTOCS]; - short audio_status; - short curr_mode; - struct mcd_read2 lastpb; - short debug; - struct bio_queue_head head; /* head of bio queue */ - struct mcd_mbx mbx; -} mcd_data[NMCD]; - -/* reader state machine */ -#define MCD_S_BEGIN 0 -#define MCD_S_BEGIN1 1 -#define MCD_S_WAITSTAT 2 -#define MCD_S_WAITMODE 3 -#define MCD_S_WAITREAD 4 - -/* prototypes */ -static void mcd_start(int unit); -static int mcd_getdisklabel(int unit); -#ifdef NOTYET -static void mcd_configure(struct mcd_data *cd); -#endif -static int mcd_get(int unit, char *buf, int nmax); -static int mcd_setflags(int unit,struct mcd_data *cd); -static int mcd_getstat(int unit,int sflg); -static int mcd_send(int unit, int cmd,int nretrys); -static void hsg2msf(int hsg, bcd_t *msf); -static int msf2hsg(bcd_t *msf, int relative); -static int mcd_volinfo(int unit); -static ointhand2_t mcdintr; -static int mcd_waitrdy(int port,int dly); -static timeout_t mcd_timeout; -static void mcd_doread(int state, struct mcd_mbx *mbxin); -static void mcd_soft_reset(int unit); -static int mcd_hard_reset(int unit); -static int mcd_setmode(int unit, int mode); -static int mcd_getqchan(int unit, struct mcd_qchninfo *q); -static int mcd_subchan(int unit, struct ioc_read_subchannel *sc); -static int mcd_toc_header(int unit, struct ioc_toc_header *th); -static int mcd_read_toc(int unit); -static int mcd_toc_entrys(int unit, struct ioc_read_toc_entry *te); -#if 0 -static int mcd_toc_entry(int unit, struct ioc_read_toc_single_entry *te); -#endif -static int mcd_stop(int unit); -static int mcd_eject(int unit); -static int mcd_inject(int unit); -static int mcd_playtracks(int unit, struct ioc_play_track *pt); -static int mcd_play(int unit, struct mcd_read2 *pb); -static int mcd_playmsf(int unit, struct ioc_play_msf *pt); -static int mcd_playblocks(int unit, struct ioc_play_blocks *); -static int mcd_pause(int unit); -static int mcd_resume(int unit); -static int mcd_lock_door(int unit, int lock); -static int mcd_close_tray(int unit); - -static int mcd_probe(struct isa_device *dev); -static int mcd_attach(struct isa_device *dev); -struct isa_driver mcddriver = { - INTR_TYPE_BIO, - mcd_probe, - mcd_attach, - "mcd" -}; -COMPAT_ISA_DRIVER(mcd, mcddriver); - -static d_open_t mcdopen; -static d_close_t mcdclose; -static d_ioctl_t mcdioctl; -static d_psize_t mcdsize; -static d_strategy_t mcdstrategy; - -#define CDEV_MAJOR 29 - -static struct cdevsw mcd_cdevsw = { - /* open */ mcdopen, - /* close */ mcdclose, - /* read */ physread, - /* write */ nowrite, - /* ioctl */ mcdioctl, - /* poll */ nopoll, - /* mmap */ nommap, - /* strategy */ mcdstrategy, - /* name */ "mcd", - /* maj */ CDEV_MAJOR, - /* dump */ nodump, - /* psize */ nopsize, - /* flags */ D_DISK, -}; - -#define mcd_put(port,byte) outb(port,byte) - -#define MCD_RETRYS 5 -#define MCD_RDRETRYS 8 - -#define CLOSE_TRAY_SECS 8 -#define DISK_SENSE_SECS 3 -#define WAIT_FRAC 4 - -/* several delays */ -#define RDELAY_WAITSTAT 300 -#define RDELAY_WAITMODE 300 -#define RDELAY_WAITREAD 800 - -#define MIN_DELAY 15 -#define DELAY_GETREPLY 5000000 - -static int -mcd_attach(struct isa_device *dev) -{ - int unit = dev->id_unit; - struct mcd_data *cd = mcd_data + unit; - - dev->id_ointr = mcdintr; - cd->iobase = dev->id_iobase; - cd->flags |= MCDINIT; - mcd_soft_reset(unit); - bioq_init(&cd->head); - -#ifdef NOTYET - /* wire controller for interrupts and dma */ - mcd_configure(cd); -#endif - /* name filled in probe */ - make_dev(&mcd_cdevsw, dkmakeminor(unit, 0, 0), - UID_ROOT, GID_OPERATOR, 0640, "mcd%da", unit); - make_dev(&mcd_cdevsw, dkmakeminor(unit, 0, RAW_PART), - UID_ROOT, GID_OPERATOR, 0640, "mcd%dc", unit); - return 1; -} - -static int -mcdopen(dev_t dev, int flags, int fmt, struct thread *td) -{ - int unit,part,phys,r,retry; - struct mcd_data *cd; - - unit = mcd_unit(dev); - if (unit >= NMCD) - return ENXIO; - - cd = mcd_data + unit; - part = mcd_part(dev); - phys = mcd_phys(dev); - - /* not initialized*/ - if (!(cd->flags & MCDINIT)) - return ENXIO; - - /* invalidated in the meantime? mark all open part's invalid */ - if (!(cd->flags & MCDVALID) && cd->openflags) - return ENXIO; - - if (mcd_getstat(unit,1) == -1) - return EIO; - - if ( (cd->status & (MCDDSKCHNG|MCDDOOROPEN)) - || !(cd->status & MCDDSKIN)) - for (retry = 0; retry < DISK_SENSE_SECS * WAIT_FRAC; retry++) { - (void) tsleep((caddr_t)cd, PSOCK | PCATCH, "mcdsn1", hz/WAIT_FRAC); - if ((r = mcd_getstat(unit,1)) == -1) - return EIO; - if (r != -2) - break; - } - - if (( (cd->status & (MCDDOOROPEN|MCDDSKCHNG)) - || !(cd->status & MCDDSKIN) - ) - && major(dev) == CDEV_MAJOR && part == RAW_PART - ) { - cd->openflags |= (1<partflags[part] |= MCDREADRAW; - return 0; - } - if (cd->status & MCDDOOROPEN) { - printf("mcd%d: door is open\n", unit); - return ENXIO; - } - if (!(cd->status & MCDDSKIN)) { - printf("mcd%d: no CD inside\n", unit); - return ENXIO; - } - if (cd->status & MCDDSKCHNG) { - printf("mcd%d: CD not sensed\n", unit); - return ENXIO; - } - - if (mcdsize(dev) < 0) { - if (major(dev) == CDEV_MAJOR && part == RAW_PART) { - cd->openflags |= (1<partflags[part] |= MCDREADRAW; - return 0; - } - printf("mcd%d: failed to get disk size\n",unit); - return ENXIO; - } else - cd->flags |= MCDVALID; - - /* XXX get a default disklabel */ - mcd_getdisklabel(unit); - -MCD_TRACE("open: partition=%d, disksize = %ld, blksize=%d\n", - part, cd->disksize, cd->blksize); - - dev->si_bsize_phys = cd->blksize; - - if (part == RAW_PART || - (part < cd->dlabel.d_npartitions && - cd->dlabel.d_partitions[part].p_fstype != FS_UNUSED)) { - cd->openflags |= (1<partflags[part] |= MCDREADRAW; - (void) mcd_lock_door(unit, MCD_LK_LOCK); - if (!(cd->flags & MCDVALID)) - return ENXIO; - return 0; - } - - return ENXIO; -} - -static int -mcdclose(dev_t dev, int flags, int fmt, struct thread *td) -{ - int unit,part; - struct mcd_data *cd; - - unit = mcd_unit(dev); - if (unit >= NMCD) - return ENXIO; - - cd = mcd_data + unit; - part = mcd_part(dev); - - if (!(cd->flags & MCDINIT) || !(cd->openflags & (1<openflags &= ~(1<partflags[part] &= ~MCDREADRAW; - - return 0; -} - -static void -mcdstrategy(struct bio *bp) -{ - struct mcd_data *cd; - int s; - - int unit = mcd_unit(bp->bio_dev); - - cd = mcd_data + unit; - - /* test validity */ -/*MCD_TRACE("strategy: buf=0x%lx, unit=%ld, block#=%ld bcount=%ld\n", - bp,unit,bp->bio_blkno,bp->bio_bcount);*/ - if (unit >= NMCD || bp->bio_blkno < 0) { - printf("mcdstrategy: unit = %d, blkno = %ld, bcount = %ld\n", - unit, (long)bp->bio_blkno, bp->bio_bcount); - printf("mcd: mcdstratregy failure"); - bp->bio_error = EINVAL; - bp->bio_flags |= BIO_ERROR; - goto bad; - } - - /* if device invalidated (e.g. media change, door open), error */ - if (!(cd->flags & MCDVALID)) { -MCD_TRACE("strategy: drive not valid\n"); - bp->bio_error = EIO; - goto bad; - } - - /* read only */ - if (!(bp->bio_cmd == BIO_READ)) { - bp->bio_error = EROFS; - goto bad; - } - - /* no data to read */ - if (bp->bio_bcount == 0) - goto done; - - /* for non raw access, check partition limits */ - if (mcd_part(bp->bio_dev) != RAW_PART) { - if (!(cd->flags & MCDLABEL)) { - bp->bio_error = EIO; - goto bad; - } - /* adjust transfer if necessary */ - if (bounds_check_with_label(bp,&cd->dlabel,1) <= 0) { - goto done; - } - } else { - bp->bio_pblkno = bp->bio_blkno; - bp->bio_resid = 0; - } - - /* queue it */ - s = splbio(); - bioqdisksort(&cd->head, bp); - splx(s); - - /* now check whether we can perform processing */ - mcd_start(unit); - return; - -bad: - bp->bio_flags |= BIO_ERROR; -done: - bp->bio_resid = bp->bio_bcount; - biodone(bp); - return; -} - -static void -mcd_start(int unit) -{ - struct mcd_data *cd = mcd_data + unit; - struct partition *p; - struct bio *bp; - int s = splbio(); - - if (cd->flags & MCDMBXBSY) { - splx(s); - return; - } - - bp = bioq_first(&cd->head); - if (bp != 0) { - /* block found to process, dequeue */ - /*MCD_TRACE("mcd_start: found block bp=0x%x\n",bp,0,0,0);*/ - bioq_remove(&cd->head, bp); - splx(s); - } else { - /* nothing to do */ - splx(s); - return; - } - - /* changed media? */ - if (!(cd->flags & MCDVALID)) { - MCD_TRACE("mcd_start: drive not valid\n"); - return; - } - - p = cd->dlabel.d_partitions + mcd_part(bp->bio_dev); - - cd->flags |= MCDMBXBSY; - if (cd->partflags[mcd_part(bp->bio_dev)] & MCDREADRAW) - cd->flags |= MCDREADRAW; - cd->mbx.unit = unit; - cd->mbx.port = cd->iobase; - cd->mbx.retry = MCD_RETRYS; - cd->mbx.bp = bp; - cd->mbx.p_offset = p->p_offset; - - /* calling the read routine */ - mcd_doread(MCD_S_BEGIN,&(cd->mbx)); - /* triggers mcd_start, when successful finished */ - return; -} - -static int -mcdioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct thread *td) -{ - struct mcd_data *cd; - int unit,part,retry,r; - - unit = mcd_unit(dev); - part = mcd_part(dev); - cd = mcd_data + unit; - - if (mcd_getstat(unit, 1) == -1) /* detect disk change too */ - return EIO; -MCD_TRACE("ioctl called 0x%lx\n", cmd); - - switch (cmd) { - case CDIOCSETPATCH: - case CDIOCGETVOL: - case CDIOCSETVOL: - case CDIOCSETMONO: - case CDIOCSETSTERIO: - case CDIOCSETMUTE: - case CDIOCSETLEFT: - case CDIOCSETRIGHT: - return EINVAL; - case CDIOCEJECT: - return mcd_eject(unit); - case CDIOCSETDEBUG: - cd->debug = 1; - return 0; - case CDIOCCLRDEBUG: - cd->debug = 0; - return 0; - case CDIOCRESET: - return mcd_hard_reset(unit); - case CDIOCALLOW: - return mcd_lock_door(unit, MCD_LK_UNLOCK); - case CDIOCPREVENT: - return mcd_lock_door(unit, MCD_LK_LOCK); - case CDIOCCLOSE: - return mcd_inject(unit); - } - - if (!(cd->flags & MCDVALID)) { - if ( major(dev) != CDEV_MAJOR - || part != RAW_PART - || !(cd->openflags & (1<status & (MCDDSKCHNG|MCDDOOROPEN)) - || !(cd->status & MCDDSKIN)) - for (retry = 0; retry < DISK_SENSE_SECS * WAIT_FRAC; retry++) { - (void) tsleep((caddr_t)cd, PSOCK | PCATCH, "mcdsn2", hz/WAIT_FRAC); - if ((r = mcd_getstat(unit,1)) == -1) - return EIO; - if (r != -2) - break; - } - if ( (cd->status & (MCDDOOROPEN|MCDDSKCHNG)) - || !(cd->status & MCDDSKIN) - || mcdsize(dev) < 0 - ) - return ENXIO; - cd->flags |= MCDVALID; - mcd_getdisklabel(unit); - if (mcd_phys(dev)) - cd->partflags[part] |= MCDREADRAW; - (void) mcd_lock_door(unit, MCD_LK_LOCK); - if (!(cd->flags & MCDVALID)) - return ENXIO; - } - - switch (cmd) { - case DIOCGDINFO: - *(struct disklabel *) addr = cd->dlabel; - return 0; - /* - * a bit silly, but someone might want to test something on a - * section of cdrom. - */ - case DIOCWDINFO: - case DIOCSDINFO: - if ((flags & FWRITE) == 0) - return EBADF; - else { - return setdisklabel(&cd->dlabel, - (struct disklabel *) addr, - 0); - } - case DIOCWLABEL: - return EBADF; - case CDIOCPLAYTRACKS: - return mcd_playtracks(unit, (struct ioc_play_track *) addr); - case CDIOCPLAYBLOCKS: - return mcd_playblocks(unit, (struct ioc_play_blocks *) addr); - case CDIOCPLAYMSF: - return mcd_playmsf(unit, (struct ioc_play_msf *) addr); - case CDIOCREADSUBCHANNEL: - return mcd_subchan(unit, (struct ioc_read_subchannel *) addr); - case CDIOREADTOCHEADER: - return mcd_toc_header(unit, (struct ioc_toc_header *) addr); - case CDIOREADTOCENTRYS: - return mcd_toc_entrys(unit, (struct ioc_read_toc_entry *) addr); - case CDIOCRESUME: - return mcd_resume(unit); - case CDIOCPAUSE: - return mcd_pause(unit); - case CDIOCSTART: - if (mcd_setmode(unit, MCD_MD_COOKED) != 0) - return EIO; - return 0; - case CDIOCSTOP: - return mcd_stop(unit); - default: - return ENOTTY; - } - /*NOTREACHED*/ -} - -/* this could have been taken from scsi/cd.c, but it is not clear - * whether the scsi cd driver is linked in - */ -static int -mcd_getdisklabel(int unit) -{ - struct mcd_data *cd = mcd_data + unit; - - if (cd->flags & MCDLABEL) - return -1; - - bzero(&cd->dlabel,sizeof(struct disklabel)); - /* filled with spaces first */ - strncpy(cd->dlabel.d_typename," ", - sizeof(cd->dlabel.d_typename)); - strncpy(cd->dlabel.d_typename, cd->name, - min(strlen(cd->name), sizeof(cd->dlabel.d_typename) - 1)); - strncpy(cd->dlabel.d_packname,"unknown ", - sizeof(cd->dlabel.d_packname)); - cd->dlabel.d_secsize = cd->blksize; - cd->dlabel.d_nsectors = 100; - cd->dlabel.d_ntracks = 1; - cd->dlabel.d_ncylinders = (cd->disksize/100)+1; - cd->dlabel.d_secpercyl = 100; - cd->dlabel.d_secperunit = cd->disksize; - cd->dlabel.d_rpm = 300; - cd->dlabel.d_interleave = 1; - cd->dlabel.d_flags = D_REMOVABLE; - cd->dlabel.d_npartitions= 1; - cd->dlabel.d_partitions[0].p_offset = 0; - cd->dlabel.d_partitions[0].p_size = cd->disksize; - cd->dlabel.d_partitions[0].p_fstype = 9; - cd->dlabel.d_magic = DISKMAGIC; - cd->dlabel.d_magic2 = DISKMAGIC; - cd->dlabel.d_checksum = dkcksum(&cd->dlabel); - - cd->flags |= MCDLABEL; - return 0; -} - -static int -mcdsize(dev_t dev) -{ - int size; - int unit = mcd_unit(dev); - struct mcd_data *cd = mcd_data + unit; - - if (mcd_volinfo(unit) == 0) { - cd->blksize = MCDBLK; - size = msf2hsg(cd->volinfo.vol_msf, 0); - cd->disksize = size * (MCDBLK/DEV_BSIZE); - return 0; - } - return -1; -} - -/*************************************************************** - * lower level of driver starts here - **************************************************************/ - -#ifdef NOTDEF -static char -irqs[] = { - 0x00,0x00,0x10,0x20,0x00,0x30,0x00,0x00, - 0x00,0x10,0x40,0x50,0x00,0x00,0x00,0x00 -}; - -static char -drqs[] = { - 0x00,0x01,0x00,0x03,0x00,0x05,0x06,0x07, -}; -#endif - -#ifdef NOT_YET -static void -mcd_configure(struct mcd_data *cd) -{ - outb(cd->iobase+mcd_config,cd->config); -} -#endif - -/* Wait for non-busy - return 0 on timeout */ -static int -twiddle_thumbs(int port, int unit, int count, char *whine) -{ - int i; - - for (i = 0; i < count; i++) { - if (!(inb(port+MCD_FLAGS) & MFL_STATUS_NOT_AVAIL)) - return 1; - } - if (bootverbose) - printf("mcd%d: timeout %s\n", unit, whine); - return 0; -} - -/* check to see if a Mitsumi CD-ROM is attached to the ISA bus */ - -static int -mcd_probe(struct isa_device *dev) -{ - int port = dev->id_iobase; - int unit = dev->id_unit; - int i, j; - unsigned char stbytes[3]; - - mcd_data[unit].flags = MCDPROBING; - -#ifdef NOTDEF - /* get irq/drq configuration word */ - mcd_data[unit].config = irqs[dev->id_irq]; /* | drqs[dev->id_drq];*/ -#else - mcd_data[unit].config = 0; -#endif - - /* send a reset */ - outb(port+MCD_FLAGS, M_RESET); - - /* - * delay awhile by getting any pending garbage (old data) and - * throwing it away. - */ - for (i = 1000000; i != 0; i--) - inb(port+MCD_FLAGS); - - /* Get status */ - outb(port+MCD_DATA, MCD_CMDGETSTAT); - if (!twiddle_thumbs(port, unit, 1000000, "getting status")) - return 0; /* Timeout */ - /* Get version information */ - outb(port+MCD_DATA, MCD_CMDCONTINFO); - for (j = 0; j < 3; j++) { - if (!twiddle_thumbs(port, unit, 3000, "getting version info")) - return 0; - stbytes[j] = (inb(port+MCD_DATA) & 0xFF); - } - if (stbytes[1] == stbytes[2]) - return 0; - if (stbytes[2] >= 4 || stbytes[1] != 'M') { - outb(port+MCD_CTRL, M_PICKLE); - mcd_data[unit].flags |= MCDNEWMODEL; - } - mcd_data[unit].read_command = MCD_CMDSINGLESPEEDREAD; - switch (stbytes[1]) { - case 'M': - if (stbytes[2] <= 2) { - mcd_data[unit].type = MCD_TYPE_LU002S; - mcd_data[unit].name = "Mitsumi LU002S"; - } else if (stbytes[2] <= 5) { - mcd_data[unit].type = MCD_TYPE_LU005S; - mcd_data[unit].name = "Mitsumi LU005S"; - } else { - mcd_data[unit].type = MCD_TYPE_LU006S; - mcd_data[unit].name = "Mitsumi LU006S"; - } - break; - case 'F': - mcd_data[unit].type = MCD_TYPE_FX001; - mcd_data[unit].name = "Mitsumi FX001"; - break; - case 'D': - mcd_data[unit].type = MCD_TYPE_FX001D; - mcd_data[unit].name = "Mitsumi FX001D"; - mcd_data[unit].read_command = MCD_CMDDOUBLESPEEDREAD; - break; - default: - mcd_data[unit].type = MCD_TYPE_UNKNOWN; - mcd_data[unit].name = "Mitsumi ???"; - break; - } - printf("mcd%d: type %s, version info: %c %x\n", unit, mcd_data[unit].name, - stbytes[1], stbytes[2]); - - return 4; -} - - -static int -mcd_waitrdy(int port,int dly) -{ - int i; - - /* wait until flag port senses status ready */ - for (i=0; iiobase; - - /* wait data to become ready */ - if (mcd_waitrdy(port,dly)<0) { - printf("mcd%d: timeout getreply\n",unit); - return -1; - } - - /* get the data */ - return inb(port+mcd_status) & 0xFF; -} - -static int -mcd_getstat(int unit,int sflg) -{ - int i; - struct mcd_data *cd = mcd_data + unit; - int port = cd->iobase; - - /* get the status */ - if (sflg) - outb(port+mcd_command, MCD_CMDGETSTAT); - i = mcd_getreply(unit,DELAY_GETREPLY); - if (i<0 || (i & MCD_ST_CMDCHECK)) { - cd->curr_mode = MCD_MD_UNKNOWN; - return -1; - } - - cd->status = i; - - if (mcd_setflags(unit,cd) < 0) - return -2; - return cd->status; -} - -static int -mcd_setflags(int unit, struct mcd_data *cd) -{ - /* check flags */ - if ( (cd->status & (MCDDSKCHNG|MCDDOOROPEN)) - || !(cd->status & MCDDSKIN)) { - MCD_TRACE("setflags: sensed DSKCHNG or DOOROPEN or !DSKIN\n"); - mcd_soft_reset(unit); - return -1; - } - - if (cd->status & MCDAUDIOBSY) - cd->audio_status = CD_AS_PLAY_IN_PROGRESS; - else if (cd->audio_status == CD_AS_PLAY_IN_PROGRESS) - cd->audio_status = CD_AS_PLAY_COMPLETED; - return 0; -} - -static int -mcd_get(int unit, char *buf, int nmax) -{ - int i,k; - - for (i=0; iflags & MCDVOLINFO) return 0; - -/*MCD_TRACE("mcd_volinfo: enter\n",0,0,0,0);*/ - - /* send volume info command */ - if (mcd_send(unit,MCD_CMDGETVOLINFO,MCD_RETRYS) < 0) - return EIO; - - /* get data */ - if (mcd_get(unit,(char*) &cd->volinfo,sizeof(struct mcd_volinfo)) < 0) { - printf("mcd%d: mcd_volinfo: error read data\n",unit); - return EIO; - } - - if (cd->volinfo.trk_low > 0 && - cd->volinfo.trk_high >= cd->volinfo.trk_low - ) { - cd->flags |= MCDVOLINFO; /* volinfo is OK */ - return 0; - } - - return EINVAL; -} - -static void -mcdintr(unit) - int unit; -{ - MCD_TRACE("stray interrupt\n"); -} - -/* state machine to process read requests - * initialize with MCD_S_BEGIN: calculate sizes, and read status - * MCD_S_WAITSTAT: wait for status reply, set mode - * MCD_S_WAITMODE: waits for status reply from set mode, set read command - * MCD_S_WAITREAD: wait for read ready, read data - */ -static struct mcd_mbx *mbxsave; -static struct callout_handle tohandle = CALLOUT_HANDLE_INITIALIZER(&tohandle); - -static void -mcd_timeout(void *arg) -{ - mcd_doread((int)arg, mbxsave); -} - -static void -mcd_doread(int state, struct mcd_mbx *mbxin) -{ - struct mcd_mbx *mbx = (state!=MCD_S_BEGIN) ? mbxsave : mbxin; - int unit = mbx->unit; - int port = mbx->port; - int com_port = mbx->port + mcd_command; - int data_port = mbx->port + mcd_rdata; - struct bio *bp = mbx->bp; - struct mcd_data *cd = mcd_data + unit; - - int rm,i,k; - struct mcd_read2 rbuf; - int blknum; - caddr_t addr; - -loop: - switch (state) { - case MCD_S_BEGIN: - mbx = mbxsave = mbxin; - - case MCD_S_BEGIN1: -retry_status: - /* get status */ - outb(com_port, MCD_CMDGETSTAT); - mbx->count = RDELAY_WAITSTAT; - tohandle = timeout(mcd_timeout, - (caddr_t)MCD_S_WAITSTAT,hz/100); /* XXX */ - return; - case MCD_S_WAITSTAT: - untimeout(mcd_timeout,(caddr_t)MCD_S_WAITSTAT, tohandle); - if (mbx->count-- >= 0) { - if (inb(port+MCD_FLAGS) & MFL_STATUS_NOT_AVAIL) { - timeout(mcd_timeout, - (caddr_t)MCD_S_WAITSTAT,hz/100); /* XXX */ - return; - } - cd->status = inb(port+mcd_status) & 0xFF; - if (cd->status & MCD_ST_CMDCHECK) - goto retry_status; - if (mcd_setflags(unit,cd) < 0) - goto changed; - MCD_TRACE("got WAITSTAT delay=%d\n", - RDELAY_WAITSTAT-mbx->count); - /* reject, if audio active */ - if (cd->status & MCDAUDIOBSY) { - printf("mcd%d: audio is active\n",unit); - goto readerr; - } - -retry_mode: - /* to check for raw/cooked mode */ - if (cd->flags & MCDREADRAW) { - rm = MCD_MD_RAW; - mbx->sz = MCDRBLK; - } else { - rm = MCD_MD_COOKED; - mbx->sz = cd->blksize; - } - - if (rm == cd->curr_mode) - goto modedone; - - mbx->count = RDELAY_WAITMODE; - - cd->curr_mode = MCD_MD_UNKNOWN; - mbx->mode = rm; - mcd_put(com_port, MCD_CMDSETMODE); - mcd_put(com_port, rm); - - tohandle = timeout(mcd_timeout, - (caddr_t)MCD_S_WAITMODE,hz/100); /* XXX */ - return; - } else { - printf("mcd%d: timeout getstatus\n",unit); - goto readerr; - } - - case MCD_S_WAITMODE: - untimeout(mcd_timeout,(caddr_t)MCD_S_WAITMODE, tohandle); - if (mbx->count-- < 0) { - printf("mcd%d: timeout set mode\n",unit); - goto readerr; - } - if (inb(port+MCD_FLAGS) & MFL_STATUS_NOT_AVAIL) { - tohandle = timeout(mcd_timeout, - (caddr_t)MCD_S_WAITMODE,hz/100); - return; - } - cd->status = inb(port+mcd_status) & 0xFF; - if (cd->status & MCD_ST_CMDCHECK) { - cd->curr_mode = MCD_MD_UNKNOWN; - goto retry_mode; - } - if (mcd_setflags(unit,cd) < 0) - goto changed; - cd->curr_mode = mbx->mode; - MCD_TRACE("got WAITMODE delay=%d\n", - RDELAY_WAITMODE-mbx->count); -modedone: - /* for first block */ - mbx->nblk = (bp->bio_bcount + (mbx->sz-1)) / mbx->sz; - mbx->skip = 0; - -nextblock: - blknum = (bp->bio_blkno / (mbx->sz/DEV_BSIZE)) - + mbx->p_offset + mbx->skip/mbx->sz; - - MCD_TRACE("mcd_doread: read blknum=%d for bp=%p\n", - blknum, bp); - - /* build parameter block */ - hsg2msf(blknum,rbuf.start_msf); -retry_read: - /* send the read command */ - disable_intr(); - mcd_put(com_port,cd->read_command); - mcd_put(com_port,rbuf.start_msf[0]); - mcd_put(com_port,rbuf.start_msf[1]); - mcd_put(com_port,rbuf.start_msf[2]); - mcd_put(com_port,0); - mcd_put(com_port,0); - mcd_put(com_port,1); - enable_intr(); - - /* Spin briefly (<= 2ms) to avoid missing next block */ - for (i = 0; i < 20; i++) { - k = inb(port+MCD_FLAGS); - if (!(k & MFL_DATA_NOT_AVAIL)) - goto got_it; - DELAY(100); - } - - mbx->count = RDELAY_WAITREAD; - tohandle = timeout(mcd_timeout, - (caddr_t)MCD_S_WAITREAD,hz/100); /* XXX */ - return; - case MCD_S_WAITREAD: - untimeout(mcd_timeout,(caddr_t)MCD_S_WAITREAD, tohandle); - if (mbx->count-- > 0) { - k = inb(port+MCD_FLAGS); - if (!(k & MFL_DATA_NOT_AVAIL)) { /* XXX */ - MCD_TRACE("got data delay=%d\n", - RDELAY_WAITREAD-mbx->count); - got_it: - /* data is ready */ - addr = bp->bio_data + mbx->skip; - - outb(port+mcd_ctl2,0x04); /* XXX */ - for (i=0; isz; i++) - *addr++ = inb(data_port); - outb(port+mcd_ctl2,0x0c); /* XXX */ - - k = inb(port+MCD_FLAGS); - /* If we still have some junk, read it too */ - if (!(k & MFL_DATA_NOT_AVAIL)) { - outb(port+mcd_ctl2,0x04); /* XXX */ - (void)inb(data_port); - (void)inb(data_port); - outb(port+mcd_ctl2,0x0c); /* XXX */ - } - - if (--mbx->nblk > 0) { - mbx->skip += mbx->sz; - goto nextblock; - } - - /* return buffer */ - bp->bio_resid = 0; - biodone(bp); - - cd->flags &= ~(MCDMBXBSY|MCDREADRAW); - mcd_start(mbx->unit); - return; - } - if (!(k & MFL_STATUS_NOT_AVAIL)) { - cd->status = inb(port+mcd_status) & 0xFF; - if (cd->status & MCD_ST_CMDCHECK) - goto retry_read; - if (mcd_setflags(unit,cd) < 0) - goto changed; - } - tohandle = timeout(mcd_timeout, - (caddr_t)MCD_S_WAITREAD,hz/100); /* XXX */ - return; - } else { - printf("mcd%d: timeout read data\n",unit); - goto readerr; - } - } - -readerr: - if (mbx->retry-- > 0) { - printf("mcd%d: retrying\n",unit); - state = MCD_S_BEGIN1; - goto loop; - } -harderr: - /* invalidate the buffer */ - bp->bio_flags |= BIO_ERROR; - bp->bio_resid = bp->bio_bcount; - biodone(bp); - - cd->flags &= ~(MCDMBXBSY|MCDREADRAW); - mcd_start(mbx->unit); - return; - -changed: - printf("mcd%d: media changed\n", unit); - goto harderr; - -#ifdef NOTDEF - printf("mcd%d: unit timeout, resetting\n",mbx->unit); - outb(mbx->port+mcd_reset,MCD_CMDRESET); - DELAY(300000); - (void)mcd_getstat(mbx->unit,1); - (void)mcd_getstat(mbx->unit,1); - /*cd->status &= ~MCDDSKCHNG; */ - cd->debug = 1; /* preventive set debug mode */ - -#endif - -} - -static int -mcd_lock_door(int unit, int lock) -{ - struct mcd_data *cd = mcd_data + unit; - int port = cd->iobase; - - outb(port+mcd_command, MCD_CMDLOCKDRV); - outb(port+mcd_command, lock); - if (mcd_getstat(unit,0) == -1) - return EIO; - return 0; -} - -static int -mcd_close_tray(int unit) -{ - struct mcd_data *cd = mcd_data + unit; - int port = cd->iobase; - int retry, r; - - if (mcd_getstat(unit,1) == -1) - return EIO; - if (cd->status & MCDDOOROPEN) { - outb(port+mcd_command, MCD_CMDCLOSETRAY); - for (retry = 0; retry < CLOSE_TRAY_SECS * WAIT_FRAC; retry++) { - if (inb(port+MCD_FLAGS) & MFL_STATUS_NOT_AVAIL) - (void) tsleep((caddr_t)cd, PSOCK | PCATCH, "mcdcls", hz/WAIT_FRAC); - else { - if ((r = mcd_getstat(unit,0)) == -1) - return EIO; - return 0; - } - } - return ENXIO; - } - return 0; -} - -static int -mcd_eject(int unit) -{ - struct mcd_data *cd = mcd_data + unit; - int port = cd->iobase, r; - - if (mcd_getstat(unit,1) == -1) /* detect disk change too */ - return EIO; - if (cd->status & MCDDOOROPEN) - return 0; - if ((r = mcd_stop(unit)) == EIO) - return r; - outb(port+mcd_command, MCD_CMDEJECTDISK); - if (mcd_getstat(unit,0) == -1) - return EIO; - return 0; -} - -static int -mcd_inject(int unit) -{ - struct mcd_data *cd = mcd_data + unit; - - if (mcd_getstat(unit,1) == -1) /* detect disk change too */ - return EIO; - if (cd->status & MCDDOOROPEN) - return mcd_close_tray(unit); - return 0; -} - -static int -mcd_hard_reset(int unit) -{ - struct mcd_data *cd = mcd_data + unit; - int port = cd->iobase; - - outb(port+mcd_reset,MCD_CMDRESET); - cd->curr_mode = MCD_MD_UNKNOWN; - cd->audio_status = CD_AS_AUDIO_INVALID; - return 0; -} - -static void -mcd_soft_reset(int unit) -{ - struct mcd_data *cd = mcd_data + unit; - int i; - - cd->flags &= (MCDINIT|MCDPROBING|MCDNEWMODEL); - cd->curr_mode = MCD_MD_UNKNOWN; - for (i=0; ipartflags[i] = 0; - cd->audio_status = CD_AS_AUDIO_INVALID; -} - -static int -mcd_setmode(int unit, int mode) -{ - struct mcd_data *cd = mcd_data + unit; - int port = cd->iobase; - int retry, st; - - if (cd->curr_mode == mode) - return 0; - if (cd->debug) - printf("mcd%d: setting mode to %d\n", unit, mode); - for(retry=0; retrycurr_mode = MCD_MD_UNKNOWN; - outb(port+mcd_command, MCD_CMDSETMODE); - outb(port+mcd_command, mode); - if ((st = mcd_getstat(unit, 0)) >= 0) { - cd->curr_mode = mode; - return 0; - } - if (st == -2) { - printf("mcd%d: media changed\n", unit); - break; - } - } - - return -1; -} - -static int -mcd_toc_header(int unit, struct ioc_toc_header *th) -{ - struct mcd_data *cd = mcd_data + unit; - int r; - - if ((r = mcd_volinfo(unit)) != 0) - return r; - - th->starting_track = bcd2bin(cd->volinfo.trk_low); - th->ending_track = bcd2bin(cd->volinfo.trk_high); - th->len = 2 * sizeof(u_char) /* start & end tracks */ + - (th->ending_track + 1 - th->starting_track + 1) * - sizeof(struct cd_toc_entry); - - return 0; -} - -static int -mcd_read_toc(int unit) -{ - struct mcd_data *cd = mcd_data + unit; - struct ioc_toc_header th; - struct mcd_qchninfo q; - int rc, trk, idx, retry; - - /* Only read TOC if needed */ - if (cd->flags & MCDTOC) - return 0; - - if (cd->debug) - printf("mcd%d: reading toc header\n", unit); - - if ((rc = mcd_toc_header(unit, &th)) != 0) - return rc; - - if (mcd_send(unit, MCD_CMDSTOPAUDIO, MCD_RETRYS) < 0) - return EIO; - - if (mcd_setmode(unit, MCD_MD_TOC) != 0) - return EIO; - - if (cd->debug) - printf("mcd%d: get_toc reading qchannel info\n",unit); - - for(trk=th.starting_track; trk<=th.ending_track; trk++) - cd->toc[trk].idx_no = 0; - trk = th.ending_track - th.starting_track + 1; - for(retry=0; retry<600 && trk>0; retry++) - { - if (mcd_getqchan(unit, &q) < 0) break; - idx = bcd2bin(q.idx_no); - if (idx>=th.starting_track && idx<=th.ending_track && q.trk_no==0) { - if (cd->toc[idx].idx_no == 0) { - cd->toc[idx] = q; - trk--; - } - } - } - - if (mcd_setmode(unit, MCD_MD_COOKED) != 0) - return EIO; - - if (trk != 0) - return ENXIO; - - /* add a fake last+1 */ - idx = th.ending_track + 1; - cd->toc[idx].control = cd->toc[idx-1].control; - cd->toc[idx].addr_type = cd->toc[idx-1].addr_type; - cd->toc[idx].trk_no = 0; - cd->toc[idx].idx_no = MCD_LASTPLUS1; - cd->toc[idx].hd_pos_msf[0] = cd->volinfo.vol_msf[0]; - cd->toc[idx].hd_pos_msf[1] = cd->volinfo.vol_msf[1]; - cd->toc[idx].hd_pos_msf[2] = cd->volinfo.vol_msf[2]; - - if (cd->debug) - { int i; - for (i = th.starting_track; i <= idx; i++) - printf("mcd%d: trk %d idx %d pos %d %d %d\n", - unit, i, - cd->toc[i].idx_no > 0x99 ? cd->toc[i].idx_no : - bcd2bin(cd->toc[i].idx_no), - bcd2bin(cd->toc[i].hd_pos_msf[0]), - bcd2bin(cd->toc[i].hd_pos_msf[1]), - bcd2bin(cd->toc[i].hd_pos_msf[2])); - } - - cd->flags |= MCDTOC; - - return 0; -} - -#if 0 -static int -mcd_toc_entry(int unit, struct ioc_read_toc_single_entry *te) -{ - struct mcd_data *cd = mcd_data + unit; - struct ioc_toc_header th; - int rc, trk; - - if (te->address_format != CD_MSF_FORMAT - && te->address_format != CD_LBA_FORMAT) - return EINVAL; - - /* Copy the toc header */ - if ((rc = mcd_toc_header(unit, &th)) != 0) - return rc; - - /* verify starting track */ - trk = te->track; - if (trk == 0) - trk = th.starting_track; - else if (trk == MCD_LASTPLUS1) - trk = th.ending_track + 1; - else if (trk < th.starting_track || trk > th.ending_track + 1) - return EINVAL; - - /* Make sure we have a valid toc */ - if ((rc=mcd_read_toc(unit)) != 0) - return rc; - - /* Copy the TOC data. */ - if (cd->toc[trk].idx_no == 0) - return EIO; - - te->entry.control = cd->toc[trk].control; - te->entry.addr_type = cd->toc[trk].addr_type; - te->entry.track = - cd->toc[trk].idx_no > 0x99 ? cd->toc[trk].idx_no : - bcd2bin(cd->toc[trk].idx_no); - switch (te->address_format) { - case CD_MSF_FORMAT: - te->entry.addr.msf.unused = 0; - te->entry.addr.msf.minute = bcd2bin(cd->toc[trk].hd_pos_msf[0]); - te->entry.addr.msf.second = bcd2bin(cd->toc[trk].hd_pos_msf[1]); - te->entry.addr.msf.frame = bcd2bin(cd->toc[trk].hd_pos_msf[2]); - break; - case CD_LBA_FORMAT: - te->entry.addr.lba = htonl(msf2hsg(cd->toc[trk].hd_pos_msf, 0)); - break; - } - return 0; -} -#endif - -static int -mcd_toc_entrys(int unit, struct ioc_read_toc_entry *te) -{ - struct mcd_data *cd = mcd_data + unit; - struct cd_toc_entry entries[MCD_MAXTOCS]; - struct ioc_toc_header th; - int rc, n, trk, len; - - if ( te->data_len < sizeof(entries[0]) - || (te->data_len % sizeof(entries[0])) != 0 - || (te->address_format != CD_MSF_FORMAT - && te->address_format != CD_LBA_FORMAT) - ) - return EINVAL; - - /* Copy the toc header */ - if ((rc = mcd_toc_header(unit, &th)) != 0) - return rc; - - /* verify starting track */ - trk = te->starting_track; - if (trk == 0) - trk = th.starting_track; - else if (trk == MCD_LASTPLUS1) - trk = th.ending_track + 1; - else if (trk < th.starting_track || trk > th.ending_track + 1) - return EINVAL; - - len = ((th.ending_track + 1 - trk) + 1) * - sizeof(entries[0]); - if (te->data_len < len) - len = te->data_len; - if (len > sizeof(entries)) - return EINVAL; - - /* Make sure we have a valid toc */ - if ((rc=mcd_read_toc(unit)) != 0) - return rc; - - /* Copy the TOC data. */ - for (n = 0; len > 0 && trk <= th.ending_track + 1; trk++) { - if (cd->toc[trk].idx_no == 0) - continue; - entries[n].control = cd->toc[trk].control; - entries[n].addr_type = cd->toc[trk].addr_type; - entries[n].track = - cd->toc[trk].idx_no > 0x99 ? cd->toc[trk].idx_no : - bcd2bin(cd->toc[trk].idx_no); - switch (te->address_format) { - case CD_MSF_FORMAT: - entries[n].addr.msf.unused = 0; - entries[n].addr.msf.minute = bcd2bin(cd->toc[trk].hd_pos_msf[0]); - entries[n].addr.msf.second = bcd2bin(cd->toc[trk].hd_pos_msf[1]); - entries[n].addr.msf.frame = bcd2bin(cd->toc[trk].hd_pos_msf[2]); - break; - case CD_LBA_FORMAT: - entries[n].addr.lba = htonl(msf2hsg(cd->toc[trk].hd_pos_msf, 0)); - break; - } - len -= sizeof(struct cd_toc_entry); - n++; - } - - /* copy the data back */ - return copyout(entries, te->data, n * sizeof(struct cd_toc_entry)); -} - -static int -mcd_stop(int unit) -{ - struct mcd_data *cd = mcd_data + unit; - - /* Verify current status */ - if (cd->audio_status != CD_AS_PLAY_IN_PROGRESS && - cd->audio_status != CD_AS_PLAY_PAUSED && - cd->audio_status != CD_AS_PLAY_COMPLETED) { - if (cd->debug) - printf("mcd%d: stop attempted when not playing, audio status %d\n", - unit, cd->audio_status); - return EINVAL; - } - if (cd->audio_status == CD_AS_PLAY_IN_PROGRESS) - if (mcd_send(unit, MCD_CMDSTOPAUDIO, MCD_RETRYS) < 0) - return EIO; - cd->audio_status = CD_AS_PLAY_COMPLETED; - return 0; -} - -static int -mcd_getqchan(int unit, struct mcd_qchninfo *q) -{ - struct mcd_data *cd = mcd_data + unit; - - if (mcd_send(unit, MCD_CMDGETQCHN, MCD_RETRYS) < 0) - return -1; - if (mcd_get(unit, (char *) q, sizeof(struct mcd_qchninfo)) < 0) - return -1; - if (cd->debug) { - printf("mcd%d: getqchan control=0x%x addr_type=0x%x trk=%d ind=%d ttm=%d:%d.%d dtm=%d:%d.%d\n", - unit, - q->control, q->addr_type, bcd2bin(q->trk_no), - bcd2bin(q->idx_no), - bcd2bin(q->trk_size_msf[0]), bcd2bin(q->trk_size_msf[1]), - bcd2bin(q->trk_size_msf[2]), - bcd2bin(q->hd_pos_msf[0]), bcd2bin(q->hd_pos_msf[1]), - bcd2bin(q->hd_pos_msf[2])); - } - return 0; -} - -static int -mcd_subchan(int unit, struct ioc_read_subchannel *sc) -{ - struct mcd_data *cd = mcd_data + unit; - struct mcd_qchninfo q; - struct cd_sub_channel_info data; - int lba; - - if (cd->debug) - printf("mcd%d: subchan af=%d, df=%d\n", unit, - sc->address_format, - sc->data_format); - - if (sc->address_format != CD_MSF_FORMAT && - sc->address_format != CD_LBA_FORMAT) - return EINVAL; - - if (sc->data_format != CD_CURRENT_POSITION && - sc->data_format != CD_MEDIA_CATALOG) - return EINVAL; - - if (mcd_setmode(unit, MCD_MD_COOKED) != 0) - return EIO; - - if (mcd_getqchan(unit, &q) < 0) - return EIO; - - data.header.audio_status = cd->audio_status; - data.what.position.data_format = sc->data_format; - - switch (sc->data_format) { - case CD_MEDIA_CATALOG: - data.what.media_catalog.mc_valid = 1; - data.what.media_catalog.mc_number[0] = '\0'; - break; - - case CD_CURRENT_POSITION: - data.what.position.control = q.control; - data.what.position.addr_type = q.addr_type; - data.what.position.track_number = bcd2bin(q.trk_no); - data.what.position.index_number = bcd2bin(q.idx_no); - switch (sc->address_format) { - case CD_MSF_FORMAT: - data.what.position.reladdr.msf.unused = 0; - data.what.position.reladdr.msf.minute = bcd2bin(q.trk_size_msf[0]); - data.what.position.reladdr.msf.second = bcd2bin(q.trk_size_msf[1]); - data.what.position.reladdr.msf.frame = bcd2bin(q.trk_size_msf[2]); - data.what.position.absaddr.msf.unused = 0; - data.what.position.absaddr.msf.minute = bcd2bin(q.hd_pos_msf[0]); - data.what.position.absaddr.msf.second = bcd2bin(q.hd_pos_msf[1]); - data.what.position.absaddr.msf.frame = bcd2bin(q.hd_pos_msf[2]); - break; - case CD_LBA_FORMAT: - lba = msf2hsg(q.trk_size_msf, 1); - /* - * Pre-gap has index number of 0, and decreasing MSF - * address. Must be converted to negative LBA, per - * SCSI spec. - */ - if (data.what.position.index_number == 0) - lba = -lba; - data.what.position.reladdr.lba = htonl(lba); - data.what.position.absaddr.lba = htonl(msf2hsg(q.hd_pos_msf, 0)); - break; - } - break; - } - - return copyout(&data, sc->data, min(sizeof(struct cd_sub_channel_info), sc->data_len)); -} - -static int -mcd_playmsf(int unit, struct ioc_play_msf *p) -{ - struct mcd_data *cd = mcd_data + unit; - struct mcd_read2 pb; - - if (cd->debug) - printf("mcd%d: playmsf: from %d:%d.%d to %d:%d.%d\n", - unit, - p->start_m, p->start_s, p->start_f, - p->end_m, p->end_s, p->end_f); - - if ((p->start_m * 60 * 75 + p->start_s * 75 + p->start_f) >= - (p->end_m * 60 * 75 + p->end_s * 75 + p->end_f) || - (p->end_m * 60 * 75 + p->end_s * 75 + p->end_f) > - M_msf(cd->volinfo.vol_msf) * 60 * 75 + - S_msf(cd->volinfo.vol_msf) * 75 + - F_msf(cd->volinfo.vol_msf)) - return EINVAL; - - pb.start_msf[0] = bin2bcd(p->start_m); - pb.start_msf[1] = bin2bcd(p->start_s); - pb.start_msf[2] = bin2bcd(p->start_f); - pb.end_msf[0] = bin2bcd(p->end_m); - pb.end_msf[1] = bin2bcd(p->end_s); - pb.end_msf[2] = bin2bcd(p->end_f); - - if (mcd_setmode(unit, MCD_MD_COOKED) != 0) - return EIO; - - return mcd_play(unit, &pb); -} - -static int -mcd_playtracks(int unit, struct ioc_play_track *pt) -{ - struct mcd_data *cd = mcd_data + unit; - struct mcd_read2 pb; - int a = pt->start_track; - int z = pt->end_track; - int rc, i; - - if ((rc = mcd_read_toc(unit)) != 0) - return rc; - - if (cd->debug) - printf("mcd%d: playtracks from %d:%d to %d:%d\n", unit, - a, pt->start_index, z, pt->end_index); - - if ( a < bcd2bin(cd->volinfo.trk_low) - || a > bcd2bin(cd->volinfo.trk_high) - || a > z - || z < bcd2bin(cd->volinfo.trk_low) - || z > bcd2bin(cd->volinfo.trk_high)) - return EINVAL; - - for (i = 0; i < 3; i++) { - pb.start_msf[i] = cd->toc[a].hd_pos_msf[i]; - pb.end_msf[i] = cd->toc[z+1].hd_pos_msf[i]; - } - - if (mcd_setmode(unit, MCD_MD_COOKED) != 0) - return EIO; - - return mcd_play(unit, &pb); -} - -static int -mcd_playblocks(int unit, struct ioc_play_blocks *p) -{ - struct mcd_data *cd = mcd_data + unit; - struct mcd_read2 pb; - - if (cd->debug) - printf("mcd%d: playblocks: blkno %d length %d\n", - unit, p->blk, p->len); - - if (p->blk > cd->disksize || p->len > cd->disksize || - p->blk < 0 || p->len < 0 || - (p->blk + p->len) > cd->disksize) - return EINVAL; - - hsg2msf(p->blk, pb.start_msf); - hsg2msf(p->blk + p->len, pb.end_msf); - - if (mcd_setmode(unit, MCD_MD_COOKED) != 0) - return EIO; - - return mcd_play(unit, &pb); -} - -static int -mcd_play(int unit, struct mcd_read2 *pb) -{ - struct mcd_data *cd = mcd_data + unit; - int com_port = cd->iobase + mcd_command; - int retry, st = -1, status; - - cd->lastpb = *pb; - for(retry=0; retrystart_msf[0]); - outb(com_port, pb->start_msf[1]); - outb(com_port, pb->start_msf[2]); - outb(com_port, pb->end_msf[0]); - outb(com_port, pb->end_msf[1]); - outb(com_port, pb->end_msf[2]); - enable_intr(); - - status=mcd_getstat(unit, 0); - if (status == -1) - continue; - else if (status != -2) - st = 0; - break; - } - - if (status == -2) { - printf("mcd%d: media changed\n", unit); - return ENXIO; - } - if (cd->debug) - printf("mcd%d: mcd_play retry=%d, status=0x%02x\n", unit, retry, status); - if (st < 0) - return ENXIO; - cd->audio_status = CD_AS_PLAY_IN_PROGRESS; - return 0; -} - -static int -mcd_pause(int unit) -{ - struct mcd_data *cd = mcd_data + unit; - struct mcd_qchninfo q; - int rc; - - /* Verify current status */ - if (cd->audio_status != CD_AS_PLAY_IN_PROGRESS && - cd->audio_status != CD_AS_PLAY_PAUSED) { - if (cd->debug) - printf("mcd%d: pause attempted when not playing, audio status %d\n", - unit, cd->audio_status); - return EINVAL; - } - - /* Get the current position */ - if (mcd_getqchan(unit, &q) < 0) - return EIO; - - /* Copy it into lastpb */ - cd->lastpb.start_msf[0] = q.hd_pos_msf[0]; - cd->lastpb.start_msf[1] = q.hd_pos_msf[1]; - cd->lastpb.start_msf[2] = q.hd_pos_msf[2]; - - /* Stop playing */ - if ((rc=mcd_stop(unit)) != 0) - return rc; - - /* Set the proper status and exit */ - cd->audio_status = CD_AS_PLAY_PAUSED; - return 0; -} - -static int -mcd_resume(int unit) -{ - struct mcd_data *cd = mcd_data + unit; - - if (cd->audio_status != CD_AS_PLAY_PAUSED) - return EINVAL; - return mcd_play(unit, &cd->lastpb); -} -#endif /* GEOM */ Property changes on: head/sys/i386/isa/mcd.c ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/sys/modules/mcd/Makefile =================================================================== --- head/sys/modules/mcd/Makefile (nonexistent) +++ head/sys/modules/mcd/Makefile (revision 104445) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../dev/mcd + +KMOD= mcd +SRCS= mcd.c mcd_isa.c +SRCS+= bus_if.h device_if.h isa_if.h opt_geom.h + +opt_geom.h: + @echo > opt_geom.h + +.include Property changes on: head/sys/modules/mcd/Makefile ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property