Newsgroups: comp.sources.unix From: thomas@aeon.in-berlin.de (Thomas Wolfram) Subject: v27i193: mmap-2.2.3 - A SVR3.2 Memory Mapped I/O Driver v2.2.3, Part01/02 Message-id: <1.757030996.11792@gw.home.vix.com> Sender: unix-sources-moderator@gw.home.vix.com Approved: vixie@gw.home.vix.com Submitted-By: thomas@aeon.in-berlin.de (Thomas Wolfram) Posting-Number: Volume 27, Issue 193 Archive-Name: mmap-2.2.3/part01 MMAP - A SVR3.2 Memory Mapped I/O Driver v2.2.3 thomas@aeon.in-berlin.de (Thomas Wolfram) MMAP is a pseudo device driver which provides memory mapped I/O for user processes, i.e. direct mapping of physical memory ranges into the user's virtual address space for fast access. It is especially useful for accessing the linear frame buffers of certain graphics hardware from the user level. Note, the driver is currently tested only under ISC 2.0.2, ISC 2.2.1, ISC 3.0 and ISC 4.0 although it should work on any SVR3.2 based system. It should also work on SCO, but page locking is not tested yet with SCO and for this reason disabled for SCO. (look into mmap.c). But if mapping of ranges less or equal 4MB is enough for your needs it could be easier to use the "dmmap" driver by David McCullough which uses the vas*() functions already provided by the SCO kernel. A description of the driver itself and how to use it you'll find in the accompanied manual page. If you have any bug reports, questions or hints then you can send them me. Thomas Wolfram Germany: 0 30 31421171 PRZ TU Berlin (EANTC) abroad: +49 30 31421171 #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh 'mmap-2.2.3/CHANGELOG' <<'END_OF_FILE' X XMMAP 2.2.3 (22 November 1993) XWorkaround a problem when the page daemon (vhand) steals a mmap Xregion which isn't used any longer by any processes the page tables X(see mmap.c). X XMMAP 2.2.2 (24 September 1993) XUNMAP/UNMAPRM didn't decrement the number of attached shared Xmemory regions after detaching. Thanks to Steve Forsythe, X for pointing to it. X XMMAP 2.2.1 (13 September 1993) XIoctl GETVERSION added. X XMMAP 2.2 (12 September 1993) XNew ioctl UNMAPRM added. Allows removing of regions from the Xdrivers list and the system. Also added a utility "mmaprm" Xwhich does it. X XMMAP 2.1 (8 September 1993) XTwo ioctl's (GETNMMREG & GETMMREG) added to provide an interface Xto a utility "mmapstat", which prints some internal information from Xthe MMAP driver. Some other cleanups. X XMMAP 2.0 (7 September 1993) XCompletly rewritten. The need address space is allocated by the Xdriver itself now. X XMMAP 1.0 (4 August 1993) XUsed kernel function mappages(). Required previous malloc() in the Xcalling process to allocate the needed virtuell address space. X END_OF_FILE if test 1061 -ne `wc -c <'mmap-2.2.3/CHANGELOG'`; then echo shar: \"'mmap-2.2.3/CHANGELOG'\" unpacked with wrong size! fi # end of 'mmap-2.2.3/CHANGELOG' fi if test -f 'mmap-2.2.3/COPYRIGHT' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'mmap-2.2.3/COPYRIGHT'\" else echo shar: Extracting \"'mmap-2.2.3/COPYRIGHT'\" \(1633 characters\) sed "s/^X//" >'mmap-2.2.3/COPYRIGHT' <<'END_OF_FILE' X/* X * Copyright (c) 1993 by Thomas Wolfram, Berlin, Germany. X * X * Permission to use, copy, modify, distribute, and sell this software and its X * documentation for any purpose is hereby granted without fee, provided that X * the above copyright notice appear in all copies and that both that X * copyright notice and this permission notice appear in supporting X * documentation, and that the name of Thomas Wolfram be used in X * advertising or publicity pertaining to distribution of the software without X * specific, written prior permission. Thomas Wolfram makes no X * representations about the suitability of this software for any purpose. X * It is provided "as is" without express or implied warranty. X * X * THOMAS WOLFRAM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO X * EVENT SHALL THOMAS WOLFRAM BE LIABLE FOR ANY SPECIAL, INDIRECT OR X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR X * PERFORMANCE OF THIS SOFTWARE. X * X * Author: Thomas Wolfram, thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de X * X * SCO changes made by X * S. Kent Hamilton X * and X * David McCullough X */ X X/* The MMAP driver is not based on any AT&T source code. It is X * based on informations from various literature, drivers and articles X * posted to Usenet News and by far at most on own observations, approaches X * and a lot debugging. X */ X X END_OF_FILE if test 1633 -ne `wc -c <'mmap-2.2.3/COPYRIGHT'`; then echo shar: \"'mmap-2.2.3/COPYRIGHT'\" unpacked with wrong size! fi # end of 'mmap-2.2.3/COPYRIGHT' fi if test -f 'mmap-2.2.3/DrivDesc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'mmap-2.2.3/DrivDesc'\" else echo shar: Extracting \"'mmap-2.2.3/DrivDesc'\" \(73 characters\) sed "s/^X//" >'mmap-2.2.3/DrivDesc' <<'END_OF_FILE' XDRIVER=mmap XCLASS=io XHARDWARE=FALSE XDESCRIPTION=Memory Mapped I/O Driver END_OF_FILE if test 73 -ne `wc -c <'mmap-2.2.3/DrivDesc'`; then echo shar: \"'mmap-2.2.3/DrivDesc'\" unpacked with wrong size! fi # end of 'mmap-2.2.3/DrivDesc' fi if test -f 'mmap-2.2.3/Makefile' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'mmap-2.2.3/Makefile'\" else echo shar: Extracting \"'mmap-2.2.3/Makefile'\" \(7870 characters\) sed "s/^X//" >'mmap-2.2.3/Makefile' <<'END_OF_FILE' X#/* X# * Copyright (c) 1993 by Thomas Wolfram, Berlin, Germany. X# * X# * Permission to use, copy, modify, distribute, and sell this software and its X# * documentation for any purpose is hereby granted without fee, provided that X# * the above copyright notice appear in all copies and that both that X# * copyright notice and this permission notice appear in supporting X# * documentation, and that the name of Thomas Wolfram be used in X# * advertising or publicity pertaining to distribution of the software without X# * specific, written prior permission. Thomas Wolfram makes no X# * representations about the suitability of this software for any purpose. X# * It is provided "as is" without express or implied warranty. X# * X# * THOMAS WOLFRAM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, X# * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO X# * EVENT SHALL THOMAS WOLFRAM BE LIABLE FOR ANY SPECIAL, INDIRECT OR X# * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, X# * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER X# * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR X# * PERFORMANCE OF THIS SOFTWARE. X# * X# * Author: Thomas Wolfram, thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de X# */ X X SHELL = /bin/sh X X#################################################################### X# For ISC x.x.x uncomment the following X OSDEF = -DISC # Currently not used in the code X# X# ISC's install X INSTALL = /etc/install -i -n $(BINDIR) -u X# X#################################################################### X# For SCO Unix 3.2v2.x and 3.2v4.x uncomment the following X# OSDEF = -DSCO X# X# If you have GNU fileutils use this one. X# INSTALL = /usr/local/bin/install -o X# X# If not and you have X installed try this. X# INSTALL = /usr/X386/bin/bsdinst -o X# No to that one? (Get GNU fileutils!) Install mmapstat X# and mmaprm by hand... sorry. X# X#################################################################### X X# If you don't want the new tunable parameter 'NMMAPREG' be added to X# /etc/conf/cf.d/mtune, comment this out. XADDTUNABLE = addtunable X X# Directory where mmapstat and mmaprm will go X BINDIR = /usr/local/bin X# and where you want the manual pages to go. X CATMANDIR = /usr/local/catman/p_man X X# Do you want compressed manual pages? If not, uncomment 'true'. X# COMPRESS = true X# COMPRESS = compress X# COMPRESS = pack X COMPRESS = gzip --suffix .z X X# It's not tested with gcc, you should use the system's native C compiler. X CC = cc X# Link utilities with shared C library. X LIBS = -lc_s X X#################################################################### X# Normally you need not change anything below... X X DCFLAGS = -O -DINKERNEL $(LKDEFINES) $(OSDEF) #-DDEBUG X CFLAGS = -O $(OSDEF) X LKDEFINES = `test -r /etc/conf/cf.d/defines && cat /etc/conf/cf.d/defines; exit 0` X X CONFNAME = mmap X DRVRNAME = Driver.o XMY1TUNABLE = NMMAPREG X X INCLSYS = /usr/include/sys X LKBINDIR = /etc/conf/bin X LKCFDIR = /etc/conf/cf.d XLKSCONFDIR = /etc/conf/sdevice.d XLKNCONFDIR = /etc/conf/node.d XLKDRVRDIR = /etc/conf/pack.d/mmap X X# ISC specific XLKKCONFDIR = /etc/conf/kconfig.d X ISC30KC = /etc/KC X X Xall: Driver.o mmapstat mmaprm tstmap X X$(INCLSYS)/mmap.h: mmap.h X cp mmap.h $(INCLSYS)/mmap.h X XDriver.o: mmap.c $(INCLSYS)/mmap.h Makefile X $(CC) -c $(DCFLAGS) mmap.c X mv mmap.o Driver.o X Xmmapstat: mmapstat.c $(INCLSYS)/mmap.h Makefile X $(CC) $(CFLAGS) -o mmapstat mmapstat.c $(LIBS) X Xmmaprm: mmaprm.c $(INCLSYS)/mmap.h Makefile X $(CC) $(CFLAGS) -o mmaprm mmaprm.c $(LIBS) X Xtstmap: tstmap.c $(INCLSYS)/mmap.h Makefile X $(CC) $(CFLAGS) -o tstmap tstmap.c $(LIBS) X Xinstall: X @echo Type: X @echo " make install.isc2.0 For installing on ISC 2.0" X @echo " make install.isc2.2 For installing on ISC 2.2" X @echo " make install.isc3.0 For installing on ISC 3.0" X @echo " make install.isc4.0 For installing on ISC 4.0" X @echo " make install.sco322 For installing on SCO 3.2v2" X @echo " make install.sco324 For installing on SCO 3.2v4" X @echo "" X X Xinstall.isc2.0: Driver.o Space.c System Master Node Name # $(ADDTUNABLE) install.utils description X @echo Installing device driver files in /etc/conf... X @if [ ! -d $(LKDRVRDIR) ] ; then echo It\'s a new installation... ; \ X$(LKBINDIR)/idinstall -k -a $(CONFNAME) ; else \ Xecho It\'s an update installation... ; $(LKBINDIR)/idinstall -k -u $(CONFNAME) \ X ; fi X @echo Updating $(LKKCONFDIR)/description... X @grep $(CONFNAME) $(LKKCONFDIR)/description >/dev/null || cat description >> $(LKKCONFDIR)/description X @echo DONE. X Xinstall.isc2.2: install.isc2.0 X Xinstall.isc3.0: Driver.o Space.c System Master Node DrivDesc $(ADDTUNABLE) install.utils X @echo Installing device driver files in /etc/conf... X @if [ ! -d $(LKDRVRDIR) ] ; then echo It\'s a new installation... ; \ X$(LKBINDIR)/idinstall -k -a $(CONFNAME) ; else \ Xecho It\'s an update installation... ; $(LKBINDIR)/idinstall -k -u $(CONFNAME) \ X ; fi X @cp DrivDesc $(LKDRVRDIR)/DrivDesc X @chmod 644 $(LKDRVRDIR)/DrivDesc X @echo DONE. X Xinstall.isc4.0: install.isc3.0 X $(_NULL_) X Xinstall.sco324: Driver.o Space.c System Master Node Name $(ADDTUNABLE) install.utils X @echo Installing device driver files in /etc/conf... X @if [ ! -d $(LKDRVRDIR) ] ; then echo It\'s a new installation... ; \ X$(LKBINDIR)/idinstall -k -a $(CONFNAME) ; else \ Xecho It\'s an update installation... ; $(LKBINDIR)/idinstall -k -u $(CONFNAME) \ X ; fi X Xinstall.sco322: install.sco324 X X# add tunable NMMAPREG to mtune Xaddtunable: Mtune X @echo Updating $(LKCFDIR)/mtune... X @grep $(MY1TUNABLE) $(LKCFDIR)/mtune >/dev/null || cat Mtune >> $(LKCFDIR)/mtune X @if [ -f $(ISC30KC)/DEVICE -a -f $(ISC30KC)/ALL ]; then \ Xecho Updating $(ISC30KC)/DEVICE for kconfig...; \ Xgrep $(MY1TUNABLE) $(ISC30KC)/DEVICE >/dev/null || \ X(if [ -f $(ISC30KC)/DEVICE ] ; \ X then mv $(ISC30KC)/DEVICE $(ISC30KC)/DEVICE.Orig; \ X (sed -e '/^$$/d' $(ISC30KC)/DEVICE.Orig; echo $(MY1TUNABLE)) \ X >$(ISC30KC)/DEVICE; \ X fi) ; \ Xecho Updating $(ISC30KC)/ALL for kconfig...; \ Xgrep $(MY1TUNABLE) $(ISC30KC)/ALL >/dev/null || \ X(if [ -f $(ISC30KC)/ALL ] ; then mv $(ISC30KC)/ALL $(ISC30KC)/ALL.Orig; \ X (sed -e '/^$$/d' $(ISC30KC)/ALL.Orig; echo $(MY1TUNABLE)) >$(ISC30KC)/ALL; \ Xfi) ; \ X fi X X X# mmapstat must be setuid root, mmaprm should only executable for superuser Xinstall.utils: mmapstat mmaprm X $(INSTALL) root -g bin -m 4755 mmapstat $(BINDIR) X strip $(BINDIR)/mmapstat X mcs -d $(BINDIR)/mmapstat X $(INSTALL) root -g sys -m 4750 mmaprm $(BINDIR) X strip $(BINDIR)/mmaprm X mcs -d $(BINDIR)/mmaprm X Xinstall.catman: X -mkdir $(CATMANDIR)/man7 X -mkdir $(CATMANDIR)/man1 X -rm $(CATMANDIR)/man7/$(CONFNAME).7* X nroff -man $(CONFNAME).man >$(CATMANDIR)/man7/$(CONFNAME).7 X $(COMPRESS) $(CATMANDIR)/man7/$(CONFNAME).7 X -rm $(CATMANDIR)/man1/mmapstat.1* X nroff -man mmapstat.man >$(CATMANDIR)/man1/mmapstat.1 X $(COMPRESS) $(CATMANDIR)/man1/mmapstat.1 X -rm $(CATMANDIR)/man1/mmaprm.1* X nroff -man mmaprm.man >$(CATMANDIR)/man1/mmaprm.1 X $(COMPRESS) $(CATMANDIR)/man1/mmaprm.1 X Xinstall.form-catman: X -mkdir $(CATMANDIR)/man7 X -mkdir $(CATMANDIR)/man1 X -rm $(CATMANDIR)/man7/$(CONFNAME).7* X cp $(CONFNAME).7 $(CATMANDIR)/man7/$(CONFNAME).7 X chmod 644 $(CATMANDIR)/man7/$(CONFNAME).7 X $(COMPRESS) $(CATMANDIR)/man7/$(CONFNAME).7 X -rm $(CATMANDIR)/man1/mmapstat.1* X cp mmapstat.1 $(CATMANDIR)/man1/mmapstat.1 X chmod 644 $(CATMANDIR)/man1/mmapstat.1 X $(COMPRESS) $(CATMANDIR)/man1/mmapstat.1 X -rm $(CATMANDIR)/man1/mmaprm.1* X cp mmaprm.1 $(CATMANDIR)/man1/mmaprm.1 X chmod 644 $(CATMANDIR)/man1/mmaprm.1 X $(COMPRESS) $(CATMANDIR)/man1/mmaprm.1 X Xfman: mmap.man mmapstat.man mmaprm.man X nroff -man mmap.man >mmap.7 X nroff -man mmapstat.man >mmapstat.1 X nroff -man mmaprm.man >mmaprm.1 X Xclean: X rm -f Driver.o mmapstat mmaprm tstmap core X Xclobber: clean X END_OF_FILE if test 7870 -ne `wc -c <'mmap-2.2.3/Makefile'`; then echo shar: \"'mmap-2.2.3/Makefile'\" unpacked with wrong size! fi # end of 'mmap-2.2.3/Makefile' fi if test -f 'mmap-2.2.3/Master' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'mmap-2.2.3/Master'\" else echo shar: Extracting \"'mmap-2.2.3/Master'\" \(28 characters\) sed "s/^X//" >'mmap-2.2.3/Master' <<'END_OF_FILE' Xmmap Ii ic mmap 0 0 1 1 -1 END_OF_FILE if test 28 -ne `wc -c <'mmap-2.2.3/Master'`; then echo shar: \"'mmap-2.2.3/Master'\" unpacked with wrong size! fi # end of 'mmap-2.2.3/Master' fi if test -f 'mmap-2.2.3/Mtune' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'mmap-2.2.3/Mtune'\" else echo shar: Extracting \"'mmap-2.2.3/Mtune'\" \(75 characters\) sed "s/^X//" >'mmap-2.2.3/Mtune' <<'END_OF_FILE' X* Memory Mapped I/O Parameters ------ XNMMAPREG 64 8 1024 END_OF_FILE if test 75 -ne `wc -c <'mmap-2.2.3/Mtune'`; then echo shar: \"'mmap-2.2.3/Mtune'\" unpacked with wrong size! fi # end of 'mmap-2.2.3/Mtune' fi if test -f 'mmap-2.2.3/Name' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'mmap-2.2.3/Name'\" else echo shar: Extracting \"'mmap-2.2.3/Name'\" \(25 characters\) sed "s/^X//" >'mmap-2.2.3/Name' <<'END_OF_FILE' XMemory Mapped I/O Driver END_OF_FILE if test 25 -ne `wc -c <'mmap-2.2.3/Name'`; then echo shar: \"'mmap-2.2.3/Name'\" unpacked with wrong size! fi # end of 'mmap-2.2.3/Name' fi if test -f 'mmap-2.2.3/Node' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'mmap-2.2.3/Node'\" else echo shar: Extracting \"'mmap-2.2.3/Node'\" \(14 characters\) sed "s/^X//" >'mmap-2.2.3/Node' <<'END_OF_FILE' Xmmap mmap c 0 END_OF_FILE if test 14 -ne `wc -c <'mmap-2.2.3/Node'`; then echo shar: \"'mmap-2.2.3/Node'\" unpacked with wrong size! fi # end of 'mmap-2.2.3/Node' fi if test -f 'mmap-2.2.3/README' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'mmap-2.2.3/README'\" else echo shar: Extracting \"'mmap-2.2.3/README'\" \(3816 characters\) sed "s/^X//" >'mmap-2.2.3/README' <<'END_OF_FILE' X XMMAP - Memory Mapped I/O Driver v2.2.3 XInstallation X------------------------------------------------------------------------ XMMAP is a pseudo device driver which provides memory mapped I/O for user Xprocesses, i.e. direct mapping of physical memory ranges into the user's Xvirtual address space for fast access. It is especially useful for accessing Xthe linear frame buffers of certain graphics hardware from the user level. X XNote, the driver is currently tested only under ISC 2.0.2, ISC 2.2.1, XISC 3.0 and ISC 4.0 although it should work on any SVR3.2 based system. XIt should also work on SCO, but page locking is not tested yet with SCO Xand for this reason disabled for SCO. (look into mmap.c). But if mapping of Xranges less or equal 4MB is enough for your needs it could be easier to use Xthe "dmmap" driver by David McCullough which uses Xthe vas*() functions already provided by the SCO kernel. XA description of the driver itself and how to use it you'll find in the Xaccompanied manual page. X X0. Login as root. X X1. Unpack the archive with: X X # gzcat mmap-2.2.3.t.z | tar xovf - X X2. Edit the Makefile for your system. Change BINDIR, CATMANDIR, COMPRESS X if you like. X Comment out ADDTUNABLE if you don't want the new tunable system X parameter NMMAPREG be added to /etc/conf/cf.d/mtune. X X3. Compile the driver, the mmapstat, mmaprm and tstmap utilities: X X # make X X3. Install the driver, the mmapstat and mmaprm utilities: X X # make install. X X Where is currently only isc3.0, isc4.0, sco322 or sco324. X A list on which system the installation procedure is supported X you can get with: X X # make install X X The driver adds a new tunable system parameter "NMMAPREG" in X /etc/conf/cf.d/mtune (if you didn't disable it in the Makefile X before). For the ISC 3.0/4.0 systems also files in /etc/KC are X updated to provide access to NMMAPREG in the ISC 3.0/4.0 style X kconfig tool as well as a ISC 3.0/4.0 style "DrivDesc" file is X provided too. X X4. If you are on ISC, run kconfig. Adjust the new system tunable X parameter NMMAPREG if you think it is needed. You can also adjust X SHMSEG if you like. See the new manual page mmap(7L) for their meaning. X X If you are on SCO or another SVR3.2, you can adjust NMMAPREG to X (e.g.) 128, with: X X # /etc/conf/bin/idtune NMMAPREG 128 X X (BTW, this would also work for ISC.) X X If you didn't add the tunable parameter NMMAPREG to the system but X you want to change it, you must edit /etc/conf/pack.d/mmap/space.c X or /usr/include/sys/mmap.h. X X5. Build a new kernel and install it. X X5. Run the test program: X X # tstmap X X It maps the main bios in the process' address space. If you have X e.g. a AMI bios you will see a string like: X X 0123AAAAMMMMIIII05/05/91(C)1990 American Megatrends Inc., All Rights X Reserved X X After unmapping the program should dump core when it wants to access X the previous mapped range again. X X Under ISC you can check the output of the tstmap, e.g. with: X X # hd -s 0xF0000 /dev/mem | more X X Another option to do this is: X X # tail +983040c /dev/mem | more X X X6. Run the mmapstat utility hereafter, which should give following output: X X # mmapstat X Currently memory mapped I/O regions as of Wed Sep 8 17:51:48 1993 X # Physical Address Size Reference Count X 0 0x000F0000 64k 0 X X7. Installing the manual pages for mmap(7L), mmapstat(1L), mmaprm(1L) if you X like. X If you have nroff type (for getting SVR3 style "cat"man pages) X X # make install.catman X X If you don't have nroff, you can use the accompanied pre-formatted X man pages, type: X X # make install.form-catman X XIf you have any bug reports, questions or hints then you can send them to: X XThomas Wolfram Xwolf@prz.tu-berlin.de or thomas@aeon.in-berlin.de X END_OF_FILE if test 3816 -ne `wc -c <'mmap-2.2.3/README'`; then echo shar: \"'mmap-2.2.3/README'\" unpacked with wrong size! fi # end of 'mmap-2.2.3/README' fi if test -f 'mmap-2.2.3/Space.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'mmap-2.2.3/Space.c'\" else echo shar: Extracting \"'mmap-2.2.3/Space.c'\" \(622 characters\) sed "s/^X//" >'mmap-2.2.3/Space.c' <<'END_OF_FILE' X X/* Configuration file for the MMAP driver X * X * Copyright (c) 1993 by Thomas Wolfram, Berlin, Germany. X * X * Author: Thomas Wolfram, thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de X */ X X#if !defined (M_I286) X#ident "@(#)space.c - MMAP v2.2.3, Copyright (c) Thomas Wolfram 1993" X#endif X X#include "sys/types.h" X#include "sys/sysmacros.h" X#include "sys/immu.h" X#include "sys/region.h" X X#include "sys/mmap.h" X X#include "config.h" /* to get tunable parameter NMMAPREG */ X X X/* I/O regions memory mapped by the driver X */ Xmmapreg_t mmapreg[NMMAPREG]; X X/* size of this array for use by the driver X */ Xuint nmmapreg = NMMAPREG; END_OF_FILE if test 622 -ne `wc -c <'mmap-2.2.3/Space.c'`; then echo shar: \"'mmap-2.2.3/Space.c'\" unpacked with wrong size! fi # end of 'mmap-2.2.3/Space.c' fi if test -f 'mmap-2.2.3/System' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'mmap-2.2.3/System'\" else echo shar: Extracting \"'mmap-2.2.3/System'\" \(23 characters\) sed "s/^X//" >'mmap-2.2.3/System' <<'END_OF_FILE' Xmmap Y 1 0 0 0 0 0 0 0 END_OF_FILE if test 23 -ne `wc -c <'mmap-2.2.3/System'`; then echo shar: \"'mmap-2.2.3/System'\" unpacked with wrong size! fi # end of 'mmap-2.2.3/System' fi if test -f 'mmap-2.2.3/description' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'mmap-2.2.3/description'\" else echo shar: Extracting \"'mmap-2.2.3/description'\" \(65 characters\) sed "s/^X//" >'mmap-2.2.3/description' <<'END_OF_FILE' Xmmap - - io - Memory Mapped I/O Driver END_OF_FILE if test 65 -ne `wc -c <'mmap-2.2.3/description'`; then echo shar: \"'mmap-2.2.3/description'\" unpacked with wrong size! fi # end of 'mmap-2.2.3/description' fi if test -f 'mmap-2.2.3/mmap.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'mmap-2.2.3/mmap.h'\" else echo shar: Extracting \"'mmap-2.2.3/mmap.h'\" \(1422 characters\) sed "s/^X//" >'mmap-2.2.3/mmap.h' <<'END_OF_FILE' X X/* This file contains various defines for the MMAP driver. X * X * Copyright (c) 1993 by Thomas Wolfram, Berlin, Germany. X * X * Author: Thomas Wolfram, thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de X */ X X#if !defined (M_I286) X#ident "@(#)mmap.h - MMAP v2.2.3, Copyright (c) Thomas Wolfram 1993" X#endif X X#define MMAPLBA ctob(stoc(1)) /* segment low boundary address multiple */ X /* (MMAPLBA must be a power of 2) */ X /* MMAPLBA = 4MB on a i386 */ X X/* base of memory mapped I/O regions, this is 256MB beyond UVSHM */ X#define UVMMAP ((unsigned)0x90000000L) X X/* Maximal number of memory mapped I/O regions. Can be overwritten X * by /etc/conf/cf.d/stune. X */ X#ifndef NMMAPREG X#define NMMAPREG 64 X#endif X X/* Ioctl's X */ X#define MMAP_IOCTL ('M'<<8) X#define MAP (MMAP_IOCTL|0) X#define UNMAP (MMAP_IOCTL|1) X#define GETNMMREG (MMAP_IOCTL|2) X#define GETMMREG (MMAP_IOCTL|3) X#define UNMAPRM (MMAP_IOCTL|4) X#define GETVERSION (MMAP_IOCTL|5) X X/* Memory mapped I/O region description. X */ Xtypedef struct { X paddr_t physaddr; /* physical address of region */ X reg_t *Reg_p; /* pointer to region structure */ X} mmapreg_t; X X/* Memory mapped I/O region description for GETMMREG ioctl. X */ Xtypedef struct mmapinfo { X paddr_t physaddr; /* physical address of region */ X long length; /* size of region in bytes */ X short refcnt; /* number of users pointing at region */ X} mmapinfo_t; X END_OF_FILE if test 1422 -ne `wc -c <'mmap-2.2.3/mmap.h'`; then echo shar: \"'mmap-2.2.3/mmap.h'\" unpacked with wrong size! fi # end of 'mmap-2.2.3/mmap.h' fi if test -f 'mmap-2.2.3/mmaprm.1' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'mmap-2.2.3/mmaprm.1'\" else echo shar: Extracting \"'mmap-2.2.3/mmaprm.1'\" \(1495 characters\) sed "s/^X//" >'mmap-2.2.3/mmaprm.1' <<'END_OF_FILE' X X X X mmaprm(1L) 386/ix mmaprm(1L) X X X X NAME X mmaprm - remove a memory mapped I/O region of the MMMMMMMMAAAAPPPP X driver X X SYNOPSIS X mmaprm # X X DESCRIPTION X The _m_m_a_p_r_m removes a memory mapped I/O region number # from X the _M_M_A_P driver's [see _m_m_a_p(_7)] internal list and frees also X the concerning system resource. The command will fail if the X region is still used by other processes. The number # is X the number as returned by the _m_m_a_p_s_t_a_t(_1_L) command. X X FILES X /_d_e_v/_m_m_a_p X Character device interface to the _M_M_A_P driver. X X SEE ALSO X mmap(7L), mmapstat(1L). X X BUGS X Please report bugs to: wwwwoooollllffff@@@@pppprrrrzzzz....ttttuuuu----bbbbeeeerrrrlllliiiinnnn....ddddeeee or X tttthhhhoooommmmaaaassss@@@@aaaaeeeeoooonnnn....iiiinnnn----bbbbeeeerrrrlllliiiinnnn....ddddeeee. X X COPYING X Copyright (c) 1993 Thomas Wolfram X X AUTHOR X Thomas Wolfram X X X X X X X X X X X X X X X X X X X X X X X X X X Rev. 2.2.3, 22 November 1993 Page 1 X X X END_OF_FILE echo shar: 183 control characters may be missing from \"'mmap-2.2.3/mmaprm.1'\" if test 1495 -ne `wc -c <'mmap-2.2.3/mmaprm.1'`; then echo shar: \"'mmap-2.2.3/mmaprm.1'\" unpacked with wrong size! fi # end of 'mmap-2.2.3/mmaprm.1' fi if test -f 'mmap-2.2.3/mmaprm.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'mmap-2.2.3/mmaprm.c'\" else echo shar: Extracting \"'mmap-2.2.3/mmaprm.c'\" \(3346 characters\) sed "s/^X//" >'mmap-2.2.3/mmaprm.c' <<'END_OF_FILE' X/* X * Copyright (c) 1993 by Thomas Wolfram, Berlin, Germany. X * X * Permission to use, copy, modify, distribute, and sell this software and its X * documentation for any purpose is hereby granted without fee, provided that X * the above copyright notice appear in all copies and that both that X * copyright notice and this permission notice appear in supporting X * documentation, and that the name of Thomas Wolfram be used in X * advertising or publicity pertaining to distribution of the software without X * specific, written prior permission. Thomas Wolfram makes no X * representations about the suitability of this software for any purpose. X * It is provided "as is" without express or implied warranty. X * X * THOMAS WOLFRAM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO X * EVENT SHALL THOMAS WOLFRAM BE LIABLE FOR ANY SPECIAL, INDIRECT OR X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR X * PERFORMANCE OF THIS SOFTWARE. X * X * Author: Thomas Wolfram, thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de X */ X X/* mmaprm X * ------ X * Free mmap I/O regions from drivers internal list. X */ X X#include X#include X#include X#include X X#ifndef SCO X#include X#include X#else X#include X#endif X#include X#include X#include X X#include X X Xvoid ErrorExit(s) X char *s; X{ X perror(s); X exit(1); X} X X Xmain(argc, argv) X int argc; X char **argv; X{ X int mmap, regnr, nmmreg; X unsigned char eoi; X mmapinfo_t *ibuf; X caddr_t mapaddr; X struct kd_memloc memDesc; X X if(argc != 2) { X fprintf(stderr, "usage: %s n1\n", argv[0]); X exit(1); X } X X X if((mmap = open("/dev/mmap", O_RDONLY)) == -1) X ErrorExit(argv[0]); X X if(ioctl(mmap, GETVERSION) < 0x0221) { X fprintf(stderr, "%s: MMAP 2.2.1 or above required.\n", argv[0]); X exit(1); X } X X if((nmmreg = ioctl(mmap, GETNMMREG)) == -1) X ErrorExit(argv[0]); X X if(nmmreg == 0) { X fprintf(stderr, "%s: No physical memory mapped currently.\n", argv[0]); X exit(1); X } X X if(!sscanf(argv[1], "%d%c\n", ®nr, &eoi)) { X fprintf(stderr, "%s: Invalid region number\n", argv[0]); X exit(1); X } X X if(eoi != '\0' || regnr < 0 || regnr >= nmmreg) { X fprintf(stderr, "%s: Invalid region number\n", argv[0]); X exit(1); X } X X if((ibuf = (mmapinfo_t *)malloc(nmmreg*sizeof(mmapinfo_t))) == NULL) X ErrorExit(argv[0]); X X X if(ioctl(mmap, GETMMREG, ibuf) == -1) X ErrorExit(argv[0]); X X X memDesc.physaddr = (caddr_t)ibuf[regnr].physaddr; X memDesc.length = ibuf[regnr].length; X memDesc.vaddr = (caddr_t)0; X X printf("Try removing memory mapped I/O region %d from system...\n", regnr); X printf("[%d] Physical Address = 0x%08X\n", regnr, memDesc.physaddr); X printf("[%d] Size = %dk\n", regnr, memDesc.length/1024); X X if(ibuf[regnr].refcnt > 0) { X fprintf(stderr, "Region %d still in use. Cannot remove.\n", regnr); X exit(1); X } X X if((mapaddr = (caddr_t)ioctl(mmap, MAP, &memDesc)) == (caddr_t)-1) X ErrorExit(argv[0]); X X ioctl(mmap, UNMAPRM, mapaddr); X printf("Removed.\n"); X X} X END_OF_FILE if test 3346 -ne `wc -c <'mmap-2.2.3/mmaprm.c'`; then echo shar: \"'mmap-2.2.3/mmaprm.c'\" unpacked with wrong size! fi # end of 'mmap-2.2.3/mmaprm.c' fi if test -f 'mmap-2.2.3/mmaprm.man' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'mmap-2.2.3/mmaprm.man'\" else echo shar: Extracting \"'mmap-2.2.3/mmaprm.man'\" \(843 characters\) sed "s/^X//" >'mmap-2.2.3/mmaprm.man' <<'END_OF_FILE' X.\" Copyright (c) 1993 by Thomas Wolfram X.TH mmaprm 1L "2.2.3, 22 November 1993" "Version 2.2.3" X.de BP X.sp X.ti -.2i X\(** X.. X.SH NAME Xmmaprm \- remove a memory mapped I/O region of the \fBMMAP\fP driver X.SH SYNOPSIS Xmmaprm # X.SH DESCRIPTION XThe \fImmaprm\fR removes a memory mapped I/O region number # from Xthe \fIMMAP\fR driver's [see \fImmap(7)\fR] internal list and frees Xalso the concerning system resource. The command will fail if the Xregion is still used by other processes. XThe number # is the number as returned by the \fImmapstat(1L)\fR command. X.SH FILES X.IP \fI/dev/mmap\fR 2 XCharacter device interface to the \fIMMAP\fR driver. X.SH "SEE ALSO" Xmmap(7L), mmapstat(1L). X.SH BUGS XPlease report bugs to: X.B wolf@prz.tu-berlin.de Xor X.BR thomas@aeon.in-berlin.de . X.SH COPYING XCopyright (c) 1993 Thomas Wolfram X.SH AUTHOR XThomas Wolfram END_OF_FILE if test 843 -ne `wc -c <'mmap-2.2.3/mmaprm.man'`; then echo shar: \"'mmap-2.2.3/mmaprm.man'\" unpacked with wrong size! fi # end of 'mmap-2.2.3/mmaprm.man' fi if test -f 'mmap-2.2.3/mmapstat.1' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'mmap-2.2.3/mmapstat.1'\" else echo shar: Extracting \"'mmap-2.2.3/mmapstat.1'\" \(1453 characters\) sed "s/^X//" >'mmap-2.2.3/mmapstat.1' <<'END_OF_FILE' X X X X mmapstat(1L) 386/ix mmapstat(1L) X X X X NAME X mmapstat - print status of the MMMMMMMMAAAAPPPP driver X X SYNOPSIS X mmapstat X X DESCRIPTION X The _m_m_a_p_s_t_a_t command prints the current status of the _M_M_A_P X driver [see _m_m_a_p(_7)]. X For every memory mapped I/O region which exists currently in X the system _m_m_a_p_s_t_a_t prints the physical address, the size in X kByte and the number of processes which currently uses this X region. X X FILES X /_d_e_v/_m_m_a_p X Character device interface to the _M_M_A_P driver. X X SEE ALSO X mmap(7L), mmaprm(1L). X X BUGS X Please report bugs to: wwwwoooollllffff@@@@pppprrrrzzzz....ttttuuuu----bbbbeeeerrrrlllliiiinnnn....ddddeeee or X tttthhhhoooommmmaaaassss@@@@aaaaeeeeoooonnnn....iiiinnnn----bbbbeeeerrrrlllliiiinnnn....ddddeeee. X X COPYING X Copyright (c) 1993 Thomas Wolfram X X AUTHOR X Thomas Wolfram X X X X X X X X X X X X X X X X X X X X X X X X X X Rev. 2.2.3, 22 November 1993 Page 1 X X X END_OF_FILE echo shar: 183 control characters may be missing from \"'mmap-2.2.3/mmapstat.1'\" if test 1453 -ne `wc -c <'mmap-2.2.3/mmapstat.1'`; then echo shar: \"'mmap-2.2.3/mmapstat.1'\" unpacked with wrong size! fi # end of 'mmap-2.2.3/mmapstat.1' fi if test -f 'mmap-2.2.3/mmapstat.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'mmap-2.2.3/mmapstat.c'\" else echo shar: Extracting \"'mmap-2.2.3/mmapstat.c'\" \(2531 characters\) sed "s/^X//" >'mmap-2.2.3/mmapstat.c' <<'END_OF_FILE' X/* X * Copyright (c) 1993 by Thomas Wolfram, Berlin, Germany. X * X * Permission to use, copy, modify, distribute, and sell this software and its X * documentation for any purpose is hereby granted without fee, provided that X * the above copyright notice appear in all copies and that both that X * copyright notice and this permission notice appear in supporting X * documentation, and that the name of Thomas Wolfram be used in X * advertising or publicity pertaining to distribution of the software without X * specific, written prior permission. Thomas Wolfram makes no X * representations about the suitability of this software for any purpose. X * It is provided "as is" without express or implied warranty. X * X * THOMAS WOLFRAM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO X * EVENT SHALL THOMAS WOLFRAM BE LIABLE FOR ANY SPECIAL, INDIRECT OR X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR X * PERFORMANCE OF THIS SOFTWARE. X * X * Author: Thomas Wolfram, thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de X */ X X/* mmapinfo X * -------- X * Gets the status of the MMAP driver. X */ X X#include X#include X#include X#include X#include X X#ifndef SCO X#include X#include X#else X#include X#endif X#include X#include X#include X X#include X X Xvoid ErrorExit(s) X char *s; X{ X perror(s); X exit(1); X} X X Xmain(argc, argv) X int argc; X char **argv; X{ X int mmap, nmmreg, i; X mmapinfo_t *ibuf; X time_t clock; X X X if((mmap = open("/dev/mmap", O_RDONLY)) == -1) X ErrorExit(argv[0]); X X if((nmmreg = ioctl(mmap, GETNMMREG)) == -1) X ErrorExit(argv[0]); X X time(&clock); X X printf("Currently memory mapped I/O regions as of %s", ctime(&clock)); X printf("# Physical Address Size Reference Count\n"); X X if(nmmreg == 0) { X printf("\nNo physical memory mapped currently.\n\n"); X exit(1); X } X X X if((ibuf = (mmapinfo_t *)malloc(nmmreg*sizeof(mmapinfo_t))) == NULL) X ErrorExit(argv[0]); X X if(ioctl(mmap, GETMMREG, ibuf) == -1) X ErrorExit(argv[0]); X X for(i = 0; i < nmmreg; i++) X printf("%-4d 0x%08X %5dk %5d\n", X i, ibuf[i].physaddr, ibuf[i].length/1024, ibuf[i].refcnt); X printf("\n"); X X} X END_OF_FILE if test 2531 -ne `wc -c <'mmap-2.2.3/mmapstat.c'`; then echo shar: \"'mmap-2.2.3/mmapstat.c'\" unpacked with wrong size! fi # end of 'mmap-2.2.3/mmapstat.c' fi if test -f 'mmap-2.2.3/mmapstat.man' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'mmap-2.2.3/mmapstat.man'\" else echo shar: Extracting \"'mmap-2.2.3/mmapstat.man'\" \(808 characters\) sed "s/^X//" >'mmap-2.2.3/mmapstat.man' <<'END_OF_FILE' X.\" Copyright (c) 1993 by Thomas Wolfram X.TH mmapstat 1L "2.2.3, 22 November 1993" "Version 2.2.3" X.de BP X.sp X.ti -.2i X\(** X.. X.SH NAME Xmmapstat \- print status of the \fBMMAP\fP driver X.SH SYNOPSIS Xmmapstat X.SH DESCRIPTION XThe \fImmapstat\fR command prints the current status of the \fIMMAP\fR Xdriver [see \fImmap(7)\fR]. X.br XFor every memory mapped I/O region which exists currently in the system X\fImmapstat\fR prints the physical address, the size in kByte and Xthe number of processes which currently uses this region. X.SH FILES X.IP \fI/dev/mmap\fR 2 XCharacter device interface to the \fIMMAP\fR driver. X.SH "SEE ALSO" Xmmap(7L), mmaprm(1L). X.SH BUGS XPlease report bugs to: X.B wolf@prz.tu-berlin.de Xor X.BR thomas@aeon.in-berlin.de . X.SH COPYING XCopyright (c) 1993 Thomas Wolfram X.SH AUTHOR XThomas Wolfram END_OF_FILE if test 808 -ne `wc -c <'mmap-2.2.3/mmapstat.man'`; then echo shar: \"'mmap-2.2.3/mmapstat.man'\" unpacked with wrong size! fi # end of 'mmap-2.2.3/mmapstat.man' fi if test -f 'mmap-2.2.3/tstmap.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'mmap-2.2.3/tstmap.c'\" else echo shar: Extracting \"'mmap-2.2.3/tstmap.c'\" \(2539 characters\) sed "s/^X//" >'mmap-2.2.3/tstmap.c' <<'END_OF_FILE' X/* X * Copyright (c) 1993 by Thomas Wolfram, Berlin, Germany. X * X * Permission to use, copy, modify, distribute, and sell this software and its X * documentation for any purpose is hereby granted without fee, provided that X * the above copyright notice appear in all copies and that both that X * copyright notice and this permission notice appear in supporting X * documentation, and that the name of Thomas Wolfram be used in X * advertising or publicity pertaining to distribution of the software without X * specific, written prior permission. Thomas Wolfram makes no X * representations about the suitability of this software for any purpose. X * It is provided "as is" without express or implied warranty. X * X * THOMAS WOLFRAM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO X * EVENT SHALL THOMAS WOLFRAM BE LIABLE FOR ANY SPECIAL, INDIRECT OR X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR X * PERFORMANCE OF THIS SOFTWARE. X * X * Author: Thomas Wolfram, thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de X */ X X/* Test program for MMAP driver, maps the main bios into the process' X * address space. X */ X X#include X#include X#include X#include X X#ifndef SCO X#include X#include X#else X#include X#endif X#include X#include X#include X X#include X X#define MAP_SIZE 64*1024 /* 64k */ X#define PHYS_ADDR 0xF0000 /* Main BIOS */ X#define VIRT_ADDR 0 X Xmain(argc, argv) X int argc; X char **argv; X{ X int i; X int fm; X caddr_t mapaddr; X struct kd_memloc memDesc; X X memDesc.vaddr = (caddr_t)VIRT_ADDR; X memDesc.physaddr = (caddr_t)PHYS_ADDR; X memDesc.length = MAP_SIZE; X X if((fm = open("/dev/mmap", O_RDONLY)) == -1) { X perror(argv[0]); X exit(1); X } X X printf("MAP main BIOS...\n"); X if((mapaddr = (caddr_t)ioctl(fm, MAP, &memDesc)) == (caddr_t)-1) { X perror(argv[0]); X exit(1); X } X X printf("Mapping addr = %x\n", mapaddr); X X for(i=0; i < 80; i++) X printf("%c", mapaddr[i]); X printf("\n"); X X printf("UNMAP main BIOS...\n"); X if(ioctl(fm, UNMAP, mapaddr) == -1) { X perror(argv[0]); X exit(1); X } X printf("Trying access after unmapping, should dump core...\n"); X printf("*mapaddr = %02x\n", *(unsigned char *)mapaddr); X X} X END_OF_FILE if test 2539 -ne `wc -c <'mmap-2.2.3/tstmap.c'`; then echo shar: \"'mmap-2.2.3/tstmap.c'\" unpacked with wrong size! fi # end of 'mmap-2.2.3/tstmap.c' fi echo shar: End of archive 1 \(of 2\). cp /dev/null ark1isdone MISSING="" for I in 1 2 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked both archives. echo "Sources of the mmap driver v2.2.3 unpacked." rm -f ark[1-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0