Instructions for installation of the Tormenta card (tor) driver First of all, the FreeBSD kernel sources need to be loaded. Then, as 'root': The 'tor.c' file needs to be copied into the '/sys/i386/isa' directory. The 'tor.h' file needs to be copied into the '/sys/i386/include' directory and into the '/usr/include/machine' directory. cd to the '/sys/i386/conf' directory. Add the following line to the 'files.i386' file: i386/isa/tor.c optional tor device-driver Add the following line to the 'majors.i386' file (under the 'chrdev' category): 234 tor BSD Telephony of Mexico Tormenta Card Copy the 'GENERIC' (or whatever your current Kernel configuration is) file to a file called 'TOR' (or whatever you want to call it). Make sure the 'maxusers' parameter is set to at least 128, and that the 'IDENT' is changed to 'TOR'. Then add lines at the end of the 'TOR' file to specify the configuration of the 'tor' driver as follows: First line / master unit (tor0): For example: device tor0 at isa? iomem 0xd0000 irq 5 iosiz 0x1000 flags 0x210000 The 'iomem' specifies the memory address at which the card is configured to reside. The 'irq' specifies the interrupt with which the card is configured. The 'iosiz' must be '0x1000'. The flags are as follows: 0xAABBCC where AA is the syncronization configuration, BB is the configuration for span 2 and CC is the configuration for span 1. Syncronization Configuration: The First digit specifies the secondary syncronization source, and the second digit specifies the primary synronization source as follows: 0 = NONE (FREE-RUN) 1 = SPAN 1 2 = SPAN 2 The example above specifies that span 1 will be primary, and span 2 will be secondary. Span configuration: The first digit specifies the framing and line coding for the span, and the second digit specifies the trasmit line-build out/attenuation levels. Framing and Line Coding: 0 = D4/SF 1 = D4/ESF 2 = B8ZS/SF 3 = B8ZS/ESF Line Build-Out/Attenuation Levels: 0 = 0 db (CSU)/0-133 feet (DSX-1) 1 = 133-266 feet (DSX-1) 2 = 266-399 feet (DSX-1) 3 = 399-533 feet (DSX-1) 4 = 533-655 feet (DSX-1) 5 = -7.5db (CSU) 6 = -15db (CSU) 7 = -22.5db (CSU) The example above specifies that both spans will be D4/ESF and be set to 0 db (CSU)/0-133 feet (DSX-1). In addition, there must be a configuration line for each channel unit, as follows (tor1 - tor??) device tor1 at isa? flags 1 conflicts The flags specify the channel and signalling configuration for the specified channel. The 'conflicts' must be specified. Channel/Signalling Configuration: 0 - No signalling (passive device, such as audio-only, etc) 1 - E & M signalling 2 - FXS loopstart signalling 3 - FXS groundstart signalling 0x100 - Device is a pseudo-channel and has no physical T-1 channel asociated with it. The relevant section of a typical configuration file looks like this: # BSD Telephony Of Mexico "Tormenta" Card # # The master device entry device tor0 at isa? iomem 0xd0000 irq 5 iosiz 0x1000 flags 0x210000 # All 48 of the T-1 channels device tor1 at isa? flags 1 conflicts device tor2 at isa? flags 1 conflicts device tor3 at isa? flags 1 conflicts device tor4 at isa? flags 1 conflicts device tor5 at isa? flags 1 conflicts device tor6 at isa? flags 1 conflicts device tor7 at isa? flags 1 conflicts device tor8 at isa? flags 1 conflicts device tor9 at isa? flags 1 conflicts device tor10 at isa? flags 1 conflicts device tor11 at isa? flags 1 conflicts device tor12 at isa? flags 1 conflicts device tor13 at isa? flags 1 conflicts device tor14 at isa? flags 1 conflicts device tor15 at isa? flags 1 conflicts device tor16 at isa? flags 1 conflicts device tor17 at isa? flags 1 conflicts device tor18 at isa? flags 1 conflicts device tor19 at isa? flags 1 conflicts device tor20 at isa? flags 1 conflicts device tor21 at isa? flags 1 conflicts device tor22 at isa? flags 1 conflicts device tor23 at isa? flags 1 conflicts device tor24 at isa? flags 1 conflicts device tor25 at isa? flags 1 conflicts device tor26 at isa? flags 1 conflicts device tor27 at isa? flags 1 conflicts device tor28 at isa? flags 1 conflicts device tor29 at isa? flags 1 conflicts device tor30 at isa? flags 1 conflicts device tor31 at isa? flags 1 conflicts device tor32 at isa? flags 1 conflicts device tor33 at isa? flags 1 conflicts device tor34 at isa? flags 1 conflicts device tor35 at isa? flags 1 conflicts device tor36 at isa? flags 1 conflicts device tor37 at isa? flags 1 conflicts device tor38 at isa? flags 1 conflicts device tor39 at isa? flags 1 conflicts device tor40 at isa? flags 1 conflicts device tor41 at isa? flags 1 conflicts device tor42 at isa? flags 1 conflicts device tor43 at isa? flags 1 conflicts device tor44 at isa? flags 1 conflicts device tor45 at isa? flags 1 conflicts device tor46 at isa? flags 1 conflicts device tor47 at isa? flags 1 conflicts device tor48 at isa? flags 1 conflicts # And some pseudo-ports for announcements, music-on-hold, etc. device tor49 at isa? flags 0x100 conflicts device tor50 at isa? flags 0x100 conflicts device tor51 at isa? flags 0x100 conflicts device tor52 at isa? flags 0x100 conflicts device tor53 at isa? flags 0x100 conflicts device tor54 at isa? flags 0x100 conflicts device tor55 at isa? flags 0x100 conflicts device tor56 at isa? flags 0x100 conflicts device tor57 at isa? flags 0x100 conflicts device tor58 at isa? flags 0x100 conflicts device tor59 at isa? flags 0x100 conflicts # end of Tormenta card specification The above example, specifies a system with a Tormenta card at memory address 'd0000', and interrupt 5, 48 T-1 channels with E & M signalling, and 11 pseudo-ports. After making all of these changes, type 'config TOR'. This will read-in the TOR file, and generate the proper files in a subdirectory for kernel comiplation. The program tells you that the directory for build is '../../compile/TOR'. cd to that directory. Type 'make depend'. This may take a little while. Then type 'make'. This is bound to take even longer. When this completes successfully, type 'make install'. Then type 'sync'. Then type 'reboot'. Your system will then reboot running the new kernel with Tormenta support.