summaryrefslogtreecommitdiffstats
path: root/sys/gnu
diff options
context:
space:
mode:
authorcvs2svn <cvs2svn@FreeBSD.org>2000-04-02 07:41:18 +0000
committercvs2svn <cvs2svn@FreeBSD.org>2000-04-02 07:41:18 +0000
commitb42951578188c5aab5c9f8cbcde4a743f8092cdc (patch)
tree87e472177973ff9d0a59ecabd43cb630c6936af9 /sys/gnu
parentd45e1e2b8b3d88e925564212283fb9072a911a32 (diff)
downloadFreeBSD-src-b42951578188c5aab5c9f8cbcde4a743f8092cdc.zip
FreeBSD-src-b42951578188c5aab5c9f8cbcde4a743f8092cdc.tar.gz
This commit was manufactured by cvs2svn to create branch 'ALSA'.
Diffstat (limited to 'sys/gnu')
-rw-r--r--sys/gnu/ext2fs/COPYRIGHT.INFO35
-rw-r--r--sys/gnu/ext2fs/ext2_alloc.c555
-rw-r--r--sys/gnu/ext2fs/ext2_balloc.c313
-rw-r--r--sys/gnu/ext2fs/ext2_bmap.c320
-rw-r--r--sys/gnu/ext2fs/ext2_extern.h105
-rw-r--r--sys/gnu/ext2fs/ext2_fs.h572
-rw-r--r--sys/gnu/ext2fs/ext2_fs_sb.h81
-rw-r--r--sys/gnu/ext2fs/ext2_ihash.c159
-rw-r--r--sys/gnu/ext2fs/ext2_inode.c495
-rw-r--r--sys/gnu/ext2fs/ext2_inode_cnv.c160
-rw-r--r--sys/gnu/ext2fs/ext2_linux_balloc.c582
-rw-r--r--sys/gnu/ext2fs/ext2_linux_ialloc.c511
-rw-r--r--sys/gnu/ext2fs/ext2_lookup.c1069
-rw-r--r--sys/gnu/ext2fs/ext2_mount.h130
-rw-r--r--sys/gnu/ext2fs/ext2_readwrite.c299
-rw-r--r--sys/gnu/ext2fs/ext2_subr.c127
-rw-r--r--sys/gnu/ext2fs/ext2_vfsops.c1197
-rw-r--r--sys/gnu/ext2fs/ext2_vnops.c1213
-rw-r--r--sys/gnu/ext2fs/fs.h183
-rw-r--r--sys/gnu/ext2fs/i386-bitops.h162
-rw-r--r--sys/gnu/ext2fs/inode.h161
-rw-r--r--sys/gnu/fs/ext2fs/COPYRIGHT.INFO35
-rw-r--r--sys/gnu/fs/ext2fs/ext2_alloc.c555
-rw-r--r--sys/gnu/fs/ext2fs/ext2_balloc.c313
-rw-r--r--sys/gnu/fs/ext2fs/ext2_bmap.c320
-rw-r--r--sys/gnu/fs/ext2fs/ext2_extern.h105
-rw-r--r--sys/gnu/fs/ext2fs/ext2_fs.h572
-rw-r--r--sys/gnu/fs/ext2fs/ext2_fs_sb.h81
-rw-r--r--sys/gnu/fs/ext2fs/ext2_inode.c495
-rw-r--r--sys/gnu/fs/ext2fs/ext2_inode_cnv.c160
-rw-r--r--sys/gnu/fs/ext2fs/ext2_linux_balloc.c582
-rw-r--r--sys/gnu/fs/ext2fs/ext2_linux_ialloc.c511
-rw-r--r--sys/gnu/fs/ext2fs/ext2_lookup.c1069
-rw-r--r--sys/gnu/fs/ext2fs/ext2_mount.h130
-rw-r--r--sys/gnu/fs/ext2fs/ext2_readwrite.c299
-rw-r--r--sys/gnu/fs/ext2fs/ext2_subr.c127
-rw-r--r--sys/gnu/fs/ext2fs/ext2_vfsops.c1197
-rw-r--r--sys/gnu/fs/ext2fs/ext2_vnops.c1213
-rw-r--r--sys/gnu/fs/ext2fs/fs.h183
-rw-r--r--sys/gnu/fs/ext2fs/i386-bitops.h162
-rw-r--r--sys/gnu/fs/ext2fs/inode.h161
-rw-r--r--sys/gnu/i386/fpemul/Changelog36
-rw-r--r--sys/gnu/i386/fpemul/README277
-rw-r--r--sys/gnu/i386/fpemul/control_w.h95
-rw-r--r--sys/gnu/i386/fpemul/div_small.s97
-rw-r--r--sys/gnu/i386/fpemul/errors.c608
-rw-r--r--sys/gnu/i386/fpemul/exception.h105
-rw-r--r--sys/gnu/i386/fpemul/fpu_arith.c233
-rw-r--r--sys/gnu/i386/fpemul/fpu_asm.h83
-rw-r--r--sys/gnu/i386/fpemul/fpu_aux.c235
-rw-r--r--sys/gnu/i386/fpemul/fpu_emu.h188
-rw-r--r--sys/gnu/i386/fpemul/fpu_entry.c519
-rw-r--r--sys/gnu/i386/fpemul/fpu_etc.c176
-rw-r--r--sys/gnu/i386/fpemul/fpu_proto.h114
-rw-r--r--sys/gnu/i386/fpemul/fpu_system.h97
-rw-r--r--sys/gnu/i386/fpemul/fpu_trig.c1371
-rw-r--r--sys/gnu/i386/fpemul/get_address.c202
-rw-r--r--sys/gnu/i386/fpemul/load_store.c273
-rw-r--r--sys/gnu/i386/fpemul/math_emu.h47
-rw-r--r--sys/gnu/i386/fpemul/poly_2xm1.c139
-rw-r--r--sys/gnu/i386/fpemul/poly_atan.c251
-rw-r--r--sys/gnu/i386/fpemul/poly_div.s138
-rw-r--r--sys/gnu/i386/fpemul/poly_l2.c316
-rw-r--r--sys/gnu/i386/fpemul/poly_mul64.s122
-rw-r--r--sys/gnu/i386/fpemul/poly_sin.c195
-rw-r--r--sys/gnu/i386/fpemul/poly_tan.c227
-rw-r--r--sys/gnu/i386/fpemul/polynomial.s190
-rw-r--r--sys/gnu/i386/fpemul/reg_add_sub.c300
-rw-r--r--sys/gnu/i386/fpemul/reg_compare.c385
-rw-r--r--sys/gnu/i386/fpemul/reg_constant.c168
-rw-r--r--sys/gnu/i386/fpemul/reg_constant.h82
-rw-r--r--sys/gnu/i386/fpemul/reg_div.s290
-rw-r--r--sys/gnu/i386/fpemul/reg_ld_str.c1388
-rw-r--r--sys/gnu/i386/fpemul/reg_mul.c159
-rw-r--r--sys/gnu/i386/fpemul/reg_norm.s176
-rw-r--r--sys/gnu/i386/fpemul/reg_round.s650
-rw-r--r--sys/gnu/i386/fpemul/reg_u_add.s240
-rw-r--r--sys/gnu/i386/fpemul/reg_u_div.s501
-rw-r--r--sys/gnu/i386/fpemul/reg_u_mul.s194
-rw-r--r--sys/gnu/i386/fpemul/reg_u_sub.s357
-rw-r--r--sys/gnu/i386/fpemul/status_w.h106
-rw-r--r--sys/gnu/i386/fpemul/version.h61
-rw-r--r--sys/gnu/i386/fpemul/wm_shrx.s258
-rw-r--r--sys/gnu/i386/fpemul/wm_sqrt.s492
-rw-r--r--sys/gnu/i386/isa/dgb.c2199
-rw-r--r--sys/gnu/i386/isa/dgbios.h175
-rw-r--r--sys/gnu/i386/isa/dgfep.h516
-rw-r--r--sys/gnu/i386/isa/dgm.c2002
-rw-r--r--sys/gnu/i386/isa/dgmbios.h2509
-rw-r--r--sys/gnu/i386/isa/dgmfep.h1954
-rw-r--r--sys/gnu/i386/isa/dgmreg.h422
-rw-r--r--sys/gnu/i386/isa/dgreg.h424
-rw-r--r--sys/gnu/i386/isa/sound/awe_compat.h218
-rw-r--r--sys/gnu/i386/isa/sound/awe_config.h149
-rw-r--r--sys/gnu/i386/isa/sound/awe_hw.h100
-rw-r--r--sys/gnu/i386/isa/sound/awe_version.h35
-rw-r--r--sys/gnu/i386/isa/sound/awe_voice.h490
-rw-r--r--sys/gnu/i386/isa/sound/awe_wave.c4574
98 files changed, 0 insertions, 44607 deletions
diff --git a/sys/gnu/ext2fs/COPYRIGHT.INFO b/sys/gnu/ext2fs/COPYRIGHT.INFO
deleted file mode 100644
index 699f519..0000000
--- a/sys/gnu/ext2fs/COPYRIGHT.INFO
+++ /dev/null
@@ -1,35 +0,0 @@
-$FreeBSD$
-
-Most of the files in this directory are written by Godmar Back or modified
-by him using the CSRG sources. Those files are covered by the Berkeley-style
-copyright. However the following files are covered by GPL. Since the policy
-of the FreeBSD project is to keep the files with the more restrictive
-copyright in the gnu tree and it is a good idea to keep the filesystem code
-all together, the EXT2FS in its entirety resides under the gnu tree. Note
-that only the files below are under the GPL. In the eventuality that these
-files are redesigned or rewritten, this tree can be moved back into the less
-restrictive FreeBSD tree.
-
- ext2_bitmap.c (in the cvs attic)
- ext2_fs.h
- ext2_fs_i.h
- ext2_fs_sb.h
- ext2_linux_balloc.c
- ext2_linux_ialloc.c
- ext2_super.c (in the cvs attic)
- ext2_vfsops.c (has some GPL'ed code from ext2_super.c)
- i386-bitops.h
-
-PS.
- THANKS GODMAR!!!
-
-Note that this port has been modified by John Dyson and others on
-the FreeBSD team, and it is best to send the bug reports to the FreeBSD
-team. If there are any non-FreeBSD specific bugs, fixes will be sent to
-Godmar to help him fix the original code base. It is also our intention
-to send Godmar any FreeBSD specific porting changes so that he can keep
-control of his code....
-
-John
-dyson@freebsd.org
-
diff --git a/sys/gnu/ext2fs/ext2_alloc.c b/sys/gnu/ext2fs/ext2_alloc.c
deleted file mode 100644
index bafcee5..0000000
--- a/sys/gnu/ext2fs/ext2_alloc.c
+++ /dev/null
@@ -1,555 +0,0 @@
-/*
- * modified for Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- */
-/*
- * Copyright (c) 1982, 1986, 1989, 1993
- * The Regents of the University of California. 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 product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ext2_alloc.c 8.8 (Berkeley) 2/21/94
- */
-
-#include "opt_quota.h"
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/conf.h>
-#include <sys/vnode.h>
-#include <sys/stat.h>
-#include <sys/mount.h>
-#include <sys/syslog.h>
-
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/inode.h>
-#include <ufs/ufs/ufsmount.h>
-
-#include <gnu/ext2fs/ext2_fs.h>
-#include <gnu/ext2fs/ext2_fs_sb.h>
-#include <gnu/ext2fs/fs.h>
-#include <gnu/ext2fs/ext2_extern.h>
-
-static void ext2_fserr __P((struct ext2_sb_info *, u_int, char *));
-
-/*
- * Linux calls this functions at the following locations:
- * (1) the inode is freed
- * (2) a preallocation miss occurs
- * (3) truncate is called
- * (4) release_file is called and f_mode & 2
- *
- * I call it in ext2_inactive, ext2_truncate, ext2_vfree and in (2)
- * the call in vfree might be redundant
- */
-void
-ext2_discard_prealloc(ip)
- struct inode * ip;
-{
-#ifdef EXT2_PREALLOCATE
- if (ip->i_prealloc_count) {
- int i = ip->i_prealloc_count;
- ip->i_prealloc_count = 0;
- ext2_free_blocks (ITOV(ip)->v_mount,
- ip->i_prealloc_block,
- i);
- }
-#endif
-}
-
-/*
- * Allocate a block in the file system.
- *
- * this takes the framework from ffs_alloc. To implement the
- * actual allocation, it calls ext2_new_block, the ported version
- * of the same Linux routine.
- *
- * we note that this is always called in connection with ext2_blkpref
- *
- * preallocation is done as Linux does it
- */
-int
-ext2_alloc(ip, lbn, bpref, size, cred, bnp)
- register struct inode *ip;
- daddr_t lbn, bpref;
- int size;
- struct ucred *cred;
- daddr_t *bnp;
-{
- register struct ext2_sb_info *fs;
- daddr_t bno;
-#if QUOTA
- int error;
-#endif
-
- *bnp = 0;
- fs = ip->i_e2fs;
-#if DIAGNOSTIC
- if ((u_int)size > fs->s_blocksize || blkoff(fs, size) != 0) {
- printf("dev = %s, bsize = %lu, size = %d, fs = %s\n",
- devtoname(ip->i_dev), fs->s_blocksize, size, fs->fs_fsmnt);
- panic("ext2_alloc: bad size");
- }
- if (cred == NOCRED)
- panic("ext2_alloc: missing credential");
-#endif /* DIAGNOSTIC */
- if (size == fs->s_blocksize && fs->s_es->s_free_blocks_count == 0)
- goto nospace;
- if (cred->cr_uid != 0 &&
- fs->s_es->s_free_blocks_count < fs->s_es->s_r_blocks_count)
- goto nospace;
-#if QUOTA
- if ((error = chkdq(ip, (long)btodb(size), cred, 0)) != 0)
- return (error);
-#endif
- if (bpref >= fs->s_es->s_blocks_count)
- bpref = 0;
- /* call the Linux code */
-#ifdef EXT2_PREALLOCATE
- /* To have a preallocation hit, we must
- * - have at least one block preallocated
- * - and our preferred block must have that block number or one below
- */
- if (ip->i_prealloc_count &&
- (bpref == ip->i_prealloc_block ||
- bpref + 1 == ip->i_prealloc_block))
- {
- bno = ip->i_prealloc_block++;
- ip->i_prealloc_count--;
- /* ext2_debug ("preallocation hit (%lu/%lu).\n",
- ++alloc_hits, ++alloc_attempts); */
-
- /* Linux gets, clears, and releases the buffer at this
- point - we don't have to that; we leave it to the caller
- */
- } else {
- ext2_discard_prealloc (ip);
- /* ext2_debug ("preallocation miss (%lu/%lu).\n",
- alloc_hits, ++alloc_attempts); */
- if (S_ISREG(ip->i_mode))
- bno = ext2_new_block
- (ITOV(ip)->v_mount, bpref,
- &ip->i_prealloc_count,
- &ip->i_prealloc_block);
- else
- bno = (daddr_t)ext2_new_block(ITOV(ip)->v_mount,
- bpref, 0, 0);
- }
-#else
- bno = (daddr_t)ext2_new_block(ITOV(ip)->v_mount, bpref, 0, 0);
-#endif
-
- if (bno > 0) {
- /* set next_alloc fields as done in block_getblk */
- ip->i_next_alloc_block = lbn;
- ip->i_next_alloc_goal = bno;
-
- ip->i_blocks += btodb(size);
- ip->i_flag |= IN_CHANGE | IN_UPDATE;
- *bnp = bno;
- return (0);
- }
-#if QUOTA
- /*
- * Restore user's disk quota because allocation failed.
- */
- (void) chkdq(ip, (long)-btodb(size), cred, FORCE);
-#endif
-nospace:
- ext2_fserr(fs, cred->cr_uid, "file system full");
- uprintf("\n%s: write failed, file system is full\n", fs->fs_fsmnt);
- return (ENOSPC);
-}
-
-/*
- * Reallocate a sequence of blocks into a contiguous sequence of blocks.
- *
- * The vnode and an array of buffer pointers for a range of sequential
- * logical blocks to be made contiguous is given. The allocator attempts
- * to find a range of sequential blocks starting as close as possible to
- * an fs_rotdelay offset from the end of the allocation for the logical
- * block immediately preceeding the current range. If successful, the
- * physical block numbers in the buffer pointers and in the inode are
- * changed to reflect the new allocation. If unsuccessful, the allocation
- * is left unchanged. The success in doing the reallocation is returned.
- * Note that the error return is not reflected back to the user. Rather
- * the previous block allocation will be used.
- */
-
-#ifdef FANCY_REALLOC
-#include <sys/sysctl.h>
-static int doasyncfree = 1;
-#ifdef OPT_DEBUG
-SYSCTL_INT(_debug, 14, doasyncfree, CTLFLAG_RW, &doasyncfree, 0, "");
-#endif /* OPT_DEBUG */
-#endif
-
-int
-ext2_reallocblks(ap)
- struct vop_reallocblks_args /* {
- struct vnode *a_vp;
- struct cluster_save *a_buflist;
- } */ *ap;
-{
-#ifndef FANCY_REALLOC
-/* printf("ext2_reallocblks not implemented\n"); */
-return ENOSPC;
-#else
-
- struct ext2_sb_info *fs;
- struct inode *ip;
- struct vnode *vp;
- struct buf *sbp, *ebp;
- daddr_t *bap, *sbap, *ebap;
- struct cluster_save *buflist;
- daddr_t start_lbn, end_lbn, soff, eoff, newblk, blkno;
- struct indir start_ap[NIADDR + 1], end_ap[NIADDR + 1], *idp;
- int i, len, start_lvl, end_lvl, pref, ssize;
-
- vp = ap->a_vp;
- ip = VTOI(vp);
- fs = ip->i_e2fs;
-#ifdef UNKLAR
- if (fs->fs_contigsumsize <= 0)
- return (ENOSPC);
-#endif
- buflist = ap->a_buflist;
- len = buflist->bs_nchildren;
- start_lbn = buflist->bs_children[0]->b_lblkno;
- end_lbn = start_lbn + len - 1;
-#if DIAGNOSTIC
- for (i = 1; i < len; i++)
- if (buflist->bs_children[i]->b_lblkno != start_lbn + i)
- panic("ext2_reallocblks: non-cluster");
-#endif
- /*
- * If the latest allocation is in a new cylinder group, assume that
- * the filesystem has decided to move and do not force it back to
- * the previous cylinder group.
- */
- if (dtog(fs, dbtofsb(fs, buflist->bs_children[0]->b_blkno)) !=
- dtog(fs, dbtofsb(fs, buflist->bs_children[len - 1]->b_blkno)))
- return (ENOSPC);
- if (ufs_getlbns(vp, start_lbn, start_ap, &start_lvl) ||
- ufs_getlbns(vp, end_lbn, end_ap, &end_lvl))
- return (ENOSPC);
- /*
- * Get the starting offset and block map for the first block.
- */
- if (start_lvl == 0) {
- sbap = &ip->i_db[0];
- soff = start_lbn;
- } else {
- idp = &start_ap[start_lvl - 1];
- if (bread(vp, idp->in_lbn, (int)fs->s_blocksize, NOCRED, &sbp)) {
- brelse(sbp);
- return (ENOSPC);
- }
- sbap = (daddr_t *)sbp->b_data;
- soff = idp->in_off;
- }
- /*
- * Find the preferred location for the cluster.
- */
- pref = ext2_blkpref(ip, start_lbn, soff, sbap);
- /*
- * If the block range spans two block maps, get the second map.
- */
- if (end_lvl == 0 || (idp = &end_ap[end_lvl - 1])->in_off + 1 >= len) {
- ssize = len;
- } else {
-#if DIAGNOSTIC
- if (start_ap[start_lvl-1].in_lbn == idp->in_lbn)
- panic("ext2_reallocblk: start == end");
-#endif
- ssize = len - (idp->in_off + 1);
- if (bread(vp, idp->in_lbn, (int)fs->s_blocksize, NOCRED, &ebp))
- goto fail;
- ebap = (daddr_t *)ebp->b_data;
- }
- /*
- * Search the block map looking for an allocation of the desired size.
- */
- if ((newblk = (daddr_t)ext2_hashalloc(ip, dtog(fs, pref), (long)pref,
- len, (u_long (*)())ext2_clusteralloc)) == 0)
- goto fail;
- /*
- * We have found a new contiguous block.
- *
- * First we have to replace the old block pointers with the new
- * block pointers in the inode and indirect blocks associated
- * with the file.
- */
- blkno = newblk;
- for (bap = &sbap[soff], i = 0; i < len; i++, blkno += fs->s_frags_per_block) {
- if (i == ssize)
- bap = ebap;
-#if DIAGNOSTIC
- if (buflist->bs_children[i]->b_blkno != fsbtodb(fs, *bap))
- panic("ext2_reallocblks: alloc mismatch");
-#endif
- *bap++ = blkno;
- }
- /*
- * Next we must write out the modified inode and indirect blocks.
- * For strict correctness, the writes should be synchronous since
- * the old block values may have been written to disk. In practise
- * they are almost never written, but if we are concerned about
- * strict correctness, the `doasyncfree' flag should be set to zero.
- *
- * The test on `doasyncfree' should be changed to test a flag
- * that shows whether the associated buffers and inodes have
- * been written. The flag should be set when the cluster is
- * started and cleared whenever the buffer or inode is flushed.
- * We can then check below to see if it is set, and do the
- * synchronous write only when it has been cleared.
- */
- if (sbap != &ip->i_db[0]) {
- if (doasyncfree)
- bdwrite(sbp);
- else
- bwrite(sbp);
- } else {
- ip->i_flag |= IN_CHANGE | IN_UPDATE;
- if (!doasyncfree)
- UFS_UPDATE(vp, 1);
- }
- if (ssize < len)
- if (doasyncfree)
- bdwrite(ebp);
- else
- bwrite(ebp);
- /*
- * Last, free the old blocks and assign the new blocks to the buffers.
- */
- for (blkno = newblk, i = 0; i < len; i++, blkno += fs->s_frags_per_block) {
- ext2_blkfree(ip, dbtofsb(fs, buflist->bs_children[i]->b_blkno),
- fs->s_blocksize);
- buflist->bs_children[i]->b_blkno = fsbtodb(fs, blkno);
- }
- return (0);
-
-fail:
- if (ssize < len)
- brelse(ebp);
- if (sbap != &ip->i_db[0])
- brelse(sbp);
- return (ENOSPC);
-
-#endif /* FANCY_REALLOC */
-}
-
-/*
- * Allocate an inode in the file system.
- *
- * we leave the actual allocation strategy to the (modified)
- * ext2_new_inode(), to make sure we get the policies right
- */
-int
-ext2_valloc(pvp, mode, cred, vpp)
- struct vnode *pvp;
- int mode;
- struct ucred *cred;
- struct vnode **vpp;
-{
- register struct inode *pip;
- register struct ext2_sb_info *fs;
- register struct inode *ip;
- ino_t ino;
- int i, error;
-
- *vpp = NULL;
- pip = VTOI(pvp);
- fs = pip->i_e2fs;
- if (fs->s_es->s_free_inodes_count == 0)
- goto noinodes;
-
- /* call the Linux routine - it returns the inode number only */
- ino = ext2_new_inode(pip, mode);
-
- if (ino == 0)
- goto noinodes;
- error = VFS_VGET(pvp->v_mount, ino, vpp);
- if (error) {
- UFS_VFREE(pvp, ino, mode);
- return (error);
- }
- ip = VTOI(*vpp);
-
- /*
- the question is whether using VGET was such good idea at all -
- Linux doesn't read the old inode in when it's allocating a
- new one. I will set at least i_size & i_blocks the zero.
- */
- ip->i_mode = 0;
- ip->i_size = 0;
- ip->i_blocks = 0;
- ip->i_flags = 0;
- /* now we want to make sure that the block pointers are zeroed out */
- for (i = 0; i < NDADDR; i++)
- ip->i_db[i] = 0;
- for (i = 0; i < NIADDR; i++)
- ip->i_ib[i] = 0;
-
- /*
- * Set up a new generation number for this inode.
- * XXX check if this makes sense in ext2
- */
- if (ip->i_gen == 0 || ++ip->i_gen == 0)
- ip->i_gen = random() / 2 + 1;
-/*
-printf("ext2_valloc: allocated inode %d\n", ino);
-*/
- return (0);
-noinodes:
- ext2_fserr(fs, cred->cr_uid, "out of inodes");
- uprintf("\n%s: create/symlink failed, no inodes free\n", fs->fs_fsmnt);
- return (ENOSPC);
-}
-
-/*
- * Select the desired position for the next block in a file.
- *
- * we try to mimic what Remy does in inode_getblk/block_getblk
- *
- * we note: blocknr == 0 means that we're about to allocate either
- * a direct block or a pointer block at the first level of indirection
- * (In other words, stuff that will go in i_db[] or i_ib[])
- *
- * blocknr != 0 means that we're allocating a block that is none
- * of the above. Then, blocknr tells us the number of the block
- * that will hold the pointer
- */
-daddr_t
-ext2_blkpref(ip, lbn, indx, bap, blocknr)
- struct inode *ip;
- daddr_t lbn;
- int indx;
- daddr_t *bap;
- daddr_t blocknr;
-{
- int tmp;
-
- /* if the next block is actually what we thought it is,
- then set the goal to what we thought it should be
- */
- if(ip->i_next_alloc_block == lbn)
- return ip->i_next_alloc_goal;
-
- /* now check whether we were provided with an array that basically
- tells us previous blocks to which we want to stay closeby
- */
- if(bap)
- for (tmp = indx - 1; tmp >= 0; tmp--)
- if (bap[tmp])
- return bap[tmp];
-
- /* else let's fall back to the blocknr, or, if there is none,
- follow the rule that a block should be allocated near its inode
- */
- return blocknr ? blocknr :
- (daddr_t)(ip->i_block_group *
- EXT2_BLOCKS_PER_GROUP(ip->i_e2fs)) +
- ip->i_e2fs->s_es->s_first_data_block;
-}
-
-/*
- * Free a block or fragment.
- *
- * pass on to the Linux code
- */
-void
-ext2_blkfree(ip, bno, size)
- register struct inode *ip;
- daddr_t bno;
- long size;
-{
- register struct ext2_sb_info *fs;
-
- fs = ip->i_e2fs;
- /*
- * call Linux code with mount *, block number, count
- */
- ext2_free_blocks(ITOV(ip)->v_mount, bno, size / fs->s_frag_size);
-}
-
-/*
- * Free an inode.
- *
- * the maintenance of the actual bitmaps is again up to the linux code
- */
-int
-ext2_vfree(pvp, ino, mode)
- struct vnode *pvp;
- ino_t ino;
- int mode;
-{
- register struct ext2_sb_info *fs;
- register struct inode *pip;
- register mode_t save_i_mode;
-
- pip = VTOI(pvp);
- fs = pip->i_e2fs;
- if ((u_int)ino >= fs->s_inodes_per_group * fs->s_groups_count)
- panic("ext2_vfree: range: dev = (%d, %d), ino = %d, fs = %s",
- major(pip->i_dev), minor(pip->i_dev), ino, fs->fs_fsmnt);
-
-/* ext2_debug("ext2_vfree (%d, %d) called\n", pip->i_number, mode);
- */
- ext2_discard_prealloc(pip);
-
- /* we need to make sure that ext2_free_inode can adjust the
- used_dir_counts in the group summary information - I'd
- really like to know what the rationale behind this
- 'set i_mode to zero to denote an unused inode' is
- */
- save_i_mode = pip->i_mode;
- pip->i_mode = mode;
- ext2_free_inode(pip);
- pip->i_mode = save_i_mode;
- return (0);
-}
-
-/*
- * Fserr prints the name of a file system with an error diagnostic.
- *
- * The form of the error message is:
- * fs: error message
- */
-static void
-ext2_fserr(fs, uid, cp)
- struct ext2_sb_info *fs;
- u_int uid;
- char *cp;
-{
-
- log(LOG_ERR, "uid %d on %s: %s\n", uid, fs->fs_fsmnt, cp);
-}
diff --git a/sys/gnu/ext2fs/ext2_balloc.c b/sys/gnu/ext2fs/ext2_balloc.c
deleted file mode 100644
index 2b485c6..0000000
--- a/sys/gnu/ext2fs/ext2_balloc.c
+++ /dev/null
@@ -1,313 +0,0 @@
-/*
- * modified for Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- */
-/*
- * Copyright (c) 1982, 1986, 1989, 1993
- * The Regents of the University of California. 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 product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ffs_balloc.c 8.4 (Berkeley) 9/23/93
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/buf.h>
-#include <sys/lock.h>
-#include <sys/ucred.h>
-#include <sys/vnode.h>
-
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/inode.h>
-#include <ufs/ufs/ufs_extern.h>
-
-#include <gnu/ext2fs/ext2_fs.h>
-#include <gnu/ext2fs/ext2_fs_sb.h>
-#include <gnu/ext2fs/fs.h>
-#include <gnu/ext2fs/ext2_extern.h>
-
-/*
- * Balloc defines the structure of file system storage
- * by allocating the physical blocks on a device given
- * the inode and the logical block number in a file.
- */
-int
-ext2_balloc(ip, bn, size, cred, bpp, flags)
- register struct inode *ip;
- register daddr_t bn;
- int size;
- struct ucred *cred;
- struct buf **bpp;
- int flags;
-{
- register struct ext2_sb_info *fs;
- register daddr_t nb;
- struct buf *bp, *nbp;
- struct vnode *vp = ITOV(ip);
- struct indir indirs[NIADDR + 2];
- daddr_t newb, lbn, *bap, pref;
- int osize, nsize, num, i, error;
-/*
-ext2_debug("ext2_balloc called (%d, %d, %d)\n",
- ip->i_number, (int)bn, (int)size);
-*/
- *bpp = NULL;
- if (bn < 0)
- return (EFBIG);
- fs = ip->i_e2fs;
- lbn = bn;
-
- /*
- * check if this is a sequential block allocation.
- * If so, increment next_alloc fields to allow ext2_blkpref
- * to make a good guess
- */
- if (lbn == ip->i_next_alloc_block + 1) {
- ip->i_next_alloc_block++;
- ip->i_next_alloc_goal++;
- }
-
- /*
- * The first NDADDR blocks are direct blocks
- */
- if (bn < NDADDR) {
- nb = ip->i_db[bn];
- /* no new block is to be allocated, and no need to expand
- the file */
- if (nb != 0 && ip->i_size >= (bn + 1) * fs->s_blocksize) {
- error = bread(vp, bn, fs->s_blocksize, NOCRED, &bp);
- if (error) {
- brelse(bp);
- return (error);
- }
- *bpp = bp;
- return (0);
- }
- if (nb != 0) {
- /*
- * Consider need to reallocate a fragment.
- */
- osize = fragroundup(fs, blkoff(fs, ip->i_size));
- nsize = fragroundup(fs, size);
- if (nsize <= osize) {
- error = bread(vp, bn, osize, NOCRED, &bp);
- if (error) {
- brelse(bp);
- return (error);
- }
- } else {
- /* Godmar thinks: this shouldn't happen w/o fragments */
- printf("nsize %d(%d) > osize %d(%d) nb %d\n",
- (int)nsize, (int)size, (int)osize,
- (int)ip->i_size, (int)nb);
- panic(
- "ext2_balloc: Something is terribly wrong");
-/*
- * please note there haven't been any changes from here on -
- * FFS seems to work.
- */
- }
- } else {
- if (ip->i_size < (bn + 1) * fs->s_blocksize)
- nsize = fragroundup(fs, size);
- else
- nsize = fs->s_blocksize;
- error = ext2_alloc(ip, bn,
- ext2_blkpref(ip, bn, (int)bn, &ip->i_db[0], 0),
- nsize, cred, &newb);
- if (error)
- return (error);
- bp = getblk(vp, bn, nsize, 0, 0);
- bp->b_blkno = fsbtodb(fs, newb);
- if (flags & B_CLRBUF)
- vfs_bio_clrbuf(bp);
- }
- ip->i_db[bn] = dbtofsb(fs, bp->b_blkno);
- ip->i_flag |= IN_CHANGE | IN_UPDATE;
- *bpp = bp;
- return (0);
- }
- /*
- * Determine the number of levels of indirection.
- */
- pref = 0;
- if ((error = ufs_getlbns(vp, bn, indirs, &num)) != 0)
- return(error);
-#if DIAGNOSTIC
- if (num < 1)
- panic ("ext2_balloc: ufs_bmaparray returned indirect block");
-#endif
- /*
- * Fetch the first indirect block allocating if necessary.
- */
- --num;
- nb = ip->i_ib[indirs[0].in_off];
- if (nb == 0) {
-#if 0
- pref = ext2_blkpref(ip, lbn, 0, (daddr_t *)0, 0);
-#else
- /* see the comment by ext2_blkpref. What we do here is
- to pretend that it'd be good for a block holding indirect
- pointers to be allocated near its predecessor in terms
- of indirection, or the last direct block.
- We shamelessly exploit the fact that i_ib immediately
- follows i_db.
- Godmar thinks it make sense to allocate i_ib[0] immediately
- after i_db[11], but it's not utterly clear whether this also
- applies to i_ib[1] and i_ib[0]
- */
-
- pref = ext2_blkpref(ip, lbn, indirs[0].in_off +
- EXT2_NDIR_BLOCKS, &ip->i_db[0], 0);
-#endif
- if ((error = ext2_alloc(ip, lbn, pref, (int)fs->s_blocksize,
- cred, &newb)) != 0)
- return (error);
- nb = newb;
- bp = getblk(vp, indirs[1].in_lbn, fs->s_blocksize, 0, 0);
- bp->b_blkno = fsbtodb(fs, newb);
- vfs_bio_clrbuf(bp);
- /*
- * Write synchronously so that indirect blocks
- * never point at garbage.
- */
- if ((error = bwrite(bp)) != 0) {
- ext2_blkfree(ip, nb, fs->s_blocksize);
- return (error);
- }
- ip->i_ib[indirs[0].in_off] = newb;
- ip->i_flag |= IN_CHANGE | IN_UPDATE;
- }
- /*
- * Fetch through the indirect blocks, allocating as necessary.
- */
- for (i = 1;;) {
- error = bread(vp,
- indirs[i].in_lbn, (int)fs->s_blocksize, NOCRED, &bp);
- if (error) {
- brelse(bp);
- return (error);
- }
- bap = (daddr_t *)bp->b_data;
- nb = bap[indirs[i].in_off];
- if (i == num)
- break;
- i += 1;
- if (nb != 0) {
- brelse(bp);
- continue;
- }
- if (pref == 0)
-#if 1
- /* see the comment above and by ext2_blkpref
- * I think this implements Linux policy, but
- * does it really make sense to allocate to
- * block containing pointers together ?
- * Also, will it ever succeed ?
- */
- pref = ext2_blkpref(ip, lbn, indirs[i].in_off, bap,
- bp->b_lblkno);
-#else
- pref = ext2_blkpref(ip, lbn, 0, (daddr_t *)0, 0);
-#endif
- if ((error =
- ext2_alloc(ip, lbn, pref, (int)fs->s_blocksize, cred, &newb)) != 0) {
- brelse(bp);
- return (error);
- }
- nb = newb;
- nbp = getblk(vp, indirs[i].in_lbn, fs->s_blocksize, 0, 0);
- nbp->b_blkno = fsbtodb(fs, nb);
- vfs_bio_clrbuf(nbp);
- /*
- * Write synchronously so that indirect blocks
- * never point at garbage.
- */
- if ((error = bwrite(nbp)) != 0) {
- ext2_blkfree(ip, nb, fs->s_blocksize);
- brelse(bp);
- return (error);
- }
- bap[indirs[i - 1].in_off] = nb;
- /*
- * If required, write synchronously, otherwise use
- * delayed write.
- */
- if (flags & B_SYNC) {
- bwrite(bp);
- } else {
- bdwrite(bp);
- }
- }
- /*
- * Get the data block, allocating if necessary.
- */
- if (nb == 0) {
- pref = ext2_blkpref(ip, lbn, indirs[i].in_off, &bap[0],
- bp->b_lblkno);
- if ((error = ext2_alloc(ip,
- lbn, pref, (int)fs->s_blocksize, cred, &newb)) != 0) {
- brelse(bp);
- return (error);
- }
- nb = newb;
- nbp = getblk(vp, lbn, fs->s_blocksize, 0, 0);
- nbp->b_blkno = fsbtodb(fs, nb);
- if (flags & B_CLRBUF)
- vfs_bio_clrbuf(nbp);
- bap[indirs[i].in_off] = nb;
- /*
- * If required, write synchronously, otherwise use
- * delayed write.
- */
- if (flags & B_SYNC) {
- bwrite(bp);
- } else {
- bdwrite(bp);
- }
- *bpp = nbp;
- return (0);
- }
- brelse(bp);
- if (flags & B_CLRBUF) {
- error = bread(vp, lbn, (int)fs->s_blocksize, NOCRED, &nbp);
- if (error) {
- brelse(nbp);
- return (error);
- }
- } else {
- nbp = getblk(vp, lbn, fs->s_blocksize, 0, 0);
- nbp->b_blkno = fsbtodb(fs, nb);
- }
- *bpp = nbp;
- return (0);
-}
diff --git a/sys/gnu/ext2fs/ext2_bmap.c b/sys/gnu/ext2fs/ext2_bmap.c
deleted file mode 100644
index 2f2a4dc..0000000
--- a/sys/gnu/ext2fs/ext2_bmap.c
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
- * Copyright (c) 1989, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ufs_bmap.c 8.7 (Berkeley) 3/21/95
- * $FreeBSD$
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/buf.h>
-#include <sys/proc.h>
-#include <sys/vnode.h>
-#include <sys/mount.h>
-#include <sys/resourcevar.h>
-#include <sys/conf.h>
-
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/inode.h>
-#include <ufs/ufs/ufsmount.h>
-#include <ufs/ufs/ufs_extern.h>
-
-/*
- * Bmap converts a the logical block number of a file to its physical block
- * number on the disk. The conversion is done by using the logical block
- * number to index into the array of block pointers described by the dinode.
- */
-int
-ufs_bmap(ap)
- struct vop_bmap_args /* {
- struct vnode *a_vp;
- ufs_daddr_t a_bn;
- struct vnode **a_vpp;
- ufs_daddr_t *a_bnp;
- int *a_runp;
- int *a_runb;
- } */ *ap;
-{
- /*
- * Check for underlying vnode requests and ensure that logical
- * to physical mapping is requested.
- */
- if (ap->a_vpp != NULL)
- *ap->a_vpp = VTOI(ap->a_vp)->i_devvp;
- if (ap->a_bnp == NULL)
- return (0);
-
- return (ufs_bmaparray(ap->a_vp, ap->a_bn, ap->a_bnp, NULL, NULL,
- ap->a_runp, ap->a_runb));
-}
-
-/*
- * Indirect blocks are now on the vnode for the file. They are given negative
- * logical block numbers. Indirect blocks are addressed by the negative
- * address of the first data block to which they point. Double indirect blocks
- * are addressed by one less than the address of the first indirect block to
- * which they point. Triple indirect blocks are addressed by one less than
- * the address of the first double indirect block to which they point.
- *
- * ufs_bmaparray does the bmap conversion, and if requested returns the
- * array of logical blocks which must be traversed to get to a block.
- * Each entry contains the offset into that block that gets you to the
- * next block and the disk address of the block (if it is assigned).
- */
-
-int
-ufs_bmaparray(vp, bn, bnp, ap, nump, runp, runb)
- struct vnode *vp;
- ufs_daddr_t bn;
- ufs_daddr_t *bnp;
- struct indir *ap;
- int *nump;
- int *runp;
- int *runb;
-{
- register struct inode *ip;
- struct buf *bp;
- struct ufsmount *ump;
- struct mount *mp;
- struct vnode *devvp;
- struct indir a[NIADDR+1], *xap;
- ufs_daddr_t daddr;
- long metalbn;
- int error, maxrun, num;
-
- ip = VTOI(vp);
- mp = vp->v_mount;
- ump = VFSTOUFS(mp);
- devvp = ump->um_devvp;
-#ifdef DIAGNOSTIC
- if ((ap != NULL && nump == NULL) || (ap == NULL && nump != NULL))
- panic("ufs_bmaparray: invalid arguments");
-#endif
-
- if (runp) {
- *runp = 0;
- }
-
- if (runb) {
- *runb = 0;
- }
-
- maxrun = mp->mnt_iosize_max / mp->mnt_stat.f_iosize - 1;
-
- xap = ap == NULL ? a : ap;
- if (!nump)
- nump = &num;
- error = ufs_getlbns(vp, bn, xap, nump);
- if (error)
- return (error);
-
- num = *nump;
- if (num == 0) {
- *bnp = blkptrtodb(ump, ip->i_db[bn]);
- if (*bnp == 0)
- *bnp = -1;
- else if (runp) {
- daddr_t bnb = bn;
- for (++bn; bn < NDADDR && *runp < maxrun &&
- is_sequential(ump, ip->i_db[bn - 1], ip->i_db[bn]);
- ++bn, ++*runp);
- bn = bnb;
- if (runb && (bn > 0)) {
- for (--bn; (bn >= 0) && (*runb < maxrun) &&
- is_sequential(ump, ip->i_db[bn],
- ip->i_db[bn+1]);
- --bn, ++*runb);
- }
- }
- return (0);
- }
-
-
- /* Get disk address out of indirect block array */
- daddr = ip->i_ib[xap->in_off];
-
- for (bp = NULL, ++xap; --num; ++xap) {
- /*
- * Exit the loop if there is no disk address assigned yet and
- * the indirect block isn't in the cache, or if we were
- * looking for an indirect block and we've found it.
- */
-
- metalbn = xap->in_lbn;
- if ((daddr == 0 && !incore(vp, metalbn)) || metalbn == bn)
- break;
- /*
- * If we get here, we've either got the block in the cache
- * or we have a disk address for it, go fetch it.
- */
- if (bp)
- bqrelse(bp);
-
- xap->in_exists = 1;
- bp = getblk(vp, metalbn, mp->mnt_stat.f_iosize, 0, 0);
- if ((bp->b_flags & B_CACHE) == 0) {
-#ifdef DIAGNOSTIC
- if (!daddr)
- panic("ufs_bmaparray: indirect block not in cache");
-#endif
- bp->b_blkno = blkptrtodb(ump, daddr);
- bp->b_iocmd = BIO_READ;
- bp->b_flags &= ~(B_INVAL|B_ERROR);
- vfs_busy_pages(bp, 0);
- BUF_STRATEGY(bp);
- curproc->p_stats->p_ru.ru_inblock++; /* XXX */
- error = biowait(bp);
- if (error) {
- brelse(bp);
- return (error);
- }
- }
-
- daddr = ((ufs_daddr_t *)bp->b_data)[xap->in_off];
- if (num == 1 && daddr && runp) {
- for (bn = xap->in_off + 1;
- bn < MNINDIR(ump) && *runp < maxrun &&
- is_sequential(ump,
- ((ufs_daddr_t *)bp->b_data)[bn - 1],
- ((ufs_daddr_t *)bp->b_data)[bn]);
- ++bn, ++*runp);
- bn = xap->in_off;
- if (runb && bn) {
- for(--bn; bn >= 0 && *runb < maxrun &&
- is_sequential(ump, ((daddr_t *)bp->b_data)[bn],
- ((daddr_t *)bp->b_data)[bn+1]);
- --bn, ++*runb);
- }
- }
- }
- if (bp)
- bqrelse(bp);
-
- daddr = blkptrtodb(ump, daddr);
- *bnp = daddr == 0 ? -1 : daddr;
- return (0);
-}
-
-/*
- * Create an array of logical block number/offset pairs which represent the
- * path of indirect blocks required to access a data block. The first "pair"
- * contains the logical block number of the appropriate single, double or
- * triple indirect block and the offset into the inode indirect block array.
- * Note, the logical block number of the inode single/double/triple indirect
- * block appears twice in the array, once with the offset into the i_ib and
- * once with the offset into the page itself.
- */
-int
-ufs_getlbns(vp, bn, ap, nump)
- struct vnode *vp;
- ufs_daddr_t bn;
- struct indir *ap;
- int *nump;
-{
- long blockcnt, metalbn, realbn;
- struct ufsmount *ump;
- int i, numlevels, off;
- int64_t qblockcnt;
-
- ump = VFSTOUFS(vp->v_mount);
- if (nump)
- *nump = 0;
- numlevels = 0;
- realbn = bn;
- if ((long)bn < 0)
- bn = -(long)bn;
-
- /* The first NDADDR blocks are direct blocks. */
- if (bn < NDADDR)
- return (0);
-
- /*
- * Determine the number of levels of indirection. After this loop
- * is done, blockcnt indicates the number of data blocks possible
- * at the previous level of indirection, and NIADDR - i is the number
- * of levels of indirection needed to locate the requested block.
- */
- for (blockcnt = 1, i = NIADDR, bn -= NDADDR;; i--, bn -= blockcnt) {
- if (i == 0)
- return (EFBIG);
- /*
- * Use int64_t's here to avoid overflow for triple indirect
- * blocks when longs have 32 bits and the block size is more
- * than 4K.
- */
- qblockcnt = (int64_t)blockcnt * MNINDIR(ump);
- if (bn < qblockcnt)
- break;
- blockcnt = qblockcnt;
- }
-
- /* Calculate the address of the first meta-block. */
- if (realbn >= 0)
- metalbn = -(realbn - bn + NIADDR - i);
- else
- metalbn = -(-realbn - bn + NIADDR - i);
-
- /*
- * At each iteration, off is the offset into the bap array which is
- * an array of disk addresses at the current level of indirection.
- * The logical block number and the offset in that block are stored
- * into the argument array.
- */
- ap->in_lbn = metalbn;
- ap->in_off = off = NIADDR - i;
- ap->in_exists = 0;
- ap++;
- for (++numlevels; i <= NIADDR; i++) {
- /* If searching for a meta-data block, quit when found. */
- if (metalbn == realbn)
- break;
-
- off = (bn / blockcnt) % MNINDIR(ump);
-
- ++numlevels;
- ap->in_lbn = metalbn;
- ap->in_off = off;
- ap->in_exists = 0;
- ++ap;
-
- metalbn -= -1 + off * blockcnt;
- blockcnt /= MNINDIR(ump);
- }
- if (nump)
- *nump = numlevels;
- return (0);
-}
diff --git a/sys/gnu/ext2fs/ext2_extern.h b/sys/gnu/ext2fs/ext2_extern.h
deleted file mode 100644
index 317f540..0000000
--- a/sys/gnu/ext2fs/ext2_extern.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * modified for EXT2FS support in Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- */
-/*-
- * Copyright (c) 1991, 1993, 1994
- * The Regents of the University of California. 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 product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ffs_extern.h 8.3 (Berkeley) 4/16/94
- */
-
-#ifndef _SYS_GNU_EXT2FS_EXT2_EXTERN_H_
-#define _SYS_GNU_EXT2FS_EXT2_EXTERN_H_
-
-struct dinode;
-struct ext2_inode;
-struct inode;
-struct mount;
-struct vfsconf;
-struct vnode;
-
-int ext2_alloc __P((struct inode *,
- daddr_t, daddr_t, int, struct ucred *, daddr_t *));
-int ext2_balloc __P((struct inode *,
- daddr_t, int, struct ucred *, struct buf **, int));
-int ext2_blkatoff __P((struct vnode *, off_t, char **, struct buf **));
-void ext2_blkfree __P((struct inode *, daddr_t, long));
-daddr_t ext2_blkpref __P((struct inode *, daddr_t, int, daddr_t *, daddr_t));
-int ext2_bmap __P((struct vop_bmap_args *));
-int ext2_init __P((struct vfsconf *));
-int ext2_reallocblks __P((struct vop_reallocblks_args *));
-int ext2_reclaim __P((struct vop_reclaim_args *));
-void ext2_setblock __P((struct ext2_sb_info *, u_char *, daddr_t));
-int ext2_truncate __P((struct vnode *, off_t, int, struct ucred *, struct proc *));
-int ext2_update __P((struct vnode *, int));
-int ext2_valloc __P((struct vnode *, int, struct ucred *, struct vnode **));
-int ext2_vfree __P((struct vnode *, ino_t, int));
-int ext2_lookup __P((struct vop_cachedlookup_args *));
-int ext2_readdir __P((struct vop_readdir_args *));
-void ext2_print_dinode __P((struct dinode *));
-void ext2_print_inode __P((struct inode *));
-int ext2_direnter __P((struct inode *,
- struct vnode *, struct componentname *));
-int ext2_dirremove __P((struct vnode *, struct componentname *));
-int ext2_dirrewrite __P((struct inode *,
- struct inode *, struct componentname *));
-int ext2_dirempty __P((struct inode *, ino_t, struct ucred *));
-int ext2_checkpath __P((struct inode *, struct inode *, struct ucred *));
-struct ext2_group_desc * get_group_desc __P((struct mount * ,
- unsigned int , struct buf ** ));
-void ext2_discard_prealloc __P((struct inode *));
-int ext2_inactive __P((struct vop_inactive_args *));
-int ext2_new_block __P ((struct mount * mp, unsigned long goal,
- u_int32_t * prealloc_count,
- u_int32_t * prealloc_block));
-ino_t ext2_new_inode __P ((const struct inode * dir, int mode));
-unsigned long ext2_count_free __P((struct buf *map, unsigned int numchars));
-void ext2_free_blocks __P((struct mount * mp, unsigned long block,
- unsigned long count));
-void ext2_free_inode __P((struct inode * inode));
-void ext2_ei2di __P((struct ext2_inode *ei, struct dinode *di));
-void ext2_di2ei __P((struct dinode *di, struct ext2_inode *ei));
-void mark_buffer_dirty __P((struct buf *bh));
-
-/*
- * This macro allows the ufs code to distinguish between an EXT2 and a
- * non-ext2(FFS/LFS) vnode.
- */
-#define IS_EXT2_VNODE(vp) (vp->v_mount->mnt_stat.f_type == MOUNT_EXT2FS)
-
-extern vop_t **ext2_vnodeop_p;
-extern vop_t **ext2_specop_p;
-extern vop_t **ext2_fifoop_p;
-
-#endif /* !_SYS_GNU_EXT2FS_EXT2_EXTERN_H_ */
diff --git a/sys/gnu/ext2fs/ext2_fs.h b/sys/gnu/ext2fs/ext2_fs.h
deleted file mode 100644
index 64aff0d..0000000
--- a/sys/gnu/ext2fs/ext2_fs.h
+++ /dev/null
@@ -1,572 +0,0 @@
-/*
- * modified for EXT2FS support in Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- *
- * $FreeBSD$
- */
-/*
- * linux/include/linux/ext2_fs.h
- *
- * Copyright (C) 1992, 1993, 1994, 1995
- * Remy Card (card@masi.ibp.fr)
- * Laboratoire MASI - Institut Blaise Pascal
- * Universite Pierre et Marie Curie (Paris VI)
- *
- * from
- *
- * linux/include/linux/minix_fs.h
- *
- * Copyright (C) 1991, 1992 Linus Torvalds
- */
-
-#ifndef _LINUX_EXT2_FS_H
-#define _LINUX_EXT2_FS_H
-
-#include <sys/types.h>
-
-#define __u32 u_int32_t
-#define u32 u_int32_t
-#define __u16 u_int16_t
-#define __u8 u_int8_t
-
-#define __s32 int32_t
-#define __s16 int16_t
-#define __s8 int8_t
-
-#define umode_t mode_t
-#define loff_t off_t
-
-/* the Linux implementation of EXT2 stores some information about
- * an inode in a ext2_inode_info structure which is part of the incore
- * inode in Linux
- * I decided to use the "spare" fields instead - we'll see how this
- * works out
- */
-
-#define i_block_group i_spare[0]
-#define i_next_alloc_block i_spare[1]
-#define i_next_alloc_goal i_spare[2]
-#define i_prealloc_block i_spare[3]
-#define i_prealloc_count i_din.di_spare[0]
-
-/*
- * The second extended filesystem constants/structures
- */
-
-/*
- * Define EXT2FS_DEBUG to produce debug messages
- */
-#undef EXT2FS_DEBUG
-
-/*
- * Define EXT2_PREALLOCATE to preallocate data blocks for expanding files
- */
-#define EXT2_PREALLOCATE
-#define EXT2_DEFAULT_PREALLOC_BLOCKS 8
-
-/*
- * The second extended file system version
- */
-#define EXT2FS_DATE "95/08/09"
-#define EXT2FS_VERSION "0.5b"
-
-/*
- * Debug code
- */
-#ifdef EXT2FS_DEBUG
-# define ext2_debug(f, a...) { \
- printf ("EXT2-fs DEBUG (%s, %d): %s:", \
- __FILE__, __LINE__, __FUNCTION__); \
- printf (f, ## a); \
- }
-#else
-# define ext2_debug(f, a...) /**/
-#endif
-
-/*
- * Special inodes numbers
- */
-#define EXT2_BAD_INO 1 /* Bad blocks inode */
-#define EXT2_ROOT_INO 2 /* Root inode */
-#define EXT2_ACL_IDX_INO 3 /* ACL inode */
-#define EXT2_ACL_DATA_INO 4 /* ACL inode */
-#define EXT2_BOOT_LOADER_INO 5 /* Boot loader inode */
-#define EXT2_UNDEL_DIR_INO 6 /* Undelete directory inode */
-
-/* First non-reserved inode for old ext2 filesystems */
-#define EXT2_GOOD_OLD_FIRST_INO 11
-
-/*
- * The second extended file system magic number
- */
-#define EXT2_SUPER_MAGIC 0xEF53
-
-/*
- * Maximal count of links to a file
- */
-#define EXT2_LINK_MAX 32000
-
-/*
- * Note: under FreeBSD, the "user" versions of the following macros are
- * used (and must be used) in most cases, because ((s)->u.ext2_sb.s_es is
- * not accessible. This depends on __KERNEL__ not being defined for
- * kernel builds under FreeBSD.
- */
-
-/*
- * Macro-instructions used to manage several block sizes
- */
-#define EXT2_MIN_BLOCK_SIZE 1024
-#define EXT2_MAX_BLOCK_SIZE 4096
-#define EXT2_MIN_BLOCK_LOG_SIZE 10
-#if defined(__KERNEL__) || (defined(__FreeBSD__) && defined(_KERNEL))
-# define EXT2_BLOCK_SIZE(s) ((s)->s_blocksize)
-#else
-# define EXT2_BLOCK_SIZE(s) (EXT2_MIN_BLOCK_SIZE << (s)->s_log_block_size)
-#endif
-#define EXT2_ACLE_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (struct ext2_acl_entry))
-#define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (__u32))
-#ifdef __KERNEL__
-# define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_blocksize_bits)
-#else
-# define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10)
-#endif
-#ifdef notyet
-#ifdef __KERNEL__
-#define EXT2_ADDR_PER_BLOCK_BITS(s) ((s)->u.ext2_sb.s_addr_per_block_bits)
-#define EXT2_INODE_SIZE(s) ((s)->u.ext2_sb.s_inode_size)
-#define EXT2_FIRST_INO(s) ((s)->u.ext2_sb.s_first_ino)
-#else
-#define EXT2_INODE_SIZE(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \
- EXT2_GOOD_OLD_INODE_SIZE : \
- (s)->s_inode_size)
-#define EXT2_FIRST_INO(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \
- EXT2_GOOD_OLD_FIRST_INO : \
- (s)->s_first_ino)
-#endif
-#else /* !notyet */
-#define EXT2_INODES_PER_BLOCK(s) ((s)->s_inodes_per_block)
-/* Should be sizeof(struct ext2_inode): */
-#define EXT2_INODE_SIZE 128
-#define EXT2_FIRST_INO 11
-#endif /* notyet */
-
-/*
- * Macro-instructions used to manage fragments
- */
-#define EXT2_MIN_FRAG_SIZE 1024
-#define EXT2_MAX_FRAG_SIZE 4096
-#define EXT2_MIN_FRAG_LOG_SIZE 10
-#ifdef __KERNEL__
-# define EXT2_FRAG_SIZE(s) ((s)->u.ext2_sb.s_frag_size)
-# define EXT2_FRAGS_PER_BLOCK(s) ((s)->u.ext2_sb.s_frags_per_block)
-#else
-# if defined(_KERNEL) && defined(__FreeBSD__)
-# define EXT2_FRAG_SIZE(s) ((s)->s_frag_size)
-# else
-# define EXT2_FRAG_SIZE(s) (EXT2_MIN_FRAG_SIZE << (s)->s_log_frag_size)
-# endif
-# define EXT2_FRAGS_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / EXT2_FRAG_SIZE(s))
-#endif
-
-/*
- * ACL structures
- */
-struct ext2_acl_header /* Header of Access Control Lists */
-{
- __u32 aclh_size;
- __u32 aclh_file_count;
- __u32 aclh_acle_count;
- __u32 aclh_first_acle;
-};
-
-struct ext2_acl_entry /* Access Control List Entry */
-{
- __u32 acle_size;
- __u16 acle_perms; /* Access permissions */
- __u16 acle_type; /* Type of entry */
- __u16 acle_tag; /* User or group identity */
- __u16 acle_pad1;
- __u32 acle_next; /* Pointer on next entry for the */
- /* same inode or on next free entry */
-};
-
-/*
- * Structure of a blocks group descriptor
- */
-struct ext2_group_desc
-{
- __u32 bg_block_bitmap; /* Blocks bitmap block */
- __u32 bg_inode_bitmap; /* Inodes bitmap block */
- __u32 bg_inode_table; /* Inodes table block */
- __u16 bg_free_blocks_count; /* Free blocks count */
- __u16 bg_free_inodes_count; /* Free inodes count */
- __u16 bg_used_dirs_count; /* Directories count */
- __u16 bg_pad;
- __u32 bg_reserved[3];
-};
-
-/*
- * Macro-instructions used to manage group descriptors
- */
-#ifdef __KERNEL__
-# define EXT2_BLOCKS_PER_GROUP(s) ((s)->u.ext2_sb.s_blocks_per_group)
-# define EXT2_DESC_PER_BLOCK(s) ((s)->u.ext2_sb.s_desc_per_block)
-# define EXT2_INODES_PER_GROUP(s) ((s)->u.ext2_sb.s_inodes_per_group)
-# define EXT2_DESC_PER_BLOCK_BITS(s) ((s)->u.ext2_sb.s_desc_per_block_bits)
-#else
-# define EXT2_BLOCKS_PER_GROUP(s) ((s)->s_blocks_per_group)
-# define EXT2_DESC_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (struct ext2_group_desc))
-# define EXT2_INODES_PER_GROUP(s) ((s)->s_inodes_per_group)
-#endif
-
-/*
- * Constants relative to the data blocks
- */
-#define EXT2_NDIR_BLOCKS 12
-#define EXT2_IND_BLOCK EXT2_NDIR_BLOCKS
-#define EXT2_DIND_BLOCK (EXT2_IND_BLOCK + 1)
-#define EXT2_TIND_BLOCK (EXT2_DIND_BLOCK + 1)
-#define EXT2_N_BLOCKS (EXT2_TIND_BLOCK + 1)
-#define EXT2_MAXSYMLINKLEN (EXT2_N_BLOCKS * sizeof (__u32))
-
-/*
- * Inode flags
- */
-#define EXT2_SECRM_FL 0x00000001 /* Secure deletion */
-#define EXT2_UNRM_FL 0x00000002 /* Undelete */
-#define EXT2_COMPR_FL 0x00000004 /* Compress file */
-#define EXT2_SYNC_FL 0x00000008 /* Synchronous updates */
-#define EXT2_IMMUTABLE_FL 0x00000010 /* Immutable file */
-#define EXT2_APPEND_FL 0x00000020 /* writes to file may only append */
-#define EXT2_NODUMP_FL 0x00000040 /* do not dump file */
-#define EXT2_NOATIME_FL 0x00000080 /* do not update atime */
-/* Reserved for compression usage... */
-#define EXT2_DIRTY_FL 0x00000100
-#define EXT2_COMPRBLK_FL 0x00000200 /* One or more compressed clusters */
-#define EXT2_NOCOMP_FL 0x00000400 /* Don't compress */
-#define EXT2_ECOMPR_FL 0x00000800 /* Compression error */
-/* End compression flags --- maybe not all used */
-#define EXT2_BTREE_FL 0x00001000 /* btree format dir */
-#define EXT2_RESERVED_FL 0x80000000 /* reserved for ext2 lib */
-
-#define EXT2_FL_USER_VISIBLE 0x00001FFF /* User visible flags */
-#define EXT2_FL_USER_MODIFIABLE 0x000000FF /* User modifiable flags */
-
-/*
- * ioctl commands
- */
-#define EXT2_IOC_GETFLAGS _IOR('f', 1, long)
-#define EXT2_IOC_SETFLAGS _IOW('f', 2, long)
-#define EXT2_IOC_GETVERSION _IOR('v', 1, long)
-#define EXT2_IOC_SETVERSION _IOW('v', 2, long)
-
-/*
- * Only declare `struct ext2_inode' if <ufs/ufs/inode.h> hasn't made things
- * difficult by #defining i_mode and other struct members. The details of
- * the struct are only needed in ext2_inode_cnv.c where the ext2fs on-disk
- * inode is converted to a ufs in-core inode.
- */
-#ifndef i_mode
-
-/*
- * Structure of an inode on the disk
- */
-struct ext2_inode {
- __u16 i_mode; /* File mode */
- __u16 i_uid; /* Owner Uid */
- __u32 i_size; /* Size in bytes */
- __u32 i_atime; /* Access time */
- __u32 i_ctime; /* Creation time */
- __u32 i_mtime; /* Modification time */
- __u32 i_dtime; /* Deletion Time */
- __u16 i_gid; /* Group Id */
- __u16 i_links_count; /* Links count */
- __u32 i_blocks; /* Blocks count */
- __u32 i_flags; /* File flags */
- union {
- struct {
- __u32 l_i_reserved1;
- } linux1;
- struct {
- __u32 h_i_translator;
- } hurd1;
- struct {
- __u32 m_i_reserved1;
- } masix1;
- } osd1; /* OS dependent 1 */
- __u32 i_block[EXT2_N_BLOCKS];/* Pointers to blocks */
- __u32 i_generation; /* File version (for NFS) */
- __u32 i_file_acl; /* File ACL */
- __u32 i_dir_acl; /* Directory ACL */
- __u32 i_faddr; /* Fragment address */
- union {
- struct {
- __u8 l_i_frag; /* Fragment number */
- __u8 l_i_fsize; /* Fragment size */
- __u16 i_pad1;
- __u32 l_i_reserved2[2];
- } linux2;
- struct {
- __u8 h_i_frag; /* Fragment number */
- __u8 h_i_fsize; /* Fragment size */
- __u16 h_i_mode_high;
- __u16 h_i_uid_high;
- __u16 h_i_gid_high;
- __u32 h_i_author;
- } hurd2;
- struct {
- __u8 m_i_frag; /* Fragment number */
- __u8 m_i_fsize; /* Fragment size */
- __u16 m_pad1;
- __u32 m_i_reserved2[2];
- } masix2;
- } osd2; /* OS dependent 2 */
-};
-
-#define i_size_high i_dir_acl
-
-#if defined(__KERNEL__) || defined(__linux__)
-#define i_reserved1 osd1.linux1.l_i_reserved1
-#define i_frag osd2.linux2.l_i_frag
-#define i_fsize osd2.linux2.l_i_fsize
-#define i_reserved2 osd2.linux2.l_i_reserved2
-#endif
-
-#ifdef __hurd__
-#define i_translator osd1.hurd1.h_i_translator
-#define i_frag osd2.hurd2.h_i_frag;
-#define i_fsize osd2.hurd2.h_i_fsize;
-#define i_uid_high osd2.hurd2.h_i_uid_high
-#define i_gid_high osd2.hurd2.h_i_gid_high
-#define i_author osd2.hurd2.h_i_author
-#endif
-
-#ifdef __masix__
-#define i_reserved1 osd1.masix1.m_i_reserved1
-#define i_frag osd2.masix2.m_i_frag
-#define i_fsize osd2.masix2.m_i_fsize
-#define i_reserved2 osd2.masix2.m_i_reserved2
-#endif
-
-#endif /* i_mode */
-
-/*
- * File system states
- */
-#define EXT2_VALID_FS 0x0001 /* Unmounted cleanly */
-#define EXT2_ERROR_FS 0x0002 /* Errors detected */
-
-/*
- * Mount flags
- */
-#define EXT2_MOUNT_CHECK_NORMAL 0x0001 /* Do some more checks */
-#define EXT2_MOUNT_CHECK_STRICT 0x0002 /* Do again more checks */
-#define EXT2_MOUNT_CHECK (EXT2_MOUNT_CHECK_NORMAL | \
- EXT2_MOUNT_CHECK_STRICT)
-#define EXT2_MOUNT_GRPID 0x0004 /* Create files with directory's group */
-#define EXT2_MOUNT_DEBUG 0x0008 /* Some debugging messages */
-#define EXT2_MOUNT_ERRORS_CONT 0x0010 /* Continue on errors */
-#define EXT2_MOUNT_ERRORS_RO 0x0020 /* Remount fs ro on errors */
-#define EXT2_MOUNT_ERRORS_PANIC 0x0040 /* Panic on errors */
-#define EXT2_MOUNT_MINIX_DF 0x0080 /* Mimics the Minix statfs */
-
-#define clear_opt(o, opt) o &= ~EXT2_MOUNT_##opt
-#define set_opt(o, opt) o |= EXT2_MOUNT_##opt
-#define test_opt(sb, opt) ((sb)->u.ext2_sb.s_mount_opt & \
- EXT2_MOUNT_##opt)
-/*
- * Maximal mount counts between two filesystem checks
- */
-#define EXT2_DFL_MAX_MNT_COUNT 20 /* Allow 20 mounts */
-#define EXT2_DFL_CHECKINTERVAL 0 /* Don't use interval check */
-
-/*
- * Behaviour when detecting errors
- */
-#define EXT2_ERRORS_CONTINUE 1 /* Continue execution */
-#define EXT2_ERRORS_RO 2 /* Remount fs read-only */
-#define EXT2_ERRORS_PANIC 3 /* Panic */
-#define EXT2_ERRORS_DEFAULT EXT2_ERRORS_CONTINUE
-
-/*
- * Structure of the super block
- */
-struct ext2_super_block {
- __u32 s_inodes_count; /* Inodes count */
- __u32 s_blocks_count; /* Blocks count */
- __u32 s_r_blocks_count; /* Reserved blocks count */
- __u32 s_free_blocks_count; /* Free blocks count */
- __u32 s_free_inodes_count; /* Free inodes count */
- __u32 s_first_data_block; /* First Data Block */
- __u32 s_log_block_size; /* Block size */
- __s32 s_log_frag_size; /* Fragment size */
- __u32 s_blocks_per_group; /* # Blocks per group */
- __u32 s_frags_per_group; /* # Fragments per group */
- __u32 s_inodes_per_group; /* # Inodes per group */
- __u32 s_mtime; /* Mount time */
- __u32 s_wtime; /* Write time */
- __u16 s_mnt_count; /* Mount count */
- __s16 s_max_mnt_count; /* Maximal mount count */
- __u16 s_magic; /* Magic signature */
- __u16 s_state; /* File system state */
- __u16 s_errors; /* Behaviour when detecting errors */
- __u16 s_minor_rev_level; /* minor revision level */
- __u32 s_lastcheck; /* time of last check */
- __u32 s_checkinterval; /* max. time between checks */
- __u32 s_creator_os; /* OS */
- __u32 s_rev_level; /* Revision level */
- __u16 s_def_resuid; /* Default uid for reserved blocks */
- __u16 s_def_resgid; /* Default gid for reserved blocks */
- /*
- * These fields are for EXT2_DYNAMIC_REV superblocks only.
- *
- * Note: the difference between the compatible feature set and
- * the incompatible feature set is that if there is a bit set
- * in the incompatible feature set that the kernel doesn't
- * know about, it should refuse to mount the filesystem.
- *
- * e2fsck's requirements are more strict; if it doesn't know
- * about a feature in either the compatible or incompatible
- * feature set, it must abort and not try to meddle with
- * things it doesn't understand...
- */
- __u32 s_first_ino; /* First non-reserved inode */
- __u16 s_inode_size; /* size of inode structure */
- __u16 s_block_group_nr; /* block group # of this superblock */
- __u32 s_feature_compat; /* compatible feature set */
- __u32 s_feature_incompat; /* incompatible feature set */
- __u32 s_feature_ro_compat; /* readonly-compatible feature set */
- __u8 s_uuid[16]; /* 128-bit uuid for volume */
- char s_volume_name[16]; /* volume name */
- char s_last_mounted[64]; /* directory where last mounted */
- __u32 s_algorithm_usage_bitmap; /* For compression */
- /*
- * Performance hints. Directory preallocation should only
- * happen if the EXT2_COMPAT_PREALLOC flag is on.
- */
- __u8 s_prealloc_blocks; /* Nr of blocks to try to preallocate*/
- __u8 s_prealloc_dir_blocks; /* Nr to preallocate for dirs */
- __u16 s_padding1;
- __u32 s_reserved[204]; /* Padding to the end of the block */
-};
-
-#ifdef __KERNEL__
-#define EXT2_SB(sb) (&((sb)->u.ext2_sb))
-#else
-/* Assume that user mode programs are passing in an ext2fs superblock, not
- * a kernel struct super_block. This will allow us to call the feature-test
- * macros from user land. */
-#define EXT2_SB(sb) (sb)
-#endif
-
-/*
- * Codes for operating systems
- */
-#define EXT2_OS_LINUX 0
-#define EXT2_OS_HURD 1
-#define EXT2_OS_MASIX 2
-#define EXT2_OS_FREEBSD 3
-#define EXT2_OS_LITES 4
-
-/*
- * Revision levels
- */
-#define EXT2_GOOD_OLD_REV 0 /* The good old (original) format */
-#define EXT2_DYNAMIC_REV 1 /* V2 format w/ dynamic inode sizes */
-
-#define EXT2_CURRENT_REV EXT2_GOOD_OLD_REV
-#define EXT2_MAX_SUPP_REV EXT2_DYNAMIC_REV
-
-#define EXT2_GOOD_OLD_INODE_SIZE 128
-
-/*
- * Feature set definitions
- */
-
-#define EXT2_HAS_COMPAT_FEATURE(sb,mask) \
- ( EXT2_SB(sb)->s_feature_compat & (mask) )
-#define EXT2_HAS_RO_COMPAT_FEATURE(sb,mask) \
- ( EXT2_SB(sb)->s_feature_ro_compat & (mask) )
-#define EXT2_HAS_INCOMPAT_FEATURE(sb,mask) \
- ( EXT2_SB(sb)->s_feature_incompat & (mask) )
-
-#define EXT2_FEATURE_COMPAT_DIR_PREALLOC 0x0001
-
-#define EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001
-#define EXT2_FEATURE_RO_COMPAT_LARGE_FILE 0x0002
-#define EXT2_FEATURE_RO_COMPAT_BTREE_DIR 0x0004
-
-#define EXT2_FEATURE_INCOMPAT_COMPRESSION 0x0001
-#define EXT2_FEATURE_INCOMPAT_FILETYPE 0x0002
-
-#define EXT2_FEATURE_COMPAT_SUPP 0
-#define EXT2_FEATURE_INCOMPAT_SUPP EXT2_FEATURE_INCOMPAT_FILETYPE
-#ifdef notyet
-#define EXT2_FEATURE_RO_COMPAT_SUPP (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| \
- EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \
- EXT2_FEATURE_RO_COMPAT_BTREE_DIR)
-#else
-#define EXT2_FEATURE_RO_COMPAT_SUPP 0
-#endif
-
-/*
- * Default values for user and/or group using reserved blocks
- */
-#define EXT2_DEF_RESUID 0
-#define EXT2_DEF_RESGID 0
-
-/*
- * Structure of a directory entry
- */
-#define EXT2_NAME_LEN 255
-
-struct ext2_dir_entry {
- __u32 inode; /* Inode number */
- __u16 rec_len; /* Directory entry length */
- __u16 name_len; /* Name length */
- char name[EXT2_NAME_LEN]; /* File name */
-};
-
-/*
- * The new version of the directory entry. Since EXT2 structures are
- * stored in intel byte order, and the name_len field could never be
- * bigger than 255 chars, it's safe to reclaim the extra byte for the
- * file_type field.
- */
-struct ext2_dir_entry_2 {
- __u32 inode; /* Inode number */
- __u16 rec_len; /* Directory entry length */
- __u8 name_len; /* Name length */
- __u8 file_type;
- char name[EXT2_NAME_LEN]; /* File name */
-};
-
-/*
- * Ext2 directory file types. Only the low 3 bits are used. The
- * other bits are reserved for now.
- */
-#define EXT2_FT_UNKNOWN 0
-#define EXT2_FT_REG_FILE 1
-#define EXT2_FT_DIR 2
-#define EXT2_FT_CHRDEV 3
-#define EXT2_FT_BLKDEV 4
-#define EXT2_FT_FIFO 5
-#define EXT2_FT_SOCK 6
-#define EXT2_FT_SYMLINK 7
-
-#define EXT2_FT_MAX 8
-
-/*
- * EXT2_DIR_PAD defines the directory entries boundaries
- *
- * NOTE: It must be a multiple of 4
- */
-#define EXT2_DIR_PAD 4
-#define EXT2_DIR_ROUND (EXT2_DIR_PAD - 1)
-#define EXT2_DIR_REC_LEN(name_len) (((name_len) + 8 + EXT2_DIR_ROUND) & \
- ~EXT2_DIR_ROUND)
-
-#endif /* _LINUX_EXT2_FS_H */
diff --git a/sys/gnu/ext2fs/ext2_fs_sb.h b/sys/gnu/ext2fs/ext2_fs_sb.h
deleted file mode 100644
index 85f71bf..0000000
--- a/sys/gnu/ext2fs/ext2_fs_sb.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * modified for EXT2FS support in Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- */
-/*
- * linux/include/linux/ext2_fs_sb.h
- *
- * Copyright (C) 1992, 1993, 1994, 1995
- * Remy Card (card@masi.ibp.fr)
- * Laboratoire MASI - Institut Blaise Pascal
- * Universite Pierre et Marie Curie (Paris VI)
- *
- * from
- *
- * linux/include/linux/minix_fs_sb.h
- *
- * Copyright (C) 1991, 1992 Linus Torvalds
- */
-
-#ifndef _LINUX_EXT2_FS_SB
-#define _LINUX_EXT2_FS_SB
-
-/*
- * The following is not needed anymore since the descriptors buffer
- * heads are now dynamically allocated
- */
-/* #define EXT2_MAX_GROUP_DESC 8 */
-
-#define EXT2_MAX_GROUP_LOADED 8
-
-#define buffer_head buf
-#define MAXMNTLEN 512
-
-/*
- * second extended-fs super-block data in memory
- */
-struct ext2_sb_info {
- unsigned long s_frag_size; /* Size of a fragment in bytes */
- unsigned long s_frags_per_block;/* Number of fragments per block */
- unsigned long s_inodes_per_block;/* Number of inodes per block */
- unsigned long s_frags_per_group;/* Number of fragments in a group */
- unsigned long s_blocks_per_group;/* Number of blocks in a group */
- unsigned long s_inodes_per_group;/* Number of inodes in a group */
- unsigned long s_itb_per_group; /* Number of inode table blocks per group */
- unsigned long s_db_per_group; /* Number of descriptor blocks per group */
- unsigned long s_desc_per_block; /* Number of group descriptors per block */
- unsigned long s_groups_count; /* Number of groups in the fs */
- struct buffer_head * s_sbh; /* Buffer containing the super block */
- struct ext2_super_block * s_es; /* Pointer to the super block in the buffer */
- struct buffer_head ** s_group_desc;
- unsigned short s_loaded_inode_bitmaps;
- unsigned short s_loaded_block_bitmaps;
- unsigned long s_inode_bitmap_number[EXT2_MAX_GROUP_LOADED];
- struct buffer_head * s_inode_bitmap[EXT2_MAX_GROUP_LOADED];
- unsigned long s_block_bitmap_number[EXT2_MAX_GROUP_LOADED];
- struct buffer_head * s_block_bitmap[EXT2_MAX_GROUP_LOADED];
- int s_rename_lock;
- unsigned long s_mount_opt;
- unsigned short s_resuid;
- unsigned short s_resgid;
- unsigned short s_mount_state;
- /*
- stuff that FFS keeps in its super block or that linux
- has in its non-ext2 specific super block and which is
- generally considered useful
- */
- unsigned long s_blocksize;
- unsigned long s_blocksize_bits;
- unsigned int s_bshift; /* = log2(s_blocksize) */
- quad_t s_qbmask; /* = s_blocksize - 1 */
- unsigned int s_fsbtodb; /* shift to get disk block */
- char s_rd_only; /* read-only */
- char s_dirt; /* fs modified flag */
- char s_wasvalid; /* valid at mount time */
-
- char fs_fsmnt[MAXMNTLEN]; /* name mounted on */
-};
-
-#endif /* _LINUX_EXT2_FS_SB */
diff --git a/sys/gnu/ext2fs/ext2_ihash.c b/sys/gnu/ext2fs/ext2_ihash.c
deleted file mode 100644
index 0a7c7d5..0000000
--- a/sys/gnu/ext2fs/ext2_ihash.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1989, 1991, 1993, 1995
- * The Regents of the University of California. 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 product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ufs_ihash.c 8.7 (Berkeley) 5/17/95
- * $FreeBSD$
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/lock.h>
-#include <sys/vnode.h>
-#include <sys/malloc.h>
-#include <sys/proc.h>
-
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/inode.h>
-#include <ufs/ufs/ufs_extern.h>
-
-static MALLOC_DEFINE(M_UFSIHASH, "UFS ihash", "UFS Inode hash tables");
-/*
- * Structures associated with inode cacheing.
- */
-static LIST_HEAD(ihashhead, inode) *ihashtbl;
-static u_long ihash; /* size of hash table - 1 */
-#define INOHASH(device, inum) (&ihashtbl[(minor(device) + (inum)) & ihash])
-#ifndef NULL_SIMPLELOCKS
-static struct simplelock ufs_ihash_slock;
-#endif
-
-/*
- * Initialize inode hash table.
- */
-void
-ufs_ihashinit()
-{
-
- ihashtbl = hashinit(desiredvnodes, M_UFSIHASH, &ihash);
- simple_lock_init(&ufs_ihash_slock);
-}
-
-/*
- * Use the device/inum pair to find the incore inode, and return a pointer
- * to it. If it is in core, return it, even if it is locked.
- */
-struct vnode *
-ufs_ihashlookup(dev, inum)
- dev_t dev;
- ino_t inum;
-{
- struct inode *ip;
-
- simple_lock(&ufs_ihash_slock);
- for (ip = INOHASH(dev, inum)->lh_first; ip; ip = ip->i_hash.le_next)
- if (inum == ip->i_number && dev == ip->i_dev)
- break;
- simple_unlock(&ufs_ihash_slock);
-
- if (ip)
- return (ITOV(ip));
- return (NULLVP);
-}
-
-/*
- * Use the device/inum pair to find the incore inode, and return a pointer
- * to it. If it is in core, but locked, wait for it.
- */
-struct vnode *
-ufs_ihashget(dev, inum)
- dev_t dev;
- ino_t inum;
-{
- struct proc *p = curproc; /* XXX */
- struct inode *ip;
- struct vnode *vp;
-
-loop:
- simple_lock(&ufs_ihash_slock);
- for (ip = INOHASH(dev, inum)->lh_first; ip; ip = ip->i_hash.le_next) {
- if (inum == ip->i_number && dev == ip->i_dev) {
- vp = ITOV(ip);
- simple_lock(&vp->v_interlock);
- simple_unlock(&ufs_ihash_slock);
- if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, p))
- goto loop;
- return (vp);
- }
- }
- simple_unlock(&ufs_ihash_slock);
- return (NULL);
-}
-
-/*
- * Insert the inode into the hash table, and return it locked.
- */
-void
-ufs_ihashins(ip)
- struct inode *ip;
-{
- struct proc *p = curproc; /* XXX */
- struct ihashhead *ipp;
-
- /* lock the inode, then put it on the appropriate hash list */
- lockmgr(&ip->i_lock, LK_EXCLUSIVE, (struct simplelock *)0, p);
-
- simple_lock(&ufs_ihash_slock);
- ipp = INOHASH(ip->i_dev, ip->i_number);
- LIST_INSERT_HEAD(ipp, ip, i_hash);
- ip->i_flag |= IN_HASHED;
- simple_unlock(&ufs_ihash_slock);
-}
-
-/*
- * Remove the inode from the hash table.
- */
-void
-ufs_ihashrem(ip)
- struct inode *ip;
-{
- simple_lock(&ufs_ihash_slock);
- if (ip->i_flag & IN_HASHED) {
- ip->i_flag &= ~IN_HASHED;
- LIST_REMOVE(ip, i_hash);
-#ifdef DIAGNOSTIC
- ip->i_hash.le_next = NULL;
- ip->i_hash.le_prev = NULL;
-#endif
- }
- simple_unlock(&ufs_ihash_slock);
-}
diff --git a/sys/gnu/ext2fs/ext2_inode.c b/sys/gnu/ext2fs/ext2_inode.c
deleted file mode 100644
index 22847f5..0000000
--- a/sys/gnu/ext2fs/ext2_inode.c
+++ /dev/null
@@ -1,495 +0,0 @@
-/*
- * modified for Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- */
-/*
- * Copyright (c) 1982, 1986, 1989, 1993
- * The Regents of the University of California. 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 product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ext2_inode.c 8.5 (Berkeley) 12/30/93
- *
- * $FreeBSD$
- */
-
-#include "opt_quota.h"
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/mount.h>
-#include <sys/buf.h>
-#include <sys/vnode.h>
-#include <sys/malloc.h>
-
-#include <vm/vm.h>
-#include <vm/vm_extern.h>
-
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/inode.h>
-#include <ufs/ufs/ufsmount.h>
-#include <ufs/ufs/ufs_extern.h>
-
-#include <gnu/ext2fs/ext2_fs.h>
-#include <gnu/ext2fs/ext2_fs_sb.h>
-#include <gnu/ext2fs/fs.h>
-#include <gnu/ext2fs/ext2_extern.h>
-
-static int ext2_indirtrunc __P((struct inode *, daddr_t, daddr_t, daddr_t, int,
- long *));
-
-int
-ext2_init(struct vfsconf *vfsp)
-{
- return (ufs_init(vfsp));
-}
-
-/*
- * Update the access, modified, and inode change times as specified by the
- * IN_ACCESS, IN_UPDATE, and IN_CHANGE flags respectively. Write the inode
- * to disk if the IN_MODIFIED flag is set (it may be set initially, or by
- * the timestamp update). The IN_LAZYMOD flag is set to force a write
- * later if not now. If we write now, then clear both IN_MODIFIED and
- * IN_LAZYMOD to reflect the presumably successful write, and if waitfor is
- * set, then wait for the write to complete.
- */
-int
-ext2_update(vp, waitfor)
- struct vnode *vp;
- int waitfor;
-{
- register struct ext2_sb_info *fs;
- struct buf *bp;
- struct inode *ip;
- int error;
-
- ufs_itimes(vp);
- ip = VTOI(vp);
- if ((ip->i_flag & IN_MODIFIED) == 0)
- return (0);
- ip->i_flag &= ~(IN_LAZYMOD | IN_MODIFIED);
- if (vp->v_mount->mnt_flag & MNT_RDONLY)
- return (0);
- fs = ip->i_e2fs;
- if ((error = bread(ip->i_devvp,
- fsbtodb(fs, ino_to_fsba(fs, ip->i_number)),
- (int)fs->s_blocksize, NOCRED, &bp)) != 0) {
- brelse(bp);
- return (error);
- }
- ext2_di2ei( &ip->i_din, (struct ext2_inode *) ((char *)bp->b_data + EXT2_INODE_SIZE *
- ino_to_fsbo(fs, ip->i_number)));
-/*
- if (waitfor && (vp->v_mount->mnt_flag & MNT_ASYNC) == 0)
- return (bwrite(bp));
- else {
-*/
- bdwrite(bp);
- return (0);
-/*
- }
-*/
-}
-
-#define SINGLE 0 /* index of single indirect block */
-#define DOUBLE 1 /* index of double indirect block */
-#define TRIPLE 2 /* index of triple indirect block */
-/*
- * Truncate the inode oip to at most length size, freeing the
- * disk blocks.
- */
-int
-ext2_truncate(vp, length, flags, cred, p)
- struct vnode *vp;
- off_t length;
- int flags;
- struct ucred *cred;
- struct proc *p;
-{
- register struct vnode *ovp = vp;
- register daddr_t lastblock;
- register struct inode *oip;
- daddr_t bn, lbn, lastiblock[NIADDR], indir_lbn[NIADDR];
- daddr_t oldblks[NDADDR + NIADDR], newblks[NDADDR + NIADDR];
- register struct ext2_sb_info *fs;
- struct buf *bp;
- int offset, size, level;
- long count, nblocks, blocksreleased = 0;
- register int i;
- int aflags, error, allerror;
- off_t osize;
-/*
-printf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length);
-*/ /*
- * negative file sizes will totally break the code below and
- * are not meaningful anyways.
- */
- if (length < 0)
- return EFBIG;
-
- oip = VTOI(ovp);
- if (ovp->v_type == VLNK &&
- oip->i_size < ovp->v_mount->mnt_maxsymlinklen) {
-#if DIAGNOSTIC
- if (length != 0)
- panic("ext2_truncate: partial truncate of symlink");
-#endif
- bzero((char *)&oip->i_shortlink, (u_int)oip->i_size);
- oip->i_size = 0;
- oip->i_flag |= IN_CHANGE | IN_UPDATE;
- return (UFS_UPDATE(ovp, 1));
- }
- if (oip->i_size == length) {
- oip->i_flag |= IN_CHANGE | IN_UPDATE;
- return (UFS_UPDATE(ovp, 0));
- }
-#if QUOTA
- if ((error = getinoquota(oip)) != 0)
- return (error);
-#endif
- fs = oip->i_e2fs;
- osize = oip->i_size;
- ext2_discard_prealloc(oip);
- /*
- * Lengthen the size of the file. We must ensure that the
- * last byte of the file is allocated. Since the smallest
- * value of oszie is 0, length will be at least 1.
- */
- if (osize < length) {
- offset = blkoff(fs, length - 1);
- lbn = lblkno(fs, length - 1);
- aflags = B_CLRBUF;
- if (flags & IO_SYNC)
- aflags |= B_SYNC;
- vnode_pager_setsize(ovp, length);
- if ((error = ext2_balloc(oip, lbn, offset + 1, cred, &bp,
- aflags)) != 0)
- return (error);
- oip->i_size = length;
- if (aflags & IO_SYNC)
- bwrite(bp);
- else
- bawrite(bp);
- oip->i_flag |= IN_CHANGE | IN_UPDATE;
- return (UFS_UPDATE(ovp, 1));
- }
- /*
- * Shorten the size of the file. If the file is not being
- * truncated to a block boundry, the contents of the
- * partial block following the end of the file must be
- * zero'ed in case it ever become accessable again because
- * of subsequent file growth.
- */
- /* I don't understand the comment above */
- offset = blkoff(fs, length);
- if (offset == 0) {
- oip->i_size = length;
- } else {
- lbn = lblkno(fs, length);
- aflags = B_CLRBUF;
- if (flags & IO_SYNC)
- aflags |= B_SYNC;
- if ((error = ext2_balloc(oip, lbn, offset, cred, &bp,
- aflags)) != 0)
- return (error);
- oip->i_size = length;
- size = blksize(fs, oip, lbn);
- bzero((char *)bp->b_data + offset, (u_int)(size - offset));
- allocbuf(bp, size);
- if (aflags & IO_SYNC)
- bwrite(bp);
- else
- bawrite(bp);
- }
- /*
- * Calculate index into inode's block list of
- * last direct and indirect blocks (if any)
- * which we want to keep. Lastblock is -1 when
- * the file is truncated to 0.
- */
- lastblock = lblkno(fs, length + fs->s_blocksize - 1) - 1;
- lastiblock[SINGLE] = lastblock - NDADDR;
- lastiblock[DOUBLE] = lastiblock[SINGLE] - NINDIR(fs);
- lastiblock[TRIPLE] = lastiblock[DOUBLE] - NINDIR(fs) * NINDIR(fs);
- nblocks = btodb(fs->s_blocksize);
- /*
- * Update file and block pointers on disk before we start freeing
- * blocks. If we crash before free'ing blocks below, the blocks
- * will be returned to the free list. lastiblock values are also
- * normalized to -1 for calls to ext2_indirtrunc below.
- */
- bcopy((caddr_t)&oip->i_db[0], (caddr_t)oldblks, sizeof oldblks);
- for (level = TRIPLE; level >= SINGLE; level--)
- if (lastiblock[level] < 0) {
- oip->i_ib[level] = 0;
- lastiblock[level] = -1;
- }
- for (i = NDADDR - 1; i > lastblock; i--)
- oip->i_db[i] = 0;
- oip->i_flag |= IN_CHANGE | IN_UPDATE;
- allerror = UFS_UPDATE(ovp, 1);
-
- /*
- * Having written the new inode to disk, save its new configuration
- * and put back the old block pointers long enough to process them.
- * Note that we save the new block configuration so we can check it
- * when we are done.
- */
- bcopy((caddr_t)&oip->i_db[0], (caddr_t)newblks, sizeof newblks);
- bcopy((caddr_t)oldblks, (caddr_t)&oip->i_db[0], sizeof oldblks);
- oip->i_size = osize;
- error = vtruncbuf(ovp, cred, p, length, (int)fs->s_blocksize);
- if (error && (allerror == 0))
- allerror = error;
-
- /*
- * Indirect blocks first.
- */
- indir_lbn[SINGLE] = -NDADDR;
- indir_lbn[DOUBLE] = indir_lbn[SINGLE] - NINDIR(fs) - 1;
- indir_lbn[TRIPLE] = indir_lbn[DOUBLE] - NINDIR(fs) * NINDIR(fs) - 1;
- for (level = TRIPLE; level >= SINGLE; level--) {
- bn = oip->i_ib[level];
- if (bn != 0) {
- error = ext2_indirtrunc(oip, indir_lbn[level],
- fsbtodb(fs, bn), lastiblock[level], level, &count);
- if (error)
- allerror = error;
- blocksreleased += count;
- if (lastiblock[level] < 0) {
- oip->i_ib[level] = 0;
- ext2_blkfree(oip, bn, fs->s_frag_size);
- blocksreleased += nblocks;
- }
- }
- if (lastiblock[level] >= 0)
- goto done;
- }
-
- /*
- * All whole direct blocks or frags.
- */
- for (i = NDADDR - 1; i > lastblock; i--) {
- register long bsize;
-
- bn = oip->i_db[i];
- if (bn == 0)
- continue;
- oip->i_db[i] = 0;
- bsize = blksize(fs, oip, i);
- ext2_blkfree(oip, bn, bsize);
- blocksreleased += btodb(bsize);
- }
- if (lastblock < 0)
- goto done;
-
- /*
- * Finally, look for a change in size of the
- * last direct block; release any frags.
- */
- bn = oip->i_db[lastblock];
- if (bn != 0) {
- long oldspace, newspace;
-
- /*
- * Calculate amount of space we're giving
- * back as old block size minus new block size.
- */
- oldspace = blksize(fs, oip, lastblock);
- oip->i_size = length;
- newspace = blksize(fs, oip, lastblock);
- if (newspace == 0)
- panic("itrunc: newspace");
- if (oldspace - newspace > 0) {
- /*
- * Block number of space to be free'd is
- * the old block # plus the number of frags
- * required for the storage we're keeping.
- */
- bn += numfrags(fs, newspace);
- ext2_blkfree(oip, bn, oldspace - newspace);
- blocksreleased += btodb(oldspace - newspace);
- }
- }
-done:
-#if DIAGNOSTIC
- for (level = SINGLE; level <= TRIPLE; level++)
- if (newblks[NDADDR + level] != oip->i_ib[level])
- panic("itrunc1");
- for (i = 0; i < NDADDR; i++)
- if (newblks[i] != oip->i_db[i])
- panic("itrunc2");
- if (length == 0 && (!TAILQ_EMPTY(&ovp->v_dirtyblkhd) ||
- !TAILQ_EMPTY(&ovp->v_cleanblkhd)))
- panic("itrunc3");
-#endif /* DIAGNOSTIC */
- /*
- * Put back the real size.
- */
- oip->i_size = length;
- oip->i_blocks -= blocksreleased;
- if (oip->i_blocks < 0) /* sanity */
- oip->i_blocks = 0;
- oip->i_flag |= IN_CHANGE;
- vnode_pager_setsize(ovp, length);
-#if QUOTA
- (void) chkdq(oip, -blocksreleased, NOCRED, 0);
-#endif
- return (allerror);
-}
-
-/*
- * Release blocks associated with the inode ip and stored in the indirect
- * block bn. Blocks are free'd in LIFO order up to (but not including)
- * lastbn. If level is greater than SINGLE, the block is an indirect block
- * and recursive calls to indirtrunc must be used to cleanse other indirect
- * blocks.
- *
- * NB: triple indirect blocks are untested.
- */
-
-static int
-ext2_indirtrunc(ip, lbn, dbn, lastbn, level, countp)
- register struct inode *ip;
- daddr_t lbn, lastbn;
- daddr_t dbn;
- int level;
- long *countp;
-{
- register int i;
- struct buf *bp;
- register struct ext2_sb_info *fs = ip->i_e2fs;
- register daddr_t *bap;
- struct vnode *vp;
- daddr_t *copy, nb, nlbn, last;
- long blkcount, factor;
- int nblocks, blocksreleased = 0;
- int error = 0, allerror = 0;
-
- /*
- * Calculate index in current block of last
- * block to be kept. -1 indicates the entire
- * block so we need not calculate the index.
- */
- factor = 1;
- for (i = SINGLE; i < level; i++)
- factor *= NINDIR(fs);
- last = lastbn;
- if (lastbn > 0)
- last /= factor;
- nblocks = btodb(fs->s_blocksize);
- /*
- * Get buffer of block pointers, zero those entries corresponding
- * to blocks to be free'd, and update on disk copy first. Since
- * double(triple) indirect before single(double) indirect, calls
- * to bmap on these blocks will fail. However, we already have
- * the on disk address, so we have to set the b_blkno field
- * explicitly instead of letting bread do everything for us.
- */
- vp = ITOV(ip);
- bp = getblk(vp, lbn, (int)fs->s_blocksize, 0, 0);
- if (bp->b_flags & (B_DONE | B_DELWRI)) {
- } else {
- bp->b_iocmd = BIO_READ;
- if (bp->b_bcount > bp->b_bufsize)
- panic("ext2_indirtrunc: bad buffer size");
- bp->b_blkno = dbn;
- vfs_busy_pages(bp, 0);
- VOP_STRATEGY(vp, bp);
- error = biowait(bp);
- }
- if (error) {
- brelse(bp);
- *countp = 0;
- return (error);
- }
-
- bap = (daddr_t *)bp->b_data;
- MALLOC(copy, daddr_t *, fs->s_blocksize, M_TEMP, M_WAITOK);
- bcopy((caddr_t)bap, (caddr_t)copy, (u_int)fs->s_blocksize);
- bzero((caddr_t)&bap[last + 1],
- (u_int)(NINDIR(fs) - (last + 1)) * sizeof (daddr_t));
- if (last == -1)
- bp->b_flags |= B_INVAL;
- error = bwrite(bp);
- if (error)
- allerror = error;
- bap = copy;
-
- /*
- * Recursively free totally unused blocks.
- */
- for (i = NINDIR(fs) - 1, nlbn = lbn + 1 - i * factor; i > last;
- i--, nlbn += factor) {
- nb = bap[i];
- if (nb == 0)
- continue;
- if (level > SINGLE) {
- if ((error = ext2_indirtrunc(ip, nlbn,
- fsbtodb(fs, nb), (daddr_t)-1, level - 1, &blkcount)) != 0)
- allerror = error;
- blocksreleased += blkcount;
- }
- ext2_blkfree(ip, nb, fs->s_blocksize);
- blocksreleased += nblocks;
- }
-
- /*
- * Recursively free last partial block.
- */
- if (level > SINGLE && lastbn >= 0) {
- last = lastbn % factor;
- nb = bap[i];
- if (nb != 0) {
- if ((error = ext2_indirtrunc(ip, nlbn, fsbtodb(fs, nb),
- last, level - 1, &blkcount)) != 0)
- allerror = error;
- blocksreleased += blkcount;
- }
- }
- FREE(copy, M_TEMP);
- *countp = blocksreleased;
- return (allerror);
-}
-
-/*
- * discard preallocated blocks
- */
-int
-ext2_inactive(ap)
- struct vop_inactive_args /* {
- struct vnode *a_vp;
- } */ *ap;
-{
- ext2_discard_prealloc(VTOI(ap->a_vp));
- return ufs_inactive(ap);
-}
-
diff --git a/sys/gnu/ext2fs/ext2_inode_cnv.c b/sys/gnu/ext2fs/ext2_inode_cnv.c
deleted file mode 100644
index 3e8e0ff..0000000
--- a/sys/gnu/ext2fs/ext2_inode_cnv.c
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Copyright (c) 1995 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Utah $Hdr$
- * $FreeBSD$
- */
-
-/*
- * routines to convert on disk ext2 inodes in dinodes and back
- */
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/lock.h>
-#include <sys/stat.h>
-#include <sys/vnode.h>
-
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/inode.h>
-
-/*
- * Undo the definitions in <ufs/ufs/inode.h> that would destroy the include
- * of <gnu/ext2fs/ext2_fs.h>.
- */
-#undef i_atime
-#undef i_blocks
-#undef i_ctime
-#undef i_db
-#undef i_flags
-#undef i_gen
-#undef i_gid
-#undef i_ib
-#undef i_mode
-#undef i_mtime
-#undef i_nlink
-#undef i_rdev
-#undef i_shortlink
-#undef i_size
-#undef i_uid
-
-#include <gnu/ext2fs/ext2_fs.h>
-#include <gnu/ext2fs/ext2_extern.h>
-
-void
-ext2_print_dinode( di )
- struct dinode *di;
-{
- int i;
- printf( /* "Inode: %5d" */
- " Type: %10s Mode: 0x%o Flags: 0x%x Version: %d\n",
- "n/a", di->di_mode, di->di_flags, di->di_gen);
- printf( "User: %5lu Group: %5lu Size: %lu\n",
- (unsigned long)di->di_uid, (unsigned long)di->di_gid,
- (unsigned long)di->di_size);
- printf( "Links: %3d Blockcount: %d\n",
- di->di_nlink, di->di_blocks);
- printf( "ctime: 0x%x", di->di_ctime);
- printf( "atime: 0x%x", di->di_atime);
- printf( "mtime: 0x%x", di->di_mtime);
- printf( "BLOCKS: ");
- for(i=0; i < (di->di_blocks <= 24 ? ((di->di_blocks+1)/2): 12); i++)
- printf("%d ", di->di_db[i]);
- printf("\n");
-}
-
-void
-ext2_print_inode( in )
- struct inode *in;
-{
- printf( "Inode: %5d", in->i_number);
- ext2_print_dinode(&in->i_din);
-}
-
-/*
- * raw ext2 inode to dinode
- */
-void
-ext2_ei2di(ei, di)
- struct ext2_inode *ei;
- struct dinode *di;
-{
- int i;
-
- di->di_nlink = ei->i_links_count;
- /* Godmar thinks - if the link count is zero, then the inode is
- unused - according to ext2 standards. Ufs marks this fact
- by setting i_mode to zero - why ?
- I can see that this might lead to problems in an undelete.
- */
- di->di_mode = ei->i_links_count ? ei->i_mode : 0;
- di->di_size = ei->i_size;
- di->di_atime = ei->i_atime;
- di->di_mtime = ei->i_mtime;
- di->di_ctime = ei->i_ctime;
- di->di_flags = 0;
- di->di_flags |= (ei->i_flags & EXT2_APPEND_FL) ? APPEND : 0;
- di->di_flags |= (ei->i_flags & EXT2_IMMUTABLE_FL) ? IMMUTABLE : 0;
- di->di_blocks = ei->i_blocks;
- di->di_gen = ei->i_generation;
- di->di_uid = ei->i_uid;
- di->di_gid = ei->i_gid;
- /* XXX use memcpy */
- for(i = 0; i < NDADDR; i++)
- di->di_db[i] = ei->i_block[i];
- for(i = 0; i < NIADDR; i++)
- di->di_ib[i] = ei->i_block[EXT2_NDIR_BLOCKS + i];
-}
-
-/*
- * dinode to raw ext2 inode
- */
-void
-ext2_di2ei(di, ei)
- struct dinode *di;
- struct ext2_inode *ei;
-{
- int i;
-
- ei->i_mode = di->di_mode;
- ei->i_links_count = di->di_nlink;
- /*
- Godmar thinks: if dtime is nonzero, ext2 says this inode
- has been deleted, this would correspond to a zero link count
- */
- ei->i_dtime = ei->i_links_count ? 0 : di->di_mtime;
- ei->i_size = di->di_size;
- ei->i_atime = di->di_atime;
- ei->i_mtime = di->di_mtime;
- ei->i_ctime = di->di_ctime;
- ei->i_flags = di->di_flags;
- ei->i_flags = 0;
- ei->i_flags |= (di->di_flags & APPEND) ? EXT2_APPEND_FL: 0;
- ei->i_flags |= (di->di_flags & IMMUTABLE)
- ? EXT2_IMMUTABLE_FL: 0;
- ei->i_blocks = di->di_blocks;
- ei->i_generation = di->di_gen;
- ei->i_uid = di->di_uid;
- ei->i_gid = di->di_gid;
- /* XXX use memcpy */
- for(i = 0; i < NDADDR; i++)
- ei->i_block[i] = di->di_db[i];
- for(i = 0; i < NIADDR; i++)
- ei->i_block[EXT2_NDIR_BLOCKS + i] = di->di_ib[i];
-}
diff --git a/sys/gnu/ext2fs/ext2_linux_balloc.c b/sys/gnu/ext2fs/ext2_linux_balloc.c
deleted file mode 100644
index 5e90fee..0000000
--- a/sys/gnu/ext2fs/ext2_linux_balloc.c
+++ /dev/null
@@ -1,582 +0,0 @@
-/*
- * modified for Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- */
-/*
- * linux/fs/ext2/balloc.c
- *
- * Copyright (C) 1992, 1993, 1994, 1995
- * Remy Card (card@masi.ibp.fr)
- * Laboratoire MASI - Institut Blaise Pascal
- * Universite Pierre et Marie Curie (Paris VI)
- *
- * Enhanced block allocation by Stephen Tweedie (sct@dcs.ed.ac.uk), 1993
- */
-
-/*
- * The free blocks are managed by bitmaps. A file system contains several
- * blocks groups. Each group contains 1 bitmap block for blocks, 1 bitmap
- * block for inodes, N blocks for the inode table and data blocks.
- *
- * The file system contains group descriptors which are located after the
- * super block. Each descriptor contains the number of the bitmap block and
- * the free blocks count in the block. The descriptors are loaded in memory
- * when a file system is mounted (see ext2_read_super).
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/buf.h>
-#include <sys/proc.h>
-#include <sys/mount.h>
-#include <sys/vnode.h>
-
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/ufsmount.h>
-#include <gnu/ext2fs/ext2_extern.h>
-#include <gnu/ext2fs/ext2_fs.h>
-#include <gnu/ext2fs/ext2_fs_sb.h>
-#include <gnu/ext2fs/fs.h>
-
-#ifdef __i386__
-#include <gnu/ext2fs/i386-bitops.h>
-#else
-#error Provide an bitops.h file, please !
-#endif
-
-#define in_range(b, first, len) ((b) >= (first) && (b) <= (first) + (len) - 1)
-
-/* got rid of get_group_desc since it can already be found in
- * ext2_linux_ialloc.c
- */
-
-static void read_block_bitmap (struct mount * mp,
- unsigned int block_group,
- unsigned long bitmap_nr)
-{
- struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs;
- struct ext2_group_desc * gdp;
- struct buffer_head * bh;
- int error;
-
- gdp = get_group_desc (mp, block_group, NULL);
- if ((error = bread (VFSTOUFS(mp)->um_devvp,
- fsbtodb(sb, gdp->bg_block_bitmap),sb->s_blocksize, NOCRED, &bh)) != 0)
- panic ( "read_block_bitmap: "
- "Cannot read block bitmap - "
- "block_group = %d, block_bitmap = %lu",
- block_group, (unsigned long) gdp->bg_block_bitmap);
- sb->s_block_bitmap_number[bitmap_nr] = block_group;
- sb->s_block_bitmap[bitmap_nr] = bh;
- LCK_BUF(bh)
-}
-
-/*
- * load_block_bitmap loads the block bitmap for a blocks group
- *
- * It maintains a cache for the last bitmaps loaded. This cache is managed
- * with a LRU algorithm.
- *
- * Notes:
- * 1/ There is one cache per mounted file system.
- * 2/ If the file system contains less than EXT2_MAX_GROUP_LOADED groups,
- * this function reads the bitmap without maintaining a LRU cache.
- */
-static int load__block_bitmap (struct mount * mp,
- unsigned int block_group)
-{
- int i, j;
- struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs;
- unsigned long block_bitmap_number;
- struct buffer_head * block_bitmap;
-
- if (block_group >= sb->s_groups_count)
- panic ( "load_block_bitmap: "
- "block_group >= groups_count - "
- "block_group = %d, groups_count = %lu",
- block_group, sb->s_groups_count);
-
- if (sb->s_groups_count <= EXT2_MAX_GROUP_LOADED) {
- if (sb->s_block_bitmap[block_group]) {
- if (sb->s_block_bitmap_number[block_group] !=
- block_group)
- panic ( "load_block_bitmap: "
- "block_group != block_bitmap_number");
- else
- return block_group;
- } else {
- read_block_bitmap (mp, block_group, block_group);
- return block_group;
- }
- }
-
- for (i = 0; i < sb->s_loaded_block_bitmaps &&
- sb->s_block_bitmap_number[i] != block_group; i++)
- ;
- if (i < sb->s_loaded_block_bitmaps &&
- sb->s_block_bitmap_number[i] == block_group) {
- block_bitmap_number = sb->s_block_bitmap_number[i];
- block_bitmap = sb->s_block_bitmap[i];
- for (j = i; j > 0; j--) {
- sb->s_block_bitmap_number[j] =
- sb->s_block_bitmap_number[j - 1];
- sb->s_block_bitmap[j] =
- sb->s_block_bitmap[j - 1];
- }
- sb->s_block_bitmap_number[0] = block_bitmap_number;
- sb->s_block_bitmap[0] = block_bitmap;
- } else {
- if (sb->s_loaded_block_bitmaps < EXT2_MAX_GROUP_LOADED)
- sb->s_loaded_block_bitmaps++;
- else
- ULCK_BUF(sb->s_block_bitmap[EXT2_MAX_GROUP_LOADED - 1])
-
- for (j = sb->s_loaded_block_bitmaps - 1; j > 0; j--) {
- sb->s_block_bitmap_number[j] =
- sb->s_block_bitmap_number[j - 1];
- sb->s_block_bitmap[j] =
- sb->s_block_bitmap[j - 1];
- }
- read_block_bitmap (mp, block_group, 0);
- }
- return 0;
-}
-
-static __inline int load_block_bitmap (struct mount * mp,
- unsigned int block_group)
-{
- struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs;
- if (sb->s_loaded_block_bitmaps > 0 &&
- sb->s_block_bitmap_number[0] == block_group)
- return 0;
-
- if (sb->s_groups_count <= EXT2_MAX_GROUP_LOADED &&
- sb->s_block_bitmap_number[block_group] == block_group &&
- sb->s_block_bitmap[block_group])
- return block_group;
-
- return load__block_bitmap (mp, block_group);
-}
-
-void ext2_free_blocks (struct mount * mp, unsigned long block,
- unsigned long count)
-{
- struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs;
- struct buffer_head * bh;
- struct buffer_head * bh2;
- unsigned long block_group;
- unsigned long bit;
- unsigned long i;
- int bitmap_nr;
- struct ext2_group_desc * gdp;
- struct ext2_super_block * es = sb->s_es;
-
- if (!sb) {
- printf ("ext2_free_blocks: nonexistent device");
- return;
- }
- lock_super (VFSTOUFS(mp)->um_devvp);
- if (block < es->s_first_data_block ||
- (block + count) > es->s_blocks_count) {
- printf ( "ext2_free_blocks: "
- "Freeing blocks not in datazone - "
- "block = %lu, count = %lu", block, count);
- unlock_super (VFSTOUFS(mp)->um_devvp);
- return;
- }
-
- ext2_debug ("freeing blocks %lu to %lu\n", block, block+count-1);
-
- block_group = (block - es->s_first_data_block) /
- EXT2_BLOCKS_PER_GROUP(sb);
- bit = (block - es->s_first_data_block) % EXT2_BLOCKS_PER_GROUP(sb);
- if (bit + count > EXT2_BLOCKS_PER_GROUP(sb))
- panic ( "ext2_free_blocks: "
- "Freeing blocks across group boundary - "
- "Block = %lu, count = %lu",
- block, count);
- bitmap_nr = load_block_bitmap (mp, block_group);
- bh = sb->s_block_bitmap[bitmap_nr];
- gdp = get_group_desc (mp, block_group, &bh2);
-
- if (/* test_opt (sb, CHECK_STRICT) && assume always strict ! */
- (in_range (gdp->bg_block_bitmap, block, count) ||
- in_range (gdp->bg_inode_bitmap, block, count) ||
- in_range (block, gdp->bg_inode_table,
- sb->s_itb_per_group) ||
- in_range (block + count - 1, gdp->bg_inode_table,
- sb->s_itb_per_group)))
- panic ( "ext2_free_blocks: "
- "Freeing blocks in system zones - "
- "Block = %lu, count = %lu",
- block, count);
-
- for (i = 0; i < count; i++) {
- if (!clear_bit (bit + i, bh->b_data))
- printf ("ext2_free_blocks: "
- "bit already cleared for block %lu",
- block);
- else {
- gdp->bg_free_blocks_count++;
- es->s_free_blocks_count++;
- }
- }
-
- mark_buffer_dirty(bh2);
- mark_buffer_dirty(bh);
-/****
- if (sb->s_flags & MS_SYNCHRONOUS) {
- ll_rw_block (WRITE, 1, &bh);
- wait_on_buffer (bh);
- }
-****/
- sb->s_dirt = 1;
- unlock_super (VFSTOUFS(mp)->um_devvp);
- return;
-}
-
-/*
- * ext2_new_block uses a goal block to assist allocation. If the goal is
- * free, or there is a free block within 32 blocks of the goal, that block
- * is allocated. Otherwise a forward search is made for a free block; within
- * each block group the search first looks for an entire free byte in the block
- * bitmap, and then for any free bit if that fails.
- */
-int ext2_new_block (struct mount * mp, unsigned long goal,
- u_int32_t * prealloc_count,
- u_int32_t * prealloc_block)
-{
- struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs;
- struct buffer_head * bh;
- struct buffer_head * bh2;
- char * p, * r;
- int i, j, k, tmp;
- int bitmap_nr;
- struct ext2_group_desc * gdp;
- struct ext2_super_block * es = sb->s_es;
-
-#ifdef EXT2FS_DEBUG
- static int goal_hits = 0, goal_attempts = 0;
-#endif
- if (!sb) {
- printf ("ext2_new_block: nonexistent device");
- return 0;
- }
- lock_super (VFSTOUFS(mp)->um_devvp);
-
- ext2_debug ("goal=%lu.\n", goal);
-
-repeat:
- /*
- * First, test whether the goal block is free.
- */
- if (goal < es->s_first_data_block || goal >= es->s_blocks_count)
- goal = es->s_first_data_block;
- i = (goal - es->s_first_data_block) / EXT2_BLOCKS_PER_GROUP(sb);
- gdp = get_group_desc (mp, i, &bh2);
- if (gdp->bg_free_blocks_count > 0) {
- j = ((goal - es->s_first_data_block) % EXT2_BLOCKS_PER_GROUP(sb));
-#ifdef EXT2FS_DEBUG
- if (j)
- goal_attempts++;
-#endif
- bitmap_nr = load_block_bitmap (mp, i);
- bh = sb->s_block_bitmap[bitmap_nr];
-
- ext2_debug ("goal is at %d:%d.\n", i, j);
-
- if (!test_bit(j, bh->b_data)) {
-#ifdef EXT2FS_DEBUG
- goal_hits++;
- ext2_debug ("goal bit allocated.\n");
-#endif
- goto got_block;
- }
- if (j) {
- /*
- * The goal was occupied; search forward for a free
- * block within the next XX blocks.
- *
- * end_goal is more or less random, but it has to be
- * less than EXT2_BLOCKS_PER_GROUP. Aligning up to the
- * next 64-bit boundary is simple..
- */
- int end_goal = (j + 63) & ~63;
- j = find_next_zero_bit(bh->b_data, end_goal, j);
- if (j < end_goal)
- goto got_block;
- }
-
- ext2_debug ("Bit not found near goal\n");
-
- /*
- * There has been no free block found in the near vicinity
- * of the goal: do a search forward through the block groups,
- * searching in each group first for an entire free byte in
- * the bitmap and then for any free bit.
- *
- * Search first in the remainder of the current group; then,
- * cyclicly search through the rest of the groups.
- */
- p = ((char *) bh->b_data) + (j >> 3);
- r = memscan(p, 0, (EXT2_BLOCKS_PER_GROUP(sb) - j + 7) >> 3);
- k = (r - ((char *) bh->b_data)) << 3;
- if (k < EXT2_BLOCKS_PER_GROUP(sb)) {
- j = k;
- goto search_back;
- }
- k = find_next_zero_bit ((unsigned long *) bh->b_data,
- EXT2_BLOCKS_PER_GROUP(sb),
- j);
- if (k < EXT2_BLOCKS_PER_GROUP(sb)) {
- j = k;
- goto got_block;
- }
- }
-
- ext2_debug ("Bit not found in block group %d.\n", i);
-
- /*
- * Now search the rest of the groups. We assume that
- * i and gdp correctly point to the last group visited.
- */
- for (k = 0; k < sb->s_groups_count; k++) {
- i++;
- if (i >= sb->s_groups_count)
- i = 0;
- gdp = get_group_desc (mp, i, &bh2);
- if (gdp->bg_free_blocks_count > 0)
- break;
- }
- if (k >= sb->s_groups_count) {
- unlock_super (VFSTOUFS(mp)->um_devvp);
- return 0;
- }
- bitmap_nr = load_block_bitmap (mp, i);
- bh = sb->s_block_bitmap[bitmap_nr];
- r = memscan(bh->b_data, 0, EXT2_BLOCKS_PER_GROUP(sb) >> 3);
- j = (r - bh->b_data) << 3;
-
- if (j < EXT2_BLOCKS_PER_GROUP(sb))
- goto search_back;
- else
- j = find_first_zero_bit ((unsigned long *) bh->b_data,
- EXT2_BLOCKS_PER_GROUP(sb));
- if (j >= EXT2_BLOCKS_PER_GROUP(sb)) {
- printf ( "ext2_new_block: "
- "Free blocks count corrupted for block group %d", i);
- unlock_super (VFSTOUFS(mp)->um_devvp);
- return 0;
- }
-
-search_back:
- /*
- * We have succeeded in finding a free byte in the block
- * bitmap. Now search backwards up to 7 bits to find the
- * start of this group of free blocks.
- */
- for (k = 0; k < 7 && j > 0 && !test_bit (j - 1, bh->b_data); k++, j--);
-
-got_block:
-
- ext2_debug ("using block group %d(%d)\n", i, gdp->bg_free_blocks_count);
-
- tmp = j + i * EXT2_BLOCKS_PER_GROUP(sb) + es->s_first_data_block;
-
- if (/* test_opt (sb, CHECK_STRICT) && we are always strict. */
- (tmp == gdp->bg_block_bitmap ||
- tmp == gdp->bg_inode_bitmap ||
- in_range (tmp, gdp->bg_inode_table, sb->s_itb_per_group)))
- panic ( "ext2_new_block: "
- "Allocating block in system zone - "
- "%dth block = %u in group %u", j, tmp, i);
-
- if (set_bit (j, bh->b_data)) {
- printf ( "ext2_new_block: "
- "bit already set for block %d", j);
- goto repeat;
- }
-
- ext2_debug ("found bit %d\n", j);
-
- /*
- * Do block preallocation now if required.
- */
-#ifdef EXT2_PREALLOCATE
- if (prealloc_block) {
- *prealloc_count = 0;
- *prealloc_block = tmp + 1;
- for (k = 1;
- k < 8 && (j + k) < EXT2_BLOCKS_PER_GROUP(sb); k++) {
- if (set_bit (j + k, bh->b_data))
- break;
- (*prealloc_count)++;
- }
- gdp->bg_free_blocks_count -= *prealloc_count;
- es->s_free_blocks_count -= *prealloc_count;
- ext2_debug ("Preallocated a further %lu bits.\n",
- *prealloc_count);
- }
-#endif
-
- j = tmp;
-
- mark_buffer_dirty(bh);
-/****
- if (sb->s_flags & MS_SYNCHRONOUS) {
- ll_rw_block (WRITE, 1, &bh);
- wait_on_buffer (bh);
- }
-****/
- if (j >= es->s_blocks_count) {
- printf ( "ext2_new_block: "
- "block >= blocks count - "
- "block_group = %d, block=%d", i, j);
- unlock_super (VFSTOUFS(mp)->um_devvp);
- return 0;
- }
-
- ext2_debug ("allocating block %d. "
- "Goal hits %d of %d.\n", j, goal_hits, goal_attempts);
-
- gdp->bg_free_blocks_count--;
- mark_buffer_dirty(bh2);
- es->s_free_blocks_count--;
- sb->s_dirt = 1;
- unlock_super (VFSTOUFS(mp)->um_devvp);
- return j;
-}
-
-#ifdef unused
-static unsigned long ext2_count_free_blocks (struct mount * mp)
-{
- struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs;
-#ifdef EXT2FS_DEBUG
- struct ext2_super_block * es;
- unsigned long desc_count, bitmap_count, x;
- int bitmap_nr;
- struct ext2_group_desc * gdp;
- int i;
-
- lock_super (VFSTOUFS(mp)->um_devvp);
- es = sb->s_es;
- desc_count = 0;
- bitmap_count = 0;
- gdp = NULL;
- for (i = 0; i < sb->s_groups_count; i++) {
- gdp = get_group_desc (mp, i, NULL);
- desc_count += gdp->bg_free_blocks_count;
- bitmap_nr = load_block_bitmap (mp, i);
- x = ext2_count_free (sb->s_block_bitmap[bitmap_nr],
- sb->s_blocksize);
- ext2_debug ("group %d: stored = %d, counted = %lu\n",
- i, gdp->bg_free_blocks_count, x);
- bitmap_count += x;
- }
- ext2_debug( "stored = %lu, computed = %lu, %lu\n",
- es->s_free_blocks_count, desc_count, bitmap_count);
- unlock_super (VFSTOUFS(mp)->um_devvp);
- return bitmap_count;
-#else
- return sb->s_es->s_free_blocks_count;
-#endif
-}
-#endif /* unused */
-
-static __inline int block_in_use (unsigned long block,
- struct ext2_sb_info * sb,
- unsigned char * map)
-{
- return test_bit ((block - sb->s_es->s_first_data_block) %
- EXT2_BLOCKS_PER_GROUP(sb), map);
-}
-
-#ifdef unused
-static void ext2_check_blocks_bitmap (struct mount * mp)
-{
- struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs;
- struct buffer_head * bh;
- struct ext2_super_block * es;
- unsigned long desc_count, bitmap_count, x;
- unsigned long desc_blocks;
- int bitmap_nr;
- struct ext2_group_desc * gdp;
- int i, j;
-
- lock_super (VFSTOUFS(mp)->um_devvp);
- es = sb->s_es;
- desc_count = 0;
- bitmap_count = 0;
- gdp = NULL;
- desc_blocks = (sb->s_groups_count + EXT2_DESC_PER_BLOCK(sb) - 1) /
- EXT2_DESC_PER_BLOCK(sb);
- for (i = 0; i < sb->s_groups_count; i++) {
- gdp = get_group_desc (mp, i, NULL);
- desc_count += gdp->bg_free_blocks_count;
- bitmap_nr = load_block_bitmap (mp, i);
- bh = sb->s_block_bitmap[bitmap_nr];
-
- if (!test_bit (0, bh->b_data))
- printf ( "ext2_check_blocks_bitmap: "
- "Superblock in group %d is marked free", i);
-
- for (j = 0; j < desc_blocks; j++)
- if (!test_bit (j + 1, bh->b_data))
- printf ("ext2_check_blocks_bitmap: "
- "Descriptor block #%d in group "
- "%d is marked free", j, i);
-
- if (!block_in_use (gdp->bg_block_bitmap, sb, bh->b_data))
- printf ("ext2_check_blocks_bitmap: "
- "Block bitmap for group %d is marked free",
- i);
-
- if (!block_in_use (gdp->bg_inode_bitmap, sb, bh->b_data))
- printf ("ext2_check_blocks_bitmap: "
- "Inode bitmap for group %d is marked free",
- i);
-
- for (j = 0; j < sb->s_itb_per_group; j++)
- if (!block_in_use (gdp->bg_inode_table + j, sb, bh->b_data))
- printf ("ext2_check_blocks_bitmap: "
- "Block #%d of the inode table in "
- "group %d is marked free", j, i);
-
- x = ext2_count_free (bh, sb->s_blocksize);
- if (gdp->bg_free_blocks_count != x)
- printf ("ext2_check_blocks_bitmap: "
- "Wrong free blocks count for group %d, "
- "stored = %d, counted = %lu", i,
- gdp->bg_free_blocks_count, x);
- bitmap_count += x;
- }
- if (es->s_free_blocks_count != bitmap_count)
- printf ("ext2_check_blocks_bitmap: "
- "Wrong free blocks count in super block, "
- "stored = %lu, counted = %lu",
- (unsigned long) es->s_free_blocks_count, bitmap_count);
- unlock_super (VFSTOUFS(mp)->um_devvp);
-}
-#endif /* unused */
-
-/*
- * this function is taken from
- * linux/fs/ext2/bitmap.c
- */
-
-static int nibblemap[] = {4, 3, 3, 2, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0};
-
-unsigned long ext2_count_free (struct buffer_head * map, unsigned int numchars)
-{
- unsigned int i;
- unsigned long sum = 0;
-
- if (!map)
- return (0);
- for (i = 0; i < numchars; i++)
- sum += nibblemap[map->b_data[i] & 0xf] +
- nibblemap[(map->b_data[i] >> 4) & 0xf];
- return (sum);
-}
diff --git a/sys/gnu/ext2fs/ext2_linux_ialloc.c b/sys/gnu/ext2fs/ext2_linux_ialloc.c
deleted file mode 100644
index fc78391..0000000
--- a/sys/gnu/ext2fs/ext2_linux_ialloc.c
+++ /dev/null
@@ -1,511 +0,0 @@
-/*
- * modified for Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- */
-/*
- * linux/fs/ext2/ialloc.c
- *
- * Copyright (C) 1992, 1993, 1994, 1995
- * Remy Card (card@masi.ibp.fr)
- * Laboratoire MASI - Institut Blaise Pascal
- * Universite Pierre et Marie Curie (Paris VI)
- *
- * BSD ufs-inspired inode and directory allocation by
- * Stephen Tweedie (sct@dcs.ed.ac.uk), 1993
- */
-
-/*
- * The free inodes are managed by bitmaps. A file system contains several
- * blocks groups. Each group contains 1 bitmap block for blocks, 1 bitmap
- * block for inodes, N blocks for the inode table and data blocks.
- *
- * The file system contains group descriptors which are located after the
- * super block. Each descriptor contains the number of the bitmap block and
- * the free blocks count in the block. The descriptors are loaded in memory
- * when a file system is mounted (see ext2_read_super).
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/buf.h>
-#include <sys/proc.h>
-#include <sys/mount.h>
-#include <sys/vnode.h>
-
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/inode.h>
-#include <ufs/ufs/ufsmount.h>
-#include <gnu/ext2fs/ext2_extern.h>
-#include <gnu/ext2fs/ext2_fs.h>
-#include <gnu/ext2fs/ext2_fs_sb.h>
-#include <gnu/ext2fs/fs.h>
-#include <sys/stat.h>
-
-#ifdef __i386__
-#include <gnu/ext2fs/i386-bitops.h>
-#else
-#error please provide bit operation functions
-#endif
-
-/* this is supposed to mark a buffer dirty on ready for delayed writing
- */
-void mark_buffer_dirty(struct buf *bh)
-{
- int s;
-
- s = splbio();
- bh->b_flags |= B_DIRTY;
- splx(s);
-}
-
-struct ext2_group_desc * get_group_desc (struct mount * mp,
- unsigned int block_group,
- struct buffer_head ** bh)
-{
- struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs;
- unsigned long group_desc;
- unsigned long desc;
- struct ext2_group_desc * gdp;
-
- if (block_group >= sb->s_groups_count)
- panic ("get_group_desc: "
- "block_group >= groups_count - "
- "block_group = %d, groups_count = %lu",
- block_group, sb->s_groups_count);
-
- group_desc = block_group / EXT2_DESC_PER_BLOCK(sb);
- desc = block_group % EXT2_DESC_PER_BLOCK(sb);
- if (!sb->s_group_desc[group_desc])
- panic ( "get_group_desc:"
- "Group descriptor not loaded - "
- "block_group = %d, group_desc = %lu, desc = %lu",
- block_group, group_desc, desc);
- gdp = (struct ext2_group_desc *)
- sb->s_group_desc[group_desc]->b_data;
- if (bh)
- *bh = sb->s_group_desc[group_desc];
- return gdp + desc;
-}
-
-static void read_inode_bitmap (struct mount * mp,
- unsigned long block_group,
- unsigned int bitmap_nr)
-{
- struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs;
- struct ext2_group_desc * gdp;
- struct buffer_head * bh;
- int error;
-
- gdp = get_group_desc (mp, block_group, NULL);
- if ((error = bread (VFSTOUFS(mp)->um_devvp,
- fsbtodb(sb, gdp->bg_inode_bitmap),
- sb->s_blocksize,
- NOCRED, &bh)) != 0)
- panic ( "read_inode_bitmap:"
- "Cannot read inode bitmap - "
- "block_group = %lu, inode_bitmap = %lu",
- block_group, (unsigned long) gdp->bg_inode_bitmap);
- sb->s_inode_bitmap_number[bitmap_nr] = block_group;
- sb->s_inode_bitmap[bitmap_nr] = bh;
- LCK_BUF(bh)
-}
-
-/*
- * load_inode_bitmap loads the inode bitmap for a blocks group
- *
- * It maintains a cache for the last bitmaps loaded. This cache is managed
- * with a LRU algorithm.
- *
- * Notes:
- * 1/ There is one cache per mounted file system.
- * 2/ If the file system contains less than EXT2_MAX_GROUP_LOADED groups,
- * this function reads the bitmap without maintaining a LRU cache.
- */
-static int load_inode_bitmap (struct mount * mp,
- unsigned int block_group)
-{
- struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs;
- int i, j;
- unsigned long inode_bitmap_number;
- struct buffer_head * inode_bitmap;
-
- if (block_group >= sb->s_groups_count)
- panic ("load_inode_bitmap:"
- "block_group >= groups_count - "
- "block_group = %d, groups_count = %lu",
- block_group, sb->s_groups_count);
- if (sb->s_loaded_inode_bitmaps > 0 &&
- sb->s_inode_bitmap_number[0] == block_group)
- return 0;
- if (sb->s_groups_count <= EXT2_MAX_GROUP_LOADED) {
- if (sb->s_inode_bitmap[block_group]) {
- if (sb->s_inode_bitmap_number[block_group] !=
- block_group)
- panic ( "load_inode_bitmap:"
- "block_group != inode_bitmap_number");
- else
- return block_group;
- } else {
- read_inode_bitmap (mp, block_group, block_group);
- return block_group;
- }
- }
-
- for (i = 0; i < sb->s_loaded_inode_bitmaps &&
- sb->s_inode_bitmap_number[i] != block_group;
- i++)
- ;
- if (i < sb->s_loaded_inode_bitmaps &&
- sb->s_inode_bitmap_number[i] == block_group) {
- inode_bitmap_number = sb->s_inode_bitmap_number[i];
- inode_bitmap = sb->s_inode_bitmap[i];
- for (j = i; j > 0; j--) {
- sb->s_inode_bitmap_number[j] =
- sb->s_inode_bitmap_number[j - 1];
- sb->s_inode_bitmap[j] =
- sb->s_inode_bitmap[j - 1];
- }
- sb->s_inode_bitmap_number[0] = inode_bitmap_number;
- sb->s_inode_bitmap[0] = inode_bitmap;
- } else {
- if (sb->s_loaded_inode_bitmaps < EXT2_MAX_GROUP_LOADED)
- sb->s_loaded_inode_bitmaps++;
- else
- ULCK_BUF(sb->s_inode_bitmap[EXT2_MAX_GROUP_LOADED - 1])
- for (j = sb->s_loaded_inode_bitmaps - 1; j > 0; j--) {
- sb->s_inode_bitmap_number[j] =
- sb->s_inode_bitmap_number[j - 1];
- sb->s_inode_bitmap[j] =
- sb->s_inode_bitmap[j - 1];
- }
- read_inode_bitmap (mp, block_group, 0);
- }
- return 0;
-}
-
-
-void ext2_free_inode (struct inode * inode)
-{
- struct ext2_sb_info * sb;
- struct buffer_head * bh;
- struct buffer_head * bh2;
- unsigned long block_group;
- unsigned long bit;
- int bitmap_nr;
- struct ext2_group_desc * gdp;
- struct ext2_super_block * es;
-
- if (!inode)
- return;
-
- if (inode->i_nlink) {
- printf ("ext2_free_inode: inode has nlink=%d\n",
- inode->i_nlink);
- return;
- }
-
- ext2_debug ("freeing inode %lu\n", inode->i_number);
-
- sb = inode->i_e2fs;
- lock_super (DEVVP(inode));
- if (inode->i_number < EXT2_FIRST_INO ||
- inode->i_number > sb->s_es->s_inodes_count) {
- printf ("free_inode reserved inode or nonexistent inode");
- unlock_super (DEVVP(inode));
- return;
- }
- es = sb->s_es;
- block_group = (inode->i_number - 1) / EXT2_INODES_PER_GROUP(sb);
- bit = (inode->i_number - 1) % EXT2_INODES_PER_GROUP(sb);
- bitmap_nr = load_inode_bitmap (ITOV(inode)->v_mount, block_group);
- bh = sb->s_inode_bitmap[bitmap_nr];
- if (!clear_bit (bit, bh->b_data))
- printf ( "ext2_free_inode:"
- "bit already cleared for inode %lu",
- (unsigned long)inode->i_number);
- else {
- gdp = get_group_desc (ITOV(inode)->v_mount, block_group, &bh2);
- gdp->bg_free_inodes_count++;
- if (S_ISDIR(inode->i_mode))
- gdp->bg_used_dirs_count--;
- mark_buffer_dirty(bh2);
- es->s_free_inodes_count++;
- }
- mark_buffer_dirty(bh);
-/*** XXX
- if (sb->s_flags & MS_SYNCHRONOUS) {
- ll_rw_block (WRITE, 1, &bh);
- wait_on_buffer (bh);
- }
-***/
- sb->s_dirt = 1;
- unlock_super (DEVVP(inode));
-}
-
-#if linux
-/*
- * This function increments the inode version number
- *
- * This may be used one day by the NFS server
- */
-static void inc_inode_version (struct inode * inode,
- struct ext2_group_desc *gdp,
- int mode)
-{
- unsigned long inode_block;
- struct buffer_head * bh;
- struct ext2_inode * raw_inode;
-
- inode_block = gdp->bg_inode_table + (((inode->i_number - 1) %
- EXT2_INODES_PER_GROUP(inode->i_sb)) /
- EXT2_INODES_PER_BLOCK(inode->i_sb));
- bh = bread (inode->i_sb->s_dev, inode_block, inode->i_sb->s_blocksize);
- if (!bh) {
- printf ("inc_inode_version Cannot load inode table block - "
- "inode=%lu, inode_block=%lu\n",
- inode->i_number, inode_block);
- inode->u.ext2_i.i_version = 1;
- return;
- }
- raw_inode = ((struct ext2_inode *) bh->b_data) +
- (((inode->i_number - 1) %
- EXT2_INODES_PER_GROUP(inode->i_sb)) %
- EXT2_INODES_PER_BLOCK(inode->i_sb));
- raw_inode->i_version++;
- inode->u.ext2_i.i_version = raw_inode->i_version;
- bdwrite (bh);
-}
-
-#endif /* linux */
-
-/*
- * There are two policies for allocating an inode. If the new inode is
- * a directory, then a forward search is made for a block group with both
- * free space and a low directory-to-inode ratio; if that fails, then of
- * the groups with above-average free space, that group with the fewest
- * directories already is chosen.
- *
- * For other inodes, search forward from the parent directory\'s block
- * group to find a free inode.
- */
-/*
- * this functino has been reduced to the actual 'find the inode number' part
- */
-ino_t ext2_new_inode (const struct inode * dir, int mode)
-{
- struct ext2_sb_info * sb;
- struct buffer_head * bh;
- struct buffer_head * bh2;
- int i, j, avefreei;
- int bitmap_nr;
- struct ext2_group_desc * gdp;
- struct ext2_group_desc * tmp;
- struct ext2_super_block * es;
-
- if (!dir)
- return 0;
- sb = dir->i_e2fs;
-
- lock_super (DEVVP(dir));
- es = sb->s_es;
-repeat:
- gdp = NULL; i=0;
-
- if (S_ISDIR(mode)) {
- avefreei = es->s_free_inodes_count /
- sb->s_groups_count;
-/* I am not yet convinced that this next bit is necessary.
- i = dir->u.ext2_i.i_block_group;
- for (j = 0; j < sb->u.ext2_sb.s_groups_count; j++) {
- tmp = get_group_desc (sb, i, &bh2);
- if ((tmp->bg_used_dirs_count << 8) <
- tmp->bg_free_inodes_count) {
- gdp = tmp;
- break;
- }
- else
- i = ++i % sb->u.ext2_sb.s_groups_count;
- }
-*/
- if (!gdp) {
- for (j = 0; j < sb->s_groups_count; j++) {
- tmp = get_group_desc(ITOV(dir)->v_mount,j,&bh2);
- if (tmp->bg_free_inodes_count &&
- tmp->bg_free_inodes_count >= avefreei) {
- if (!gdp ||
- (tmp->bg_free_blocks_count >
- gdp->bg_free_blocks_count)) {
- i = j;
- gdp = tmp;
- }
- }
- }
- }
- }
- else
- {
- /*
- * Try to place the inode in its parent directory
- */
- i = dir->i_block_group;
- tmp = get_group_desc (ITOV(dir)->v_mount, i, &bh2);
- if (tmp->bg_free_inodes_count)
- gdp = tmp;
- else
- {
- /*
- * Use a quadratic hash to find a group with a
- * free inode
- */
- for (j = 1; j < sb->s_groups_count; j <<= 1) {
- i += j;
- if (i >= sb->s_groups_count)
- i -= sb->s_groups_count;
- tmp = get_group_desc(ITOV(dir)->v_mount,i,&bh2);
- if (tmp->bg_free_inodes_count) {
- gdp = tmp;
- break;
- }
- }
- }
- if (!gdp) {
- /*
- * That failed: try linear search for a free inode
- */
- i = dir->i_block_group + 1;
- for (j = 2; j < sb->s_groups_count; j++) {
- if (++i >= sb->s_groups_count)
- i = 0;
- tmp = get_group_desc(ITOV(dir)->v_mount,i,&bh2);
- if (tmp->bg_free_inodes_count) {
- gdp = tmp;
- break;
- }
- }
- }
- }
-
- if (!gdp) {
- unlock_super (DEVVP(dir));
- return 0;
- }
- bitmap_nr = load_inode_bitmap (ITOV(dir)->v_mount, i);
- bh = sb->s_inode_bitmap[bitmap_nr];
- if ((j = find_first_zero_bit ((unsigned long *) bh->b_data,
- EXT2_INODES_PER_GROUP(sb))) <
- EXT2_INODES_PER_GROUP(sb)) {
- if (set_bit (j, bh->b_data)) {
- printf ( "ext2_new_inode:"
- "bit already set for inode %d", j);
- goto repeat;
- }
-/* Linux now does the following:
- mark_buffer_dirty(bh);
- if (sb->s_flags & MS_SYNCHRONOUS) {
- ll_rw_block (WRITE, 1, &bh);
- wait_on_buffer (bh);
- }
-*/
- mark_buffer_dirty(bh);
- } else {
- if (gdp->bg_free_inodes_count != 0) {
- printf ( "ext2_new_inode:"
- "Free inodes count corrupted in group %d",
- i);
- unlock_super (DEVVP(dir));
- return 0;
- }
- goto repeat;
- }
- j += i * EXT2_INODES_PER_GROUP(sb) + 1;
- if (j < EXT2_FIRST_INO || j > es->s_inodes_count) {
- printf ( "ext2_new_inode:"
- "reserved inode or inode > inodes count - "
- "block_group = %d,inode=%d", i, j);
- unlock_super (DEVVP(dir));
- return 0;
- }
- gdp->bg_free_inodes_count--;
- if (S_ISDIR(mode))
- gdp->bg_used_dirs_count++;
- mark_buffer_dirty(bh2);
- es->s_free_inodes_count--;
- /* mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1); */
- sb->s_dirt = 1;
- unlock_super (DEVVP(dir));
- return j;
-}
-
-#ifdef unused
-static unsigned long ext2_count_free_inodes (struct mount * mp)
-{
-#ifdef EXT2FS_DEBUG
- struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs;
- struct ext2_super_block * es;
- unsigned long desc_count, bitmap_count, x;
- int bitmap_nr;
- struct ext2_group_desc * gdp;
- int i;
-
- lock_super (VFSTOUFS(mp)->um_devvp);
- es = sb->s_es;
- desc_count = 0;
- bitmap_count = 0;
- gdp = NULL;
- for (i = 0; i < sb->s_groups_count; i++) {
- gdp = get_group_desc (mp, i, NULL);
- desc_count += gdp->bg_free_inodes_count;
- bitmap_nr = load_inode_bitmap (mp, i);
- x = ext2_count_free (sb->s_inode_bitmap[bitmap_nr],
- EXT2_INODES_PER_GROUP(sb) / 8);
- ext2_debug ("group %d: stored = %d, counted = %lu\n",
- i, gdp->bg_free_inodes_count, x);
- bitmap_count += x;
- }
- ext2_debug("stored = %lu, computed = %lu, %lu\n",
- es->s_free_inodes_count, desc_count, bitmap_count);
- unlock_super (VFSTOUFS(mp)->um_devvp);
- return desc_count;
-#else
- return VFSTOUFS(mp)->um_e2fsb->s_free_inodes_count;
-#endif
-}
-#endif /* unused */
-
-#ifdef LATER
-void ext2_check_inodes_bitmap (struct mount * mp)
-{
- struct ext2_super_block * es;
- unsigned long desc_count, bitmap_count, x;
- int bitmap_nr;
- struct ext2_group_desc * gdp;
- int i;
-
- lock_super (sb);
- es = sb->u.ext2_sb.s_es;
- desc_count = 0;
- bitmap_count = 0;
- gdp = NULL;
- for (i = 0; i < sb->u.ext2_sb.s_groups_count; i++) {
- gdp = get_group_desc (sb, i, NULL);
- desc_count += gdp->bg_free_inodes_count;
- bitmap_nr = load_inode_bitmap (sb, i);
- x = ext2_count_free (sb->u.ext2_sb.s_inode_bitmap[bitmap_nr],
- EXT2_INODES_PER_GROUP(sb) / 8);
- if (gdp->bg_free_inodes_count != x)
- printf ( "ext2_check_inodes_bitmap:"
- "Wrong free inodes count in group %d, "
- "stored = %d, counted = %lu", i,
- gdp->bg_free_inodes_count, x);
- bitmap_count += x;
- }
- if (es->s_free_inodes_count != bitmap_count)
- printf ( "ext2_check_inodes_bitmap:"
- "Wrong free inodes count in super block, "
- "stored = %lu, counted = %lu",
- (unsigned long) es->s_free_inodes_count, bitmap_count);
- unlock_super (sb);
-}
-#endif
diff --git a/sys/gnu/ext2fs/ext2_lookup.c b/sys/gnu/ext2fs/ext2_lookup.c
deleted file mode 100644
index 71c081f..0000000
--- a/sys/gnu/ext2fs/ext2_lookup.c
+++ /dev/null
@@ -1,1069 +0,0 @@
-/*
- * modified for Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- *
- * $FreeBSD$
- */
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ufs_lookup.c 8.6 (Berkeley) 4/1/94
- */
-
-#include <stddef.h>
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/namei.h>
-#include <sys/buf.h>
-#include <sys/mount.h>
-#include <sys/vnode.h>
-#include <sys/malloc.h>
-#include <sys/dirent.h>
-
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/inode.h>
-#include <ufs/ufs/dir.h>
-#include <ufs/ufs/ufsmount.h>
-#include <ufs/ufs/ufs_extern.h>
-
-#include <gnu/ext2fs/ext2_extern.h>
-#include <gnu/ext2fs/ext2_fs.h>
-#include <gnu/ext2fs/ext2_fs_sb.h>
-
-/*
- DIRBLKSIZE in ffs is DEV_BSIZE (in most cases 512)
- while it is the native blocksize in ext2fs - thus, a #define
- is no longer appropriate
-*/
-#undef DIRBLKSIZ
-
-extern int dirchk;
-
-static u_char ext2_ft_to_dt[] = {
- DT_UNKNOWN, /* EXT2_FT_UNKNOWN */
- DT_REG, /* EXT2_FT_REG_FILE */
- DT_DIR, /* EXT2_FT_DIR */
- DT_CHR, /* EXT2_FT_CHRDEV */
- DT_BLK, /* EXT2_FT_BLKDEV */
- DT_FIFO, /* EXT2_FT_FIFO */
- DT_SOCK, /* EXT2_FT_SOCK */
- DT_LNK, /* EXT2_FT_SYMLINK */
-};
-#define FTTODT(ft) \
- ((ft) > sizeof(ext2_ft_to_dt) / sizeof(ext2_ft_to_dt[0]) ? \
- DT_UNKNOWN : ext2_ft_to_dt[(ft)])
-
-static u_char dt_to_ext2_ft[] = {
- EXT2_FT_UNKNOWN, /* DT_UNKNOWN */
- EXT2_FT_FIFO, /* DT_FIFO */
- EXT2_FT_CHRDEV, /* DT_CHR */
- EXT2_FT_UNKNOWN, /* unused */
- EXT2_FT_DIR, /* DT_DIR */
- EXT2_FT_UNKNOWN, /* unused */
- EXT2_FT_BLKDEV, /* DT_BLK */
- EXT2_FT_UNKNOWN, /* unused */
- EXT2_FT_REG_FILE, /* DT_REG */
- EXT2_FT_UNKNOWN, /* unused */
- EXT2_FT_SYMLINK, /* DT_LNK */
- EXT2_FT_UNKNOWN, /* unused */
- EXT2_FT_SOCK, /* DT_SOCK */
- EXT2_FT_UNKNOWN, /* unused */
- EXT2_FT_UNKNOWN, /* DT_WHT */
-};
-#define DTTOFT(dt) \
- ((dt) > sizeof(dt_to_ext2_ft) / sizeof(dt_to_ext2_ft[0]) ? \
- EXT2_FT_UNKNOWN : dt_to_ext2_ft[(dt)])
-
-static int ext2_dirbadentry __P((struct vnode *dp,
- struct ext2_dir_entry_2 *de,
- int entryoffsetinblock));
-
-/*
- * Vnode op for reading directories.
- *
- * The routine below assumes that the on-disk format of a directory
- * is the same as that defined by <sys/dirent.h>. If the on-disk
- * format changes, then it will be necessary to do a conversion
- * from the on-disk format that read returns to the format defined
- * by <sys/dirent.h>.
- */
-/*
- * this is exactly what we do here - the problem is that the conversion
- * will blow up some entries by four bytes, so it can't be done in place.
- * This is too bad. Right now the conversion is done entry by entry, the
- * converted entry is sent via uiomove.
- *
- * XXX allocate a buffer, convert as many entries as possible, then send
- * the whole buffer to uiomove
- */
-int
-ext2_readdir(ap)
- struct vop_readdir_args /* {
- struct vnode *a_vp;
- struct uio *a_uio;
- struct ucred *a_cred;
- } */ *ap;
-{
- register struct uio *uio = ap->a_uio;
- int count, error;
-
- struct ext2_dir_entry_2 *edp, *dp;
- int ncookies;
- struct dirent dstdp;
- struct uio auio;
- struct iovec aiov;
- caddr_t dirbuf;
- int readcnt;
- u_quad_t startoffset = uio->uio_offset;
-
- count = uio->uio_resid; /* legyenek boldogok akik akarnak ... */
- uio->uio_resid = count;
- uio->uio_iov->iov_len = count;
-
-#if 0
-printf("ext2_readdir called uio->uio_offset %d uio->uio_resid %d count %d \n",
- (int)uio->uio_offset, (int)uio->uio_resid, (int)count);
-#endif
-
- auio = *uio;
- auio.uio_iov = &aiov;
- auio.uio_iovcnt = 1;
- auio.uio_segflg = UIO_SYSSPACE;
- aiov.iov_len = count;
- MALLOC(dirbuf, caddr_t, count, M_TEMP, M_WAITOK);
- aiov.iov_base = dirbuf;
- error = VOP_READ(ap->a_vp, &auio, 0, ap->a_cred);
- if (error == 0) {
- readcnt = count - auio.uio_resid;
- edp = (struct ext2_dir_entry_2 *)&dirbuf[readcnt];
- ncookies = 0;
- bzero(&dstdp, offsetof(struct dirent, d_name));
- for (dp = (struct ext2_dir_entry_2 *)dirbuf;
- !error && uio->uio_resid > 0 && dp < edp; ) {
- /*-
- * "New" ext2fs directory entries differ in 3 ways
- * from ufs on-disk ones:
- * - the name is not necessarily NUL-terminated.
- * - the file type field always exists and always
- * follows the name length field.
- * - the file type is encoded in a different way.
- *
- * "Old" ext2fs directory entries need no special
- * conversions, since they binary compatible with
- * "new" entries having a file type of 0 (i.e.,
- * EXT2_FT_UNKNOWN). Splitting the old name length
- * field didn't make a mess like it did in ufs,
- * because ext2fs uses a machine-dependent disk
- * layout.
- */
- dstdp.d_fileno = dp->inode;
- dstdp.d_type = FTTODT(dp->file_type);
- dstdp.d_namlen = dp->name_len;
- dstdp.d_reclen = GENERIC_DIRSIZ(&dstdp);
- bcopy(dp->name, dstdp.d_name, dstdp.d_namlen);
- bzero(dstdp.d_name + dstdp.d_namlen,
- dstdp.d_reclen - offsetof(struct dirent, d_name) -
- dstdp.d_namlen);
-
- if (dp->rec_len > 0) {
- if(dstdp.d_reclen <= uio->uio_resid) {
- /* advance dp */
- dp = (struct ext2_dir_entry_2 *)
- ((char *)dp + dp->rec_len);
- error =
- uiomove((caddr_t)&dstdp,
- dstdp.d_reclen, uio);
- if (!error)
- ncookies++;
- } else
- break;
- } else {
- error = EIO;
- break;
- }
- }
- /* we need to correct uio_offset */
- uio->uio_offset = startoffset + (caddr_t)dp - dirbuf;
-
- if (!error && ap->a_ncookies != NULL) {
- u_long *cookies;
- u_long *cookiep;
- off_t off;
-
- if (uio->uio_segflg != UIO_SYSSPACE || uio->uio_iovcnt != 1)
- panic("ext2fs_readdir: unexpected uio from NFS server");
- MALLOC(cookies, u_long *, ncookies * sizeof(u_long), M_TEMP,
- M_WAITOK);
- off = startoffset;
- for (dp = (struct ext2_dir_entry_2 *)dirbuf, cookiep = cookies;
- dp < edp;
- dp = (struct ext2_dir_entry_2 *)((caddr_t) dp + dp->rec_len)) {
- off += dp->rec_len;
- *cookiep++ = (u_long) off;
- }
- *ap->a_ncookies = ncookies;
- *ap->a_cookies = cookies;
- }
- }
- FREE(dirbuf, M_TEMP);
- if (ap->a_eofflag)
- *ap->a_eofflag = VTOI(ap->a_vp)->i_size <= uio->uio_offset;
- return (error);
-}
-
-/*
- * Convert a component of a pathname into a pointer to a locked inode.
- * This is a very central and rather complicated routine.
- * If the file system is not maintained in a strict tree hierarchy,
- * this can result in a deadlock situation (see comments in code below).
- *
- * The cnp->cn_nameiop argument is LOOKUP, CREATE, RENAME, or DELETE depending
- * on whether the name is to be looked up, created, renamed, or deleted.
- * When CREATE, RENAME, or DELETE is specified, information usable in
- * creating, renaming, or deleting a directory entry may be calculated.
- * If flag has LOCKPARENT or'ed into it and the target of the pathname
- * exists, lookup returns both the target and its parent directory locked.
- * When creating or renaming and LOCKPARENT is specified, the target may
- * not be ".". When deleting and LOCKPARENT is specified, the target may
- * be "."., but the caller must check to ensure it does an vrele and vput
- * instead of two vputs.
- *
- * Overall outline of ufs_lookup:
- *
- * search for name in directory, to found or notfound
- * notfound:
- * if creating, return locked directory, leaving info on available slots
- * else return error
- * found:
- * if at end of path and deleting, return information to allow delete
- * if at end of path and rewriting (RENAME and LOCKPARENT), lock target
- * inode and return info to allow rewrite
- * if not at end, add name to cache; if at end and neither creating
- * nor deleting, add name to cache
- */
-int
-ext2_lookup(ap)
- struct vop_cachedlookup_args /* {
- struct vnode *a_dvp;
- struct vnode **a_vpp;
- struct componentname *a_cnp;
- } */ *ap;
-{
- register struct vnode *vdp; /* vnode for directory being searched */
- register struct inode *dp; /* inode for directory being searched */
- struct buf *bp; /* a buffer of directory entries */
- register struct ext2_dir_entry_2 *ep; /* the current directory entry */
- int entryoffsetinblock; /* offset of ep in bp's buffer */
- enum {NONE, COMPACT, FOUND} slotstatus;
- doff_t slotoffset; /* offset of area with free space */
- int slotsize; /* size of area at slotoffset */
- int slotfreespace; /* amount of space free in slot */
- int slotneeded; /* size of the entry we're seeking */
- int numdirpasses; /* strategy for directory search */
- doff_t endsearch; /* offset to end directory search */
- doff_t prevoff; /* prev entry dp->i_offset */
- struct vnode *pdp; /* saved dp during symlink work */
- struct vnode *tdp; /* returned by VFS_VGET */
- doff_t enduseful; /* pointer past last used dir slot */
- u_long bmask; /* block offset mask */
- int lockparent; /* 1 => lockparent flag is set */
- int wantparent; /* 1 => wantparent or lockparent flag */
- int namlen, error;
- struct vnode **vpp = ap->a_vpp;
- struct componentname *cnp = ap->a_cnp;
- struct ucred *cred = cnp->cn_cred;
- int flags = cnp->cn_flags;
- int nameiop = cnp->cn_nameiop;
- struct proc *p = cnp->cn_proc;
-
- int DIRBLKSIZ = VTOI(ap->a_dvp)->i_e2fs->s_blocksize;
-
- bp = NULL;
- slotoffset = -1;
- *vpp = NULL;
- vdp = ap->a_dvp;
- dp = VTOI(vdp);
- lockparent = flags & LOCKPARENT;
- wantparent = flags & (LOCKPARENT|WANTPARENT);
-
- /*
- * We now have a segment name to search for, and a directory to search.
- */
-
- /*
- * Suppress search for slots unless creating
- * file and at end of pathname, in which case
- * we watch for a place to put the new file in
- * case it doesn't already exist.
- */
- slotstatus = FOUND;
- slotfreespace = slotsize = slotneeded = 0;
- if ((nameiop == CREATE || nameiop == RENAME) &&
- (flags & ISLASTCN)) {
- slotstatus = NONE;
- slotneeded = EXT2_DIR_REC_LEN(cnp->cn_namelen);
- /* was
- slotneeded = (sizeof(struct direct) - MAXNAMLEN +
- cnp->cn_namelen + 3) &~ 3; */
- }
-
- /*
- * If there is cached information on a previous search of
- * this directory, pick up where we last left off.
- * We cache only lookups as these are the most common
- * and have the greatest payoff. Caching CREATE has little
- * benefit as it usually must search the entire directory
- * to determine that the entry does not exist. Caching the
- * location of the last DELETE or RENAME has not reduced
- * profiling time and hence has been removed in the interest
- * of simplicity.
- */
- bmask = VFSTOUFS(vdp->v_mount)->um_mountp->mnt_stat.f_iosize - 1;
- if (nameiop != LOOKUP || dp->i_diroff == 0 ||
- dp->i_diroff > dp->i_size) {
- entryoffsetinblock = 0;
- dp->i_offset = 0;
- numdirpasses = 1;
- } else {
- dp->i_offset = dp->i_diroff;
- if ((entryoffsetinblock = dp->i_offset & bmask) &&
- (error = UFS_BLKATOFF(vdp, (off_t)dp->i_offset, NULL, &bp)))
- return (error);
- numdirpasses = 2;
- nchstats.ncs_2passes++;
- }
- prevoff = dp->i_offset;
- endsearch = roundup(dp->i_size, DIRBLKSIZ);
- enduseful = 0;
-
-searchloop:
- while (dp->i_offset < endsearch) {
- /*
- * If necessary, get the next directory block.
- */
- if ((dp->i_offset & bmask) == 0) {
- if (bp != NULL)
- brelse(bp);
- if ((error =
- UFS_BLKATOFF(vdp, (off_t)dp->i_offset, NULL, &bp)) != 0)
- return (error);
- entryoffsetinblock = 0;
- }
- /*
- * If still looking for a slot, and at a DIRBLKSIZE
- * boundary, have to start looking for free space again.
- */
- if (slotstatus == NONE &&
- (entryoffsetinblock & (DIRBLKSIZ - 1)) == 0) {
- slotoffset = -1;
- slotfreespace = 0;
- }
- /*
- * Get pointer to next entry.
- * Full validation checks are slow, so we only check
- * enough to insure forward progress through the
- * directory. Complete checks can be run by patching
- * "dirchk" to be true.
- */
- ep = (struct ext2_dir_entry_2 *)
- ((char *)bp->b_data + entryoffsetinblock);
- if (ep->rec_len == 0 ||
- (dirchk && ext2_dirbadentry(vdp, ep, entryoffsetinblock))) {
- int i;
- ufs_dirbad(dp, dp->i_offset, "mangled entry");
- i = DIRBLKSIZ - (entryoffsetinblock & (DIRBLKSIZ - 1));
- dp->i_offset += i;
- entryoffsetinblock += i;
- continue;
- }
-
- /*
- * If an appropriate sized slot has not yet been found,
- * check to see if one is available. Also accumulate space
- * in the current block so that we can determine if
- * compaction is viable.
- */
- if (slotstatus != FOUND) {
- int size = ep->rec_len;
-
- if (ep->inode != 0)
- size -= EXT2_DIR_REC_LEN(ep->name_len);
- if (size > 0) {
- if (size >= slotneeded) {
- slotstatus = FOUND;
- slotoffset = dp->i_offset;
- slotsize = ep->rec_len;
- } else if (slotstatus == NONE) {
- slotfreespace += size;
- if (slotoffset == -1)
- slotoffset = dp->i_offset;
- if (slotfreespace >= slotneeded) {
- slotstatus = COMPACT;
- slotsize = dp->i_offset +
- ep->rec_len - slotoffset;
- }
- }
- }
- }
-
- /*
- * Check for a name match.
- */
- if (ep->inode) {
- namlen = ep->name_len;
- if (namlen == cnp->cn_namelen &&
- !bcmp(cnp->cn_nameptr, ep->name,
- (unsigned)namlen)) {
- /*
- * Save directory entry's inode number and
- * reclen in ndp->ni_ufs area, and release
- * directory buffer.
- */
- dp->i_ino = ep->inode;
- dp->i_reclen = ep->rec_len;
- brelse(bp);
- goto found;
- }
- }
- prevoff = dp->i_offset;
- dp->i_offset += ep->rec_len;
- entryoffsetinblock += ep->rec_len;
- if (ep->inode)
- enduseful = dp->i_offset;
- }
-/* notfound: */
- /*
- * If we started in the middle of the directory and failed
- * to find our target, we must check the beginning as well.
- */
- if (numdirpasses == 2) {
- numdirpasses--;
- dp->i_offset = 0;
- endsearch = dp->i_diroff;
- goto searchloop;
- }
- if (bp != NULL)
- brelse(bp);
- /*
- * If creating, and at end of pathname and current
- * directory has not been removed, then can consider
- * allowing file to be created.
- */
- if ((nameiop == CREATE || nameiop == RENAME) &&
- (flags & ISLASTCN) && dp->i_nlink != 0) {
- /*
- * Access for write is interpreted as allowing
- * creation of files in the directory.
- */
- if ((error = VOP_ACCESS(vdp, VWRITE, cred, cnp->cn_proc)) != 0)
- return (error);
- /*
- * Return an indication of where the new directory
- * entry should be put. If we didn't find a slot,
- * then set dp->i_count to 0 indicating
- * that the new slot belongs at the end of the
- * directory. If we found a slot, then the new entry
- * can be put in the range from dp->i_offset to
- * dp->i_offset + dp->i_count.
- */
- if (slotstatus == NONE) {
- dp->i_offset = roundup(dp->i_size, DIRBLKSIZ);
- dp->i_count = 0;
- enduseful = dp->i_offset;
- } else {
- dp->i_offset = slotoffset;
- dp->i_count = slotsize;
- if (enduseful < slotoffset + slotsize)
- enduseful = slotoffset + slotsize;
- }
- dp->i_endoff = roundup(enduseful, DIRBLKSIZ);
- dp->i_flag |= IN_CHANGE | IN_UPDATE;
- /*
- * We return with the directory locked, so that
- * the parameters we set up above will still be
- * valid if we actually decide to do a direnter().
- * We return ni_vp == NULL to indicate that the entry
- * does not currently exist; we leave a pointer to
- * the (locked) directory inode in ndp->ni_dvp.
- * The pathname buffer is saved so that the name
- * can be obtained later.
- *
- * NB - if the directory is unlocked, then this
- * information cannot be used.
- */
- cnp->cn_flags |= SAVENAME;
- if (!lockparent)
- VOP_UNLOCK(vdp, 0, p);
- return (EJUSTRETURN);
- }
- /*
- * Insert name into cache (as non-existent) if appropriate.
- */
- if ((cnp->cn_flags & MAKEENTRY) && nameiop != CREATE)
- cache_enter(vdp, *vpp, cnp);
- return (ENOENT);
-
-found:
- if (numdirpasses == 2)
- nchstats.ncs_pass2++;
- /*
- * Check that directory length properly reflects presence
- * of this entry.
- */
- if (entryoffsetinblock + EXT2_DIR_REC_LEN(ep->name_len)
- > dp->i_size) {
- ufs_dirbad(dp, dp->i_offset, "i_size too small");
- dp->i_size = entryoffsetinblock+EXT2_DIR_REC_LEN(ep->name_len);
- dp->i_flag |= IN_CHANGE | IN_UPDATE;
- }
-
- /*
- * Found component in pathname.
- * If the final component of path name, save information
- * in the cache as to where the entry was found.
- */
- if ((flags & ISLASTCN) && nameiop == LOOKUP)
- dp->i_diroff = dp->i_offset &~ (DIRBLKSIZ - 1);
-
- /*
- * If deleting, and at end of pathname, return
- * parameters which can be used to remove file.
- * If the wantparent flag isn't set, we return only
- * the directory (in ndp->ni_dvp), otherwise we go
- * on and lock the inode, being careful with ".".
- */
- if (nameiop == DELETE && (flags & ISLASTCN)) {
- /*
- * Write access to directory required to delete files.
- */
- if ((error = VOP_ACCESS(vdp, VWRITE, cred, cnp->cn_proc)) != 0)
- return (error);
- /*
- * Return pointer to current entry in dp->i_offset,
- * and distance past previous entry (if there
- * is a previous entry in this block) in dp->i_count.
- * Save directory inode pointer in ndp->ni_dvp for dirremove().
- */
- if ((dp->i_offset & (DIRBLKSIZ - 1)) == 0)
- dp->i_count = 0;
- else
- dp->i_count = dp->i_offset - prevoff;
- if (dp->i_number == dp->i_ino) {
- VREF(vdp);
- *vpp = vdp;
- return (0);
- }
- if ((error = VFS_VGET(vdp->v_mount, dp->i_ino, &tdp)) != 0)
- return (error);
- /*
- * If directory is "sticky", then user must own
- * the directory, or the file in it, else she
- * may not delete it (unless she's root). This
- * implements append-only directories.
- */
- if ((dp->i_mode & ISVTX) &&
- cred->cr_uid != 0 &&
- cred->cr_uid != dp->i_uid &&
- VTOI(tdp)->i_uid != cred->cr_uid) {
- vput(tdp);
- return (EPERM);
- }
- *vpp = tdp;
- if (!lockparent)
- VOP_UNLOCK(vdp, 0, p);
- return (0);
- }
-
- /*
- * If rewriting (RENAME), return the inode and the
- * information required to rewrite the present directory
- * Must get inode of directory entry to verify it's a
- * regular file, or empty directory.
- */
- if (nameiop == RENAME && wantparent &&
- (flags & ISLASTCN)) {
- if ((error = VOP_ACCESS(vdp, VWRITE, cred, cnp->cn_proc)) != 0)
- return (error);
- /*
- * Careful about locking second inode.
- * This can only occur if the target is ".".
- */
- if (dp->i_number == dp->i_ino)
- return (EISDIR);
- if ((error = VFS_VGET(vdp->v_mount, dp->i_ino, &tdp)) != 0)
- return (error);
- *vpp = tdp;
- cnp->cn_flags |= SAVENAME;
- if (!lockparent)
- VOP_UNLOCK(vdp, 0, p);
- return (0);
- }
-
- /*
- * Step through the translation in the name. We do not `vput' the
- * directory because we may need it again if a symbolic link
- * is relative to the current directory. Instead we save it
- * unlocked as "pdp". We must get the target inode before unlocking
- * the directory to insure that the inode will not be removed
- * before we get it. We prevent deadlock by always fetching
- * inodes from the root, moving down the directory tree. Thus
- * when following backward pointers ".." we must unlock the
- * parent directory before getting the requested directory.
- * There is a potential race condition here if both the current
- * and parent directories are removed before the VFS_VGET for the
- * inode associated with ".." returns. We hope that this occurs
- * infrequently since we cannot avoid this race condition without
- * implementing a sophisticated deadlock detection algorithm.
- * Note also that this simple deadlock detection scheme will not
- * work if the file system has any hard links other than ".."
- * that point backwards in the directory structure.
- */
- pdp = vdp;
- if (flags & ISDOTDOT) {
- VOP_UNLOCK(pdp, 0, p); /* race to get the inode */
- if ((error = VFS_VGET(vdp->v_mount, dp->i_ino, &tdp)) != 0) {
- vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY, p);
- return (error);
- }
- if (lockparent && (flags & ISLASTCN) &&
- (error = vn_lock(pdp, LK_EXCLUSIVE, p))) {
- vput(tdp);
- return (error);
- }
- *vpp = tdp;
- } else if (dp->i_number == dp->i_ino) {
- VREF(vdp); /* we want ourself, ie "." */
- *vpp = vdp;
- } else {
- if ((error = VFS_VGET(vdp->v_mount, dp->i_ino, &tdp)) != 0)
- return (error);
- if (!lockparent || !(flags & ISLASTCN))
- VOP_UNLOCK(pdp, 0, p);
- *vpp = tdp;
- }
-
- /*
- * Insert name into cache if appropriate.
- */
- if (cnp->cn_flags & MAKEENTRY)
- cache_enter(vdp, *vpp, cnp);
- return (0);
-}
-
-/*
- * Do consistency checking on a directory entry:
- * record length must be multiple of 4
- * entry must fit in rest of its DIRBLKSIZ block
- * record must be large enough to contain entry
- * name is not longer than MAXNAMLEN
- * name must be as long as advertised, and null terminated
- */
-/*
- * changed so that it confirms to ext2_check_dir_entry
- */
-static int
-ext2_dirbadentry(dp, de, entryoffsetinblock)
- struct vnode *dp;
- register struct ext2_dir_entry_2 *de;
- int entryoffsetinblock;
-{
- int DIRBLKSIZ = VTOI(dp)->i_e2fs->s_blocksize;
-
- char * error_msg = NULL;
-
- if (de->rec_len < EXT2_DIR_REC_LEN(1))
- error_msg = "rec_len is smaller than minimal";
- else if (de->rec_len % 4 != 0)
- error_msg = "rec_len % 4 != 0";
- else if (de->rec_len < EXT2_DIR_REC_LEN(de->name_len))
- error_msg = "reclen is too small for name_len";
- else if (entryoffsetinblock + de->rec_len > DIRBLKSIZ)
- error_msg = "directory entry across blocks";
- /* else LATER
- if (de->inode > dir->i_sb->u.ext2_sb.s_es->s_inodes_count)
- error_msg = "inode out of bounds";
- */
-
- if (error_msg != NULL) {
- printf("bad directory entry: %s\n", error_msg);
- printf("offset=%d, inode=%lu, rec_len=%u, name_len=%u\n",
- entryoffsetinblock, (unsigned long)de->inode,
- de->rec_len, de->name_len);
- }
- return error_msg == NULL ? 0 : 1;
-}
-
-/*
- * Write a directory entry after a call to namei, using the parameters
- * that it left in nameidata. The argument ip is the inode which the new
- * directory entry will refer to. Dvp is a pointer to the directory to
- * be written, which was left locked by namei. Remaining parameters
- * (dp->i_offset, dp->i_count) indicate how the space for the new
- * entry is to be obtained.
- */
-int
-ext2_direnter(ip, dvp, cnp)
- struct inode *ip;
- struct vnode *dvp;
- register struct componentname *cnp;
-{
- register struct ext2_dir_entry_2 *ep, *nep;
- register struct inode *dp;
- struct buf *bp;
- struct ext2_dir_entry_2 newdir;
- struct iovec aiov;
- struct uio auio;
- u_int dsize;
- int error, loc, newentrysize, spacefree;
- char *dirbuf;
- int DIRBLKSIZ = ip->i_e2fs->s_blocksize;
-
-
-#if DIAGNOSTIC
- if ((cnp->cn_flags & SAVENAME) == 0)
- panic("direnter: missing name");
-#endif
- dp = VTOI(dvp);
- newdir.inode = ip->i_number;
- newdir.name_len = cnp->cn_namelen;
- if (EXT2_HAS_INCOMPAT_FEATURE(ip->i_e2fs->s_es,
- EXT2_FEATURE_INCOMPAT_FILETYPE))
- newdir.file_type = DTTOFT(IFTODT(ip->i_mode));
- else
- newdir.file_type = EXT2_FT_UNKNOWN;
- bcopy(cnp->cn_nameptr, newdir.name, (unsigned)cnp->cn_namelen + 1);
- newentrysize = EXT2_DIR_REC_LEN(newdir.name_len);
- if (dp->i_count == 0) {
- /*
- * If dp->i_count is 0, then namei could find no
- * space in the directory. Here, dp->i_offset will
- * be on a directory block boundary and we will write the
- * new entry into a fresh block.
- */
- if (dp->i_offset & (DIRBLKSIZ - 1))
- panic("ext2_direnter: newblk");
- auio.uio_offset = dp->i_offset;
- newdir.rec_len = DIRBLKSIZ;
- auio.uio_resid = newentrysize;
- aiov.iov_len = newentrysize;
- aiov.iov_base = (caddr_t)&newdir;
- auio.uio_iov = &aiov;
- auio.uio_iovcnt = 1;
- auio.uio_rw = UIO_WRITE;
- auio.uio_segflg = UIO_SYSSPACE;
- auio.uio_procp = (struct proc *)0;
- error = VOP_WRITE(dvp, &auio, IO_SYNC, cnp->cn_cred);
- if (DIRBLKSIZ >
- VFSTOUFS(dvp->v_mount)->um_mountp->mnt_stat.f_bsize)
- /* XXX should grow with balloc() */
- panic("ext2_direnter: frag size");
- else if (!error) {
- dp->i_size = roundup(dp->i_size, DIRBLKSIZ);
- dp->i_flag |= IN_CHANGE;
- }
- return (error);
- }
-
- /*
- * If dp->i_count is non-zero, then namei found space
- * for the new entry in the range dp->i_offset to
- * dp->i_offset + dp->i_count in the directory.
- * To use this space, we may have to compact the entries located
- * there, by copying them together towards the beginning of the
- * block, leaving the free space in one usable chunk at the end.
- */
-
- /*
- * Increase size of directory if entry eats into new space.
- * This should never push the size past a new multiple of
- * DIRBLKSIZE.
- *
- * N.B. - THIS IS AN ARTIFACT OF 4.2 AND SHOULD NEVER HAPPEN.
- */
- if (dp->i_offset + dp->i_count > dp->i_size)
- dp->i_size = dp->i_offset + dp->i_count;
- /*
- * Get the block containing the space for the new directory entry.
- */
- if ((error = UFS_BLKATOFF(dvp, (off_t)dp->i_offset, &dirbuf, &bp)) != 0)
- return (error);
- /*
- * Find space for the new entry. In the simple case, the entry at
- * offset base will have the space. If it does not, then namei
- * arranged that compacting the region dp->i_offset to
- * dp->i_offset + dp->i_count would yield the
- * space.
- */
- ep = (struct ext2_dir_entry_2 *)dirbuf;
- dsize = EXT2_DIR_REC_LEN(ep->name_len);
- spacefree = ep->rec_len - dsize;
- for (loc = ep->rec_len; loc < dp->i_count; ) {
- nep = (struct ext2_dir_entry_2 *)(dirbuf + loc);
- if (ep->inode) {
- /* trim the existing slot */
- ep->rec_len = dsize;
- ep = (struct ext2_dir_entry_2 *)((char *)ep + dsize);
- } else {
- /* overwrite; nothing there; header is ours */
- spacefree += dsize;
- }
- dsize = EXT2_DIR_REC_LEN(nep->name_len);
- spacefree += nep->rec_len - dsize;
- loc += nep->rec_len;
- bcopy((caddr_t)nep, (caddr_t)ep, dsize);
- }
- /*
- * Update the pointer fields in the previous entry (if any),
- * copy in the new entry, and write out the block.
- */
- if (ep->inode == 0) {
- if (spacefree + dsize < newentrysize)
- panic("ext2_direnter: compact1");
- newdir.rec_len = spacefree + dsize;
- } else {
- if (spacefree < newentrysize)
- panic("ext2_direnter: compact2");
- newdir.rec_len = spacefree;
- ep->rec_len = dsize;
- ep = (struct ext2_dir_entry_2 *)((char *)ep + dsize);
- }
- bcopy((caddr_t)&newdir, (caddr_t)ep, (u_int)newentrysize);
- error = BUF_WRITE(bp);
- dp->i_flag |= IN_CHANGE | IN_UPDATE;
- if (!error && dp->i_endoff && dp->i_endoff < dp->i_size)
- error = UFS_TRUNCATE(dvp, (off_t)dp->i_endoff, IO_SYNC,
- cnp->cn_cred, cnp->cn_proc);
- return (error);
-}
-
-/*
- * Remove a directory entry after a call to namei, using
- * the parameters which it left in nameidata. The entry
- * dp->i_offset contains the offset into the directory of the
- * entry to be eliminated. The dp->i_count field contains the
- * size of the previous record in the directory. If this
- * is 0, the first entry is being deleted, so we need only
- * zero the inode number to mark the entry as free. If the
- * entry is not the first in the directory, we must reclaim
- * the space of the now empty record by adding the record size
- * to the size of the previous entry.
- */
-int
-ext2_dirremove(dvp, cnp)
- struct vnode *dvp;
- struct componentname *cnp;
-{
- register struct inode *dp;
- struct ext2_dir_entry_2 *ep;
- struct buf *bp;
- int error;
-
- dp = VTOI(dvp);
- if (dp->i_count == 0) {
- /*
- * First entry in block: set d_ino to zero.
- */
- if ((error =
- UFS_BLKATOFF(dvp, (off_t)dp->i_offset, (char **)&ep, &bp)) != 0)
- return (error);
- ep->inode = 0;
- error = BUF_WRITE(bp);
- dp->i_flag |= IN_CHANGE | IN_UPDATE;
- return (error);
- }
- /*
- * Collapse new free space into previous entry.
- */
- if ((error = UFS_BLKATOFF(dvp, (off_t)(dp->i_offset - dp->i_count),
- (char **)&ep, &bp)) != 0)
- return (error);
- ep->rec_len += dp->i_reclen;
- error = BUF_WRITE(bp);
- dp->i_flag |= IN_CHANGE | IN_UPDATE;
- return (error);
-}
-
-/*
- * Rewrite an existing directory entry to point at the inode
- * supplied. The parameters describing the directory entry are
- * set up by a call to namei.
- */
-int
-ext2_dirrewrite(dp, ip, cnp)
- struct inode *dp, *ip;
- struct componentname *cnp;
-{
- struct buf *bp;
- struct ext2_dir_entry_2 *ep;
- struct vnode *vdp = ITOV(dp);
- int error;
-
- if ((error = UFS_BLKATOFF(vdp, (off_t)dp->i_offset, (char **)&ep, &bp)) != 0)
- return (error);
- ep->inode = ip->i_number;
- if (EXT2_HAS_INCOMPAT_FEATURE(ip->i_e2fs->s_es,
- EXT2_FEATURE_INCOMPAT_FILETYPE))
- ep->file_type = DTTOFT(IFTODT(ip->i_mode));
- else
- ep->file_type = EXT2_FT_UNKNOWN;
- error = BUF_WRITE(bp);
- dp->i_flag |= IN_CHANGE | IN_UPDATE;
- return (error);
-}
-
-/*
- * Check if a directory is empty or not.
- * Inode supplied must be locked.
- *
- * Using a struct dirtemplate here is not precisely
- * what we want, but better than using a struct direct.
- *
- * NB: does not handle corrupted directories.
- */
-int
-ext2_dirempty(ip, parentino, cred)
- register struct inode *ip;
- ino_t parentino;
- struct ucred *cred;
-{
- register off_t off;
- struct dirtemplate dbuf;
- register struct ext2_dir_entry_2 *dp = (struct ext2_dir_entry_2 *)&dbuf;
- int error, count, namlen;
-
-#define MINDIRSIZ (sizeof (struct dirtemplate) / 2)
-
- for (off = 0; off < ip->i_size; off += dp->rec_len) {
- error = vn_rdwr(UIO_READ, ITOV(ip), (caddr_t)dp, MINDIRSIZ, off,
- UIO_SYSSPACE, IO_NODELOCKED, cred, &count, (struct proc *)0);
- /*
- * Since we read MINDIRSIZ, residual must
- * be 0 unless we're at end of file.
- */
- if (error || count != 0)
- return (0);
- /* avoid infinite loops */
- if (dp->rec_len == 0)
- return (0);
- /* skip empty entries */
- if (dp->inode == 0)
- continue;
- /* accept only "." and ".." */
- namlen = dp->name_len;
- if (namlen > 2)
- return (0);
- if (dp->name[0] != '.')
- return (0);
- /*
- * At this point namlen must be 1 or 2.
- * 1 implies ".", 2 implies ".." if second
- * char is also "."
- */
- if (namlen == 1)
- continue;
- if (dp->name[1] == '.' && dp->inode == parentino)
- continue;
- return (0);
- }
- return (1);
-}
-
-/*
- * Check if source directory is in the path of the target directory.
- * Target is supplied locked, source is unlocked.
- * The target is always vput before returning.
- */
-int
-ext2_checkpath(source, target, cred)
- struct inode *source, *target;
- struct ucred *cred;
-{
- struct vnode *vp;
- int error, rootino, namlen;
- struct dirtemplate dirbuf;
-
- vp = ITOV(target);
- if (target->i_number == source->i_number) {
- error = EEXIST;
- goto out;
- }
- rootino = ROOTINO;
- error = 0;
- if (target->i_number == rootino)
- goto out;
-
- for (;;) {
- if (vp->v_type != VDIR) {
- error = ENOTDIR;
- break;
- }
- error = vn_rdwr(UIO_READ, vp, (caddr_t)&dirbuf,
- sizeof (struct dirtemplate), (off_t)0, UIO_SYSSPACE,
- IO_NODELOCKED, cred, (int *)0, (struct proc *)0);
- if (error != 0)
- break;
- namlen = dirbuf.dotdot_type; /* like ufs little-endian */
- if (namlen != 2 ||
- dirbuf.dotdot_name[0] != '.' ||
- dirbuf.dotdot_name[1] != '.') {
- error = ENOTDIR;
- break;
- }
- if (dirbuf.dotdot_ino == source->i_number) {
- error = EINVAL;
- break;
- }
- if (dirbuf.dotdot_ino == rootino)
- break;
- vput(vp);
- if ((error = VFS_VGET(vp->v_mount, dirbuf.dotdot_ino, &vp)) != 0) {
- vp = NULL;
- break;
- }
- }
-
-out:
- if (error == ENOTDIR)
- printf("checkpath: .. not a directory\n");
- if (vp != NULL)
- vput(vp);
- return (error);
-}
-
diff --git a/sys/gnu/ext2fs/ext2_mount.h b/sys/gnu/ext2fs/ext2_mount.h
deleted file mode 100644
index 0652545..0000000
--- a/sys/gnu/ext2fs/ext2_mount.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1989, 1993
- * The Regents of the University of California. 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 product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ufsmount.h 8.6 (Berkeley) 3/30/95
- * $FreeBSD$
- */
-
-#ifndef _UFS_UFS_UFSMOUNT_H_
-#define _UFS_UFS_UFSMOUNT_H_
-
-/*
- * Arguments to mount UFS-based filesystems
- */
-struct ufs_args {
- char *fspec; /* block special device to mount */
- struct export_args export; /* network export information */
-};
-
-/*
- * Arguments to mount MFS
- */
-struct mfs_args {
- char *fspec; /* name to export for statfs */
- struct export_args export; /* if exported MFSes are supported */
- caddr_t base; /* base of file system in memory */
- u_long size; /* size of file system */
-};
-
-#ifdef _KERNEL
-
-#ifdef MALLOC_DECLARE
-MALLOC_DECLARE(M_UFSMNT);
-#endif
-
-struct buf;
-struct inode;
-struct nameidata;
-struct timeval;
-struct ucred;
-struct uio;
-struct vnode;
-struct netexport;
-
-/* This structure describes the UFS specific mount structure data. */
-struct ufsmount {
- struct mount *um_mountp; /* filesystem vfs structure */
- dev_t um_dev; /* device mounted */
- struct vnode *um_devvp; /* block device mounted vnode */
-
- union { /* pointer to superblock */
- struct fs *fs; /* FFS */
- struct ext2_sb_info *e2fs; /* EXT2FS */
- } ufsmount_u;
-#define um_fs ufsmount_u.fs
-#define um_e2fs ufsmount_u.e2fs
-#define um_e2fsb ufsmount_u.e2fs->s_es
-
- struct vnode *um_quotas[MAXQUOTAS]; /* pointer to quota files */
- struct ucred *um_cred[MAXQUOTAS]; /* quota file access cred */
- u_long um_nindir; /* indirect ptrs per block */
- u_long um_bptrtodb; /* indir ptr to disk block */
- u_long um_seqinc; /* inc between seq blocks */
- time_t um_btime[MAXQUOTAS]; /* block quota time limit */
- time_t um_itime[MAXQUOTAS]; /* inode quota time limit */
- char um_qflags[MAXQUOTAS]; /* quota specific flags */
- struct netexport um_export; /* export information */
- int64_t um_savedmaxfilesize; /* XXX - limit maxfilesize */
- struct malloc_type *um_malloctype; /* The inodes malloctype */
- int um_i_effnlink_valid; /* i_effnlink valid? */
- int (*um_blkatoff) __P((struct vnode *, off_t, char **, struct buf **));
- int (*um_truncate) __P((struct vnode *, off_t, int, struct ucred *, struct proc *));
- int (*um_update) __P((struct vnode *, int));
- int (*um_valloc) __P((struct vnode *, int, struct ucred *, struct vnode **));
- int (*um_vfree) __P((struct vnode *, ino_t, int));
-};
-
-#define UFS_BLKATOFF(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_blkatoff(aa, bb, cc, dd)
-#define UFS_TRUNCATE(aa, bb, cc, dd, ee) VFSTOUFS((aa)->v_mount)->um_truncate(aa, bb, cc, dd, ee)
-#define UFS_UPDATE(aa, bb) VFSTOUFS((aa)->v_mount)->um_update(aa, bb)
-#define UFS_VALLOC(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_valloc(aa, bb, cc, dd)
-#define UFS_VFREE(aa, bb, cc) VFSTOUFS((aa)->v_mount)->um_vfree(aa, bb, cc)
-
-/*
- * Flags describing the state of quotas.
- */
-#define QTF_OPENING 0x01 /* Q_QUOTAON in progress */
-#define QTF_CLOSING 0x02 /* Q_QUOTAOFF in progress */
-
-/* Convert mount ptr to ufsmount ptr. */
-#define VFSTOUFS(mp) ((struct ufsmount *)((mp)->mnt_data))
-
-/*
- * Macros to access file system parameters in the ufsmount structure.
- * Used by ufs_bmap.
- */
-#define MNINDIR(ump) ((ump)->um_nindir)
-#define blkptrtodb(ump, b) ((b) << (ump)->um_bptrtodb)
-#define is_sequential(ump, a, b) ((b) == (a) + ump->um_seqinc)
-#endif /* _KERNEL */
-
-#endif
diff --git a/sys/gnu/ext2fs/ext2_readwrite.c b/sys/gnu/ext2fs/ext2_readwrite.c
deleted file mode 100644
index f054a6e..0000000
--- a/sys/gnu/ext2fs/ext2_readwrite.c
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
- * modified for Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- */
-/*
- * Copyright (c) 1993
- * The Regents of the University of California. 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 product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ufs_readwrite.c 8.7 (Berkeley) 1/21/94
- * $FreeBSD$
- */
-
-#define BLKSIZE(a, b, c) blksize(a, b, c)
-#define FS struct ext2_sb_info
-#define I_FS i_e2fs
-#define READ ext2_read
-#define READ_S "ext2_read"
-#define WRITE ext2_write
-#define WRITE_S "ext2_write"
-
-/*
- * Vnode op for reading.
- */
-/* ARGSUSED */
-static int
-READ(ap)
- struct vop_read_args /* {
- struct vnode *a_vp;
- struct uio *a_uio;
- int a_ioflag;
- struct ucred *a_cred;
- } */ *ap;
-{
- register struct vnode *vp;
- register struct inode *ip;
- register struct uio *uio;
- register FS *fs;
- struct buf *bp;
- daddr_t lbn, nextlbn;
- off_t bytesinfile;
- long size, xfersize, blkoffset;
- int error, orig_resid;
- int seqcount = ap->a_ioflag >> 16;
- u_short mode;
-
- vp = ap->a_vp;
- ip = VTOI(vp);
- mode = ip->i_mode;
- uio = ap->a_uio;
-
-#ifdef DIAGNOSTIC
- if (uio->uio_rw != UIO_READ)
- panic("%s: mode", READ_S);
-
- if (vp->v_type == VLNK) {
- if ((int)ip->i_size < vp->v_mount->mnt_maxsymlinklen)
- panic("%s: short symlink", READ_S);
- } else if (vp->v_type != VREG && vp->v_type != VDIR)
- panic("%s: type %d", READ_S, vp->v_type);
-#endif
- fs = ip->I_FS;
-#if 0
- if ((u_quad_t)uio->uio_offset > fs->fs_maxfilesize)
- return (EFBIG);
-#endif
-
- orig_resid = uio->uio_resid;
- for (error = 0, bp = NULL; uio->uio_resid > 0; bp = NULL) {
- if ((bytesinfile = ip->i_size - uio->uio_offset) <= 0)
- break;
- lbn = lblkno(fs, uio->uio_offset);
- nextlbn = lbn + 1;
- size = BLKSIZE(fs, ip, lbn);
- blkoffset = blkoff(fs, uio->uio_offset);
-
- xfersize = fs->s_frag_size - blkoffset;
- if (uio->uio_resid < xfersize)
- xfersize = uio->uio_resid;
- if (bytesinfile < xfersize)
- xfersize = bytesinfile;
-
- if (lblktosize(fs, nextlbn) >= ip->i_size)
- error = bread(vp, lbn, size, NOCRED, &bp);
- else if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERR) == 0)
- error = cluster_read(vp,
- ip->i_size, lbn, size, NOCRED,
- uio->uio_resid, (ap->a_ioflag >> 16), &bp);
- else if (seqcount > 1) {
- int nextsize = BLKSIZE(fs, ip, nextlbn);
- error = breadn(vp, lbn,
- size, &nextlbn, &nextsize, 1, NOCRED, &bp);
- } else
- error = bread(vp, lbn, size, NOCRED, &bp);
- if (error) {
- brelse(bp);
- bp = NULL;
- break;
- }
-
- /*
- * We should only get non-zero b_resid when an I/O error
- * has occurred, which should cause us to break above.
- * However, if the short read did not cause an error,
- * then we want to ensure that we do not uiomove bad
- * or uninitialized data.
- */
- size -= bp->b_resid;
- if (size < xfersize) {
- if (size == 0)
- break;
- xfersize = size;
- }
- error =
- uiomove((char *)bp->b_data + blkoffset, (int)xfersize, uio);
- if (error)
- break;
-
- bqrelse(bp);
- }
- if (bp != NULL)
- bqrelse(bp);
- if (orig_resid > 0 && (error == 0 || uio->uio_resid != orig_resid) &&
- (vp->v_mount->mnt_flag & MNT_NOATIME) == 0)
- ip->i_flag |= IN_ACCESS;
- return (error);
-}
-
-/*
- * Vnode op for writing.
- */
-static int
-WRITE(ap)
- struct vop_write_args /* {
- struct vnode *a_vp;
- struct uio *a_uio;
- int a_ioflag;
- struct ucred *a_cred;
- } */ *ap;
-{
- register struct vnode *vp;
- register struct uio *uio;
- register struct inode *ip;
- register FS *fs;
- struct buf *bp;
- struct proc *p;
- daddr_t lbn;
- off_t osize;
- int seqcount;
- int blkoffset, error, flags, ioflag, resid, size, xfersize;
-
- ioflag = ap->a_ioflag;
- seqcount = ap->a_ioflag >> 16;
- uio = ap->a_uio;
- vp = ap->a_vp;
- ip = VTOI(vp);
-
-#ifdef DIAGNOSTIC
- if (uio->uio_rw != UIO_WRITE)
- panic("%s: mode", WRITE_S);
-#endif
-
- switch (vp->v_type) {
- case VREG:
- if (ioflag & IO_APPEND)
- uio->uio_offset = ip->i_size;
- if ((ip->i_flags & APPEND) && uio->uio_offset != ip->i_size)
- return (EPERM);
- /* FALLTHROUGH */
- case VLNK:
- break;
- case VDIR:
- if ((ioflag & IO_SYNC) == 0)
- panic("%s: nonsync dir write", WRITE_S);
- break;
- default:
- panic("%s: type", WRITE_S);
- }
-
- fs = ip->I_FS;
-#if 0
- if (uio->uio_offset < 0 ||
- (u_quad_t)uio->uio_offset + uio->uio_resid > fs->fs_maxfilesize)
- return (EFBIG);
-#endif
- /*
- * Maybe this should be above the vnode op call, but so long as
- * file servers have no limits, I don't think it matters.
- */
- p = uio->uio_procp;
- if (vp->v_type == VREG && p &&
- uio->uio_offset + uio->uio_resid >
- p->p_rlimit[RLIMIT_FSIZE].rlim_cur) {
- psignal(p, SIGXFSZ);
- return (EFBIG);
- }
-
- resid = uio->uio_resid;
- osize = ip->i_size;
- flags = ioflag & IO_SYNC ? B_SYNC : 0;
-
- for (error = 0; uio->uio_resid > 0;) {
- lbn = lblkno(fs, uio->uio_offset);
- blkoffset = blkoff(fs, uio->uio_offset);
- xfersize = fs->s_frag_size - blkoffset;
- if (uio->uio_resid < xfersize)
- xfersize = uio->uio_resid;
-
- if (uio->uio_offset + xfersize > ip->i_size)
- vnode_pager_setsize(vp, uio->uio_offset + xfersize);
-
- if (fs->s_frag_size > xfersize)
- flags |= B_CLRBUF;
- else
- flags &= ~B_CLRBUF;
-
- error = ext2_balloc(ip,
- lbn, blkoffset + xfersize, ap->a_cred, &bp, flags);
- if (error)
- break;
-
- if (uio->uio_offset + xfersize > ip->i_size) {
- ip->i_size = uio->uio_offset + xfersize;
- }
-
- size = BLKSIZE(fs, ip, lbn) - bp->b_resid;
- if (size < xfersize)
- xfersize = size;
-
- error =
- uiomove((char *)bp->b_data + blkoffset, (int)xfersize, uio);
- if ((ioflag & IO_VMIO) &&
- (LIST_FIRST(&bp->b_dep) == NULL)) /* in ext2fs? */
- bp->b_flags |= B_RELBUF;
-
- if (ioflag & IO_SYNC) {
- (void)bwrite(bp);
- } else if (xfersize + blkoffset == fs->s_frag_size) {
- if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERW) == 0) {
- bp->b_flags |= B_CLUSTEROK;
- cluster_write(bp, ip->i_size, seqcount);
- } else {
- bawrite(bp);
- }
- } else {
- bp->b_flags |= B_CLUSTEROK;
- bdwrite(bp);
- }
- if (error || xfersize == 0)
- break;
- ip->i_flag |= IN_CHANGE | IN_UPDATE;
- }
- /*
- * If we successfully wrote any data, and we are not the superuser
- * we clear the setuid and setgid bits as a precaution against
- * tampering.
- */
- if (resid > uio->uio_resid && ap->a_cred && ap->a_cred->cr_uid != 0)
- ip->i_mode &= ~(ISUID | ISGID);
- if (error) {
- if (ioflag & IO_UNIT) {
- (void)UFS_TRUNCATE(vp, osize,
- ioflag & IO_SYNC, ap->a_cred, uio->uio_procp);
- uio->uio_offset -= resid - uio->uio_resid;
- uio->uio_resid = resid;
- }
- } else if (resid > uio->uio_resid && (ioflag & IO_SYNC))
- error = UFS_UPDATE(vp, 1);
- return (error);
-}
diff --git a/sys/gnu/ext2fs/ext2_subr.c b/sys/gnu/ext2fs/ext2_subr.c
deleted file mode 100644
index 8ceac74..0000000
--- a/sys/gnu/ext2fs/ext2_subr.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * modified for Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- */
-/*
- * Copyright (c) 1982, 1986, 1989, 1993
- * The Regents of the University of California. 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 product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ext2_subr.c 8.2 (Berkeley) 9/21/93
- */
-
-#include <sys/param.h>
-#include <gnu/ext2fs/ext2_fs_sb.h>
-#include <gnu/ext2fs/fs.h>
-
-#include <sys/lock.h>
-#include <sys/systm.h>
-#include <sys/ucred.h>
-#include <sys/vnode.h>
-#include <gnu/ext2fs/ext2_extern.h>
-#include <sys/buf.h>
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/inode.h>
-
-#include "opt_ddb.h"
-
-#ifdef DDB
-void ext2_checkoverlap __P((struct buf *, struct inode *));
-#endif
-
-/*
- * Return buffer with the contents of block "offset" from the beginning of
- * directory "ip". If "res" is non-zero, fill it in with a pointer to the
- * remaining space in the directory.
- */
-int
-ext2_blkatoff(vp, offset, res, bpp)
- struct vnode *vp;
- off_t offset;
- char **res;
- struct buf **bpp;
-{
- struct inode *ip;
- register struct ext2_sb_info *fs;
- struct buf *bp;
- daddr_t lbn;
- int bsize, error;
-
- ip = VTOI(vp);
- fs = ip->i_e2fs;
- lbn = lblkno(fs, offset);
- bsize = blksize(fs, ip, lbn);
-
- *bpp = NULL;
- if ((error = bread(vp, lbn, bsize, NOCRED, &bp)) != 0) {
- brelse(bp);
- return (error);
- }
- if (res)
- *res = (char *)bp->b_data + blkoff(fs, offset);
- *bpp = bp;
- return (0);
-}
-
-#ifdef DDB
-void
-ext2_checkoverlap(bp, ip)
- struct buf *bp;
- struct inode *ip;
-{
- register struct buf *ebp, *ep;
- register daddr_t start, last;
- struct vnode *vp;
-
- ebp = &buf[nbuf];
- start = bp->b_blkno;
- last = start + btodb(bp->b_bcount) - 1;
- for (ep = buf; ep < ebp; ep++) {
- if (ep == bp || (ep->b_flags & B_INVAL) ||
- ep->b_vp == NULLVP)
- continue;
- if (VOP_BMAP(ep->b_vp, (daddr_t)0, &vp, (daddr_t)0, NULL, NULL))
- continue;
- if (vp != ip->i_devvp)
- continue;
- /* look for overlap */
- if (ep->b_bcount == 0 || ep->b_blkno > last ||
- ep->b_blkno + btodb(ep->b_bcount) <= start)
- continue;
- vprint("Disk overlap", vp);
- (void)printf("\tstart %d, end %d overlap start %d, end %d\n",
- start, last, ep->b_blkno,
- ep->b_blkno + btodb(ep->b_bcount) - 1);
- panic("Disk buffer overlap");
- }
-}
-#endif /* DDB */
diff --git a/sys/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/ext2fs/ext2_vfsops.c
deleted file mode 100644
index a56a443..0000000
--- a/sys/gnu/ext2fs/ext2_vfsops.c
+++ /dev/null
@@ -1,1197 +0,0 @@
-/*
- * modified for EXT2FS support in Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- */
-/*
- * Copyright (c) 1989, 1991, 1993, 1994
- * The Regents of the University of California. 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 product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ffs_vfsops.c 8.8 (Berkeley) 4/18/94
- * $FreeBSD$
- */
-
-#include "opt_quota.h"
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/namei.h>
-#include <sys/proc.h>
-#include <sys/kernel.h>
-#include <sys/vnode.h>
-#include <sys/mount.h>
-#include <sys/buf.h>
-#include <sys/conf.h>
-#include <sys/fcntl.h>
-#include <sys/disklabel.h>
-#include <sys/malloc.h>
-#include <sys/stat.h>
-
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/ufsmount.h>
-#include <ufs/ufs/inode.h>
-#include <ufs/ufs/ufs_extern.h>
-
-#include <vm/vm_zone.h>
-
-#include <gnu/ext2fs/fs.h>
-#include <gnu/ext2fs/ext2_extern.h>
-#include <gnu/ext2fs/ext2_fs.h>
-#include <gnu/ext2fs/ext2_fs_sb.h>
-
-static int ext2_fhtovp __P((struct mount *, struct fid *, struct vnode **));
-static int ext2_flushfiles __P((struct mount *mp, int flags, struct proc *p));
-static int ext2_mount __P((struct mount *,
- char *, caddr_t, struct nameidata *, struct proc *));
-static int ext2_mountfs __P((struct vnode *, struct mount *, struct proc *));
-static int ext2_reload __P((struct mount *mountp, struct ucred *cred,
- struct proc *p));
-static int ext2_sbupdate __P((struct ufsmount *, int));
-static int ext2_statfs __P((struct mount *, struct statfs *, struct proc *));
-static int ext2_sync __P((struct mount *, int, struct ucred *, struct proc *));
-static int ext2_unmount __P((struct mount *, int, struct proc *));
-static int ext2_vget __P((struct mount *, ino_t, struct vnode **));
-static int ext2_vptofh __P((struct vnode *, struct fid *));
-
-static MALLOC_DEFINE(M_EXT2NODE, "EXT2 node", "EXT2 vnode private part");
-
-static struct vfsops ext2fs_vfsops = {
- ext2_mount,
- ufs_start, /* empty function */
- ext2_unmount,
- ufs_root, /* root inode via vget */
- ufs_quotactl, /* does operations associated with quotas */
- ext2_statfs,
- ext2_sync,
- ext2_vget,
- ext2_fhtovp,
- ufs_check_export,
- ext2_vptofh,
- ext2_init,
- vfs_stduninit,
- vfs_stdextattrctl,
-};
-
-VFS_SET(ext2fs_vfsops, ext2fs, 0);
-#define bsd_malloc malloc
-#define bsd_free free
-
-static int ext2fs_inode_hash_lock;
-
-static int ext2_check_sb_compat __P((struct ext2_super_block *es,
- dev_t dev, int ronly));
-static int compute_sb_data __P((struct vnode * devvp,
- struct ext2_super_block * es,
- struct ext2_sb_info * fs));
-
-#ifdef notyet
-static int ext2_mountroot __P((void));
-
-/*
- * Called by main() when ext2fs is going to be mounted as root.
- *
- * Name is updated by mount(8) after booting.
- */
-#define ROOTNAME "root_device"
-
-static int
-ext2_mountroot()
-{
- register struct ext2_sb_info *fs;
- register struct mount *mp;
- struct proc *p = curproc;
- struct ufsmount *ump;
- u_int size;
- int error;
-
- if ((error = bdevvp(rootdev, &rootvp))) {
- printf("ext2_mountroot: can't find rootvp\n");
- return (error);
- }
- mp = bsd_malloc((u_long)sizeof(struct mount), M_MOUNT, M_WAITOK);
- bzero((char *)mp, (u_long)sizeof(struct mount));
- mp->mnt_op = &ext2fs_vfsops;
- mp->mnt_flag = MNT_RDONLY;
- if (error = ext2_mountfs(rootvp, mp, p)) {
- bsd_free(mp, M_MOUNT);
- return (error);
- }
- if (error = vfs_lock(mp)) {
- (void)ext2_unmount(mp, 0, p);
- bsd_free(mp, M_MOUNT);
- return (error);
- }
- TAILQ_INSERT_HEAD(&mountlist, mp, mnt_list);
- mp->mnt_flag |= MNT_ROOTFS;
- mp->mnt_vnodecovered = NULLVP;
- ump = VFSTOUFS(mp);
- fs = ump->um_e2fs;
- bzero(fs->fs_fsmnt, sizeof(fs->fs_fsmnt));
- fs->fs_fsmnt[0] = '/';
- bcopy((caddr_t)fs->fs_fsmnt, (caddr_t)mp->mnt_stat.f_mntonname,
- MNAMELEN);
- (void) copystr(ROOTNAME, mp->mnt_stat.f_mntfromname, MNAMELEN - 1,
- &size);
- bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size);
- (void)ext2_statfs(mp, &mp->mnt_stat, p);
- vfs_unlock(mp);
- inittodr(fs->s_es->s_wtime); /* this helps to set the time */
- return (0);
-}
-#endif
-
-/*
- * VFS Operations.
- *
- * mount system call
- */
-static int
-ext2_mount(mp, path, data, ndp, p)
- register struct mount *mp;
- char *path;
- caddr_t data; /* this is actually a (struct ufs_args *) */
- struct nameidata *ndp;
- struct proc *p;
-{
- struct vnode *devvp;
- struct ufs_args args;
- struct ufsmount *ump = 0;
- register struct ext2_sb_info *fs;
- u_int size;
- int error, flags;
- mode_t accessmode;
-
- if ((error = copyin(data, (caddr_t)&args, sizeof (struct ufs_args))) != 0)
- return (error);
- /*
- * If updating, check whether changing from read-only to
- * read/write; if there is no device name, that's all we do.
- */
- if (mp->mnt_flag & MNT_UPDATE) {
- ump = VFSTOUFS(mp);
- fs = ump->um_e2fs;
- error = 0;
- if (fs->s_rd_only == 0 && (mp->mnt_flag & MNT_RDONLY)) {
- flags = WRITECLOSE;
- if (mp->mnt_flag & MNT_FORCE)
- flags |= FORCECLOSE;
- if (vfs_busy(mp, LK_NOWAIT, 0, p))
- return (EBUSY);
- error = ext2_flushfiles(mp, flags, p);
- vfs_unbusy(mp, p);
- if (!error && fs->s_wasvalid) {
- fs->s_es->s_state |= EXT2_VALID_FS;
- ext2_sbupdate(ump, MNT_WAIT);
- }
- fs->s_rd_only = 1;
- }
- if (!error && (mp->mnt_flag & MNT_RELOAD))
- error = ext2_reload(mp, ndp->ni_cnd.cn_cred, p);
- if (error)
- return (error);
- devvp = ump->um_devvp;
- if (ext2_check_sb_compat(fs->s_es, devvp->v_rdev,
- (mp->mnt_kern_flag & MNTK_WANTRDWR) == 0) != 0)
- return (EPERM);
- if (fs->s_rd_only && (mp->mnt_kern_flag & MNTK_WANTRDWR)) {
- /*
- * If upgrade to read-write by non-root, then verify
- * that user has necessary permissions on the device.
- */
- if (p->p_ucred->cr_uid != 0) {
- vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
- if ((error = VOP_ACCESS(devvp, VREAD | VWRITE,
- p->p_ucred, p)) != 0) {
- VOP_UNLOCK(devvp, 0, p);
- return (error);
- }
- VOP_UNLOCK(devvp, 0, p);
- }
-
- if ((fs->s_es->s_state & EXT2_VALID_FS) == 0 ||
- (fs->s_es->s_state & EXT2_ERROR_FS)) {
- if (mp->mnt_flag & MNT_FORCE) {
- printf(
-"WARNING: %s was not properly dismounted\n",
- fs->fs_fsmnt);
- } else {
- printf(
-"WARNING: R/W mount of %s denied. Filesystem is not clean - run fsck\n",
- fs->fs_fsmnt);
- return (EPERM);
- }
- }
- fs->s_es->s_state &= ~EXT2_VALID_FS;
- ext2_sbupdate(ump, MNT_WAIT);
- fs->s_rd_only = 0;
- }
- if (args.fspec == 0) {
- /*
- * Process export requests.
- */
- return (vfs_export(mp, &ump->um_export, &args.export));
- }
- }
- /*
- * Not an update, or updating the name: look up the name
- * and verify that it refers to a sensible block device.
- */
- NDINIT(ndp, LOOKUP, FOLLOW, UIO_USERSPACE, args.fspec, p);
- if ((error = namei(ndp)) != 0)
- return (error);
- NDFREE(ndp, NDF_ONLY_PNBUF);
- devvp = ndp->ni_vp;
-
- if (!vn_isdisk(devvp, &error)) {
- vrele(devvp);
- return (error);
- }
-
- /*
- * If mount by non-root, then verify that user has necessary
- * permissions on the device.
- */
- if (p->p_ucred->cr_uid != 0) {
- accessmode = VREAD;
- if ((mp->mnt_flag & MNT_RDONLY) == 0)
- accessmode |= VWRITE;
- vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
- if ((error = VOP_ACCESS(devvp, accessmode, p->p_ucred, p)) != 0) {
- vput(devvp);
- return (error);
- }
- VOP_UNLOCK(devvp, 0, p);
- }
-
- if ((mp->mnt_flag & MNT_UPDATE) == 0) {
- error = ext2_mountfs(devvp, mp, p);
- } else {
- if (devvp != ump->um_devvp)
- error = EINVAL; /* needs translation */
- else
- vrele(devvp);
- }
- if (error) {
- vrele(devvp);
- return (error);
- }
- ump = VFSTOUFS(mp);
- fs = ump->um_e2fs;
- (void) copyinstr(path, fs->fs_fsmnt, sizeof(fs->fs_fsmnt) - 1, &size);
- bzero(fs->fs_fsmnt + size, sizeof(fs->fs_fsmnt) - size);
- bcopy((caddr_t)fs->fs_fsmnt, (caddr_t)mp->mnt_stat.f_mntonname,
- MNAMELEN);
- (void) copyinstr(args.fspec, mp->mnt_stat.f_mntfromname, MNAMELEN - 1,
- &size);
- bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size);
- (void)ext2_statfs(mp, &mp->mnt_stat, p);
- return (0);
-}
-
-/*
- * checks that the data in the descriptor blocks make sense
- * this is taken from ext2/super.c
- */
-static int ext2_check_descriptors (struct ext2_sb_info * sb)
-{
- int i;
- int desc_block = 0;
- unsigned long block = sb->s_es->s_first_data_block;
- struct ext2_group_desc * gdp = NULL;
-
- /* ext2_debug ("Checking group descriptors"); */
-
- for (i = 0; i < sb->s_groups_count; i++)
- {
- /* examine next descriptor block */
- if ((i % EXT2_DESC_PER_BLOCK(sb)) == 0)
- gdp = (struct ext2_group_desc *)
- sb->s_group_desc[desc_block++]->b_data;
- if (gdp->bg_block_bitmap < block ||
- gdp->bg_block_bitmap >= block + EXT2_BLOCKS_PER_GROUP(sb))
- {
- printf ("ext2_check_descriptors: "
- "Block bitmap for group %d"
- " not in group (block %lu)!\n",
- i, (unsigned long) gdp->bg_block_bitmap);
- return 0;
- }
- if (gdp->bg_inode_bitmap < block ||
- gdp->bg_inode_bitmap >= block + EXT2_BLOCKS_PER_GROUP(sb))
- {
- printf ("ext2_check_descriptors: "
- "Inode bitmap for group %d"
- " not in group (block %lu)!\n",
- i, (unsigned long) gdp->bg_inode_bitmap);
- return 0;
- }
- if (gdp->bg_inode_table < block ||
- gdp->bg_inode_table + sb->s_itb_per_group >=
- block + EXT2_BLOCKS_PER_GROUP(sb))
- {
- printf ("ext2_check_descriptors: "
- "Inode table for group %d"
- " not in group (block %lu)!\n",
- i, (unsigned long) gdp->bg_inode_table);
- return 0;
- }
- block += EXT2_BLOCKS_PER_GROUP(sb);
- gdp++;
- }
- return 1;
-}
-
-static int
-ext2_check_sb_compat(es, dev, ronly)
- struct ext2_super_block *es;
- dev_t dev;
- int ronly;
-{
-
- if (es->s_magic != EXT2_SUPER_MAGIC) {
- printf("ext2fs: %s: wrong magic number %#x (expected %#x)\n",
- devtoname(dev), es->s_magic, EXT2_SUPER_MAGIC);
- return (1);
- }
- if (es->s_rev_level > EXT2_GOOD_OLD_REV) {
- if (es->s_feature_incompat & ~EXT2_FEATURE_INCOMPAT_SUPP) {
- printf(
-"WARNING: mount of %s denied due to unsupported optional features\n",
- devtoname(dev));
- return (1);
- }
- if (!ronly &&
- (es->s_feature_ro_compat & ~EXT2_FEATURE_RO_COMPAT_SUPP)) {
- printf(
-"WARNING: R/W mount of %s denied due to unsupported optional features\n",
- devtoname(dev));
- return (1);
- }
- }
- return (0);
-}
-
-/*
- * this computes the fields of the ext2_sb_info structure from the
- * data in the ext2_super_block structure read in
- */
-static int compute_sb_data(devvp, es, fs)
- struct vnode * devvp;
- struct ext2_super_block * es;
- struct ext2_sb_info * fs;
-{
- int db_count, error;
- int i, j;
- int logic_sb_block = 1; /* XXX for now */
-
-#if 1
-#define V(v)
-#else
-#define V(v) printf(#v"= %d\n", fs->v);
-#endif
-
- fs->s_blocksize = EXT2_MIN_BLOCK_SIZE << es->s_log_block_size;
- V(s_blocksize)
- fs->s_bshift = EXT2_MIN_BLOCK_LOG_SIZE + es->s_log_block_size;
- V(s_bshift)
- fs->s_fsbtodb = es->s_log_block_size + 1;
- V(s_fsbtodb)
- fs->s_qbmask = fs->s_blocksize - 1;
- V(s_bmask)
- fs->s_blocksize_bits = EXT2_BLOCK_SIZE_BITS(es);
- V(s_blocksize_bits)
- fs->s_frag_size = EXT2_MIN_FRAG_SIZE << es->s_log_frag_size;
- V(s_frag_size)
- if (fs->s_frag_size)
- fs->s_frags_per_block = fs->s_blocksize / fs->s_frag_size;
- V(s_frags_per_block)
- fs->s_blocks_per_group = es->s_blocks_per_group;
- V(s_blocks_per_group)
- fs->s_frags_per_group = es->s_frags_per_group;
- V(s_frags_per_group)
- fs->s_inodes_per_group = es->s_inodes_per_group;
- V(s_inodes_per_group)
- fs->s_inodes_per_block = fs->s_blocksize / EXT2_INODE_SIZE;
- V(s_inodes_per_block)
- fs->s_itb_per_group = fs->s_inodes_per_group /fs->s_inodes_per_block;
- V(s_itb_per_group)
- fs->s_desc_per_block = fs->s_blocksize / sizeof (struct ext2_group_desc);
- V(s_desc_per_block)
- /* s_resuid / s_resgid ? */
- fs->s_groups_count = (es->s_blocks_count -
- es->s_first_data_block +
- EXT2_BLOCKS_PER_GROUP(fs) - 1) /
- EXT2_BLOCKS_PER_GROUP(fs);
- V(s_groups_count)
- db_count = (fs->s_groups_count + EXT2_DESC_PER_BLOCK(fs) - 1) /
- EXT2_DESC_PER_BLOCK(fs);
- fs->s_db_per_group = db_count;
- V(s_db_per_group)
-
- fs->s_group_desc = bsd_malloc(db_count * sizeof (struct buf *),
- M_UFSMNT, M_WAITOK);
-
- /* adjust logic_sb_block */
- if(fs->s_blocksize > SBSIZE)
- /* Godmar thinks: if the blocksize is greater than 1024, then
- the superblock is logically part of block zero.
- */
- logic_sb_block = 0;
-
- for (i = 0; i < db_count; i++) {
- error = bread(devvp , fsbtodb(fs, logic_sb_block + i + 1),
- fs->s_blocksize, NOCRED, &fs->s_group_desc[i]);
- if(error) {
- for (j = 0; j < i; j++)
- brelse(fs->s_group_desc[j]);
- bsd_free(fs->s_group_desc, M_UFSMNT);
- printf("EXT2-fs: unable to read group descriptors (%d)\n", error);
- return EIO;
- }
- /* Set the B_LOCKED flag on the buffer, then brelse() it */
- LCK_BUF(fs->s_group_desc[i])
- }
- if(!ext2_check_descriptors(fs)) {
- for (j = 0; j < db_count; j++)
- ULCK_BUF(fs->s_group_desc[j])
- bsd_free(fs->s_group_desc, M_UFSMNT);
- printf("EXT2-fs: (ext2_check_descriptors failure) "
- "unable to read group descriptors\n");
- return EIO;
- }
-
- for (i = 0; i < EXT2_MAX_GROUP_LOADED; i++) {
- fs->s_inode_bitmap_number[i] = 0;
- fs->s_inode_bitmap[i] = NULL;
- fs->s_block_bitmap_number[i] = 0;
- fs->s_block_bitmap[i] = NULL;
- }
- fs->s_loaded_inode_bitmaps = 0;
- fs->s_loaded_block_bitmaps = 0;
- return 0;
-}
-
-/*
- * Reload all incore data for a filesystem (used after running fsck on
- * the root filesystem and finding things to fix). The filesystem must
- * be mounted read-only.
- *
- * Things to do to update the mount:
- * 1) invalidate all cached meta-data.
- * 2) re-read superblock from disk.
- * 3) re-read summary information from disk.
- * 4) invalidate all inactive vnodes.
- * 5) invalidate all cached file data.
- * 6) re-read inode data for all active vnodes.
- */
-static int
-ext2_reload(mountp, cred, p)
- register struct mount *mountp;
- struct ucred *cred;
- struct proc *p;
-{
- register struct vnode *vp, *nvp, *devvp;
- struct inode *ip;
- struct buf *bp;
- struct ext2_super_block * es;
- struct ext2_sb_info *fs;
- int error;
-
- if ((mountp->mnt_flag & MNT_RDONLY) == 0)
- return (EINVAL);
- /*
- * Step 1: invalidate all cached meta-data.
- */
- devvp = VFSTOUFS(mountp)->um_devvp;
- if (vinvalbuf(devvp, 0, cred, p, 0, 0))
- panic("ext2_reload: dirty1");
- /*
- * Step 2: re-read superblock from disk.
- * constants have been adjusted for ext2
- */
- if ((error = bread(devvp, SBLOCK, SBSIZE, NOCRED, &bp)) != 0)
- return (error);
- es = (struct ext2_super_block *)bp->b_data;
- if (ext2_check_sb_compat(es, devvp->v_rdev, 0) != 0) {
- brelse(bp);
- return (EIO); /* XXX needs translation */
- }
- fs = VFSTOUFS(mountp)->um_e2fs;
- bcopy(bp->b_data, fs->s_es, sizeof(struct ext2_super_block));
-
- if((error = compute_sb_data(devvp, es, fs)) != 0) {
- brelse(bp);
- return error;
- }
-#ifdef UNKLAR
- if (fs->fs_sbsize < SBSIZE)
- bp->b_flags |= B_INVAL;
-#endif
- brelse(bp);
-
-loop:
- simple_lock(&mntvnode_slock);
- for (vp = mountp->mnt_vnodelist.lh_first; vp != NULL; vp = nvp) {
- if (vp->v_mount != mountp) {
- simple_unlock(&mntvnode_slock);
- goto loop;
- }
- nvp = vp->v_mntvnodes.le_next;
- /*
- * Step 4: invalidate all inactive vnodes.
- */
- if (vrecycle(vp, &mntvnode_slock, p))
- goto loop;
- /*
- * Step 5: invalidate all cached file data.
- */
- simple_lock(&vp->v_interlock);
- simple_unlock(&mntvnode_slock);
- if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, p)) {
- goto loop;
- }
- if (vinvalbuf(vp, 0, cred, p, 0, 0))
- panic("ext2_reload: dirty2");
- /*
- * Step 6: re-read inode data for all active vnodes.
- */
- ip = VTOI(vp);
- error =
- bread(devvp, fsbtodb(fs, ino_to_fsba(fs, ip->i_number)),
- (int)fs->s_blocksize, NOCRED, &bp);
- if (error) {
- vput(vp);
- return (error);
- }
- ext2_ei2di((struct ext2_inode *) ((char *)bp->b_data +
- EXT2_INODE_SIZE * ino_to_fsbo(fs, ip->i_number)),
- &ip->i_din);
- brelse(bp);
- vput(vp);
- simple_lock(&mntvnode_slock);
- }
- simple_unlock(&mntvnode_slock);
- return (0);
-}
-
-/*
- * Common code for mount and mountroot
- */
-static int
-ext2_mountfs(devvp, mp, p)
- register struct vnode *devvp;
- struct mount *mp;
- struct proc *p;
-{
- register struct ufsmount *ump;
- struct buf *bp;
- register struct ext2_sb_info *fs;
- struct ext2_super_block * es;
- dev_t dev = devvp->v_rdev;
- struct partinfo dpart;
- int havepart = 0;
- int error, i, size;
- int ronly;
-
- /*
- * Disallow multiple mounts of the same device.
- * Disallow mounting of a device that is currently in use
- * (except for root, which might share swap device for miniroot).
- * Flush out any old buffers remaining from a previous use.
- */
- if ((error = vfs_mountedon(devvp)) != 0)
- return (error);
- if (vcount(devvp) > 1 && devvp != rootvp)
- return (EBUSY);
- if ((error = vinvalbuf(devvp, V_SAVE, p->p_ucred, p, 0, 0)) != 0)
- return (error);
-#ifdef READONLY
-/* turn on this to force it to be read-only */
- mp->mnt_flag |= MNT_RDONLY;
-#endif
-
- ronly = (mp->mnt_flag & MNT_RDONLY) != 0;
- vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
- error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, p);
- VOP_UNLOCK(devvp, 0, p);
- if (error)
- return (error);
- if (VOP_IOCTL(devvp, DIOCGPART, (caddr_t)&dpart, FREAD, NOCRED, p) != 0)
- size = DEV_BSIZE;
- else {
- havepart = 1;
- size = dpart.disklab->d_secsize;
- }
-
- bp = NULL;
- ump = NULL;
- if ((error = bread(devvp, SBLOCK, SBSIZE, NOCRED, &bp)) != 0)
- goto out;
- es = (struct ext2_super_block *)bp->b_data;
- if (ext2_check_sb_compat(es, dev, ronly) != 0) {
- error = EINVAL; /* XXX needs translation */
- goto out;
- }
- if ((es->s_state & EXT2_VALID_FS) == 0 ||
- (es->s_state & EXT2_ERROR_FS)) {
- if (ronly || (mp->mnt_flag & MNT_FORCE)) {
- printf(
-"WARNING: Filesystem was not properly dismounted\n");
- } else {
- printf(
-"WARNING: R/W mount denied. Filesystem is not clean - run fsck\n");
- error = EPERM;
- goto out;
- }
- }
- ump = bsd_malloc(sizeof *ump, M_UFSMNT, M_WAITOK);
- bzero((caddr_t)ump, sizeof *ump);
- ump->um_malloctype = M_EXT2NODE;
- ump->um_blkatoff = ext2_blkatoff;
- ump->um_truncate = ext2_truncate;
- ump->um_update = ext2_update;
- ump->um_valloc = ext2_valloc;
- ump->um_vfree = ext2_vfree;
- /* I don't know whether this is the right strategy. Note that
- we dynamically allocate both a ext2_sb_info and a ext2_super_block
- while Linux keeps the super block in a locked buffer
- */
- ump->um_e2fs = bsd_malloc(sizeof(struct ext2_sb_info),
- M_UFSMNT, M_WAITOK);
- ump->um_e2fs->s_es = bsd_malloc(sizeof(struct ext2_super_block),
- M_UFSMNT, M_WAITOK);
- bcopy(es, ump->um_e2fs->s_es, (u_int)sizeof(struct ext2_super_block));
- if ((error = compute_sb_data(devvp, ump->um_e2fs->s_es, ump->um_e2fs)))
- goto out;
- /*
- * We don't free the group descriptors allocated by compute_sb_data()
- * until ext2_unmount(). This is OK since the mount will succeed.
- */
- brelse(bp);
- bp = NULL;
- fs = ump->um_e2fs;
- fs->s_rd_only = ronly; /* ronly is set according to mnt_flags */
- /* if the fs is not mounted read-only, make sure the super block is
- always written back on a sync()
- */
- fs->s_wasvalid = fs->s_es->s_state & EXT2_VALID_FS ? 1 : 0;
- if (ronly == 0) {
- fs->s_dirt = 1; /* mark it modified */
- fs->s_es->s_state &= ~EXT2_VALID_FS; /* set fs invalid */
- }
- mp->mnt_data = (qaddr_t)ump;
- mp->mnt_stat.f_fsid.val[0] = dev2udev(dev);
- mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum;
- mp->mnt_maxsymlinklen = EXT2_MAXSYMLINKLEN;
- mp->mnt_flag |= MNT_LOCAL;
- ump->um_mountp = mp;
- ump->um_dev = dev;
- ump->um_devvp = devvp;
- /* setting those two parameters allows us to use
- ufs_bmap w/o changse !
- */
- ump->um_nindir = EXT2_ADDR_PER_BLOCK(fs);
- ump->um_bptrtodb = fs->s_es->s_log_block_size + 1;
- ump->um_seqinc = EXT2_FRAGS_PER_BLOCK(fs);
- for (i = 0; i < MAXQUOTAS; i++)
- ump->um_quotas[i] = NULLVP;
- devvp->v_specmountpoint = mp;
- if (ronly == 0)
- ext2_sbupdate(ump, MNT_WAIT);
- return (0);
-out:
- if (bp)
- brelse(bp);
- (void)VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, NOCRED, p);
- if (ump) {
- bsd_free(ump->um_e2fs->s_es, M_UFSMNT);
- bsd_free(ump->um_e2fs, M_UFSMNT);
- bsd_free(ump, M_UFSMNT);
- mp->mnt_data = (qaddr_t)0;
- }
- return (error);
-}
-
-/*
- * unmount system call
- */
-static int
-ext2_unmount(mp, mntflags, p)
- struct mount *mp;
- int mntflags;
- struct proc *p;
-{
- register struct ufsmount *ump;
- register struct ext2_sb_info *fs;
- int error, flags, ronly, i;
-
- flags = 0;
- if (mntflags & MNT_FORCE) {
- if (mp->mnt_flag & MNT_ROOTFS)
- return (EINVAL);
- flags |= FORCECLOSE;
- }
- if ((error = ext2_flushfiles(mp, flags, p)) != 0)
- return (error);
- ump = VFSTOUFS(mp);
- fs = ump->um_e2fs;
- ronly = fs->s_rd_only;
- if (ronly == 0) {
- if (fs->s_wasvalid)
- fs->s_es->s_state |= EXT2_VALID_FS;
- ext2_sbupdate(ump, MNT_WAIT);
- }
-
- /* release buffers containing group descriptors */
- for(i = 0; i < fs->s_db_per_group; i++)
- ULCK_BUF(fs->s_group_desc[i])
- bsd_free(fs->s_group_desc, M_UFSMNT);
-
- /* release cached inode/block bitmaps */
- for (i = 0; i < EXT2_MAX_GROUP_LOADED; i++)
- if (fs->s_inode_bitmap[i])
- ULCK_BUF(fs->s_inode_bitmap[i])
-
- for (i = 0; i < EXT2_MAX_GROUP_LOADED; i++)
- if (fs->s_block_bitmap[i])
- ULCK_BUF(fs->s_block_bitmap[i])
-
- ump->um_devvp->v_specmountpoint = NULL;
- error = VOP_CLOSE(ump->um_devvp, ronly ? FREAD : FREAD|FWRITE,
- NOCRED, p);
- vrele(ump->um_devvp);
- bsd_free(fs->s_es, M_UFSMNT);
- bsd_free(fs, M_UFSMNT);
- bsd_free(ump, M_UFSMNT);
- mp->mnt_data = (qaddr_t)0;
- mp->mnt_flag &= ~MNT_LOCAL;
- return (error);
-}
-
-/*
- * Flush out all the files in a filesystem.
- */
-static int
-ext2_flushfiles(mp, flags, p)
- register struct mount *mp;
- int flags;
- struct proc *p;
-{
- register struct ufsmount *ump;
- int error;
-#if QUOTA
- int i;
-#endif
-
- ump = VFSTOUFS(mp);
-#if QUOTA
- if (mp->mnt_flag & MNT_QUOTA) {
- if ((error = vflush(mp, NULLVP, SKIPSYSTEM|flags)) != 0)
- return (error);
- for (i = 0; i < MAXQUOTAS; i++) {
- if (ump->um_quotas[i] == NULLVP)
- continue;
- quotaoff(p, mp, i);
- }
- /*
- * Here we fall through to vflush again to ensure
- * that we have gotten rid of all the system vnodes.
- */
- }
-#endif
- error = vflush(mp, NULLVP, flags);
- return (error);
-}
-
-/*
- * Get file system statistics.
- * taken from ext2/super.c ext2_statfs
- */
-static int
-ext2_statfs(mp, sbp, p)
- struct mount *mp;
- register struct statfs *sbp;
- struct proc *p;
-{
- unsigned long overhead;
- unsigned long overhead_per_group;
-
- register struct ufsmount *ump;
- register struct ext2_sb_info *fs;
- register struct ext2_super_block *es;
-
- ump = VFSTOUFS(mp);
- fs = ump->um_e2fs;
- es = fs->s_es;
-
- if (es->s_magic != EXT2_SUPER_MAGIC)
- panic("ext2_statfs - magic number spoiled");
-
- /*
- * Compute the overhead (FS structures)
- */
- overhead_per_group = 1 /* super block */ +
- fs->s_db_per_group +
- 1 /* block bitmap */ +
- 1 /* inode bitmap */ +
- fs->s_itb_per_group;
- overhead = es->s_first_data_block +
- fs->s_groups_count * overhead_per_group;
-
- sbp->f_bsize = EXT2_FRAG_SIZE(fs);
- sbp->f_iosize = EXT2_BLOCK_SIZE(fs);
- sbp->f_blocks = es->s_blocks_count - overhead;
- sbp->f_bfree = es->s_free_blocks_count;
- sbp->f_bavail = sbp->f_bfree - es->s_r_blocks_count;
- sbp->f_files = es->s_inodes_count;
- sbp->f_ffree = es->s_free_inodes_count;
- if (sbp != &mp->mnt_stat) {
- sbp->f_type = mp->mnt_vfc->vfc_typenum;
- bcopy((caddr_t)mp->mnt_stat.f_mntonname,
- (caddr_t)&sbp->f_mntonname[0], MNAMELEN);
- bcopy((caddr_t)mp->mnt_stat.f_mntfromname,
- (caddr_t)&sbp->f_mntfromname[0], MNAMELEN);
- }
- return (0);
-}
-
-/*
- * Go through the disk queues to initiate sandbagged IO;
- * go through the inodes to write those that have been modified;
- * initiate the writing of the super block if it has been modified.
- *
- * Note: we are always called with the filesystem marked `MPBUSY'.
- */
-static int
-ext2_sync(mp, waitfor, cred, p)
- struct mount *mp;
- int waitfor;
- struct ucred *cred;
- struct proc *p;
-{
- struct vnode *nvp, *vp;
- struct inode *ip;
- struct ufsmount *ump = VFSTOUFS(mp);
- struct ext2_sb_info *fs;
- int error, allerror = 0;
-
- fs = ump->um_e2fs;
- if (fs->s_dirt != 0 && fs->s_rd_only != 0) { /* XXX */
- printf("fs = %s\n", fs->fs_fsmnt);
- panic("ext2_sync: rofs mod");
- }
- /*
- * Write back each (modified) inode.
- */
- simple_lock(&mntvnode_slock);
-loop:
- for (vp = mp->mnt_vnodelist.lh_first; vp != NULL; vp = nvp) {
- /*
- * If the vnode that we are about to sync is no longer
- * associated with this mount point, start over.
- */
- if (vp->v_mount != mp)
- goto loop;
- simple_lock(&vp->v_interlock);
- nvp = vp->v_mntvnodes.le_next;
- ip = VTOI(vp);
- if (vp->v_type == VNON ||
- ((ip->i_flag &
- (IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE)) == 0 &&
- (TAILQ_EMPTY(&vp->v_dirtyblkhd) || waitfor == MNT_LAZY))) {
- simple_unlock(&vp->v_interlock);
- continue;
- }
- simple_unlock(&mntvnode_slock);
- error = vget(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_INTERLOCK, p);
- if (error) {
- simple_lock(&mntvnode_slock);
- if (error == ENOENT)
- goto loop;
- continue;
- }
- if ((error = VOP_FSYNC(vp, cred, waitfor, p)) != 0)
- allerror = error;
- VOP_UNLOCK(vp, 0, p);
- vrele(vp);
- simple_lock(&mntvnode_slock);
- }
- simple_unlock(&mntvnode_slock);
- /*
- * Force stale file system control information to be flushed.
- */
- if (waitfor != MNT_LAZY) {
- vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY, p);
- if ((error = VOP_FSYNC(ump->um_devvp, cred, waitfor, p)) != 0)
- allerror = error;
- VOP_UNLOCK(ump->um_devvp, 0, p);
- }
-#if QUOTA
- qsync(mp);
-#endif
- /*
- * Write back modified superblock.
- */
- if (fs->s_dirt != 0) {
- fs->s_dirt = 0;
- fs->s_es->s_wtime = time_second;
- if ((error = ext2_sbupdate(ump, waitfor)) != 0)
- allerror = error;
- }
- return (allerror);
-}
-
-/*
- * Look up a EXT2FS dinode number to find its incore vnode, otherwise read it
- * in from disk. If it is in core, wait for the lock bit to clear, then
- * return the inode locked. Detection and handling of mount points must be
- * done by the calling routine.
- */
-static int
-ext2_vget(mp, ino, vpp)
- struct mount *mp;
- ino_t ino;
- struct vnode **vpp;
-{
- register struct ext2_sb_info *fs;
- register struct inode *ip;
- struct ufsmount *ump;
- struct buf *bp;
- struct vnode *vp;
- dev_t dev;
- int i, error;
- int used_blocks;
-
- ump = VFSTOUFS(mp);
- dev = ump->um_dev;
-restart:
- if ((*vpp = ufs_ihashget(dev, ino)) != NULL)
- return (0);
-
- /*
- * Lock out the creation of new entries in the FFS hash table in
- * case getnewvnode() or MALLOC() blocks, otherwise a duplicate
- * may occur!
- */
- if (ext2fs_inode_hash_lock) {
- while (ext2fs_inode_hash_lock) {
- ext2fs_inode_hash_lock = -1;
- tsleep(&ext2fs_inode_hash_lock, PVM, "e2vget", 0);
- }
- goto restart;
- }
- ext2fs_inode_hash_lock = 1;
-
- /*
- * If this MALLOC() is performed after the getnewvnode()
- * it might block, leaving a vnode with a NULL v_data to be
- * found by ext2_sync() if a sync happens to fire right then,
- * which will cause a panic because ext2_sync() blindly
- * dereferences vp->v_data (as well it should).
- */
- MALLOC(ip, struct inode *, sizeof(struct inode), M_EXT2NODE, M_WAITOK);
-
- /* Allocate a new vnode/inode. */
- if ((error = getnewvnode(VT_UFS, mp, ext2_vnodeop_p, &vp)) != 0) {
- if (ext2fs_inode_hash_lock < 0)
- wakeup(&ext2fs_inode_hash_lock);
- ext2fs_inode_hash_lock = 0;
- *vpp = NULL;
- FREE(ip, M_EXT2NODE);
- return (error);
- }
- bzero((caddr_t)ip, sizeof(struct inode));
- lockinit(&ip->i_lock, PINOD, "ext2in", 0, 0);
- vp->v_data = ip;
- ip->i_vnode = vp;
- ip->i_e2fs = fs = ump->um_e2fs;
- ip->i_dev = dev;
- ip->i_number = ino;
-#if QUOTA
- for (i = 0; i < MAXQUOTAS; i++)
- ip->i_dquot[i] = NODQUOT;
-#endif
- /*
- * Put it onto its hash chain and lock it so that other requests for
- * this inode will block if they arrive while we are sleeping waiting
- * for old data structures to be purged or for the contents of the
- * disk portion of this inode to be read.
- */
- ufs_ihashins(ip);
-
- if (ext2fs_inode_hash_lock < 0)
- wakeup(&ext2fs_inode_hash_lock);
- ext2fs_inode_hash_lock = 0;
-
- /* Read in the disk contents for the inode, copy into the inode. */
-#if 0
-printf("ext2_vget(%d) dbn= %d ", ino, fsbtodb(fs, ino_to_fsba(fs, ino)));
-#endif
- if ((error = bread(ump->um_devvp, fsbtodb(fs, ino_to_fsba(fs, ino)),
- (int)fs->s_blocksize, NOCRED, &bp)) != 0) {
- /*
- * The inode does not contain anything useful, so it would
- * be misleading to leave it on its hash chain. With mode
- * still zero, it will be unlinked and returned to the free
- * list by vput().
- */
- vput(vp);
- brelse(bp);
- *vpp = NULL;
- return (error);
- }
- /* convert ext2 inode to dinode */
- ext2_ei2di((struct ext2_inode *) ((char *)bp->b_data + EXT2_INODE_SIZE *
- ino_to_fsbo(fs, ino)), &ip->i_din);
- ip->i_block_group = ino_to_cg(fs, ino);
- ip->i_next_alloc_block = 0;
- ip->i_next_alloc_goal = 0;
- ip->i_prealloc_count = 0;
- ip->i_prealloc_block = 0;
- /* now we want to make sure that block pointers for unused
- blocks are zeroed out - ext2_balloc depends on this
- although for regular files and directories only
- */
- if(S_ISDIR(ip->i_mode) || S_ISREG(ip->i_mode)) {
- used_blocks = (ip->i_size+fs->s_blocksize-1) / fs->s_blocksize;
- for(i = used_blocks; i < EXT2_NDIR_BLOCKS; i++)
- ip->i_db[i] = 0;
- }
-/*
- ext2_print_inode(ip);
-*/
- brelse(bp);
-
- /*
- * Initialize the vnode from the inode, check for aliases.
- * Note that the underlying vnode may have changed.
- */
- if ((error = ufs_vinit(mp, ext2_specop_p, ext2_fifoop_p, &vp)) != 0) {
- vput(vp);
- *vpp = NULL;
- return (error);
- }
- /*
- * Finish inode initialization now that aliasing has been resolved.
- */
- ip->i_devvp = ump->um_devvp;
- VREF(ip->i_devvp);
- /*
- * Set up a generation number for this inode if it does not
- * already have one. This should only happen on old filesystems.
- */
- if (ip->i_gen == 0) {
- ip->i_gen = random() / 2 + 1;
- if ((vp->v_mount->mnt_flag & MNT_RDONLY) == 0)
- ip->i_flag |= IN_MODIFIED;
- }
- *vpp = vp;
- return (0);
-}
-
-/*
- * File handle to vnode
- *
- * Have to be really careful about stale file handles:
- * - check that the inode number is valid
- * - call ext2_vget() to get the locked inode
- * - check for an unallocated inode (i_mode == 0)
- * - check that the given client host has export rights and return
- * those rights via. exflagsp and credanonp
- */
-static int
-ext2_fhtovp(mp, fhp, vpp)
- register struct mount *mp;
- struct fid *fhp;
- struct vnode **vpp;
-{
- register struct ufid *ufhp;
- struct ext2_sb_info *fs;
-
- ufhp = (struct ufid *)fhp;
- fs = VFSTOUFS(mp)->um_e2fs;
- if (ufhp->ufid_ino < ROOTINO ||
- ufhp->ufid_ino >= fs->s_groups_count * fs->s_es->s_inodes_per_group)
- return (ESTALE);
- return (ufs_fhtovp(mp, ufhp, vpp));
-}
-
-/*
- * Vnode pointer to File handle
- */
-/* ARGSUSED */
-static int
-ext2_vptofh(vp, fhp)
- struct vnode *vp;
- struct fid *fhp;
-{
- register struct inode *ip;
- register struct ufid *ufhp;
-
- ip = VTOI(vp);
- ufhp = (struct ufid *)fhp;
- ufhp->ufid_len = sizeof(struct ufid);
- ufhp->ufid_ino = ip->i_number;
- ufhp->ufid_gen = ip->i_gen;
- return (0);
-}
-
-/*
- * Write a superblock and associated information back to disk.
- */
-static int
-ext2_sbupdate(mp, waitfor)
- struct ufsmount *mp;
- int waitfor;
-{
- register struct ext2_sb_info *fs = mp->um_e2fs;
- register struct ext2_super_block *es = fs->s_es;
- register struct buf *bp;
- int error = 0;
-/*
-printf("\nupdating superblock, waitfor=%s\n", waitfor == MNT_WAIT ? "yes":"no");
-*/
- bp = getblk(mp->um_devvp, SBLOCK, SBSIZE, 0, 0);
- bcopy((caddr_t)es, bp->b_data, (u_int)sizeof(struct ext2_super_block));
- if (waitfor == MNT_WAIT)
- error = bwrite(bp);
- else
- bawrite(bp);
-
- /*
- * The buffers for group descriptors, inode bitmaps and block bitmaps
- * are not busy at this point and are (hopefully) written by the
- * usual sync mechanism. No need to write them here
- */
-
- return (error);
-}
diff --git a/sys/gnu/ext2fs/ext2_vnops.c b/sys/gnu/ext2fs/ext2_vnops.c
deleted file mode 100644
index 0e57f30..0000000
--- a/sys/gnu/ext2fs/ext2_vnops.c
+++ /dev/null
@@ -1,1213 +0,0 @@
-/*
- * modified for EXT2FS support in Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- */
-/*
- * Copyright (c) 1982, 1986, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ufs_vnops.c 8.27 (Berkeley) 5/27/95
- * @(#)ext2_vnops.c 8.7 (Berkeley) 2/3/94
- * $FreeBSD$
- */
-
-#include "opt_quota.h"
-#include "opt_suiddir.h"
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/resourcevar.h>
-#include <sys/kernel.h>
-#include <sys/stat.h>
-#include <sys/buf.h>
-#include <sys/proc.h>
-#include <sys/mount.h>
-#include <sys/time.h>
-#include <sys/vnode.h>
-#include <sys/namei.h>
-
-#include <vm/vm.h>
-#include <vm/vm_extern.h>
-#include <vm/vm_zone.h>
-#include <vm/vnode_pager.h>
-
-#include <sys/signalvar.h>
-#include <ufs/ufs/dir.h>
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/inode.h>
-#include <ufs/ufs/ufsmount.h>
-#include <ufs/ufs/ufs_extern.h>
-
-#include <gnu/ext2fs/ext2_fs_sb.h>
-#include <gnu/ext2fs/fs.h>
-#include <gnu/ext2fs/ext2_extern.h>
-#include <gnu/ext2fs/ext2_fs.h>
-
-static int ext2_makeinode __P((int mode, struct vnode *, struct vnode **, struct componentname *));
-
-static int ext2_fsync __P((struct vop_fsync_args *));
-static int ext2_read __P((struct vop_read_args *));
-static int ext2_write __P((struct vop_write_args *));
-static int ext2_remove __P((struct vop_remove_args *));
-static int ext2_link __P((struct vop_link_args *));
-static int ext2_rename __P((struct vop_rename_args *));
-static int ext2_mkdir __P((struct vop_mkdir_args *));
-static int ext2_rmdir __P((struct vop_rmdir_args *));
-static int ext2_create __P((struct vop_create_args *));
-static int ext2_mknod __P((struct vop_mknod_args *));
-static int ext2_symlink __P((struct vop_symlink_args *));
-static int ext2_getpages __P((struct vop_getpages_args *));
-static int ext2_putpages __P((struct vop_putpages_args *));
-
-/* Global vfs data structures for ufs. */
-vop_t **ext2_vnodeop_p;
-static struct vnodeopv_entry_desc ext2_vnodeop_entries[] = {
- { &vop_default_desc, (vop_t *) ufs_vnoperate },
- { &vop_cachedlookup_desc, (vop_t *) ext2_lookup },
- { &vop_fsync_desc, (vop_t *) ext2_fsync },
- { &vop_inactive_desc, (vop_t *) ext2_inactive },
- { &vop_lookup_desc, (vop_t *) vfs_cache_lookup },
- { &vop_read_desc, (vop_t *) ext2_read },
- { &vop_readdir_desc, (vop_t *) ext2_readdir },
- { &vop_reallocblks_desc, (vop_t *) ext2_reallocblks },
- { &vop_write_desc, (vop_t *) ext2_write },
- { &vop_remove_desc, (vop_t *) ext2_remove },
- { &vop_link_desc, (vop_t *) ext2_link },
- { &vop_rename_desc, (vop_t *) ext2_rename },
- { &vop_mkdir_desc, (vop_t *) ext2_mkdir },
- { &vop_rmdir_desc, (vop_t *) ext2_rmdir },
- { &vop_create_desc, (vop_t *) ext2_create },
- { &vop_mknod_desc, (vop_t *) ext2_mknod },
- { &vop_symlink_desc, (vop_t *) ext2_symlink },
- { &vop_getpages_desc, (vop_t *) ext2_getpages },
- { &vop_putpages_desc, (vop_t *) ext2_putpages },
- { NULL, NULL }
-};
-static struct vnodeopv_desc ext2fs_vnodeop_opv_desc =
- { &ext2_vnodeop_p, ext2_vnodeop_entries };
-
-vop_t **ext2_specop_p;
-static struct vnodeopv_entry_desc ext2_specop_entries[] = {
- { &vop_default_desc, (vop_t *) ufs_vnoperatespec },
- { &vop_fsync_desc, (vop_t *) ext2_fsync },
- { &vop_inactive_desc, (vop_t *) ext2_inactive },
- { NULL, NULL }
-};
-static struct vnodeopv_desc ext2fs_specop_opv_desc =
- { &ext2_specop_p, ext2_specop_entries };
-
-vop_t **ext2_fifoop_p;
-static struct vnodeopv_entry_desc ext2_fifoop_entries[] = {
- { &vop_default_desc, (vop_t *) ufs_vnoperatefifo },
- { &vop_fsync_desc, (vop_t *) ext2_fsync },
- { &vop_inactive_desc, (vop_t *) ext2_inactive },
- { NULL, NULL }
-};
-static struct vnodeopv_desc ext2fs_fifoop_opv_desc =
- { &ext2_fifoop_p, ext2_fifoop_entries };
-
- VNODEOP_SET(ext2fs_vnodeop_opv_desc);
- VNODEOP_SET(ext2fs_specop_opv_desc);
- VNODEOP_SET(ext2fs_fifoop_opv_desc);
-
-#include <gnu/ext2fs/ext2_readwrite.c>
-
-/*
- * A virgin directory (no blushing please).
- * Note that the type and namlen fields are reversed relative to ufs.
- * Also, we don't use `struct odirtemplate', since it would just cause
- * endianness problems.
- */
-static struct dirtemplate mastertemplate = {
- 0, 12, 1, EXT2_FT_DIR, ".",
- 0, DIRBLKSIZ - 12, 2, EXT2_FT_DIR, ".."
-};
-static struct dirtemplate omastertemplate = {
- 0, 12, 1, EXT2_FT_UNKNOWN, ".",
- 0, DIRBLKSIZ - 12, 2, EXT2_FT_UNKNOWN, ".."
-};
-
-/*
- * Create a regular file
- */
-static int
-ext2_create(ap)
- struct vop_create_args /* {
- struct vnode *a_dvp;
- struct vnode **a_vpp;
- struct componentname *a_cnp;
- struct vattr *a_vap;
- } */ *ap;
-{
- int error;
-
- error =
- ext2_makeinode(MAKEIMODE(ap->a_vap->va_type, ap->a_vap->va_mode),
- ap->a_dvp, ap->a_vpp, ap->a_cnp);
- if (error)
- return (error);
- return (0);
-}
-
-/*
- * Synch an open file.
- */
-/* ARGSUSED */
-static int
-ext2_fsync(ap)
- struct vop_fsync_args /* {
- struct vnode *a_vp;
- struct ucred *a_cred;
- int a_waitfor;
- struct proc *a_p;
- } */ *ap;
-{
- register struct vnode *vp = ap->a_vp;
- register struct buf *bp;
- struct buf *nbp;
- int s;
-
- /*
- * XXX why is all this fs specific?
- */
-
- /*
- * Flush all dirty buffers associated with a vnode.
- */
- ext2_discard_prealloc(VTOI(vp));
-
-loop:
- s = splbio();
- for (bp = TAILQ_FIRST(&vp->v_dirtyblkhd); bp; bp = nbp) {
- nbp = TAILQ_NEXT(bp, b_vnbufs);
- if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT))
- continue;
- if ((bp->b_flags & B_DELWRI) == 0)
- panic("ext2_fsync: not dirty");
- bremfree(bp);
- splx(s);
- /*
- * Wait for I/O associated with indirect blocks to complete,
- * since there is no way to quickly wait for them below.
- */
- if (bp->b_vp == vp || ap->a_waitfor == MNT_NOWAIT)
- (void) bawrite(bp);
- else
- (void) bwrite(bp);
- goto loop;
- }
- if (ap->a_waitfor == MNT_WAIT) {
- while (vp->v_numoutput) {
- vp->v_flag |= VBWAIT;
- tsleep(&vp->v_numoutput, PRIBIO + 1, "e2fsyn", 0);
- }
-#if DIAGNOSTIC
- if (!TAILQ_EMPTY(&vp->v_dirtyblkhd)) {
- vprint("ext2_fsync: dirty", vp);
- goto loop;
- }
-#endif
- }
- splx(s);
- return (UFS_UPDATE(ap->a_vp, ap->a_waitfor == MNT_WAIT));
-}
-
-/*
- * Mknod vnode call
- */
-/* ARGSUSED */
-static int
-ext2_mknod(ap)
- struct vop_mknod_args /* {
- struct vnode *a_dvp;
- struct vnode **a_vpp;
- struct componentname *a_cnp;
- struct vattr *a_vap;
- } */ *ap;
-{
- struct vattr *vap = ap->a_vap;
- struct vnode **vpp = ap->a_vpp;
- struct inode *ip;
- int error;
-
- error = ext2_makeinode(MAKEIMODE(vap->va_type, vap->va_mode),
- ap->a_dvp, vpp, ap->a_cnp);
- if (error)
- return (error);
- ip = VTOI(*vpp);
- ip->i_flag |= IN_ACCESS | IN_CHANGE | IN_UPDATE;
- if (vap->va_rdev != VNOVAL) {
- /*
- * Want to be able to use this to make badblock
- * inodes, so don't truncate the dev number.
- */
- ip->i_rdev = vap->va_rdev;
- }
- /*
- * Remove inode, then reload it through VFS_VGET so it is
- * checked to see if it is an alias of an existing entry in
- * the inode cache.
- */
- vput(*vpp);
- (*vpp)->v_type = VNON;
- vgone(*vpp);
- error = VFS_VGET(ap->a_dvp->v_mount, ip->i_ino, vpp);
- if (error) {
- *vpp = NULL;
- return (error);
- }
- return (0);
-}
-
-static int
-ext2_remove(ap)
- struct vop_remove_args /* {
- struct vnode *a_dvp;
- struct vnode *a_vp;
- struct componentname *a_cnp;
- } */ *ap;
-{
- struct inode *ip;
- struct vnode *vp = ap->a_vp;
- struct vnode *dvp = ap->a_dvp;
- int error;
-
- ip = VTOI(vp);
- if ((ip->i_flags & (NOUNLINK | IMMUTABLE | APPEND)) ||
- (VTOI(dvp)->i_flags & APPEND)) {
- error = EPERM;
- goto out;
- }
- error = ext2_dirremove(dvp, ap->a_cnp);
- if (error == 0) {
- ip->i_nlink--;
- ip->i_flag |= IN_CHANGE;
- }
-out:
- return (error);
-}
-
-/*
- * link vnode call
- */
-static int
-ext2_link(ap)
- struct vop_link_args /* {
- struct vnode *a_tdvp;
- struct vnode *a_vp;
- struct componentname *a_cnp;
- } */ *ap;
-{
- struct vnode *vp = ap->a_vp;
- struct vnode *tdvp = ap->a_tdvp;
- struct componentname *cnp = ap->a_cnp;
- struct proc *p = cnp->cn_proc;
- struct inode *ip;
- int error;
-
-#ifdef DIAGNOSTIC
- if ((cnp->cn_flags & HASBUF) == 0)
- panic("ufs_link: no name");
-#endif
- if (tdvp->v_mount != vp->v_mount) {
- error = EXDEV;
- goto out2;
- }
- if (tdvp != vp && (error = vn_lock(vp, LK_EXCLUSIVE, p))) {
- goto out2;
- }
- ip = VTOI(vp);
- if ((nlink_t)ip->i_nlink >= LINK_MAX) {
- error = EMLINK;
- goto out1;
- }
- if (ip->i_flags & (IMMUTABLE | APPEND)) {
- error = EPERM;
- goto out1;
- }
- ip->i_nlink++;
- ip->i_flag |= IN_CHANGE;
- error = UFS_UPDATE(vp, 1);
- if (!error)
- error = ext2_direnter(ip, tdvp, cnp);
- if (error) {
- ip->i_nlink--;
- ip->i_flag |= IN_CHANGE;
- }
-out1:
- if (tdvp != vp)
- VOP_UNLOCK(vp, 0, p);
-out2:
- return (error);
-}
-
-/*
- * Rename system call.
- * See comments in sys/ufs/ufs/ufs_vnops.c
- */
-static int
-ext2_rename(ap)
- struct vop_rename_args /* {
- struct vnode *a_fdvp;
- struct vnode *a_fvp;
- struct componentname *a_fcnp;
- struct vnode *a_tdvp;
- struct vnode *a_tvp;
- struct componentname *a_tcnp;
- } */ *ap;
-{
- struct vnode *tvp = ap->a_tvp;
- register struct vnode *tdvp = ap->a_tdvp;
- struct vnode *fvp = ap->a_fvp;
- struct vnode *fdvp = ap->a_fdvp;
- struct componentname *tcnp = ap->a_tcnp;
- struct componentname *fcnp = ap->a_fcnp;
- struct proc *p = fcnp->cn_proc;
- struct inode *ip, *xp, *dp;
- struct dirtemplate dirbuf;
- int doingdirectory = 0, oldparent = 0, newparent = 0;
- int error = 0;
- u_char namlen;
-
-#ifdef DIAGNOSTIC
- if ((tcnp->cn_flags & HASBUF) == 0 ||
- (fcnp->cn_flags & HASBUF) == 0)
- panic("ufs_rename: no name");
-#endif
- /*
- * Check for cross-device rename.
- */
- if ((fvp->v_mount != tdvp->v_mount) ||
- (tvp && (fvp->v_mount != tvp->v_mount))) {
- error = EXDEV;
-abortit:
- if (tdvp == tvp)
- vrele(tdvp);
- else
- vput(tdvp);
- if (tvp)
- vput(tvp);
- vrele(fdvp);
- vrele(fvp);
- return (error);
- }
-
- if (tvp && ((VTOI(tvp)->i_flags & (NOUNLINK | IMMUTABLE | APPEND)) ||
- (VTOI(tdvp)->i_flags & APPEND))) {
- error = EPERM;
- goto abortit;
- }
-
- /*
- * Check if just deleting a link name or if we've lost a race.
- * If another process completes the same rename after we've looked
- * up the source and have blocked looking up the target, then the
- * source and target inodes may be identical now although the
- * names were never linked.
- */
- if (fvp == tvp) {
- if (fvp->v_type == VDIR) {
- /*
- * Linked directories are impossible, so we must
- * have lost the race. Pretend that the rename
- * completed before the lookup.
- */
-#ifdef UFS_RENAME_DEBUG
- printf("ufs_rename: fvp == tvp for directories\n");
-#endif
- error = ENOENT;
- goto abortit;
- }
-
- /* Release destination completely. */
- vput(tdvp);
- vput(tvp);
-
- /*
- * Delete source. There is another race now that everything
- * is unlocked, but this doesn't cause any new complications.
- * Relookup() may find a file that is unrelated to the
- * original one, or it may fail. Too bad.
- */
- vrele(fdvp);
- vrele(fvp);
- fcnp->cn_flags &= ~MODMASK;
- fcnp->cn_flags |= LOCKPARENT | LOCKLEAF;
- fcnp->cn_nameiop = DELETE;
- VREF(fdvp);
- error = relookup(fdvp, &fvp, fcnp);
- if (error == 0)
- vrele(fdvp);
- if (fvp == NULL) {
-#ifdef UFS_RENAME_DEBUG
- printf("ufs_rename: from name disappeared\n");
-#endif
- return (ENOENT);
- }
- error = VOP_REMOVE(fdvp, fvp, fcnp);
- if (fdvp == fvp)
- vrele(fdvp);
- else
- vput(fdvp);
- if (fvp != NULLVP)
- vput(fvp);
- return (error);
- }
- if ((error = vn_lock(fvp, LK_EXCLUSIVE, p)) != 0)
- goto abortit;
- dp = VTOI(fdvp);
- ip = VTOI(fvp);
- if (ip->i_nlink >= LINK_MAX) {
- VOP_UNLOCK(fvp, 0, p);
- error = EMLINK;
- goto abortit;
- }
- if ((ip->i_flags & (NOUNLINK | IMMUTABLE | APPEND))
- || (dp->i_flags & APPEND)) {
- VOP_UNLOCK(fvp, 0, p);
- error = EPERM;
- goto abortit;
- }
- if ((ip->i_mode & IFMT) == IFDIR) {
- /*
- * Avoid ".", "..", and aliases of "." for obvious reasons.
- */
- if ((fcnp->cn_namelen == 1 && fcnp->cn_nameptr[0] == '.') ||
- dp == ip || (fcnp->cn_flags | tcnp->cn_flags) & ISDOTDOT ||
- (ip->i_flag & IN_RENAME)) {
- VOP_UNLOCK(fvp, 0, p);
- error = EINVAL;
- goto abortit;
- }
- ip->i_flag |= IN_RENAME;
- oldparent = dp->i_number;
- doingdirectory++;
- }
- vrele(fdvp);
-
- /*
- * When the target exists, both the directory
- * and target vnodes are returned locked.
- */
- dp = VTOI(tdvp);
- xp = NULL;
- if (tvp)
- xp = VTOI(tvp);
-
- /*
- * 1) Bump link count while we're moving stuff
- * around. If we crash somewhere before
- * completing our work, the link count
- * may be wrong, but correctable.
- */
- ip->i_nlink++;
- ip->i_flag |= IN_CHANGE;
- if ((error = UFS_UPDATE(fvp, 1)) != 0) {
- VOP_UNLOCK(fvp, 0, p);
- goto bad;
- }
-
- /*
- * If ".." must be changed (ie the directory gets a new
- * parent) then the source directory must not be in the
- * directory heirarchy above the target, as this would
- * orphan everything below the source directory. Also
- * the user must have write permission in the source so
- * as to be able to change "..". We must repeat the call
- * to namei, as the parent directory is unlocked by the
- * call to checkpath().
- */
- error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_proc);
- VOP_UNLOCK(fvp, 0, p);
- if (oldparent != dp->i_number)
- newparent = dp->i_number;
- if (doingdirectory && newparent) {
- if (error) /* write access check above */
- goto bad;
- if (xp != NULL)
- vput(tvp);
- error = ext2_checkpath(ip, dp, tcnp->cn_cred);
- if (error)
- goto out;
- VREF(tdvp);
- error = relookup(tdvp, &tvp, tcnp);
- if (error)
- goto out;
- vrele(tdvp);
- dp = VTOI(tdvp);
- xp = NULL;
- if (tvp)
- xp = VTOI(tvp);
- }
- /*
- * 2) If target doesn't exist, link the target
- * to the source and unlink the source.
- * Otherwise, rewrite the target directory
- * entry to reference the source inode and
- * expunge the original entry's existence.
- */
- if (xp == NULL) {
- if (dp->i_dev != ip->i_dev)
- panic("ufs_rename: EXDEV");
- /*
- * Account for ".." in new directory.
- * When source and destination have the same
- * parent we don't fool with the link count.
- */
- if (doingdirectory && newparent) {
- if ((nlink_t)dp->i_nlink >= LINK_MAX) {
- error = EMLINK;
- goto bad;
- }
- dp->i_nlink++;
- dp->i_flag |= IN_CHANGE;
- error = UFS_UPDATE(tdvp, 1);
- if (error)
- goto bad;
- }
- error = ext2_direnter(ip, tdvp, tcnp);
- if (error) {
- if (doingdirectory && newparent) {
- dp->i_nlink--;
- dp->i_flag |= IN_CHANGE;
- (void)UFS_UPDATE(tdvp, 1);
- }
- goto bad;
- }
- vput(tdvp);
- } else {
- if (xp->i_dev != dp->i_dev || xp->i_dev != ip->i_dev)
- panic("ufs_rename: EXDEV");
- /*
- * Short circuit rename(foo, foo).
- */
- if (xp->i_number == ip->i_number)
- panic("ufs_rename: same file");
- /*
- * If the parent directory is "sticky", then the user must
- * own the parent directory, or the destination of the rename,
- * otherwise the destination may not be changed (except by
- * root). This implements append-only directories.
- */
- if ((dp->i_mode & S_ISTXT) && tcnp->cn_cred->cr_uid != 0 &&
- tcnp->cn_cred->cr_uid != dp->i_uid &&
- xp->i_uid != tcnp->cn_cred->cr_uid) {
- error = EPERM;
- goto bad;
- }
- /*
- * Target must be empty if a directory and have no links
- * to it. Also, ensure source and target are compatible
- * (both directories, or both not directories).
- */
- if ((xp->i_mode&IFMT) == IFDIR) {
- if (! ext2_dirempty(xp, dp->i_number, tcnp->cn_cred) ||
- xp->i_nlink > 2) {
- error = ENOTEMPTY;
- goto bad;
- }
- if (!doingdirectory) {
- error = ENOTDIR;
- goto bad;
- }
- cache_purge(tdvp);
- } else if (doingdirectory) {
- error = EISDIR;
- goto bad;
- }
- error = ext2_dirrewrite(dp, ip, tcnp);
- if (error)
- goto bad;
- /*
- * If the target directory is in the same
- * directory as the source directory,
- * decrement the link count on the parent
- * of the target directory.
- */
- if (doingdirectory && !newparent) {
- dp->i_nlink--;
- dp->i_flag |= IN_CHANGE;
- }
- vput(tdvp);
- /*
- * Adjust the link count of the target to
- * reflect the dirrewrite above. If this is
- * a directory it is empty and there are
- * no links to it, so we can squash the inode and
- * any space associated with it. We disallowed
- * renaming over top of a directory with links to
- * it above, as the remaining link would point to
- * a directory without "." or ".." entries.
- */
- xp->i_nlink--;
- if (doingdirectory) {
- if (--xp->i_nlink != 0)
- panic("ufs_rename: linked directory");
- error = UFS_TRUNCATE(tvp, (off_t)0, IO_SYNC,
- tcnp->cn_cred, tcnp->cn_proc);
- }
- xp->i_flag |= IN_CHANGE;
- vput(tvp);
- xp = NULL;
- }
-
- /*
- * 3) Unlink the source.
- */
- fcnp->cn_flags &= ~MODMASK;
- fcnp->cn_flags |= LOCKPARENT | LOCKLEAF;
- VREF(fdvp);
- error = relookup(fdvp, &fvp, fcnp);
- if (error == 0)
- vrele(fdvp);
- if (fvp != NULL) {
- xp = VTOI(fvp);
- dp = VTOI(fdvp);
- } else {
- /*
- * From name has disappeared.
- */
- if (doingdirectory)
- panic("ufs_rename: lost dir entry");
- vrele(ap->a_fvp);
- return (0);
- }
- /*
- * Ensure that the directory entry still exists and has not
- * changed while the new name has been entered. If the source is
- * a file then the entry may have been unlinked or renamed. In
- * either case there is no further work to be done. If the source
- * is a directory then it cannot have been rmdir'ed; its link
- * count of three would cause a rmdir to fail with ENOTEMPTY.
- * The IN_RENAME flag ensures that it cannot be moved by another
- * rename.
- */
- if (xp != ip) {
- if (doingdirectory)
- panic("ufs_rename: lost dir entry");
- } else {
- /*
- * If the source is a directory with a
- * new parent, the link count of the old
- * parent directory must be decremented
- * and ".." set to point to the new parent.
- */
- if (doingdirectory && newparent) {
- dp->i_nlink--;
- dp->i_flag |= IN_CHANGE;
- error = vn_rdwr(UIO_READ, fvp, (caddr_t)&dirbuf,
- sizeof (struct dirtemplate), (off_t)0,
- UIO_SYSSPACE, IO_NODELOCKED,
- tcnp->cn_cred, (int *)0, (struct proc *)0);
- if (error == 0) {
- /* Like ufs little-endian: */
- namlen = dirbuf.dotdot_type;
- if (namlen != 2 ||
- dirbuf.dotdot_name[0] != '.' ||
- dirbuf.dotdot_name[1] != '.') {
- ufs_dirbad(xp, (doff_t)12,
- "rename: mangled dir");
- } else {
- dirbuf.dotdot_ino = newparent;
- (void) vn_rdwr(UIO_WRITE, fvp,
- (caddr_t)&dirbuf,
- sizeof (struct dirtemplate),
- (off_t)0, UIO_SYSSPACE,
- IO_NODELOCKED|IO_SYNC,
- tcnp->cn_cred, (int *)0,
- (struct proc *)0);
- cache_purge(fdvp);
- }
- }
- }
- error = ext2_dirremove(fdvp, fcnp);
- if (!error) {
- xp->i_nlink--;
- xp->i_flag |= IN_CHANGE;
- }
- xp->i_flag &= ~IN_RENAME;
- }
- if (dp)
- vput(fdvp);
- if (xp)
- vput(fvp);
- vrele(ap->a_fvp);
- return (error);
-
-bad:
- if (xp)
- vput(ITOV(xp));
- vput(ITOV(dp));
-out:
- if (doingdirectory)
- ip->i_flag &= ~IN_RENAME;
- if (vn_lock(fvp, LK_EXCLUSIVE, p) == 0) {
- ip->i_nlink--;
- ip->i_flag |= IN_CHANGE;
- ip->i_flag &= ~IN_RENAME;
- vput(fvp);
- } else
- vrele(fvp);
- return (error);
-}
-
-/*
- * Mkdir system call
- */
-static int
-ext2_mkdir(ap)
- struct vop_mkdir_args /* {
- struct vnode *a_dvp;
- struct vnode **a_vpp;
- struct componentname *a_cnp;
- struct vattr *a_vap;
- } */ *ap;
-{
- register struct vnode *dvp = ap->a_dvp;
- register struct vattr *vap = ap->a_vap;
- register struct componentname *cnp = ap->a_cnp;
- register struct inode *ip, *dp;
- struct vnode *tvp;
- struct dirtemplate dirtemplate, *dtp;
- int error, dmode;
-
-#ifdef DIAGNOSTIC
- if ((cnp->cn_flags & HASBUF) == 0)
- panic("ufs_mkdir: no name");
-#endif
- dp = VTOI(dvp);
- if ((nlink_t)dp->i_nlink >= LINK_MAX) {
- error = EMLINK;
- goto out;
- }
- dmode = vap->va_mode & 0777;
- dmode |= IFDIR;
- /*
- * Must simulate part of ext2_makeinode here to acquire the inode,
- * but not have it entered in the parent directory. The entry is
- * made later after writing "." and ".." entries.
- */
- error = UFS_VALLOC(dvp, dmode, cnp->cn_cred, &tvp);
- if (error)
- goto out;
- ip = VTOI(tvp);
- ip->i_gid = dp->i_gid;
-#ifdef SUIDDIR
- {
-#ifdef QUOTA
- struct ucred ucred, *ucp;
- ucp = cnp->cn_cred;
-#endif I
- /*
- * if we are hacking owners here, (only do this where told to)
- * and we are not giving it TOO root, (would subvert quotas)
- * then go ahead and give it to the other user.
- * The new directory also inherits the SUID bit.
- * If user's UID and dir UID are the same,
- * 'give it away' so that the SUID is still forced on.
- */
- if ( (dvp->v_mount->mnt_flag & MNT_SUIDDIR) &&
- (dp->i_mode & ISUID) && dp->i_uid) {
- dmode |= ISUID;
- ip->i_uid = dp->i_uid;
-#ifdef QUOTA
- if (dp->i_uid != cnp->cn_cred->cr_uid) {
- /*
- * make sure the correct user gets charged
- * for the space.
- * Make a dummy credential for the victim.
- * XXX This seems to never be accessed out of
- * our context so a stack variable is ok.
- */
- ucred.cr_ref = 1;
- ucred.cr_uid = ip->i_uid;
- ucred.cr_ngroups = 1;
- ucred.cr_groups[0] = dp->i_gid;
- ucp = &ucred;
- }
-#endif I
- } else {
- ip->i_uid = cnp->cn_cred->cr_uid;
- }
-#ifdef QUOTA
- if ((error = getinoquota(ip)) ||
- (error = chkiq(ip, 1, ucp, 0))) {
- UFS_VFREE(tvp, ip->i_number, dmode);
- vput(tvp);
- return (error);
- }
-#endif
- }
-#else
- ip->i_uid = cnp->cn_cred->cr_uid;
-#ifdef QUOTA
- if ((error = getinoquota(ip)) ||
- (error = chkiq(ip, 1, cnp->cn_cred, 0))) {
- UFS_VFREE(tvp, ip->i_number, dmode);
- vput(tvp);
- return (error);
- }
-#endif
-#endif
- ip->i_flag |= IN_ACCESS | IN_CHANGE | IN_UPDATE;
- ip->i_mode = dmode;
- tvp->v_type = VDIR; /* Rest init'd in getnewvnode(). */
- ip->i_nlink = 2;
- if (cnp->cn_flags & ISWHITEOUT)
- ip->i_flags |= UF_OPAQUE;
- error = UFS_UPDATE(tvp, 1);
-
- /*
- * Bump link count in parent directory
- * to reflect work done below. Should
- * be done before reference is created
- * so reparation is possible if we crash.
- */
- dp->i_nlink++;
- dp->i_flag |= IN_CHANGE;
- error = UFS_UPDATE(dvp, 1);
- if (error)
- goto bad;
-
- /* Initialize directory with "." and ".." from static template. */
- if (EXT2_HAS_INCOMPAT_FEATURE(ip->i_e2fs->s_es,
- EXT2_FEATURE_INCOMPAT_FILETYPE))
- dtp = &mastertemplate;
- else
- dtp = &omastertemplate;
- dirtemplate = *dtp;
- dirtemplate.dot_ino = ip->i_number;
- dirtemplate.dotdot_ino = dp->i_number;
- /* note that in ext2 DIRBLKSIZ == blocksize, not DEV_BSIZE
- * so let's just redefine it - for this function only
- */
-#undef DIRBLKSIZ
-#define DIRBLKSIZ VTOI(dvp)->i_e2fs->s_blocksize
- dirtemplate.dotdot_reclen = DIRBLKSIZ - 12;
- error = vn_rdwr(UIO_WRITE, tvp, (caddr_t)&dirtemplate,
- sizeof (dirtemplate), (off_t)0, UIO_SYSSPACE,
- IO_NODELOCKED|IO_SYNC, cnp->cn_cred, (int *)0, (struct proc *)0);
- if (error) {
- dp->i_nlink--;
- dp->i_flag |= IN_CHANGE;
- goto bad;
- }
- if (DIRBLKSIZ > VFSTOUFS(dvp->v_mount)->um_mountp->mnt_stat.f_bsize)
- panic("ufs_mkdir: blksize"); /* XXX should grow with balloc() */
- else {
- ip->i_size = DIRBLKSIZ;
- ip->i_flag |= IN_CHANGE;
- }
-
- /* Directory set up, now install its entry in the parent directory. */
- error = ext2_direnter(ip, dvp, cnp);
- if (error) {
- dp->i_nlink--;
- dp->i_flag |= IN_CHANGE;
- }
-bad:
- /*
- * No need to do an explicit VOP_TRUNCATE here, vrele will do this
- * for us because we set the link count to 0.
- */
- if (error) {
- ip->i_nlink = 0;
- ip->i_flag |= IN_CHANGE;
- vput(tvp);
- } else
- *ap->a_vpp = tvp;
-out:
- return (error);
-#undef DIRBLKSIZ
-#define DIRBLKSIZ DEV_BSIZE
-}
-
-/*
- * Rmdir system call.
- */
-static int
-ext2_rmdir(ap)
- struct vop_rmdir_args /* {
- struct vnode *a_dvp;
- struct vnode *a_vp;
- struct componentname *a_cnp;
- } */ *ap;
-{
- struct vnode *vp = ap->a_vp;
- struct vnode *dvp = ap->a_dvp;
- struct componentname *cnp = ap->a_cnp;
- struct proc *p = cnp->cn_proc;
- struct inode *ip, *dp;
- int error;
-
- ip = VTOI(vp);
- dp = VTOI(dvp);
-
- /*
- * Verify the directory is empty (and valid).
- * (Rmdir ".." won't be valid since
- * ".." will contain a reference to
- * the current directory and thus be
- * non-empty.)
- */
- error = 0;
- if (ip->i_nlink != 2 || !ext2_dirempty(ip, dp->i_number, cnp->cn_cred)) {
- error = ENOTEMPTY;
- goto out;
- }
- if ((dp->i_flags & APPEND)
- || (ip->i_flags & (NOUNLINK | IMMUTABLE | APPEND))) {
- error = EPERM;
- goto out;
- }
- /*
- * Delete reference to directory before purging
- * inode. If we crash in between, the directory
- * will be reattached to lost+found,
- */
- error = ext2_dirremove(dvp, cnp);
- if (error)
- goto out;
- dp->i_nlink--;
- dp->i_flag |= IN_CHANGE;
- cache_purge(dvp);
- VOP_UNLOCK(dvp, 0, p);
- /*
- * Truncate inode. The only stuff left
- * in the directory is "." and "..". The
- * "." reference is inconsequential since
- * we're quashing it. The ".." reference
- * has already been adjusted above. We've
- * removed the "." reference and the reference
- * in the parent directory, but there may be
- * other hard links so decrement by 2 and
- * worry about them later.
- */
- ip->i_nlink -= 2;
- error = UFS_TRUNCATE(vp, (off_t)0, IO_SYNC, cnp->cn_cred, p);
- cache_purge(ITOV(ip));
- vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, p);
-out:
- return (error);
-}
-
-/*
- * symlink -- make a symbolic link
- */
-static int
-ext2_symlink(ap)
- struct vop_symlink_args /* {
- struct vnode *a_dvp;
- struct vnode **a_vpp;
- struct componentname *a_cnp;
- struct vattr *a_vap;
- char *a_target;
- } */ *ap;
-{
- register struct vnode *vp, **vpp = ap->a_vpp;
- register struct inode *ip;
- int len, error;
-
- error = ext2_makeinode(IFLNK | ap->a_vap->va_mode, ap->a_dvp,
- vpp, ap->a_cnp);
- if (error)
- return (error);
- vp = *vpp;
- len = strlen(ap->a_target);
- if (len < vp->v_mount->mnt_maxsymlinklen) {
- ip = VTOI(vp);
- bcopy(ap->a_target, (char *)ip->i_shortlink, len);
- ip->i_size = len;
- ip->i_flag |= IN_CHANGE | IN_UPDATE;
- } else
- error = vn_rdwr(UIO_WRITE, vp, ap->a_target, len, (off_t)0,
- UIO_SYSSPACE, IO_NODELOCKED, ap->a_cnp->cn_cred, (int *)0,
- (struct proc *)0);
- if (error)
- vput(vp);
- return (error);
-}
-
-/*
- * Allocate a new inode.
- */
-static int
-ext2_makeinode(mode, dvp, vpp, cnp)
- int mode;
- struct vnode *dvp;
- struct vnode **vpp;
- struct componentname *cnp;
-{
- register struct inode *ip, *pdir;
- struct vnode *tvp;
- int error;
-
- pdir = VTOI(dvp);
-#ifdef DIAGNOSTIC
- if ((cnp->cn_flags & HASBUF) == 0)
- panic("ext2_makeinode: no name");
-#endif
- *vpp = NULL;
- if ((mode & IFMT) == 0)
- mode |= IFREG;
-
- error = UFS_VALLOC(dvp, mode, cnp->cn_cred, &tvp);
- if (error) {
- return (error);
- }
- ip = VTOI(tvp);
- ip->i_gid = pdir->i_gid;
-#ifdef SUIDDIR
- {
-#ifdef QUOTA
- struct ucred ucred, *ucp;
- ucp = cnp->cn_cred;
-#endif I
- /*
- * if we are
- * not the owner of the directory,
- * and we are hacking owners here, (only do this where told to)
- * and we are not giving it TOO root, (would subvert quotas)
- * then go ahead and give it to the other user.
- * Note that this drops off the execute bits for security.
- */
- if ( (dvp->v_mount->mnt_flag & MNT_SUIDDIR) &&
- (pdir->i_mode & ISUID) &&
- (pdir->i_uid != cnp->cn_cred->cr_uid) && pdir->i_uid) {
- ip->i_uid = pdir->i_uid;
- mode &= ~07111;
-#ifdef QUOTA
- /*
- * make sure the correct user gets charged
- * for the space.
- * Quickly knock up a dummy credential for the victim.
- * XXX This seems to never be accessed out of our
- * context so a stack variable is ok.
- */
- ucred.cr_ref = 1;
- ucred.cr_uid = ip->i_uid;
- ucred.cr_ngroups = 1;
- ucred.cr_groups[0] = pdir->i_gid;
- ucp = &ucred;
-#endif I
- } else {
- ip->i_uid = cnp->cn_cred->cr_uid;
- }
-
-#ifdef QUOTA
- if ((error = getinoquota(ip)) ||
- (error = chkiq(ip, 1, ucp, 0))) {
- UFS_VFREE(tvp, ip->i_number, mode);
- vput(tvp);
- return (error);
- }
-#endif
- }
-#else
- ip->i_uid = cnp->cn_cred->cr_uid;
-#ifdef QUOTA
- if ((error = getinoquota(ip)) ||
- (error = chkiq(ip, 1, cnp->cn_cred, 0))) {
- UFS_VFREE(tvp, ip->i_number, mode);
- vput(tvp);
- return (error);
- }
-#endif
-#endif
- ip->i_flag |= IN_ACCESS | IN_CHANGE | IN_UPDATE;
- ip->i_mode = mode;
- tvp->v_type = IFTOVT(mode); /* Rest init'd in getnewvnode(). */
- ip->i_nlink = 1;
- if ((ip->i_mode & ISGID) && !groupmember(ip->i_gid, cnp->cn_cred) &&
- suser_xxx(cnp->cn_cred, 0, PRISON_ROOT))
- ip->i_mode &= ~ISGID;
-
- if (cnp->cn_flags & ISWHITEOUT)
- ip->i_flags |= UF_OPAQUE;
-
- /*
- * Make sure inode goes to disk before directory entry.
- */
- error = UFS_UPDATE(tvp, 1);
- if (error)
- goto bad;
- error = ext2_direnter(ip, dvp, cnp);
- if (error)
- goto bad;
-
- *vpp = tvp;
- return (0);
-
-bad:
- /*
- * Write error occurred trying to update the inode
- * or the directory so must deallocate the inode.
- */
- ip->i_nlink = 0;
- ip->i_flag |= IN_CHANGE;
- vput(tvp);
- return (error);
-}
-
-/*
- * get page routine
- *
- * XXX By default, wimp out... note that a_offset is ignored (and always
- * XXX has been).
- */
-static int
-ext2_getpages(ap)
- struct vop_getpages_args *ap;
-{
- return (vnode_pager_generic_getpages(ap->a_vp, ap->a_m, ap->a_count,
- ap->a_reqpage));
-}
-
-/*
- * put page routine
- *
- * XXX By default, wimp out... note that a_offset is ignored (and always
- * XXX has been).
- */
-static int
-ext2_putpages(ap)
- struct vop_putpages_args *ap;
-{
- return (vnode_pager_generic_putpages(ap->a_vp, ap->a_m, ap->a_count,
- ap->a_sync, ap->a_rtvals));
-}
diff --git a/sys/gnu/ext2fs/fs.h b/sys/gnu/ext2fs/fs.h
deleted file mode 100644
index b8dab54..0000000
--- a/sys/gnu/ext2fs/fs.h
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * modified for EXT2FS support in Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- */
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. 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 product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)fs.h 8.7 (Berkeley) 4/19/94
- */
-
-/*
- * Each disk drive contains some number of file systems.
- * A file system consists of a number of cylinder groups.
- * Each cylinder group has inodes and data.
- *
- * A file system is described by its super-block, which in turn
- * describes the cylinder groups. The super-block is critical
- * data and is replicated in each cylinder group to protect against
- * catastrophic loss. This is done at `newfs' time and the critical
- * super-block data does not change, so the copies need not be
- * referenced further unless disaster strikes.
- *
- * The first boot and super blocks are given in absolute disk addresses.
- * The byte-offset forms are preferred, as they don't imply a sector size.
- */
-#define BBSIZE 1024
-#define SBSIZE 1024
-#define BBOFF ((off_t)(0))
-#define SBOFF ((off_t)(BBOFF + BBSIZE))
-#define BBLOCK ((daddr_t)(0))
-#define SBLOCK ((daddr_t)(BBLOCK + BBSIZE / DEV_BSIZE))
-
-/*
- * The path name on which the file system is mounted is maintained
- * in fs_fsmnt. MAXMNTLEN defines the amount of space allocated in
- * the super block for this name.
- */
-#define MAXMNTLEN 512
-
-/*
- * Macros for access to superblock array structures
- */
-
-/*
- * Convert cylinder group to base address of its global summary info.
- */
-#define fs_cs(fs, cgindx) (((struct ext2_group_desc *) \
- (fs->s_group_desc[cgindx / EXT2_DESC_PER_BLOCK(fs)]->b_data)) \
- [cgindx % EXT2_DESC_PER_BLOCK(fs)])
-
-/*
- * Turn file system block numbers into disk block addresses.
- * This maps file system blocks to device size blocks.
- */
-#define fsbtodb(fs, b) ((b) << ((fs)->s_fsbtodb))
-#define dbtofsb(fs, b) ((b) >> ((fs)->s_fsbtodb))
-
-/* get group containing inode */
-#define ino_to_cg(fs, x) (((x) - 1) / EXT2_INODES_PER_GROUP(fs))
-
-/* get block containing inode from its number x */
-#define ino_to_fsba(fs, x) fs_cs(fs, ino_to_cg(fs, x)).bg_inode_table + \
- (((x)-1) % EXT2_INODES_PER_GROUP(fs))/EXT2_INODES_PER_BLOCK(fs)
-
-/* get offset for inode in block */
-#define ino_to_fsbo(fs, x) ((x-1) % EXT2_INODES_PER_BLOCK(fs))
-
-/*
- * Give cylinder group number for a file system block.
- * Give cylinder group block number for a file system block.
- */
-#define dtog(fs, d) (((d) - fs->s_es->s_first_data_block) / \
- EXT2_BLOCKS_PER_GROUP(fs))
-#define dtogd(fs, d) (((d) - fs->s_es->s_first_data_block) % \
- EXT2_BLOCKS_PER_GROUP(fs))
-
-/*
- * The following macros optimize certain frequently calculated
- * quantities by using shifts and masks in place of divisions
- * modulos and multiplications.
- */
-#define blkoff(fs, loc) /* calculates (loc % fs->fs_bsize) */ \
- ((loc) & (fs)->s_qbmask)
-
-#define lblktosize(fs, blk) /* calculates (blk * fs->fs_bsize) */ \
- ((blk) << (fs->s_bshift))
-
-#define lblkno(fs, loc) /* calculates (loc / fs->fs_bsize) */ \
- ((loc) >> (fs->s_bshift))
-
-/* no fragments -> logical block number equal # of frags */
-#define numfrags(fs, loc) /* calculates (loc / fs->fs_fsize) */ \
- ((loc) >> (fs->s_bshift))
-
-#define fragroundup(fs, size) /* calculates roundup(size, fs->fs_fsize) */ \
- roundup(size, fs->s_frag_size)
- /* was (((size) + (fs)->fs_qfmask) & (fs)->fs_fmask) */
-
-/*
- * Determining the size of a file block in the file system.
- * easy w/o fragments
- */
-#define blksize(fs, ip, lbn) ((fs)->s_frag_size)
-
-/*
- * INOPB is the number of inodes in a secondary storage block.
- */
-#define INOPB(fs) EXT2_INODES_PER_BLOCK(fs)
-
-/*
- * NINDIR is the number of indirects in a file system block.
- */
-#define NINDIR(fs) (EXT2_ADDR_PER_BLOCK(fs))
-
-extern int inside[], around[];
-extern u_char *fragtbl[];
-
-/* a few remarks about superblock locking/unlocking
- * Linux provides special routines for doing so
- * I haven't figured out yet what BSD does
- * I think I'll try a VOP_LOCK/VOP_UNLOCK on the device vnode
- */
-#define DEVVP(inode) (VFSTOUFS(ITOV(inode)->v_mount)->um_devvp)
-#define lock_super(devvp) vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, curproc)
-#define unlock_super(devvp) VOP_UNLOCK(devvp, 0, curproc)
-
-/*
- * To lock a buffer, set the B_LOCKED flag and then brelse() it. To unlock,
- * reset the B_LOCKED flag and brelse() the buffer back on the LRU list
- */
-#define LCK_BUF(bp) { \
- int s; \
- s = splbio(); \
- (bp)->b_flags |= B_LOCKED; \
- splx(s); \
- brelse(bp); \
-}
-
-#define ULCK_BUF(bp) { \
- long flags; \
- int s; \
- s = splbio(); \
- flags = (bp)->b_flags; \
- (bp)->b_flags &= ~(B_DIRTY | B_LOCKED); \
- BUF_LOCK(bp, LK_EXCLUSIVE); \
- bremfree(bp); \
- splx(s); \
- if (flags & B_DIRTY) \
- bdwrite(bp); \
- else \
- brelse(bp); \
-}
diff --git a/sys/gnu/ext2fs/i386-bitops.h b/sys/gnu/ext2fs/i386-bitops.h
deleted file mode 100644
index 595e870..0000000
--- a/sys/gnu/ext2fs/i386-bitops.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/* $FreeBSD$ */
-/*
- * this is mixture of i386/bitops.h and asm/string.h
- * taken from the Linux source tree
- *
- * XXX replace with Mach routines or reprogram in C
- */
-#ifndef _SYS_GNU_EXT2FS_I386_BITOPS_H_
-#define _SYS_GNU_EXT2FS_I386_BITOPS_H_
-
-/*
- * Copyright 1992, Linus Torvalds.
- */
-
-/*
- * These have to be done with inline assembly: that way the bit-setting
- * is guaranteed to be atomic. All bit operations return 0 if the bit
- * was cleared before the operation and != 0 if it was not.
- *
- * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
- */
-
-/*
- * Some hacks to defeat gcc over-optimizations..
- */
-struct __dummy { unsigned long a[100]; };
-#define ADDR (*(struct __dummy *) addr)
-
-static __inline__ int set_bit(int nr, void * addr)
-{
- int oldbit;
-
- __asm__ __volatile__("btsl %2,%1\n\tsbbl %0,%0"
- :"=r" (oldbit),"=m" (ADDR)
- :"ir" (nr));
- return oldbit;
-}
-
-static __inline__ int clear_bit(int nr, void * addr)
-{
- int oldbit;
-
- __asm__ __volatile__("btrl %2,%1\n\tsbbl %0,%0"
- :"=r" (oldbit),"=m" (ADDR)
- :"ir" (nr));
- return oldbit;
-}
-
-static __inline__ int change_bit(int nr, void * addr)
-{
- int oldbit;
-
- __asm__ __volatile__("btcl %2,%1\n\tsbbl %0,%0"
- :"=r" (oldbit),"=m" (ADDR)
- :"ir" (nr));
- return oldbit;
-}
-
-/*
- * This routine doesn't need to be atomic, but it's faster to code it
- * this way.
- */
-static __inline__ int test_bit(int nr, void * addr)
-{
- int oldbit;
-
- __asm__ __volatile__("btl %2,%1\n\tsbbl %0,%0"
- :"=r" (oldbit)
- :"m" (ADDR),"ir" (nr));
- return oldbit;
-}
-
-/*
- * Find-bit routines..
- */
-static __inline__ int find_first_zero_bit(void * addr, unsigned size)
-{
- int res;
- int _count = (size + 31) >> 5;
-
- if (!size)
- return 0;
- __asm__(" \n\
- cld \n\
- movl $-1,%%eax \n\
- xorl %%edx,%%edx \n\
- repe; scasl \n\
- je 1f \n\
- xorl -4(%%edi),%%eax \n\
- subl $4,%%edi \n\
- bsfl %%eax,%%edx \n\
-1: subl %%ebx,%%edi \n\
- shll $3,%%edi \n\
- addl %%edi,%%edx"
- : "=c" (_count), "=D" (addr), "=d" (res)
- : "0" (_count), "1" (addr), "b" (addr)
- : "ax");
- return res;
-}
-
-static __inline__ int find_next_zero_bit (void * addr, int size, int offset)
-{
- unsigned long * p = ((unsigned long *) addr) + (offset >> 5);
- int set = 0, bit = offset & 31, res;
-
- if (bit) {
- /*
- * Look for zero in first byte
- */
- __asm__(" \n\
- bsfl %1,%0 \n\
- jne 1f \n\
- movl $32, %0 \n\
-1: "
- : "=r" (set)
- : "r" (~(*p >> bit)));
- if (set < (32 - bit))
- return set + offset;
- set = 32 - bit;
- p++;
- }
- /*
- * No zero yet, search remaining full bytes for a zero
- */
- res = find_first_zero_bit (p, size - 32 * (p - (unsigned long *) addr));
- return (offset + set + res);
-}
-
-/*
- * ffz = Find First Zero in word. Undefined if no zero exists,
- * so code should check against ~0UL first..
- */
-static __inline__ unsigned long ffz(unsigned long word)
-{
- __asm__("bsfl %1,%0"
- :"=r" (word)
- :"r" (~word));
- return word;
-}
-
-/*
- * memscan() taken from linux asm/string.h
- */
-/*
- * find the first occurrence of byte 'c', or 1 past the area if none
- */
-static __inline__ char * memscan(void * addr, unsigned char c, int size)
-{
- if (!size)
- return addr;
- __asm__(" \n\
- cld \n\
- repnz; scasb \n\
- jnz 1f \n\
- dec %%edi \n\
-1: "
- : "=D" (addr), "=c" (size)
- : "0" (addr), "1" (size), "a" (c));
- return addr;
-}
-
-#endif /* !_SYS_GNU_EXT2FS_I386_BITOPS_H_ */
diff --git a/sys/gnu/ext2fs/inode.h b/sys/gnu/ext2fs/inode.h
deleted file mode 100644
index 83960b0..0000000
--- a/sys/gnu/ext2fs/inode.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright (c) 1982, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)inode.h 8.9 (Berkeley) 5/14/95
- * $FreeBSD$
- */
-
-#ifndef _UFS_UFS_INODE_H_
-#define _UFS_UFS_INODE_H_
-
-#include <sys/lock.h>
-#include <sys/queue.h>
-#include <ufs/ufs/dinode.h>
-
-/*
- * The size of a logical block number.
- */
-typedef long ufs_lbn_t;
-
-/*
- * This must agree with the definition in <ufs/ufs/dir.h>.
- */
-#define doff_t int32_t
-
-/*
- * The inode is used to describe each active (or recently active) file in the
- * UFS filesystem. It is composed of two types of information. The first part
- * is the information that is needed only while the file is active (such as
- * the identity of the file and linkage to speed its lookup). The second part
- * is the permanent meta-data associated with the file which is read in
- * from the permanent dinode from long term storage when the file becomes
- * active, and is put back when the file is no longer being used.
- */
-struct inode {
- struct lock i_lock; /* Inode lock. >Keep this first< */
- LIST_ENTRY(inode) i_hash;/* Hash chain. */
- struct vnode *i_vnode;/* Vnode associated with this inode. */
- struct vnode *i_devvp;/* Vnode for block I/O. */
- u_int32_t i_flag; /* flags, see below */
- dev_t i_dev; /* Device associated with the inode. */
- ino_t i_number; /* The identity of the inode. */
- int i_effnlink; /* i_nlink when I/O completes */
-
- union { /* Associated filesystem. */
- struct fs *fs; /* FFS */
- struct ext2_sb_info *e2fs; /* EXT2FS */
- } inode_u;
-#define i_fs inode_u.fs
-#define i_e2fs inode_u.e2fs
- struct dquot *i_dquot[MAXQUOTAS]; /* Dquot structures. */
- u_quad_t i_modrev; /* Revision level for NFS lease. */
- struct lockf *i_lockf;/* Head of byte-level lock list. */
- /*
- * Side effects; used during directory lookup.
- */
- int32_t i_count; /* Size of free slot in directory. */
- doff_t i_endoff; /* End of useful stuff in directory. */
- doff_t i_diroff; /* Offset in dir, where we found last entry. */
- doff_t i_offset; /* Offset of free space in directory. */
- ino_t i_ino; /* Inode number of found directory. */
- u_int32_t i_reclen; /* Size of found directory entry. */
- u_int32_t i_spare[4]; /* XXX actually non-spare (for ext2fs). */
- /*
- * The on-disk dinode itself.
- */
- struct dinode i_din; /* 128 bytes of the on-disk dinode. */
-};
-
-#define i_atime i_din.di_atime
-#define i_atimensec i_din.di_atimensec
-#define i_blocks i_din.di_blocks
-#define i_ctime i_din.di_ctime
-#define i_ctimensec i_din.di_ctimensec
-#define i_db i_din.di_db
-#define i_flags i_din.di_flags
-#define i_gen i_din.di_gen
-#define i_gid i_din.di_gid
-#define i_ib i_din.di_ib
-#define i_mode i_din.di_mode
-#define i_mtime i_din.di_mtime
-#define i_mtimensec i_din.di_mtimensec
-#define i_nlink i_din.di_nlink
-#define i_rdev i_din.di_rdev
-#define i_shortlink i_din.di_shortlink
-#define i_size i_din.di_size
-#define i_uid i_din.di_uid
-
-/* These flags are kept in i_flag. */
-#define IN_ACCESS 0x0001 /* Access time update request. */
-#define IN_CHANGE 0x0002 /* Inode change time update request. */
-#define IN_UPDATE 0x0004 /* Modification time update request. */
-#define IN_MODIFIED 0x0008 /* Inode has been modified. */
-#define IN_RENAME 0x0010 /* Inode is being renamed. */
-#define IN_SHLOCK 0x0020 /* File has shared lock. */
-#define IN_EXLOCK 0x0040 /* File has exclusive lock. */
-#define IN_HASHED 0x0080 /* Inode is on hash list */
-#define IN_LAZYMOD 0x0100 /* Modified, but don't write yet. */
-
-#ifdef _KERNEL
-/*
- * Structure used to pass around logical block paths generated by
- * ufs_getlbns and used by truncate and bmap code.
- */
-struct indir {
- ufs_daddr_t in_lbn; /* Logical block number. */
- int in_off; /* Offset in buffer. */
- int in_exists; /* Flag if the block exists. */
-};
-
-/* Convert between inode pointers and vnode pointers. */
-#define VTOI(vp) ((struct inode *)(vp)->v_data)
-#define ITOV(ip) ((ip)->i_vnode)
-
-/* Determine if soft dependencies are being done */
-#define DOINGSOFTDEP(vp) ((vp)->v_mount->mnt_flag & MNT_SOFTDEP)
-#define DOINGASYNC(vp) ((vp)->v_mount->mnt_flag & MNT_ASYNC)
-
-/* This overlays the fid structure (see mount.h). */
-struct ufid {
- u_int16_t ufid_len; /* Length of structure. */
- u_int16_t ufid_pad; /* Force 32-bit alignment. */
- ino_t ufid_ino; /* File number (ino). */
- int32_t ufid_gen; /* Generation number. */
-};
-#endif /* _KERNEL */
-
-#endif /* !_UFS_UFS_INODE_H_ */
diff --git a/sys/gnu/fs/ext2fs/COPYRIGHT.INFO b/sys/gnu/fs/ext2fs/COPYRIGHT.INFO
deleted file mode 100644
index 699f519..0000000
--- a/sys/gnu/fs/ext2fs/COPYRIGHT.INFO
+++ /dev/null
@@ -1,35 +0,0 @@
-$FreeBSD$
-
-Most of the files in this directory are written by Godmar Back or modified
-by him using the CSRG sources. Those files are covered by the Berkeley-style
-copyright. However the following files are covered by GPL. Since the policy
-of the FreeBSD project is to keep the files with the more restrictive
-copyright in the gnu tree and it is a good idea to keep the filesystem code
-all together, the EXT2FS in its entirety resides under the gnu tree. Note
-that only the files below are under the GPL. In the eventuality that these
-files are redesigned or rewritten, this tree can be moved back into the less
-restrictive FreeBSD tree.
-
- ext2_bitmap.c (in the cvs attic)
- ext2_fs.h
- ext2_fs_i.h
- ext2_fs_sb.h
- ext2_linux_balloc.c
- ext2_linux_ialloc.c
- ext2_super.c (in the cvs attic)
- ext2_vfsops.c (has some GPL'ed code from ext2_super.c)
- i386-bitops.h
-
-PS.
- THANKS GODMAR!!!
-
-Note that this port has been modified by John Dyson and others on
-the FreeBSD team, and it is best to send the bug reports to the FreeBSD
-team. If there are any non-FreeBSD specific bugs, fixes will be sent to
-Godmar to help him fix the original code base. It is also our intention
-to send Godmar any FreeBSD specific porting changes so that he can keep
-control of his code....
-
-John
-dyson@freebsd.org
-
diff --git a/sys/gnu/fs/ext2fs/ext2_alloc.c b/sys/gnu/fs/ext2fs/ext2_alloc.c
deleted file mode 100644
index bafcee5..0000000
--- a/sys/gnu/fs/ext2fs/ext2_alloc.c
+++ /dev/null
@@ -1,555 +0,0 @@
-/*
- * modified for Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- */
-/*
- * Copyright (c) 1982, 1986, 1989, 1993
- * The Regents of the University of California. 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 product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ext2_alloc.c 8.8 (Berkeley) 2/21/94
- */
-
-#include "opt_quota.h"
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/conf.h>
-#include <sys/vnode.h>
-#include <sys/stat.h>
-#include <sys/mount.h>
-#include <sys/syslog.h>
-
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/inode.h>
-#include <ufs/ufs/ufsmount.h>
-
-#include <gnu/ext2fs/ext2_fs.h>
-#include <gnu/ext2fs/ext2_fs_sb.h>
-#include <gnu/ext2fs/fs.h>
-#include <gnu/ext2fs/ext2_extern.h>
-
-static void ext2_fserr __P((struct ext2_sb_info *, u_int, char *));
-
-/*
- * Linux calls this functions at the following locations:
- * (1) the inode is freed
- * (2) a preallocation miss occurs
- * (3) truncate is called
- * (4) release_file is called and f_mode & 2
- *
- * I call it in ext2_inactive, ext2_truncate, ext2_vfree and in (2)
- * the call in vfree might be redundant
- */
-void
-ext2_discard_prealloc(ip)
- struct inode * ip;
-{
-#ifdef EXT2_PREALLOCATE
- if (ip->i_prealloc_count) {
- int i = ip->i_prealloc_count;
- ip->i_prealloc_count = 0;
- ext2_free_blocks (ITOV(ip)->v_mount,
- ip->i_prealloc_block,
- i);
- }
-#endif
-}
-
-/*
- * Allocate a block in the file system.
- *
- * this takes the framework from ffs_alloc. To implement the
- * actual allocation, it calls ext2_new_block, the ported version
- * of the same Linux routine.
- *
- * we note that this is always called in connection with ext2_blkpref
- *
- * preallocation is done as Linux does it
- */
-int
-ext2_alloc(ip, lbn, bpref, size, cred, bnp)
- register struct inode *ip;
- daddr_t lbn, bpref;
- int size;
- struct ucred *cred;
- daddr_t *bnp;
-{
- register struct ext2_sb_info *fs;
- daddr_t bno;
-#if QUOTA
- int error;
-#endif
-
- *bnp = 0;
- fs = ip->i_e2fs;
-#if DIAGNOSTIC
- if ((u_int)size > fs->s_blocksize || blkoff(fs, size) != 0) {
- printf("dev = %s, bsize = %lu, size = %d, fs = %s\n",
- devtoname(ip->i_dev), fs->s_blocksize, size, fs->fs_fsmnt);
- panic("ext2_alloc: bad size");
- }
- if (cred == NOCRED)
- panic("ext2_alloc: missing credential");
-#endif /* DIAGNOSTIC */
- if (size == fs->s_blocksize && fs->s_es->s_free_blocks_count == 0)
- goto nospace;
- if (cred->cr_uid != 0 &&
- fs->s_es->s_free_blocks_count < fs->s_es->s_r_blocks_count)
- goto nospace;
-#if QUOTA
- if ((error = chkdq(ip, (long)btodb(size), cred, 0)) != 0)
- return (error);
-#endif
- if (bpref >= fs->s_es->s_blocks_count)
- bpref = 0;
- /* call the Linux code */
-#ifdef EXT2_PREALLOCATE
- /* To have a preallocation hit, we must
- * - have at least one block preallocated
- * - and our preferred block must have that block number or one below
- */
- if (ip->i_prealloc_count &&
- (bpref == ip->i_prealloc_block ||
- bpref + 1 == ip->i_prealloc_block))
- {
- bno = ip->i_prealloc_block++;
- ip->i_prealloc_count--;
- /* ext2_debug ("preallocation hit (%lu/%lu).\n",
- ++alloc_hits, ++alloc_attempts); */
-
- /* Linux gets, clears, and releases the buffer at this
- point - we don't have to that; we leave it to the caller
- */
- } else {
- ext2_discard_prealloc (ip);
- /* ext2_debug ("preallocation miss (%lu/%lu).\n",
- alloc_hits, ++alloc_attempts); */
- if (S_ISREG(ip->i_mode))
- bno = ext2_new_block
- (ITOV(ip)->v_mount, bpref,
- &ip->i_prealloc_count,
- &ip->i_prealloc_block);
- else
- bno = (daddr_t)ext2_new_block(ITOV(ip)->v_mount,
- bpref, 0, 0);
- }
-#else
- bno = (daddr_t)ext2_new_block(ITOV(ip)->v_mount, bpref, 0, 0);
-#endif
-
- if (bno > 0) {
- /* set next_alloc fields as done in block_getblk */
- ip->i_next_alloc_block = lbn;
- ip->i_next_alloc_goal = bno;
-
- ip->i_blocks += btodb(size);
- ip->i_flag |= IN_CHANGE | IN_UPDATE;
- *bnp = bno;
- return (0);
- }
-#if QUOTA
- /*
- * Restore user's disk quota because allocation failed.
- */
- (void) chkdq(ip, (long)-btodb(size), cred, FORCE);
-#endif
-nospace:
- ext2_fserr(fs, cred->cr_uid, "file system full");
- uprintf("\n%s: write failed, file system is full\n", fs->fs_fsmnt);
- return (ENOSPC);
-}
-
-/*
- * Reallocate a sequence of blocks into a contiguous sequence of blocks.
- *
- * The vnode and an array of buffer pointers for a range of sequential
- * logical blocks to be made contiguous is given. The allocator attempts
- * to find a range of sequential blocks starting as close as possible to
- * an fs_rotdelay offset from the end of the allocation for the logical
- * block immediately preceeding the current range. If successful, the
- * physical block numbers in the buffer pointers and in the inode are
- * changed to reflect the new allocation. If unsuccessful, the allocation
- * is left unchanged. The success in doing the reallocation is returned.
- * Note that the error return is not reflected back to the user. Rather
- * the previous block allocation will be used.
- */
-
-#ifdef FANCY_REALLOC
-#include <sys/sysctl.h>
-static int doasyncfree = 1;
-#ifdef OPT_DEBUG
-SYSCTL_INT(_debug, 14, doasyncfree, CTLFLAG_RW, &doasyncfree, 0, "");
-#endif /* OPT_DEBUG */
-#endif
-
-int
-ext2_reallocblks(ap)
- struct vop_reallocblks_args /* {
- struct vnode *a_vp;
- struct cluster_save *a_buflist;
- } */ *ap;
-{
-#ifndef FANCY_REALLOC
-/* printf("ext2_reallocblks not implemented\n"); */
-return ENOSPC;
-#else
-
- struct ext2_sb_info *fs;
- struct inode *ip;
- struct vnode *vp;
- struct buf *sbp, *ebp;
- daddr_t *bap, *sbap, *ebap;
- struct cluster_save *buflist;
- daddr_t start_lbn, end_lbn, soff, eoff, newblk, blkno;
- struct indir start_ap[NIADDR + 1], end_ap[NIADDR + 1], *idp;
- int i, len, start_lvl, end_lvl, pref, ssize;
-
- vp = ap->a_vp;
- ip = VTOI(vp);
- fs = ip->i_e2fs;
-#ifdef UNKLAR
- if (fs->fs_contigsumsize <= 0)
- return (ENOSPC);
-#endif
- buflist = ap->a_buflist;
- len = buflist->bs_nchildren;
- start_lbn = buflist->bs_children[0]->b_lblkno;
- end_lbn = start_lbn + len - 1;
-#if DIAGNOSTIC
- for (i = 1; i < len; i++)
- if (buflist->bs_children[i]->b_lblkno != start_lbn + i)
- panic("ext2_reallocblks: non-cluster");
-#endif
- /*
- * If the latest allocation is in a new cylinder group, assume that
- * the filesystem has decided to move and do not force it back to
- * the previous cylinder group.
- */
- if (dtog(fs, dbtofsb(fs, buflist->bs_children[0]->b_blkno)) !=
- dtog(fs, dbtofsb(fs, buflist->bs_children[len - 1]->b_blkno)))
- return (ENOSPC);
- if (ufs_getlbns(vp, start_lbn, start_ap, &start_lvl) ||
- ufs_getlbns(vp, end_lbn, end_ap, &end_lvl))
- return (ENOSPC);
- /*
- * Get the starting offset and block map for the first block.
- */
- if (start_lvl == 0) {
- sbap = &ip->i_db[0];
- soff = start_lbn;
- } else {
- idp = &start_ap[start_lvl - 1];
- if (bread(vp, idp->in_lbn, (int)fs->s_blocksize, NOCRED, &sbp)) {
- brelse(sbp);
- return (ENOSPC);
- }
- sbap = (daddr_t *)sbp->b_data;
- soff = idp->in_off;
- }
- /*
- * Find the preferred location for the cluster.
- */
- pref = ext2_blkpref(ip, start_lbn, soff, sbap);
- /*
- * If the block range spans two block maps, get the second map.
- */
- if (end_lvl == 0 || (idp = &end_ap[end_lvl - 1])->in_off + 1 >= len) {
- ssize = len;
- } else {
-#if DIAGNOSTIC
- if (start_ap[start_lvl-1].in_lbn == idp->in_lbn)
- panic("ext2_reallocblk: start == end");
-#endif
- ssize = len - (idp->in_off + 1);
- if (bread(vp, idp->in_lbn, (int)fs->s_blocksize, NOCRED, &ebp))
- goto fail;
- ebap = (daddr_t *)ebp->b_data;
- }
- /*
- * Search the block map looking for an allocation of the desired size.
- */
- if ((newblk = (daddr_t)ext2_hashalloc(ip, dtog(fs, pref), (long)pref,
- len, (u_long (*)())ext2_clusteralloc)) == 0)
- goto fail;
- /*
- * We have found a new contiguous block.
- *
- * First we have to replace the old block pointers with the new
- * block pointers in the inode and indirect blocks associated
- * with the file.
- */
- blkno = newblk;
- for (bap = &sbap[soff], i = 0; i < len; i++, blkno += fs->s_frags_per_block) {
- if (i == ssize)
- bap = ebap;
-#if DIAGNOSTIC
- if (buflist->bs_children[i]->b_blkno != fsbtodb(fs, *bap))
- panic("ext2_reallocblks: alloc mismatch");
-#endif
- *bap++ = blkno;
- }
- /*
- * Next we must write out the modified inode and indirect blocks.
- * For strict correctness, the writes should be synchronous since
- * the old block values may have been written to disk. In practise
- * they are almost never written, but if we are concerned about
- * strict correctness, the `doasyncfree' flag should be set to zero.
- *
- * The test on `doasyncfree' should be changed to test a flag
- * that shows whether the associated buffers and inodes have
- * been written. The flag should be set when the cluster is
- * started and cleared whenever the buffer or inode is flushed.
- * We can then check below to see if it is set, and do the
- * synchronous write only when it has been cleared.
- */
- if (sbap != &ip->i_db[0]) {
- if (doasyncfree)
- bdwrite(sbp);
- else
- bwrite(sbp);
- } else {
- ip->i_flag |= IN_CHANGE | IN_UPDATE;
- if (!doasyncfree)
- UFS_UPDATE(vp, 1);
- }
- if (ssize < len)
- if (doasyncfree)
- bdwrite(ebp);
- else
- bwrite(ebp);
- /*
- * Last, free the old blocks and assign the new blocks to the buffers.
- */
- for (blkno = newblk, i = 0; i < len; i++, blkno += fs->s_frags_per_block) {
- ext2_blkfree(ip, dbtofsb(fs, buflist->bs_children[i]->b_blkno),
- fs->s_blocksize);
- buflist->bs_children[i]->b_blkno = fsbtodb(fs, blkno);
- }
- return (0);
-
-fail:
- if (ssize < len)
- brelse(ebp);
- if (sbap != &ip->i_db[0])
- brelse(sbp);
- return (ENOSPC);
-
-#endif /* FANCY_REALLOC */
-}
-
-/*
- * Allocate an inode in the file system.
- *
- * we leave the actual allocation strategy to the (modified)
- * ext2_new_inode(), to make sure we get the policies right
- */
-int
-ext2_valloc(pvp, mode, cred, vpp)
- struct vnode *pvp;
- int mode;
- struct ucred *cred;
- struct vnode **vpp;
-{
- register struct inode *pip;
- register struct ext2_sb_info *fs;
- register struct inode *ip;
- ino_t ino;
- int i, error;
-
- *vpp = NULL;
- pip = VTOI(pvp);
- fs = pip->i_e2fs;
- if (fs->s_es->s_free_inodes_count == 0)
- goto noinodes;
-
- /* call the Linux routine - it returns the inode number only */
- ino = ext2_new_inode(pip, mode);
-
- if (ino == 0)
- goto noinodes;
- error = VFS_VGET(pvp->v_mount, ino, vpp);
- if (error) {
- UFS_VFREE(pvp, ino, mode);
- return (error);
- }
- ip = VTOI(*vpp);
-
- /*
- the question is whether using VGET was such good idea at all -
- Linux doesn't read the old inode in when it's allocating a
- new one. I will set at least i_size & i_blocks the zero.
- */
- ip->i_mode = 0;
- ip->i_size = 0;
- ip->i_blocks = 0;
- ip->i_flags = 0;
- /* now we want to make sure that the block pointers are zeroed out */
- for (i = 0; i < NDADDR; i++)
- ip->i_db[i] = 0;
- for (i = 0; i < NIADDR; i++)
- ip->i_ib[i] = 0;
-
- /*
- * Set up a new generation number for this inode.
- * XXX check if this makes sense in ext2
- */
- if (ip->i_gen == 0 || ++ip->i_gen == 0)
- ip->i_gen = random() / 2 + 1;
-/*
-printf("ext2_valloc: allocated inode %d\n", ino);
-*/
- return (0);
-noinodes:
- ext2_fserr(fs, cred->cr_uid, "out of inodes");
- uprintf("\n%s: create/symlink failed, no inodes free\n", fs->fs_fsmnt);
- return (ENOSPC);
-}
-
-/*
- * Select the desired position for the next block in a file.
- *
- * we try to mimic what Remy does in inode_getblk/block_getblk
- *
- * we note: blocknr == 0 means that we're about to allocate either
- * a direct block or a pointer block at the first level of indirection
- * (In other words, stuff that will go in i_db[] or i_ib[])
- *
- * blocknr != 0 means that we're allocating a block that is none
- * of the above. Then, blocknr tells us the number of the block
- * that will hold the pointer
- */
-daddr_t
-ext2_blkpref(ip, lbn, indx, bap, blocknr)
- struct inode *ip;
- daddr_t lbn;
- int indx;
- daddr_t *bap;
- daddr_t blocknr;
-{
- int tmp;
-
- /* if the next block is actually what we thought it is,
- then set the goal to what we thought it should be
- */
- if(ip->i_next_alloc_block == lbn)
- return ip->i_next_alloc_goal;
-
- /* now check whether we were provided with an array that basically
- tells us previous blocks to which we want to stay closeby
- */
- if(bap)
- for (tmp = indx - 1; tmp >= 0; tmp--)
- if (bap[tmp])
- return bap[tmp];
-
- /* else let's fall back to the blocknr, or, if there is none,
- follow the rule that a block should be allocated near its inode
- */
- return blocknr ? blocknr :
- (daddr_t)(ip->i_block_group *
- EXT2_BLOCKS_PER_GROUP(ip->i_e2fs)) +
- ip->i_e2fs->s_es->s_first_data_block;
-}
-
-/*
- * Free a block or fragment.
- *
- * pass on to the Linux code
- */
-void
-ext2_blkfree(ip, bno, size)
- register struct inode *ip;
- daddr_t bno;
- long size;
-{
- register struct ext2_sb_info *fs;
-
- fs = ip->i_e2fs;
- /*
- * call Linux code with mount *, block number, count
- */
- ext2_free_blocks(ITOV(ip)->v_mount, bno, size / fs->s_frag_size);
-}
-
-/*
- * Free an inode.
- *
- * the maintenance of the actual bitmaps is again up to the linux code
- */
-int
-ext2_vfree(pvp, ino, mode)
- struct vnode *pvp;
- ino_t ino;
- int mode;
-{
- register struct ext2_sb_info *fs;
- register struct inode *pip;
- register mode_t save_i_mode;
-
- pip = VTOI(pvp);
- fs = pip->i_e2fs;
- if ((u_int)ino >= fs->s_inodes_per_group * fs->s_groups_count)
- panic("ext2_vfree: range: dev = (%d, %d), ino = %d, fs = %s",
- major(pip->i_dev), minor(pip->i_dev), ino, fs->fs_fsmnt);
-
-/* ext2_debug("ext2_vfree (%d, %d) called\n", pip->i_number, mode);
- */
- ext2_discard_prealloc(pip);
-
- /* we need to make sure that ext2_free_inode can adjust the
- used_dir_counts in the group summary information - I'd
- really like to know what the rationale behind this
- 'set i_mode to zero to denote an unused inode' is
- */
- save_i_mode = pip->i_mode;
- pip->i_mode = mode;
- ext2_free_inode(pip);
- pip->i_mode = save_i_mode;
- return (0);
-}
-
-/*
- * Fserr prints the name of a file system with an error diagnostic.
- *
- * The form of the error message is:
- * fs: error message
- */
-static void
-ext2_fserr(fs, uid, cp)
- struct ext2_sb_info *fs;
- u_int uid;
- char *cp;
-{
-
- log(LOG_ERR, "uid %d on %s: %s\n", uid, fs->fs_fsmnt, cp);
-}
diff --git a/sys/gnu/fs/ext2fs/ext2_balloc.c b/sys/gnu/fs/ext2fs/ext2_balloc.c
deleted file mode 100644
index 2b485c6..0000000
--- a/sys/gnu/fs/ext2fs/ext2_balloc.c
+++ /dev/null
@@ -1,313 +0,0 @@
-/*
- * modified for Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- */
-/*
- * Copyright (c) 1982, 1986, 1989, 1993
- * The Regents of the University of California. 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 product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ffs_balloc.c 8.4 (Berkeley) 9/23/93
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/buf.h>
-#include <sys/lock.h>
-#include <sys/ucred.h>
-#include <sys/vnode.h>
-
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/inode.h>
-#include <ufs/ufs/ufs_extern.h>
-
-#include <gnu/ext2fs/ext2_fs.h>
-#include <gnu/ext2fs/ext2_fs_sb.h>
-#include <gnu/ext2fs/fs.h>
-#include <gnu/ext2fs/ext2_extern.h>
-
-/*
- * Balloc defines the structure of file system storage
- * by allocating the physical blocks on a device given
- * the inode and the logical block number in a file.
- */
-int
-ext2_balloc(ip, bn, size, cred, bpp, flags)
- register struct inode *ip;
- register daddr_t bn;
- int size;
- struct ucred *cred;
- struct buf **bpp;
- int flags;
-{
- register struct ext2_sb_info *fs;
- register daddr_t nb;
- struct buf *bp, *nbp;
- struct vnode *vp = ITOV(ip);
- struct indir indirs[NIADDR + 2];
- daddr_t newb, lbn, *bap, pref;
- int osize, nsize, num, i, error;
-/*
-ext2_debug("ext2_balloc called (%d, %d, %d)\n",
- ip->i_number, (int)bn, (int)size);
-*/
- *bpp = NULL;
- if (bn < 0)
- return (EFBIG);
- fs = ip->i_e2fs;
- lbn = bn;
-
- /*
- * check if this is a sequential block allocation.
- * If so, increment next_alloc fields to allow ext2_blkpref
- * to make a good guess
- */
- if (lbn == ip->i_next_alloc_block + 1) {
- ip->i_next_alloc_block++;
- ip->i_next_alloc_goal++;
- }
-
- /*
- * The first NDADDR blocks are direct blocks
- */
- if (bn < NDADDR) {
- nb = ip->i_db[bn];
- /* no new block is to be allocated, and no need to expand
- the file */
- if (nb != 0 && ip->i_size >= (bn + 1) * fs->s_blocksize) {
- error = bread(vp, bn, fs->s_blocksize, NOCRED, &bp);
- if (error) {
- brelse(bp);
- return (error);
- }
- *bpp = bp;
- return (0);
- }
- if (nb != 0) {
- /*
- * Consider need to reallocate a fragment.
- */
- osize = fragroundup(fs, blkoff(fs, ip->i_size));
- nsize = fragroundup(fs, size);
- if (nsize <= osize) {
- error = bread(vp, bn, osize, NOCRED, &bp);
- if (error) {
- brelse(bp);
- return (error);
- }
- } else {
- /* Godmar thinks: this shouldn't happen w/o fragments */
- printf("nsize %d(%d) > osize %d(%d) nb %d\n",
- (int)nsize, (int)size, (int)osize,
- (int)ip->i_size, (int)nb);
- panic(
- "ext2_balloc: Something is terribly wrong");
-/*
- * please note there haven't been any changes from here on -
- * FFS seems to work.
- */
- }
- } else {
- if (ip->i_size < (bn + 1) * fs->s_blocksize)
- nsize = fragroundup(fs, size);
- else
- nsize = fs->s_blocksize;
- error = ext2_alloc(ip, bn,
- ext2_blkpref(ip, bn, (int)bn, &ip->i_db[0], 0),
- nsize, cred, &newb);
- if (error)
- return (error);
- bp = getblk(vp, bn, nsize, 0, 0);
- bp->b_blkno = fsbtodb(fs, newb);
- if (flags & B_CLRBUF)
- vfs_bio_clrbuf(bp);
- }
- ip->i_db[bn] = dbtofsb(fs, bp->b_blkno);
- ip->i_flag |= IN_CHANGE | IN_UPDATE;
- *bpp = bp;
- return (0);
- }
- /*
- * Determine the number of levels of indirection.
- */
- pref = 0;
- if ((error = ufs_getlbns(vp, bn, indirs, &num)) != 0)
- return(error);
-#if DIAGNOSTIC
- if (num < 1)
- panic ("ext2_balloc: ufs_bmaparray returned indirect block");
-#endif
- /*
- * Fetch the first indirect block allocating if necessary.
- */
- --num;
- nb = ip->i_ib[indirs[0].in_off];
- if (nb == 0) {
-#if 0
- pref = ext2_blkpref(ip, lbn, 0, (daddr_t *)0, 0);
-#else
- /* see the comment by ext2_blkpref. What we do here is
- to pretend that it'd be good for a block holding indirect
- pointers to be allocated near its predecessor in terms
- of indirection, or the last direct block.
- We shamelessly exploit the fact that i_ib immediately
- follows i_db.
- Godmar thinks it make sense to allocate i_ib[0] immediately
- after i_db[11], but it's not utterly clear whether this also
- applies to i_ib[1] and i_ib[0]
- */
-
- pref = ext2_blkpref(ip, lbn, indirs[0].in_off +
- EXT2_NDIR_BLOCKS, &ip->i_db[0], 0);
-#endif
- if ((error = ext2_alloc(ip, lbn, pref, (int)fs->s_blocksize,
- cred, &newb)) != 0)
- return (error);
- nb = newb;
- bp = getblk(vp, indirs[1].in_lbn, fs->s_blocksize, 0, 0);
- bp->b_blkno = fsbtodb(fs, newb);
- vfs_bio_clrbuf(bp);
- /*
- * Write synchronously so that indirect blocks
- * never point at garbage.
- */
- if ((error = bwrite(bp)) != 0) {
- ext2_blkfree(ip, nb, fs->s_blocksize);
- return (error);
- }
- ip->i_ib[indirs[0].in_off] = newb;
- ip->i_flag |= IN_CHANGE | IN_UPDATE;
- }
- /*
- * Fetch through the indirect blocks, allocating as necessary.
- */
- for (i = 1;;) {
- error = bread(vp,
- indirs[i].in_lbn, (int)fs->s_blocksize, NOCRED, &bp);
- if (error) {
- brelse(bp);
- return (error);
- }
- bap = (daddr_t *)bp->b_data;
- nb = bap[indirs[i].in_off];
- if (i == num)
- break;
- i += 1;
- if (nb != 0) {
- brelse(bp);
- continue;
- }
- if (pref == 0)
-#if 1
- /* see the comment above and by ext2_blkpref
- * I think this implements Linux policy, but
- * does it really make sense to allocate to
- * block containing pointers together ?
- * Also, will it ever succeed ?
- */
- pref = ext2_blkpref(ip, lbn, indirs[i].in_off, bap,
- bp->b_lblkno);
-#else
- pref = ext2_blkpref(ip, lbn, 0, (daddr_t *)0, 0);
-#endif
- if ((error =
- ext2_alloc(ip, lbn, pref, (int)fs->s_blocksize, cred, &newb)) != 0) {
- brelse(bp);
- return (error);
- }
- nb = newb;
- nbp = getblk(vp, indirs[i].in_lbn, fs->s_blocksize, 0, 0);
- nbp->b_blkno = fsbtodb(fs, nb);
- vfs_bio_clrbuf(nbp);
- /*
- * Write synchronously so that indirect blocks
- * never point at garbage.
- */
- if ((error = bwrite(nbp)) != 0) {
- ext2_blkfree(ip, nb, fs->s_blocksize);
- brelse(bp);
- return (error);
- }
- bap[indirs[i - 1].in_off] = nb;
- /*
- * If required, write synchronously, otherwise use
- * delayed write.
- */
- if (flags & B_SYNC) {
- bwrite(bp);
- } else {
- bdwrite(bp);
- }
- }
- /*
- * Get the data block, allocating if necessary.
- */
- if (nb == 0) {
- pref = ext2_blkpref(ip, lbn, indirs[i].in_off, &bap[0],
- bp->b_lblkno);
- if ((error = ext2_alloc(ip,
- lbn, pref, (int)fs->s_blocksize, cred, &newb)) != 0) {
- brelse(bp);
- return (error);
- }
- nb = newb;
- nbp = getblk(vp, lbn, fs->s_blocksize, 0, 0);
- nbp->b_blkno = fsbtodb(fs, nb);
- if (flags & B_CLRBUF)
- vfs_bio_clrbuf(nbp);
- bap[indirs[i].in_off] = nb;
- /*
- * If required, write synchronously, otherwise use
- * delayed write.
- */
- if (flags & B_SYNC) {
- bwrite(bp);
- } else {
- bdwrite(bp);
- }
- *bpp = nbp;
- return (0);
- }
- brelse(bp);
- if (flags & B_CLRBUF) {
- error = bread(vp, lbn, (int)fs->s_blocksize, NOCRED, &nbp);
- if (error) {
- brelse(nbp);
- return (error);
- }
- } else {
- nbp = getblk(vp, lbn, fs->s_blocksize, 0, 0);
- nbp->b_blkno = fsbtodb(fs, nb);
- }
- *bpp = nbp;
- return (0);
-}
diff --git a/sys/gnu/fs/ext2fs/ext2_bmap.c b/sys/gnu/fs/ext2fs/ext2_bmap.c
deleted file mode 100644
index 2f2a4dc..0000000
--- a/sys/gnu/fs/ext2fs/ext2_bmap.c
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
- * Copyright (c) 1989, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ufs_bmap.c 8.7 (Berkeley) 3/21/95
- * $FreeBSD$
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/buf.h>
-#include <sys/proc.h>
-#include <sys/vnode.h>
-#include <sys/mount.h>
-#include <sys/resourcevar.h>
-#include <sys/conf.h>
-
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/inode.h>
-#include <ufs/ufs/ufsmount.h>
-#include <ufs/ufs/ufs_extern.h>
-
-/*
- * Bmap converts a the logical block number of a file to its physical block
- * number on the disk. The conversion is done by using the logical block
- * number to index into the array of block pointers described by the dinode.
- */
-int
-ufs_bmap(ap)
- struct vop_bmap_args /* {
- struct vnode *a_vp;
- ufs_daddr_t a_bn;
- struct vnode **a_vpp;
- ufs_daddr_t *a_bnp;
- int *a_runp;
- int *a_runb;
- } */ *ap;
-{
- /*
- * Check for underlying vnode requests and ensure that logical
- * to physical mapping is requested.
- */
- if (ap->a_vpp != NULL)
- *ap->a_vpp = VTOI(ap->a_vp)->i_devvp;
- if (ap->a_bnp == NULL)
- return (0);
-
- return (ufs_bmaparray(ap->a_vp, ap->a_bn, ap->a_bnp, NULL, NULL,
- ap->a_runp, ap->a_runb));
-}
-
-/*
- * Indirect blocks are now on the vnode for the file. They are given negative
- * logical block numbers. Indirect blocks are addressed by the negative
- * address of the first data block to which they point. Double indirect blocks
- * are addressed by one less than the address of the first indirect block to
- * which they point. Triple indirect blocks are addressed by one less than
- * the address of the first double indirect block to which they point.
- *
- * ufs_bmaparray does the bmap conversion, and if requested returns the
- * array of logical blocks which must be traversed to get to a block.
- * Each entry contains the offset into that block that gets you to the
- * next block and the disk address of the block (if it is assigned).
- */
-
-int
-ufs_bmaparray(vp, bn, bnp, ap, nump, runp, runb)
- struct vnode *vp;
- ufs_daddr_t bn;
- ufs_daddr_t *bnp;
- struct indir *ap;
- int *nump;
- int *runp;
- int *runb;
-{
- register struct inode *ip;
- struct buf *bp;
- struct ufsmount *ump;
- struct mount *mp;
- struct vnode *devvp;
- struct indir a[NIADDR+1], *xap;
- ufs_daddr_t daddr;
- long metalbn;
- int error, maxrun, num;
-
- ip = VTOI(vp);
- mp = vp->v_mount;
- ump = VFSTOUFS(mp);
- devvp = ump->um_devvp;
-#ifdef DIAGNOSTIC
- if ((ap != NULL && nump == NULL) || (ap == NULL && nump != NULL))
- panic("ufs_bmaparray: invalid arguments");
-#endif
-
- if (runp) {
- *runp = 0;
- }
-
- if (runb) {
- *runb = 0;
- }
-
- maxrun = mp->mnt_iosize_max / mp->mnt_stat.f_iosize - 1;
-
- xap = ap == NULL ? a : ap;
- if (!nump)
- nump = &num;
- error = ufs_getlbns(vp, bn, xap, nump);
- if (error)
- return (error);
-
- num = *nump;
- if (num == 0) {
- *bnp = blkptrtodb(ump, ip->i_db[bn]);
- if (*bnp == 0)
- *bnp = -1;
- else if (runp) {
- daddr_t bnb = bn;
- for (++bn; bn < NDADDR && *runp < maxrun &&
- is_sequential(ump, ip->i_db[bn - 1], ip->i_db[bn]);
- ++bn, ++*runp);
- bn = bnb;
- if (runb && (bn > 0)) {
- for (--bn; (bn >= 0) && (*runb < maxrun) &&
- is_sequential(ump, ip->i_db[bn],
- ip->i_db[bn+1]);
- --bn, ++*runb);
- }
- }
- return (0);
- }
-
-
- /* Get disk address out of indirect block array */
- daddr = ip->i_ib[xap->in_off];
-
- for (bp = NULL, ++xap; --num; ++xap) {
- /*
- * Exit the loop if there is no disk address assigned yet and
- * the indirect block isn't in the cache, or if we were
- * looking for an indirect block and we've found it.
- */
-
- metalbn = xap->in_lbn;
- if ((daddr == 0 && !incore(vp, metalbn)) || metalbn == bn)
- break;
- /*
- * If we get here, we've either got the block in the cache
- * or we have a disk address for it, go fetch it.
- */
- if (bp)
- bqrelse(bp);
-
- xap->in_exists = 1;
- bp = getblk(vp, metalbn, mp->mnt_stat.f_iosize, 0, 0);
- if ((bp->b_flags & B_CACHE) == 0) {
-#ifdef DIAGNOSTIC
- if (!daddr)
- panic("ufs_bmaparray: indirect block not in cache");
-#endif
- bp->b_blkno = blkptrtodb(ump, daddr);
- bp->b_iocmd = BIO_READ;
- bp->b_flags &= ~(B_INVAL|B_ERROR);
- vfs_busy_pages(bp, 0);
- BUF_STRATEGY(bp);
- curproc->p_stats->p_ru.ru_inblock++; /* XXX */
- error = biowait(bp);
- if (error) {
- brelse(bp);
- return (error);
- }
- }
-
- daddr = ((ufs_daddr_t *)bp->b_data)[xap->in_off];
- if (num == 1 && daddr && runp) {
- for (bn = xap->in_off + 1;
- bn < MNINDIR(ump) && *runp < maxrun &&
- is_sequential(ump,
- ((ufs_daddr_t *)bp->b_data)[bn - 1],
- ((ufs_daddr_t *)bp->b_data)[bn]);
- ++bn, ++*runp);
- bn = xap->in_off;
- if (runb && bn) {
- for(--bn; bn >= 0 && *runb < maxrun &&
- is_sequential(ump, ((daddr_t *)bp->b_data)[bn],
- ((daddr_t *)bp->b_data)[bn+1]);
- --bn, ++*runb);
- }
- }
- }
- if (bp)
- bqrelse(bp);
-
- daddr = blkptrtodb(ump, daddr);
- *bnp = daddr == 0 ? -1 : daddr;
- return (0);
-}
-
-/*
- * Create an array of logical block number/offset pairs which represent the
- * path of indirect blocks required to access a data block. The first "pair"
- * contains the logical block number of the appropriate single, double or
- * triple indirect block and the offset into the inode indirect block array.
- * Note, the logical block number of the inode single/double/triple indirect
- * block appears twice in the array, once with the offset into the i_ib and
- * once with the offset into the page itself.
- */
-int
-ufs_getlbns(vp, bn, ap, nump)
- struct vnode *vp;
- ufs_daddr_t bn;
- struct indir *ap;
- int *nump;
-{
- long blockcnt, metalbn, realbn;
- struct ufsmount *ump;
- int i, numlevels, off;
- int64_t qblockcnt;
-
- ump = VFSTOUFS(vp->v_mount);
- if (nump)
- *nump = 0;
- numlevels = 0;
- realbn = bn;
- if ((long)bn < 0)
- bn = -(long)bn;
-
- /* The first NDADDR blocks are direct blocks. */
- if (bn < NDADDR)
- return (0);
-
- /*
- * Determine the number of levels of indirection. After this loop
- * is done, blockcnt indicates the number of data blocks possible
- * at the previous level of indirection, and NIADDR - i is the number
- * of levels of indirection needed to locate the requested block.
- */
- for (blockcnt = 1, i = NIADDR, bn -= NDADDR;; i--, bn -= blockcnt) {
- if (i == 0)
- return (EFBIG);
- /*
- * Use int64_t's here to avoid overflow for triple indirect
- * blocks when longs have 32 bits and the block size is more
- * than 4K.
- */
- qblockcnt = (int64_t)blockcnt * MNINDIR(ump);
- if (bn < qblockcnt)
- break;
- blockcnt = qblockcnt;
- }
-
- /* Calculate the address of the first meta-block. */
- if (realbn >= 0)
- metalbn = -(realbn - bn + NIADDR - i);
- else
- metalbn = -(-realbn - bn + NIADDR - i);
-
- /*
- * At each iteration, off is the offset into the bap array which is
- * an array of disk addresses at the current level of indirection.
- * The logical block number and the offset in that block are stored
- * into the argument array.
- */
- ap->in_lbn = metalbn;
- ap->in_off = off = NIADDR - i;
- ap->in_exists = 0;
- ap++;
- for (++numlevels; i <= NIADDR; i++) {
- /* If searching for a meta-data block, quit when found. */
- if (metalbn == realbn)
- break;
-
- off = (bn / blockcnt) % MNINDIR(ump);
-
- ++numlevels;
- ap->in_lbn = metalbn;
- ap->in_off = off;
- ap->in_exists = 0;
- ++ap;
-
- metalbn -= -1 + off * blockcnt;
- blockcnt /= MNINDIR(ump);
- }
- if (nump)
- *nump = numlevels;
- return (0);
-}
diff --git a/sys/gnu/fs/ext2fs/ext2_extern.h b/sys/gnu/fs/ext2fs/ext2_extern.h
deleted file mode 100644
index 317f540..0000000
--- a/sys/gnu/fs/ext2fs/ext2_extern.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * modified for EXT2FS support in Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- */
-/*-
- * Copyright (c) 1991, 1993, 1994
- * The Regents of the University of California. 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 product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ffs_extern.h 8.3 (Berkeley) 4/16/94
- */
-
-#ifndef _SYS_GNU_EXT2FS_EXT2_EXTERN_H_
-#define _SYS_GNU_EXT2FS_EXT2_EXTERN_H_
-
-struct dinode;
-struct ext2_inode;
-struct inode;
-struct mount;
-struct vfsconf;
-struct vnode;
-
-int ext2_alloc __P((struct inode *,
- daddr_t, daddr_t, int, struct ucred *, daddr_t *));
-int ext2_balloc __P((struct inode *,
- daddr_t, int, struct ucred *, struct buf **, int));
-int ext2_blkatoff __P((struct vnode *, off_t, char **, struct buf **));
-void ext2_blkfree __P((struct inode *, daddr_t, long));
-daddr_t ext2_blkpref __P((struct inode *, daddr_t, int, daddr_t *, daddr_t));
-int ext2_bmap __P((struct vop_bmap_args *));
-int ext2_init __P((struct vfsconf *));
-int ext2_reallocblks __P((struct vop_reallocblks_args *));
-int ext2_reclaim __P((struct vop_reclaim_args *));
-void ext2_setblock __P((struct ext2_sb_info *, u_char *, daddr_t));
-int ext2_truncate __P((struct vnode *, off_t, int, struct ucred *, struct proc *));
-int ext2_update __P((struct vnode *, int));
-int ext2_valloc __P((struct vnode *, int, struct ucred *, struct vnode **));
-int ext2_vfree __P((struct vnode *, ino_t, int));
-int ext2_lookup __P((struct vop_cachedlookup_args *));
-int ext2_readdir __P((struct vop_readdir_args *));
-void ext2_print_dinode __P((struct dinode *));
-void ext2_print_inode __P((struct inode *));
-int ext2_direnter __P((struct inode *,
- struct vnode *, struct componentname *));
-int ext2_dirremove __P((struct vnode *, struct componentname *));
-int ext2_dirrewrite __P((struct inode *,
- struct inode *, struct componentname *));
-int ext2_dirempty __P((struct inode *, ino_t, struct ucred *));
-int ext2_checkpath __P((struct inode *, struct inode *, struct ucred *));
-struct ext2_group_desc * get_group_desc __P((struct mount * ,
- unsigned int , struct buf ** ));
-void ext2_discard_prealloc __P((struct inode *));
-int ext2_inactive __P((struct vop_inactive_args *));
-int ext2_new_block __P ((struct mount * mp, unsigned long goal,
- u_int32_t * prealloc_count,
- u_int32_t * prealloc_block));
-ino_t ext2_new_inode __P ((const struct inode * dir, int mode));
-unsigned long ext2_count_free __P((struct buf *map, unsigned int numchars));
-void ext2_free_blocks __P((struct mount * mp, unsigned long block,
- unsigned long count));
-void ext2_free_inode __P((struct inode * inode));
-void ext2_ei2di __P((struct ext2_inode *ei, struct dinode *di));
-void ext2_di2ei __P((struct dinode *di, struct ext2_inode *ei));
-void mark_buffer_dirty __P((struct buf *bh));
-
-/*
- * This macro allows the ufs code to distinguish between an EXT2 and a
- * non-ext2(FFS/LFS) vnode.
- */
-#define IS_EXT2_VNODE(vp) (vp->v_mount->mnt_stat.f_type == MOUNT_EXT2FS)
-
-extern vop_t **ext2_vnodeop_p;
-extern vop_t **ext2_specop_p;
-extern vop_t **ext2_fifoop_p;
-
-#endif /* !_SYS_GNU_EXT2FS_EXT2_EXTERN_H_ */
diff --git a/sys/gnu/fs/ext2fs/ext2_fs.h b/sys/gnu/fs/ext2fs/ext2_fs.h
deleted file mode 100644
index 64aff0d..0000000
--- a/sys/gnu/fs/ext2fs/ext2_fs.h
+++ /dev/null
@@ -1,572 +0,0 @@
-/*
- * modified for EXT2FS support in Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- *
- * $FreeBSD$
- */
-/*
- * linux/include/linux/ext2_fs.h
- *
- * Copyright (C) 1992, 1993, 1994, 1995
- * Remy Card (card@masi.ibp.fr)
- * Laboratoire MASI - Institut Blaise Pascal
- * Universite Pierre et Marie Curie (Paris VI)
- *
- * from
- *
- * linux/include/linux/minix_fs.h
- *
- * Copyright (C) 1991, 1992 Linus Torvalds
- */
-
-#ifndef _LINUX_EXT2_FS_H
-#define _LINUX_EXT2_FS_H
-
-#include <sys/types.h>
-
-#define __u32 u_int32_t
-#define u32 u_int32_t
-#define __u16 u_int16_t
-#define __u8 u_int8_t
-
-#define __s32 int32_t
-#define __s16 int16_t
-#define __s8 int8_t
-
-#define umode_t mode_t
-#define loff_t off_t
-
-/* the Linux implementation of EXT2 stores some information about
- * an inode in a ext2_inode_info structure which is part of the incore
- * inode in Linux
- * I decided to use the "spare" fields instead - we'll see how this
- * works out
- */
-
-#define i_block_group i_spare[0]
-#define i_next_alloc_block i_spare[1]
-#define i_next_alloc_goal i_spare[2]
-#define i_prealloc_block i_spare[3]
-#define i_prealloc_count i_din.di_spare[0]
-
-/*
- * The second extended filesystem constants/structures
- */
-
-/*
- * Define EXT2FS_DEBUG to produce debug messages
- */
-#undef EXT2FS_DEBUG
-
-/*
- * Define EXT2_PREALLOCATE to preallocate data blocks for expanding files
- */
-#define EXT2_PREALLOCATE
-#define EXT2_DEFAULT_PREALLOC_BLOCKS 8
-
-/*
- * The second extended file system version
- */
-#define EXT2FS_DATE "95/08/09"
-#define EXT2FS_VERSION "0.5b"
-
-/*
- * Debug code
- */
-#ifdef EXT2FS_DEBUG
-# define ext2_debug(f, a...) { \
- printf ("EXT2-fs DEBUG (%s, %d): %s:", \
- __FILE__, __LINE__, __FUNCTION__); \
- printf (f, ## a); \
- }
-#else
-# define ext2_debug(f, a...) /**/
-#endif
-
-/*
- * Special inodes numbers
- */
-#define EXT2_BAD_INO 1 /* Bad blocks inode */
-#define EXT2_ROOT_INO 2 /* Root inode */
-#define EXT2_ACL_IDX_INO 3 /* ACL inode */
-#define EXT2_ACL_DATA_INO 4 /* ACL inode */
-#define EXT2_BOOT_LOADER_INO 5 /* Boot loader inode */
-#define EXT2_UNDEL_DIR_INO 6 /* Undelete directory inode */
-
-/* First non-reserved inode for old ext2 filesystems */
-#define EXT2_GOOD_OLD_FIRST_INO 11
-
-/*
- * The second extended file system magic number
- */
-#define EXT2_SUPER_MAGIC 0xEF53
-
-/*
- * Maximal count of links to a file
- */
-#define EXT2_LINK_MAX 32000
-
-/*
- * Note: under FreeBSD, the "user" versions of the following macros are
- * used (and must be used) in most cases, because ((s)->u.ext2_sb.s_es is
- * not accessible. This depends on __KERNEL__ not being defined for
- * kernel builds under FreeBSD.
- */
-
-/*
- * Macro-instructions used to manage several block sizes
- */
-#define EXT2_MIN_BLOCK_SIZE 1024
-#define EXT2_MAX_BLOCK_SIZE 4096
-#define EXT2_MIN_BLOCK_LOG_SIZE 10
-#if defined(__KERNEL__) || (defined(__FreeBSD__) && defined(_KERNEL))
-# define EXT2_BLOCK_SIZE(s) ((s)->s_blocksize)
-#else
-# define EXT2_BLOCK_SIZE(s) (EXT2_MIN_BLOCK_SIZE << (s)->s_log_block_size)
-#endif
-#define EXT2_ACLE_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (struct ext2_acl_entry))
-#define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (__u32))
-#ifdef __KERNEL__
-# define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_blocksize_bits)
-#else
-# define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10)
-#endif
-#ifdef notyet
-#ifdef __KERNEL__
-#define EXT2_ADDR_PER_BLOCK_BITS(s) ((s)->u.ext2_sb.s_addr_per_block_bits)
-#define EXT2_INODE_SIZE(s) ((s)->u.ext2_sb.s_inode_size)
-#define EXT2_FIRST_INO(s) ((s)->u.ext2_sb.s_first_ino)
-#else
-#define EXT2_INODE_SIZE(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \
- EXT2_GOOD_OLD_INODE_SIZE : \
- (s)->s_inode_size)
-#define EXT2_FIRST_INO(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \
- EXT2_GOOD_OLD_FIRST_INO : \
- (s)->s_first_ino)
-#endif
-#else /* !notyet */
-#define EXT2_INODES_PER_BLOCK(s) ((s)->s_inodes_per_block)
-/* Should be sizeof(struct ext2_inode): */
-#define EXT2_INODE_SIZE 128
-#define EXT2_FIRST_INO 11
-#endif /* notyet */
-
-/*
- * Macro-instructions used to manage fragments
- */
-#define EXT2_MIN_FRAG_SIZE 1024
-#define EXT2_MAX_FRAG_SIZE 4096
-#define EXT2_MIN_FRAG_LOG_SIZE 10
-#ifdef __KERNEL__
-# define EXT2_FRAG_SIZE(s) ((s)->u.ext2_sb.s_frag_size)
-# define EXT2_FRAGS_PER_BLOCK(s) ((s)->u.ext2_sb.s_frags_per_block)
-#else
-# if defined(_KERNEL) && defined(__FreeBSD__)
-# define EXT2_FRAG_SIZE(s) ((s)->s_frag_size)
-# else
-# define EXT2_FRAG_SIZE(s) (EXT2_MIN_FRAG_SIZE << (s)->s_log_frag_size)
-# endif
-# define EXT2_FRAGS_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / EXT2_FRAG_SIZE(s))
-#endif
-
-/*
- * ACL structures
- */
-struct ext2_acl_header /* Header of Access Control Lists */
-{
- __u32 aclh_size;
- __u32 aclh_file_count;
- __u32 aclh_acle_count;
- __u32 aclh_first_acle;
-};
-
-struct ext2_acl_entry /* Access Control List Entry */
-{
- __u32 acle_size;
- __u16 acle_perms; /* Access permissions */
- __u16 acle_type; /* Type of entry */
- __u16 acle_tag; /* User or group identity */
- __u16 acle_pad1;
- __u32 acle_next; /* Pointer on next entry for the */
- /* same inode or on next free entry */
-};
-
-/*
- * Structure of a blocks group descriptor
- */
-struct ext2_group_desc
-{
- __u32 bg_block_bitmap; /* Blocks bitmap block */
- __u32 bg_inode_bitmap; /* Inodes bitmap block */
- __u32 bg_inode_table; /* Inodes table block */
- __u16 bg_free_blocks_count; /* Free blocks count */
- __u16 bg_free_inodes_count; /* Free inodes count */
- __u16 bg_used_dirs_count; /* Directories count */
- __u16 bg_pad;
- __u32 bg_reserved[3];
-};
-
-/*
- * Macro-instructions used to manage group descriptors
- */
-#ifdef __KERNEL__
-# define EXT2_BLOCKS_PER_GROUP(s) ((s)->u.ext2_sb.s_blocks_per_group)
-# define EXT2_DESC_PER_BLOCK(s) ((s)->u.ext2_sb.s_desc_per_block)
-# define EXT2_INODES_PER_GROUP(s) ((s)->u.ext2_sb.s_inodes_per_group)
-# define EXT2_DESC_PER_BLOCK_BITS(s) ((s)->u.ext2_sb.s_desc_per_block_bits)
-#else
-# define EXT2_BLOCKS_PER_GROUP(s) ((s)->s_blocks_per_group)
-# define EXT2_DESC_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (struct ext2_group_desc))
-# define EXT2_INODES_PER_GROUP(s) ((s)->s_inodes_per_group)
-#endif
-
-/*
- * Constants relative to the data blocks
- */
-#define EXT2_NDIR_BLOCKS 12
-#define EXT2_IND_BLOCK EXT2_NDIR_BLOCKS
-#define EXT2_DIND_BLOCK (EXT2_IND_BLOCK + 1)
-#define EXT2_TIND_BLOCK (EXT2_DIND_BLOCK + 1)
-#define EXT2_N_BLOCKS (EXT2_TIND_BLOCK + 1)
-#define EXT2_MAXSYMLINKLEN (EXT2_N_BLOCKS * sizeof (__u32))
-
-/*
- * Inode flags
- */
-#define EXT2_SECRM_FL 0x00000001 /* Secure deletion */
-#define EXT2_UNRM_FL 0x00000002 /* Undelete */
-#define EXT2_COMPR_FL 0x00000004 /* Compress file */
-#define EXT2_SYNC_FL 0x00000008 /* Synchronous updates */
-#define EXT2_IMMUTABLE_FL 0x00000010 /* Immutable file */
-#define EXT2_APPEND_FL 0x00000020 /* writes to file may only append */
-#define EXT2_NODUMP_FL 0x00000040 /* do not dump file */
-#define EXT2_NOATIME_FL 0x00000080 /* do not update atime */
-/* Reserved for compression usage... */
-#define EXT2_DIRTY_FL 0x00000100
-#define EXT2_COMPRBLK_FL 0x00000200 /* One or more compressed clusters */
-#define EXT2_NOCOMP_FL 0x00000400 /* Don't compress */
-#define EXT2_ECOMPR_FL 0x00000800 /* Compression error */
-/* End compression flags --- maybe not all used */
-#define EXT2_BTREE_FL 0x00001000 /* btree format dir */
-#define EXT2_RESERVED_FL 0x80000000 /* reserved for ext2 lib */
-
-#define EXT2_FL_USER_VISIBLE 0x00001FFF /* User visible flags */
-#define EXT2_FL_USER_MODIFIABLE 0x000000FF /* User modifiable flags */
-
-/*
- * ioctl commands
- */
-#define EXT2_IOC_GETFLAGS _IOR('f', 1, long)
-#define EXT2_IOC_SETFLAGS _IOW('f', 2, long)
-#define EXT2_IOC_GETVERSION _IOR('v', 1, long)
-#define EXT2_IOC_SETVERSION _IOW('v', 2, long)
-
-/*
- * Only declare `struct ext2_inode' if <ufs/ufs/inode.h> hasn't made things
- * difficult by #defining i_mode and other struct members. The details of
- * the struct are only needed in ext2_inode_cnv.c where the ext2fs on-disk
- * inode is converted to a ufs in-core inode.
- */
-#ifndef i_mode
-
-/*
- * Structure of an inode on the disk
- */
-struct ext2_inode {
- __u16 i_mode; /* File mode */
- __u16 i_uid; /* Owner Uid */
- __u32 i_size; /* Size in bytes */
- __u32 i_atime; /* Access time */
- __u32 i_ctime; /* Creation time */
- __u32 i_mtime; /* Modification time */
- __u32 i_dtime; /* Deletion Time */
- __u16 i_gid; /* Group Id */
- __u16 i_links_count; /* Links count */
- __u32 i_blocks; /* Blocks count */
- __u32 i_flags; /* File flags */
- union {
- struct {
- __u32 l_i_reserved1;
- } linux1;
- struct {
- __u32 h_i_translator;
- } hurd1;
- struct {
- __u32 m_i_reserved1;
- } masix1;
- } osd1; /* OS dependent 1 */
- __u32 i_block[EXT2_N_BLOCKS];/* Pointers to blocks */
- __u32 i_generation; /* File version (for NFS) */
- __u32 i_file_acl; /* File ACL */
- __u32 i_dir_acl; /* Directory ACL */
- __u32 i_faddr; /* Fragment address */
- union {
- struct {
- __u8 l_i_frag; /* Fragment number */
- __u8 l_i_fsize; /* Fragment size */
- __u16 i_pad1;
- __u32 l_i_reserved2[2];
- } linux2;
- struct {
- __u8 h_i_frag; /* Fragment number */
- __u8 h_i_fsize; /* Fragment size */
- __u16 h_i_mode_high;
- __u16 h_i_uid_high;
- __u16 h_i_gid_high;
- __u32 h_i_author;
- } hurd2;
- struct {
- __u8 m_i_frag; /* Fragment number */
- __u8 m_i_fsize; /* Fragment size */
- __u16 m_pad1;
- __u32 m_i_reserved2[2];
- } masix2;
- } osd2; /* OS dependent 2 */
-};
-
-#define i_size_high i_dir_acl
-
-#if defined(__KERNEL__) || defined(__linux__)
-#define i_reserved1 osd1.linux1.l_i_reserved1
-#define i_frag osd2.linux2.l_i_frag
-#define i_fsize osd2.linux2.l_i_fsize
-#define i_reserved2 osd2.linux2.l_i_reserved2
-#endif
-
-#ifdef __hurd__
-#define i_translator osd1.hurd1.h_i_translator
-#define i_frag osd2.hurd2.h_i_frag;
-#define i_fsize osd2.hurd2.h_i_fsize;
-#define i_uid_high osd2.hurd2.h_i_uid_high
-#define i_gid_high osd2.hurd2.h_i_gid_high
-#define i_author osd2.hurd2.h_i_author
-#endif
-
-#ifdef __masix__
-#define i_reserved1 osd1.masix1.m_i_reserved1
-#define i_frag osd2.masix2.m_i_frag
-#define i_fsize osd2.masix2.m_i_fsize
-#define i_reserved2 osd2.masix2.m_i_reserved2
-#endif
-
-#endif /* i_mode */
-
-/*
- * File system states
- */
-#define EXT2_VALID_FS 0x0001 /* Unmounted cleanly */
-#define EXT2_ERROR_FS 0x0002 /* Errors detected */
-
-/*
- * Mount flags
- */
-#define EXT2_MOUNT_CHECK_NORMAL 0x0001 /* Do some more checks */
-#define EXT2_MOUNT_CHECK_STRICT 0x0002 /* Do again more checks */
-#define EXT2_MOUNT_CHECK (EXT2_MOUNT_CHECK_NORMAL | \
- EXT2_MOUNT_CHECK_STRICT)
-#define EXT2_MOUNT_GRPID 0x0004 /* Create files with directory's group */
-#define EXT2_MOUNT_DEBUG 0x0008 /* Some debugging messages */
-#define EXT2_MOUNT_ERRORS_CONT 0x0010 /* Continue on errors */
-#define EXT2_MOUNT_ERRORS_RO 0x0020 /* Remount fs ro on errors */
-#define EXT2_MOUNT_ERRORS_PANIC 0x0040 /* Panic on errors */
-#define EXT2_MOUNT_MINIX_DF 0x0080 /* Mimics the Minix statfs */
-
-#define clear_opt(o, opt) o &= ~EXT2_MOUNT_##opt
-#define set_opt(o, opt) o |= EXT2_MOUNT_##opt
-#define test_opt(sb, opt) ((sb)->u.ext2_sb.s_mount_opt & \
- EXT2_MOUNT_##opt)
-/*
- * Maximal mount counts between two filesystem checks
- */
-#define EXT2_DFL_MAX_MNT_COUNT 20 /* Allow 20 mounts */
-#define EXT2_DFL_CHECKINTERVAL 0 /* Don't use interval check */
-
-/*
- * Behaviour when detecting errors
- */
-#define EXT2_ERRORS_CONTINUE 1 /* Continue execution */
-#define EXT2_ERRORS_RO 2 /* Remount fs read-only */
-#define EXT2_ERRORS_PANIC 3 /* Panic */
-#define EXT2_ERRORS_DEFAULT EXT2_ERRORS_CONTINUE
-
-/*
- * Structure of the super block
- */
-struct ext2_super_block {
- __u32 s_inodes_count; /* Inodes count */
- __u32 s_blocks_count; /* Blocks count */
- __u32 s_r_blocks_count; /* Reserved blocks count */
- __u32 s_free_blocks_count; /* Free blocks count */
- __u32 s_free_inodes_count; /* Free inodes count */
- __u32 s_first_data_block; /* First Data Block */
- __u32 s_log_block_size; /* Block size */
- __s32 s_log_frag_size; /* Fragment size */
- __u32 s_blocks_per_group; /* # Blocks per group */
- __u32 s_frags_per_group; /* # Fragments per group */
- __u32 s_inodes_per_group; /* # Inodes per group */
- __u32 s_mtime; /* Mount time */
- __u32 s_wtime; /* Write time */
- __u16 s_mnt_count; /* Mount count */
- __s16 s_max_mnt_count; /* Maximal mount count */
- __u16 s_magic; /* Magic signature */
- __u16 s_state; /* File system state */
- __u16 s_errors; /* Behaviour when detecting errors */
- __u16 s_minor_rev_level; /* minor revision level */
- __u32 s_lastcheck; /* time of last check */
- __u32 s_checkinterval; /* max. time between checks */
- __u32 s_creator_os; /* OS */
- __u32 s_rev_level; /* Revision level */
- __u16 s_def_resuid; /* Default uid for reserved blocks */
- __u16 s_def_resgid; /* Default gid for reserved blocks */
- /*
- * These fields are for EXT2_DYNAMIC_REV superblocks only.
- *
- * Note: the difference between the compatible feature set and
- * the incompatible feature set is that if there is a bit set
- * in the incompatible feature set that the kernel doesn't
- * know about, it should refuse to mount the filesystem.
- *
- * e2fsck's requirements are more strict; if it doesn't know
- * about a feature in either the compatible or incompatible
- * feature set, it must abort and not try to meddle with
- * things it doesn't understand...
- */
- __u32 s_first_ino; /* First non-reserved inode */
- __u16 s_inode_size; /* size of inode structure */
- __u16 s_block_group_nr; /* block group # of this superblock */
- __u32 s_feature_compat; /* compatible feature set */
- __u32 s_feature_incompat; /* incompatible feature set */
- __u32 s_feature_ro_compat; /* readonly-compatible feature set */
- __u8 s_uuid[16]; /* 128-bit uuid for volume */
- char s_volume_name[16]; /* volume name */
- char s_last_mounted[64]; /* directory where last mounted */
- __u32 s_algorithm_usage_bitmap; /* For compression */
- /*
- * Performance hints. Directory preallocation should only
- * happen if the EXT2_COMPAT_PREALLOC flag is on.
- */
- __u8 s_prealloc_blocks; /* Nr of blocks to try to preallocate*/
- __u8 s_prealloc_dir_blocks; /* Nr to preallocate for dirs */
- __u16 s_padding1;
- __u32 s_reserved[204]; /* Padding to the end of the block */
-};
-
-#ifdef __KERNEL__
-#define EXT2_SB(sb) (&((sb)->u.ext2_sb))
-#else
-/* Assume that user mode programs are passing in an ext2fs superblock, not
- * a kernel struct super_block. This will allow us to call the feature-test
- * macros from user land. */
-#define EXT2_SB(sb) (sb)
-#endif
-
-/*
- * Codes for operating systems
- */
-#define EXT2_OS_LINUX 0
-#define EXT2_OS_HURD 1
-#define EXT2_OS_MASIX 2
-#define EXT2_OS_FREEBSD 3
-#define EXT2_OS_LITES 4
-
-/*
- * Revision levels
- */
-#define EXT2_GOOD_OLD_REV 0 /* The good old (original) format */
-#define EXT2_DYNAMIC_REV 1 /* V2 format w/ dynamic inode sizes */
-
-#define EXT2_CURRENT_REV EXT2_GOOD_OLD_REV
-#define EXT2_MAX_SUPP_REV EXT2_DYNAMIC_REV
-
-#define EXT2_GOOD_OLD_INODE_SIZE 128
-
-/*
- * Feature set definitions
- */
-
-#define EXT2_HAS_COMPAT_FEATURE(sb,mask) \
- ( EXT2_SB(sb)->s_feature_compat & (mask) )
-#define EXT2_HAS_RO_COMPAT_FEATURE(sb,mask) \
- ( EXT2_SB(sb)->s_feature_ro_compat & (mask) )
-#define EXT2_HAS_INCOMPAT_FEATURE(sb,mask) \
- ( EXT2_SB(sb)->s_feature_incompat & (mask) )
-
-#define EXT2_FEATURE_COMPAT_DIR_PREALLOC 0x0001
-
-#define EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001
-#define EXT2_FEATURE_RO_COMPAT_LARGE_FILE 0x0002
-#define EXT2_FEATURE_RO_COMPAT_BTREE_DIR 0x0004
-
-#define EXT2_FEATURE_INCOMPAT_COMPRESSION 0x0001
-#define EXT2_FEATURE_INCOMPAT_FILETYPE 0x0002
-
-#define EXT2_FEATURE_COMPAT_SUPP 0
-#define EXT2_FEATURE_INCOMPAT_SUPP EXT2_FEATURE_INCOMPAT_FILETYPE
-#ifdef notyet
-#define EXT2_FEATURE_RO_COMPAT_SUPP (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| \
- EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \
- EXT2_FEATURE_RO_COMPAT_BTREE_DIR)
-#else
-#define EXT2_FEATURE_RO_COMPAT_SUPP 0
-#endif
-
-/*
- * Default values for user and/or group using reserved blocks
- */
-#define EXT2_DEF_RESUID 0
-#define EXT2_DEF_RESGID 0
-
-/*
- * Structure of a directory entry
- */
-#define EXT2_NAME_LEN 255
-
-struct ext2_dir_entry {
- __u32 inode; /* Inode number */
- __u16 rec_len; /* Directory entry length */
- __u16 name_len; /* Name length */
- char name[EXT2_NAME_LEN]; /* File name */
-};
-
-/*
- * The new version of the directory entry. Since EXT2 structures are
- * stored in intel byte order, and the name_len field could never be
- * bigger than 255 chars, it's safe to reclaim the extra byte for the
- * file_type field.
- */
-struct ext2_dir_entry_2 {
- __u32 inode; /* Inode number */
- __u16 rec_len; /* Directory entry length */
- __u8 name_len; /* Name length */
- __u8 file_type;
- char name[EXT2_NAME_LEN]; /* File name */
-};
-
-/*
- * Ext2 directory file types. Only the low 3 bits are used. The
- * other bits are reserved for now.
- */
-#define EXT2_FT_UNKNOWN 0
-#define EXT2_FT_REG_FILE 1
-#define EXT2_FT_DIR 2
-#define EXT2_FT_CHRDEV 3
-#define EXT2_FT_BLKDEV 4
-#define EXT2_FT_FIFO 5
-#define EXT2_FT_SOCK 6
-#define EXT2_FT_SYMLINK 7
-
-#define EXT2_FT_MAX 8
-
-/*
- * EXT2_DIR_PAD defines the directory entries boundaries
- *
- * NOTE: It must be a multiple of 4
- */
-#define EXT2_DIR_PAD 4
-#define EXT2_DIR_ROUND (EXT2_DIR_PAD - 1)
-#define EXT2_DIR_REC_LEN(name_len) (((name_len) + 8 + EXT2_DIR_ROUND) & \
- ~EXT2_DIR_ROUND)
-
-#endif /* _LINUX_EXT2_FS_H */
diff --git a/sys/gnu/fs/ext2fs/ext2_fs_sb.h b/sys/gnu/fs/ext2fs/ext2_fs_sb.h
deleted file mode 100644
index 85f71bf..0000000
--- a/sys/gnu/fs/ext2fs/ext2_fs_sb.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * modified for EXT2FS support in Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- */
-/*
- * linux/include/linux/ext2_fs_sb.h
- *
- * Copyright (C) 1992, 1993, 1994, 1995
- * Remy Card (card@masi.ibp.fr)
- * Laboratoire MASI - Institut Blaise Pascal
- * Universite Pierre et Marie Curie (Paris VI)
- *
- * from
- *
- * linux/include/linux/minix_fs_sb.h
- *
- * Copyright (C) 1991, 1992 Linus Torvalds
- */
-
-#ifndef _LINUX_EXT2_FS_SB
-#define _LINUX_EXT2_FS_SB
-
-/*
- * The following is not needed anymore since the descriptors buffer
- * heads are now dynamically allocated
- */
-/* #define EXT2_MAX_GROUP_DESC 8 */
-
-#define EXT2_MAX_GROUP_LOADED 8
-
-#define buffer_head buf
-#define MAXMNTLEN 512
-
-/*
- * second extended-fs super-block data in memory
- */
-struct ext2_sb_info {
- unsigned long s_frag_size; /* Size of a fragment in bytes */
- unsigned long s_frags_per_block;/* Number of fragments per block */
- unsigned long s_inodes_per_block;/* Number of inodes per block */
- unsigned long s_frags_per_group;/* Number of fragments in a group */
- unsigned long s_blocks_per_group;/* Number of blocks in a group */
- unsigned long s_inodes_per_group;/* Number of inodes in a group */
- unsigned long s_itb_per_group; /* Number of inode table blocks per group */
- unsigned long s_db_per_group; /* Number of descriptor blocks per group */
- unsigned long s_desc_per_block; /* Number of group descriptors per block */
- unsigned long s_groups_count; /* Number of groups in the fs */
- struct buffer_head * s_sbh; /* Buffer containing the super block */
- struct ext2_super_block * s_es; /* Pointer to the super block in the buffer */
- struct buffer_head ** s_group_desc;
- unsigned short s_loaded_inode_bitmaps;
- unsigned short s_loaded_block_bitmaps;
- unsigned long s_inode_bitmap_number[EXT2_MAX_GROUP_LOADED];
- struct buffer_head * s_inode_bitmap[EXT2_MAX_GROUP_LOADED];
- unsigned long s_block_bitmap_number[EXT2_MAX_GROUP_LOADED];
- struct buffer_head * s_block_bitmap[EXT2_MAX_GROUP_LOADED];
- int s_rename_lock;
- unsigned long s_mount_opt;
- unsigned short s_resuid;
- unsigned short s_resgid;
- unsigned short s_mount_state;
- /*
- stuff that FFS keeps in its super block or that linux
- has in its non-ext2 specific super block and which is
- generally considered useful
- */
- unsigned long s_blocksize;
- unsigned long s_blocksize_bits;
- unsigned int s_bshift; /* = log2(s_blocksize) */
- quad_t s_qbmask; /* = s_blocksize - 1 */
- unsigned int s_fsbtodb; /* shift to get disk block */
- char s_rd_only; /* read-only */
- char s_dirt; /* fs modified flag */
- char s_wasvalid; /* valid at mount time */
-
- char fs_fsmnt[MAXMNTLEN]; /* name mounted on */
-};
-
-#endif /* _LINUX_EXT2_FS_SB */
diff --git a/sys/gnu/fs/ext2fs/ext2_inode.c b/sys/gnu/fs/ext2fs/ext2_inode.c
deleted file mode 100644
index 22847f5..0000000
--- a/sys/gnu/fs/ext2fs/ext2_inode.c
+++ /dev/null
@@ -1,495 +0,0 @@
-/*
- * modified for Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- */
-/*
- * Copyright (c) 1982, 1986, 1989, 1993
- * The Regents of the University of California. 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 product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ext2_inode.c 8.5 (Berkeley) 12/30/93
- *
- * $FreeBSD$
- */
-
-#include "opt_quota.h"
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/mount.h>
-#include <sys/buf.h>
-#include <sys/vnode.h>
-#include <sys/malloc.h>
-
-#include <vm/vm.h>
-#include <vm/vm_extern.h>
-
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/inode.h>
-#include <ufs/ufs/ufsmount.h>
-#include <ufs/ufs/ufs_extern.h>
-
-#include <gnu/ext2fs/ext2_fs.h>
-#include <gnu/ext2fs/ext2_fs_sb.h>
-#include <gnu/ext2fs/fs.h>
-#include <gnu/ext2fs/ext2_extern.h>
-
-static int ext2_indirtrunc __P((struct inode *, daddr_t, daddr_t, daddr_t, int,
- long *));
-
-int
-ext2_init(struct vfsconf *vfsp)
-{
- return (ufs_init(vfsp));
-}
-
-/*
- * Update the access, modified, and inode change times as specified by the
- * IN_ACCESS, IN_UPDATE, and IN_CHANGE flags respectively. Write the inode
- * to disk if the IN_MODIFIED flag is set (it may be set initially, or by
- * the timestamp update). The IN_LAZYMOD flag is set to force a write
- * later if not now. If we write now, then clear both IN_MODIFIED and
- * IN_LAZYMOD to reflect the presumably successful write, and if waitfor is
- * set, then wait for the write to complete.
- */
-int
-ext2_update(vp, waitfor)
- struct vnode *vp;
- int waitfor;
-{
- register struct ext2_sb_info *fs;
- struct buf *bp;
- struct inode *ip;
- int error;
-
- ufs_itimes(vp);
- ip = VTOI(vp);
- if ((ip->i_flag & IN_MODIFIED) == 0)
- return (0);
- ip->i_flag &= ~(IN_LAZYMOD | IN_MODIFIED);
- if (vp->v_mount->mnt_flag & MNT_RDONLY)
- return (0);
- fs = ip->i_e2fs;
- if ((error = bread(ip->i_devvp,
- fsbtodb(fs, ino_to_fsba(fs, ip->i_number)),
- (int)fs->s_blocksize, NOCRED, &bp)) != 0) {
- brelse(bp);
- return (error);
- }
- ext2_di2ei( &ip->i_din, (struct ext2_inode *) ((char *)bp->b_data + EXT2_INODE_SIZE *
- ino_to_fsbo(fs, ip->i_number)));
-/*
- if (waitfor && (vp->v_mount->mnt_flag & MNT_ASYNC) == 0)
- return (bwrite(bp));
- else {
-*/
- bdwrite(bp);
- return (0);
-/*
- }
-*/
-}
-
-#define SINGLE 0 /* index of single indirect block */
-#define DOUBLE 1 /* index of double indirect block */
-#define TRIPLE 2 /* index of triple indirect block */
-/*
- * Truncate the inode oip to at most length size, freeing the
- * disk blocks.
- */
-int
-ext2_truncate(vp, length, flags, cred, p)
- struct vnode *vp;
- off_t length;
- int flags;
- struct ucred *cred;
- struct proc *p;
-{
- register struct vnode *ovp = vp;
- register daddr_t lastblock;
- register struct inode *oip;
- daddr_t bn, lbn, lastiblock[NIADDR], indir_lbn[NIADDR];
- daddr_t oldblks[NDADDR + NIADDR], newblks[NDADDR + NIADDR];
- register struct ext2_sb_info *fs;
- struct buf *bp;
- int offset, size, level;
- long count, nblocks, blocksreleased = 0;
- register int i;
- int aflags, error, allerror;
- off_t osize;
-/*
-printf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length);
-*/ /*
- * negative file sizes will totally break the code below and
- * are not meaningful anyways.
- */
- if (length < 0)
- return EFBIG;
-
- oip = VTOI(ovp);
- if (ovp->v_type == VLNK &&
- oip->i_size < ovp->v_mount->mnt_maxsymlinklen) {
-#if DIAGNOSTIC
- if (length != 0)
- panic("ext2_truncate: partial truncate of symlink");
-#endif
- bzero((char *)&oip->i_shortlink, (u_int)oip->i_size);
- oip->i_size = 0;
- oip->i_flag |= IN_CHANGE | IN_UPDATE;
- return (UFS_UPDATE(ovp, 1));
- }
- if (oip->i_size == length) {
- oip->i_flag |= IN_CHANGE | IN_UPDATE;
- return (UFS_UPDATE(ovp, 0));
- }
-#if QUOTA
- if ((error = getinoquota(oip)) != 0)
- return (error);
-#endif
- fs = oip->i_e2fs;
- osize = oip->i_size;
- ext2_discard_prealloc(oip);
- /*
- * Lengthen the size of the file. We must ensure that the
- * last byte of the file is allocated. Since the smallest
- * value of oszie is 0, length will be at least 1.
- */
- if (osize < length) {
- offset = blkoff(fs, length - 1);
- lbn = lblkno(fs, length - 1);
- aflags = B_CLRBUF;
- if (flags & IO_SYNC)
- aflags |= B_SYNC;
- vnode_pager_setsize(ovp, length);
- if ((error = ext2_balloc(oip, lbn, offset + 1, cred, &bp,
- aflags)) != 0)
- return (error);
- oip->i_size = length;
- if (aflags & IO_SYNC)
- bwrite(bp);
- else
- bawrite(bp);
- oip->i_flag |= IN_CHANGE | IN_UPDATE;
- return (UFS_UPDATE(ovp, 1));
- }
- /*
- * Shorten the size of the file. If the file is not being
- * truncated to a block boundry, the contents of the
- * partial block following the end of the file must be
- * zero'ed in case it ever become accessable again because
- * of subsequent file growth.
- */
- /* I don't understand the comment above */
- offset = blkoff(fs, length);
- if (offset == 0) {
- oip->i_size = length;
- } else {
- lbn = lblkno(fs, length);
- aflags = B_CLRBUF;
- if (flags & IO_SYNC)
- aflags |= B_SYNC;
- if ((error = ext2_balloc(oip, lbn, offset, cred, &bp,
- aflags)) != 0)
- return (error);
- oip->i_size = length;
- size = blksize(fs, oip, lbn);
- bzero((char *)bp->b_data + offset, (u_int)(size - offset));
- allocbuf(bp, size);
- if (aflags & IO_SYNC)
- bwrite(bp);
- else
- bawrite(bp);
- }
- /*
- * Calculate index into inode's block list of
- * last direct and indirect blocks (if any)
- * which we want to keep. Lastblock is -1 when
- * the file is truncated to 0.
- */
- lastblock = lblkno(fs, length + fs->s_blocksize - 1) - 1;
- lastiblock[SINGLE] = lastblock - NDADDR;
- lastiblock[DOUBLE] = lastiblock[SINGLE] - NINDIR(fs);
- lastiblock[TRIPLE] = lastiblock[DOUBLE] - NINDIR(fs) * NINDIR(fs);
- nblocks = btodb(fs->s_blocksize);
- /*
- * Update file and block pointers on disk before we start freeing
- * blocks. If we crash before free'ing blocks below, the blocks
- * will be returned to the free list. lastiblock values are also
- * normalized to -1 for calls to ext2_indirtrunc below.
- */
- bcopy((caddr_t)&oip->i_db[0], (caddr_t)oldblks, sizeof oldblks);
- for (level = TRIPLE; level >= SINGLE; level--)
- if (lastiblock[level] < 0) {
- oip->i_ib[level] = 0;
- lastiblock[level] = -1;
- }
- for (i = NDADDR - 1; i > lastblock; i--)
- oip->i_db[i] = 0;
- oip->i_flag |= IN_CHANGE | IN_UPDATE;
- allerror = UFS_UPDATE(ovp, 1);
-
- /*
- * Having written the new inode to disk, save its new configuration
- * and put back the old block pointers long enough to process them.
- * Note that we save the new block configuration so we can check it
- * when we are done.
- */
- bcopy((caddr_t)&oip->i_db[0], (caddr_t)newblks, sizeof newblks);
- bcopy((caddr_t)oldblks, (caddr_t)&oip->i_db[0], sizeof oldblks);
- oip->i_size = osize;
- error = vtruncbuf(ovp, cred, p, length, (int)fs->s_blocksize);
- if (error && (allerror == 0))
- allerror = error;
-
- /*
- * Indirect blocks first.
- */
- indir_lbn[SINGLE] = -NDADDR;
- indir_lbn[DOUBLE] = indir_lbn[SINGLE] - NINDIR(fs) - 1;
- indir_lbn[TRIPLE] = indir_lbn[DOUBLE] - NINDIR(fs) * NINDIR(fs) - 1;
- for (level = TRIPLE; level >= SINGLE; level--) {
- bn = oip->i_ib[level];
- if (bn != 0) {
- error = ext2_indirtrunc(oip, indir_lbn[level],
- fsbtodb(fs, bn), lastiblock[level], level, &count);
- if (error)
- allerror = error;
- blocksreleased += count;
- if (lastiblock[level] < 0) {
- oip->i_ib[level] = 0;
- ext2_blkfree(oip, bn, fs->s_frag_size);
- blocksreleased += nblocks;
- }
- }
- if (lastiblock[level] >= 0)
- goto done;
- }
-
- /*
- * All whole direct blocks or frags.
- */
- for (i = NDADDR - 1; i > lastblock; i--) {
- register long bsize;
-
- bn = oip->i_db[i];
- if (bn == 0)
- continue;
- oip->i_db[i] = 0;
- bsize = blksize(fs, oip, i);
- ext2_blkfree(oip, bn, bsize);
- blocksreleased += btodb(bsize);
- }
- if (lastblock < 0)
- goto done;
-
- /*
- * Finally, look for a change in size of the
- * last direct block; release any frags.
- */
- bn = oip->i_db[lastblock];
- if (bn != 0) {
- long oldspace, newspace;
-
- /*
- * Calculate amount of space we're giving
- * back as old block size minus new block size.
- */
- oldspace = blksize(fs, oip, lastblock);
- oip->i_size = length;
- newspace = blksize(fs, oip, lastblock);
- if (newspace == 0)
- panic("itrunc: newspace");
- if (oldspace - newspace > 0) {
- /*
- * Block number of space to be free'd is
- * the old block # plus the number of frags
- * required for the storage we're keeping.
- */
- bn += numfrags(fs, newspace);
- ext2_blkfree(oip, bn, oldspace - newspace);
- blocksreleased += btodb(oldspace - newspace);
- }
- }
-done:
-#if DIAGNOSTIC
- for (level = SINGLE; level <= TRIPLE; level++)
- if (newblks[NDADDR + level] != oip->i_ib[level])
- panic("itrunc1");
- for (i = 0; i < NDADDR; i++)
- if (newblks[i] != oip->i_db[i])
- panic("itrunc2");
- if (length == 0 && (!TAILQ_EMPTY(&ovp->v_dirtyblkhd) ||
- !TAILQ_EMPTY(&ovp->v_cleanblkhd)))
- panic("itrunc3");
-#endif /* DIAGNOSTIC */
- /*
- * Put back the real size.
- */
- oip->i_size = length;
- oip->i_blocks -= blocksreleased;
- if (oip->i_blocks < 0) /* sanity */
- oip->i_blocks = 0;
- oip->i_flag |= IN_CHANGE;
- vnode_pager_setsize(ovp, length);
-#if QUOTA
- (void) chkdq(oip, -blocksreleased, NOCRED, 0);
-#endif
- return (allerror);
-}
-
-/*
- * Release blocks associated with the inode ip and stored in the indirect
- * block bn. Blocks are free'd in LIFO order up to (but not including)
- * lastbn. If level is greater than SINGLE, the block is an indirect block
- * and recursive calls to indirtrunc must be used to cleanse other indirect
- * blocks.
- *
- * NB: triple indirect blocks are untested.
- */
-
-static int
-ext2_indirtrunc(ip, lbn, dbn, lastbn, level, countp)
- register struct inode *ip;
- daddr_t lbn, lastbn;
- daddr_t dbn;
- int level;
- long *countp;
-{
- register int i;
- struct buf *bp;
- register struct ext2_sb_info *fs = ip->i_e2fs;
- register daddr_t *bap;
- struct vnode *vp;
- daddr_t *copy, nb, nlbn, last;
- long blkcount, factor;
- int nblocks, blocksreleased = 0;
- int error = 0, allerror = 0;
-
- /*
- * Calculate index in current block of last
- * block to be kept. -1 indicates the entire
- * block so we need not calculate the index.
- */
- factor = 1;
- for (i = SINGLE; i < level; i++)
- factor *= NINDIR(fs);
- last = lastbn;
- if (lastbn > 0)
- last /= factor;
- nblocks = btodb(fs->s_blocksize);
- /*
- * Get buffer of block pointers, zero those entries corresponding
- * to blocks to be free'd, and update on disk copy first. Since
- * double(triple) indirect before single(double) indirect, calls
- * to bmap on these blocks will fail. However, we already have
- * the on disk address, so we have to set the b_blkno field
- * explicitly instead of letting bread do everything for us.
- */
- vp = ITOV(ip);
- bp = getblk(vp, lbn, (int)fs->s_blocksize, 0, 0);
- if (bp->b_flags & (B_DONE | B_DELWRI)) {
- } else {
- bp->b_iocmd = BIO_READ;
- if (bp->b_bcount > bp->b_bufsize)
- panic("ext2_indirtrunc: bad buffer size");
- bp->b_blkno = dbn;
- vfs_busy_pages(bp, 0);
- VOP_STRATEGY(vp, bp);
- error = biowait(bp);
- }
- if (error) {
- brelse(bp);
- *countp = 0;
- return (error);
- }
-
- bap = (daddr_t *)bp->b_data;
- MALLOC(copy, daddr_t *, fs->s_blocksize, M_TEMP, M_WAITOK);
- bcopy((caddr_t)bap, (caddr_t)copy, (u_int)fs->s_blocksize);
- bzero((caddr_t)&bap[last + 1],
- (u_int)(NINDIR(fs) - (last + 1)) * sizeof (daddr_t));
- if (last == -1)
- bp->b_flags |= B_INVAL;
- error = bwrite(bp);
- if (error)
- allerror = error;
- bap = copy;
-
- /*
- * Recursively free totally unused blocks.
- */
- for (i = NINDIR(fs) - 1, nlbn = lbn + 1 - i * factor; i > last;
- i--, nlbn += factor) {
- nb = bap[i];
- if (nb == 0)
- continue;
- if (level > SINGLE) {
- if ((error = ext2_indirtrunc(ip, nlbn,
- fsbtodb(fs, nb), (daddr_t)-1, level - 1, &blkcount)) != 0)
- allerror = error;
- blocksreleased += blkcount;
- }
- ext2_blkfree(ip, nb, fs->s_blocksize);
- blocksreleased += nblocks;
- }
-
- /*
- * Recursively free last partial block.
- */
- if (level > SINGLE && lastbn >= 0) {
- last = lastbn % factor;
- nb = bap[i];
- if (nb != 0) {
- if ((error = ext2_indirtrunc(ip, nlbn, fsbtodb(fs, nb),
- last, level - 1, &blkcount)) != 0)
- allerror = error;
- blocksreleased += blkcount;
- }
- }
- FREE(copy, M_TEMP);
- *countp = blocksreleased;
- return (allerror);
-}
-
-/*
- * discard preallocated blocks
- */
-int
-ext2_inactive(ap)
- struct vop_inactive_args /* {
- struct vnode *a_vp;
- } */ *ap;
-{
- ext2_discard_prealloc(VTOI(ap->a_vp));
- return ufs_inactive(ap);
-}
-
diff --git a/sys/gnu/fs/ext2fs/ext2_inode_cnv.c b/sys/gnu/fs/ext2fs/ext2_inode_cnv.c
deleted file mode 100644
index 3e8e0ff..0000000
--- a/sys/gnu/fs/ext2fs/ext2_inode_cnv.c
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Copyright (c) 1995 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Utah $Hdr$
- * $FreeBSD$
- */
-
-/*
- * routines to convert on disk ext2 inodes in dinodes and back
- */
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/lock.h>
-#include <sys/stat.h>
-#include <sys/vnode.h>
-
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/inode.h>
-
-/*
- * Undo the definitions in <ufs/ufs/inode.h> that would destroy the include
- * of <gnu/ext2fs/ext2_fs.h>.
- */
-#undef i_atime
-#undef i_blocks
-#undef i_ctime
-#undef i_db
-#undef i_flags
-#undef i_gen
-#undef i_gid
-#undef i_ib
-#undef i_mode
-#undef i_mtime
-#undef i_nlink
-#undef i_rdev
-#undef i_shortlink
-#undef i_size
-#undef i_uid
-
-#include <gnu/ext2fs/ext2_fs.h>
-#include <gnu/ext2fs/ext2_extern.h>
-
-void
-ext2_print_dinode( di )
- struct dinode *di;
-{
- int i;
- printf( /* "Inode: %5d" */
- " Type: %10s Mode: 0x%o Flags: 0x%x Version: %d\n",
- "n/a", di->di_mode, di->di_flags, di->di_gen);
- printf( "User: %5lu Group: %5lu Size: %lu\n",
- (unsigned long)di->di_uid, (unsigned long)di->di_gid,
- (unsigned long)di->di_size);
- printf( "Links: %3d Blockcount: %d\n",
- di->di_nlink, di->di_blocks);
- printf( "ctime: 0x%x", di->di_ctime);
- printf( "atime: 0x%x", di->di_atime);
- printf( "mtime: 0x%x", di->di_mtime);
- printf( "BLOCKS: ");
- for(i=0; i < (di->di_blocks <= 24 ? ((di->di_blocks+1)/2): 12); i++)
- printf("%d ", di->di_db[i]);
- printf("\n");
-}
-
-void
-ext2_print_inode( in )
- struct inode *in;
-{
- printf( "Inode: %5d", in->i_number);
- ext2_print_dinode(&in->i_din);
-}
-
-/*
- * raw ext2 inode to dinode
- */
-void
-ext2_ei2di(ei, di)
- struct ext2_inode *ei;
- struct dinode *di;
-{
- int i;
-
- di->di_nlink = ei->i_links_count;
- /* Godmar thinks - if the link count is zero, then the inode is
- unused - according to ext2 standards. Ufs marks this fact
- by setting i_mode to zero - why ?
- I can see that this might lead to problems in an undelete.
- */
- di->di_mode = ei->i_links_count ? ei->i_mode : 0;
- di->di_size = ei->i_size;
- di->di_atime = ei->i_atime;
- di->di_mtime = ei->i_mtime;
- di->di_ctime = ei->i_ctime;
- di->di_flags = 0;
- di->di_flags |= (ei->i_flags & EXT2_APPEND_FL) ? APPEND : 0;
- di->di_flags |= (ei->i_flags & EXT2_IMMUTABLE_FL) ? IMMUTABLE : 0;
- di->di_blocks = ei->i_blocks;
- di->di_gen = ei->i_generation;
- di->di_uid = ei->i_uid;
- di->di_gid = ei->i_gid;
- /* XXX use memcpy */
- for(i = 0; i < NDADDR; i++)
- di->di_db[i] = ei->i_block[i];
- for(i = 0; i < NIADDR; i++)
- di->di_ib[i] = ei->i_block[EXT2_NDIR_BLOCKS + i];
-}
-
-/*
- * dinode to raw ext2 inode
- */
-void
-ext2_di2ei(di, ei)
- struct dinode *di;
- struct ext2_inode *ei;
-{
- int i;
-
- ei->i_mode = di->di_mode;
- ei->i_links_count = di->di_nlink;
- /*
- Godmar thinks: if dtime is nonzero, ext2 says this inode
- has been deleted, this would correspond to a zero link count
- */
- ei->i_dtime = ei->i_links_count ? 0 : di->di_mtime;
- ei->i_size = di->di_size;
- ei->i_atime = di->di_atime;
- ei->i_mtime = di->di_mtime;
- ei->i_ctime = di->di_ctime;
- ei->i_flags = di->di_flags;
- ei->i_flags = 0;
- ei->i_flags |= (di->di_flags & APPEND) ? EXT2_APPEND_FL: 0;
- ei->i_flags |= (di->di_flags & IMMUTABLE)
- ? EXT2_IMMUTABLE_FL: 0;
- ei->i_blocks = di->di_blocks;
- ei->i_generation = di->di_gen;
- ei->i_uid = di->di_uid;
- ei->i_gid = di->di_gid;
- /* XXX use memcpy */
- for(i = 0; i < NDADDR; i++)
- ei->i_block[i] = di->di_db[i];
- for(i = 0; i < NIADDR; i++)
- ei->i_block[EXT2_NDIR_BLOCKS + i] = di->di_ib[i];
-}
diff --git a/sys/gnu/fs/ext2fs/ext2_linux_balloc.c b/sys/gnu/fs/ext2fs/ext2_linux_balloc.c
deleted file mode 100644
index 5e90fee..0000000
--- a/sys/gnu/fs/ext2fs/ext2_linux_balloc.c
+++ /dev/null
@@ -1,582 +0,0 @@
-/*
- * modified for Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- */
-/*
- * linux/fs/ext2/balloc.c
- *
- * Copyright (C) 1992, 1993, 1994, 1995
- * Remy Card (card@masi.ibp.fr)
- * Laboratoire MASI - Institut Blaise Pascal
- * Universite Pierre et Marie Curie (Paris VI)
- *
- * Enhanced block allocation by Stephen Tweedie (sct@dcs.ed.ac.uk), 1993
- */
-
-/*
- * The free blocks are managed by bitmaps. A file system contains several
- * blocks groups. Each group contains 1 bitmap block for blocks, 1 bitmap
- * block for inodes, N blocks for the inode table and data blocks.
- *
- * The file system contains group descriptors which are located after the
- * super block. Each descriptor contains the number of the bitmap block and
- * the free blocks count in the block. The descriptors are loaded in memory
- * when a file system is mounted (see ext2_read_super).
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/buf.h>
-#include <sys/proc.h>
-#include <sys/mount.h>
-#include <sys/vnode.h>
-
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/ufsmount.h>
-#include <gnu/ext2fs/ext2_extern.h>
-#include <gnu/ext2fs/ext2_fs.h>
-#include <gnu/ext2fs/ext2_fs_sb.h>
-#include <gnu/ext2fs/fs.h>
-
-#ifdef __i386__
-#include <gnu/ext2fs/i386-bitops.h>
-#else
-#error Provide an bitops.h file, please !
-#endif
-
-#define in_range(b, first, len) ((b) >= (first) && (b) <= (first) + (len) - 1)
-
-/* got rid of get_group_desc since it can already be found in
- * ext2_linux_ialloc.c
- */
-
-static void read_block_bitmap (struct mount * mp,
- unsigned int block_group,
- unsigned long bitmap_nr)
-{
- struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs;
- struct ext2_group_desc * gdp;
- struct buffer_head * bh;
- int error;
-
- gdp = get_group_desc (mp, block_group, NULL);
- if ((error = bread (VFSTOUFS(mp)->um_devvp,
- fsbtodb(sb, gdp->bg_block_bitmap),sb->s_blocksize, NOCRED, &bh)) != 0)
- panic ( "read_block_bitmap: "
- "Cannot read block bitmap - "
- "block_group = %d, block_bitmap = %lu",
- block_group, (unsigned long) gdp->bg_block_bitmap);
- sb->s_block_bitmap_number[bitmap_nr] = block_group;
- sb->s_block_bitmap[bitmap_nr] = bh;
- LCK_BUF(bh)
-}
-
-/*
- * load_block_bitmap loads the block bitmap for a blocks group
- *
- * It maintains a cache for the last bitmaps loaded. This cache is managed
- * with a LRU algorithm.
- *
- * Notes:
- * 1/ There is one cache per mounted file system.
- * 2/ If the file system contains less than EXT2_MAX_GROUP_LOADED groups,
- * this function reads the bitmap without maintaining a LRU cache.
- */
-static int load__block_bitmap (struct mount * mp,
- unsigned int block_group)
-{
- int i, j;
- struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs;
- unsigned long block_bitmap_number;
- struct buffer_head * block_bitmap;
-
- if (block_group >= sb->s_groups_count)
- panic ( "load_block_bitmap: "
- "block_group >= groups_count - "
- "block_group = %d, groups_count = %lu",
- block_group, sb->s_groups_count);
-
- if (sb->s_groups_count <= EXT2_MAX_GROUP_LOADED) {
- if (sb->s_block_bitmap[block_group]) {
- if (sb->s_block_bitmap_number[block_group] !=
- block_group)
- panic ( "load_block_bitmap: "
- "block_group != block_bitmap_number");
- else
- return block_group;
- } else {
- read_block_bitmap (mp, block_group, block_group);
- return block_group;
- }
- }
-
- for (i = 0; i < sb->s_loaded_block_bitmaps &&
- sb->s_block_bitmap_number[i] != block_group; i++)
- ;
- if (i < sb->s_loaded_block_bitmaps &&
- sb->s_block_bitmap_number[i] == block_group) {
- block_bitmap_number = sb->s_block_bitmap_number[i];
- block_bitmap = sb->s_block_bitmap[i];
- for (j = i; j > 0; j--) {
- sb->s_block_bitmap_number[j] =
- sb->s_block_bitmap_number[j - 1];
- sb->s_block_bitmap[j] =
- sb->s_block_bitmap[j - 1];
- }
- sb->s_block_bitmap_number[0] = block_bitmap_number;
- sb->s_block_bitmap[0] = block_bitmap;
- } else {
- if (sb->s_loaded_block_bitmaps < EXT2_MAX_GROUP_LOADED)
- sb->s_loaded_block_bitmaps++;
- else
- ULCK_BUF(sb->s_block_bitmap[EXT2_MAX_GROUP_LOADED - 1])
-
- for (j = sb->s_loaded_block_bitmaps - 1; j > 0; j--) {
- sb->s_block_bitmap_number[j] =
- sb->s_block_bitmap_number[j - 1];
- sb->s_block_bitmap[j] =
- sb->s_block_bitmap[j - 1];
- }
- read_block_bitmap (mp, block_group, 0);
- }
- return 0;
-}
-
-static __inline int load_block_bitmap (struct mount * mp,
- unsigned int block_group)
-{
- struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs;
- if (sb->s_loaded_block_bitmaps > 0 &&
- sb->s_block_bitmap_number[0] == block_group)
- return 0;
-
- if (sb->s_groups_count <= EXT2_MAX_GROUP_LOADED &&
- sb->s_block_bitmap_number[block_group] == block_group &&
- sb->s_block_bitmap[block_group])
- return block_group;
-
- return load__block_bitmap (mp, block_group);
-}
-
-void ext2_free_blocks (struct mount * mp, unsigned long block,
- unsigned long count)
-{
- struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs;
- struct buffer_head * bh;
- struct buffer_head * bh2;
- unsigned long block_group;
- unsigned long bit;
- unsigned long i;
- int bitmap_nr;
- struct ext2_group_desc * gdp;
- struct ext2_super_block * es = sb->s_es;
-
- if (!sb) {
- printf ("ext2_free_blocks: nonexistent device");
- return;
- }
- lock_super (VFSTOUFS(mp)->um_devvp);
- if (block < es->s_first_data_block ||
- (block + count) > es->s_blocks_count) {
- printf ( "ext2_free_blocks: "
- "Freeing blocks not in datazone - "
- "block = %lu, count = %lu", block, count);
- unlock_super (VFSTOUFS(mp)->um_devvp);
- return;
- }
-
- ext2_debug ("freeing blocks %lu to %lu\n", block, block+count-1);
-
- block_group = (block - es->s_first_data_block) /
- EXT2_BLOCKS_PER_GROUP(sb);
- bit = (block - es->s_first_data_block) % EXT2_BLOCKS_PER_GROUP(sb);
- if (bit + count > EXT2_BLOCKS_PER_GROUP(sb))
- panic ( "ext2_free_blocks: "
- "Freeing blocks across group boundary - "
- "Block = %lu, count = %lu",
- block, count);
- bitmap_nr = load_block_bitmap (mp, block_group);
- bh = sb->s_block_bitmap[bitmap_nr];
- gdp = get_group_desc (mp, block_group, &bh2);
-
- if (/* test_opt (sb, CHECK_STRICT) && assume always strict ! */
- (in_range (gdp->bg_block_bitmap, block, count) ||
- in_range (gdp->bg_inode_bitmap, block, count) ||
- in_range (block, gdp->bg_inode_table,
- sb->s_itb_per_group) ||
- in_range (block + count - 1, gdp->bg_inode_table,
- sb->s_itb_per_group)))
- panic ( "ext2_free_blocks: "
- "Freeing blocks in system zones - "
- "Block = %lu, count = %lu",
- block, count);
-
- for (i = 0; i < count; i++) {
- if (!clear_bit (bit + i, bh->b_data))
- printf ("ext2_free_blocks: "
- "bit already cleared for block %lu",
- block);
- else {
- gdp->bg_free_blocks_count++;
- es->s_free_blocks_count++;
- }
- }
-
- mark_buffer_dirty(bh2);
- mark_buffer_dirty(bh);
-/****
- if (sb->s_flags & MS_SYNCHRONOUS) {
- ll_rw_block (WRITE, 1, &bh);
- wait_on_buffer (bh);
- }
-****/
- sb->s_dirt = 1;
- unlock_super (VFSTOUFS(mp)->um_devvp);
- return;
-}
-
-/*
- * ext2_new_block uses a goal block to assist allocation. If the goal is
- * free, or there is a free block within 32 blocks of the goal, that block
- * is allocated. Otherwise a forward search is made for a free block; within
- * each block group the search first looks for an entire free byte in the block
- * bitmap, and then for any free bit if that fails.
- */
-int ext2_new_block (struct mount * mp, unsigned long goal,
- u_int32_t * prealloc_count,
- u_int32_t * prealloc_block)
-{
- struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs;
- struct buffer_head * bh;
- struct buffer_head * bh2;
- char * p, * r;
- int i, j, k, tmp;
- int bitmap_nr;
- struct ext2_group_desc * gdp;
- struct ext2_super_block * es = sb->s_es;
-
-#ifdef EXT2FS_DEBUG
- static int goal_hits = 0, goal_attempts = 0;
-#endif
- if (!sb) {
- printf ("ext2_new_block: nonexistent device");
- return 0;
- }
- lock_super (VFSTOUFS(mp)->um_devvp);
-
- ext2_debug ("goal=%lu.\n", goal);
-
-repeat:
- /*
- * First, test whether the goal block is free.
- */
- if (goal < es->s_first_data_block || goal >= es->s_blocks_count)
- goal = es->s_first_data_block;
- i = (goal - es->s_first_data_block) / EXT2_BLOCKS_PER_GROUP(sb);
- gdp = get_group_desc (mp, i, &bh2);
- if (gdp->bg_free_blocks_count > 0) {
- j = ((goal - es->s_first_data_block) % EXT2_BLOCKS_PER_GROUP(sb));
-#ifdef EXT2FS_DEBUG
- if (j)
- goal_attempts++;
-#endif
- bitmap_nr = load_block_bitmap (mp, i);
- bh = sb->s_block_bitmap[bitmap_nr];
-
- ext2_debug ("goal is at %d:%d.\n", i, j);
-
- if (!test_bit(j, bh->b_data)) {
-#ifdef EXT2FS_DEBUG
- goal_hits++;
- ext2_debug ("goal bit allocated.\n");
-#endif
- goto got_block;
- }
- if (j) {
- /*
- * The goal was occupied; search forward for a free
- * block within the next XX blocks.
- *
- * end_goal is more or less random, but it has to be
- * less than EXT2_BLOCKS_PER_GROUP. Aligning up to the
- * next 64-bit boundary is simple..
- */
- int end_goal = (j + 63) & ~63;
- j = find_next_zero_bit(bh->b_data, end_goal, j);
- if (j < end_goal)
- goto got_block;
- }
-
- ext2_debug ("Bit not found near goal\n");
-
- /*
- * There has been no free block found in the near vicinity
- * of the goal: do a search forward through the block groups,
- * searching in each group first for an entire free byte in
- * the bitmap and then for any free bit.
- *
- * Search first in the remainder of the current group; then,
- * cyclicly search through the rest of the groups.
- */
- p = ((char *) bh->b_data) + (j >> 3);
- r = memscan(p, 0, (EXT2_BLOCKS_PER_GROUP(sb) - j + 7) >> 3);
- k = (r - ((char *) bh->b_data)) << 3;
- if (k < EXT2_BLOCKS_PER_GROUP(sb)) {
- j = k;
- goto search_back;
- }
- k = find_next_zero_bit ((unsigned long *) bh->b_data,
- EXT2_BLOCKS_PER_GROUP(sb),
- j);
- if (k < EXT2_BLOCKS_PER_GROUP(sb)) {
- j = k;
- goto got_block;
- }
- }
-
- ext2_debug ("Bit not found in block group %d.\n", i);
-
- /*
- * Now search the rest of the groups. We assume that
- * i and gdp correctly point to the last group visited.
- */
- for (k = 0; k < sb->s_groups_count; k++) {
- i++;
- if (i >= sb->s_groups_count)
- i = 0;
- gdp = get_group_desc (mp, i, &bh2);
- if (gdp->bg_free_blocks_count > 0)
- break;
- }
- if (k >= sb->s_groups_count) {
- unlock_super (VFSTOUFS(mp)->um_devvp);
- return 0;
- }
- bitmap_nr = load_block_bitmap (mp, i);
- bh = sb->s_block_bitmap[bitmap_nr];
- r = memscan(bh->b_data, 0, EXT2_BLOCKS_PER_GROUP(sb) >> 3);
- j = (r - bh->b_data) << 3;
-
- if (j < EXT2_BLOCKS_PER_GROUP(sb))
- goto search_back;
- else
- j = find_first_zero_bit ((unsigned long *) bh->b_data,
- EXT2_BLOCKS_PER_GROUP(sb));
- if (j >= EXT2_BLOCKS_PER_GROUP(sb)) {
- printf ( "ext2_new_block: "
- "Free blocks count corrupted for block group %d", i);
- unlock_super (VFSTOUFS(mp)->um_devvp);
- return 0;
- }
-
-search_back:
- /*
- * We have succeeded in finding a free byte in the block
- * bitmap. Now search backwards up to 7 bits to find the
- * start of this group of free blocks.
- */
- for (k = 0; k < 7 && j > 0 && !test_bit (j - 1, bh->b_data); k++, j--);
-
-got_block:
-
- ext2_debug ("using block group %d(%d)\n", i, gdp->bg_free_blocks_count);
-
- tmp = j + i * EXT2_BLOCKS_PER_GROUP(sb) + es->s_first_data_block;
-
- if (/* test_opt (sb, CHECK_STRICT) && we are always strict. */
- (tmp == gdp->bg_block_bitmap ||
- tmp == gdp->bg_inode_bitmap ||
- in_range (tmp, gdp->bg_inode_table, sb->s_itb_per_group)))
- panic ( "ext2_new_block: "
- "Allocating block in system zone - "
- "%dth block = %u in group %u", j, tmp, i);
-
- if (set_bit (j, bh->b_data)) {
- printf ( "ext2_new_block: "
- "bit already set for block %d", j);
- goto repeat;
- }
-
- ext2_debug ("found bit %d\n", j);
-
- /*
- * Do block preallocation now if required.
- */
-#ifdef EXT2_PREALLOCATE
- if (prealloc_block) {
- *prealloc_count = 0;
- *prealloc_block = tmp + 1;
- for (k = 1;
- k < 8 && (j + k) < EXT2_BLOCKS_PER_GROUP(sb); k++) {
- if (set_bit (j + k, bh->b_data))
- break;
- (*prealloc_count)++;
- }
- gdp->bg_free_blocks_count -= *prealloc_count;
- es->s_free_blocks_count -= *prealloc_count;
- ext2_debug ("Preallocated a further %lu bits.\n",
- *prealloc_count);
- }
-#endif
-
- j = tmp;
-
- mark_buffer_dirty(bh);
-/****
- if (sb->s_flags & MS_SYNCHRONOUS) {
- ll_rw_block (WRITE, 1, &bh);
- wait_on_buffer (bh);
- }
-****/
- if (j >= es->s_blocks_count) {
- printf ( "ext2_new_block: "
- "block >= blocks count - "
- "block_group = %d, block=%d", i, j);
- unlock_super (VFSTOUFS(mp)->um_devvp);
- return 0;
- }
-
- ext2_debug ("allocating block %d. "
- "Goal hits %d of %d.\n", j, goal_hits, goal_attempts);
-
- gdp->bg_free_blocks_count--;
- mark_buffer_dirty(bh2);
- es->s_free_blocks_count--;
- sb->s_dirt = 1;
- unlock_super (VFSTOUFS(mp)->um_devvp);
- return j;
-}
-
-#ifdef unused
-static unsigned long ext2_count_free_blocks (struct mount * mp)
-{
- struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs;
-#ifdef EXT2FS_DEBUG
- struct ext2_super_block * es;
- unsigned long desc_count, bitmap_count, x;
- int bitmap_nr;
- struct ext2_group_desc * gdp;
- int i;
-
- lock_super (VFSTOUFS(mp)->um_devvp);
- es = sb->s_es;
- desc_count = 0;
- bitmap_count = 0;
- gdp = NULL;
- for (i = 0; i < sb->s_groups_count; i++) {
- gdp = get_group_desc (mp, i, NULL);
- desc_count += gdp->bg_free_blocks_count;
- bitmap_nr = load_block_bitmap (mp, i);
- x = ext2_count_free (sb->s_block_bitmap[bitmap_nr],
- sb->s_blocksize);
- ext2_debug ("group %d: stored = %d, counted = %lu\n",
- i, gdp->bg_free_blocks_count, x);
- bitmap_count += x;
- }
- ext2_debug( "stored = %lu, computed = %lu, %lu\n",
- es->s_free_blocks_count, desc_count, bitmap_count);
- unlock_super (VFSTOUFS(mp)->um_devvp);
- return bitmap_count;
-#else
- return sb->s_es->s_free_blocks_count;
-#endif
-}
-#endif /* unused */
-
-static __inline int block_in_use (unsigned long block,
- struct ext2_sb_info * sb,
- unsigned char * map)
-{
- return test_bit ((block - sb->s_es->s_first_data_block) %
- EXT2_BLOCKS_PER_GROUP(sb), map);
-}
-
-#ifdef unused
-static void ext2_check_blocks_bitmap (struct mount * mp)
-{
- struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs;
- struct buffer_head * bh;
- struct ext2_super_block * es;
- unsigned long desc_count, bitmap_count, x;
- unsigned long desc_blocks;
- int bitmap_nr;
- struct ext2_group_desc * gdp;
- int i, j;
-
- lock_super (VFSTOUFS(mp)->um_devvp);
- es = sb->s_es;
- desc_count = 0;
- bitmap_count = 0;
- gdp = NULL;
- desc_blocks = (sb->s_groups_count + EXT2_DESC_PER_BLOCK(sb) - 1) /
- EXT2_DESC_PER_BLOCK(sb);
- for (i = 0; i < sb->s_groups_count; i++) {
- gdp = get_group_desc (mp, i, NULL);
- desc_count += gdp->bg_free_blocks_count;
- bitmap_nr = load_block_bitmap (mp, i);
- bh = sb->s_block_bitmap[bitmap_nr];
-
- if (!test_bit (0, bh->b_data))
- printf ( "ext2_check_blocks_bitmap: "
- "Superblock in group %d is marked free", i);
-
- for (j = 0; j < desc_blocks; j++)
- if (!test_bit (j + 1, bh->b_data))
- printf ("ext2_check_blocks_bitmap: "
- "Descriptor block #%d in group "
- "%d is marked free", j, i);
-
- if (!block_in_use (gdp->bg_block_bitmap, sb, bh->b_data))
- printf ("ext2_check_blocks_bitmap: "
- "Block bitmap for group %d is marked free",
- i);
-
- if (!block_in_use (gdp->bg_inode_bitmap, sb, bh->b_data))
- printf ("ext2_check_blocks_bitmap: "
- "Inode bitmap for group %d is marked free",
- i);
-
- for (j = 0; j < sb->s_itb_per_group; j++)
- if (!block_in_use (gdp->bg_inode_table + j, sb, bh->b_data))
- printf ("ext2_check_blocks_bitmap: "
- "Block #%d of the inode table in "
- "group %d is marked free", j, i);
-
- x = ext2_count_free (bh, sb->s_blocksize);
- if (gdp->bg_free_blocks_count != x)
- printf ("ext2_check_blocks_bitmap: "
- "Wrong free blocks count for group %d, "
- "stored = %d, counted = %lu", i,
- gdp->bg_free_blocks_count, x);
- bitmap_count += x;
- }
- if (es->s_free_blocks_count != bitmap_count)
- printf ("ext2_check_blocks_bitmap: "
- "Wrong free blocks count in super block, "
- "stored = %lu, counted = %lu",
- (unsigned long) es->s_free_blocks_count, bitmap_count);
- unlock_super (VFSTOUFS(mp)->um_devvp);
-}
-#endif /* unused */
-
-/*
- * this function is taken from
- * linux/fs/ext2/bitmap.c
- */
-
-static int nibblemap[] = {4, 3, 3, 2, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0};
-
-unsigned long ext2_count_free (struct buffer_head * map, unsigned int numchars)
-{
- unsigned int i;
- unsigned long sum = 0;
-
- if (!map)
- return (0);
- for (i = 0; i < numchars; i++)
- sum += nibblemap[map->b_data[i] & 0xf] +
- nibblemap[(map->b_data[i] >> 4) & 0xf];
- return (sum);
-}
diff --git a/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c b/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c
deleted file mode 100644
index fc78391..0000000
--- a/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c
+++ /dev/null
@@ -1,511 +0,0 @@
-/*
- * modified for Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- */
-/*
- * linux/fs/ext2/ialloc.c
- *
- * Copyright (C) 1992, 1993, 1994, 1995
- * Remy Card (card@masi.ibp.fr)
- * Laboratoire MASI - Institut Blaise Pascal
- * Universite Pierre et Marie Curie (Paris VI)
- *
- * BSD ufs-inspired inode and directory allocation by
- * Stephen Tweedie (sct@dcs.ed.ac.uk), 1993
- */
-
-/*
- * The free inodes are managed by bitmaps. A file system contains several
- * blocks groups. Each group contains 1 bitmap block for blocks, 1 bitmap
- * block for inodes, N blocks for the inode table and data blocks.
- *
- * The file system contains group descriptors which are located after the
- * super block. Each descriptor contains the number of the bitmap block and
- * the free blocks count in the block. The descriptors are loaded in memory
- * when a file system is mounted (see ext2_read_super).
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/buf.h>
-#include <sys/proc.h>
-#include <sys/mount.h>
-#include <sys/vnode.h>
-
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/inode.h>
-#include <ufs/ufs/ufsmount.h>
-#include <gnu/ext2fs/ext2_extern.h>
-#include <gnu/ext2fs/ext2_fs.h>
-#include <gnu/ext2fs/ext2_fs_sb.h>
-#include <gnu/ext2fs/fs.h>
-#include <sys/stat.h>
-
-#ifdef __i386__
-#include <gnu/ext2fs/i386-bitops.h>
-#else
-#error please provide bit operation functions
-#endif
-
-/* this is supposed to mark a buffer dirty on ready for delayed writing
- */
-void mark_buffer_dirty(struct buf *bh)
-{
- int s;
-
- s = splbio();
- bh->b_flags |= B_DIRTY;
- splx(s);
-}
-
-struct ext2_group_desc * get_group_desc (struct mount * mp,
- unsigned int block_group,
- struct buffer_head ** bh)
-{
- struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs;
- unsigned long group_desc;
- unsigned long desc;
- struct ext2_group_desc * gdp;
-
- if (block_group >= sb->s_groups_count)
- panic ("get_group_desc: "
- "block_group >= groups_count - "
- "block_group = %d, groups_count = %lu",
- block_group, sb->s_groups_count);
-
- group_desc = block_group / EXT2_DESC_PER_BLOCK(sb);
- desc = block_group % EXT2_DESC_PER_BLOCK(sb);
- if (!sb->s_group_desc[group_desc])
- panic ( "get_group_desc:"
- "Group descriptor not loaded - "
- "block_group = %d, group_desc = %lu, desc = %lu",
- block_group, group_desc, desc);
- gdp = (struct ext2_group_desc *)
- sb->s_group_desc[group_desc]->b_data;
- if (bh)
- *bh = sb->s_group_desc[group_desc];
- return gdp + desc;
-}
-
-static void read_inode_bitmap (struct mount * mp,
- unsigned long block_group,
- unsigned int bitmap_nr)
-{
- struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs;
- struct ext2_group_desc * gdp;
- struct buffer_head * bh;
- int error;
-
- gdp = get_group_desc (mp, block_group, NULL);
- if ((error = bread (VFSTOUFS(mp)->um_devvp,
- fsbtodb(sb, gdp->bg_inode_bitmap),
- sb->s_blocksize,
- NOCRED, &bh)) != 0)
- panic ( "read_inode_bitmap:"
- "Cannot read inode bitmap - "
- "block_group = %lu, inode_bitmap = %lu",
- block_group, (unsigned long) gdp->bg_inode_bitmap);
- sb->s_inode_bitmap_number[bitmap_nr] = block_group;
- sb->s_inode_bitmap[bitmap_nr] = bh;
- LCK_BUF(bh)
-}
-
-/*
- * load_inode_bitmap loads the inode bitmap for a blocks group
- *
- * It maintains a cache for the last bitmaps loaded. This cache is managed
- * with a LRU algorithm.
- *
- * Notes:
- * 1/ There is one cache per mounted file system.
- * 2/ If the file system contains less than EXT2_MAX_GROUP_LOADED groups,
- * this function reads the bitmap without maintaining a LRU cache.
- */
-static int load_inode_bitmap (struct mount * mp,
- unsigned int block_group)
-{
- struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs;
- int i, j;
- unsigned long inode_bitmap_number;
- struct buffer_head * inode_bitmap;
-
- if (block_group >= sb->s_groups_count)
- panic ("load_inode_bitmap:"
- "block_group >= groups_count - "
- "block_group = %d, groups_count = %lu",
- block_group, sb->s_groups_count);
- if (sb->s_loaded_inode_bitmaps > 0 &&
- sb->s_inode_bitmap_number[0] == block_group)
- return 0;
- if (sb->s_groups_count <= EXT2_MAX_GROUP_LOADED) {
- if (sb->s_inode_bitmap[block_group]) {
- if (sb->s_inode_bitmap_number[block_group] !=
- block_group)
- panic ( "load_inode_bitmap:"
- "block_group != inode_bitmap_number");
- else
- return block_group;
- } else {
- read_inode_bitmap (mp, block_group, block_group);
- return block_group;
- }
- }
-
- for (i = 0; i < sb->s_loaded_inode_bitmaps &&
- sb->s_inode_bitmap_number[i] != block_group;
- i++)
- ;
- if (i < sb->s_loaded_inode_bitmaps &&
- sb->s_inode_bitmap_number[i] == block_group) {
- inode_bitmap_number = sb->s_inode_bitmap_number[i];
- inode_bitmap = sb->s_inode_bitmap[i];
- for (j = i; j > 0; j--) {
- sb->s_inode_bitmap_number[j] =
- sb->s_inode_bitmap_number[j - 1];
- sb->s_inode_bitmap[j] =
- sb->s_inode_bitmap[j - 1];
- }
- sb->s_inode_bitmap_number[0] = inode_bitmap_number;
- sb->s_inode_bitmap[0] = inode_bitmap;
- } else {
- if (sb->s_loaded_inode_bitmaps < EXT2_MAX_GROUP_LOADED)
- sb->s_loaded_inode_bitmaps++;
- else
- ULCK_BUF(sb->s_inode_bitmap[EXT2_MAX_GROUP_LOADED - 1])
- for (j = sb->s_loaded_inode_bitmaps - 1; j > 0; j--) {
- sb->s_inode_bitmap_number[j] =
- sb->s_inode_bitmap_number[j - 1];
- sb->s_inode_bitmap[j] =
- sb->s_inode_bitmap[j - 1];
- }
- read_inode_bitmap (mp, block_group, 0);
- }
- return 0;
-}
-
-
-void ext2_free_inode (struct inode * inode)
-{
- struct ext2_sb_info * sb;
- struct buffer_head * bh;
- struct buffer_head * bh2;
- unsigned long block_group;
- unsigned long bit;
- int bitmap_nr;
- struct ext2_group_desc * gdp;
- struct ext2_super_block * es;
-
- if (!inode)
- return;
-
- if (inode->i_nlink) {
- printf ("ext2_free_inode: inode has nlink=%d\n",
- inode->i_nlink);
- return;
- }
-
- ext2_debug ("freeing inode %lu\n", inode->i_number);
-
- sb = inode->i_e2fs;
- lock_super (DEVVP(inode));
- if (inode->i_number < EXT2_FIRST_INO ||
- inode->i_number > sb->s_es->s_inodes_count) {
- printf ("free_inode reserved inode or nonexistent inode");
- unlock_super (DEVVP(inode));
- return;
- }
- es = sb->s_es;
- block_group = (inode->i_number - 1) / EXT2_INODES_PER_GROUP(sb);
- bit = (inode->i_number - 1) % EXT2_INODES_PER_GROUP(sb);
- bitmap_nr = load_inode_bitmap (ITOV(inode)->v_mount, block_group);
- bh = sb->s_inode_bitmap[bitmap_nr];
- if (!clear_bit (bit, bh->b_data))
- printf ( "ext2_free_inode:"
- "bit already cleared for inode %lu",
- (unsigned long)inode->i_number);
- else {
- gdp = get_group_desc (ITOV(inode)->v_mount, block_group, &bh2);
- gdp->bg_free_inodes_count++;
- if (S_ISDIR(inode->i_mode))
- gdp->bg_used_dirs_count--;
- mark_buffer_dirty(bh2);
- es->s_free_inodes_count++;
- }
- mark_buffer_dirty(bh);
-/*** XXX
- if (sb->s_flags & MS_SYNCHRONOUS) {
- ll_rw_block (WRITE, 1, &bh);
- wait_on_buffer (bh);
- }
-***/
- sb->s_dirt = 1;
- unlock_super (DEVVP(inode));
-}
-
-#if linux
-/*
- * This function increments the inode version number
- *
- * This may be used one day by the NFS server
- */
-static void inc_inode_version (struct inode * inode,
- struct ext2_group_desc *gdp,
- int mode)
-{
- unsigned long inode_block;
- struct buffer_head * bh;
- struct ext2_inode * raw_inode;
-
- inode_block = gdp->bg_inode_table + (((inode->i_number - 1) %
- EXT2_INODES_PER_GROUP(inode->i_sb)) /
- EXT2_INODES_PER_BLOCK(inode->i_sb));
- bh = bread (inode->i_sb->s_dev, inode_block, inode->i_sb->s_blocksize);
- if (!bh) {
- printf ("inc_inode_version Cannot load inode table block - "
- "inode=%lu, inode_block=%lu\n",
- inode->i_number, inode_block);
- inode->u.ext2_i.i_version = 1;
- return;
- }
- raw_inode = ((struct ext2_inode *) bh->b_data) +
- (((inode->i_number - 1) %
- EXT2_INODES_PER_GROUP(inode->i_sb)) %
- EXT2_INODES_PER_BLOCK(inode->i_sb));
- raw_inode->i_version++;
- inode->u.ext2_i.i_version = raw_inode->i_version;
- bdwrite (bh);
-}
-
-#endif /* linux */
-
-/*
- * There are two policies for allocating an inode. If the new inode is
- * a directory, then a forward search is made for a block group with both
- * free space and a low directory-to-inode ratio; if that fails, then of
- * the groups with above-average free space, that group with the fewest
- * directories already is chosen.
- *
- * For other inodes, search forward from the parent directory\'s block
- * group to find a free inode.
- */
-/*
- * this functino has been reduced to the actual 'find the inode number' part
- */
-ino_t ext2_new_inode (const struct inode * dir, int mode)
-{
- struct ext2_sb_info * sb;
- struct buffer_head * bh;
- struct buffer_head * bh2;
- int i, j, avefreei;
- int bitmap_nr;
- struct ext2_group_desc * gdp;
- struct ext2_group_desc * tmp;
- struct ext2_super_block * es;
-
- if (!dir)
- return 0;
- sb = dir->i_e2fs;
-
- lock_super (DEVVP(dir));
- es = sb->s_es;
-repeat:
- gdp = NULL; i=0;
-
- if (S_ISDIR(mode)) {
- avefreei = es->s_free_inodes_count /
- sb->s_groups_count;
-/* I am not yet convinced that this next bit is necessary.
- i = dir->u.ext2_i.i_block_group;
- for (j = 0; j < sb->u.ext2_sb.s_groups_count; j++) {
- tmp = get_group_desc (sb, i, &bh2);
- if ((tmp->bg_used_dirs_count << 8) <
- tmp->bg_free_inodes_count) {
- gdp = tmp;
- break;
- }
- else
- i = ++i % sb->u.ext2_sb.s_groups_count;
- }
-*/
- if (!gdp) {
- for (j = 0; j < sb->s_groups_count; j++) {
- tmp = get_group_desc(ITOV(dir)->v_mount,j,&bh2);
- if (tmp->bg_free_inodes_count &&
- tmp->bg_free_inodes_count >= avefreei) {
- if (!gdp ||
- (tmp->bg_free_blocks_count >
- gdp->bg_free_blocks_count)) {
- i = j;
- gdp = tmp;
- }
- }
- }
- }
- }
- else
- {
- /*
- * Try to place the inode in its parent directory
- */
- i = dir->i_block_group;
- tmp = get_group_desc (ITOV(dir)->v_mount, i, &bh2);
- if (tmp->bg_free_inodes_count)
- gdp = tmp;
- else
- {
- /*
- * Use a quadratic hash to find a group with a
- * free inode
- */
- for (j = 1; j < sb->s_groups_count; j <<= 1) {
- i += j;
- if (i >= sb->s_groups_count)
- i -= sb->s_groups_count;
- tmp = get_group_desc(ITOV(dir)->v_mount,i,&bh2);
- if (tmp->bg_free_inodes_count) {
- gdp = tmp;
- break;
- }
- }
- }
- if (!gdp) {
- /*
- * That failed: try linear search for a free inode
- */
- i = dir->i_block_group + 1;
- for (j = 2; j < sb->s_groups_count; j++) {
- if (++i >= sb->s_groups_count)
- i = 0;
- tmp = get_group_desc(ITOV(dir)->v_mount,i,&bh2);
- if (tmp->bg_free_inodes_count) {
- gdp = tmp;
- break;
- }
- }
- }
- }
-
- if (!gdp) {
- unlock_super (DEVVP(dir));
- return 0;
- }
- bitmap_nr = load_inode_bitmap (ITOV(dir)->v_mount, i);
- bh = sb->s_inode_bitmap[bitmap_nr];
- if ((j = find_first_zero_bit ((unsigned long *) bh->b_data,
- EXT2_INODES_PER_GROUP(sb))) <
- EXT2_INODES_PER_GROUP(sb)) {
- if (set_bit (j, bh->b_data)) {
- printf ( "ext2_new_inode:"
- "bit already set for inode %d", j);
- goto repeat;
- }
-/* Linux now does the following:
- mark_buffer_dirty(bh);
- if (sb->s_flags & MS_SYNCHRONOUS) {
- ll_rw_block (WRITE, 1, &bh);
- wait_on_buffer (bh);
- }
-*/
- mark_buffer_dirty(bh);
- } else {
- if (gdp->bg_free_inodes_count != 0) {
- printf ( "ext2_new_inode:"
- "Free inodes count corrupted in group %d",
- i);
- unlock_super (DEVVP(dir));
- return 0;
- }
- goto repeat;
- }
- j += i * EXT2_INODES_PER_GROUP(sb) + 1;
- if (j < EXT2_FIRST_INO || j > es->s_inodes_count) {
- printf ( "ext2_new_inode:"
- "reserved inode or inode > inodes count - "
- "block_group = %d,inode=%d", i, j);
- unlock_super (DEVVP(dir));
- return 0;
- }
- gdp->bg_free_inodes_count--;
- if (S_ISDIR(mode))
- gdp->bg_used_dirs_count++;
- mark_buffer_dirty(bh2);
- es->s_free_inodes_count--;
- /* mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1); */
- sb->s_dirt = 1;
- unlock_super (DEVVP(dir));
- return j;
-}
-
-#ifdef unused
-static unsigned long ext2_count_free_inodes (struct mount * mp)
-{
-#ifdef EXT2FS_DEBUG
- struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs;
- struct ext2_super_block * es;
- unsigned long desc_count, bitmap_count, x;
- int bitmap_nr;
- struct ext2_group_desc * gdp;
- int i;
-
- lock_super (VFSTOUFS(mp)->um_devvp);
- es = sb->s_es;
- desc_count = 0;
- bitmap_count = 0;
- gdp = NULL;
- for (i = 0; i < sb->s_groups_count; i++) {
- gdp = get_group_desc (mp, i, NULL);
- desc_count += gdp->bg_free_inodes_count;
- bitmap_nr = load_inode_bitmap (mp, i);
- x = ext2_count_free (sb->s_inode_bitmap[bitmap_nr],
- EXT2_INODES_PER_GROUP(sb) / 8);
- ext2_debug ("group %d: stored = %d, counted = %lu\n",
- i, gdp->bg_free_inodes_count, x);
- bitmap_count += x;
- }
- ext2_debug("stored = %lu, computed = %lu, %lu\n",
- es->s_free_inodes_count, desc_count, bitmap_count);
- unlock_super (VFSTOUFS(mp)->um_devvp);
- return desc_count;
-#else
- return VFSTOUFS(mp)->um_e2fsb->s_free_inodes_count;
-#endif
-}
-#endif /* unused */
-
-#ifdef LATER
-void ext2_check_inodes_bitmap (struct mount * mp)
-{
- struct ext2_super_block * es;
- unsigned long desc_count, bitmap_count, x;
- int bitmap_nr;
- struct ext2_group_desc * gdp;
- int i;
-
- lock_super (sb);
- es = sb->u.ext2_sb.s_es;
- desc_count = 0;
- bitmap_count = 0;
- gdp = NULL;
- for (i = 0; i < sb->u.ext2_sb.s_groups_count; i++) {
- gdp = get_group_desc (sb, i, NULL);
- desc_count += gdp->bg_free_inodes_count;
- bitmap_nr = load_inode_bitmap (sb, i);
- x = ext2_count_free (sb->u.ext2_sb.s_inode_bitmap[bitmap_nr],
- EXT2_INODES_PER_GROUP(sb) / 8);
- if (gdp->bg_free_inodes_count != x)
- printf ( "ext2_check_inodes_bitmap:"
- "Wrong free inodes count in group %d, "
- "stored = %d, counted = %lu", i,
- gdp->bg_free_inodes_count, x);
- bitmap_count += x;
- }
- if (es->s_free_inodes_count != bitmap_count)
- printf ( "ext2_check_inodes_bitmap:"
- "Wrong free inodes count in super block, "
- "stored = %lu, counted = %lu",
- (unsigned long) es->s_free_inodes_count, bitmap_count);
- unlock_super (sb);
-}
-#endif
diff --git a/sys/gnu/fs/ext2fs/ext2_lookup.c b/sys/gnu/fs/ext2fs/ext2_lookup.c
deleted file mode 100644
index 71c081f..0000000
--- a/sys/gnu/fs/ext2fs/ext2_lookup.c
+++ /dev/null
@@ -1,1069 +0,0 @@
-/*
- * modified for Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- *
- * $FreeBSD$
- */
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ufs_lookup.c 8.6 (Berkeley) 4/1/94
- */
-
-#include <stddef.h>
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/namei.h>
-#include <sys/buf.h>
-#include <sys/mount.h>
-#include <sys/vnode.h>
-#include <sys/malloc.h>
-#include <sys/dirent.h>
-
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/inode.h>
-#include <ufs/ufs/dir.h>
-#include <ufs/ufs/ufsmount.h>
-#include <ufs/ufs/ufs_extern.h>
-
-#include <gnu/ext2fs/ext2_extern.h>
-#include <gnu/ext2fs/ext2_fs.h>
-#include <gnu/ext2fs/ext2_fs_sb.h>
-
-/*
- DIRBLKSIZE in ffs is DEV_BSIZE (in most cases 512)
- while it is the native blocksize in ext2fs - thus, a #define
- is no longer appropriate
-*/
-#undef DIRBLKSIZ
-
-extern int dirchk;
-
-static u_char ext2_ft_to_dt[] = {
- DT_UNKNOWN, /* EXT2_FT_UNKNOWN */
- DT_REG, /* EXT2_FT_REG_FILE */
- DT_DIR, /* EXT2_FT_DIR */
- DT_CHR, /* EXT2_FT_CHRDEV */
- DT_BLK, /* EXT2_FT_BLKDEV */
- DT_FIFO, /* EXT2_FT_FIFO */
- DT_SOCK, /* EXT2_FT_SOCK */
- DT_LNK, /* EXT2_FT_SYMLINK */
-};
-#define FTTODT(ft) \
- ((ft) > sizeof(ext2_ft_to_dt) / sizeof(ext2_ft_to_dt[0]) ? \
- DT_UNKNOWN : ext2_ft_to_dt[(ft)])
-
-static u_char dt_to_ext2_ft[] = {
- EXT2_FT_UNKNOWN, /* DT_UNKNOWN */
- EXT2_FT_FIFO, /* DT_FIFO */
- EXT2_FT_CHRDEV, /* DT_CHR */
- EXT2_FT_UNKNOWN, /* unused */
- EXT2_FT_DIR, /* DT_DIR */
- EXT2_FT_UNKNOWN, /* unused */
- EXT2_FT_BLKDEV, /* DT_BLK */
- EXT2_FT_UNKNOWN, /* unused */
- EXT2_FT_REG_FILE, /* DT_REG */
- EXT2_FT_UNKNOWN, /* unused */
- EXT2_FT_SYMLINK, /* DT_LNK */
- EXT2_FT_UNKNOWN, /* unused */
- EXT2_FT_SOCK, /* DT_SOCK */
- EXT2_FT_UNKNOWN, /* unused */
- EXT2_FT_UNKNOWN, /* DT_WHT */
-};
-#define DTTOFT(dt) \
- ((dt) > sizeof(dt_to_ext2_ft) / sizeof(dt_to_ext2_ft[0]) ? \
- EXT2_FT_UNKNOWN : dt_to_ext2_ft[(dt)])
-
-static int ext2_dirbadentry __P((struct vnode *dp,
- struct ext2_dir_entry_2 *de,
- int entryoffsetinblock));
-
-/*
- * Vnode op for reading directories.
- *
- * The routine below assumes that the on-disk format of a directory
- * is the same as that defined by <sys/dirent.h>. If the on-disk
- * format changes, then it will be necessary to do a conversion
- * from the on-disk format that read returns to the format defined
- * by <sys/dirent.h>.
- */
-/*
- * this is exactly what we do here - the problem is that the conversion
- * will blow up some entries by four bytes, so it can't be done in place.
- * This is too bad. Right now the conversion is done entry by entry, the
- * converted entry is sent via uiomove.
- *
- * XXX allocate a buffer, convert as many entries as possible, then send
- * the whole buffer to uiomove
- */
-int
-ext2_readdir(ap)
- struct vop_readdir_args /* {
- struct vnode *a_vp;
- struct uio *a_uio;
- struct ucred *a_cred;
- } */ *ap;
-{
- register struct uio *uio = ap->a_uio;
- int count, error;
-
- struct ext2_dir_entry_2 *edp, *dp;
- int ncookies;
- struct dirent dstdp;
- struct uio auio;
- struct iovec aiov;
- caddr_t dirbuf;
- int readcnt;
- u_quad_t startoffset = uio->uio_offset;
-
- count = uio->uio_resid; /* legyenek boldogok akik akarnak ... */
- uio->uio_resid = count;
- uio->uio_iov->iov_len = count;
-
-#if 0
-printf("ext2_readdir called uio->uio_offset %d uio->uio_resid %d count %d \n",
- (int)uio->uio_offset, (int)uio->uio_resid, (int)count);
-#endif
-
- auio = *uio;
- auio.uio_iov = &aiov;
- auio.uio_iovcnt = 1;
- auio.uio_segflg = UIO_SYSSPACE;
- aiov.iov_len = count;
- MALLOC(dirbuf, caddr_t, count, M_TEMP, M_WAITOK);
- aiov.iov_base = dirbuf;
- error = VOP_READ(ap->a_vp, &auio, 0, ap->a_cred);
- if (error == 0) {
- readcnt = count - auio.uio_resid;
- edp = (struct ext2_dir_entry_2 *)&dirbuf[readcnt];
- ncookies = 0;
- bzero(&dstdp, offsetof(struct dirent, d_name));
- for (dp = (struct ext2_dir_entry_2 *)dirbuf;
- !error && uio->uio_resid > 0 && dp < edp; ) {
- /*-
- * "New" ext2fs directory entries differ in 3 ways
- * from ufs on-disk ones:
- * - the name is not necessarily NUL-terminated.
- * - the file type field always exists and always
- * follows the name length field.
- * - the file type is encoded in a different way.
- *
- * "Old" ext2fs directory entries need no special
- * conversions, since they binary compatible with
- * "new" entries having a file type of 0 (i.e.,
- * EXT2_FT_UNKNOWN). Splitting the old name length
- * field didn't make a mess like it did in ufs,
- * because ext2fs uses a machine-dependent disk
- * layout.
- */
- dstdp.d_fileno = dp->inode;
- dstdp.d_type = FTTODT(dp->file_type);
- dstdp.d_namlen = dp->name_len;
- dstdp.d_reclen = GENERIC_DIRSIZ(&dstdp);
- bcopy(dp->name, dstdp.d_name, dstdp.d_namlen);
- bzero(dstdp.d_name + dstdp.d_namlen,
- dstdp.d_reclen - offsetof(struct dirent, d_name) -
- dstdp.d_namlen);
-
- if (dp->rec_len > 0) {
- if(dstdp.d_reclen <= uio->uio_resid) {
- /* advance dp */
- dp = (struct ext2_dir_entry_2 *)
- ((char *)dp + dp->rec_len);
- error =
- uiomove((caddr_t)&dstdp,
- dstdp.d_reclen, uio);
- if (!error)
- ncookies++;
- } else
- break;
- } else {
- error = EIO;
- break;
- }
- }
- /* we need to correct uio_offset */
- uio->uio_offset = startoffset + (caddr_t)dp - dirbuf;
-
- if (!error && ap->a_ncookies != NULL) {
- u_long *cookies;
- u_long *cookiep;
- off_t off;
-
- if (uio->uio_segflg != UIO_SYSSPACE || uio->uio_iovcnt != 1)
- panic("ext2fs_readdir: unexpected uio from NFS server");
- MALLOC(cookies, u_long *, ncookies * sizeof(u_long), M_TEMP,
- M_WAITOK);
- off = startoffset;
- for (dp = (struct ext2_dir_entry_2 *)dirbuf, cookiep = cookies;
- dp < edp;
- dp = (struct ext2_dir_entry_2 *)((caddr_t) dp + dp->rec_len)) {
- off += dp->rec_len;
- *cookiep++ = (u_long) off;
- }
- *ap->a_ncookies = ncookies;
- *ap->a_cookies = cookies;
- }
- }
- FREE(dirbuf, M_TEMP);
- if (ap->a_eofflag)
- *ap->a_eofflag = VTOI(ap->a_vp)->i_size <= uio->uio_offset;
- return (error);
-}
-
-/*
- * Convert a component of a pathname into a pointer to a locked inode.
- * This is a very central and rather complicated routine.
- * If the file system is not maintained in a strict tree hierarchy,
- * this can result in a deadlock situation (see comments in code below).
- *
- * The cnp->cn_nameiop argument is LOOKUP, CREATE, RENAME, or DELETE depending
- * on whether the name is to be looked up, created, renamed, or deleted.
- * When CREATE, RENAME, or DELETE is specified, information usable in
- * creating, renaming, or deleting a directory entry may be calculated.
- * If flag has LOCKPARENT or'ed into it and the target of the pathname
- * exists, lookup returns both the target and its parent directory locked.
- * When creating or renaming and LOCKPARENT is specified, the target may
- * not be ".". When deleting and LOCKPARENT is specified, the target may
- * be "."., but the caller must check to ensure it does an vrele and vput
- * instead of two vputs.
- *
- * Overall outline of ufs_lookup:
- *
- * search for name in directory, to found or notfound
- * notfound:
- * if creating, return locked directory, leaving info on available slots
- * else return error
- * found:
- * if at end of path and deleting, return information to allow delete
- * if at end of path and rewriting (RENAME and LOCKPARENT), lock target
- * inode and return info to allow rewrite
- * if not at end, add name to cache; if at end and neither creating
- * nor deleting, add name to cache
- */
-int
-ext2_lookup(ap)
- struct vop_cachedlookup_args /* {
- struct vnode *a_dvp;
- struct vnode **a_vpp;
- struct componentname *a_cnp;
- } */ *ap;
-{
- register struct vnode *vdp; /* vnode for directory being searched */
- register struct inode *dp; /* inode for directory being searched */
- struct buf *bp; /* a buffer of directory entries */
- register struct ext2_dir_entry_2 *ep; /* the current directory entry */
- int entryoffsetinblock; /* offset of ep in bp's buffer */
- enum {NONE, COMPACT, FOUND} slotstatus;
- doff_t slotoffset; /* offset of area with free space */
- int slotsize; /* size of area at slotoffset */
- int slotfreespace; /* amount of space free in slot */
- int slotneeded; /* size of the entry we're seeking */
- int numdirpasses; /* strategy for directory search */
- doff_t endsearch; /* offset to end directory search */
- doff_t prevoff; /* prev entry dp->i_offset */
- struct vnode *pdp; /* saved dp during symlink work */
- struct vnode *tdp; /* returned by VFS_VGET */
- doff_t enduseful; /* pointer past last used dir slot */
- u_long bmask; /* block offset mask */
- int lockparent; /* 1 => lockparent flag is set */
- int wantparent; /* 1 => wantparent or lockparent flag */
- int namlen, error;
- struct vnode **vpp = ap->a_vpp;
- struct componentname *cnp = ap->a_cnp;
- struct ucred *cred = cnp->cn_cred;
- int flags = cnp->cn_flags;
- int nameiop = cnp->cn_nameiop;
- struct proc *p = cnp->cn_proc;
-
- int DIRBLKSIZ = VTOI(ap->a_dvp)->i_e2fs->s_blocksize;
-
- bp = NULL;
- slotoffset = -1;
- *vpp = NULL;
- vdp = ap->a_dvp;
- dp = VTOI(vdp);
- lockparent = flags & LOCKPARENT;
- wantparent = flags & (LOCKPARENT|WANTPARENT);
-
- /*
- * We now have a segment name to search for, and a directory to search.
- */
-
- /*
- * Suppress search for slots unless creating
- * file and at end of pathname, in which case
- * we watch for a place to put the new file in
- * case it doesn't already exist.
- */
- slotstatus = FOUND;
- slotfreespace = slotsize = slotneeded = 0;
- if ((nameiop == CREATE || nameiop == RENAME) &&
- (flags & ISLASTCN)) {
- slotstatus = NONE;
- slotneeded = EXT2_DIR_REC_LEN(cnp->cn_namelen);
- /* was
- slotneeded = (sizeof(struct direct) - MAXNAMLEN +
- cnp->cn_namelen + 3) &~ 3; */
- }
-
- /*
- * If there is cached information on a previous search of
- * this directory, pick up where we last left off.
- * We cache only lookups as these are the most common
- * and have the greatest payoff. Caching CREATE has little
- * benefit as it usually must search the entire directory
- * to determine that the entry does not exist. Caching the
- * location of the last DELETE or RENAME has not reduced
- * profiling time and hence has been removed in the interest
- * of simplicity.
- */
- bmask = VFSTOUFS(vdp->v_mount)->um_mountp->mnt_stat.f_iosize - 1;
- if (nameiop != LOOKUP || dp->i_diroff == 0 ||
- dp->i_diroff > dp->i_size) {
- entryoffsetinblock = 0;
- dp->i_offset = 0;
- numdirpasses = 1;
- } else {
- dp->i_offset = dp->i_diroff;
- if ((entryoffsetinblock = dp->i_offset & bmask) &&
- (error = UFS_BLKATOFF(vdp, (off_t)dp->i_offset, NULL, &bp)))
- return (error);
- numdirpasses = 2;
- nchstats.ncs_2passes++;
- }
- prevoff = dp->i_offset;
- endsearch = roundup(dp->i_size, DIRBLKSIZ);
- enduseful = 0;
-
-searchloop:
- while (dp->i_offset < endsearch) {
- /*
- * If necessary, get the next directory block.
- */
- if ((dp->i_offset & bmask) == 0) {
- if (bp != NULL)
- brelse(bp);
- if ((error =
- UFS_BLKATOFF(vdp, (off_t)dp->i_offset, NULL, &bp)) != 0)
- return (error);
- entryoffsetinblock = 0;
- }
- /*
- * If still looking for a slot, and at a DIRBLKSIZE
- * boundary, have to start looking for free space again.
- */
- if (slotstatus == NONE &&
- (entryoffsetinblock & (DIRBLKSIZ - 1)) == 0) {
- slotoffset = -1;
- slotfreespace = 0;
- }
- /*
- * Get pointer to next entry.
- * Full validation checks are slow, so we only check
- * enough to insure forward progress through the
- * directory. Complete checks can be run by patching
- * "dirchk" to be true.
- */
- ep = (struct ext2_dir_entry_2 *)
- ((char *)bp->b_data + entryoffsetinblock);
- if (ep->rec_len == 0 ||
- (dirchk && ext2_dirbadentry(vdp, ep, entryoffsetinblock))) {
- int i;
- ufs_dirbad(dp, dp->i_offset, "mangled entry");
- i = DIRBLKSIZ - (entryoffsetinblock & (DIRBLKSIZ - 1));
- dp->i_offset += i;
- entryoffsetinblock += i;
- continue;
- }
-
- /*
- * If an appropriate sized slot has not yet been found,
- * check to see if one is available. Also accumulate space
- * in the current block so that we can determine if
- * compaction is viable.
- */
- if (slotstatus != FOUND) {
- int size = ep->rec_len;
-
- if (ep->inode != 0)
- size -= EXT2_DIR_REC_LEN(ep->name_len);
- if (size > 0) {
- if (size >= slotneeded) {
- slotstatus = FOUND;
- slotoffset = dp->i_offset;
- slotsize = ep->rec_len;
- } else if (slotstatus == NONE) {
- slotfreespace += size;
- if (slotoffset == -1)
- slotoffset = dp->i_offset;
- if (slotfreespace >= slotneeded) {
- slotstatus = COMPACT;
- slotsize = dp->i_offset +
- ep->rec_len - slotoffset;
- }
- }
- }
- }
-
- /*
- * Check for a name match.
- */
- if (ep->inode) {
- namlen = ep->name_len;
- if (namlen == cnp->cn_namelen &&
- !bcmp(cnp->cn_nameptr, ep->name,
- (unsigned)namlen)) {
- /*
- * Save directory entry's inode number and
- * reclen in ndp->ni_ufs area, and release
- * directory buffer.
- */
- dp->i_ino = ep->inode;
- dp->i_reclen = ep->rec_len;
- brelse(bp);
- goto found;
- }
- }
- prevoff = dp->i_offset;
- dp->i_offset += ep->rec_len;
- entryoffsetinblock += ep->rec_len;
- if (ep->inode)
- enduseful = dp->i_offset;
- }
-/* notfound: */
- /*
- * If we started in the middle of the directory and failed
- * to find our target, we must check the beginning as well.
- */
- if (numdirpasses == 2) {
- numdirpasses--;
- dp->i_offset = 0;
- endsearch = dp->i_diroff;
- goto searchloop;
- }
- if (bp != NULL)
- brelse(bp);
- /*
- * If creating, and at end of pathname and current
- * directory has not been removed, then can consider
- * allowing file to be created.
- */
- if ((nameiop == CREATE || nameiop == RENAME) &&
- (flags & ISLASTCN) && dp->i_nlink != 0) {
- /*
- * Access for write is interpreted as allowing
- * creation of files in the directory.
- */
- if ((error = VOP_ACCESS(vdp, VWRITE, cred, cnp->cn_proc)) != 0)
- return (error);
- /*
- * Return an indication of where the new directory
- * entry should be put. If we didn't find a slot,
- * then set dp->i_count to 0 indicating
- * that the new slot belongs at the end of the
- * directory. If we found a slot, then the new entry
- * can be put in the range from dp->i_offset to
- * dp->i_offset + dp->i_count.
- */
- if (slotstatus == NONE) {
- dp->i_offset = roundup(dp->i_size, DIRBLKSIZ);
- dp->i_count = 0;
- enduseful = dp->i_offset;
- } else {
- dp->i_offset = slotoffset;
- dp->i_count = slotsize;
- if (enduseful < slotoffset + slotsize)
- enduseful = slotoffset + slotsize;
- }
- dp->i_endoff = roundup(enduseful, DIRBLKSIZ);
- dp->i_flag |= IN_CHANGE | IN_UPDATE;
- /*
- * We return with the directory locked, so that
- * the parameters we set up above will still be
- * valid if we actually decide to do a direnter().
- * We return ni_vp == NULL to indicate that the entry
- * does not currently exist; we leave a pointer to
- * the (locked) directory inode in ndp->ni_dvp.
- * The pathname buffer is saved so that the name
- * can be obtained later.
- *
- * NB - if the directory is unlocked, then this
- * information cannot be used.
- */
- cnp->cn_flags |= SAVENAME;
- if (!lockparent)
- VOP_UNLOCK(vdp, 0, p);
- return (EJUSTRETURN);
- }
- /*
- * Insert name into cache (as non-existent) if appropriate.
- */
- if ((cnp->cn_flags & MAKEENTRY) && nameiop != CREATE)
- cache_enter(vdp, *vpp, cnp);
- return (ENOENT);
-
-found:
- if (numdirpasses == 2)
- nchstats.ncs_pass2++;
- /*
- * Check that directory length properly reflects presence
- * of this entry.
- */
- if (entryoffsetinblock + EXT2_DIR_REC_LEN(ep->name_len)
- > dp->i_size) {
- ufs_dirbad(dp, dp->i_offset, "i_size too small");
- dp->i_size = entryoffsetinblock+EXT2_DIR_REC_LEN(ep->name_len);
- dp->i_flag |= IN_CHANGE | IN_UPDATE;
- }
-
- /*
- * Found component in pathname.
- * If the final component of path name, save information
- * in the cache as to where the entry was found.
- */
- if ((flags & ISLASTCN) && nameiop == LOOKUP)
- dp->i_diroff = dp->i_offset &~ (DIRBLKSIZ - 1);
-
- /*
- * If deleting, and at end of pathname, return
- * parameters which can be used to remove file.
- * If the wantparent flag isn't set, we return only
- * the directory (in ndp->ni_dvp), otherwise we go
- * on and lock the inode, being careful with ".".
- */
- if (nameiop == DELETE && (flags & ISLASTCN)) {
- /*
- * Write access to directory required to delete files.
- */
- if ((error = VOP_ACCESS(vdp, VWRITE, cred, cnp->cn_proc)) != 0)
- return (error);
- /*
- * Return pointer to current entry in dp->i_offset,
- * and distance past previous entry (if there
- * is a previous entry in this block) in dp->i_count.
- * Save directory inode pointer in ndp->ni_dvp for dirremove().
- */
- if ((dp->i_offset & (DIRBLKSIZ - 1)) == 0)
- dp->i_count = 0;
- else
- dp->i_count = dp->i_offset - prevoff;
- if (dp->i_number == dp->i_ino) {
- VREF(vdp);
- *vpp = vdp;
- return (0);
- }
- if ((error = VFS_VGET(vdp->v_mount, dp->i_ino, &tdp)) != 0)
- return (error);
- /*
- * If directory is "sticky", then user must own
- * the directory, or the file in it, else she
- * may not delete it (unless she's root). This
- * implements append-only directories.
- */
- if ((dp->i_mode & ISVTX) &&
- cred->cr_uid != 0 &&
- cred->cr_uid != dp->i_uid &&
- VTOI(tdp)->i_uid != cred->cr_uid) {
- vput(tdp);
- return (EPERM);
- }
- *vpp = tdp;
- if (!lockparent)
- VOP_UNLOCK(vdp, 0, p);
- return (0);
- }
-
- /*
- * If rewriting (RENAME), return the inode and the
- * information required to rewrite the present directory
- * Must get inode of directory entry to verify it's a
- * regular file, or empty directory.
- */
- if (nameiop == RENAME && wantparent &&
- (flags & ISLASTCN)) {
- if ((error = VOP_ACCESS(vdp, VWRITE, cred, cnp->cn_proc)) != 0)
- return (error);
- /*
- * Careful about locking second inode.
- * This can only occur if the target is ".".
- */
- if (dp->i_number == dp->i_ino)
- return (EISDIR);
- if ((error = VFS_VGET(vdp->v_mount, dp->i_ino, &tdp)) != 0)
- return (error);
- *vpp = tdp;
- cnp->cn_flags |= SAVENAME;
- if (!lockparent)
- VOP_UNLOCK(vdp, 0, p);
- return (0);
- }
-
- /*
- * Step through the translation in the name. We do not `vput' the
- * directory because we may need it again if a symbolic link
- * is relative to the current directory. Instead we save it
- * unlocked as "pdp". We must get the target inode before unlocking
- * the directory to insure that the inode will not be removed
- * before we get it. We prevent deadlock by always fetching
- * inodes from the root, moving down the directory tree. Thus
- * when following backward pointers ".." we must unlock the
- * parent directory before getting the requested directory.
- * There is a potential race condition here if both the current
- * and parent directories are removed before the VFS_VGET for the
- * inode associated with ".." returns. We hope that this occurs
- * infrequently since we cannot avoid this race condition without
- * implementing a sophisticated deadlock detection algorithm.
- * Note also that this simple deadlock detection scheme will not
- * work if the file system has any hard links other than ".."
- * that point backwards in the directory structure.
- */
- pdp = vdp;
- if (flags & ISDOTDOT) {
- VOP_UNLOCK(pdp, 0, p); /* race to get the inode */
- if ((error = VFS_VGET(vdp->v_mount, dp->i_ino, &tdp)) != 0) {
- vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY, p);
- return (error);
- }
- if (lockparent && (flags & ISLASTCN) &&
- (error = vn_lock(pdp, LK_EXCLUSIVE, p))) {
- vput(tdp);
- return (error);
- }
- *vpp = tdp;
- } else if (dp->i_number == dp->i_ino) {
- VREF(vdp); /* we want ourself, ie "." */
- *vpp = vdp;
- } else {
- if ((error = VFS_VGET(vdp->v_mount, dp->i_ino, &tdp)) != 0)
- return (error);
- if (!lockparent || !(flags & ISLASTCN))
- VOP_UNLOCK(pdp, 0, p);
- *vpp = tdp;
- }
-
- /*
- * Insert name into cache if appropriate.
- */
- if (cnp->cn_flags & MAKEENTRY)
- cache_enter(vdp, *vpp, cnp);
- return (0);
-}
-
-/*
- * Do consistency checking on a directory entry:
- * record length must be multiple of 4
- * entry must fit in rest of its DIRBLKSIZ block
- * record must be large enough to contain entry
- * name is not longer than MAXNAMLEN
- * name must be as long as advertised, and null terminated
- */
-/*
- * changed so that it confirms to ext2_check_dir_entry
- */
-static int
-ext2_dirbadentry(dp, de, entryoffsetinblock)
- struct vnode *dp;
- register struct ext2_dir_entry_2 *de;
- int entryoffsetinblock;
-{
- int DIRBLKSIZ = VTOI(dp)->i_e2fs->s_blocksize;
-
- char * error_msg = NULL;
-
- if (de->rec_len < EXT2_DIR_REC_LEN(1))
- error_msg = "rec_len is smaller than minimal";
- else if (de->rec_len % 4 != 0)
- error_msg = "rec_len % 4 != 0";
- else if (de->rec_len < EXT2_DIR_REC_LEN(de->name_len))
- error_msg = "reclen is too small for name_len";
- else if (entryoffsetinblock + de->rec_len > DIRBLKSIZ)
- error_msg = "directory entry across blocks";
- /* else LATER
- if (de->inode > dir->i_sb->u.ext2_sb.s_es->s_inodes_count)
- error_msg = "inode out of bounds";
- */
-
- if (error_msg != NULL) {
- printf("bad directory entry: %s\n", error_msg);
- printf("offset=%d, inode=%lu, rec_len=%u, name_len=%u\n",
- entryoffsetinblock, (unsigned long)de->inode,
- de->rec_len, de->name_len);
- }
- return error_msg == NULL ? 0 : 1;
-}
-
-/*
- * Write a directory entry after a call to namei, using the parameters
- * that it left in nameidata. The argument ip is the inode which the new
- * directory entry will refer to. Dvp is a pointer to the directory to
- * be written, which was left locked by namei. Remaining parameters
- * (dp->i_offset, dp->i_count) indicate how the space for the new
- * entry is to be obtained.
- */
-int
-ext2_direnter(ip, dvp, cnp)
- struct inode *ip;
- struct vnode *dvp;
- register struct componentname *cnp;
-{
- register struct ext2_dir_entry_2 *ep, *nep;
- register struct inode *dp;
- struct buf *bp;
- struct ext2_dir_entry_2 newdir;
- struct iovec aiov;
- struct uio auio;
- u_int dsize;
- int error, loc, newentrysize, spacefree;
- char *dirbuf;
- int DIRBLKSIZ = ip->i_e2fs->s_blocksize;
-
-
-#if DIAGNOSTIC
- if ((cnp->cn_flags & SAVENAME) == 0)
- panic("direnter: missing name");
-#endif
- dp = VTOI(dvp);
- newdir.inode = ip->i_number;
- newdir.name_len = cnp->cn_namelen;
- if (EXT2_HAS_INCOMPAT_FEATURE(ip->i_e2fs->s_es,
- EXT2_FEATURE_INCOMPAT_FILETYPE))
- newdir.file_type = DTTOFT(IFTODT(ip->i_mode));
- else
- newdir.file_type = EXT2_FT_UNKNOWN;
- bcopy(cnp->cn_nameptr, newdir.name, (unsigned)cnp->cn_namelen + 1);
- newentrysize = EXT2_DIR_REC_LEN(newdir.name_len);
- if (dp->i_count == 0) {
- /*
- * If dp->i_count is 0, then namei could find no
- * space in the directory. Here, dp->i_offset will
- * be on a directory block boundary and we will write the
- * new entry into a fresh block.
- */
- if (dp->i_offset & (DIRBLKSIZ - 1))
- panic("ext2_direnter: newblk");
- auio.uio_offset = dp->i_offset;
- newdir.rec_len = DIRBLKSIZ;
- auio.uio_resid = newentrysize;
- aiov.iov_len = newentrysize;
- aiov.iov_base = (caddr_t)&newdir;
- auio.uio_iov = &aiov;
- auio.uio_iovcnt = 1;
- auio.uio_rw = UIO_WRITE;
- auio.uio_segflg = UIO_SYSSPACE;
- auio.uio_procp = (struct proc *)0;
- error = VOP_WRITE(dvp, &auio, IO_SYNC, cnp->cn_cred);
- if (DIRBLKSIZ >
- VFSTOUFS(dvp->v_mount)->um_mountp->mnt_stat.f_bsize)
- /* XXX should grow with balloc() */
- panic("ext2_direnter: frag size");
- else if (!error) {
- dp->i_size = roundup(dp->i_size, DIRBLKSIZ);
- dp->i_flag |= IN_CHANGE;
- }
- return (error);
- }
-
- /*
- * If dp->i_count is non-zero, then namei found space
- * for the new entry in the range dp->i_offset to
- * dp->i_offset + dp->i_count in the directory.
- * To use this space, we may have to compact the entries located
- * there, by copying them together towards the beginning of the
- * block, leaving the free space in one usable chunk at the end.
- */
-
- /*
- * Increase size of directory if entry eats into new space.
- * This should never push the size past a new multiple of
- * DIRBLKSIZE.
- *
- * N.B. - THIS IS AN ARTIFACT OF 4.2 AND SHOULD NEVER HAPPEN.
- */
- if (dp->i_offset + dp->i_count > dp->i_size)
- dp->i_size = dp->i_offset + dp->i_count;
- /*
- * Get the block containing the space for the new directory entry.
- */
- if ((error = UFS_BLKATOFF(dvp, (off_t)dp->i_offset, &dirbuf, &bp)) != 0)
- return (error);
- /*
- * Find space for the new entry. In the simple case, the entry at
- * offset base will have the space. If it does not, then namei
- * arranged that compacting the region dp->i_offset to
- * dp->i_offset + dp->i_count would yield the
- * space.
- */
- ep = (struct ext2_dir_entry_2 *)dirbuf;
- dsize = EXT2_DIR_REC_LEN(ep->name_len);
- spacefree = ep->rec_len - dsize;
- for (loc = ep->rec_len; loc < dp->i_count; ) {
- nep = (struct ext2_dir_entry_2 *)(dirbuf + loc);
- if (ep->inode) {
- /* trim the existing slot */
- ep->rec_len = dsize;
- ep = (struct ext2_dir_entry_2 *)((char *)ep + dsize);
- } else {
- /* overwrite; nothing there; header is ours */
- spacefree += dsize;
- }
- dsize = EXT2_DIR_REC_LEN(nep->name_len);
- spacefree += nep->rec_len - dsize;
- loc += nep->rec_len;
- bcopy((caddr_t)nep, (caddr_t)ep, dsize);
- }
- /*
- * Update the pointer fields in the previous entry (if any),
- * copy in the new entry, and write out the block.
- */
- if (ep->inode == 0) {
- if (spacefree + dsize < newentrysize)
- panic("ext2_direnter: compact1");
- newdir.rec_len = spacefree + dsize;
- } else {
- if (spacefree < newentrysize)
- panic("ext2_direnter: compact2");
- newdir.rec_len = spacefree;
- ep->rec_len = dsize;
- ep = (struct ext2_dir_entry_2 *)((char *)ep + dsize);
- }
- bcopy((caddr_t)&newdir, (caddr_t)ep, (u_int)newentrysize);
- error = BUF_WRITE(bp);
- dp->i_flag |= IN_CHANGE | IN_UPDATE;
- if (!error && dp->i_endoff && dp->i_endoff < dp->i_size)
- error = UFS_TRUNCATE(dvp, (off_t)dp->i_endoff, IO_SYNC,
- cnp->cn_cred, cnp->cn_proc);
- return (error);
-}
-
-/*
- * Remove a directory entry after a call to namei, using
- * the parameters which it left in nameidata. The entry
- * dp->i_offset contains the offset into the directory of the
- * entry to be eliminated. The dp->i_count field contains the
- * size of the previous record in the directory. If this
- * is 0, the first entry is being deleted, so we need only
- * zero the inode number to mark the entry as free. If the
- * entry is not the first in the directory, we must reclaim
- * the space of the now empty record by adding the record size
- * to the size of the previous entry.
- */
-int
-ext2_dirremove(dvp, cnp)
- struct vnode *dvp;
- struct componentname *cnp;
-{
- register struct inode *dp;
- struct ext2_dir_entry_2 *ep;
- struct buf *bp;
- int error;
-
- dp = VTOI(dvp);
- if (dp->i_count == 0) {
- /*
- * First entry in block: set d_ino to zero.
- */
- if ((error =
- UFS_BLKATOFF(dvp, (off_t)dp->i_offset, (char **)&ep, &bp)) != 0)
- return (error);
- ep->inode = 0;
- error = BUF_WRITE(bp);
- dp->i_flag |= IN_CHANGE | IN_UPDATE;
- return (error);
- }
- /*
- * Collapse new free space into previous entry.
- */
- if ((error = UFS_BLKATOFF(dvp, (off_t)(dp->i_offset - dp->i_count),
- (char **)&ep, &bp)) != 0)
- return (error);
- ep->rec_len += dp->i_reclen;
- error = BUF_WRITE(bp);
- dp->i_flag |= IN_CHANGE | IN_UPDATE;
- return (error);
-}
-
-/*
- * Rewrite an existing directory entry to point at the inode
- * supplied. The parameters describing the directory entry are
- * set up by a call to namei.
- */
-int
-ext2_dirrewrite(dp, ip, cnp)
- struct inode *dp, *ip;
- struct componentname *cnp;
-{
- struct buf *bp;
- struct ext2_dir_entry_2 *ep;
- struct vnode *vdp = ITOV(dp);
- int error;
-
- if ((error = UFS_BLKATOFF(vdp, (off_t)dp->i_offset, (char **)&ep, &bp)) != 0)
- return (error);
- ep->inode = ip->i_number;
- if (EXT2_HAS_INCOMPAT_FEATURE(ip->i_e2fs->s_es,
- EXT2_FEATURE_INCOMPAT_FILETYPE))
- ep->file_type = DTTOFT(IFTODT(ip->i_mode));
- else
- ep->file_type = EXT2_FT_UNKNOWN;
- error = BUF_WRITE(bp);
- dp->i_flag |= IN_CHANGE | IN_UPDATE;
- return (error);
-}
-
-/*
- * Check if a directory is empty or not.
- * Inode supplied must be locked.
- *
- * Using a struct dirtemplate here is not precisely
- * what we want, but better than using a struct direct.
- *
- * NB: does not handle corrupted directories.
- */
-int
-ext2_dirempty(ip, parentino, cred)
- register struct inode *ip;
- ino_t parentino;
- struct ucred *cred;
-{
- register off_t off;
- struct dirtemplate dbuf;
- register struct ext2_dir_entry_2 *dp = (struct ext2_dir_entry_2 *)&dbuf;
- int error, count, namlen;
-
-#define MINDIRSIZ (sizeof (struct dirtemplate) / 2)
-
- for (off = 0; off < ip->i_size; off += dp->rec_len) {
- error = vn_rdwr(UIO_READ, ITOV(ip), (caddr_t)dp, MINDIRSIZ, off,
- UIO_SYSSPACE, IO_NODELOCKED, cred, &count, (struct proc *)0);
- /*
- * Since we read MINDIRSIZ, residual must
- * be 0 unless we're at end of file.
- */
- if (error || count != 0)
- return (0);
- /* avoid infinite loops */
- if (dp->rec_len == 0)
- return (0);
- /* skip empty entries */
- if (dp->inode == 0)
- continue;
- /* accept only "." and ".." */
- namlen = dp->name_len;
- if (namlen > 2)
- return (0);
- if (dp->name[0] != '.')
- return (0);
- /*
- * At this point namlen must be 1 or 2.
- * 1 implies ".", 2 implies ".." if second
- * char is also "."
- */
- if (namlen == 1)
- continue;
- if (dp->name[1] == '.' && dp->inode == parentino)
- continue;
- return (0);
- }
- return (1);
-}
-
-/*
- * Check if source directory is in the path of the target directory.
- * Target is supplied locked, source is unlocked.
- * The target is always vput before returning.
- */
-int
-ext2_checkpath(source, target, cred)
- struct inode *source, *target;
- struct ucred *cred;
-{
- struct vnode *vp;
- int error, rootino, namlen;
- struct dirtemplate dirbuf;
-
- vp = ITOV(target);
- if (target->i_number == source->i_number) {
- error = EEXIST;
- goto out;
- }
- rootino = ROOTINO;
- error = 0;
- if (target->i_number == rootino)
- goto out;
-
- for (;;) {
- if (vp->v_type != VDIR) {
- error = ENOTDIR;
- break;
- }
- error = vn_rdwr(UIO_READ, vp, (caddr_t)&dirbuf,
- sizeof (struct dirtemplate), (off_t)0, UIO_SYSSPACE,
- IO_NODELOCKED, cred, (int *)0, (struct proc *)0);
- if (error != 0)
- break;
- namlen = dirbuf.dotdot_type; /* like ufs little-endian */
- if (namlen != 2 ||
- dirbuf.dotdot_name[0] != '.' ||
- dirbuf.dotdot_name[1] != '.') {
- error = ENOTDIR;
- break;
- }
- if (dirbuf.dotdot_ino == source->i_number) {
- error = EINVAL;
- break;
- }
- if (dirbuf.dotdot_ino == rootino)
- break;
- vput(vp);
- if ((error = VFS_VGET(vp->v_mount, dirbuf.dotdot_ino, &vp)) != 0) {
- vp = NULL;
- break;
- }
- }
-
-out:
- if (error == ENOTDIR)
- printf("checkpath: .. not a directory\n");
- if (vp != NULL)
- vput(vp);
- return (error);
-}
-
diff --git a/sys/gnu/fs/ext2fs/ext2_mount.h b/sys/gnu/fs/ext2fs/ext2_mount.h
deleted file mode 100644
index 0652545..0000000
--- a/sys/gnu/fs/ext2fs/ext2_mount.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1989, 1993
- * The Regents of the University of California. 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 product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ufsmount.h 8.6 (Berkeley) 3/30/95
- * $FreeBSD$
- */
-
-#ifndef _UFS_UFS_UFSMOUNT_H_
-#define _UFS_UFS_UFSMOUNT_H_
-
-/*
- * Arguments to mount UFS-based filesystems
- */
-struct ufs_args {
- char *fspec; /* block special device to mount */
- struct export_args export; /* network export information */
-};
-
-/*
- * Arguments to mount MFS
- */
-struct mfs_args {
- char *fspec; /* name to export for statfs */
- struct export_args export; /* if exported MFSes are supported */
- caddr_t base; /* base of file system in memory */
- u_long size; /* size of file system */
-};
-
-#ifdef _KERNEL
-
-#ifdef MALLOC_DECLARE
-MALLOC_DECLARE(M_UFSMNT);
-#endif
-
-struct buf;
-struct inode;
-struct nameidata;
-struct timeval;
-struct ucred;
-struct uio;
-struct vnode;
-struct netexport;
-
-/* This structure describes the UFS specific mount structure data. */
-struct ufsmount {
- struct mount *um_mountp; /* filesystem vfs structure */
- dev_t um_dev; /* device mounted */
- struct vnode *um_devvp; /* block device mounted vnode */
-
- union { /* pointer to superblock */
- struct fs *fs; /* FFS */
- struct ext2_sb_info *e2fs; /* EXT2FS */
- } ufsmount_u;
-#define um_fs ufsmount_u.fs
-#define um_e2fs ufsmount_u.e2fs
-#define um_e2fsb ufsmount_u.e2fs->s_es
-
- struct vnode *um_quotas[MAXQUOTAS]; /* pointer to quota files */
- struct ucred *um_cred[MAXQUOTAS]; /* quota file access cred */
- u_long um_nindir; /* indirect ptrs per block */
- u_long um_bptrtodb; /* indir ptr to disk block */
- u_long um_seqinc; /* inc between seq blocks */
- time_t um_btime[MAXQUOTAS]; /* block quota time limit */
- time_t um_itime[MAXQUOTAS]; /* inode quota time limit */
- char um_qflags[MAXQUOTAS]; /* quota specific flags */
- struct netexport um_export; /* export information */
- int64_t um_savedmaxfilesize; /* XXX - limit maxfilesize */
- struct malloc_type *um_malloctype; /* The inodes malloctype */
- int um_i_effnlink_valid; /* i_effnlink valid? */
- int (*um_blkatoff) __P((struct vnode *, off_t, char **, struct buf **));
- int (*um_truncate) __P((struct vnode *, off_t, int, struct ucred *, struct proc *));
- int (*um_update) __P((struct vnode *, int));
- int (*um_valloc) __P((struct vnode *, int, struct ucred *, struct vnode **));
- int (*um_vfree) __P((struct vnode *, ino_t, int));
-};
-
-#define UFS_BLKATOFF(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_blkatoff(aa, bb, cc, dd)
-#define UFS_TRUNCATE(aa, bb, cc, dd, ee) VFSTOUFS((aa)->v_mount)->um_truncate(aa, bb, cc, dd, ee)
-#define UFS_UPDATE(aa, bb) VFSTOUFS((aa)->v_mount)->um_update(aa, bb)
-#define UFS_VALLOC(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_valloc(aa, bb, cc, dd)
-#define UFS_VFREE(aa, bb, cc) VFSTOUFS((aa)->v_mount)->um_vfree(aa, bb, cc)
-
-/*
- * Flags describing the state of quotas.
- */
-#define QTF_OPENING 0x01 /* Q_QUOTAON in progress */
-#define QTF_CLOSING 0x02 /* Q_QUOTAOFF in progress */
-
-/* Convert mount ptr to ufsmount ptr. */
-#define VFSTOUFS(mp) ((struct ufsmount *)((mp)->mnt_data))
-
-/*
- * Macros to access file system parameters in the ufsmount structure.
- * Used by ufs_bmap.
- */
-#define MNINDIR(ump) ((ump)->um_nindir)
-#define blkptrtodb(ump, b) ((b) << (ump)->um_bptrtodb)
-#define is_sequential(ump, a, b) ((b) == (a) + ump->um_seqinc)
-#endif /* _KERNEL */
-
-#endif
diff --git a/sys/gnu/fs/ext2fs/ext2_readwrite.c b/sys/gnu/fs/ext2fs/ext2_readwrite.c
deleted file mode 100644
index f054a6e..0000000
--- a/sys/gnu/fs/ext2fs/ext2_readwrite.c
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
- * modified for Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- */
-/*
- * Copyright (c) 1993
- * The Regents of the University of California. 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 product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ufs_readwrite.c 8.7 (Berkeley) 1/21/94
- * $FreeBSD$
- */
-
-#define BLKSIZE(a, b, c) blksize(a, b, c)
-#define FS struct ext2_sb_info
-#define I_FS i_e2fs
-#define READ ext2_read
-#define READ_S "ext2_read"
-#define WRITE ext2_write
-#define WRITE_S "ext2_write"
-
-/*
- * Vnode op for reading.
- */
-/* ARGSUSED */
-static int
-READ(ap)
- struct vop_read_args /* {
- struct vnode *a_vp;
- struct uio *a_uio;
- int a_ioflag;
- struct ucred *a_cred;
- } */ *ap;
-{
- register struct vnode *vp;
- register struct inode *ip;
- register struct uio *uio;
- register FS *fs;
- struct buf *bp;
- daddr_t lbn, nextlbn;
- off_t bytesinfile;
- long size, xfersize, blkoffset;
- int error, orig_resid;
- int seqcount = ap->a_ioflag >> 16;
- u_short mode;
-
- vp = ap->a_vp;
- ip = VTOI(vp);
- mode = ip->i_mode;
- uio = ap->a_uio;
-
-#ifdef DIAGNOSTIC
- if (uio->uio_rw != UIO_READ)
- panic("%s: mode", READ_S);
-
- if (vp->v_type == VLNK) {
- if ((int)ip->i_size < vp->v_mount->mnt_maxsymlinklen)
- panic("%s: short symlink", READ_S);
- } else if (vp->v_type != VREG && vp->v_type != VDIR)
- panic("%s: type %d", READ_S, vp->v_type);
-#endif
- fs = ip->I_FS;
-#if 0
- if ((u_quad_t)uio->uio_offset > fs->fs_maxfilesize)
- return (EFBIG);
-#endif
-
- orig_resid = uio->uio_resid;
- for (error = 0, bp = NULL; uio->uio_resid > 0; bp = NULL) {
- if ((bytesinfile = ip->i_size - uio->uio_offset) <= 0)
- break;
- lbn = lblkno(fs, uio->uio_offset);
- nextlbn = lbn + 1;
- size = BLKSIZE(fs, ip, lbn);
- blkoffset = blkoff(fs, uio->uio_offset);
-
- xfersize = fs->s_frag_size - blkoffset;
- if (uio->uio_resid < xfersize)
- xfersize = uio->uio_resid;
- if (bytesinfile < xfersize)
- xfersize = bytesinfile;
-
- if (lblktosize(fs, nextlbn) >= ip->i_size)
- error = bread(vp, lbn, size, NOCRED, &bp);
- else if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERR) == 0)
- error = cluster_read(vp,
- ip->i_size, lbn, size, NOCRED,
- uio->uio_resid, (ap->a_ioflag >> 16), &bp);
- else if (seqcount > 1) {
- int nextsize = BLKSIZE(fs, ip, nextlbn);
- error = breadn(vp, lbn,
- size, &nextlbn, &nextsize, 1, NOCRED, &bp);
- } else
- error = bread(vp, lbn, size, NOCRED, &bp);
- if (error) {
- brelse(bp);
- bp = NULL;
- break;
- }
-
- /*
- * We should only get non-zero b_resid when an I/O error
- * has occurred, which should cause us to break above.
- * However, if the short read did not cause an error,
- * then we want to ensure that we do not uiomove bad
- * or uninitialized data.
- */
- size -= bp->b_resid;
- if (size < xfersize) {
- if (size == 0)
- break;
- xfersize = size;
- }
- error =
- uiomove((char *)bp->b_data + blkoffset, (int)xfersize, uio);
- if (error)
- break;
-
- bqrelse(bp);
- }
- if (bp != NULL)
- bqrelse(bp);
- if (orig_resid > 0 && (error == 0 || uio->uio_resid != orig_resid) &&
- (vp->v_mount->mnt_flag & MNT_NOATIME) == 0)
- ip->i_flag |= IN_ACCESS;
- return (error);
-}
-
-/*
- * Vnode op for writing.
- */
-static int
-WRITE(ap)
- struct vop_write_args /* {
- struct vnode *a_vp;
- struct uio *a_uio;
- int a_ioflag;
- struct ucred *a_cred;
- } */ *ap;
-{
- register struct vnode *vp;
- register struct uio *uio;
- register struct inode *ip;
- register FS *fs;
- struct buf *bp;
- struct proc *p;
- daddr_t lbn;
- off_t osize;
- int seqcount;
- int blkoffset, error, flags, ioflag, resid, size, xfersize;
-
- ioflag = ap->a_ioflag;
- seqcount = ap->a_ioflag >> 16;
- uio = ap->a_uio;
- vp = ap->a_vp;
- ip = VTOI(vp);
-
-#ifdef DIAGNOSTIC
- if (uio->uio_rw != UIO_WRITE)
- panic("%s: mode", WRITE_S);
-#endif
-
- switch (vp->v_type) {
- case VREG:
- if (ioflag & IO_APPEND)
- uio->uio_offset = ip->i_size;
- if ((ip->i_flags & APPEND) && uio->uio_offset != ip->i_size)
- return (EPERM);
- /* FALLTHROUGH */
- case VLNK:
- break;
- case VDIR:
- if ((ioflag & IO_SYNC) == 0)
- panic("%s: nonsync dir write", WRITE_S);
- break;
- default:
- panic("%s: type", WRITE_S);
- }
-
- fs = ip->I_FS;
-#if 0
- if (uio->uio_offset < 0 ||
- (u_quad_t)uio->uio_offset + uio->uio_resid > fs->fs_maxfilesize)
- return (EFBIG);
-#endif
- /*
- * Maybe this should be above the vnode op call, but so long as
- * file servers have no limits, I don't think it matters.
- */
- p = uio->uio_procp;
- if (vp->v_type == VREG && p &&
- uio->uio_offset + uio->uio_resid >
- p->p_rlimit[RLIMIT_FSIZE].rlim_cur) {
- psignal(p, SIGXFSZ);
- return (EFBIG);
- }
-
- resid = uio->uio_resid;
- osize = ip->i_size;
- flags = ioflag & IO_SYNC ? B_SYNC : 0;
-
- for (error = 0; uio->uio_resid > 0;) {
- lbn = lblkno(fs, uio->uio_offset);
- blkoffset = blkoff(fs, uio->uio_offset);
- xfersize = fs->s_frag_size - blkoffset;
- if (uio->uio_resid < xfersize)
- xfersize = uio->uio_resid;
-
- if (uio->uio_offset + xfersize > ip->i_size)
- vnode_pager_setsize(vp, uio->uio_offset + xfersize);
-
- if (fs->s_frag_size > xfersize)
- flags |= B_CLRBUF;
- else
- flags &= ~B_CLRBUF;
-
- error = ext2_balloc(ip,
- lbn, blkoffset + xfersize, ap->a_cred, &bp, flags);
- if (error)
- break;
-
- if (uio->uio_offset + xfersize > ip->i_size) {
- ip->i_size = uio->uio_offset + xfersize;
- }
-
- size = BLKSIZE(fs, ip, lbn) - bp->b_resid;
- if (size < xfersize)
- xfersize = size;
-
- error =
- uiomove((char *)bp->b_data + blkoffset, (int)xfersize, uio);
- if ((ioflag & IO_VMIO) &&
- (LIST_FIRST(&bp->b_dep) == NULL)) /* in ext2fs? */
- bp->b_flags |= B_RELBUF;
-
- if (ioflag & IO_SYNC) {
- (void)bwrite(bp);
- } else if (xfersize + blkoffset == fs->s_frag_size) {
- if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERW) == 0) {
- bp->b_flags |= B_CLUSTEROK;
- cluster_write(bp, ip->i_size, seqcount);
- } else {
- bawrite(bp);
- }
- } else {
- bp->b_flags |= B_CLUSTEROK;
- bdwrite(bp);
- }
- if (error || xfersize == 0)
- break;
- ip->i_flag |= IN_CHANGE | IN_UPDATE;
- }
- /*
- * If we successfully wrote any data, and we are not the superuser
- * we clear the setuid and setgid bits as a precaution against
- * tampering.
- */
- if (resid > uio->uio_resid && ap->a_cred && ap->a_cred->cr_uid != 0)
- ip->i_mode &= ~(ISUID | ISGID);
- if (error) {
- if (ioflag & IO_UNIT) {
- (void)UFS_TRUNCATE(vp, osize,
- ioflag & IO_SYNC, ap->a_cred, uio->uio_procp);
- uio->uio_offset -= resid - uio->uio_resid;
- uio->uio_resid = resid;
- }
- } else if (resid > uio->uio_resid && (ioflag & IO_SYNC))
- error = UFS_UPDATE(vp, 1);
- return (error);
-}
diff --git a/sys/gnu/fs/ext2fs/ext2_subr.c b/sys/gnu/fs/ext2fs/ext2_subr.c
deleted file mode 100644
index 8ceac74..0000000
--- a/sys/gnu/fs/ext2fs/ext2_subr.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * modified for Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- */
-/*
- * Copyright (c) 1982, 1986, 1989, 1993
- * The Regents of the University of California. 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 product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ext2_subr.c 8.2 (Berkeley) 9/21/93
- */
-
-#include <sys/param.h>
-#include <gnu/ext2fs/ext2_fs_sb.h>
-#include <gnu/ext2fs/fs.h>
-
-#include <sys/lock.h>
-#include <sys/systm.h>
-#include <sys/ucred.h>
-#include <sys/vnode.h>
-#include <gnu/ext2fs/ext2_extern.h>
-#include <sys/buf.h>
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/inode.h>
-
-#include "opt_ddb.h"
-
-#ifdef DDB
-void ext2_checkoverlap __P((struct buf *, struct inode *));
-#endif
-
-/*
- * Return buffer with the contents of block "offset" from the beginning of
- * directory "ip". If "res" is non-zero, fill it in with a pointer to the
- * remaining space in the directory.
- */
-int
-ext2_blkatoff(vp, offset, res, bpp)
- struct vnode *vp;
- off_t offset;
- char **res;
- struct buf **bpp;
-{
- struct inode *ip;
- register struct ext2_sb_info *fs;
- struct buf *bp;
- daddr_t lbn;
- int bsize, error;
-
- ip = VTOI(vp);
- fs = ip->i_e2fs;
- lbn = lblkno(fs, offset);
- bsize = blksize(fs, ip, lbn);
-
- *bpp = NULL;
- if ((error = bread(vp, lbn, bsize, NOCRED, &bp)) != 0) {
- brelse(bp);
- return (error);
- }
- if (res)
- *res = (char *)bp->b_data + blkoff(fs, offset);
- *bpp = bp;
- return (0);
-}
-
-#ifdef DDB
-void
-ext2_checkoverlap(bp, ip)
- struct buf *bp;
- struct inode *ip;
-{
- register struct buf *ebp, *ep;
- register daddr_t start, last;
- struct vnode *vp;
-
- ebp = &buf[nbuf];
- start = bp->b_blkno;
- last = start + btodb(bp->b_bcount) - 1;
- for (ep = buf; ep < ebp; ep++) {
- if (ep == bp || (ep->b_flags & B_INVAL) ||
- ep->b_vp == NULLVP)
- continue;
- if (VOP_BMAP(ep->b_vp, (daddr_t)0, &vp, (daddr_t)0, NULL, NULL))
- continue;
- if (vp != ip->i_devvp)
- continue;
- /* look for overlap */
- if (ep->b_bcount == 0 || ep->b_blkno > last ||
- ep->b_blkno + btodb(ep->b_bcount) <= start)
- continue;
- vprint("Disk overlap", vp);
- (void)printf("\tstart %d, end %d overlap start %d, end %d\n",
- start, last, ep->b_blkno,
- ep->b_blkno + btodb(ep->b_bcount) - 1);
- panic("Disk buffer overlap");
- }
-}
-#endif /* DDB */
diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c
deleted file mode 100644
index a56a443..0000000
--- a/sys/gnu/fs/ext2fs/ext2_vfsops.c
+++ /dev/null
@@ -1,1197 +0,0 @@
-/*
- * modified for EXT2FS support in Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- */
-/*
- * Copyright (c) 1989, 1991, 1993, 1994
- * The Regents of the University of California. 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 product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ffs_vfsops.c 8.8 (Berkeley) 4/18/94
- * $FreeBSD$
- */
-
-#include "opt_quota.h"
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/namei.h>
-#include <sys/proc.h>
-#include <sys/kernel.h>
-#include <sys/vnode.h>
-#include <sys/mount.h>
-#include <sys/buf.h>
-#include <sys/conf.h>
-#include <sys/fcntl.h>
-#include <sys/disklabel.h>
-#include <sys/malloc.h>
-#include <sys/stat.h>
-
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/ufsmount.h>
-#include <ufs/ufs/inode.h>
-#include <ufs/ufs/ufs_extern.h>
-
-#include <vm/vm_zone.h>
-
-#include <gnu/ext2fs/fs.h>
-#include <gnu/ext2fs/ext2_extern.h>
-#include <gnu/ext2fs/ext2_fs.h>
-#include <gnu/ext2fs/ext2_fs_sb.h>
-
-static int ext2_fhtovp __P((struct mount *, struct fid *, struct vnode **));
-static int ext2_flushfiles __P((struct mount *mp, int flags, struct proc *p));
-static int ext2_mount __P((struct mount *,
- char *, caddr_t, struct nameidata *, struct proc *));
-static int ext2_mountfs __P((struct vnode *, struct mount *, struct proc *));
-static int ext2_reload __P((struct mount *mountp, struct ucred *cred,
- struct proc *p));
-static int ext2_sbupdate __P((struct ufsmount *, int));
-static int ext2_statfs __P((struct mount *, struct statfs *, struct proc *));
-static int ext2_sync __P((struct mount *, int, struct ucred *, struct proc *));
-static int ext2_unmount __P((struct mount *, int, struct proc *));
-static int ext2_vget __P((struct mount *, ino_t, struct vnode **));
-static int ext2_vptofh __P((struct vnode *, struct fid *));
-
-static MALLOC_DEFINE(M_EXT2NODE, "EXT2 node", "EXT2 vnode private part");
-
-static struct vfsops ext2fs_vfsops = {
- ext2_mount,
- ufs_start, /* empty function */
- ext2_unmount,
- ufs_root, /* root inode via vget */
- ufs_quotactl, /* does operations associated with quotas */
- ext2_statfs,
- ext2_sync,
- ext2_vget,
- ext2_fhtovp,
- ufs_check_export,
- ext2_vptofh,
- ext2_init,
- vfs_stduninit,
- vfs_stdextattrctl,
-};
-
-VFS_SET(ext2fs_vfsops, ext2fs, 0);
-#define bsd_malloc malloc
-#define bsd_free free
-
-static int ext2fs_inode_hash_lock;
-
-static int ext2_check_sb_compat __P((struct ext2_super_block *es,
- dev_t dev, int ronly));
-static int compute_sb_data __P((struct vnode * devvp,
- struct ext2_super_block * es,
- struct ext2_sb_info * fs));
-
-#ifdef notyet
-static int ext2_mountroot __P((void));
-
-/*
- * Called by main() when ext2fs is going to be mounted as root.
- *
- * Name is updated by mount(8) after booting.
- */
-#define ROOTNAME "root_device"
-
-static int
-ext2_mountroot()
-{
- register struct ext2_sb_info *fs;
- register struct mount *mp;
- struct proc *p = curproc;
- struct ufsmount *ump;
- u_int size;
- int error;
-
- if ((error = bdevvp(rootdev, &rootvp))) {
- printf("ext2_mountroot: can't find rootvp\n");
- return (error);
- }
- mp = bsd_malloc((u_long)sizeof(struct mount), M_MOUNT, M_WAITOK);
- bzero((char *)mp, (u_long)sizeof(struct mount));
- mp->mnt_op = &ext2fs_vfsops;
- mp->mnt_flag = MNT_RDONLY;
- if (error = ext2_mountfs(rootvp, mp, p)) {
- bsd_free(mp, M_MOUNT);
- return (error);
- }
- if (error = vfs_lock(mp)) {
- (void)ext2_unmount(mp, 0, p);
- bsd_free(mp, M_MOUNT);
- return (error);
- }
- TAILQ_INSERT_HEAD(&mountlist, mp, mnt_list);
- mp->mnt_flag |= MNT_ROOTFS;
- mp->mnt_vnodecovered = NULLVP;
- ump = VFSTOUFS(mp);
- fs = ump->um_e2fs;
- bzero(fs->fs_fsmnt, sizeof(fs->fs_fsmnt));
- fs->fs_fsmnt[0] = '/';
- bcopy((caddr_t)fs->fs_fsmnt, (caddr_t)mp->mnt_stat.f_mntonname,
- MNAMELEN);
- (void) copystr(ROOTNAME, mp->mnt_stat.f_mntfromname, MNAMELEN - 1,
- &size);
- bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size);
- (void)ext2_statfs(mp, &mp->mnt_stat, p);
- vfs_unlock(mp);
- inittodr(fs->s_es->s_wtime); /* this helps to set the time */
- return (0);
-}
-#endif
-
-/*
- * VFS Operations.
- *
- * mount system call
- */
-static int
-ext2_mount(mp, path, data, ndp, p)
- register struct mount *mp;
- char *path;
- caddr_t data; /* this is actually a (struct ufs_args *) */
- struct nameidata *ndp;
- struct proc *p;
-{
- struct vnode *devvp;
- struct ufs_args args;
- struct ufsmount *ump = 0;
- register struct ext2_sb_info *fs;
- u_int size;
- int error, flags;
- mode_t accessmode;
-
- if ((error = copyin(data, (caddr_t)&args, sizeof (struct ufs_args))) != 0)
- return (error);
- /*
- * If updating, check whether changing from read-only to
- * read/write; if there is no device name, that's all we do.
- */
- if (mp->mnt_flag & MNT_UPDATE) {
- ump = VFSTOUFS(mp);
- fs = ump->um_e2fs;
- error = 0;
- if (fs->s_rd_only == 0 && (mp->mnt_flag & MNT_RDONLY)) {
- flags = WRITECLOSE;
- if (mp->mnt_flag & MNT_FORCE)
- flags |= FORCECLOSE;
- if (vfs_busy(mp, LK_NOWAIT, 0, p))
- return (EBUSY);
- error = ext2_flushfiles(mp, flags, p);
- vfs_unbusy(mp, p);
- if (!error && fs->s_wasvalid) {
- fs->s_es->s_state |= EXT2_VALID_FS;
- ext2_sbupdate(ump, MNT_WAIT);
- }
- fs->s_rd_only = 1;
- }
- if (!error && (mp->mnt_flag & MNT_RELOAD))
- error = ext2_reload(mp, ndp->ni_cnd.cn_cred, p);
- if (error)
- return (error);
- devvp = ump->um_devvp;
- if (ext2_check_sb_compat(fs->s_es, devvp->v_rdev,
- (mp->mnt_kern_flag & MNTK_WANTRDWR) == 0) != 0)
- return (EPERM);
- if (fs->s_rd_only && (mp->mnt_kern_flag & MNTK_WANTRDWR)) {
- /*
- * If upgrade to read-write by non-root, then verify
- * that user has necessary permissions on the device.
- */
- if (p->p_ucred->cr_uid != 0) {
- vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
- if ((error = VOP_ACCESS(devvp, VREAD | VWRITE,
- p->p_ucred, p)) != 0) {
- VOP_UNLOCK(devvp, 0, p);
- return (error);
- }
- VOP_UNLOCK(devvp, 0, p);
- }
-
- if ((fs->s_es->s_state & EXT2_VALID_FS) == 0 ||
- (fs->s_es->s_state & EXT2_ERROR_FS)) {
- if (mp->mnt_flag & MNT_FORCE) {
- printf(
-"WARNING: %s was not properly dismounted\n",
- fs->fs_fsmnt);
- } else {
- printf(
-"WARNING: R/W mount of %s denied. Filesystem is not clean - run fsck\n",
- fs->fs_fsmnt);
- return (EPERM);
- }
- }
- fs->s_es->s_state &= ~EXT2_VALID_FS;
- ext2_sbupdate(ump, MNT_WAIT);
- fs->s_rd_only = 0;
- }
- if (args.fspec == 0) {
- /*
- * Process export requests.
- */
- return (vfs_export(mp, &ump->um_export, &args.export));
- }
- }
- /*
- * Not an update, or updating the name: look up the name
- * and verify that it refers to a sensible block device.
- */
- NDINIT(ndp, LOOKUP, FOLLOW, UIO_USERSPACE, args.fspec, p);
- if ((error = namei(ndp)) != 0)
- return (error);
- NDFREE(ndp, NDF_ONLY_PNBUF);
- devvp = ndp->ni_vp;
-
- if (!vn_isdisk(devvp, &error)) {
- vrele(devvp);
- return (error);
- }
-
- /*
- * If mount by non-root, then verify that user has necessary
- * permissions on the device.
- */
- if (p->p_ucred->cr_uid != 0) {
- accessmode = VREAD;
- if ((mp->mnt_flag & MNT_RDONLY) == 0)
- accessmode |= VWRITE;
- vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
- if ((error = VOP_ACCESS(devvp, accessmode, p->p_ucred, p)) != 0) {
- vput(devvp);
- return (error);
- }
- VOP_UNLOCK(devvp, 0, p);
- }
-
- if ((mp->mnt_flag & MNT_UPDATE) == 0) {
- error = ext2_mountfs(devvp, mp, p);
- } else {
- if (devvp != ump->um_devvp)
- error = EINVAL; /* needs translation */
- else
- vrele(devvp);
- }
- if (error) {
- vrele(devvp);
- return (error);
- }
- ump = VFSTOUFS(mp);
- fs = ump->um_e2fs;
- (void) copyinstr(path, fs->fs_fsmnt, sizeof(fs->fs_fsmnt) - 1, &size);
- bzero(fs->fs_fsmnt + size, sizeof(fs->fs_fsmnt) - size);
- bcopy((caddr_t)fs->fs_fsmnt, (caddr_t)mp->mnt_stat.f_mntonname,
- MNAMELEN);
- (void) copyinstr(args.fspec, mp->mnt_stat.f_mntfromname, MNAMELEN - 1,
- &size);
- bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size);
- (void)ext2_statfs(mp, &mp->mnt_stat, p);
- return (0);
-}
-
-/*
- * checks that the data in the descriptor blocks make sense
- * this is taken from ext2/super.c
- */
-static int ext2_check_descriptors (struct ext2_sb_info * sb)
-{
- int i;
- int desc_block = 0;
- unsigned long block = sb->s_es->s_first_data_block;
- struct ext2_group_desc * gdp = NULL;
-
- /* ext2_debug ("Checking group descriptors"); */
-
- for (i = 0; i < sb->s_groups_count; i++)
- {
- /* examine next descriptor block */
- if ((i % EXT2_DESC_PER_BLOCK(sb)) == 0)
- gdp = (struct ext2_group_desc *)
- sb->s_group_desc[desc_block++]->b_data;
- if (gdp->bg_block_bitmap < block ||
- gdp->bg_block_bitmap >= block + EXT2_BLOCKS_PER_GROUP(sb))
- {
- printf ("ext2_check_descriptors: "
- "Block bitmap for group %d"
- " not in group (block %lu)!\n",
- i, (unsigned long) gdp->bg_block_bitmap);
- return 0;
- }
- if (gdp->bg_inode_bitmap < block ||
- gdp->bg_inode_bitmap >= block + EXT2_BLOCKS_PER_GROUP(sb))
- {
- printf ("ext2_check_descriptors: "
- "Inode bitmap for group %d"
- " not in group (block %lu)!\n",
- i, (unsigned long) gdp->bg_inode_bitmap);
- return 0;
- }
- if (gdp->bg_inode_table < block ||
- gdp->bg_inode_table + sb->s_itb_per_group >=
- block + EXT2_BLOCKS_PER_GROUP(sb))
- {
- printf ("ext2_check_descriptors: "
- "Inode table for group %d"
- " not in group (block %lu)!\n",
- i, (unsigned long) gdp->bg_inode_table);
- return 0;
- }
- block += EXT2_BLOCKS_PER_GROUP(sb);
- gdp++;
- }
- return 1;
-}
-
-static int
-ext2_check_sb_compat(es, dev, ronly)
- struct ext2_super_block *es;
- dev_t dev;
- int ronly;
-{
-
- if (es->s_magic != EXT2_SUPER_MAGIC) {
- printf("ext2fs: %s: wrong magic number %#x (expected %#x)\n",
- devtoname(dev), es->s_magic, EXT2_SUPER_MAGIC);
- return (1);
- }
- if (es->s_rev_level > EXT2_GOOD_OLD_REV) {
- if (es->s_feature_incompat & ~EXT2_FEATURE_INCOMPAT_SUPP) {
- printf(
-"WARNING: mount of %s denied due to unsupported optional features\n",
- devtoname(dev));
- return (1);
- }
- if (!ronly &&
- (es->s_feature_ro_compat & ~EXT2_FEATURE_RO_COMPAT_SUPP)) {
- printf(
-"WARNING: R/W mount of %s denied due to unsupported optional features\n",
- devtoname(dev));
- return (1);
- }
- }
- return (0);
-}
-
-/*
- * this computes the fields of the ext2_sb_info structure from the
- * data in the ext2_super_block structure read in
- */
-static int compute_sb_data(devvp, es, fs)
- struct vnode * devvp;
- struct ext2_super_block * es;
- struct ext2_sb_info * fs;
-{
- int db_count, error;
- int i, j;
- int logic_sb_block = 1; /* XXX for now */
-
-#if 1
-#define V(v)
-#else
-#define V(v) printf(#v"= %d\n", fs->v);
-#endif
-
- fs->s_blocksize = EXT2_MIN_BLOCK_SIZE << es->s_log_block_size;
- V(s_blocksize)
- fs->s_bshift = EXT2_MIN_BLOCK_LOG_SIZE + es->s_log_block_size;
- V(s_bshift)
- fs->s_fsbtodb = es->s_log_block_size + 1;
- V(s_fsbtodb)
- fs->s_qbmask = fs->s_blocksize - 1;
- V(s_bmask)
- fs->s_blocksize_bits = EXT2_BLOCK_SIZE_BITS(es);
- V(s_blocksize_bits)
- fs->s_frag_size = EXT2_MIN_FRAG_SIZE << es->s_log_frag_size;
- V(s_frag_size)
- if (fs->s_frag_size)
- fs->s_frags_per_block = fs->s_blocksize / fs->s_frag_size;
- V(s_frags_per_block)
- fs->s_blocks_per_group = es->s_blocks_per_group;
- V(s_blocks_per_group)
- fs->s_frags_per_group = es->s_frags_per_group;
- V(s_frags_per_group)
- fs->s_inodes_per_group = es->s_inodes_per_group;
- V(s_inodes_per_group)
- fs->s_inodes_per_block = fs->s_blocksize / EXT2_INODE_SIZE;
- V(s_inodes_per_block)
- fs->s_itb_per_group = fs->s_inodes_per_group /fs->s_inodes_per_block;
- V(s_itb_per_group)
- fs->s_desc_per_block = fs->s_blocksize / sizeof (struct ext2_group_desc);
- V(s_desc_per_block)
- /* s_resuid / s_resgid ? */
- fs->s_groups_count = (es->s_blocks_count -
- es->s_first_data_block +
- EXT2_BLOCKS_PER_GROUP(fs) - 1) /
- EXT2_BLOCKS_PER_GROUP(fs);
- V(s_groups_count)
- db_count = (fs->s_groups_count + EXT2_DESC_PER_BLOCK(fs) - 1) /
- EXT2_DESC_PER_BLOCK(fs);
- fs->s_db_per_group = db_count;
- V(s_db_per_group)
-
- fs->s_group_desc = bsd_malloc(db_count * sizeof (struct buf *),
- M_UFSMNT, M_WAITOK);
-
- /* adjust logic_sb_block */
- if(fs->s_blocksize > SBSIZE)
- /* Godmar thinks: if the blocksize is greater than 1024, then
- the superblock is logically part of block zero.
- */
- logic_sb_block = 0;
-
- for (i = 0; i < db_count; i++) {
- error = bread(devvp , fsbtodb(fs, logic_sb_block + i + 1),
- fs->s_blocksize, NOCRED, &fs->s_group_desc[i]);
- if(error) {
- for (j = 0; j < i; j++)
- brelse(fs->s_group_desc[j]);
- bsd_free(fs->s_group_desc, M_UFSMNT);
- printf("EXT2-fs: unable to read group descriptors (%d)\n", error);
- return EIO;
- }
- /* Set the B_LOCKED flag on the buffer, then brelse() it */
- LCK_BUF(fs->s_group_desc[i])
- }
- if(!ext2_check_descriptors(fs)) {
- for (j = 0; j < db_count; j++)
- ULCK_BUF(fs->s_group_desc[j])
- bsd_free(fs->s_group_desc, M_UFSMNT);
- printf("EXT2-fs: (ext2_check_descriptors failure) "
- "unable to read group descriptors\n");
- return EIO;
- }
-
- for (i = 0; i < EXT2_MAX_GROUP_LOADED; i++) {
- fs->s_inode_bitmap_number[i] = 0;
- fs->s_inode_bitmap[i] = NULL;
- fs->s_block_bitmap_number[i] = 0;
- fs->s_block_bitmap[i] = NULL;
- }
- fs->s_loaded_inode_bitmaps = 0;
- fs->s_loaded_block_bitmaps = 0;
- return 0;
-}
-
-/*
- * Reload all incore data for a filesystem (used after running fsck on
- * the root filesystem and finding things to fix). The filesystem must
- * be mounted read-only.
- *
- * Things to do to update the mount:
- * 1) invalidate all cached meta-data.
- * 2) re-read superblock from disk.
- * 3) re-read summary information from disk.
- * 4) invalidate all inactive vnodes.
- * 5) invalidate all cached file data.
- * 6) re-read inode data for all active vnodes.
- */
-static int
-ext2_reload(mountp, cred, p)
- register struct mount *mountp;
- struct ucred *cred;
- struct proc *p;
-{
- register struct vnode *vp, *nvp, *devvp;
- struct inode *ip;
- struct buf *bp;
- struct ext2_super_block * es;
- struct ext2_sb_info *fs;
- int error;
-
- if ((mountp->mnt_flag & MNT_RDONLY) == 0)
- return (EINVAL);
- /*
- * Step 1: invalidate all cached meta-data.
- */
- devvp = VFSTOUFS(mountp)->um_devvp;
- if (vinvalbuf(devvp, 0, cred, p, 0, 0))
- panic("ext2_reload: dirty1");
- /*
- * Step 2: re-read superblock from disk.
- * constants have been adjusted for ext2
- */
- if ((error = bread(devvp, SBLOCK, SBSIZE, NOCRED, &bp)) != 0)
- return (error);
- es = (struct ext2_super_block *)bp->b_data;
- if (ext2_check_sb_compat(es, devvp->v_rdev, 0) != 0) {
- brelse(bp);
- return (EIO); /* XXX needs translation */
- }
- fs = VFSTOUFS(mountp)->um_e2fs;
- bcopy(bp->b_data, fs->s_es, sizeof(struct ext2_super_block));
-
- if((error = compute_sb_data(devvp, es, fs)) != 0) {
- brelse(bp);
- return error;
- }
-#ifdef UNKLAR
- if (fs->fs_sbsize < SBSIZE)
- bp->b_flags |= B_INVAL;
-#endif
- brelse(bp);
-
-loop:
- simple_lock(&mntvnode_slock);
- for (vp = mountp->mnt_vnodelist.lh_first; vp != NULL; vp = nvp) {
- if (vp->v_mount != mountp) {
- simple_unlock(&mntvnode_slock);
- goto loop;
- }
- nvp = vp->v_mntvnodes.le_next;
- /*
- * Step 4: invalidate all inactive vnodes.
- */
- if (vrecycle(vp, &mntvnode_slock, p))
- goto loop;
- /*
- * Step 5: invalidate all cached file data.
- */
- simple_lock(&vp->v_interlock);
- simple_unlock(&mntvnode_slock);
- if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, p)) {
- goto loop;
- }
- if (vinvalbuf(vp, 0, cred, p, 0, 0))
- panic("ext2_reload: dirty2");
- /*
- * Step 6: re-read inode data for all active vnodes.
- */
- ip = VTOI(vp);
- error =
- bread(devvp, fsbtodb(fs, ino_to_fsba(fs, ip->i_number)),
- (int)fs->s_blocksize, NOCRED, &bp);
- if (error) {
- vput(vp);
- return (error);
- }
- ext2_ei2di((struct ext2_inode *) ((char *)bp->b_data +
- EXT2_INODE_SIZE * ino_to_fsbo(fs, ip->i_number)),
- &ip->i_din);
- brelse(bp);
- vput(vp);
- simple_lock(&mntvnode_slock);
- }
- simple_unlock(&mntvnode_slock);
- return (0);
-}
-
-/*
- * Common code for mount and mountroot
- */
-static int
-ext2_mountfs(devvp, mp, p)
- register struct vnode *devvp;
- struct mount *mp;
- struct proc *p;
-{
- register struct ufsmount *ump;
- struct buf *bp;
- register struct ext2_sb_info *fs;
- struct ext2_super_block * es;
- dev_t dev = devvp->v_rdev;
- struct partinfo dpart;
- int havepart = 0;
- int error, i, size;
- int ronly;
-
- /*
- * Disallow multiple mounts of the same device.
- * Disallow mounting of a device that is currently in use
- * (except for root, which might share swap device for miniroot).
- * Flush out any old buffers remaining from a previous use.
- */
- if ((error = vfs_mountedon(devvp)) != 0)
- return (error);
- if (vcount(devvp) > 1 && devvp != rootvp)
- return (EBUSY);
- if ((error = vinvalbuf(devvp, V_SAVE, p->p_ucred, p, 0, 0)) != 0)
- return (error);
-#ifdef READONLY
-/* turn on this to force it to be read-only */
- mp->mnt_flag |= MNT_RDONLY;
-#endif
-
- ronly = (mp->mnt_flag & MNT_RDONLY) != 0;
- vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
- error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, p);
- VOP_UNLOCK(devvp, 0, p);
- if (error)
- return (error);
- if (VOP_IOCTL(devvp, DIOCGPART, (caddr_t)&dpart, FREAD, NOCRED, p) != 0)
- size = DEV_BSIZE;
- else {
- havepart = 1;
- size = dpart.disklab->d_secsize;
- }
-
- bp = NULL;
- ump = NULL;
- if ((error = bread(devvp, SBLOCK, SBSIZE, NOCRED, &bp)) != 0)
- goto out;
- es = (struct ext2_super_block *)bp->b_data;
- if (ext2_check_sb_compat(es, dev, ronly) != 0) {
- error = EINVAL; /* XXX needs translation */
- goto out;
- }
- if ((es->s_state & EXT2_VALID_FS) == 0 ||
- (es->s_state & EXT2_ERROR_FS)) {
- if (ronly || (mp->mnt_flag & MNT_FORCE)) {
- printf(
-"WARNING: Filesystem was not properly dismounted\n");
- } else {
- printf(
-"WARNING: R/W mount denied. Filesystem is not clean - run fsck\n");
- error = EPERM;
- goto out;
- }
- }
- ump = bsd_malloc(sizeof *ump, M_UFSMNT, M_WAITOK);
- bzero((caddr_t)ump, sizeof *ump);
- ump->um_malloctype = M_EXT2NODE;
- ump->um_blkatoff = ext2_blkatoff;
- ump->um_truncate = ext2_truncate;
- ump->um_update = ext2_update;
- ump->um_valloc = ext2_valloc;
- ump->um_vfree = ext2_vfree;
- /* I don't know whether this is the right strategy. Note that
- we dynamically allocate both a ext2_sb_info and a ext2_super_block
- while Linux keeps the super block in a locked buffer
- */
- ump->um_e2fs = bsd_malloc(sizeof(struct ext2_sb_info),
- M_UFSMNT, M_WAITOK);
- ump->um_e2fs->s_es = bsd_malloc(sizeof(struct ext2_super_block),
- M_UFSMNT, M_WAITOK);
- bcopy(es, ump->um_e2fs->s_es, (u_int)sizeof(struct ext2_super_block));
- if ((error = compute_sb_data(devvp, ump->um_e2fs->s_es, ump->um_e2fs)))
- goto out;
- /*
- * We don't free the group descriptors allocated by compute_sb_data()
- * until ext2_unmount(). This is OK since the mount will succeed.
- */
- brelse(bp);
- bp = NULL;
- fs = ump->um_e2fs;
- fs->s_rd_only = ronly; /* ronly is set according to mnt_flags */
- /* if the fs is not mounted read-only, make sure the super block is
- always written back on a sync()
- */
- fs->s_wasvalid = fs->s_es->s_state & EXT2_VALID_FS ? 1 : 0;
- if (ronly == 0) {
- fs->s_dirt = 1; /* mark it modified */
- fs->s_es->s_state &= ~EXT2_VALID_FS; /* set fs invalid */
- }
- mp->mnt_data = (qaddr_t)ump;
- mp->mnt_stat.f_fsid.val[0] = dev2udev(dev);
- mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum;
- mp->mnt_maxsymlinklen = EXT2_MAXSYMLINKLEN;
- mp->mnt_flag |= MNT_LOCAL;
- ump->um_mountp = mp;
- ump->um_dev = dev;
- ump->um_devvp = devvp;
- /* setting those two parameters allows us to use
- ufs_bmap w/o changse !
- */
- ump->um_nindir = EXT2_ADDR_PER_BLOCK(fs);
- ump->um_bptrtodb = fs->s_es->s_log_block_size + 1;
- ump->um_seqinc = EXT2_FRAGS_PER_BLOCK(fs);
- for (i = 0; i < MAXQUOTAS; i++)
- ump->um_quotas[i] = NULLVP;
- devvp->v_specmountpoint = mp;
- if (ronly == 0)
- ext2_sbupdate(ump, MNT_WAIT);
- return (0);
-out:
- if (bp)
- brelse(bp);
- (void)VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, NOCRED, p);
- if (ump) {
- bsd_free(ump->um_e2fs->s_es, M_UFSMNT);
- bsd_free(ump->um_e2fs, M_UFSMNT);
- bsd_free(ump, M_UFSMNT);
- mp->mnt_data = (qaddr_t)0;
- }
- return (error);
-}
-
-/*
- * unmount system call
- */
-static int
-ext2_unmount(mp, mntflags, p)
- struct mount *mp;
- int mntflags;
- struct proc *p;
-{
- register struct ufsmount *ump;
- register struct ext2_sb_info *fs;
- int error, flags, ronly, i;
-
- flags = 0;
- if (mntflags & MNT_FORCE) {
- if (mp->mnt_flag & MNT_ROOTFS)
- return (EINVAL);
- flags |= FORCECLOSE;
- }
- if ((error = ext2_flushfiles(mp, flags, p)) != 0)
- return (error);
- ump = VFSTOUFS(mp);
- fs = ump->um_e2fs;
- ronly = fs->s_rd_only;
- if (ronly == 0) {
- if (fs->s_wasvalid)
- fs->s_es->s_state |= EXT2_VALID_FS;
- ext2_sbupdate(ump, MNT_WAIT);
- }
-
- /* release buffers containing group descriptors */
- for(i = 0; i < fs->s_db_per_group; i++)
- ULCK_BUF(fs->s_group_desc[i])
- bsd_free(fs->s_group_desc, M_UFSMNT);
-
- /* release cached inode/block bitmaps */
- for (i = 0; i < EXT2_MAX_GROUP_LOADED; i++)
- if (fs->s_inode_bitmap[i])
- ULCK_BUF(fs->s_inode_bitmap[i])
-
- for (i = 0; i < EXT2_MAX_GROUP_LOADED; i++)
- if (fs->s_block_bitmap[i])
- ULCK_BUF(fs->s_block_bitmap[i])
-
- ump->um_devvp->v_specmountpoint = NULL;
- error = VOP_CLOSE(ump->um_devvp, ronly ? FREAD : FREAD|FWRITE,
- NOCRED, p);
- vrele(ump->um_devvp);
- bsd_free(fs->s_es, M_UFSMNT);
- bsd_free(fs, M_UFSMNT);
- bsd_free(ump, M_UFSMNT);
- mp->mnt_data = (qaddr_t)0;
- mp->mnt_flag &= ~MNT_LOCAL;
- return (error);
-}
-
-/*
- * Flush out all the files in a filesystem.
- */
-static int
-ext2_flushfiles(mp, flags, p)
- register struct mount *mp;
- int flags;
- struct proc *p;
-{
- register struct ufsmount *ump;
- int error;
-#if QUOTA
- int i;
-#endif
-
- ump = VFSTOUFS(mp);
-#if QUOTA
- if (mp->mnt_flag & MNT_QUOTA) {
- if ((error = vflush(mp, NULLVP, SKIPSYSTEM|flags)) != 0)
- return (error);
- for (i = 0; i < MAXQUOTAS; i++) {
- if (ump->um_quotas[i] == NULLVP)
- continue;
- quotaoff(p, mp, i);
- }
- /*
- * Here we fall through to vflush again to ensure
- * that we have gotten rid of all the system vnodes.
- */
- }
-#endif
- error = vflush(mp, NULLVP, flags);
- return (error);
-}
-
-/*
- * Get file system statistics.
- * taken from ext2/super.c ext2_statfs
- */
-static int
-ext2_statfs(mp, sbp, p)
- struct mount *mp;
- register struct statfs *sbp;
- struct proc *p;
-{
- unsigned long overhead;
- unsigned long overhead_per_group;
-
- register struct ufsmount *ump;
- register struct ext2_sb_info *fs;
- register struct ext2_super_block *es;
-
- ump = VFSTOUFS(mp);
- fs = ump->um_e2fs;
- es = fs->s_es;
-
- if (es->s_magic != EXT2_SUPER_MAGIC)
- panic("ext2_statfs - magic number spoiled");
-
- /*
- * Compute the overhead (FS structures)
- */
- overhead_per_group = 1 /* super block */ +
- fs->s_db_per_group +
- 1 /* block bitmap */ +
- 1 /* inode bitmap */ +
- fs->s_itb_per_group;
- overhead = es->s_first_data_block +
- fs->s_groups_count * overhead_per_group;
-
- sbp->f_bsize = EXT2_FRAG_SIZE(fs);
- sbp->f_iosize = EXT2_BLOCK_SIZE(fs);
- sbp->f_blocks = es->s_blocks_count - overhead;
- sbp->f_bfree = es->s_free_blocks_count;
- sbp->f_bavail = sbp->f_bfree - es->s_r_blocks_count;
- sbp->f_files = es->s_inodes_count;
- sbp->f_ffree = es->s_free_inodes_count;
- if (sbp != &mp->mnt_stat) {
- sbp->f_type = mp->mnt_vfc->vfc_typenum;
- bcopy((caddr_t)mp->mnt_stat.f_mntonname,
- (caddr_t)&sbp->f_mntonname[0], MNAMELEN);
- bcopy((caddr_t)mp->mnt_stat.f_mntfromname,
- (caddr_t)&sbp->f_mntfromname[0], MNAMELEN);
- }
- return (0);
-}
-
-/*
- * Go through the disk queues to initiate sandbagged IO;
- * go through the inodes to write those that have been modified;
- * initiate the writing of the super block if it has been modified.
- *
- * Note: we are always called with the filesystem marked `MPBUSY'.
- */
-static int
-ext2_sync(mp, waitfor, cred, p)
- struct mount *mp;
- int waitfor;
- struct ucred *cred;
- struct proc *p;
-{
- struct vnode *nvp, *vp;
- struct inode *ip;
- struct ufsmount *ump = VFSTOUFS(mp);
- struct ext2_sb_info *fs;
- int error, allerror = 0;
-
- fs = ump->um_e2fs;
- if (fs->s_dirt != 0 && fs->s_rd_only != 0) { /* XXX */
- printf("fs = %s\n", fs->fs_fsmnt);
- panic("ext2_sync: rofs mod");
- }
- /*
- * Write back each (modified) inode.
- */
- simple_lock(&mntvnode_slock);
-loop:
- for (vp = mp->mnt_vnodelist.lh_first; vp != NULL; vp = nvp) {
- /*
- * If the vnode that we are about to sync is no longer
- * associated with this mount point, start over.
- */
- if (vp->v_mount != mp)
- goto loop;
- simple_lock(&vp->v_interlock);
- nvp = vp->v_mntvnodes.le_next;
- ip = VTOI(vp);
- if (vp->v_type == VNON ||
- ((ip->i_flag &
- (IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE)) == 0 &&
- (TAILQ_EMPTY(&vp->v_dirtyblkhd) || waitfor == MNT_LAZY))) {
- simple_unlock(&vp->v_interlock);
- continue;
- }
- simple_unlock(&mntvnode_slock);
- error = vget(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_INTERLOCK, p);
- if (error) {
- simple_lock(&mntvnode_slock);
- if (error == ENOENT)
- goto loop;
- continue;
- }
- if ((error = VOP_FSYNC(vp, cred, waitfor, p)) != 0)
- allerror = error;
- VOP_UNLOCK(vp, 0, p);
- vrele(vp);
- simple_lock(&mntvnode_slock);
- }
- simple_unlock(&mntvnode_slock);
- /*
- * Force stale file system control information to be flushed.
- */
- if (waitfor != MNT_LAZY) {
- vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY, p);
- if ((error = VOP_FSYNC(ump->um_devvp, cred, waitfor, p)) != 0)
- allerror = error;
- VOP_UNLOCK(ump->um_devvp, 0, p);
- }
-#if QUOTA
- qsync(mp);
-#endif
- /*
- * Write back modified superblock.
- */
- if (fs->s_dirt != 0) {
- fs->s_dirt = 0;
- fs->s_es->s_wtime = time_second;
- if ((error = ext2_sbupdate(ump, waitfor)) != 0)
- allerror = error;
- }
- return (allerror);
-}
-
-/*
- * Look up a EXT2FS dinode number to find its incore vnode, otherwise read it
- * in from disk. If it is in core, wait for the lock bit to clear, then
- * return the inode locked. Detection and handling of mount points must be
- * done by the calling routine.
- */
-static int
-ext2_vget(mp, ino, vpp)
- struct mount *mp;
- ino_t ino;
- struct vnode **vpp;
-{
- register struct ext2_sb_info *fs;
- register struct inode *ip;
- struct ufsmount *ump;
- struct buf *bp;
- struct vnode *vp;
- dev_t dev;
- int i, error;
- int used_blocks;
-
- ump = VFSTOUFS(mp);
- dev = ump->um_dev;
-restart:
- if ((*vpp = ufs_ihashget(dev, ino)) != NULL)
- return (0);
-
- /*
- * Lock out the creation of new entries in the FFS hash table in
- * case getnewvnode() or MALLOC() blocks, otherwise a duplicate
- * may occur!
- */
- if (ext2fs_inode_hash_lock) {
- while (ext2fs_inode_hash_lock) {
- ext2fs_inode_hash_lock = -1;
- tsleep(&ext2fs_inode_hash_lock, PVM, "e2vget", 0);
- }
- goto restart;
- }
- ext2fs_inode_hash_lock = 1;
-
- /*
- * If this MALLOC() is performed after the getnewvnode()
- * it might block, leaving a vnode with a NULL v_data to be
- * found by ext2_sync() if a sync happens to fire right then,
- * which will cause a panic because ext2_sync() blindly
- * dereferences vp->v_data (as well it should).
- */
- MALLOC(ip, struct inode *, sizeof(struct inode), M_EXT2NODE, M_WAITOK);
-
- /* Allocate a new vnode/inode. */
- if ((error = getnewvnode(VT_UFS, mp, ext2_vnodeop_p, &vp)) != 0) {
- if (ext2fs_inode_hash_lock < 0)
- wakeup(&ext2fs_inode_hash_lock);
- ext2fs_inode_hash_lock = 0;
- *vpp = NULL;
- FREE(ip, M_EXT2NODE);
- return (error);
- }
- bzero((caddr_t)ip, sizeof(struct inode));
- lockinit(&ip->i_lock, PINOD, "ext2in", 0, 0);
- vp->v_data = ip;
- ip->i_vnode = vp;
- ip->i_e2fs = fs = ump->um_e2fs;
- ip->i_dev = dev;
- ip->i_number = ino;
-#if QUOTA
- for (i = 0; i < MAXQUOTAS; i++)
- ip->i_dquot[i] = NODQUOT;
-#endif
- /*
- * Put it onto its hash chain and lock it so that other requests for
- * this inode will block if they arrive while we are sleeping waiting
- * for old data structures to be purged or for the contents of the
- * disk portion of this inode to be read.
- */
- ufs_ihashins(ip);
-
- if (ext2fs_inode_hash_lock < 0)
- wakeup(&ext2fs_inode_hash_lock);
- ext2fs_inode_hash_lock = 0;
-
- /* Read in the disk contents for the inode, copy into the inode. */
-#if 0
-printf("ext2_vget(%d) dbn= %d ", ino, fsbtodb(fs, ino_to_fsba(fs, ino)));
-#endif
- if ((error = bread(ump->um_devvp, fsbtodb(fs, ino_to_fsba(fs, ino)),
- (int)fs->s_blocksize, NOCRED, &bp)) != 0) {
- /*
- * The inode does not contain anything useful, so it would
- * be misleading to leave it on its hash chain. With mode
- * still zero, it will be unlinked and returned to the free
- * list by vput().
- */
- vput(vp);
- brelse(bp);
- *vpp = NULL;
- return (error);
- }
- /* convert ext2 inode to dinode */
- ext2_ei2di((struct ext2_inode *) ((char *)bp->b_data + EXT2_INODE_SIZE *
- ino_to_fsbo(fs, ino)), &ip->i_din);
- ip->i_block_group = ino_to_cg(fs, ino);
- ip->i_next_alloc_block = 0;
- ip->i_next_alloc_goal = 0;
- ip->i_prealloc_count = 0;
- ip->i_prealloc_block = 0;
- /* now we want to make sure that block pointers for unused
- blocks are zeroed out - ext2_balloc depends on this
- although for regular files and directories only
- */
- if(S_ISDIR(ip->i_mode) || S_ISREG(ip->i_mode)) {
- used_blocks = (ip->i_size+fs->s_blocksize-1) / fs->s_blocksize;
- for(i = used_blocks; i < EXT2_NDIR_BLOCKS; i++)
- ip->i_db[i] = 0;
- }
-/*
- ext2_print_inode(ip);
-*/
- brelse(bp);
-
- /*
- * Initialize the vnode from the inode, check for aliases.
- * Note that the underlying vnode may have changed.
- */
- if ((error = ufs_vinit(mp, ext2_specop_p, ext2_fifoop_p, &vp)) != 0) {
- vput(vp);
- *vpp = NULL;
- return (error);
- }
- /*
- * Finish inode initialization now that aliasing has been resolved.
- */
- ip->i_devvp = ump->um_devvp;
- VREF(ip->i_devvp);
- /*
- * Set up a generation number for this inode if it does not
- * already have one. This should only happen on old filesystems.
- */
- if (ip->i_gen == 0) {
- ip->i_gen = random() / 2 + 1;
- if ((vp->v_mount->mnt_flag & MNT_RDONLY) == 0)
- ip->i_flag |= IN_MODIFIED;
- }
- *vpp = vp;
- return (0);
-}
-
-/*
- * File handle to vnode
- *
- * Have to be really careful about stale file handles:
- * - check that the inode number is valid
- * - call ext2_vget() to get the locked inode
- * - check for an unallocated inode (i_mode == 0)
- * - check that the given client host has export rights and return
- * those rights via. exflagsp and credanonp
- */
-static int
-ext2_fhtovp(mp, fhp, vpp)
- register struct mount *mp;
- struct fid *fhp;
- struct vnode **vpp;
-{
- register struct ufid *ufhp;
- struct ext2_sb_info *fs;
-
- ufhp = (struct ufid *)fhp;
- fs = VFSTOUFS(mp)->um_e2fs;
- if (ufhp->ufid_ino < ROOTINO ||
- ufhp->ufid_ino >= fs->s_groups_count * fs->s_es->s_inodes_per_group)
- return (ESTALE);
- return (ufs_fhtovp(mp, ufhp, vpp));
-}
-
-/*
- * Vnode pointer to File handle
- */
-/* ARGSUSED */
-static int
-ext2_vptofh(vp, fhp)
- struct vnode *vp;
- struct fid *fhp;
-{
- register struct inode *ip;
- register struct ufid *ufhp;
-
- ip = VTOI(vp);
- ufhp = (struct ufid *)fhp;
- ufhp->ufid_len = sizeof(struct ufid);
- ufhp->ufid_ino = ip->i_number;
- ufhp->ufid_gen = ip->i_gen;
- return (0);
-}
-
-/*
- * Write a superblock and associated information back to disk.
- */
-static int
-ext2_sbupdate(mp, waitfor)
- struct ufsmount *mp;
- int waitfor;
-{
- register struct ext2_sb_info *fs = mp->um_e2fs;
- register struct ext2_super_block *es = fs->s_es;
- register struct buf *bp;
- int error = 0;
-/*
-printf("\nupdating superblock, waitfor=%s\n", waitfor == MNT_WAIT ? "yes":"no");
-*/
- bp = getblk(mp->um_devvp, SBLOCK, SBSIZE, 0, 0);
- bcopy((caddr_t)es, bp->b_data, (u_int)sizeof(struct ext2_super_block));
- if (waitfor == MNT_WAIT)
- error = bwrite(bp);
- else
- bawrite(bp);
-
- /*
- * The buffers for group descriptors, inode bitmaps and block bitmaps
- * are not busy at this point and are (hopefully) written by the
- * usual sync mechanism. No need to write them here
- */
-
- return (error);
-}
diff --git a/sys/gnu/fs/ext2fs/ext2_vnops.c b/sys/gnu/fs/ext2fs/ext2_vnops.c
deleted file mode 100644
index 0e57f30..0000000
--- a/sys/gnu/fs/ext2fs/ext2_vnops.c
+++ /dev/null
@@ -1,1213 +0,0 @@
-/*
- * modified for EXT2FS support in Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- */
-/*
- * Copyright (c) 1982, 1986, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ufs_vnops.c 8.27 (Berkeley) 5/27/95
- * @(#)ext2_vnops.c 8.7 (Berkeley) 2/3/94
- * $FreeBSD$
- */
-
-#include "opt_quota.h"
-#include "opt_suiddir.h"
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/resourcevar.h>
-#include <sys/kernel.h>
-#include <sys/stat.h>
-#include <sys/buf.h>
-#include <sys/proc.h>
-#include <sys/mount.h>
-#include <sys/time.h>
-#include <sys/vnode.h>
-#include <sys/namei.h>
-
-#include <vm/vm.h>
-#include <vm/vm_extern.h>
-#include <vm/vm_zone.h>
-#include <vm/vnode_pager.h>
-
-#include <sys/signalvar.h>
-#include <ufs/ufs/dir.h>
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/inode.h>
-#include <ufs/ufs/ufsmount.h>
-#include <ufs/ufs/ufs_extern.h>
-
-#include <gnu/ext2fs/ext2_fs_sb.h>
-#include <gnu/ext2fs/fs.h>
-#include <gnu/ext2fs/ext2_extern.h>
-#include <gnu/ext2fs/ext2_fs.h>
-
-static int ext2_makeinode __P((int mode, struct vnode *, struct vnode **, struct componentname *));
-
-static int ext2_fsync __P((struct vop_fsync_args *));
-static int ext2_read __P((struct vop_read_args *));
-static int ext2_write __P((struct vop_write_args *));
-static int ext2_remove __P((struct vop_remove_args *));
-static int ext2_link __P((struct vop_link_args *));
-static int ext2_rename __P((struct vop_rename_args *));
-static int ext2_mkdir __P((struct vop_mkdir_args *));
-static int ext2_rmdir __P((struct vop_rmdir_args *));
-static int ext2_create __P((struct vop_create_args *));
-static int ext2_mknod __P((struct vop_mknod_args *));
-static int ext2_symlink __P((struct vop_symlink_args *));
-static int ext2_getpages __P((struct vop_getpages_args *));
-static int ext2_putpages __P((struct vop_putpages_args *));
-
-/* Global vfs data structures for ufs. */
-vop_t **ext2_vnodeop_p;
-static struct vnodeopv_entry_desc ext2_vnodeop_entries[] = {
- { &vop_default_desc, (vop_t *) ufs_vnoperate },
- { &vop_cachedlookup_desc, (vop_t *) ext2_lookup },
- { &vop_fsync_desc, (vop_t *) ext2_fsync },
- { &vop_inactive_desc, (vop_t *) ext2_inactive },
- { &vop_lookup_desc, (vop_t *) vfs_cache_lookup },
- { &vop_read_desc, (vop_t *) ext2_read },
- { &vop_readdir_desc, (vop_t *) ext2_readdir },
- { &vop_reallocblks_desc, (vop_t *) ext2_reallocblks },
- { &vop_write_desc, (vop_t *) ext2_write },
- { &vop_remove_desc, (vop_t *) ext2_remove },
- { &vop_link_desc, (vop_t *) ext2_link },
- { &vop_rename_desc, (vop_t *) ext2_rename },
- { &vop_mkdir_desc, (vop_t *) ext2_mkdir },
- { &vop_rmdir_desc, (vop_t *) ext2_rmdir },
- { &vop_create_desc, (vop_t *) ext2_create },
- { &vop_mknod_desc, (vop_t *) ext2_mknod },
- { &vop_symlink_desc, (vop_t *) ext2_symlink },
- { &vop_getpages_desc, (vop_t *) ext2_getpages },
- { &vop_putpages_desc, (vop_t *) ext2_putpages },
- { NULL, NULL }
-};
-static struct vnodeopv_desc ext2fs_vnodeop_opv_desc =
- { &ext2_vnodeop_p, ext2_vnodeop_entries };
-
-vop_t **ext2_specop_p;
-static struct vnodeopv_entry_desc ext2_specop_entries[] = {
- { &vop_default_desc, (vop_t *) ufs_vnoperatespec },
- { &vop_fsync_desc, (vop_t *) ext2_fsync },
- { &vop_inactive_desc, (vop_t *) ext2_inactive },
- { NULL, NULL }
-};
-static struct vnodeopv_desc ext2fs_specop_opv_desc =
- { &ext2_specop_p, ext2_specop_entries };
-
-vop_t **ext2_fifoop_p;
-static struct vnodeopv_entry_desc ext2_fifoop_entries[] = {
- { &vop_default_desc, (vop_t *) ufs_vnoperatefifo },
- { &vop_fsync_desc, (vop_t *) ext2_fsync },
- { &vop_inactive_desc, (vop_t *) ext2_inactive },
- { NULL, NULL }
-};
-static struct vnodeopv_desc ext2fs_fifoop_opv_desc =
- { &ext2_fifoop_p, ext2_fifoop_entries };
-
- VNODEOP_SET(ext2fs_vnodeop_opv_desc);
- VNODEOP_SET(ext2fs_specop_opv_desc);
- VNODEOP_SET(ext2fs_fifoop_opv_desc);
-
-#include <gnu/ext2fs/ext2_readwrite.c>
-
-/*
- * A virgin directory (no blushing please).
- * Note that the type and namlen fields are reversed relative to ufs.
- * Also, we don't use `struct odirtemplate', since it would just cause
- * endianness problems.
- */
-static struct dirtemplate mastertemplate = {
- 0, 12, 1, EXT2_FT_DIR, ".",
- 0, DIRBLKSIZ - 12, 2, EXT2_FT_DIR, ".."
-};
-static struct dirtemplate omastertemplate = {
- 0, 12, 1, EXT2_FT_UNKNOWN, ".",
- 0, DIRBLKSIZ - 12, 2, EXT2_FT_UNKNOWN, ".."
-};
-
-/*
- * Create a regular file
- */
-static int
-ext2_create(ap)
- struct vop_create_args /* {
- struct vnode *a_dvp;
- struct vnode **a_vpp;
- struct componentname *a_cnp;
- struct vattr *a_vap;
- } */ *ap;
-{
- int error;
-
- error =
- ext2_makeinode(MAKEIMODE(ap->a_vap->va_type, ap->a_vap->va_mode),
- ap->a_dvp, ap->a_vpp, ap->a_cnp);
- if (error)
- return (error);
- return (0);
-}
-
-/*
- * Synch an open file.
- */
-/* ARGSUSED */
-static int
-ext2_fsync(ap)
- struct vop_fsync_args /* {
- struct vnode *a_vp;
- struct ucred *a_cred;
- int a_waitfor;
- struct proc *a_p;
- } */ *ap;
-{
- register struct vnode *vp = ap->a_vp;
- register struct buf *bp;
- struct buf *nbp;
- int s;
-
- /*
- * XXX why is all this fs specific?
- */
-
- /*
- * Flush all dirty buffers associated with a vnode.
- */
- ext2_discard_prealloc(VTOI(vp));
-
-loop:
- s = splbio();
- for (bp = TAILQ_FIRST(&vp->v_dirtyblkhd); bp; bp = nbp) {
- nbp = TAILQ_NEXT(bp, b_vnbufs);
- if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT))
- continue;
- if ((bp->b_flags & B_DELWRI) == 0)
- panic("ext2_fsync: not dirty");
- bremfree(bp);
- splx(s);
- /*
- * Wait for I/O associated with indirect blocks to complete,
- * since there is no way to quickly wait for them below.
- */
- if (bp->b_vp == vp || ap->a_waitfor == MNT_NOWAIT)
- (void) bawrite(bp);
- else
- (void) bwrite(bp);
- goto loop;
- }
- if (ap->a_waitfor == MNT_WAIT) {
- while (vp->v_numoutput) {
- vp->v_flag |= VBWAIT;
- tsleep(&vp->v_numoutput, PRIBIO + 1, "e2fsyn", 0);
- }
-#if DIAGNOSTIC
- if (!TAILQ_EMPTY(&vp->v_dirtyblkhd)) {
- vprint("ext2_fsync: dirty", vp);
- goto loop;
- }
-#endif
- }
- splx(s);
- return (UFS_UPDATE(ap->a_vp, ap->a_waitfor == MNT_WAIT));
-}
-
-/*
- * Mknod vnode call
- */
-/* ARGSUSED */
-static int
-ext2_mknod(ap)
- struct vop_mknod_args /* {
- struct vnode *a_dvp;
- struct vnode **a_vpp;
- struct componentname *a_cnp;
- struct vattr *a_vap;
- } */ *ap;
-{
- struct vattr *vap = ap->a_vap;
- struct vnode **vpp = ap->a_vpp;
- struct inode *ip;
- int error;
-
- error = ext2_makeinode(MAKEIMODE(vap->va_type, vap->va_mode),
- ap->a_dvp, vpp, ap->a_cnp);
- if (error)
- return (error);
- ip = VTOI(*vpp);
- ip->i_flag |= IN_ACCESS | IN_CHANGE | IN_UPDATE;
- if (vap->va_rdev != VNOVAL) {
- /*
- * Want to be able to use this to make badblock
- * inodes, so don't truncate the dev number.
- */
- ip->i_rdev = vap->va_rdev;
- }
- /*
- * Remove inode, then reload it through VFS_VGET so it is
- * checked to see if it is an alias of an existing entry in
- * the inode cache.
- */
- vput(*vpp);
- (*vpp)->v_type = VNON;
- vgone(*vpp);
- error = VFS_VGET(ap->a_dvp->v_mount, ip->i_ino, vpp);
- if (error) {
- *vpp = NULL;
- return (error);
- }
- return (0);
-}
-
-static int
-ext2_remove(ap)
- struct vop_remove_args /* {
- struct vnode *a_dvp;
- struct vnode *a_vp;
- struct componentname *a_cnp;
- } */ *ap;
-{
- struct inode *ip;
- struct vnode *vp = ap->a_vp;
- struct vnode *dvp = ap->a_dvp;
- int error;
-
- ip = VTOI(vp);
- if ((ip->i_flags & (NOUNLINK | IMMUTABLE | APPEND)) ||
- (VTOI(dvp)->i_flags & APPEND)) {
- error = EPERM;
- goto out;
- }
- error = ext2_dirremove(dvp, ap->a_cnp);
- if (error == 0) {
- ip->i_nlink--;
- ip->i_flag |= IN_CHANGE;
- }
-out:
- return (error);
-}
-
-/*
- * link vnode call
- */
-static int
-ext2_link(ap)
- struct vop_link_args /* {
- struct vnode *a_tdvp;
- struct vnode *a_vp;
- struct componentname *a_cnp;
- } */ *ap;
-{
- struct vnode *vp = ap->a_vp;
- struct vnode *tdvp = ap->a_tdvp;
- struct componentname *cnp = ap->a_cnp;
- struct proc *p = cnp->cn_proc;
- struct inode *ip;
- int error;
-
-#ifdef DIAGNOSTIC
- if ((cnp->cn_flags & HASBUF) == 0)
- panic("ufs_link: no name");
-#endif
- if (tdvp->v_mount != vp->v_mount) {
- error = EXDEV;
- goto out2;
- }
- if (tdvp != vp && (error = vn_lock(vp, LK_EXCLUSIVE, p))) {
- goto out2;
- }
- ip = VTOI(vp);
- if ((nlink_t)ip->i_nlink >= LINK_MAX) {
- error = EMLINK;
- goto out1;
- }
- if (ip->i_flags & (IMMUTABLE | APPEND)) {
- error = EPERM;
- goto out1;
- }
- ip->i_nlink++;
- ip->i_flag |= IN_CHANGE;
- error = UFS_UPDATE(vp, 1);
- if (!error)
- error = ext2_direnter(ip, tdvp, cnp);
- if (error) {
- ip->i_nlink--;
- ip->i_flag |= IN_CHANGE;
- }
-out1:
- if (tdvp != vp)
- VOP_UNLOCK(vp, 0, p);
-out2:
- return (error);
-}
-
-/*
- * Rename system call.
- * See comments in sys/ufs/ufs/ufs_vnops.c
- */
-static int
-ext2_rename(ap)
- struct vop_rename_args /* {
- struct vnode *a_fdvp;
- struct vnode *a_fvp;
- struct componentname *a_fcnp;
- struct vnode *a_tdvp;
- struct vnode *a_tvp;
- struct componentname *a_tcnp;
- } */ *ap;
-{
- struct vnode *tvp = ap->a_tvp;
- register struct vnode *tdvp = ap->a_tdvp;
- struct vnode *fvp = ap->a_fvp;
- struct vnode *fdvp = ap->a_fdvp;
- struct componentname *tcnp = ap->a_tcnp;
- struct componentname *fcnp = ap->a_fcnp;
- struct proc *p = fcnp->cn_proc;
- struct inode *ip, *xp, *dp;
- struct dirtemplate dirbuf;
- int doingdirectory = 0, oldparent = 0, newparent = 0;
- int error = 0;
- u_char namlen;
-
-#ifdef DIAGNOSTIC
- if ((tcnp->cn_flags & HASBUF) == 0 ||
- (fcnp->cn_flags & HASBUF) == 0)
- panic("ufs_rename: no name");
-#endif
- /*
- * Check for cross-device rename.
- */
- if ((fvp->v_mount != tdvp->v_mount) ||
- (tvp && (fvp->v_mount != tvp->v_mount))) {
- error = EXDEV;
-abortit:
- if (tdvp == tvp)
- vrele(tdvp);
- else
- vput(tdvp);
- if (tvp)
- vput(tvp);
- vrele(fdvp);
- vrele(fvp);
- return (error);
- }
-
- if (tvp && ((VTOI(tvp)->i_flags & (NOUNLINK | IMMUTABLE | APPEND)) ||
- (VTOI(tdvp)->i_flags & APPEND))) {
- error = EPERM;
- goto abortit;
- }
-
- /*
- * Check if just deleting a link name or if we've lost a race.
- * If another process completes the same rename after we've looked
- * up the source and have blocked looking up the target, then the
- * source and target inodes may be identical now although the
- * names were never linked.
- */
- if (fvp == tvp) {
- if (fvp->v_type == VDIR) {
- /*
- * Linked directories are impossible, so we must
- * have lost the race. Pretend that the rename
- * completed before the lookup.
- */
-#ifdef UFS_RENAME_DEBUG
- printf("ufs_rename: fvp == tvp for directories\n");
-#endif
- error = ENOENT;
- goto abortit;
- }
-
- /* Release destination completely. */
- vput(tdvp);
- vput(tvp);
-
- /*
- * Delete source. There is another race now that everything
- * is unlocked, but this doesn't cause any new complications.
- * Relookup() may find a file that is unrelated to the
- * original one, or it may fail. Too bad.
- */
- vrele(fdvp);
- vrele(fvp);
- fcnp->cn_flags &= ~MODMASK;
- fcnp->cn_flags |= LOCKPARENT | LOCKLEAF;
- fcnp->cn_nameiop = DELETE;
- VREF(fdvp);
- error = relookup(fdvp, &fvp, fcnp);
- if (error == 0)
- vrele(fdvp);
- if (fvp == NULL) {
-#ifdef UFS_RENAME_DEBUG
- printf("ufs_rename: from name disappeared\n");
-#endif
- return (ENOENT);
- }
- error = VOP_REMOVE(fdvp, fvp, fcnp);
- if (fdvp == fvp)
- vrele(fdvp);
- else
- vput(fdvp);
- if (fvp != NULLVP)
- vput(fvp);
- return (error);
- }
- if ((error = vn_lock(fvp, LK_EXCLUSIVE, p)) != 0)
- goto abortit;
- dp = VTOI(fdvp);
- ip = VTOI(fvp);
- if (ip->i_nlink >= LINK_MAX) {
- VOP_UNLOCK(fvp, 0, p);
- error = EMLINK;
- goto abortit;
- }
- if ((ip->i_flags & (NOUNLINK | IMMUTABLE | APPEND))
- || (dp->i_flags & APPEND)) {
- VOP_UNLOCK(fvp, 0, p);
- error = EPERM;
- goto abortit;
- }
- if ((ip->i_mode & IFMT) == IFDIR) {
- /*
- * Avoid ".", "..", and aliases of "." for obvious reasons.
- */
- if ((fcnp->cn_namelen == 1 && fcnp->cn_nameptr[0] == '.') ||
- dp == ip || (fcnp->cn_flags | tcnp->cn_flags) & ISDOTDOT ||
- (ip->i_flag & IN_RENAME)) {
- VOP_UNLOCK(fvp, 0, p);
- error = EINVAL;
- goto abortit;
- }
- ip->i_flag |= IN_RENAME;
- oldparent = dp->i_number;
- doingdirectory++;
- }
- vrele(fdvp);
-
- /*
- * When the target exists, both the directory
- * and target vnodes are returned locked.
- */
- dp = VTOI(tdvp);
- xp = NULL;
- if (tvp)
- xp = VTOI(tvp);
-
- /*
- * 1) Bump link count while we're moving stuff
- * around. If we crash somewhere before
- * completing our work, the link count
- * may be wrong, but correctable.
- */
- ip->i_nlink++;
- ip->i_flag |= IN_CHANGE;
- if ((error = UFS_UPDATE(fvp, 1)) != 0) {
- VOP_UNLOCK(fvp, 0, p);
- goto bad;
- }
-
- /*
- * If ".." must be changed (ie the directory gets a new
- * parent) then the source directory must not be in the
- * directory heirarchy above the target, as this would
- * orphan everything below the source directory. Also
- * the user must have write permission in the source so
- * as to be able to change "..". We must repeat the call
- * to namei, as the parent directory is unlocked by the
- * call to checkpath().
- */
- error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_proc);
- VOP_UNLOCK(fvp, 0, p);
- if (oldparent != dp->i_number)
- newparent = dp->i_number;
- if (doingdirectory && newparent) {
- if (error) /* write access check above */
- goto bad;
- if (xp != NULL)
- vput(tvp);
- error = ext2_checkpath(ip, dp, tcnp->cn_cred);
- if (error)
- goto out;
- VREF(tdvp);
- error = relookup(tdvp, &tvp, tcnp);
- if (error)
- goto out;
- vrele(tdvp);
- dp = VTOI(tdvp);
- xp = NULL;
- if (tvp)
- xp = VTOI(tvp);
- }
- /*
- * 2) If target doesn't exist, link the target
- * to the source and unlink the source.
- * Otherwise, rewrite the target directory
- * entry to reference the source inode and
- * expunge the original entry's existence.
- */
- if (xp == NULL) {
- if (dp->i_dev != ip->i_dev)
- panic("ufs_rename: EXDEV");
- /*
- * Account for ".." in new directory.
- * When source and destination have the same
- * parent we don't fool with the link count.
- */
- if (doingdirectory && newparent) {
- if ((nlink_t)dp->i_nlink >= LINK_MAX) {
- error = EMLINK;
- goto bad;
- }
- dp->i_nlink++;
- dp->i_flag |= IN_CHANGE;
- error = UFS_UPDATE(tdvp, 1);
- if (error)
- goto bad;
- }
- error = ext2_direnter(ip, tdvp, tcnp);
- if (error) {
- if (doingdirectory && newparent) {
- dp->i_nlink--;
- dp->i_flag |= IN_CHANGE;
- (void)UFS_UPDATE(tdvp, 1);
- }
- goto bad;
- }
- vput(tdvp);
- } else {
- if (xp->i_dev != dp->i_dev || xp->i_dev != ip->i_dev)
- panic("ufs_rename: EXDEV");
- /*
- * Short circuit rename(foo, foo).
- */
- if (xp->i_number == ip->i_number)
- panic("ufs_rename: same file");
- /*
- * If the parent directory is "sticky", then the user must
- * own the parent directory, or the destination of the rename,
- * otherwise the destination may not be changed (except by
- * root). This implements append-only directories.
- */
- if ((dp->i_mode & S_ISTXT) && tcnp->cn_cred->cr_uid != 0 &&
- tcnp->cn_cred->cr_uid != dp->i_uid &&
- xp->i_uid != tcnp->cn_cred->cr_uid) {
- error = EPERM;
- goto bad;
- }
- /*
- * Target must be empty if a directory and have no links
- * to it. Also, ensure source and target are compatible
- * (both directories, or both not directories).
- */
- if ((xp->i_mode&IFMT) == IFDIR) {
- if (! ext2_dirempty(xp, dp->i_number, tcnp->cn_cred) ||
- xp->i_nlink > 2) {
- error = ENOTEMPTY;
- goto bad;
- }
- if (!doingdirectory) {
- error = ENOTDIR;
- goto bad;
- }
- cache_purge(tdvp);
- } else if (doingdirectory) {
- error = EISDIR;
- goto bad;
- }
- error = ext2_dirrewrite(dp, ip, tcnp);
- if (error)
- goto bad;
- /*
- * If the target directory is in the same
- * directory as the source directory,
- * decrement the link count on the parent
- * of the target directory.
- */
- if (doingdirectory && !newparent) {
- dp->i_nlink--;
- dp->i_flag |= IN_CHANGE;
- }
- vput(tdvp);
- /*
- * Adjust the link count of the target to
- * reflect the dirrewrite above. If this is
- * a directory it is empty and there are
- * no links to it, so we can squash the inode and
- * any space associated with it. We disallowed
- * renaming over top of a directory with links to
- * it above, as the remaining link would point to
- * a directory without "." or ".." entries.
- */
- xp->i_nlink--;
- if (doingdirectory) {
- if (--xp->i_nlink != 0)
- panic("ufs_rename: linked directory");
- error = UFS_TRUNCATE(tvp, (off_t)0, IO_SYNC,
- tcnp->cn_cred, tcnp->cn_proc);
- }
- xp->i_flag |= IN_CHANGE;
- vput(tvp);
- xp = NULL;
- }
-
- /*
- * 3) Unlink the source.
- */
- fcnp->cn_flags &= ~MODMASK;
- fcnp->cn_flags |= LOCKPARENT | LOCKLEAF;
- VREF(fdvp);
- error = relookup(fdvp, &fvp, fcnp);
- if (error == 0)
- vrele(fdvp);
- if (fvp != NULL) {
- xp = VTOI(fvp);
- dp = VTOI(fdvp);
- } else {
- /*
- * From name has disappeared.
- */
- if (doingdirectory)
- panic("ufs_rename: lost dir entry");
- vrele(ap->a_fvp);
- return (0);
- }
- /*
- * Ensure that the directory entry still exists and has not
- * changed while the new name has been entered. If the source is
- * a file then the entry may have been unlinked or renamed. In
- * either case there is no further work to be done. If the source
- * is a directory then it cannot have been rmdir'ed; its link
- * count of three would cause a rmdir to fail with ENOTEMPTY.
- * The IN_RENAME flag ensures that it cannot be moved by another
- * rename.
- */
- if (xp != ip) {
- if (doingdirectory)
- panic("ufs_rename: lost dir entry");
- } else {
- /*
- * If the source is a directory with a
- * new parent, the link count of the old
- * parent directory must be decremented
- * and ".." set to point to the new parent.
- */
- if (doingdirectory && newparent) {
- dp->i_nlink--;
- dp->i_flag |= IN_CHANGE;
- error = vn_rdwr(UIO_READ, fvp, (caddr_t)&dirbuf,
- sizeof (struct dirtemplate), (off_t)0,
- UIO_SYSSPACE, IO_NODELOCKED,
- tcnp->cn_cred, (int *)0, (struct proc *)0);
- if (error == 0) {
- /* Like ufs little-endian: */
- namlen = dirbuf.dotdot_type;
- if (namlen != 2 ||
- dirbuf.dotdot_name[0] != '.' ||
- dirbuf.dotdot_name[1] != '.') {
- ufs_dirbad(xp, (doff_t)12,
- "rename: mangled dir");
- } else {
- dirbuf.dotdot_ino = newparent;
- (void) vn_rdwr(UIO_WRITE, fvp,
- (caddr_t)&dirbuf,
- sizeof (struct dirtemplate),
- (off_t)0, UIO_SYSSPACE,
- IO_NODELOCKED|IO_SYNC,
- tcnp->cn_cred, (int *)0,
- (struct proc *)0);
- cache_purge(fdvp);
- }
- }
- }
- error = ext2_dirremove(fdvp, fcnp);
- if (!error) {
- xp->i_nlink--;
- xp->i_flag |= IN_CHANGE;
- }
- xp->i_flag &= ~IN_RENAME;
- }
- if (dp)
- vput(fdvp);
- if (xp)
- vput(fvp);
- vrele(ap->a_fvp);
- return (error);
-
-bad:
- if (xp)
- vput(ITOV(xp));
- vput(ITOV(dp));
-out:
- if (doingdirectory)
- ip->i_flag &= ~IN_RENAME;
- if (vn_lock(fvp, LK_EXCLUSIVE, p) == 0) {
- ip->i_nlink--;
- ip->i_flag |= IN_CHANGE;
- ip->i_flag &= ~IN_RENAME;
- vput(fvp);
- } else
- vrele(fvp);
- return (error);
-}
-
-/*
- * Mkdir system call
- */
-static int
-ext2_mkdir(ap)
- struct vop_mkdir_args /* {
- struct vnode *a_dvp;
- struct vnode **a_vpp;
- struct componentname *a_cnp;
- struct vattr *a_vap;
- } */ *ap;
-{
- register struct vnode *dvp = ap->a_dvp;
- register struct vattr *vap = ap->a_vap;
- register struct componentname *cnp = ap->a_cnp;
- register struct inode *ip, *dp;
- struct vnode *tvp;
- struct dirtemplate dirtemplate, *dtp;
- int error, dmode;
-
-#ifdef DIAGNOSTIC
- if ((cnp->cn_flags & HASBUF) == 0)
- panic("ufs_mkdir: no name");
-#endif
- dp = VTOI(dvp);
- if ((nlink_t)dp->i_nlink >= LINK_MAX) {
- error = EMLINK;
- goto out;
- }
- dmode = vap->va_mode & 0777;
- dmode |= IFDIR;
- /*
- * Must simulate part of ext2_makeinode here to acquire the inode,
- * but not have it entered in the parent directory. The entry is
- * made later after writing "." and ".." entries.
- */
- error = UFS_VALLOC(dvp, dmode, cnp->cn_cred, &tvp);
- if (error)
- goto out;
- ip = VTOI(tvp);
- ip->i_gid = dp->i_gid;
-#ifdef SUIDDIR
- {
-#ifdef QUOTA
- struct ucred ucred, *ucp;
- ucp = cnp->cn_cred;
-#endif I
- /*
- * if we are hacking owners here, (only do this where told to)
- * and we are not giving it TOO root, (would subvert quotas)
- * then go ahead and give it to the other user.
- * The new directory also inherits the SUID bit.
- * If user's UID and dir UID are the same,
- * 'give it away' so that the SUID is still forced on.
- */
- if ( (dvp->v_mount->mnt_flag & MNT_SUIDDIR) &&
- (dp->i_mode & ISUID) && dp->i_uid) {
- dmode |= ISUID;
- ip->i_uid = dp->i_uid;
-#ifdef QUOTA
- if (dp->i_uid != cnp->cn_cred->cr_uid) {
- /*
- * make sure the correct user gets charged
- * for the space.
- * Make a dummy credential for the victim.
- * XXX This seems to never be accessed out of
- * our context so a stack variable is ok.
- */
- ucred.cr_ref = 1;
- ucred.cr_uid = ip->i_uid;
- ucred.cr_ngroups = 1;
- ucred.cr_groups[0] = dp->i_gid;
- ucp = &ucred;
- }
-#endif I
- } else {
- ip->i_uid = cnp->cn_cred->cr_uid;
- }
-#ifdef QUOTA
- if ((error = getinoquota(ip)) ||
- (error = chkiq(ip, 1, ucp, 0))) {
- UFS_VFREE(tvp, ip->i_number, dmode);
- vput(tvp);
- return (error);
- }
-#endif
- }
-#else
- ip->i_uid = cnp->cn_cred->cr_uid;
-#ifdef QUOTA
- if ((error = getinoquota(ip)) ||
- (error = chkiq(ip, 1, cnp->cn_cred, 0))) {
- UFS_VFREE(tvp, ip->i_number, dmode);
- vput(tvp);
- return (error);
- }
-#endif
-#endif
- ip->i_flag |= IN_ACCESS | IN_CHANGE | IN_UPDATE;
- ip->i_mode = dmode;
- tvp->v_type = VDIR; /* Rest init'd in getnewvnode(). */
- ip->i_nlink = 2;
- if (cnp->cn_flags & ISWHITEOUT)
- ip->i_flags |= UF_OPAQUE;
- error = UFS_UPDATE(tvp, 1);
-
- /*
- * Bump link count in parent directory
- * to reflect work done below. Should
- * be done before reference is created
- * so reparation is possible if we crash.
- */
- dp->i_nlink++;
- dp->i_flag |= IN_CHANGE;
- error = UFS_UPDATE(dvp, 1);
- if (error)
- goto bad;
-
- /* Initialize directory with "." and ".." from static template. */
- if (EXT2_HAS_INCOMPAT_FEATURE(ip->i_e2fs->s_es,
- EXT2_FEATURE_INCOMPAT_FILETYPE))
- dtp = &mastertemplate;
- else
- dtp = &omastertemplate;
- dirtemplate = *dtp;
- dirtemplate.dot_ino = ip->i_number;
- dirtemplate.dotdot_ino = dp->i_number;
- /* note that in ext2 DIRBLKSIZ == blocksize, not DEV_BSIZE
- * so let's just redefine it - for this function only
- */
-#undef DIRBLKSIZ
-#define DIRBLKSIZ VTOI(dvp)->i_e2fs->s_blocksize
- dirtemplate.dotdot_reclen = DIRBLKSIZ - 12;
- error = vn_rdwr(UIO_WRITE, tvp, (caddr_t)&dirtemplate,
- sizeof (dirtemplate), (off_t)0, UIO_SYSSPACE,
- IO_NODELOCKED|IO_SYNC, cnp->cn_cred, (int *)0, (struct proc *)0);
- if (error) {
- dp->i_nlink--;
- dp->i_flag |= IN_CHANGE;
- goto bad;
- }
- if (DIRBLKSIZ > VFSTOUFS(dvp->v_mount)->um_mountp->mnt_stat.f_bsize)
- panic("ufs_mkdir: blksize"); /* XXX should grow with balloc() */
- else {
- ip->i_size = DIRBLKSIZ;
- ip->i_flag |= IN_CHANGE;
- }
-
- /* Directory set up, now install its entry in the parent directory. */
- error = ext2_direnter(ip, dvp, cnp);
- if (error) {
- dp->i_nlink--;
- dp->i_flag |= IN_CHANGE;
- }
-bad:
- /*
- * No need to do an explicit VOP_TRUNCATE here, vrele will do this
- * for us because we set the link count to 0.
- */
- if (error) {
- ip->i_nlink = 0;
- ip->i_flag |= IN_CHANGE;
- vput(tvp);
- } else
- *ap->a_vpp = tvp;
-out:
- return (error);
-#undef DIRBLKSIZ
-#define DIRBLKSIZ DEV_BSIZE
-}
-
-/*
- * Rmdir system call.
- */
-static int
-ext2_rmdir(ap)
- struct vop_rmdir_args /* {
- struct vnode *a_dvp;
- struct vnode *a_vp;
- struct componentname *a_cnp;
- } */ *ap;
-{
- struct vnode *vp = ap->a_vp;
- struct vnode *dvp = ap->a_dvp;
- struct componentname *cnp = ap->a_cnp;
- struct proc *p = cnp->cn_proc;
- struct inode *ip, *dp;
- int error;
-
- ip = VTOI(vp);
- dp = VTOI(dvp);
-
- /*
- * Verify the directory is empty (and valid).
- * (Rmdir ".." won't be valid since
- * ".." will contain a reference to
- * the current directory and thus be
- * non-empty.)
- */
- error = 0;
- if (ip->i_nlink != 2 || !ext2_dirempty(ip, dp->i_number, cnp->cn_cred)) {
- error = ENOTEMPTY;
- goto out;
- }
- if ((dp->i_flags & APPEND)
- || (ip->i_flags & (NOUNLINK | IMMUTABLE | APPEND))) {
- error = EPERM;
- goto out;
- }
- /*
- * Delete reference to directory before purging
- * inode. If we crash in between, the directory
- * will be reattached to lost+found,
- */
- error = ext2_dirremove(dvp, cnp);
- if (error)
- goto out;
- dp->i_nlink--;
- dp->i_flag |= IN_CHANGE;
- cache_purge(dvp);
- VOP_UNLOCK(dvp, 0, p);
- /*
- * Truncate inode. The only stuff left
- * in the directory is "." and "..". The
- * "." reference is inconsequential since
- * we're quashing it. The ".." reference
- * has already been adjusted above. We've
- * removed the "." reference and the reference
- * in the parent directory, but there may be
- * other hard links so decrement by 2 and
- * worry about them later.
- */
- ip->i_nlink -= 2;
- error = UFS_TRUNCATE(vp, (off_t)0, IO_SYNC, cnp->cn_cred, p);
- cache_purge(ITOV(ip));
- vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, p);
-out:
- return (error);
-}
-
-/*
- * symlink -- make a symbolic link
- */
-static int
-ext2_symlink(ap)
- struct vop_symlink_args /* {
- struct vnode *a_dvp;
- struct vnode **a_vpp;
- struct componentname *a_cnp;
- struct vattr *a_vap;
- char *a_target;
- } */ *ap;
-{
- register struct vnode *vp, **vpp = ap->a_vpp;
- register struct inode *ip;
- int len, error;
-
- error = ext2_makeinode(IFLNK | ap->a_vap->va_mode, ap->a_dvp,
- vpp, ap->a_cnp);
- if (error)
- return (error);
- vp = *vpp;
- len = strlen(ap->a_target);
- if (len < vp->v_mount->mnt_maxsymlinklen) {
- ip = VTOI(vp);
- bcopy(ap->a_target, (char *)ip->i_shortlink, len);
- ip->i_size = len;
- ip->i_flag |= IN_CHANGE | IN_UPDATE;
- } else
- error = vn_rdwr(UIO_WRITE, vp, ap->a_target, len, (off_t)0,
- UIO_SYSSPACE, IO_NODELOCKED, ap->a_cnp->cn_cred, (int *)0,
- (struct proc *)0);
- if (error)
- vput(vp);
- return (error);
-}
-
-/*
- * Allocate a new inode.
- */
-static int
-ext2_makeinode(mode, dvp, vpp, cnp)
- int mode;
- struct vnode *dvp;
- struct vnode **vpp;
- struct componentname *cnp;
-{
- register struct inode *ip, *pdir;
- struct vnode *tvp;
- int error;
-
- pdir = VTOI(dvp);
-#ifdef DIAGNOSTIC
- if ((cnp->cn_flags & HASBUF) == 0)
- panic("ext2_makeinode: no name");
-#endif
- *vpp = NULL;
- if ((mode & IFMT) == 0)
- mode |= IFREG;
-
- error = UFS_VALLOC(dvp, mode, cnp->cn_cred, &tvp);
- if (error) {
- return (error);
- }
- ip = VTOI(tvp);
- ip->i_gid = pdir->i_gid;
-#ifdef SUIDDIR
- {
-#ifdef QUOTA
- struct ucred ucred, *ucp;
- ucp = cnp->cn_cred;
-#endif I
- /*
- * if we are
- * not the owner of the directory,
- * and we are hacking owners here, (only do this where told to)
- * and we are not giving it TOO root, (would subvert quotas)
- * then go ahead and give it to the other user.
- * Note that this drops off the execute bits for security.
- */
- if ( (dvp->v_mount->mnt_flag & MNT_SUIDDIR) &&
- (pdir->i_mode & ISUID) &&
- (pdir->i_uid != cnp->cn_cred->cr_uid) && pdir->i_uid) {
- ip->i_uid = pdir->i_uid;
- mode &= ~07111;
-#ifdef QUOTA
- /*
- * make sure the correct user gets charged
- * for the space.
- * Quickly knock up a dummy credential for the victim.
- * XXX This seems to never be accessed out of our
- * context so a stack variable is ok.
- */
- ucred.cr_ref = 1;
- ucred.cr_uid = ip->i_uid;
- ucred.cr_ngroups = 1;
- ucred.cr_groups[0] = pdir->i_gid;
- ucp = &ucred;
-#endif I
- } else {
- ip->i_uid = cnp->cn_cred->cr_uid;
- }
-
-#ifdef QUOTA
- if ((error = getinoquota(ip)) ||
- (error = chkiq(ip, 1, ucp, 0))) {
- UFS_VFREE(tvp, ip->i_number, mode);
- vput(tvp);
- return (error);
- }
-#endif
- }
-#else
- ip->i_uid = cnp->cn_cred->cr_uid;
-#ifdef QUOTA
- if ((error = getinoquota(ip)) ||
- (error = chkiq(ip, 1, cnp->cn_cred, 0))) {
- UFS_VFREE(tvp, ip->i_number, mode);
- vput(tvp);
- return (error);
- }
-#endif
-#endif
- ip->i_flag |= IN_ACCESS | IN_CHANGE | IN_UPDATE;
- ip->i_mode = mode;
- tvp->v_type = IFTOVT(mode); /* Rest init'd in getnewvnode(). */
- ip->i_nlink = 1;
- if ((ip->i_mode & ISGID) && !groupmember(ip->i_gid, cnp->cn_cred) &&
- suser_xxx(cnp->cn_cred, 0, PRISON_ROOT))
- ip->i_mode &= ~ISGID;
-
- if (cnp->cn_flags & ISWHITEOUT)
- ip->i_flags |= UF_OPAQUE;
-
- /*
- * Make sure inode goes to disk before directory entry.
- */
- error = UFS_UPDATE(tvp, 1);
- if (error)
- goto bad;
- error = ext2_direnter(ip, dvp, cnp);
- if (error)
- goto bad;
-
- *vpp = tvp;
- return (0);
-
-bad:
- /*
- * Write error occurred trying to update the inode
- * or the directory so must deallocate the inode.
- */
- ip->i_nlink = 0;
- ip->i_flag |= IN_CHANGE;
- vput(tvp);
- return (error);
-}
-
-/*
- * get page routine
- *
- * XXX By default, wimp out... note that a_offset is ignored (and always
- * XXX has been).
- */
-static int
-ext2_getpages(ap)
- struct vop_getpages_args *ap;
-{
- return (vnode_pager_generic_getpages(ap->a_vp, ap->a_m, ap->a_count,
- ap->a_reqpage));
-}
-
-/*
- * put page routine
- *
- * XXX By default, wimp out... note that a_offset is ignored (and always
- * XXX has been).
- */
-static int
-ext2_putpages(ap)
- struct vop_putpages_args *ap;
-{
- return (vnode_pager_generic_putpages(ap->a_vp, ap->a_m, ap->a_count,
- ap->a_sync, ap->a_rtvals));
-}
diff --git a/sys/gnu/fs/ext2fs/fs.h b/sys/gnu/fs/ext2fs/fs.h
deleted file mode 100644
index b8dab54..0000000
--- a/sys/gnu/fs/ext2fs/fs.h
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * modified for EXT2FS support in Lites 1.1
- *
- * Aug 1995, Godmar Back (gback@cs.utah.edu)
- * University of Utah, Department of Computer Science
- */
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. 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 product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)fs.h 8.7 (Berkeley) 4/19/94
- */
-
-/*
- * Each disk drive contains some number of file systems.
- * A file system consists of a number of cylinder groups.
- * Each cylinder group has inodes and data.
- *
- * A file system is described by its super-block, which in turn
- * describes the cylinder groups. The super-block is critical
- * data and is replicated in each cylinder group to protect against
- * catastrophic loss. This is done at `newfs' time and the critical
- * super-block data does not change, so the copies need not be
- * referenced further unless disaster strikes.
- *
- * The first boot and super blocks are given in absolute disk addresses.
- * The byte-offset forms are preferred, as they don't imply a sector size.
- */
-#define BBSIZE 1024
-#define SBSIZE 1024
-#define BBOFF ((off_t)(0))
-#define SBOFF ((off_t)(BBOFF + BBSIZE))
-#define BBLOCK ((daddr_t)(0))
-#define SBLOCK ((daddr_t)(BBLOCK + BBSIZE / DEV_BSIZE))
-
-/*
- * The path name on which the file system is mounted is maintained
- * in fs_fsmnt. MAXMNTLEN defines the amount of space allocated in
- * the super block for this name.
- */
-#define MAXMNTLEN 512
-
-/*
- * Macros for access to superblock array structures
- */
-
-/*
- * Convert cylinder group to base address of its global summary info.
- */
-#define fs_cs(fs, cgindx) (((struct ext2_group_desc *) \
- (fs->s_group_desc[cgindx / EXT2_DESC_PER_BLOCK(fs)]->b_data)) \
- [cgindx % EXT2_DESC_PER_BLOCK(fs)])
-
-/*
- * Turn file system block numbers into disk block addresses.
- * This maps file system blocks to device size blocks.
- */
-#define fsbtodb(fs, b) ((b) << ((fs)->s_fsbtodb))
-#define dbtofsb(fs, b) ((b) >> ((fs)->s_fsbtodb))
-
-/* get group containing inode */
-#define ino_to_cg(fs, x) (((x) - 1) / EXT2_INODES_PER_GROUP(fs))
-
-/* get block containing inode from its number x */
-#define ino_to_fsba(fs, x) fs_cs(fs, ino_to_cg(fs, x)).bg_inode_table + \
- (((x)-1) % EXT2_INODES_PER_GROUP(fs))/EXT2_INODES_PER_BLOCK(fs)
-
-/* get offset for inode in block */
-#define ino_to_fsbo(fs, x) ((x-1) % EXT2_INODES_PER_BLOCK(fs))
-
-/*
- * Give cylinder group number for a file system block.
- * Give cylinder group block number for a file system block.
- */
-#define dtog(fs, d) (((d) - fs->s_es->s_first_data_block) / \
- EXT2_BLOCKS_PER_GROUP(fs))
-#define dtogd(fs, d) (((d) - fs->s_es->s_first_data_block) % \
- EXT2_BLOCKS_PER_GROUP(fs))
-
-/*
- * The following macros optimize certain frequently calculated
- * quantities by using shifts and masks in place of divisions
- * modulos and multiplications.
- */
-#define blkoff(fs, loc) /* calculates (loc % fs->fs_bsize) */ \
- ((loc) & (fs)->s_qbmask)
-
-#define lblktosize(fs, blk) /* calculates (blk * fs->fs_bsize) */ \
- ((blk) << (fs->s_bshift))
-
-#define lblkno(fs, loc) /* calculates (loc / fs->fs_bsize) */ \
- ((loc) >> (fs->s_bshift))
-
-/* no fragments -> logical block number equal # of frags */
-#define numfrags(fs, loc) /* calculates (loc / fs->fs_fsize) */ \
- ((loc) >> (fs->s_bshift))
-
-#define fragroundup(fs, size) /* calculates roundup(size, fs->fs_fsize) */ \
- roundup(size, fs->s_frag_size)
- /* was (((size) + (fs)->fs_qfmask) & (fs)->fs_fmask) */
-
-/*
- * Determining the size of a file block in the file system.
- * easy w/o fragments
- */
-#define blksize(fs, ip, lbn) ((fs)->s_frag_size)
-
-/*
- * INOPB is the number of inodes in a secondary storage block.
- */
-#define INOPB(fs) EXT2_INODES_PER_BLOCK(fs)
-
-/*
- * NINDIR is the number of indirects in a file system block.
- */
-#define NINDIR(fs) (EXT2_ADDR_PER_BLOCK(fs))
-
-extern int inside[], around[];
-extern u_char *fragtbl[];
-
-/* a few remarks about superblock locking/unlocking
- * Linux provides special routines for doing so
- * I haven't figured out yet what BSD does
- * I think I'll try a VOP_LOCK/VOP_UNLOCK on the device vnode
- */
-#define DEVVP(inode) (VFSTOUFS(ITOV(inode)->v_mount)->um_devvp)
-#define lock_super(devvp) vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, curproc)
-#define unlock_super(devvp) VOP_UNLOCK(devvp, 0, curproc)
-
-/*
- * To lock a buffer, set the B_LOCKED flag and then brelse() it. To unlock,
- * reset the B_LOCKED flag and brelse() the buffer back on the LRU list
- */
-#define LCK_BUF(bp) { \
- int s; \
- s = splbio(); \
- (bp)->b_flags |= B_LOCKED; \
- splx(s); \
- brelse(bp); \
-}
-
-#define ULCK_BUF(bp) { \
- long flags; \
- int s; \
- s = splbio(); \
- flags = (bp)->b_flags; \
- (bp)->b_flags &= ~(B_DIRTY | B_LOCKED); \
- BUF_LOCK(bp, LK_EXCLUSIVE); \
- bremfree(bp); \
- splx(s); \
- if (flags & B_DIRTY) \
- bdwrite(bp); \
- else \
- brelse(bp); \
-}
diff --git a/sys/gnu/fs/ext2fs/i386-bitops.h b/sys/gnu/fs/ext2fs/i386-bitops.h
deleted file mode 100644
index 595e870..0000000
--- a/sys/gnu/fs/ext2fs/i386-bitops.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/* $FreeBSD$ */
-/*
- * this is mixture of i386/bitops.h and asm/string.h
- * taken from the Linux source tree
- *
- * XXX replace with Mach routines or reprogram in C
- */
-#ifndef _SYS_GNU_EXT2FS_I386_BITOPS_H_
-#define _SYS_GNU_EXT2FS_I386_BITOPS_H_
-
-/*
- * Copyright 1992, Linus Torvalds.
- */
-
-/*
- * These have to be done with inline assembly: that way the bit-setting
- * is guaranteed to be atomic. All bit operations return 0 if the bit
- * was cleared before the operation and != 0 if it was not.
- *
- * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
- */
-
-/*
- * Some hacks to defeat gcc over-optimizations..
- */
-struct __dummy { unsigned long a[100]; };
-#define ADDR (*(struct __dummy *) addr)
-
-static __inline__ int set_bit(int nr, void * addr)
-{
- int oldbit;
-
- __asm__ __volatile__("btsl %2,%1\n\tsbbl %0,%0"
- :"=r" (oldbit),"=m" (ADDR)
- :"ir" (nr));
- return oldbit;
-}
-
-static __inline__ int clear_bit(int nr, void * addr)
-{
- int oldbit;
-
- __asm__ __volatile__("btrl %2,%1\n\tsbbl %0,%0"
- :"=r" (oldbit),"=m" (ADDR)
- :"ir" (nr));
- return oldbit;
-}
-
-static __inline__ int change_bit(int nr, void * addr)
-{
- int oldbit;
-
- __asm__ __volatile__("btcl %2,%1\n\tsbbl %0,%0"
- :"=r" (oldbit),"=m" (ADDR)
- :"ir" (nr));
- return oldbit;
-}
-
-/*
- * This routine doesn't need to be atomic, but it's faster to code it
- * this way.
- */
-static __inline__ int test_bit(int nr, void * addr)
-{
- int oldbit;
-
- __asm__ __volatile__("btl %2,%1\n\tsbbl %0,%0"
- :"=r" (oldbit)
- :"m" (ADDR),"ir" (nr));
- return oldbit;
-}
-
-/*
- * Find-bit routines..
- */
-static __inline__ int find_first_zero_bit(void * addr, unsigned size)
-{
- int res;
- int _count = (size + 31) >> 5;
-
- if (!size)
- return 0;
- __asm__(" \n\
- cld \n\
- movl $-1,%%eax \n\
- xorl %%edx,%%edx \n\
- repe; scasl \n\
- je 1f \n\
- xorl -4(%%edi),%%eax \n\
- subl $4,%%edi \n\
- bsfl %%eax,%%edx \n\
-1: subl %%ebx,%%edi \n\
- shll $3,%%edi \n\
- addl %%edi,%%edx"
- : "=c" (_count), "=D" (addr), "=d" (res)
- : "0" (_count), "1" (addr), "b" (addr)
- : "ax");
- return res;
-}
-
-static __inline__ int find_next_zero_bit (void * addr, int size, int offset)
-{
- unsigned long * p = ((unsigned long *) addr) + (offset >> 5);
- int set = 0, bit = offset & 31, res;
-
- if (bit) {
- /*
- * Look for zero in first byte
- */
- __asm__(" \n\
- bsfl %1,%0 \n\
- jne 1f \n\
- movl $32, %0 \n\
-1: "
- : "=r" (set)
- : "r" (~(*p >> bit)));
- if (set < (32 - bit))
- return set + offset;
- set = 32 - bit;
- p++;
- }
- /*
- * No zero yet, search remaining full bytes for a zero
- */
- res = find_first_zero_bit (p, size - 32 * (p - (unsigned long *) addr));
- return (offset + set + res);
-}
-
-/*
- * ffz = Find First Zero in word. Undefined if no zero exists,
- * so code should check against ~0UL first..
- */
-static __inline__ unsigned long ffz(unsigned long word)
-{
- __asm__("bsfl %1,%0"
- :"=r" (word)
- :"r" (~word));
- return word;
-}
-
-/*
- * memscan() taken from linux asm/string.h
- */
-/*
- * find the first occurrence of byte 'c', or 1 past the area if none
- */
-static __inline__ char * memscan(void * addr, unsigned char c, int size)
-{
- if (!size)
- return addr;
- __asm__(" \n\
- cld \n\
- repnz; scasb \n\
- jnz 1f \n\
- dec %%edi \n\
-1: "
- : "=D" (addr), "=c" (size)
- : "0" (addr), "1" (size), "a" (c));
- return addr;
-}
-
-#endif /* !_SYS_GNU_EXT2FS_I386_BITOPS_H_ */
diff --git a/sys/gnu/fs/ext2fs/inode.h b/sys/gnu/fs/ext2fs/inode.h
deleted file mode 100644
index 83960b0..0000000
--- a/sys/gnu/fs/ext2fs/inode.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright (c) 1982, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)inode.h 8.9 (Berkeley) 5/14/95
- * $FreeBSD$
- */
-
-#ifndef _UFS_UFS_INODE_H_
-#define _UFS_UFS_INODE_H_
-
-#include <sys/lock.h>
-#include <sys/queue.h>
-#include <ufs/ufs/dinode.h>
-
-/*
- * The size of a logical block number.
- */
-typedef long ufs_lbn_t;
-
-/*
- * This must agree with the definition in <ufs/ufs/dir.h>.
- */
-#define doff_t int32_t
-
-/*
- * The inode is used to describe each active (or recently active) file in the
- * UFS filesystem. It is composed of two types of information. The first part
- * is the information that is needed only while the file is active (such as
- * the identity of the file and linkage to speed its lookup). The second part
- * is the permanent meta-data associated with the file which is read in
- * from the permanent dinode from long term storage when the file becomes
- * active, and is put back when the file is no longer being used.
- */
-struct inode {
- struct lock i_lock; /* Inode lock. >Keep this first< */
- LIST_ENTRY(inode) i_hash;/* Hash chain. */
- struct vnode *i_vnode;/* Vnode associated with this inode. */
- struct vnode *i_devvp;/* Vnode for block I/O. */
- u_int32_t i_flag; /* flags, see below */
- dev_t i_dev; /* Device associated with the inode. */
- ino_t i_number; /* The identity of the inode. */
- int i_effnlink; /* i_nlink when I/O completes */
-
- union { /* Associated filesystem. */
- struct fs *fs; /* FFS */
- struct ext2_sb_info *e2fs; /* EXT2FS */
- } inode_u;
-#define i_fs inode_u.fs
-#define i_e2fs inode_u.e2fs
- struct dquot *i_dquot[MAXQUOTAS]; /* Dquot structures. */
- u_quad_t i_modrev; /* Revision level for NFS lease. */
- struct lockf *i_lockf;/* Head of byte-level lock list. */
- /*
- * Side effects; used during directory lookup.
- */
- int32_t i_count; /* Size of free slot in directory. */
- doff_t i_endoff; /* End of useful stuff in directory. */
- doff_t i_diroff; /* Offset in dir, where we found last entry. */
- doff_t i_offset; /* Offset of free space in directory. */
- ino_t i_ino; /* Inode number of found directory. */
- u_int32_t i_reclen; /* Size of found directory entry. */
- u_int32_t i_spare[4]; /* XXX actually non-spare (for ext2fs). */
- /*
- * The on-disk dinode itself.
- */
- struct dinode i_din; /* 128 bytes of the on-disk dinode. */
-};
-
-#define i_atime i_din.di_atime
-#define i_atimensec i_din.di_atimensec
-#define i_blocks i_din.di_blocks
-#define i_ctime i_din.di_ctime
-#define i_ctimensec i_din.di_ctimensec
-#define i_db i_din.di_db
-#define i_flags i_din.di_flags
-#define i_gen i_din.di_gen
-#define i_gid i_din.di_gid
-#define i_ib i_din.di_ib
-#define i_mode i_din.di_mode
-#define i_mtime i_din.di_mtime
-#define i_mtimensec i_din.di_mtimensec
-#define i_nlink i_din.di_nlink
-#define i_rdev i_din.di_rdev
-#define i_shortlink i_din.di_shortlink
-#define i_size i_din.di_size
-#define i_uid i_din.di_uid
-
-/* These flags are kept in i_flag. */
-#define IN_ACCESS 0x0001 /* Access time update request. */
-#define IN_CHANGE 0x0002 /* Inode change time update request. */
-#define IN_UPDATE 0x0004 /* Modification time update request. */
-#define IN_MODIFIED 0x0008 /* Inode has been modified. */
-#define IN_RENAME 0x0010 /* Inode is being renamed. */
-#define IN_SHLOCK 0x0020 /* File has shared lock. */
-#define IN_EXLOCK 0x0040 /* File has exclusive lock. */
-#define IN_HASHED 0x0080 /* Inode is on hash list */
-#define IN_LAZYMOD 0x0100 /* Modified, but don't write yet. */
-
-#ifdef _KERNEL
-/*
- * Structure used to pass around logical block paths generated by
- * ufs_getlbns and used by truncate and bmap code.
- */
-struct indir {
- ufs_daddr_t in_lbn; /* Logical block number. */
- int in_off; /* Offset in buffer. */
- int in_exists; /* Flag if the block exists. */
-};
-
-/* Convert between inode pointers and vnode pointers. */
-#define VTOI(vp) ((struct inode *)(vp)->v_data)
-#define ITOV(ip) ((ip)->i_vnode)
-
-/* Determine if soft dependencies are being done */
-#define DOINGSOFTDEP(vp) ((vp)->v_mount->mnt_flag & MNT_SOFTDEP)
-#define DOINGASYNC(vp) ((vp)->v_mount->mnt_flag & MNT_ASYNC)
-
-/* This overlays the fid structure (see mount.h). */
-struct ufid {
- u_int16_t ufid_len; /* Length of structure. */
- u_int16_t ufid_pad; /* Force 32-bit alignment. */
- ino_t ufid_ino; /* File number (ino). */
- int32_t ufid_gen; /* Generation number. */
-};
-#endif /* _KERNEL */
-
-#endif /* !_UFS_UFS_INODE_H_ */
diff --git a/sys/gnu/i386/fpemul/Changelog b/sys/gnu/i386/fpemul/Changelog
deleted file mode 100644
index a2fbccd1..0000000
--- a/sys/gnu/i386/fpemul/Changelog
+++ /dev/null
@@ -1,36 +0,0 @@
-This file contains the changes made to W. Metzenthem's 387 FPU
-emulator to make it work under NetBSD.
-
-a, Changes to make it compile:
-
- 1 - Changed the #include's to get the appropriate .h files.
- 2 - Renamed .S to .s, to satisfy the kernel Makefile.
- 3 - Changed the C++ style // comments to /* */
- 4 - Changed the FPU_ORIG_EIP macro. A letter from bde included
- in the package suggested using tf_isp for using instead
- of the linux __orig_eip. This later turned out to interfere
- with the user stack, so i created a separate variable, stored
- in the i387_union.
- 5 - Changed the get_fs_.. put_fs_.. fns to fubyte,fuword,subyte,
- suword.
- 6 - Removed the verify_area fns. I don't really know what they do,
- i suppose they verify access to memory. The sufu routines
- should do this.
-
-b, Changes to make it work:
-
- 1 - Made math_emulate() to return 0 when successful, so trap() won't
- try to generate a signal.
- 2 - Changed the size of the save87 struct in /sys/arch/i387/include/
- npx.h to accomodate the i387_union.
-
-d, Other changes:
-
- 1 - Removed obsolate and/or linux specific stuff.
- 2 - Changed the RE_ENTRANT_CHECK_[ON|OFF] macro to
- REENTRANT_CHECK([ON|OFF]) so indent can grok it.
- 3 - Re-indented to Berkeley style.
- 4 - Limited max no of lookaheads. LOOKAHEAD_LIMIT in fpu_entry.c
-
-
- Szabolcs Szigeti (pink@fsz.bme.hu)
diff --git a/sys/gnu/i386/fpemul/README b/sys/gnu/i386/fpemul/README
deleted file mode 100644
index 0cef6c4..0000000
--- a/sys/gnu/i386/fpemul/README
+++ /dev/null
@@ -1,277 +0,0 @@
-/*
- * wm-FPU-emu an FPU emulator for 80386 and 80486SX microprocessors.
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- */
-
-wm-FPU-emu is an FPU emulator for Linux. It is derived from wm-emu387
-which is my 80387 emulator for djgpp (gcc under msdos); wm-emu387 was
-in turn based upon emu387 which was written by DJ Delorie for djgpp.
-The interface to the Linux kernel is based upon the original Linux
-math emulator by Linus Torvalds.
-
-My target FPU for wm-FPU-emu is that described in the Intel486
-Programmer's Reference Manual (1992 edition). Numerous facets of the
-functioning of the FPU are not well covered in the Reference Manual;
-in the absence of clear details I have made guesses about the most
-reasonable behaviour. Recently, this situation has improved because
-I now have some access to the results produced by a real 80486 FPU.
-
-wm-FPU-emu does not implement all of the behaviour of the 80486 FPU.
-See "Limitations" later in this file for a partial list of some
-differences. I believe that the missing features are never used by
-normal C or FORTRAN programs.
-
-
-Please report bugs, etc to me at:
- apm233m@vaxc.cc.monash.edu.au
-
-
---Bill Metzenthen
- May 1993
-
-
------------------------ Internals of wm-FPU-emu -----------------------
-
-Numeric algorithms:
-(1) Add, subtract, and multiply. Nothing remarkable in these.
-(2) Divide has been tuned to get reasonable performance. The algorithm
- is not the obvious one which most people seem to use, but is designed
- to take advantage of the characteristics of the 80386. I expect that
- it has been invented many times before I discovered it, but I have not
- seen it. It is based upon one of those ideas which one carries around
- for years without ever bothering to check it out.
-(3) The sqrt function has been tuned to get good performance. It is based
- upon Newton's classic method. Performance was improved by capitalizing
- upon the properties of Newton's method, and the code is once again
- structured taking account of the 80386 characteristics.
-(4) The trig, log, and exp functions are based in each case upon quasi-
- "optimal" polynomial approximations. My definition of "optimal" was
- based upon getting good accuracy with reasonable speed.
-
-The code of the emulator is complicated slightly by the need to
-account for a limited form of re-entrancy. Normally, the emulator will
-emulate each FPU instruction to completion without interruption.
-However, it may happen that when the emulator is accessing the user
-memory space, swapping may be needed. In this case the emulator may be
-temporarily suspended while disk i/o takes place. During this time
-another process may use the emulator, thereby changing some static
-variables (eg FPU_st0_ptr, etc). The code which accesses user memory
-is confined to five files:
- fpu_entry.c
- reg_ld_str.c
- load_store.c
- get_address.c
- errors.c
-
------------------------ Limitations of wm-FPU-emu -----------------------
-
-There are a number of differences between the current wm-FPU-emu
-(version beta 1.4) and the 80486 FPU (apart from bugs). Some of the
-more important differences are listed below:
-
-All internal computations are performed at 64 bit or higher precision
-and rounded etc as required by the PC bits of the FPU control word.
-Under the crt0 version for Linux current at March 1993, the FPU PC
-bits specify 53 bits precision.
-
-The precision flag (PE of the FPU status word) and the Roundup flag
-(C1 of the status word) are now partially implemented. Does anyone
-write code which uses these features?
-
-The functions which load/store the FPU state are partially implemented,
-but the implementation should be sufficient for handling FPU errors etc
-in 32 bit protected mode.
-
-The implementation of the exception mechanism is flawed for unmasked
-interrupts.
-
-Detection of certain conditions, such as denormal operands, is not yet
-complete.
-
------------------------ Performance of wm-FPU-emu -----------------------
-
-Speed.
------
-
-The speed of floating point computation with the emulator will depend
-upon instruction mix. Relative performance is best for the instructions
-which require most computation. The simple instructions are adversely
-affected by the fpu instruction trap overhead.
-
-
-Timing: Some simple timing tests have been made on the emulator functions.
-The times include load/store instructions. All times are in microseconds
-measured on a 33MHz 386 with 64k cache. The Turbo C tests were under
-ms-dos, the next two columns are for emulators running with the djgpp
-ms-dos extender. The final column is for wm-FPU-emu in Linux 0.97,
-using libm4.0 (hard).
-
-function Turbo C djgpp 1.06 WM-emu387 wm-FPU-emu
-
- + 60.5 154.8 76.5 139.4
- - 61.1-65.5 157.3-160.8 76.2-79.5 142.9-144.7
- * 71.0 190.8 79.6 146.6
- / 61.2-75.0 261.4-266.9 75.3-91.6 142.2-158.1
-
- sin() 310.8 4692.0 319.0 398.5
- cos() 284.4 4855.2 308.0 388.7
- tan() 495.0 8807.1 394.9 504.7
- atan() 328.9 4866.4 601.1 419.5-491.9
-
- sqrt() 128.7 crashed 145.2 227.0
- log() 413.1-419.1 5103.4-5354.21 254.7-282.2 409.4-437.1
- exp() 479.1 6619.2 469.1 850.8
-
-
-The performance under Linux is improved by the use of look-ahead code.
-The following results show the improvement which is obtained under
-Linux due to the look-ahead code. Also given are the times for the
-original Linux emulator with the 4.1 'soft' lib.
-
- [ Linus' note: I changed look-ahead to be the default under linux, as
- there was no reason not to use it after I had edited it to be
- disabled during tracing ]
-
- wm-FPU-emu w original w
- look-ahead 'soft' lib
- + 106.4 190.2
- - 108.6-111.6 192.4-216.2
- * 113.4 193.1
- / 108.8-124.4 700.1-706.2
-
- sin() 390.5 2642.0
- cos() 381.5 2767.4
- tan() 496.5 3153.3
- atan() 367.2-435.5 2439.4-3396.8
-
- sqrt() 195.1 4732.5
- log() 358.0-387.5 3359.2-3390.3
- exp() 619.3 4046.4
-
-
-These figures are now somewhat out-of-date. The emulator has become
-progressively slower for most functions as more of the 80486 features
-have been implemented.
-
-
------------------------ Accuracy of wm-FPU-emu -----------------------
-
-
-Accuracy: The following table gives the accuracy of the sqrt(), trig
-and log functions. Each function was tested at about 400 points. Ideal
-results would be 64 bits. The reduced accuracy of cos() and tan() for
-arguments greater than pi/4 can be thought of as being due to the
-precision of the argument x; e.g. an argument of pi/2-(1e-10) which is
-accurate to 64 bits can result in a relative accuracy in cos() of about
-64 + log2(cos(x)) = 31 bits. Results for the Turbo C emulator are given
-in the last column.
-
-
-Function Tested x range Worst result (bits) Turbo C
-
-sqrt(x) 1 .. 2 64.1 63.2
-atan(x) 1e-10 .. 200 62.6 62.8
-cos(x) 0 .. pi/2-(1e-10) 63.2 (x <= pi/4) 62.4
- 35.2 (x = pi/2-(1e-10)) 31.9
-sin(x) 1e-10 .. pi/2 63.0 62.8
-tan(x) 1e-10 .. pi/2-(1e-10) 62.4 (x <= pi/4) 62.1
- 35.2 (x = pi/2-(1e-10)) 31.9
-exp(x) 0 .. 1 63.1 62.9
-log(x) 1+1e-6 .. 2 62.4 62.1
-
-
-As of version 1.3 of the emulator, the accuracy of the basic
-arithmetic has been improved (by a small fraction of a bit). Care has
-been taken to ensure full accuracy of the rounding of the basic
-arithmetic functions (+,-,*,/,and fsqrt), and they all now produce
-results which are exact to the 64th bit (unless there are any bugs
-left). To ensure this, it was necessary to effectively get information
-of up to about 128 bits precision. The emulator now passes the
-"paranoia" tests (compiled with gcc 2.3.3) for 'float' variables (24
-bit precision numbers) when precision control is set to 24, 53 or 64
-bits, and for 'double' variables (53 bit precision numbers) when
-precision control is set to 53 bits (a properly performing FPU cannot
-pass the 'paranoia' tests for 'double' variables when precision
-control is set to 64 bits).
-
-------------------------- Contributors -------------------------------
-
-A number of people have contributed to the development of the
-emulator, often by just reporting bugs, sometimes with a suggested
-fix, and a few kind people have provided me with access in one way or
-another to an 80486 machine. Contributors include (to those people who
-I have forgotten, please excuse me):
-
-Linus Torvalds
-Tommy.Thorn@daimi.aau.dk
-Andrew.Tridgell@anu.edu.au
-Nick Holloway alfie@dcs.warwick.ac.uk
-Hermano Moura moura@dcs.gla.ac.uk
-Jon Jagger J.Jagger@scp.ac.uk
-Lennart Benschop
-Brian Gallew geek+@CMU.EDU
-Thomas Staniszewski ts3v+@andrew.cmu.edu
-Martin Howell mph@plasma.apana.org.au
-M Saggaf alsaggaf@athena.mit.edu
-Peter Barker PETER@socpsy.sci.fau.edu
-tom@vlsivie.tuwien.ac.at
-Dan Russel russed@rpi.edu
-Daniel Carosone danielce@ee.mu.oz.au
-cae@jpmorgan.com
-Hamish Coleman t933093@minyos.xx.rmit.oz.au
-
-...and numerous others who responded to my request for help with
-a real 80486.
-
diff --git a/sys/gnu/i386/fpemul/control_w.h b/sys/gnu/i386/fpemul/control_w.h
deleted file mode 100644
index 5c7aca4..0000000
--- a/sys/gnu/i386/fpemul/control_w.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * control_w.h
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-#ifndef _CONTROLW_H_
-#define _CONTROLW_H_
-
-#ifdef LOCORE
-#define _Const_(x) $/**/x
-#else
-#define _Const_(x) x
-#endif
-
-#define CW_RC _Const_(0x0C00) /* rounding control */
-#define CW_PC _Const_(0x0300) /* precision control */
-
-#define CW_Precision Const_(0x0020) /* loss of precision mask */
-#define CW_Underflow Const_(0x0010) /* underflow mask */
-#define CW_Overflow Const_(0x0008) /* overflow mask */
-#define CW_ZeroDiv Const_(0x0004) /* divide by zero mask */
-#define CW_Denormal Const_(0x0002) /* denormalized operand mask */
-#define CW_Invalid Const_(0x0001) /* invalid operation mask */
-
-#define CW_Exceptions _Const_(0x003f) /* all masks */
-
-#define RC_RND _Const_(0x0000)
-#define RC_DOWN _Const_(0x0400)
-#define RC_UP _Const_(0x0800)
-#define RC_CHOP _Const_(0x0C00)
-
-/* p 15-5: Precision control bits affect only the following:
- ADD, SUB(R), MUL, DIV(R), and SQRT */
-#define PR_24_BITS _Const_(0x000)
-#define PR_53_BITS _Const_(0x200)
-#define PR_64_BITS _Const_(0x300)
-/* FULL_PRECISION simulates all exceptions masked */
-#define FULL_PRECISION (PR_64_BITS | RC_RND | 0x3f)
-
-#endif /* _CONTROLW_H_ */
diff --git a/sys/gnu/i386/fpemul/div_small.s b/sys/gnu/i386/fpemul/div_small.s
deleted file mode 100644
index 944a93f..0000000
--- a/sys/gnu/i386/fpemul/div_small.s
+++ /dev/null
@@ -1,97 +0,0 @@
- .file "div_small.S"
-/*
- * div_small.S
- *
- * Divide a 64 bit integer by a 32 bit integer & return remainder.
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-/*---------------------------------------------------------------------------+
- | unsigned long div_small(unsigned long long *x, unsigned long y) |
- +---------------------------------------------------------------------------*/
-
-#include <gnu/i386/fpemul/fpu_asm.h>
-
-.text
-ENTRY(div_small)
- pushl %ebp
- movl %esp,%ebp
-
- pushl %esi
-
- movl PARAM1,%esi /* pointer to num */
- movl PARAM2,%ecx /* The denominator */
-
- movl 4(%esi),%eax /* Get the current num msw */
- xorl %edx,%edx
- divl %ecx
-
- movl %eax,4(%esi)
-
- movl (%esi),%eax /* Get the num lsw */
- divl %ecx
-
- movl %eax,(%esi)
-
- movl %edx,%eax /* Return the remainder in eax */
-
- popl %esi
-
- leave
- ret
-
diff --git a/sys/gnu/i386/fpemul/errors.c b/sys/gnu/i386/fpemul/errors.c
deleted file mode 100644
index 7ee9136..0000000
--- a/sys/gnu/i386/fpemul/errors.c
+++ /dev/null
@@ -1,608 +0,0 @@
-/*
- * errors.c
- *
- * The error handling functions for wm-FPU-emu
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-/*---------------------------------------------------------------------------+
- | Note: |
- | The file contains code which accesses user memory. |
- | Emulator static data may change when user memory is accessed, due to |
- | other processes using the emulator while swapping is in progress. |
- +---------------------------------------------------------------------------*/
-
-
-
-
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-#include <machine/pcb.h>
-
-#include <gnu/i386/fpemul/fpu_emu.h>
-#include <gnu/i386/fpemul/fpu_system.h>
-#include <gnu/i386/fpemul/exception.h>
-#include <gnu/i386/fpemul/status_w.h>
-#include <gnu/i386/fpemul/control_w.h>
-#include <gnu/i386/fpemul/reg_constant.h>
-#include <gnu/i386/fpemul/version.h>
-
-/* */
-#undef PRINT_MESSAGES
-/* */
-
-
-void
-Un_impl(void)
-{
- unsigned char byte1, FPU_modrm;
-
- REENTRANT_CHECK(OFF);
- byte1 = fubyte((unsigned char *) FPU_ORIG_EIP);
- FPU_modrm = fubyte(1 + (unsigned char *) FPU_ORIG_EIP);
-
- printf("Unimplemented FPU Opcode at eip=%#08x : %02x ",
- FPU_ORIG_EIP, byte1);
-
- if (FPU_modrm >= 0300)
- printf("%02x (%02x+%d)\n", FPU_modrm, FPU_modrm & 0xf8, FPU_modrm & 7);
- else
- printf("/%d\n", (FPU_modrm >> 3) & 7);
- REENTRANT_CHECK(ON);
-
- EXCEPTION(EX_Invalid);
-
-}
-
-
-
-
-void
-emu_printall()
-{
- int i;
- static char *tag_desc[] = {"Valid", "Zero", "ERROR", "ERROR",
- "DeNorm", "Inf", "NaN", "Empty"};
- unsigned char byte1, FPU_modrm;
-
- REENTRANT_CHECK(OFF);
- byte1 = fubyte((unsigned char *) FPU_ORIG_EIP);
- FPU_modrm = fubyte(1 + (unsigned char *) FPU_ORIG_EIP);
-
-#ifdef DEBUGGING
- if (status_word & SW_Backward)
- printf("SW: backward compatibility\n");
- if (status_word & SW_C3)
- printf("SW: condition bit 3\n");
- if (status_word & SW_C2)
- printf("SW: condition bit 2\n");
- if (status_word & SW_C1)
- printf("SW: condition bit 1\n");
- if (status_word & SW_C0)
- printf("SW: condition bit 0\n");
- if (status_word & SW_Summary)
- printf("SW: exception summary\n");
- if (status_word & SW_Stack_Fault)
- printf("SW: stack fault\n");
- if (status_word & SW_Precision)
- printf("SW: loss of precision\n");
- if (status_word & SW_Underflow)
- printf("SW: underflow\n");
- if (status_word & SW_Overflow)
- printf("SW: overflow\n");
- if (status_word & SW_Zero_Div)
- printf("SW: divide by zero\n");
- if (status_word & SW_Denorm_Op)
- printf("SW: denormalized operand\n");
- if (status_word & SW_Invalid)
- printf("SW: invalid operation\n");
-#endif /* DEBUGGING */
-
- status_word = status_word & ~SW_Top;
- status_word |= (top & 7) << SW_Top_Shift;
-
- printf("At %#08x: %02x ", FPU_ORIG_EIP, byte1);
- if (FPU_modrm >= 0300)
- printf("%02x (%02x+%d)\n", FPU_modrm, FPU_modrm & 0xf8, FPU_modrm & 7);
- else
- printf("/%d, mod=%d rm=%d\n",
- (FPU_modrm >> 3) & 7, (FPU_modrm >> 6) & 3, FPU_modrm & 7);
-
- printf(" SW: b=%d st=%d es=%d sf=%d cc=%d%d%d%d ef=%d%d%d%d%d%d\n",
- status_word & 0x8000 ? 1 : 0, /* busy */
- (int)((status_word & 0x3800) >> 11), /* stack top pointer */
- status_word & 0x80 ? 1 : 0, /* Error summary status */
- status_word & 0x40 ? 1 : 0, /* Stack flag */
- status_word & SW_C3 ? 1 : 0, status_word & SW_C2 ? 1 : 0, /* cc */
- status_word & SW_C1 ? 1 : 0, status_word & SW_C0 ? 1 : 0, /* cc */
- status_word & SW_Precision ? 1 : 0, status_word & SW_Underflow ? 1 : 0,
- status_word & SW_Overflow ? 1 : 0, status_word & SW_Zero_Div ? 1 : 0,
- status_word & SW_Denorm_Op ? 1 : 0, status_word & SW_Invalid ? 1 : 0);
-
- printf(" CW: ic=%d rc=%d%d pc=%d%d iem=%d ef=%d%d%d%d%d%d\n",
- control_word & 0x1000 ? 1 : 0,
- (int)((control_word & 0x800) >> 11),
- (int)((control_word & 0x400) >> 10),
- (int)((control_word & 0x200) >> 9),
- (int)((control_word & 0x100) >> 8),
- control_word & 0x80 ? 1 : 0,
- control_word & SW_Precision ? 1 : 0, control_word & SW_Underflow ? 1 : 0,
- control_word & SW_Overflow ? 1 : 0, control_word & SW_Zero_Div ? 1 : 0,
- control_word & SW_Denorm_Op ? 1 : 0, control_word & SW_Invalid ? 1 : 0);
-
- for (i = 0; i < 8; i++) {
- FPU_REG *r = &st(i);
- switch (r->tag) {
- case TW_Empty:
- continue;
- break;
- case TW_Zero:
- printf("st(%d) %c .0000 0000 0000 0000 ",
- i, r->sign ? '-' : '+');
- break;
- case TW_Valid:
- case TW_NaN:
- case TW_Denormal:
- case TW_Infinity:
- printf("st(%d) %c .%04lx %04lx %04lx %04lx e%+-6ld ",
- i, r->sign ? '-' : '+', r->sigh >> 16,
- r->sigh & 0xFFFF, r->sigl >> 16, r->sigl & 0xFFFF,
- r->exp - EXP_BIAS + 1);
- break;
- default:
- printf("Whoops! Error in errors.c ");
- break;
- }
- printf("%s\n", tag_desc[(int) (unsigned) r->tag]);
- }
-
- printf("[data] %c .%04lx %04lx %04lx %04lx e%+-6ld ",
- FPU_loaded_data.sign ? '-' : '+', FPU_loaded_data.sigh >> 16,
- FPU_loaded_data.sigh & 0xFFFF, FPU_loaded_data.sigl >> 16,
- FPU_loaded_data.sigl & 0xFFFF, FPU_loaded_data.exp - EXP_BIAS + 1);
- printf("%s\n", tag_desc[(int) (unsigned) FPU_loaded_data.tag]);
- REENTRANT_CHECK(ON);
-
-}
-
-static struct {
- int type;
- char *name;
-} exception_names[] = {
- {
- EX_StackOver, "stack overflow"
- },
- {
- EX_StackUnder, "stack underflow"
- },
- {
- EX_Precision, "loss of precision"
- },
- {
- EX_Underflow, "underflow"
- },
- {
- EX_Overflow, "overflow"
- },
- {
- EX_ZeroDiv, "divide by zero"
- },
- {
- EX_Denormal, "denormalized operand"
- },
- {
- EX_Invalid, "invalid operation"
- },
- {
- EX_INTERNAL, "INTERNAL BUG in " FPU_VERSION
- },
- {
- 0, NULL
- }
-};
-/*
- EX_INTERNAL is always given with a code which indicates where the
- error was detected.
-
- Internal error types:
- 0x14 in e14.c
- 0x1nn in a *.c file:
- 0x101 in reg_add_sub.c
- 0x102 in reg_mul.c
- 0x103 in poly_sin.c
- 0x104 in poly_tan.c
- 0x105 in reg_mul.c
- 0x106 in reg_mov.c
- 0x107 in fpu_trig.c
- 0x108 in reg_compare.c
- 0x109 in reg_compare.c
- 0x110 in reg_add_sub.c
- 0x111 in interface.c
- 0x112 in fpu_trig.c
- 0x113 in reg_add_sub.c
- 0x114 in reg_ld_str.c
- 0x115 in fpu_trig.c
- 0x116 in fpu_trig.c
- 0x117 in fpu_trig.c
- 0x118 in fpu_trig.c
- 0x119 in fpu_trig.c
- 0x120 in poly_atan.c
- 0x121 in reg_compare.c
- 0x122 in reg_compare.c
- 0x123 in reg_compare.c
- 0x2nn in an *.s file:
- 0x201 in reg_u_add.S
- 0x202 in reg_u_div.S
- 0x203 in reg_u_div.S
- 0x204 in reg_u_div.S
- 0x205 in reg_u_mul.S
- 0x206 in reg_u_sub.S
- 0x207 in wm_sqrt.S
- 0x208 in reg_div.S
- 0x209 in reg_u_sub.S
- 0x210 in reg_u_sub.S
- 0x211 in reg_u_sub.S
- 0x212 in reg_u_sub.S
- 0x213 in wm_sqrt.S
- 0x214 in wm_sqrt.S
- 0x215 in wm_sqrt.S
- 0x216 in reg_round.S
- 0x217 in reg_round.S
- 0x218 in reg_round.S
- */
-
-void
-exception(int n)
-{
- int i, int_type;
-
- int_type = 0; /* Needed only to stop compiler warnings */
- if (n & EX_INTERNAL) {
- int_type = n - EX_INTERNAL;
- n = EX_INTERNAL;
- /* Set lots of exception bits! */
- status_word |= (SW_Exc_Mask | SW_Summary | FPU_BUSY);
- } else {
- /* Extract only the bits which we use to set the status word */
- n &= (SW_Exc_Mask);
- /* Set the corresponding exception bit */
- status_word |= n;
- if (status_word & ~control_word & CW_Exceptions)
- status_word |= SW_Summary;
- if (n & (SW_Stack_Fault | EX_Precision)) {
- if (!(n & SW_C1))
- /* This bit distinguishes over- from underflow
- * for a stack fault, and roundup from
- * round-down for precision loss. */
- status_word &= ~SW_C1;
- }
- }
-
- REENTRANT_CHECK(OFF);
- if ((~control_word & n & CW_Exceptions) || (n == EX_INTERNAL)) {
-#ifdef PRINT_MESSAGES
- /* My message from the sponsor */
- printf(FPU_VERSION " " __DATE__ " (C) W. Metzenthen.\n");
-#endif /* PRINT_MESSAGES */
-
- /* Get a name string for error reporting */
- for (i = 0; exception_names[i].type; i++)
- if ((exception_names[i].type & n) == exception_names[i].type)
- break;
-
- if (exception_names[i].type) {
-#ifdef PRINT_MESSAGES
- printf("FP Exception: %s!\n", exception_names[i].name);
-#endif /* PRINT_MESSAGES */
- } else
- printf("FP emulator: Unknown Exception: 0x%04x!\n", n);
-
- if (n == EX_INTERNAL) {
- printf("FP emulator: Internal error type 0x%04x\n", int_type);
- emu_printall();
- }
-#ifdef PRINT_MESSAGES
- else
- emu_printall();
-#endif /* PRINT_MESSAGES */
-
- /* The 80486 generates an interrupt on the next non-control
- * FPU instruction. So we need some means of flagging it. We
- * use the ES (Error Summary) bit for this, assuming that this
- * is the way a real FPU does it (until I can check it out),
- * if not, then some method such as the following kludge might
- * be needed. */
-/* regs[0].tag |= TW_FPU_Interrupt; */
- }
- REENTRANT_CHECK(ON);
-
-#ifdef __DEBUG__
- math_abort(SIGFPE);
-#endif /* __DEBUG__ */
-
-}
-
-
-/* Real operation attempted on two operands, one a NaN */
-void
-real_2op_NaN(FPU_REG * a, FPU_REG * b, FPU_REG * dest)
-{
- FPU_REG *x;
- int signalling;
-
- x = a;
- if (a->tag == TW_NaN) {
- if (b->tag == TW_NaN) {
- signalling = !(a->sigh & b->sigh & 0x40000000);
- /* find the "larger" */
- if (*(long long *) &(a->sigl) < *(long long *) &(b->sigl))
- x = b;
- } else {
- /* return the quiet version of the NaN in a */
- signalling = !(a->sigh & 0x40000000);
- }
- } else
-#ifdef PARANOID
- if (b->tag == TW_NaN)
-#endif /* PARANOID */
- {
- signalling = !(b->sigh & 0x40000000);
- x = b;
- }
-#ifdef PARANOID
- else {
- signalling = 0;
- EXCEPTION(EX_INTERNAL | 0x113);
- x = &CONST_QNaN;
- }
-#endif /* PARANOID */
-
- if (!signalling) {
- if (!(x->sigh & 0x80000000)) /* pseudo-NaN ? */
- x = &CONST_QNaN;
- reg_move(x, dest);
- return;
- }
- if (control_word & CW_Invalid) {
- /* The masked response */
- if (!(x->sigh & 0x80000000)) /* pseudo-NaN ? */
- x = &CONST_QNaN;
- reg_move(x, dest);
- /* ensure a Quiet NaN */
- dest->sigh |= 0x40000000;
- }
- EXCEPTION(EX_Invalid);
-
- return;
-}
-/* Invalid arith operation on Valid registers */
-void
-arith_invalid(FPU_REG * dest)
-{
-
- if (control_word & CW_Invalid) {
- /* The masked response */
- reg_move(&CONST_QNaN, dest);
- }
- EXCEPTION(EX_Invalid);
-
- return;
-
-}
-
-
-/* Divide a finite number by zero */
-void
-divide_by_zero(int sign, FPU_REG * dest)
-{
-
- if (control_word & CW_ZeroDiv) {
- /* The masked response */
- reg_move(&CONST_INF, dest);
- dest->sign = (unsigned char) sign;
- }
- EXCEPTION(EX_ZeroDiv);
-
- return;
-
-}
-
-
-/* This may be called often, so keep it lean */
-void
-set_precision_flag_up(void)
-{
- if (control_word & CW_Precision)
- status_word |= (SW_Precision | SW_C1); /* The masked response */
- else
- exception(EX_Precision | SW_C1);
-
-}
-
-
-/* This may be called often, so keep it lean */
-void
-set_precision_flag_down(void)
-{
- if (control_word & CW_Precision) { /* The masked response */
- status_word &= ~SW_C1;
- status_word |= SW_Precision;
- } else
- exception(EX_Precision);
-}
-
-
-int
-denormal_operand(void)
-{
- if (control_word & CW_Denormal) { /* The masked response */
- status_word |= SW_Denorm_Op;
- return 0;
- } else {
- exception(EX_Denormal);
- return 1;
- }
-}
-
-
-void
-arith_overflow(FPU_REG * dest)
-{
-
- if (control_word & CW_Overflow) {
- char sign;
- /* The masked response */
-/* **** The response here depends upon the rounding mode */
- sign = dest->sign;
- reg_move(&CONST_INF, dest);
- dest->sign = sign;
- } else {
- /* Subtract the magic number from the exponent */
- dest->exp -= (3 * (1 << 13));
- }
-
- /* By definition, precision is lost. It appears that the roundup bit
- * (C1) is also set by convention. */
- EXCEPTION(EX_Overflow | EX_Precision | SW_C1);
-
- return;
-
-}
-
-
-void
-arith_underflow(FPU_REG * dest)
-{
-
- if (control_word & CW_Underflow) {
- /* The masked response */
- if (dest->exp <= EXP_UNDER - 63)
- reg_move(&CONST_Z, dest);
- } else {
- /* Add the magic number to the exponent */
- dest->exp += (3 * (1 << 13));
- }
-
- EXCEPTION(EX_Underflow);
-
- return;
-}
-
-
-void
-stack_overflow(void)
-{
-
- if (control_word & CW_Invalid) {
- /* The masked response */
- top--;
- reg_move(&CONST_QNaN, FPU_st0_ptr = &st(0));
- }
- EXCEPTION(EX_StackOver);
-
- return;
-
-}
-
-
-void
-stack_underflow(void)
-{
-
- if (control_word & CW_Invalid) {
- /* The masked response */
- reg_move(&CONST_QNaN, FPU_st0_ptr);
- }
- EXCEPTION(EX_StackUnder);
-
- return;
-
-}
-
-
-void
-stack_underflow_i(int i)
-{
-
- if (control_word & CW_Invalid) {
- /* The masked response */
- reg_move(&CONST_QNaN, &(st(i)));
- }
- EXCEPTION(EX_StackUnder);
-
- return;
-
-}
-
-
-void
-stack_underflow_pop(int i)
-{
-
- if (control_word & CW_Invalid) {
- /* The masked response */
- reg_move(&CONST_QNaN, &(st(i)));
- pop();
- }
- EXCEPTION(EX_StackUnder);
-
- return;
-
-}
diff --git a/sys/gnu/i386/fpemul/exception.h b/sys/gnu/i386/fpemul/exception.h
deleted file mode 100644
index 50e7d60..0000000
--- a/sys/gnu/i386/fpemul/exception.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * exception.h
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- *
- */
-
-#ifndef _EXCEPTION_H_
-#define _EXCEPTION_H_
-
-
-#ifdef LOCORE
-#define Const_(x) $/**/x
-#else
-#define Const_(x) x
-#endif
-
-#ifndef SW_C1
-#include <gnu/i386/fpemul/fpu_emu.h>
-#endif /* SW_C1 */
-
-#define FPU_BUSY Const_(0x8000) /* FPU busy bit (8087 compatibility) */
-#define EX_ErrorSummary Const_(0x0080) /* Error summary status */
-/* Special exceptions: */
-#define EX_INTERNAL Const_(0x8000) /* Internal error in wm-FPU-emu */
-#define EX_StackOver Const_(0x0041|SW_C1) /* stack overflow */
-#define EX_StackUnder Const_(0x0041) /* stack underflow */
-/* Exception flags: */
-#define EX_Precision Const_(0x0020) /* loss of precision */
-#define EX_Underflow Const_(0x0010) /* underflow */
-#define EX_Overflow Const_(0x0008) /* overflow */
-#define EX_ZeroDiv Const_(0x0004) /* divide by zero */
-#define EX_Denormal Const_(0x0002) /* denormalized operand */
-#define EX_Invalid Const_(0x0001) /* invalid operation */
-
-
-#ifndef LOCORE
-
-#ifdef DEBUG
-#define EXCEPTION(x) \
- do { \
- printf("exception in %s at line %d\n", __FILE__, __LINE__); \
- exception(x); \
- } while (0)
-#else
-#define EXCEPTION(x) exception(x)
-#endif
-
-#endif /* LOCORE */
-
-#endif /* _EXCEPTION_H_ */
diff --git a/sys/gnu/i386/fpemul/fpu_arith.c b/sys/gnu/i386/fpemul/fpu_arith.c
deleted file mode 100644
index e8fa93f..0000000
--- a/sys/gnu/i386/fpemul/fpu_arith.c
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * fpu_arith.c
- *
- * Code to implement the FPU register/register arithmetic instructions
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-
-
-
-#include <sys/param.h>
-#include <sys/proc.h>
-#include <machine/pcb.h>
-
-#include <gnu/i386/fpemul/fpu_emu.h>
-#include <gnu/i386/fpemul/fpu_system.h>
-
-
-void
-fadd__()
-{
- /* fadd st,st(i) */
- reg_add(FPU_st0_ptr, &st(FPU_rm), FPU_st0_ptr, control_word);
-}
-
-
-void
-fmul__()
-{
- /* fmul st,st(i) */
- reg_mul(FPU_st0_ptr, &st(FPU_rm), FPU_st0_ptr, control_word);
-}
-
-
-
-void
-fsub__()
-{
- /* fsub st,st(i) */
- reg_sub(FPU_st0_ptr, &st(FPU_rm), FPU_st0_ptr, control_word);
-}
-
-
-void
-fsubr_()
-{
- /* fsubr st,st(i) */
- reg_sub(&st(FPU_rm), FPU_st0_ptr, FPU_st0_ptr, control_word);
-}
-
-
-void
-fdiv__()
-{
- /* fdiv st,st(i) */
- reg_div(FPU_st0_ptr, &st(FPU_rm), FPU_st0_ptr, control_word);
-}
-
-
-void
-fdivr_()
-{
- /* fdivr st,st(i) */
- reg_div(&st(FPU_rm), FPU_st0_ptr, FPU_st0_ptr, control_word);
-}
-
-
-
-void
-fadd_i()
-{
- /* fadd st(i),st */
- reg_add(FPU_st0_ptr, &st(FPU_rm), &st(FPU_rm), control_word);
-}
-
-
-void
-fmul_i()
-{
- /* fmul st(i),st */
- reg_mul(&st(FPU_rm), FPU_st0_ptr, &st(FPU_rm), control_word);
-}
-
-
-void
-fsubri()
-{
- /* fsubr st(i),st */
- /* This is the sense of the 80486 manual reg_sub(&st(FPU_rm),
- * FPU_st0_ptr, &st(FPU_rm), control_word); */
- reg_sub(FPU_st0_ptr, &st(FPU_rm), &st(FPU_rm), control_word);
-}
-
-
-void
-fsub_i()
-{
- /* fsub st(i),st */
- /* This is the sense of the 80486 manual reg_sub(FPU_st0_ptr,
- * &st(FPU_rm), &st(FPU_rm), control_word); */
- reg_sub(&st(FPU_rm), FPU_st0_ptr, &st(FPU_rm), control_word);
-}
-
-
-void
-fdivri()
-{
- /* fdivr st(i),st */
- reg_div(FPU_st0_ptr, &st(FPU_rm), &st(FPU_rm), control_word);
-}
-
-
-void
-fdiv_i()
-{
- /* fdiv st(i),st */
- reg_div(&st(FPU_rm), FPU_st0_ptr, &st(FPU_rm), control_word);
-}
-
-
-
-void
-faddp_()
-{
- /* faddp st(i),st */
- reg_add(FPU_st0_ptr, &st(FPU_rm), &st(FPU_rm), control_word);
- pop();
-}
-
-
-void
-fmulp_()
-{
- /* fmulp st(i),st */
- reg_mul(&st(FPU_rm), FPU_st0_ptr, &st(FPU_rm), control_word);
- pop();
-}
-
-
-
-void
-fsubrp()
-{
- /* fsubrp st(i),st */
- /* This is the sense of the 80486 manual reg_sub(&st(FPU_rm),
- * FPU_st0_ptr, &st(FPU_rm), control_word); */
- reg_sub(FPU_st0_ptr, &st(FPU_rm), &st(FPU_rm), control_word);
- pop();
-}
-
-
-void
-fsubp_()
-{
- /* fsubp st(i),st */
- /* This is the sense of the 80486 manual reg_sub(FPU_st0_ptr,
- * &st(FPU_rm), &st(FPU_rm), control_word); */
- reg_sub(&st(FPU_rm), FPU_st0_ptr, &st(FPU_rm), control_word);
- pop();
-}
-
-
-void
-fdivrp()
-{
- /* fdivrp st(i),st */
- reg_div(FPU_st0_ptr, &st(FPU_rm), &st(FPU_rm), control_word);
- pop();
-}
-
-
-void
-fdivp_()
-{
- /* fdivp st(i),st */
- reg_div(&st(FPU_rm), FPU_st0_ptr, &st(FPU_rm), control_word);
- pop();
-}
diff --git a/sys/gnu/i386/fpemul/fpu_asm.h b/sys/gnu/i386/fpemul/fpu_asm.h
deleted file mode 100644
index ab505e9..0000000
--- a/sys/gnu/i386/fpemul/fpu_asm.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * fpu_asm.h
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-#ifndef _FPU_ASM_H_
-#define _FPU_ASM_H_
-
-#include <machine/asmacros.h>
-#include <gnu/i386/fpemul/fpu_emu.h>
-
-#define EXCEPTION _exception
-
-
-#define PARAM1 8(%ebp)
-#define PARAM2 12(%ebp)
-#define PARAM3 16(%ebp)
-#define PARAM4 20(%ebp)
-
-#define SIGL_OFFSET 8
-#define SIGN(x) (x)
-#define TAG(x) 1(x)
-#define EXP(x) 4(x)
-#define SIG(x) SIGL_OFFSET/**/(x)
-#define SIGL(x) SIGL_OFFSET/**/(x)
-#define SIGH(x) 12(x)
-
-#endif /* _FPU_ASM_H_ */
diff --git a/sys/gnu/i386/fpemul/fpu_aux.c b/sys/gnu/i386/fpemul/fpu_aux.c
deleted file mode 100644
index 71b759f..0000000
--- a/sys/gnu/i386/fpemul/fpu_aux.c
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- * fpu_aux.c
- *
- * Code to implement some of the FPU auxiliary instructions.
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-
-#include <sys/param.h>
-#ifdef DEBUG
-#include <sys/systm.h> /* for printf() in EXCEPTION() */
-#endif
-#include <sys/proc.h>
-#include <machine/cpu.h>
-#include <machine/pcb.h>
-
-#include <gnu/i386/fpemul/fpu_emu.h>
-#include <gnu/i386/fpemul/fpu_system.h>
-#include <gnu/i386/fpemul/exception.h>
-#include <gnu/i386/fpemul/status_w.h>
-
-
-static void
-fclex(void)
-{
- status_word &= ~(SW_Backward | SW_Summary | SW_Stack_Fault | SW_Precision |
- SW_Underflow | SW_Overflow | SW_Zero_Div | SW_Denorm_Op |
- SW_Invalid);
- FPU_entry_eip = ip_offset; /* We want no net effect */
-}
-/* Needs to be externally visible */
-void
-finit()
-{
- int r;
- control_word = 0x037f;
- status_word = 0;
- top = 0; /* We don't keep top in the status word
- * internally. */
- for (r = 0; r < 8; r++) {
- regs[r].tag = TW_Empty;
- }
- FPU_entry_eip = ip_offset = 0;
-}
-
-static FUNC finit_table[] = {
- Un_impl, Un_impl, fclex, finit, Un_impl, Un_impl, Un_impl, Un_impl
-};
-
-void
-finit_()
-{
- (finit_table[FPU_rm]) ();
-}
-
-
-static void
-fstsw_ax(void)
-{
-
- status_word &= ~SW_Top;
- status_word |= (top & 7) << SW_Top_Shift;
-
- *(short *) &FPU_EAX = status_word;
-
-}
-
-static FUNC fstsw_table[] = {
- fstsw_ax, Un_impl, Un_impl, Un_impl, Un_impl, Un_impl, Un_impl, Un_impl
-};
-
-void
-fstsw_()
-{
- (fstsw_table[FPU_rm]) ();
-}
-
-
-
-static void
-fnop(void)
-{
-}
-
-static FUNC fp_nop_table[] = {
- fnop, Un_impl, Un_impl, Un_impl, Un_impl, Un_impl, Un_impl, Un_impl
-};
-
-void
-fp_nop()
-{
- (fp_nop_table[FPU_rm]) ();
-}
-
-
-void
-fld_i_()
-{
- FPU_REG *st_new_ptr;
-
- if (STACK_OVERFLOW) {
- stack_overflow();
- return;
- }
- /* fld st(i) */
- if (NOT_EMPTY(FPU_rm)) {
- reg_move(&st(FPU_rm), st_new_ptr);
- push();
- } else {
- if (control_word & EX_Invalid) {
- /* The masked response */
- push();
- stack_underflow();
- } else
- EXCEPTION(EX_StackUnder);
- }
-
-}
-
-
-void
-fxch_i()
-{
- /* fxch st(i) */
- FPU_REG t;
- register FPU_REG *sti_ptr = &st(FPU_rm);
-
- if (FPU_st0_tag == TW_Empty) {
- if (sti_ptr->tag == TW_Empty) {
- stack_underflow();
- stack_underflow_i(FPU_rm);
- return;
- }
- reg_move(sti_ptr, FPU_st0_ptr);
- stack_underflow_i(FPU_rm);
- return;
- }
- if (sti_ptr->tag == TW_Empty) {
- reg_move(FPU_st0_ptr, sti_ptr);
- stack_underflow();
- return;
- }
- reg_move(FPU_st0_ptr, &t);
- reg_move(sti_ptr, FPU_st0_ptr);
- reg_move(&t, sti_ptr);
-}
-
-
-void
-ffree_()
-{
- /* ffree st(i) */
- st(FPU_rm).tag = TW_Empty;
-}
-
-
-void
-ffreep()
-{
- /* ffree st(i) + pop - unofficial code */
- st(FPU_rm).tag = TW_Empty;
- pop();
-}
-
-
-void
-fst_i_()
-{
- /* fst st(i) */
- reg_move(FPU_st0_ptr, &st(FPU_rm));
-}
-
-
-void
-fstp_i()
-{
- /* fstp st(i) */
- reg_move(FPU_st0_ptr, &st(FPU_rm));
- pop();
-}
diff --git a/sys/gnu/i386/fpemul/fpu_emu.h b/sys/gnu/i386/fpemul/fpu_emu.h
deleted file mode 100644
index 0dd2f7e..0000000
--- a/sys/gnu/i386/fpemul/fpu_emu.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * fpu_emu.h
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-
-#ifndef _FPU_EMU_H_
-#define _FPU_EMU_H_
-
-/*
- * Define DENORM_OPERAND to make the emulator detect denormals
- * and use the denormal flag of the status word. Note: this only
- * affects the flag and corresponding interrupt, the emulator
- * will always generate denormals and operate upon them as required.
- */
-#define DENORM_OPERAND
-
-/*
- * Define PECULIAR_486 to get a closer approximation to 80486 behaviour,
- * rather than behaviour which appears to be cleaner.
- * This is a matter of opinion: for all I know, the 80486 may simply
- * be complying with the IEEE spec. Maybe one day I'll get to see the
- * spec...
- */
-#define PECULIAR_486
-
-#ifdef LOCORE
-#include <gnu/i386/fpemul/fpu_asm.h>
-#define Const(x) $/**/x
-#else
-#define Const(x) x
-#endif
-
-#define EXP_BIAS Const(0)
-#define EXP_OVER Const(0x4000) /* smallest invalid large exponent */
-#define EXP_UNDER Const(-0x3fff) /* largest invalid small exponent */
-
-#define SIGN_POS Const(0)
-#define SIGN_NEG Const(1)
-
-/* Keep the order TW_Valid, TW_Zero, TW_Denormal */
-#define TW_Valid Const(0)/* valid */
-#define TW_Zero Const(1)/* zero */
-/* The following fold to 2 (Special) in the Tag Word */
-#define TW_Denormal Const(4)/* De-normal */
-#define TW_Infinity Const(5)/* + or - infinity */
-#define TW_NaN Const(6)/* Not a Number */
-
-#define TW_Empty Const(7)/* empty */
-
- /* #define TW_FPU_Interrupt Const(0x80) *//* Signals an interrupt */
-
-
-#ifndef LOCORE
-
-#include <sys/types.h>
-#include <gnu/i386/fpemul/math_emu.h>
-
-#ifdef PARANOID
-extern char emulating;
-#define REENTRANT_CHECK(state) emulating = (state)
-#define ON 1
-#define OFF 0
-#else
-#define REENTRANT_CHECK(state)
-#endif /* PARANOID */
-
-typedef void (*FUNC) (void);
-typedef struct fpu_reg FPU_REG;
-
-#define st(x) ( regs[((top+x) &7 )] )
-
-#define STACK_OVERFLOW (st_new_ptr = &st(-1), st_new_ptr->tag != TW_Empty)
-#define NOT_EMPTY(i) (st(i).tag != TW_Empty)
-#define NOT_EMPTY_0 (FPU_st0_tag ^ TW_Empty)
-
-extern unsigned char FPU_rm;
-
-extern char FPU_st0_tag;
-extern FPU_REG *FPU_st0_ptr;
-
-extern void *FPU_data_address;
-
-extern FPU_REG FPU_loaded_data;
-
-#define pop() { FPU_st0_ptr->tag = TW_Empty; top++; }
-
-/* push() does not affect the tags */
-#define push() { top--; FPU_st0_ptr = st_new_ptr; }
-
-
-#define reg_move(x, y) { \
- *(short *)&((y)->sign) = *(short *)&((x)->sign); \
- *(long *)&((y)->exp) = *(long *)&((x)->exp); \
- *(long long *)&((y)->sigl) = *(long long *)&((x)->sigl); }
-
-
-/*----- Prototypes for functions written in assembler -----*/
-/* extern void reg_move(FPU_REG *a, FPU_REG *b); */
-
-extern void mul64(long long *a, long long *b, long long *result);
-extern void poly_div2(long long *x);
-extern void poly_div4(long long *x);
-extern void poly_div16(long long *x);
-extern void
-polynomial(unsigned accum[], unsigned x[],
- unsigned short terms[][4], int n);
- extern void normalize(FPU_REG * x);
- extern void normalize_nuo(FPU_REG * x);
- extern void reg_div(FPU_REG * arg1, FPU_REG * arg2, FPU_REG * answ,
- unsigned int control_w);
- extern void reg_u_sub(FPU_REG * arg1, FPU_REG * arg2, FPU_REG * answ,
- unsigned int control_w);
- extern void reg_u_mul(FPU_REG * arg1, FPU_REG * arg2, FPU_REG * answ,
- unsigned int control_w);
- extern void reg_u_div(FPU_REG * arg1, FPU_REG * arg2, FPU_REG * answ,
- unsigned int control_w);
- extern void reg_u_add(FPU_REG * arg1, FPU_REG * arg2, FPU_REG * answ,
- unsigned int control_w);
- extern void wm_sqrt(FPU_REG * n, unsigned int control_w);
- extern unsigned shrx(void *l, unsigned x);
- extern unsigned shrxs(void *v, unsigned x);
- extern unsigned long div_small(unsigned long long *x, unsigned long y);
- extern void round_reg(FPU_REG * arg, unsigned int extent,
- unsigned int control_w);
-
-#ifndef MAKING_PROTO
-#include <gnu/i386/fpemul/fpu_proto.h>
-#endif
-
-#endif /* LOCORE */
-
-#endif /* _FPU_EMU_H_ */
diff --git a/sys/gnu/i386/fpemul/fpu_entry.c b/sys/gnu/i386/fpemul/fpu_entry.c
deleted file mode 100644
index 049b013..0000000
--- a/sys/gnu/i386/fpemul/fpu_entry.c
+++ /dev/null
@@ -1,519 +0,0 @@
-/*
- * fpu_entry.c
- *
- * The entry function for wm-FPU-emu
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- * $FreeBSD$
- *
- */
-
-/*---------------------------------------------------------------------------+
- | Note: |
- | The file contains code which accesses user memory. |
- | Emulator static data may change when user memory is accessed, due to |
- | other processes using the emulator while swapping is in progress. |
- +---------------------------------------------------------------------------*/
-
-/*---------------------------------------------------------------------------+
- | math_emulate() is the sole entry point for wm-FPU-emu |
- +---------------------------------------------------------------------------*/
-
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-#include <sys/kernel.h>
-
-#include <machine/cpu.h>
-#include <machine/pcb.h>
-
-#include <gnu/i386/fpemul/fpu_emu.h>
-#include <gnu/i386/fpemul/fpu_system.h>
-#include <gnu/i386/fpemul/exception.h>
-#include <gnu/i386/fpemul/status_w.h>
-
-
-#define __BAD__ Un_impl /* Not implemented */
-
-#define FPU_LOOKAHEAD 1 /* For performance boost */
-
-#if FPU_LOOKAHEAD != 0 /* I think thet we have to limit the */
-#define LOOKAHEAD_LIMIT 7 /* Max number of lookahead instructions*/
-#endif /* Or else a prog consisting of a million */
- /* fnops will spend all its time in kernel*/
-
-#ifndef NO_UNDOC_CODE /* Un-documented FPU op-codes supported by
- * default. */
-
-/* WARNING: These codes are not documented by Intel in their 80486 manual
- and may not work on FPU clones or later Intel FPUs. */
-
-/* Changes to support the un-doc codes provided by Linus Torvalds. */
-
-#define _d9_d8_ fstp_i /* unofficial code (19) */
-#define _dc_d0_ fcom_st /* unofficial code (14) */
-#define _dc_d8_ fcompst /* unofficial code (1c) */
-#define _dd_c8_ fxch_i /* unofficial code (0d) */
-#define _de_d0_ fcompst /* unofficial code (16) */
-#define _df_c0_ ffreep /* unofficial code (07) ffree + pop */
-#define _df_c8_ fxch_i /* unofficial code (0f) */
-#define _df_d0_ fstp_i /* unofficial code (17) */
-#define _df_d8_ fstp_i /* unofficial code (1f) */
-
-static FUNC st_instr_table[64] = {
- fadd__, fld_i_, __BAD__, __BAD__, fadd_i, ffree_, faddp_, _df_c0_,
- fmul__, fxch_i, __BAD__, __BAD__, fmul_i, _dd_c8_, fmulp_, _df_c8_,
- fcom_st, fp_nop, __BAD__, __BAD__, _dc_d0_, fst_i_, _de_d0_, _df_d0_,
- fcompst, _d9_d8_, __BAD__, __BAD__, _dc_d8_, fstp_i, fcompp, _df_d8_,
- fsub__, fp_etc, __BAD__, finit_, fsubri, fucom_, fsubrp, fstsw_,
- fsubr_, fconst, fucompp, __BAD__, fsub_i, fucomp, fsubp_, __BAD__,
- fdiv__, trig_a, __BAD__, __BAD__, fdivri, __BAD__, fdivrp, __BAD__,
- fdivr_, trig_b, __BAD__, __BAD__, fdiv_i, __BAD__, fdivp_, __BAD__,
-};
-#else /* Support only documented FPU op-codes */
-
-static FUNC st_instr_table[64] = {
- fadd__, fld_i_, __BAD__, __BAD__, fadd_i, ffree_, faddp_, __BAD__,
- fmul__, fxch_i, __BAD__, __BAD__, fmul_i, __BAD__, fmulp_, __BAD__,
- fcom_st, fp_nop, __BAD__, __BAD__, __BAD__, fst_i_, __BAD__, __BAD__,
- fcompst, __BAD__, __BAD__, __BAD__, __BAD__, fstp_i, fcompp, __BAD__,
- fsub__, fp_etc, __BAD__, finit_, fsubri, fucom_, fsubrp, fstsw_,
- fsubr_, fconst, fucompp, __BAD__, fsub_i, fucomp, fsubp_, __BAD__,
- fdiv__, trig_a, __BAD__, __BAD__, fdivri, __BAD__, fdivrp, __BAD__,
- fdivr_, trig_b, __BAD__, __BAD__, fdiv_i, __BAD__, fdivp_, __BAD__,
-};
-#endif /* NO_UNDOC_CODE */
-
-
-#define _NONE_ 0 /* Take no special action */
-#define _REG0_ 1 /* Need to check for not empty st(0) */
-#define _REGI_ 2 /* Need to check for not empty st(0) and
- * st(rm) */
-#define _REGi_ 0 /* Uses st(rm) */
-#define _PUSH_ 3 /* Need to check for space to push onto stack */
-#define _null_ 4 /* Function illegal or not implemented */
-#define _REGIi 5 /* Uses st(0) and st(rm), result to st(rm) */
-#define _REGIp 6 /* Uses st(0) and st(rm), result to st(rm)
- * then pop */
-#define _REGIc 0 /* Compare st(0) and st(rm) */
-#define _REGIn 0 /* Uses st(0) and st(rm), but handle checks
- * later */
-
-#ifndef NO_UNDOC_CODE
-
-/* Un-documented FPU op-codes supported by default. (see above) */
-
-static unsigned char type_table[64] = {
- _REGI_, _NONE_, _null_, _null_, _REGIi, _REGi_, _REGIp, _REGi_,
- _REGI_, _REGIn, _null_, _null_, _REGIi, _REGI_, _REGIp, _REGI_,
- _REGIc, _NONE_, _null_, _null_, _REGIc, _REG0_, _REGIc, _REG0_,
- _REGIc, _REG0_, _null_, _null_, _REGIc, _REG0_, _REGIc, _REG0_,
- _REGI_, _NONE_, _null_, _NONE_, _REGIi, _REGIc, _REGIp, _NONE_,
- _REGI_, _NONE_, _REGIc, _null_, _REGIi, _REGIc, _REGIp, _null_,
- _REGI_, _NONE_, _null_, _null_, _REGIi, _null_, _REGIp, _null_,
- _REGI_, _NONE_, _null_, _null_, _REGIi, _null_, _REGIp, _null_
-};
-#else /* Support only documented FPU op-codes */
-
-static unsigned char type_table[64] = {
- _REGI_, _NONE_, _null_, _null_, _REGIi, _REGi_, _REGIp, _null_,
- _REGI_, _REGIn, _null_, _null_, _REGIi, _null_, _REGIp, _null_,
- _REGIc, _NONE_, _null_, _null_, _null_, _REG0_, _null_, _null_,
- _REGIc, _null_, _null_, _null_, _null_, _REG0_, _REGIc, _null_,
- _REGI_, _NONE_, _null_, _NONE_, _REGIi, _REGIc, _REGIp, _NONE_,
- _REGI_, _NONE_, _REGIc, _null_, _REGIi, _REGIc, _REGIp, _null_,
- _REGI_, _NONE_, _null_, _null_, _REGIi, _null_, _REGIp, _null_,
- _REGI_, _NONE_, _null_, _null_, _REGIi, _null_, _REGIp, _null_
-};
-#endif /* NO_UNDOC_CODE */
-
-/* Be careful when using any of these global variables...
- they might change if swapping is triggered */
-unsigned char FPU_rm;
-char FPU_st0_tag;
-FPU_REG *FPU_st0_ptr;
-
-#ifdef PARANOID
-char emulating = 0;
-#endif /* PARANOID */
-
-#define bswapw(x) __asm__("xchgb %%al,%%ah":"=a" (x):"0" ((short)x))
-#define math_abort(signo) \
- FPU_EIP = FPU_ORIG_EIP;REENTRANT_CHECK(OFF);return(signo);
-
-static int
-math_emulate(struct trapframe * tframe)
-{
-
- unsigned char FPU_modrm;
- unsigned short code;
-#ifdef LOOKAHEAD_LIMIT
- int lookahead_limit = LOOKAHEAD_LIMIT;
-#endif
-#ifdef PARANOID
- if (emulating) {
- printf("ERROR: wm-FPU-emu is not RE-ENTRANT!\n");
- }
- REENTRANT_CHECK(ON);
-#endif /* PARANOID */
-
- if ((((struct pcb *) curproc->p_addr)->pcb_flags & FP_SOFTFP) == 0) {
- finit();
- control_word = __INITIAL_NPXCW__;
- ((struct pcb *) curproc->p_addr)->pcb_flags |= FP_SOFTFP;
- }
- FPU_info = tframe;
- FPU_ORIG_EIP = FPU_EIP; /* --pink-- */
-
- if (FPU_CS != 0x001f) {
- printf("math_emulate: %x : %x\n", FPU_CS, FPU_EIP);
- panic("FPU emulation in kernel");
- }
-#ifdef notyet
- /* We cannot handle emulation in v86-mode */
- if (FPU_EFLAGS & 0x00020000) {
- FPU_ORIG_EIP = FPU_EIP;
- math_abort(FPU_info, SIGILL);
- }
-#endif
-
- FPU_lookahead = FPU_LOOKAHEAD;
- if (curproc->p_flag & P_TRACED)
- FPU_lookahead = 0;
-
-do_another_FPU_instruction:
-
- REENTRANT_CHECK(OFF);
- code = fuword((u_int *) FPU_EIP);
- REENTRANT_CHECK(ON);
- if ((code & 0xff) == 0x9b) { /* fwait */
- if (status_word & SW_Summary)
- goto do_the_FPU_interrupt;
- else {
- FPU_EIP++;
- goto FPU_instruction_done;
- }
- }
- if (status_word & SW_Summary) {
- /* Ignore the error for now if the current instruction is a
- * no-wait control instruction */
- /* The 80486 manual contradicts itself on this topic, so I use
- * the following list of such instructions until I can check
- * on a real 80486: fninit, fnstenv, fnsave, fnstsw, fnstenv,
- * fnclex. */
- if (!((((code & 0xf803) == 0xe003) || /* fnclex, fninit,
- * fnstsw */
- (((code & 0x3003) == 0x3001) && /* fnsave, fnstcw,
- * fnstenv, fnstsw */
- ((code & 0xc000) != 0xc000))))) {
- /* This is a guess about what a real FPU might do to
- * this bit: */
-/* status_word &= ~SW_Summary; ****/
-
- /* We need to simulate the action of the kernel to FPU
- * interrupts here. Currently, the "real FPU" part of
- * the kernel (0.99.10) clears the exception flags,
- * sets the registers to empty, and passes information
- * back to the interrupted process via the cs selector
- * and operand selector, so we do the same. */
- do_the_FPU_interrupt:
- cs_selector &= 0xffff0000;
- cs_selector |= (status_word & ~SW_Top) | ((top & 7) << SW_Top_Shift);
- operand_selector = tag_word();
- status_word = 0;
- top = 0;
- {
- int r;
- for (r = 0; r < 8; r++) {
- regs[r].tag = TW_Empty;
- }
- }
- REENTRANT_CHECK(OFF);
- math_abort(SIGFPE);
- }
- }
- FPU_entry_eip = FPU_ORIG_EIP = FPU_EIP;
-
- if ((code & 0xff) == 0x66) { /* size prefix */
- FPU_EIP++;
- REENTRANT_CHECK(OFF);
- code = fuword((u_int *) FPU_EIP);
- REENTRANT_CHECK(ON);
- }
- FPU_EIP += 2;
-
- FPU_modrm = code >> 8;
- FPU_rm = FPU_modrm & 7;
-
- if (FPU_modrm < 0300) {
- /* All of these instructions use the mod/rm byte to get a data
- * address */
- get_address(FPU_modrm);
- if (!(code & 1)) {
- unsigned short status1 = status_word;
- FPU_st0_ptr = &st(0);
- FPU_st0_tag = FPU_st0_ptr->tag;
-
- /* Stack underflow has priority */
- if (NOT_EMPTY_0) {
- switch ((code >> 1) & 3) {
- case 0:
- reg_load_single();
- break;
- case 1:
- reg_load_int32();
- break;
- case 2:
- reg_load_double();
- break;
- case 3:
- reg_load_int16();
- break;
- }
-
- /* No more access to user memory, it is safe
- * to use static data now */
- FPU_st0_ptr = &st(0);
- FPU_st0_tag = FPU_st0_ptr->tag;
-
- /* NaN operands have the next priority. */
- /* We have to delay looking at st(0) until
- * after loading the data, because that data
- * might contain an SNaN */
- if ((FPU_st0_tag == TW_NaN) ||
- (FPU_loaded_data.tag == TW_NaN)) {
- /* Restore the status word; we might
- * have loaded a denormal. */
- status_word = status1;
- if ((FPU_modrm & 0x30) == 0x10) {
- /* fcom or fcomp */
- EXCEPTION(EX_Invalid);
- setcc(SW_C3 | SW_C2 | SW_C0);
- if (FPU_modrm & 0x08)
- pop(); /* fcomp, so we pop. */
- } else
- real_2op_NaN(FPU_st0_ptr, &FPU_loaded_data, FPU_st0_ptr);
- goto reg_mem_instr_done;
- }
- switch ((FPU_modrm >> 3) & 7) {
- case 0: /* fadd */
- reg_add(FPU_st0_ptr, &FPU_loaded_data, FPU_st0_ptr, control_word);
- break;
- case 1: /* fmul */
- reg_mul(FPU_st0_ptr, &FPU_loaded_data, FPU_st0_ptr, control_word);
- break;
- case 2: /* fcom */
- compare_st_data();
- break;
- case 3: /* fcomp */
- compare_st_data();
- pop();
- break;
- case 4: /* fsub */
- reg_sub(FPU_st0_ptr, &FPU_loaded_data, FPU_st0_ptr, control_word);
- break;
- case 5: /* fsubr */
- reg_sub(&FPU_loaded_data, FPU_st0_ptr, FPU_st0_ptr, control_word);
- break;
- case 6: /* fdiv */
- reg_div(FPU_st0_ptr, &FPU_loaded_data, FPU_st0_ptr, control_word);
- break;
- case 7: /* fdivr */
- if (FPU_st0_tag == TW_Zero)
- status_word = status1; /* Undo any denorm tag,
- * zero-divide has
- * priority. */
- reg_div(&FPU_loaded_data, FPU_st0_ptr, FPU_st0_ptr, control_word);
- break;
- }
- } else {
- if ((FPU_modrm & 0x30) == 0x10) {
- /* The instruction is fcom or fcomp */
- EXCEPTION(EX_StackUnder);
- setcc(SW_C3 | SW_C2 | SW_C0);
- if (FPU_modrm & 0x08)
- pop(); /* fcomp, Empty or not,
- * we pop. */
- } else
- stack_underflow();
- }
- } else {
- load_store_instr(((FPU_modrm & 0x38) | (code & 6)) >> 1);
- }
-
-reg_mem_instr_done:
-
- data_operand_offset = (intptr_t) (void *) FPU_data_address;
- } else {
- /* None of these instructions access user memory */
- unsigned char instr_index = (FPU_modrm & 0x38) | (code & 7);
-
- FPU_st0_ptr = &st(0);
- FPU_st0_tag = FPU_st0_ptr->tag;
- switch (type_table[(int) instr_index]) {
- case _NONE_: /* also _REGIc: _REGIn */
- break;
- case _REG0_:
- if (!NOT_EMPTY_0) {
- stack_underflow();
- goto FPU_instruction_done;
- }
- break;
- case _REGIi:
- if (!NOT_EMPTY_0 || !NOT_EMPTY(FPU_rm)) {
- stack_underflow_i(FPU_rm);
- goto FPU_instruction_done;
- }
- break;
- case _REGIp:
- if (!NOT_EMPTY_0 || !NOT_EMPTY(FPU_rm)) {
- stack_underflow_i(FPU_rm);
- pop();
- goto FPU_instruction_done;
- }
- break;
- case _REGI_:
- if (!NOT_EMPTY_0 || !NOT_EMPTY(FPU_rm)) {
- stack_underflow();
- goto FPU_instruction_done;
- }
- break;
- case _PUSH_: /* Only used by the fld st(i) instruction */
- break;
- case _null_:
- Un_impl();
- goto FPU_instruction_done;
- default:
- EXCEPTION(EX_INTERNAL | 0x111);
- goto FPU_instruction_done;
- }
- (*st_instr_table[(int) instr_index]) ();
- }
-
-FPU_instruction_done:
-
- ip_offset = FPU_entry_eip;
- bswapw(code);
- *(1 + (unsigned short *) &cs_selector) = code & 0x7ff;
-
-#ifdef DEBUG
- REENTRANT_CHECK(OFF);
- emu_printall();
- REENTRANT_CHECK(ON);
-#endif /* DEBUG */
-#ifdef LOOKAHEAD_LIMIT
-if (--lookahead_limit)
-#endif
- if (FPU_lookahead) {
- unsigned char next;
-
- /* (This test should generate no machine code) */
- while (1) {
- REENTRANT_CHECK(OFF);
- next = fubyte((u_char *) FPU_EIP);
- REENTRANT_CHECK(ON);
- if (((next & 0xf8) == 0xd8) || (next == 0x9b)) { /* fwait */
- goto do_another_FPU_instruction;
- } else
- if (next == 0x66) { /* size prefix */
- REENTRANT_CHECK(OFF);
- next = fubyte((u_char *) (FPU_EIP + 1));
- REENTRANT_CHECK(ON);
- if ((next & 0xf8) == 0xd8) {
- FPU_EIP++;
- goto do_another_FPU_instruction;
- }
- }
- break;
- }
- }
- REENTRANT_CHECK(OFF);
- return (0); /* --pink-- */
-}
-
-static int
-gnufpu_modevent(module_t mod, int type, void *unused)
-{
- switch (type) {
- case MOD_LOAD:
- if (pmath_emulate) {
- printf("Another Math emulator already present\n");
- return EACCES;
- }
- pmath_emulate = math_emulate;
- if (bootverbose)
- printf("GPL Math emulator present\n");
- break;
- case MOD_UNLOAD:
- if (pmath_emulate != math_emulate) {
- printf("Cannot unload another math emulator\n");
- return EACCES;
- }
- pmath_emulate = 0;
- if (bootverbose)
- printf("GPL Math emulator unloaded\n");
- break;
- default:
- break;
- }
- return 0;
-
-}
-static moduledata_t gnufpumod = {
- "gnufpu",
- gnufpu_modevent,
- 0
-};
-DECLARE_MODULE(gnufpu, gnufpumod, SI_SUB_DRIVERS, SI_ORDER_ANY);
diff --git a/sys/gnu/i386/fpemul/fpu_etc.c b/sys/gnu/i386/fpemul/fpu_etc.c
deleted file mode 100644
index cd91e80..0000000
--- a/sys/gnu/i386/fpemul/fpu_etc.c
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * fpu_etc.c
- *
- * Implement a few FPU instructions.
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-#include <sys/param.h>
-#ifdef DEBUG
-#include <sys/systm.h> /* for printf() in EXCEPTION() */
-#endif
-#include <sys/proc.h>
-#include <machine/pcb.h>
-
-#include <gnu/i386/fpemul/fpu_emu.h>
-#include <gnu/i386/fpemul/fpu_system.h>
-#include <gnu/i386/fpemul/exception.h>
-#include <gnu/i386/fpemul/status_w.h>
-
-
-static void
-fchs(void)
-{
- if (NOT_EMPTY_0) {
- FPU_st0_ptr->sign ^= SIGN_POS ^ SIGN_NEG;
- status_word &= ~SW_C1;
- } else
- stack_underflow();
-}
-
-static void
-fabs(void)
-{
- if (FPU_st0_tag ^ TW_Empty) {
- FPU_st0_ptr->sign = SIGN_POS;
- status_word &= ~SW_C1;
- } else
- stack_underflow();
-}
-
-
-static void
-ftst_(void)
-{
- switch (FPU_st0_tag) {
- case TW_Zero:
- setcc(SW_C3);
- break;
- case TW_Valid:
-
-#ifdef DENORM_OPERAND
- if ((FPU_st0_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
-
- if (FPU_st0_ptr->sign == SIGN_POS)
- setcc(0);
- else
- setcc(SW_C0);
- break;
- case TW_NaN:
- setcc(SW_C0 | SW_C2 | SW_C3); /* Operand is not comparable */
- EXCEPTION(EX_Invalid);
- break;
- case TW_Infinity:
- if (FPU_st0_ptr->sign == SIGN_POS)
- setcc(0);
- else
- setcc(SW_C0);
- EXCEPTION(EX_Invalid);
- break;
- case TW_Empty:
- setcc(SW_C0 | SW_C2 | SW_C3);
- EXCEPTION(EX_StackUnder);
- break;
- default:
- setcc(SW_C0 | SW_C2 | SW_C3); /* Operand is not comparable */
- EXCEPTION(EX_INTERNAL | 0x14);
- break;
- }
-}
-
-static void
-fxam(void)
-{
- int c = 0;
- switch (FPU_st0_tag) {
- case TW_Empty:
- c = SW_C3 | SW_C0;
- break;
- case TW_Zero:
- c = SW_C3;
- break;
- case TW_Valid:
- /* This will need to be changed if TW_Denormal is ever used. */
- if (FPU_st0_ptr->exp <= EXP_UNDER)
- c = SW_C2 | SW_C3; /* Denormal */
- else
- c = SW_C3;
- break;
- case TW_NaN:
- c = SW_C0;
- break;
- case TW_Infinity:
- c = SW_C2 | SW_C0;
- break;
- }
- if (FPU_st0_ptr->sign == SIGN_NEG)
- c |= SW_C1;
- setcc(c);
-}
-
-static FUNC fp_etc_table[] = {
- fchs, fabs, Un_impl, Un_impl, ftst_, fxam, Un_impl, Un_impl
-};
-
-void
-fp_etc()
-{
- (fp_etc_table[FPU_rm]) ();
-}
diff --git a/sys/gnu/i386/fpemul/fpu_proto.h b/sys/gnu/i386/fpemul/fpu_proto.h
deleted file mode 100644
index fc36478..0000000
--- a/sys/gnu/i386/fpemul/fpu_proto.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- *
- * $FreeBSD$
- *
- */
-
-
-/* errors.c */
-extern void Un_impl(void);
-extern void emu_printall(void);
-extern void exception(int n);
-extern void real_2op_NaN(FPU_REG * a, FPU_REG * b, FPU_REG * dest);
-extern void arith_invalid(FPU_REG * dest);
-extern void divide_by_zero(int sign, FPU_REG * dest);
-extern void set_precision_flag_up(void);
-extern void set_precision_flag_down(void);
-extern int denormal_operand(void);
-extern void arith_overflow(FPU_REG * dest);
-extern void arith_underflow(FPU_REG * dest);
-extern void stack_overflow(void);
-extern void stack_underflow(void);
-extern void stack_underflow_i(int i);
-extern void stack_underflow_pop(int i);
-/* fpu_arith.c */
-extern void fadd__(void);
-extern void fmul__(void);
-extern void fsub__(void);
-extern void fsubr_(void);
-extern void fdiv__(void);
-extern void fdivr_(void);
-extern void fadd_i(void);
-extern void fmul_i(void);
-extern void fsubri(void);
-extern void fsub_i(void);
-extern void fdivri(void);
-extern void fdiv_i(void);
-extern void faddp_(void);
-extern void fmulp_(void);
-extern void fsubrp(void);
-extern void fsubp_(void);
-extern void fdivrp(void);
-extern void fdivp_(void);
-/* fpu_aux.c */
-extern void finit(void);
-extern void finit_(void);
-extern void fstsw_(void);
-extern void fp_nop(void);
-extern void fld_i_(void);
-extern void fxch_i(void);
-extern void ffree_(void);
-extern void ffreep(void);
-extern void fst_i_(void);
-extern void fstp_i(void);
-/* fpu_entry.c */
-#if 0
-extern int math_emulate(struct trapframe * info);
-#endif
-/* fpu_etc.c */
-extern void fp_etc(void);
-/* fpu_trig.c */
-extern void trig_a(void);
-extern void trig_b(void);
-/* get_address.c */
-extern void get_address(unsigned char FPU_modrm);
-/* load_store.c */
-extern void load_store_instr(char type);
-/* poly_2xm1.c */
-extern int poly_2xm1(FPU_REG * arg, FPU_REG * result);
-/* poly_atan.c */
-extern void poly_atan(FPU_REG * arg);
-/* poly_l2.c */
-extern void poly_l2(FPU_REG * arg, FPU_REG * result);
-extern int poly_l2p1(FPU_REG * arg, FPU_REG * result);
-/* poly_sin.c */
-extern void poly_sine(FPU_REG * arg, FPU_REG * result);
-/* poly_tan.c */
-extern void poly_tan(FPU_REG * arg, FPU_REG * y_reg);
-/* reg_add_sub.c */
-extern void reg_add(FPU_REG * a, FPU_REG * b, FPU_REG * dest, int control_w);
-extern void reg_sub(FPU_REG * a, FPU_REG * b, FPU_REG * dest, int control_w);
-/* reg_compare.c */
-extern int compare(FPU_REG * b);
-extern int compare_st_data(void);
-extern void fcom_st(void);
-extern void fcompst(void);
-extern void fcompp(void);
-extern void fucom_(void);
-extern void fucomp(void);
-extern void fucompp(void);
-/* reg_constant.c */
-extern void fconst(void);
-/* reg_ld_str.c */
-extern void reg_load_extended(void);
-extern void reg_load_double(void);
-extern void reg_load_single(void);
-extern void reg_load_int64(void);
-extern void reg_load_int32(void);
-extern void reg_load_int16(void);
-extern void reg_load_bcd(void);
-extern int reg_store_extended(void);
-extern int reg_store_double(void);
-extern int reg_store_single(void);
-extern int reg_store_int64(void);
-extern int reg_store_int32(void);
-extern int reg_store_int16(void);
-extern int reg_store_bcd(void);
-extern int round_to_int(FPU_REG * r);
-extern char *fldenv(void);
-extern void frstor(void);
-extern unsigned short tag_word(void);
-extern char *fstenv(void);
-extern void fsave(void);
-/* reg_mul.c */
-extern void reg_mul(FPU_REG * a, FPU_REG * b, FPU_REG * dest, unsigned int control_w);
diff --git a/sys/gnu/i386/fpemul/fpu_system.h b/sys/gnu/i386/fpemul/fpu_system.h
deleted file mode 100644
index aff0a0d..0000000
--- a/sys/gnu/i386/fpemul/fpu_system.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * fpu_system.h
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-
-#ifndef _FPU_SYSTEM_H
-#define _FPU_SYSTEM_H
-
-/* system dependent definitions */
-
-/*
-#include <linux/sched.h>
-#include <linux/kernel.h>
-*/
-
-#define I387 (*(union i387_union *)&(((struct pcb *)curproc->p_addr)->pcb_savefpu))
-#define FPU_info (I387.soft.frame)
-
-#define FPU_CS (*(unsigned short *) &(FPU_info->tf_cs))
-#define FPU_DS (*(unsigned short *) &(FPU_info->tf_ds))
-#define FPU_EAX (FPU_info->tf_eax)
-#define FPU_EFLAGS (FPU_info->tf_eflags)
-#define FPU_EIP (FPU_info->tf_eip)
-/*#define FPU_ORIG_EIP (FPU_info->___orig_eip) */
-/*#define FPU_ORIG_EIP (FPU_info->tf_isp)*/
-#define FPU_ORIG_EIP (I387.soft.orig_eip)
-
-#define FPU_lookahead (I387.soft.lookahead)
-#define FPU_entry_eip (I387.soft.entry_eip)
-
-#define status_word (I387.soft.swd)
-#define control_word (I387.soft.cwd)
-#define regs (I387.soft.regs)
-#define top (I387.soft.top)
-
-#define ip_offset (I387.soft.fip)
-#define cs_selector (I387.soft.fcs)
-#define data_operand_offset (I387.soft.foo)
-#define operand_selector (I387.soft.fos)
-
-#endif
diff --git a/sys/gnu/i386/fpemul/fpu_trig.c b/sys/gnu/i386/fpemul/fpu_trig.c
deleted file mode 100644
index b1d913f..0000000
--- a/sys/gnu/i386/fpemul/fpu_trig.c
+++ /dev/null
@@ -1,1371 +0,0 @@
-/*
- * fpu_trig.c
- *
- * Implementation of the FPU "transcendental" functions.
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-
-#include <sys/param.h>
-#ifdef DEBUG
-#include <sys/systm.h> /* for printf() in EXCEPTION() */
-#endif
-#include <sys/proc.h>
-#include <machine/pcb.h>
-
-#include <gnu/i386/fpemul/fpu_emu.h>
-#include <gnu/i386/fpemul/fpu_system.h>
-#include <gnu/i386/fpemul/exception.h>
-#include <gnu/i386/fpemul/status_w.h>
-#include <gnu/i386/fpemul/reg_constant.h>
-#include <gnu/i386/fpemul/control_w.h>
-
-static void convert_l2reg(long *arg, FPU_REG * dest);
-
-static int
-trig_arg(FPU_REG * X)
-{
- FPU_REG tmp, quot;
- int rv;
- long long q;
- int old_cw = control_word;
-
- control_word &= ~CW_RC;
- control_word |= RC_CHOP;
-
- reg_move(X, &quot);
- reg_div(&quot, &CONST_PI2, &quot, FULL_PRECISION);
-
- reg_move(&quot, &tmp);
- round_to_int(&tmp);
- if (tmp.sigh & 0x80000000)
- return -1; /* |Arg| is >= 2^63 */
- tmp.exp = EXP_BIAS + 63;
- q = *(long long *) &(tmp.sigl);
- normalize(&tmp);
-
- reg_sub(&quot, &tmp, X, FULL_PRECISION);
- rv = q & 7;
-
- control_word = old_cw;
- return rv;;
-}
-
-
-/* Convert a long to register */
-static void
-convert_l2reg(long *arg, FPU_REG * dest)
-{
- long num = *arg;
-
- if (num == 0) {
- reg_move(&CONST_Z, dest);
- return;
- }
- if (num > 0)
- dest->sign = SIGN_POS;
- else {
- num = -num;
- dest->sign = SIGN_NEG;
- }
-
- dest->sigh = num;
- dest->sigl = 0;
- dest->exp = EXP_BIAS + 31;
- dest->tag = TW_Valid;
- normalize(dest);
-}
-
-
-static void
-single_arg_error(void)
-{
- switch (FPU_st0_tag) {
- case TW_NaN:
- if (!(FPU_st0_ptr->sigh & 0x40000000)) { /* Signaling ? */
- EXCEPTION(EX_Invalid);
- /* Convert to a QNaN */
- FPU_st0_ptr->sigh |= 0x40000000;
- }
- break; /* return with a NaN in st(0) */
- case TW_Empty:
- stack_underflow(); /* Puts a QNaN in st(0) */
- break;
-#ifdef PARANOID
- default:
- EXCEPTION(EX_INTERNAL | 0x0112);
-#endif /* PARANOID */
- }
-}
-
-
-/*---------------------------------------------------------------------------*/
-
-static void
-f2xm1(void)
-{
- switch (FPU_st0_tag) {
- case TW_Valid:
- {
- FPU_REG rv, tmp;
-
-#ifdef DENORM_OPERAND
- if ((FPU_st0_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
-
- if (FPU_st0_ptr->sign == SIGN_POS) {
- /* poly_2xm1(x) requires 0 < x < 1. */
- if (poly_2xm1(FPU_st0_ptr, &rv))
- return; /* error */
- reg_mul(&rv, FPU_st0_ptr, FPU_st0_ptr, FULL_PRECISION);
- } else {
-/* **** Should change poly_2xm1() to at least handle numbers near 0 */
- /* poly_2xm1(x) doesn't handle negative
- * numbers. */
- /* So we compute (poly_2xm1(x+1)-1)/2, for -1
- * < x < 0 */
- reg_add(FPU_st0_ptr, &CONST_1, &tmp, FULL_PRECISION);
- poly_2xm1(&tmp, &rv);
- reg_mul(&rv, &tmp, &tmp, FULL_PRECISION);
- reg_sub(&tmp, &CONST_1, FPU_st0_ptr, FULL_PRECISION);
- FPU_st0_ptr->exp--;
- if (FPU_st0_ptr->exp <= EXP_UNDER)
- arith_underflow(FPU_st0_ptr);
- }
- return;
- }
- case TW_Zero:
- return;
- case TW_Infinity:
- if (FPU_st0_ptr->sign == SIGN_NEG) {
- /* -infinity gives -1 (p16-10) */
- reg_move(&CONST_1, FPU_st0_ptr);
- FPU_st0_ptr->sign = SIGN_NEG;
- }
- return;
- default:
- single_arg_error();
- }
-}
-
-static void
-fptan(void)
-{
- FPU_REG *st_new_ptr;
- int q;
- char arg_sign = FPU_st0_ptr->sign;
-
- if (STACK_OVERFLOW) {
- stack_overflow();
- return;
- }
- switch (FPU_st0_tag) {
- case TW_Valid:
-
-#ifdef DENORM_OPERAND
- if ((FPU_st0_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
-
- FPU_st0_ptr->sign = SIGN_POS;
- if ((q = trig_arg(FPU_st0_ptr)) != -1) {
- if (q & 1)
- reg_sub(&CONST_1, FPU_st0_ptr, FPU_st0_ptr, FULL_PRECISION);
-
- poly_tan(FPU_st0_ptr, FPU_st0_ptr);
-
- FPU_st0_ptr->sign = (q & 1) ^ arg_sign;
-
- if (FPU_st0_ptr->exp <= EXP_UNDER)
- arith_underflow(FPU_st0_ptr);
-
- push();
- reg_move(&CONST_1, FPU_st0_ptr);
- setcc(0);
- } else {
- /* Operand is out of range */
- setcc(SW_C2);
- FPU_st0_ptr->sign = arg_sign; /* restore st(0) */
- return;
- }
- break;
- case TW_Infinity:
- /* Operand is out of range */
- setcc(SW_C2);
- FPU_st0_ptr->sign = arg_sign; /* restore st(0) */
- return;
- case TW_Zero:
- push();
- reg_move(&CONST_1, FPU_st0_ptr);
- setcc(0);
- break;
- default:
- single_arg_error();
- break;
- }
-}
-
-
-static void
-fxtract(void)
-{
- FPU_REG *st_new_ptr;
- register FPU_REG *st1_ptr = FPU_st0_ptr; /* anticipate */
-
- if (STACK_OVERFLOW) {
- stack_overflow();
- return;
- }
- if (!(FPU_st0_tag ^ TW_Valid)) {
- long e;
-
-#ifdef DENORM_OPERAND
- if ((FPU_st0_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
-
- push();
- reg_move(st1_ptr, FPU_st0_ptr);
- FPU_st0_ptr->exp = EXP_BIAS;
- e = st1_ptr->exp - EXP_BIAS;
- convert_l2reg(&e, st1_ptr);
- return;
- } else
- if (FPU_st0_tag == TW_Zero) {
- char sign = FPU_st0_ptr->sign;
- divide_by_zero(SIGN_NEG, FPU_st0_ptr);
- push();
- reg_move(&CONST_Z, FPU_st0_ptr);
- FPU_st0_ptr->sign = sign;
- return;
- } else
- if (FPU_st0_tag == TW_Infinity) {
- char sign = FPU_st0_ptr->sign;
- FPU_st0_ptr->sign = SIGN_POS;
- push();
- reg_move(&CONST_INF, FPU_st0_ptr);
- FPU_st0_ptr->sign = sign;
- return;
- } else
- if (FPU_st0_tag == TW_NaN) {
- if (!(FPU_st0_ptr->sigh & 0x40000000)) { /* Signaling ? */
- EXCEPTION(EX_Invalid);
- /* Convert to a QNaN */
- FPU_st0_ptr->sigh |= 0x40000000;
- }
- push();
- reg_move(st1_ptr, FPU_st0_ptr);
- return;
- } else
- if (FPU_st0_tag == TW_Empty) {
- /* Is this the correct
- * behaviour? */
- if (control_word & EX_Invalid) {
- stack_underflow();
- push();
- stack_underflow();
- } else
- EXCEPTION(EX_StackUnder);
- }
-#ifdef PARANOID
- else
- EXCEPTION(EX_INTERNAL | 0x119);
-#endif /* PARANOID */
-}
-
-
-static void
-fdecstp(void)
-{
- top--; /* FPU_st0_ptr will be fixed in math_emulate()
- * before the next instr */
-}
-
-static void
-fincstp(void)
-{
- top++; /* FPU_st0_ptr will be fixed in math_emulate()
- * before the next instr */
-}
-
-
-static void
-fsqrt_(void)
-{
- if (!(FPU_st0_tag ^ TW_Valid)) {
- int expon;
-
- if (FPU_st0_ptr->sign == SIGN_NEG) {
- arith_invalid(FPU_st0_ptr); /* sqrt(negative) is
- * invalid */
- return;
- }
-#ifdef DENORM_OPERAND
- if ((FPU_st0_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
-
- expon = FPU_st0_ptr->exp - EXP_BIAS;
- FPU_st0_ptr->exp = EXP_BIAS + (expon & 1); /* make st(0) in [1.0
- * .. 4.0) */
-
- wm_sqrt(FPU_st0_ptr, control_word); /* Do the computation */
-
- FPU_st0_ptr->exp += expon >> 1;
- FPU_st0_ptr->sign = SIGN_POS;
- } else
- if (FPU_st0_tag == TW_Zero)
- return;
- else
- if (FPU_st0_tag == TW_Infinity) {
- if (FPU_st0_ptr->sign == SIGN_NEG)
- arith_invalid(FPU_st0_ptr); /* sqrt(-Infinity) is
- * invalid */
- return;
- } else {
- single_arg_error();
- return;
- }
-
-}
-
-
-static void
-frndint_(void)
-{
- if (!(FPU_st0_tag ^ TW_Valid)) {
- if (FPU_st0_ptr->exp > EXP_BIAS + 63)
- return;
-
-#ifdef DENORM_OPERAND
- if ((FPU_st0_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
-
- round_to_int(FPU_st0_ptr); /* Fortunately, this can't
- * overflow to 2^64 */
- FPU_st0_ptr->exp = EXP_BIAS + 63;
- normalize(FPU_st0_ptr);
- return;
- } else
- if ((FPU_st0_tag == TW_Zero) || (FPU_st0_tag == TW_Infinity))
- return;
- else
- single_arg_error();
-}
-
-
-static void
-fsin(void)
-{
- char arg_sign = FPU_st0_ptr->sign;
-
- if (FPU_st0_tag == TW_Valid) {
- int q;
- FPU_st0_ptr->sign = SIGN_POS;
-
-#ifdef DENORM_OPERAND
- if ((FPU_st0_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
-
- if ((q = trig_arg(FPU_st0_ptr)) != -1) {
- FPU_REG rv;
-
- if (q & 1)
- reg_sub(&CONST_1, FPU_st0_ptr, FPU_st0_ptr, FULL_PRECISION);
-
- poly_sine(FPU_st0_ptr, &rv);
-
- setcc(0);
- if (q & 2)
- rv.sign ^= SIGN_POS ^ SIGN_NEG;
- rv.sign ^= arg_sign;
- reg_move(&rv, FPU_st0_ptr);
-
- if (FPU_st0_ptr->exp <= EXP_UNDER)
- arith_underflow(FPU_st0_ptr);
-
- set_precision_flag_up(); /* We do not really know
- * if up or down */
-
- return;
- } else {
- /* Operand is out of range */
- setcc(SW_C2);
- FPU_st0_ptr->sign = arg_sign; /* restore st(0) */
- return;
- }
- } else
- if (FPU_st0_tag == TW_Zero) {
- setcc(0);
- return;
- } else
- if (FPU_st0_tag == TW_Infinity) {
- /* Operand is out of range */
- setcc(SW_C2);
- FPU_st0_ptr->sign = arg_sign; /* restore st(0) */
- return;
- } else
- single_arg_error();
-}
-
-
-static int
-f_cos(FPU_REG * arg)
-{
- char arg_sign = arg->sign;
-
- if (arg->tag == TW_Valid) {
- int q;
-
-#ifdef DENORM_OPERAND
- if ((FPU_st0_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return 1;
-#endif /* DENORM_OPERAND */
-
- arg->sign = SIGN_POS;
- if ((q = trig_arg(arg)) != -1) {
- FPU_REG rv;
-
- if (!(q & 1))
- reg_sub(&CONST_1, arg, arg, FULL_PRECISION);
-
- poly_sine(arg, &rv);
-
- setcc(0);
- if ((q + 1) & 2)
- rv.sign ^= SIGN_POS ^ SIGN_NEG;
- reg_move(&rv, arg);
-
- set_precision_flag_up(); /* We do not really know
- * if up or down */
-
- return 0;
- } else {
- /* Operand is out of range */
- setcc(SW_C2);
- arg->sign = arg_sign; /* restore st(0) */
- return 1;
- }
- } else
- if (arg->tag == TW_Zero) {
- reg_move(&CONST_1, arg);
- setcc(0);
- return 0;
- } else
- if (FPU_st0_tag == TW_Infinity) {
- /* Operand is out of range */
- setcc(SW_C2);
- arg->sign = arg_sign; /* restore st(0) */
- return 1;
- } else {
- single_arg_error(); /* requires arg ==
- * &st(0) */
- return 1;
- }
-}
-
-
-static void
-fcos(void)
-{
- f_cos(FPU_st0_ptr);
-}
-
-
-static void
-fsincos(void)
-{
- FPU_REG *st_new_ptr;
- FPU_REG arg;
-
- if (STACK_OVERFLOW) {
- stack_overflow();
- return;
- }
- reg_move(FPU_st0_ptr, &arg);
- if (!f_cos(&arg)) {
- fsin();
- push();
- reg_move(&arg, FPU_st0_ptr);
- }
-}
-
-
-/*---------------------------------------------------------------------------*/
-/* The following all require two arguments: st(0) and st(1) */
-
-/* remainder of st(0) / st(1) */
-/* Assumes that st(0) and st(1) are both TW_Valid */
-static void
-fprem_kernel(int round)
-{
- FPU_REG *st1_ptr = &st(1);
- char st1_tag = st1_ptr->tag;
-
- if (!((FPU_st0_tag ^ TW_Valid) | (st1_tag ^ TW_Valid))) {
- FPU_REG tmp;
- int old_cw = control_word;
- int expdif = FPU_st0_ptr->exp - (st1_ptr)->exp;
-
-#ifdef DENORM_OPERAND
- if (((FPU_st0_ptr->exp <= EXP_UNDER) ||
- (st1_ptr->exp <= EXP_UNDER)) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
-
- control_word &= ~CW_RC;
- control_word |= round;
-
- if (expdif < 64) {
- /* This should be the most common case */
- long long q;
- int c = 0;
-
- reg_div(FPU_st0_ptr, st1_ptr, &tmp, FULL_PRECISION);
-
- round_to_int(&tmp); /* Fortunately, this can't
- * overflow to 2^64 */
- tmp.exp = EXP_BIAS + 63;
- q = *(long long *) &(tmp.sigl);
- normalize(&tmp);
-
- reg_mul(st1_ptr, &tmp, &tmp, FULL_PRECISION);
- reg_sub(FPU_st0_ptr, &tmp, FPU_st0_ptr, FULL_PRECISION);
-
- if (q & 4)
- c |= SW_C3;
- if (q & 2)
- c |= SW_C1;
- if (q & 1)
- c |= SW_C0;
-
- setcc(c);
- } else {
- /* There is a large exponent difference ( >= 64 ) */
- int N_exp;
-
- reg_div(FPU_st0_ptr, st1_ptr, &tmp, FULL_PRECISION);
- /* N is 'a number between 32 and 63' (p26-113) */
- N_exp = (tmp.exp & 31) + 32;
- tmp.exp = EXP_BIAS + N_exp;
-
- round_to_int(&tmp); /* Fortunately, this can't
- * overflow to 2^64 */
- tmp.exp = EXP_BIAS + 63;
- normalize(&tmp);
-
- tmp.exp = EXP_BIAS + expdif - N_exp;
-
- reg_mul(st1_ptr, &tmp, &tmp, FULL_PRECISION);
- reg_sub(FPU_st0_ptr, &tmp, FPU_st0_ptr, FULL_PRECISION);
-
- setcc(SW_C2);
- }
- control_word = old_cw;
-
- if (FPU_st0_ptr->exp <= EXP_UNDER)
- arith_underflow(FPU_st0_ptr);
- return;
- } else
- if ((FPU_st0_tag == TW_Empty) | (st1_tag == TW_Empty)) {
- stack_underflow();
- return;
- } else
- if (FPU_st0_tag == TW_Zero) {
- if (st1_tag == TW_Valid) {
-
-#ifdef DENORM_OPERAND
- if ((st1_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
-
- setcc(0);
- return;
- } else
- if (st1_tag == TW_Zero) {
- arith_invalid(FPU_st0_ptr);
- return;
- }
- /* fprem(?,0) always invalid */
- else
- if (st1_tag == TW_Infinity) {
- setcc(0);
- return;
- }
- } else
- if (FPU_st0_tag == TW_Valid) {
- if (st1_tag == TW_Zero) {
- arith_invalid(FPU_st0_ptr); /* fprem(Valid,Zero) is
- * invalid */
- return;
- } else
- if (st1_tag != TW_NaN) {
-#ifdef DENORM_OPERAND
- if ((FPU_st0_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
-
- if (st1_tag == TW_Infinity) {
- /* fprem(Valid,
- * Infinity)
- * is o.k. */
- setcc(0);
- return;
- }
- }
- } else
- if (FPU_st0_tag == TW_Infinity) {
- if (st1_tag != TW_NaN) {
- arith_invalid(FPU_st0_ptr); /* fprem(Infinity,?) is
- * invalid */
- return;
- }
- }
- /* One of the registers must contain a NaN is we got here. */
-
-#ifdef PARANOID
- if ((FPU_st0_tag != TW_NaN) && (st1_tag != TW_NaN))
- EXCEPTION(EX_INTERNAL | 0x118);
-#endif /* PARANOID */
-
- real_2op_NaN(FPU_st0_ptr, st1_ptr, FPU_st0_ptr);
-
-}
-
-
-/* ST(1) <- ST(1) * log ST; pop ST */
-static void
-fyl2x(void)
-{
- FPU_REG *st1_ptr = &st(1);
- char st1_tag = st1_ptr->tag;
-
- if (!((FPU_st0_tag ^ TW_Valid) | (st1_tag ^ TW_Valid))) {
- if (FPU_st0_ptr->sign == SIGN_POS) {
- int saved_control, saved_status;
-
-#ifdef DENORM_OPERAND
- if (((FPU_st0_ptr->exp <= EXP_UNDER) ||
- (st1_ptr->exp <= EXP_UNDER)) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
-
- /* We use the general purpose arithmetic, so we need
- * to save these. */
- saved_status = status_word;
- saved_control = control_word;
- control_word = FULL_PRECISION;
-
- poly_l2(FPU_st0_ptr, FPU_st0_ptr);
-
- /* Enough of the basic arithmetic is done now */
- control_word = saved_control;
- status_word = saved_status;
-
- /* Let the multiply set the flags */
- reg_mul(FPU_st0_ptr, st1_ptr, st1_ptr, FULL_PRECISION);
-
- pop();
- FPU_st0_ptr = &st(0);
- } else {
- /* negative */
- pop();
- FPU_st0_ptr = &st(0);
- arith_invalid(FPU_st0_ptr); /* st(0) cannot be
- * negative */
- return;
- }
- } else
- if ((FPU_st0_tag == TW_Empty) || (st1_tag == TW_Empty)) {
- stack_underflow_pop(1);
- return;
- } else
- if ((FPU_st0_tag == TW_NaN) || (st1_tag == TW_NaN)) {
- real_2op_NaN(FPU_st0_ptr, st1_ptr, st1_ptr);
- pop();
- return;
- } else
- if ((FPU_st0_tag <= TW_Zero) && (st1_tag <= TW_Zero)) {
- /* one of the args is zero, the other
- * valid, or both zero */
- if (FPU_st0_tag == TW_Zero) {
- pop();
- FPU_st0_ptr = &st(0);
- if (FPU_st0_ptr->tag == TW_Zero)
- arith_invalid(FPU_st0_ptr); /* Both args zero is
- * invalid */
-#ifdef PECULIAR_486
- /* This case is not
- * specifically covered in the
- * manual, but divide-by-zero
- * would seem to be the best
- * response. However, a real
- * 80486 does it this way... */
- else
- if (FPU_st0_ptr->tag == TW_Infinity) {
- reg_move(&CONST_INF, FPU_st0_ptr);
- return;
- }
-#endif /* PECULIAR_486 */
- else
- divide_by_zero(st1_ptr->sign ^ SIGN_NEG ^ SIGN_POS, FPU_st0_ptr);
- return;
- } else {
- /* st(1) contains zero, st(0)
- * valid <> 0 */
- /* Zero is the valid answer */
- char sign = st1_ptr->sign;
-
-#ifdef DENORM_OPERAND
- if ((FPU_st0_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
- if (FPU_st0_ptr->sign == SIGN_NEG) {
- pop();
- FPU_st0_ptr = &st(0);
- arith_invalid(FPU_st0_ptr); /* log(negative) */
- return;
- }
- if (FPU_st0_ptr->exp < EXP_BIAS)
- sign ^= SIGN_NEG ^ SIGN_POS;
- pop();
- FPU_st0_ptr = &st(0);
- reg_move(&CONST_Z, FPU_st0_ptr);
- FPU_st0_ptr->sign = sign;
- return;
- }
- }
- /* One or both arg must be an infinity */
- else
- if (FPU_st0_tag == TW_Infinity) {
- if ((FPU_st0_ptr->sign == SIGN_NEG) || (st1_tag == TW_Zero)) {
- pop();
- FPU_st0_ptr = &st(0);
- arith_invalid(FPU_st0_ptr); /* log(-infinity) or
- * 0*log(infinity) */
- return;
- } else {
- char sign = st1_ptr->sign;
-
-#ifdef DENORM_OPERAND
- if ((st1_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
-
- pop();
- FPU_st0_ptr = &st(0);
- reg_move(&CONST_INF, FPU_st0_ptr);
- FPU_st0_ptr->sign = sign;
- return;
- }
- }
- /* st(1) must be infinity here */
- else
- if ((FPU_st0_tag == TW_Valid) && (FPU_st0_ptr->sign == SIGN_POS)) {
- if (FPU_st0_ptr->exp >= EXP_BIAS) {
- if ((FPU_st0_ptr->exp == EXP_BIAS) &&
- (FPU_st0_ptr->sigh == 0x80000000) &&
- (FPU_st0_ptr->sigl == 0)) {
- /* st(0
- * )
- * hold
- * s
- * 1.0 */
- pop();
- FPU_st0_ptr = &st(0);
- arith_invalid(FPU_st0_ptr); /* infinity*log(1) */
- return;
- }
- /* st(0) is
- * positive
- * and > 1.0 */
- pop();
- } else {
- /* st(0) is
- * positive
- * and < 1.0 */
-
-#ifdef DENORM_OPERAND
- if ((FPU_st0_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
-
- st1_ptr->sign ^= SIGN_NEG;
- pop();
- }
- return;
- } else {
- /* st(0) must be zero
- * or negative */
- if (FPU_st0_ptr->tag == TW_Zero) {
- pop();
- FPU_st0_ptr = st1_ptr;
- st1_ptr->sign ^= SIGN_NEG ^ SIGN_POS;
- /* This should
- * be invalid,
- * but a real
- * 80486 is
- * happy with
- * it. */
-#ifndef PECULIAR_486
- divide_by_zero(st1_ptr->sign, FPU_st0_ptr);
-#endif /* PECULIAR_486 */
- } else {
- pop();
- FPU_st0_ptr = st1_ptr;
- arith_invalid(FPU_st0_ptr); /* log(negative) */
- }
- return;
- }
-}
-
-
-static void
-fpatan(void)
-{
- FPU_REG *st1_ptr = &st(1);
- char st1_tag = st1_ptr->tag;
-
- if (!((FPU_st0_tag ^ TW_Valid) | (st1_tag ^ TW_Valid))) {
- int saved_control, saved_status;
- FPU_REG sum;
- int quadrant = st1_ptr->sign | ((FPU_st0_ptr->sign) << 1);
-
-#ifdef DENORM_OPERAND
- if (((FPU_st0_ptr->exp <= EXP_UNDER) ||
- (st1_ptr->exp <= EXP_UNDER)) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
-
- /* We use the general purpose arithmetic so we need to save
- * these. */
- saved_status = status_word;
- saved_control = control_word;
- control_word = FULL_PRECISION;
-
- st1_ptr->sign = FPU_st0_ptr->sign = SIGN_POS;
- if (compare(st1_ptr) == COMP_A_lt_B) {
- quadrant |= 4;
- reg_div(FPU_st0_ptr, st1_ptr, &sum, FULL_PRECISION);
- } else
- reg_div(st1_ptr, FPU_st0_ptr, &sum, FULL_PRECISION);
-
- poly_atan(&sum);
-
- if (quadrant & 4) {
- reg_sub(&CONST_PI2, &sum, &sum, FULL_PRECISION);
- }
- if (quadrant & 2) {
- reg_sub(&CONST_PI, &sum, &sum, FULL_PRECISION);
- }
- if (quadrant & 1)
- sum.sign ^= SIGN_POS ^ SIGN_NEG;
-
- /* All of the basic arithmetic is done now */
- control_word = saved_control;
- status_word = saved_status;
-
- reg_move(&sum, st1_ptr);
- } else
- if ((FPU_st0_tag == TW_Empty) || (st1_tag == TW_Empty)) {
- stack_underflow_pop(1);
- return;
- } else
- if ((FPU_st0_tag == TW_NaN) || (st1_tag == TW_NaN)) {
- real_2op_NaN(FPU_st0_ptr, st1_ptr, st1_ptr);
- pop();
- return;
- } else
- if ((FPU_st0_tag == TW_Infinity) || (st1_tag == TW_Infinity)) {
- char sign = st1_ptr->sign;
- if (FPU_st0_tag == TW_Infinity) {
- if (st1_tag == TW_Infinity) {
- if (FPU_st0_ptr->sign == SIGN_POS) {
- reg_move(&CONST_PI4, st1_ptr);
- } else
- reg_add(&CONST_PI4, &CONST_PI2, st1_ptr, FULL_PRECISION);
- } else {
-
-#ifdef DENORM_OPERAND
- if ((st1_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
-
- if (FPU_st0_ptr->sign == SIGN_POS) {
- reg_move(&CONST_Z, st1_ptr);
- pop();
- return;
- } else
- reg_move(&CONST_PI, st1_ptr);
- }
- } else {
- /* st(1) is infinity, st(0)
- * not infinity */
-#ifdef DENORM_OPERAND
- if ((FPU_st0_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
-
- reg_move(&CONST_PI2, st1_ptr);
- }
- st1_ptr->sign = sign;
- } else
- if (st1_tag == TW_Zero) {
- /* st(0) must be valid or zero */
- char sign = st1_ptr->sign;
-
-#ifdef DENORM_OPERAND
- if ((FPU_st0_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
-
- if (FPU_st0_ptr->sign == SIGN_POS) {
- reg_move(&CONST_Z, st1_ptr);
- pop();
- return;
- } else
- reg_move(&CONST_PI, st1_ptr);
- st1_ptr->sign = sign;
- } else
- if (FPU_st0_tag == TW_Zero) {
- /* st(1) must be
- * TW_Valid here */
- char sign = st1_ptr->sign;
-
-#ifdef DENORM_OPERAND
- if ((st1_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
-
- reg_move(&CONST_PI2, st1_ptr);
- st1_ptr->sign = sign;
- }
-#ifdef PARANOID
- else
- EXCEPTION(EX_INTERNAL | 0x220);
-#endif /* PARANOID */
-
- pop();
- set_precision_flag_up();/* We do not really know if up or down */
-}
-
-
-static void
-fprem(void)
-{
- fprem_kernel(RC_CHOP);
-}
-
-
-static void
-fprem1(void)
-{
- fprem_kernel(RC_RND);
-}
-
-
-static void
-fyl2xp1(void)
-{
- FPU_REG *st1_ptr = &st(1);
- char st1_tag = st1_ptr->tag;
-
- if (!((FPU_st0_tag ^ TW_Valid) | (st1_tag ^ TW_Valid))) {
- int saved_control, saved_status;
-
-#ifdef DENORM_OPERAND
- if (((FPU_st0_ptr->exp <= EXP_UNDER) ||
- (st1_ptr->exp <= EXP_UNDER)) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
-
- /* We use the general purpose arithmetic so we need to save
- * these. */
- saved_status = status_word;
- saved_control = control_word;
- control_word = FULL_PRECISION;
-
- if (poly_l2p1(FPU_st0_ptr, FPU_st0_ptr)) {
- arith_invalid(st1_ptr); /* poly_l2p1() returned
- * invalid */
- pop();
- return;
- }
- /* Enough of the basic arithmetic is done now */
- control_word = saved_control;
- status_word = saved_status;
-
- /* Let the multiply set the flags */
- reg_mul(FPU_st0_ptr, st1_ptr, st1_ptr, FULL_PRECISION);
-
- pop();
- } else
- if ((FPU_st0_tag == TW_Empty) | (st1_tag == TW_Empty)) {
- stack_underflow_pop(1);
- return;
- } else
- if (FPU_st0_tag == TW_Zero) {
- if (st1_tag <= TW_Zero) {
-
-#ifdef DENORM_OPERAND
- if ((st1_tag == TW_Valid) && (st1_ptr->exp <= EXP_UNDER) &&
- (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
-
- st1_ptr->sign ^= FPU_st0_ptr->sign;
- reg_move(FPU_st0_ptr, st1_ptr);
- } else
- if (st1_tag == TW_Infinity) {
- arith_invalid(st1_ptr); /* Infinity*log(1) */
- pop();
- return;
- } else
- if (st1_tag == TW_NaN) {
- real_2op_NaN(FPU_st0_ptr, st1_ptr, st1_ptr);
- pop();
- return;
- }
-#ifdef PARANOID
- else {
- EXCEPTION(EX_INTERNAL | 0x116);
- return;
- }
-#endif /* PARANOID */
- pop();
- return;
- } else
- if (FPU_st0_tag == TW_Valid) {
- if (st1_tag == TW_Zero) {
- if (FPU_st0_ptr->sign == SIGN_NEG) {
- if (FPU_st0_ptr->exp >= EXP_BIAS) {
- /* st(0) holds
- * <= -1.0 */
- arith_invalid(st1_ptr); /* infinity*log(1) */
- pop();
- return;
- }
-#ifdef DENORM_OPERAND
- if ((FPU_st0_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
- st1_ptr->sign ^= SIGN_POS ^ SIGN_NEG;
- pop();
- return;
- }
-#ifdef DENORM_OPERAND
- if ((FPU_st0_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
- pop();
- return;
- }
- if (st1_tag == TW_Infinity) {
- if (FPU_st0_ptr->sign == SIGN_NEG) {
- if ((FPU_st0_ptr->exp >= EXP_BIAS) &&
- !((FPU_st0_ptr->sigh == 0x80000000) &&
- (FPU_st0_ptr->sigl == 0))) {
- /* st(0) holds
- * < -1.0 */
- arith_invalid(st1_ptr);
- pop();
- return;
- }
-#ifdef DENORM_OPERAND
- if ((FPU_st0_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
- st1_ptr->sign ^= SIGN_POS ^ SIGN_NEG;
- pop();
- return;
- }
-#ifdef DENORM_OPERAND
- if ((FPU_st0_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
- pop();
- return;
- }
- if (st1_tag == TW_NaN) {
- real_2op_NaN(FPU_st0_ptr, st1_ptr, st1_ptr);
- pop();
- return;
- }
- } else
- if (FPU_st0_tag == TW_NaN) {
- real_2op_NaN(FPU_st0_ptr, st1_ptr, st1_ptr);
- pop();
- return;
- } else
- if (FPU_st0_tag == TW_Infinity) {
- if (st1_tag == TW_NaN) {
- real_2op_NaN(FPU_st0_ptr, st1_ptr, st1_ptr);
- pop();
- return;
- } else
- if ((FPU_st0_ptr->sign == SIGN_NEG) ||
- (st1_tag == TW_Zero)) {
- arith_invalid(st1_ptr); /* log(infinity) */
- pop();
- return;
- }
- /* st(1) must be valid
- * here. */
-
-#ifdef DENORM_OPERAND
- if ((st1_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
-
- /* The Manual says
- * that log(Infinity)
- * is invalid, but a
- * real 80486 sensibly
- * says that it is
- * o.k. */
- {
- char sign = st1_ptr->sign;
- reg_move(&CONST_INF, st1_ptr);
- st1_ptr->sign = sign;
- }
- pop();
- return;
- }
-#ifdef PARANOID
- else {
- EXCEPTION(EX_INTERNAL | 0x117);
- }
-#endif /* PARANOID */
-}
-
-
-static void
-emu_fscale(void)
-{
- FPU_REG *st1_ptr = &st(1);
- char st1_tag = st1_ptr->tag;
- int old_cw = control_word;
-
- if (!((FPU_st0_tag ^ TW_Valid) | (st1_tag ^ TW_Valid))) {
- long scale;
- FPU_REG tmp;
-
-#ifdef DENORM_OPERAND
- if (((FPU_st0_ptr->exp <= EXP_UNDER) ||
- (st1_ptr->exp <= EXP_UNDER)) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
-
- if (st1_ptr->exp > EXP_BIAS + 30) {
- /* 2^31 is far too large, would require 2^(2^30) or
- * 2^(-2^30) */
- char sign;
-
- if (st1_ptr->sign == SIGN_POS) {
- EXCEPTION(EX_Overflow);
- sign = FPU_st0_ptr->sign;
- reg_move(&CONST_INF, FPU_st0_ptr);
- FPU_st0_ptr->sign = sign;
- } else {
- EXCEPTION(EX_Underflow);
- sign = FPU_st0_ptr->sign;
- reg_move(&CONST_Z, FPU_st0_ptr);
- FPU_st0_ptr->sign = sign;
- }
- return;
- }
- control_word &= ~CW_RC;
- control_word |= RC_CHOP;
- reg_move(st1_ptr, &tmp);
- round_to_int(&tmp); /* This can never overflow here */
- control_word = old_cw;
- scale = st1_ptr->sign ? -tmp.sigl : tmp.sigl;
- scale += FPU_st0_ptr->exp;
- FPU_st0_ptr->exp = scale;
-
- /* Use round_reg() to properly detect under/overflow etc */
- round_reg(FPU_st0_ptr, 0, control_word);
-
- return;
- } else
- if (FPU_st0_tag == TW_Valid) {
- if (st1_tag == TW_Zero) {
-
-#ifdef DENORM_OPERAND
- if ((FPU_st0_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
-
- return;
- }
- if (st1_tag == TW_Infinity) {
- char sign = st1_ptr->sign;
-
-#ifdef DENORM_OPERAND
- if ((FPU_st0_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
-
- if (sign == SIGN_POS) {
- reg_move(&CONST_INF, FPU_st0_ptr);
- } else
- reg_move(&CONST_Z, FPU_st0_ptr);
- FPU_st0_ptr->sign = sign;
- return;
- }
- if (st1_tag == TW_NaN) {
- real_2op_NaN(FPU_st0_ptr, st1_ptr, FPU_st0_ptr);
- return;
- }
- } else
- if (FPU_st0_tag == TW_Zero) {
- if (st1_tag == TW_Valid) {
-
-#ifdef DENORM_OPERAND
- if ((st1_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
-
- return;
- } else
- if (st1_tag == TW_Zero) {
- return;
- } else
- if (st1_tag == TW_Infinity) {
- if (st1_ptr->sign == SIGN_NEG)
- return;
- else {
- arith_invalid(FPU_st0_ptr); /* Zero scaled by
- * +Infinity */
- return;
- }
- } else
- if (st1_tag == TW_NaN) {
- real_2op_NaN(FPU_st0_ptr, st1_ptr, FPU_st0_ptr);
- return;
- }
- } else
- if (FPU_st0_tag == TW_Infinity) {
- if (st1_tag == TW_Valid) {
-
-#ifdef DENORM_OPERAND
- if ((st1_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return;
-#endif /* DENORM_OPERAND */
-
- return;
- }
- if (((st1_tag == TW_Infinity) && (st1_ptr->sign == SIGN_POS))
- || (st1_tag == TW_Zero))
- return;
- else
- if (st1_tag == TW_Infinity) {
- arith_invalid(FPU_st0_ptr); /* Infinity scaled by
- * -Infinity */
- return;
- } else
- if (st1_tag == TW_NaN) {
- real_2op_NaN(FPU_st0_ptr, st1_ptr, FPU_st0_ptr);
- return;
- }
- } else
- if (FPU_st0_tag == TW_NaN) {
- if (st1_tag != TW_Empty) {
- real_2op_NaN(FPU_st0_ptr, st1_ptr, FPU_st0_ptr);
- return;
- }
- }
-#ifdef PARANOID
- if (!((FPU_st0_tag == TW_Empty) || (st1_tag == TW_Empty))) {
- EXCEPTION(EX_INTERNAL | 0x115);
- return;
- }
-#endif
-
- /* At least one of st(0), st(1) must be empty */
- stack_underflow();
-
-}
-
-
-/*---------------------------------------------------------------------------*/
-
-static FUNC trig_table_a[] = {
- f2xm1, fyl2x, fptan, fpatan, fxtract, fprem1, fdecstp, fincstp
-};
-
-void
-trig_a(void)
-{
- (trig_table_a[FPU_rm]) ();
-}
-
-
-static FUNC trig_table_b[] =
-{
- fprem, fyl2xp1, fsqrt_, fsincos, frndint_, emu_fscale, fsin, fcos
-};
-
-void
-trig_b(void)
-{
- (trig_table_b[FPU_rm]) ();
-}
diff --git a/sys/gnu/i386/fpemul/get_address.c b/sys/gnu/i386/fpemul/get_address.c
deleted file mode 100644
index 4ae998b..0000000
--- a/sys/gnu/i386/fpemul/get_address.c
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * get_address.c
- *
- * Get the effective address from an FPU instruction.
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-/*---------------------------------------------------------------------------+
- | Note: |
- | The file contains code which accesses user memory. |
- | Emulator static data may change when user memory is accessed, due to |
- | other processes using the emulator while swapping is in progress. |
- +---------------------------------------------------------------------------*/
-
-#include <sys/param.h>
-#include <sys/proc.h>
-#include <sys/systm.h>
-#include <machine/cpu.h>
-#include <machine/pcb.h>
-#include <machine/reg.h>
-
-#include <gnu/i386/fpemul/fpu_emu.h>
-#include <gnu/i386/fpemul/fpu_system.h>
-#include <gnu/i386/fpemul/exception.h>
-
-static int reg_offset[] = {
-tEAX, tECX, tEDX, tEBX, tESP, tEBP, tESI, tEDI};
-#define REG_(x) (*(((int*)FPU_info) + reg_offset[(x)]))
-
-void *FPU_data_address;
-
-
-/* Decode the SIB byte. This function assumes mod != 0 */
-static void *
-sib(int mod)
-{
- unsigned char ss, index, base;
- long offset;
-
- REENTRANT_CHECK(OFF);
- base = fubyte((char *) FPU_EIP); /* The SIB byte */
- REENTRANT_CHECK(ON);
- FPU_EIP++;
- ss = base >> 6;
- index = (base >> 3) & 7;
- base &= 7;
-
- if ((mod == 0) && (base == 5))
- offset = 0; /* No base register */
- else
- offset = REG_(base);
-
- if (index == 4) {
- /* No index register */
- /* A non-zero ss is illegal */
- if (ss)
- EXCEPTION(EX_Invalid);
- } else {
- offset += (REG_(index)) << ss;
- }
-
- if (mod == 1) {
- /* 8 bit signed displacement */
- REENTRANT_CHECK(OFF);
- offset += (signed char) fubyte((char *) FPU_EIP);
- REENTRANT_CHECK(ON);
- FPU_EIP++;
- } else
- if (mod == 2 || base == 5) { /* The second condition also
- * has mod==0 */
- /* 32 bit displacment */
- REENTRANT_CHECK(OFF);
- offset += (signed) fuword((unsigned long *) FPU_EIP);
- REENTRANT_CHECK(ON);
- FPU_EIP += 4;
- }
- return (void *) (intptr_t) offset;
-}
-
-
-/*
- MOD R/M byte: MOD == 3 has a special use for the FPU
- SIB byte used iff R/M = 100b
-
- 7 6 5 4 3 2 1 0
- ..... ......... .........
- MOD OPCODE(2) R/M
-
-
- SIB byte
-
- 7 6 5 4 3 2 1 0
- ..... ......... .........
- SS INDEX BASE
-
-*/
-
-void
-get_address(unsigned char FPU_modrm)
-{
- unsigned char mod;
- long *cpu_reg_ptr;
- int offset = 0; /* Initialized just to stop compiler warnings. */
-
- mod = (FPU_modrm >> 6) & 3;
-
- if (FPU_rm == 4 && mod != 3) {
- FPU_data_address = sib(mod);
- return;
- }
- cpu_reg_ptr = (long *) &REG_(FPU_rm);
- switch (mod) {
- case 0:
- if (FPU_rm == 5) {
- /* Special case: disp32 */
- REENTRANT_CHECK(OFF);
- offset = fuword((unsigned long *) FPU_EIP);
- REENTRANT_CHECK(ON);
- FPU_EIP += 4;
- FPU_data_address = (void *) offset;
- return;
- } else {
- /* Just return the contents of the cpu register */
- FPU_data_address = (void *) (intptr_t) *cpu_reg_ptr;
- return;
- }
- case 1:
- /* 8 bit signed displacement */
- REENTRANT_CHECK(OFF);
- offset = (signed char) fubyte((char *) FPU_EIP);
- REENTRANT_CHECK(ON);
- FPU_EIP++;
- break;
- case 2:
- /* 32 bit displacement */
- REENTRANT_CHECK(OFF);
- offset = (signed) fuword((unsigned long *) FPU_EIP);
- REENTRANT_CHECK(ON);
- FPU_EIP += 4;
- break;
- case 3:
- /* Not legal for the FPU */
- EXCEPTION(EX_Invalid);
- }
-
- FPU_data_address = (void *) (intptr_t) (offset + *cpu_reg_ptr);
-}
diff --git a/sys/gnu/i386/fpemul/load_store.c b/sys/gnu/i386/fpemul/load_store.c
deleted file mode 100644
index 2cfbba5..0000000
--- a/sys/gnu/i386/fpemul/load_store.c
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * load_store.c
- *
- * This file contains most of the code to interpret the FPU instructions
- * which load and store from user memory.
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-/*---------------------------------------------------------------------------+
- | Note: |
- | The file contains code which accesses user memory. |
- | Emulator static data may change when user memory is accessed, due to |
- | other processes using the emulator while swapping is in progress. |
- +---------------------------------------------------------------------------*/
-
-#include <sys/param.h>
-#include <sys/proc.h>
-#include <sys/systm.h>
-#include <machine/pcb.h>
-
-#include <gnu/i386/fpemul/fpu_emu.h>
-#include <gnu/i386/fpemul/fpu_system.h>
-#include <gnu/i386/fpemul/status_w.h>
-
-
-#define _NONE_ 0 /* FPU_st0_ptr etc not needed */
-#define _REG0_ 1 /* Will be storing st(0) */
-#define _PUSH_ 3 /* Need to check for space to push onto stack */
-#define _null_ 4 /* Function illegal or not implemented */
-
-#define pop_0() { pop_ptr->tag = TW_Empty; top++; }
-
-
-static unsigned char type_table[32] = {
- _PUSH_, _PUSH_, _PUSH_, _PUSH_,
- _null_, _null_, _null_, _null_,
- _REG0_, _REG0_, _REG0_, _REG0_,
- _REG0_, _REG0_, _REG0_, _REG0_,
- _NONE_, _null_, _NONE_, _PUSH_,
- _NONE_, _PUSH_, _null_, _PUSH_,
- _NONE_, _null_, _NONE_, _REG0_,
- _NONE_, _REG0_, _NONE_, _REG0_
-};
-
-void
-load_store_instr(char type)
-{
- FPU_REG *pop_ptr; /* We need a version of FPU_st0_ptr which
- * won't change. */
-
- pop_ptr = NULL; /* Initialized just to stop compiler warnings. */
-
-
- switch (type_table[(int) (unsigned) type]) {
- case _NONE_:
- break;
- case _REG0_:
- pop_ptr = &st(0); /* Some of these instructions pop
- * after storing */
-
- FPU_st0_ptr = pop_ptr; /* Set the global variables. */
- FPU_st0_tag = FPU_st0_ptr->tag;
- break;
- case _PUSH_:
- {
- pop_ptr = &st(-1);
- if (pop_ptr->tag != TW_Empty) {
- stack_overflow();
- return;
- }
- top--;
- }
- break;
- case _null_:
- Un_impl();
- return;
-#ifdef PARANOID
- default:
- return EXCEPTION(EX_INTERNAL);
-#endif /* PARANOID */
- }
-
- switch (type) {
- case 000: /* fld m32real */
- reg_load_single();
- setcc(0); /* Clear the SW_C1 bit, "other bits undefined" */
- reg_move(&FPU_loaded_data, pop_ptr);
- break;
- case 001: /* fild m32int */
- reg_load_int32();
- setcc(0); /* Clear the SW_C1 bit, "other bits undefined" */
- reg_move(&FPU_loaded_data, pop_ptr);
- break;
- case 002: /* fld m64real */
- reg_load_double();
- setcc(0); /* Clear the SW_C1 bit, "other bits undefined" */
- reg_move(&FPU_loaded_data, pop_ptr);
- break;
- case 003: /* fild m16int */
- reg_load_int16();
- setcc(0); /* Clear the SW_C1 bit, "other bits undefined" */
- reg_move(&FPU_loaded_data, pop_ptr);
- break;
- case 010: /* fst m32real */
- reg_store_single();
- break;
- case 011: /* fist m32int */
- reg_store_int32();
- break;
- case 012: /* fst m64real */
- reg_store_double();
- break;
- case 013: /* fist m16int */
- reg_store_int16();
- break;
- case 014: /* fstp m32real */
- if (reg_store_single())
- pop_0();/* pop only if the number was actually stored
- * (see the 80486 manual p16-28) */
- break;
- case 015: /* fistp m32int */
- if (reg_store_int32())
- pop_0();/* pop only if the number was actually stored
- * (see the 80486 manual p16-28) */
- break;
- case 016: /* fstp m64real */
- if (reg_store_double())
- pop_0();/* pop only if the number was actually stored
- * (see the 80486 manual p16-28) */
- break;
- case 017: /* fistp m16int */
- if (reg_store_int16())
- pop_0();/* pop only if the number was actually stored
- * (see the 80486 manual p16-28) */
- break;
- case 020: /* fldenv m14/28byte */
- fldenv();
- break;
- case 022: /* frstor m94/108byte */
- frstor();
- break;
- case 023: /* fbld m80dec */
- reg_load_bcd();
- setcc(0); /* Clear the SW_C1 bit, "other bits undefined" */
- reg_move(&FPU_loaded_data, pop_ptr);
- break;
- case 024: /* fldcw */
- REENTRANT_CHECK(OFF);
- control_word = fusword((unsigned short *) FPU_data_address);
- REENTRANT_CHECK(ON);
-#ifdef NO_UNDERFLOW_TRAP
- if (!(control_word & EX_Underflow)) {
- control_word |= EX_Underflow;
- }
-#endif
- /* We want no net effect: */
- FPU_data_address = (void *) (intptr_t) data_operand_offset;
- FPU_entry_eip = ip_offset; /* We want no net effect */
- break;
- case 025: /* fld m80real */
- reg_load_extended();
- setcc(0); /* Clear the SW_C1 bit, "other bits undefined" */
- reg_move(&FPU_loaded_data, pop_ptr);
- break;
- case 027: /* fild m64int */
- reg_load_int64();
- setcc(0); /* Clear the SW_C1 bit, "other bits undefined" */
- reg_move(&FPU_loaded_data, pop_ptr);
- break;
- case 030: /* fstenv m14/28byte */
- fstenv();
- /* We want no net effect: */
- FPU_data_address = (void *) (intptr_t) data_operand_offset;
- FPU_entry_eip = ip_offset; /* We want no net effect */
- break;
- case 032: /* fsave */
- fsave();
- /* We want no net effect: */
- FPU_data_address = (void *) (intptr_t) data_operand_offset;
- FPU_entry_eip = ip_offset; /* We want no net effect */
- break;
- case 033: /* fbstp m80dec */
- if (reg_store_bcd())
- pop_0();/* pop only if the number was actually stored
- * (see the 80486 manual p16-28) */
- break;
- case 034: /* fstcw m16int */
- REENTRANT_CHECK(OFF);
-/* verify_area(VERIFY_WRITE, FPU_data_address, 2);*/
- susword( (short *) FPU_data_address,control_word);
- REENTRANT_CHECK(ON);
- /* We want no net effect: */
- FPU_data_address = (void *) (intptr_t ) data_operand_offset;
- FPU_entry_eip = ip_offset; /* We want no net effect */
- break;
- case 035: /* fstp m80real */
- if (reg_store_extended())
- pop_0();/* pop only if the number was actually stored
- * (see the 80486 manual p16-28) */
- break;
- case 036: /* fstsw m2byte */
- status_word &= ~SW_Top;
- status_word |= (top & 7) << SW_Top_Shift;
- REENTRANT_CHECK(OFF);
-/* verify_area(VERIFY_WRITE, FPU_data_address, 2);*/
- susword( (short *) FPU_data_address,status_word);
- REENTRANT_CHECK(ON);
- /* We want no net effect: */
- FPU_data_address = (void *) (intptr_t) data_operand_offset;
- FPU_entry_eip = ip_offset; /* We want no net effect */
- break;
- case 037: /* fistp m64int */
- if (reg_store_int64())
- pop_0();/* pop only if the number was actually stored
- * (see the 80486 manual p16-28) */
- break;
- }
-}
diff --git a/sys/gnu/i386/fpemul/math_emu.h b/sys/gnu/i386/fpemul/math_emu.h
deleted file mode 100644
index 302be7b..0000000
--- a/sys/gnu/i386/fpemul/math_emu.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- *
- * $FreeBSD$
- *
- */
-
-#ifndef _MATH_EMU_H
-#define _MATH_EMU_H
-
-struct fpu_reg {
- char sign;
- char tag;
- long exp;
- u_long sigl;
- u_long sigh;
-};
-
-union i387_union {
- struct i387_hard_struct {
- long cwd;
- long swd;
- long twd;
- long fip;
- long fcs;
- long foo;
- long fos;
- long st_space[20]; /* 8*10 bytes for each FP-reg = 80
- * bytes */
- } hard;
- struct i387_soft_struct {
- long cwd;
- long swd;
- long twd;
- long fip;
- long fcs;
- long foo;
- long fos;
- long top;
- struct fpu_reg regs[8]; /* 8*16 bytes for each FP-reg = 128
- * bytes */
- unsigned char lookahead;
- struct trapframe *frame;
- unsigned long entry_eip;
- int orig_eip;
- } soft;
-};
-#endif
diff --git a/sys/gnu/i386/fpemul/poly_2xm1.c b/sys/gnu/i386/fpemul/poly_2xm1.c
deleted file mode 100644
index e5a6515..0000000
--- a/sys/gnu/i386/fpemul/poly_2xm1.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * poly_2xm1.c
- *
- * Function to compute 2^x-1 by a polynomial approximation.
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-#include <gnu/i386/fpemul/reg_constant.h>
-
-
-
-#define HIPOWER 13
-static unsigned short lterms[HIPOWER][4] =
-{
- {0x79b5, 0xd1cf, 0x17f7, 0xb172},
- {0x1b56, 0x058b, 0x7bff, 0x3d7f},
- {0x8bb0, 0x8250, 0x846b, 0x0e35},
- {0xbc65, 0xf747, 0x556d, 0x0276},
- {0x17cb, 0x9e39, 0x61ff, 0x0057},
- {0xe018, 0x9776, 0x1848, 0x000a},
- {0x66f2, 0xff30, 0xffe5, 0x0000},
- {0x682f, 0xffb6, 0x162b, 0x0000},
- {0xb7ca, 0x2956, 0x01b5, 0x0000},
- {0xcd3e, 0x4817, 0x001e, 0x0000},
- {0xb7e2, 0xecbe, 0x0001, 0x0000},
- {0x0ed5, 0x1a27, 0x0000, 0x0000},
- {0x101d, 0x0222, 0x0000, 0x0000},
-};
-
-
-/*--- poly_2xm1() -----------------------------------------------------------+
- | |
- +---------------------------------------------------------------------------*/
-int
-poly_2xm1(FPU_REG * arg, FPU_REG * result)
-{
- short exponent;
- long long Xll;
- FPU_REG accum;
-
-
- exponent = arg->exp - EXP_BIAS;
-
- if (arg->tag == TW_Zero) {
- /* Return 0.0 */
- reg_move(&CONST_Z, result);
- return 0;
- }
- if (exponent >= 0) { /* Can't hack a number >= 1.0 */
- arith_invalid(result); /* Number too large */
- return 1;
- }
- if (arg->sign != SIGN_POS) { /* Can't hack a number < 0.0 */
- arith_invalid(result); /* Number negative */
- return 1;
- }
- if (exponent < -64) {
- reg_move(&CONST_LN2, result);
- return 0;
- }
- *(unsigned *) &Xll = arg->sigl;
- *(((unsigned *) &Xll) + 1) = arg->sigh;
- if (exponent < -1) {
- /* shift the argument right by the required places */
- if (shrx(&Xll, -1 - exponent) >= (unsigned)0x80000000)
- Xll++; /* round up */
- }
- *(short *) &(accum.sign) = 0; /* will be a valid positive nr with
- * expon = 0 */
- accum.exp = 0;
-
- /* Do the basic fixed point polynomial evaluation */
- polynomial((unsigned *) &accum.sigl, (unsigned *) &Xll, lterms, HIPOWER - 1);
-
- /* Convert to 64 bit signed-compatible */
- accum.exp += EXP_BIAS - 1;
-
- reg_move(&accum, result);
-
- normalize(result);
-
- return 0;
-
-}
diff --git a/sys/gnu/i386/fpemul/poly_atan.c b/sys/gnu/i386/fpemul/poly_atan.c
deleted file mode 100644
index 4f937fb..0000000
--- a/sys/gnu/i386/fpemul/poly_atan.c
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
- * p_atan.c
- *
- * Compute the tan of a FPU_REG, using a polynomial approximation.
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-#include <gnu/i386/fpemul/reg_constant.h>
-#include <gnu/i386/fpemul/control_w.h>
-
-
-#define HIPOWERon 6 /* odd poly, negative terms */
-static unsigned oddnegterms[HIPOWERon][2] =
-{
- {0x00000000, 0x00000000}, /* for + 1.0 */
- {0x763b6f3d, 0x1adc4428},
- {0x20f0630b, 0x0502909d},
- {0x4e825578, 0x0198ce38},
- {0x22b7cb87, 0x008da6e3},
- {0x9b30ca03, 0x00239c79}
-};
-#define HIPOWERop 6 /* odd poly, positive terms */
-static unsigned oddplterms[HIPOWERop][2] =
-{
- {0xa6f67cb8, 0x94d910bd},
- {0xa02ffab4, 0x0a43cb45},
- {0x04265e6b, 0x02bf5655},
- {0x0a728914, 0x00f280f7},
- {0x6d640e01, 0x004d6556},
- {0xf1dd2dbf, 0x000a530a}
-};
-
-
-static unsigned denomterm[2] =
-{0xfc4bd208, 0xea2e6612};
-
-
-static void poly_add_1(FPU_REG * src);
-
-/*--- poly_atan() -----------------------------------------------------------+
- | |
- +---------------------------------------------------------------------------*/
-void
-poly_atan(FPU_REG * arg)
-{
- char recursions = 0;
- short exponent;
- FPU_REG odd_poly, even_poly, pos_poly, neg_poly;
- FPU_REG argSq;
- long long arg_signif, argSqSq;
-
-
-#ifdef PARANOID
- if (arg->sign != 0) { /* Can't hack a number < 0.0 */
- arith_invalid(arg);
- return;
- } /* Need a positive number */
-#endif /* PARANOID */
-
- exponent = arg->exp - EXP_BIAS;
-
- if (arg->tag == TW_Zero) {
- /* Return 0.0 */
- reg_move(&CONST_Z, arg);
- return;
- }
- if (exponent >= -2) {
- /* argument is in the range [0.25 .. 1.0] */
- if (exponent >= 0) {
-#ifdef PARANOID
- if ((exponent == 0) &&
- (arg->sigl == 0) && (arg->sigh == 0x80000000))
-#endif /* PARANOID */
- {
- reg_move(&CONST_PI4, arg);
- return;
- }
-#ifdef PARANOID
- EXCEPTION(EX_INTERNAL | 0x104); /* There must be a logic
- * error */
-#endif /* PARANOID */
- }
- /* If the argument is greater than sqrt(2)-1 (=0.414213562...) */
- /* convert the argument by an identity for atan */
- if ((exponent >= -1) || (arg->sigh > 0xd413ccd0)) {
- FPU_REG numerator, denom;
-
- recursions++;
-
- arg_signif = *(long long *) &(arg->sigl);
- if (exponent < -1) {
- if (shrx(&arg_signif, -1 - exponent) >= (unsigned)0x80000000)
- arg_signif++; /* round up */
- }
- *(long long *) &(numerator.sigl) = -arg_signif;
- numerator.exp = EXP_BIAS - 1;
- normalize(&numerator); /* 1 - arg */
-
- arg_signif = *(long long *) &(arg->sigl);
- if (shrx(&arg_signif, -exponent) >= (unsigned)0x80000000)
- arg_signif++; /* round up */
- *(long long *) &(denom.sigl) = arg_signif;
- denom.sigh |= 0x80000000; /* 1 + arg */
-
- arg->exp = numerator.exp;
- reg_u_div(&numerator, &denom, arg, FULL_PRECISION);
-
- exponent = arg->exp - EXP_BIAS;
- }
- }
- *(long long *) &arg_signif = *(long long *) &(arg->sigl);
-
-#ifdef PARANOID
- /* This must always be true */
- if (exponent >= -1) {
- EXCEPTION(EX_INTERNAL | 0x120); /* There must be a logic error */
- }
-#endif /* PARANOID */
-
- /* shift the argument right by the required places */
- if (shrx(&arg_signif, -1 - exponent) >= (unsigned)0x80000000)
- arg_signif++; /* round up */
-
- /* Now have arg_signif with binary point at the left .1xxxxxxxx */
- mul64(&arg_signif, &arg_signif, (long long *) (&argSq.sigl));
- mul64((long long *) (&argSq.sigl), (long long *) (&argSq.sigl), &argSqSq);
-
- /* will be a valid positive nr with expon = 0 */
- *(short *) &(pos_poly.sign) = 0;
- pos_poly.exp = EXP_BIAS;
-
- /* Do the basic fixed point polynomial evaluation */
- polynomial((u_int *) &pos_poly.sigl, (unsigned *) &argSqSq,
- (unsigned short (*)[4]) oddplterms, HIPOWERop - 1);
- mul64((long long *) (&argSq.sigl), (long long *) (&pos_poly.sigl),
- (long long *) (&pos_poly.sigl));
-
- /* will be a valid positive nr with expon = 0 */
- *(short *) &(neg_poly.sign) = 0;
- neg_poly.exp = EXP_BIAS;
-
- /* Do the basic fixed point polynomial evaluation */
- polynomial((u_int *) &neg_poly.sigl, (unsigned *) &argSqSq,
- (unsigned short (*)[4]) oddnegterms, HIPOWERon - 1);
-
- /* Subtract the mantissas */
- *((long long *) (&pos_poly.sigl)) -= *((long long *) (&neg_poly.sigl));
-
- reg_move(&pos_poly, &odd_poly);
- poly_add_1(&odd_poly);
-
- /* The complete odd polynomial */
- reg_u_mul(&odd_poly, arg, &odd_poly, FULL_PRECISION);
-
- /* will be a valid positive nr with expon = 0 */
- *(short *) &(even_poly.sign) = 0;
-
- mul64((long long *) (&argSq.sigl),
- (long long *) (&denomterm), (long long *) (&even_poly.sigl));
-
- poly_add_1(&even_poly);
-
- reg_div(&odd_poly, &even_poly, arg, FULL_PRECISION);
-
- if (recursions)
- reg_sub(&CONST_PI4, arg, arg, FULL_PRECISION);
-}
-
-
-/* The argument to this function must be polynomial() compatible,
- i.e. have an exponent (not checked) of EXP_BIAS-1 but need not
- be normalized.
- This function adds 1.0 to the (assumed positive) argument. */
-static void
-poly_add_1(FPU_REG * src)
-{
-/* Rounding in a consistent direction produces better results
- for the use of this function in poly_atan. Simple truncation
- is used here instead of round-to-nearest. */
-
-#ifdef OBSOLETE
- char round = (src->sigl & 3) == 3;
-#endif /* OBSOLETE */
-
- shrx(&src->sigl, 1);
-
-#ifdef OBSOLETE
- if (round)
- (*(long long *) &src->sigl)++; /* Round to even */
-#endif /* OBSOLETE */
-
- src->sigh |= 0x80000000;
-
- src->exp = EXP_BIAS;
-
-}
diff --git a/sys/gnu/i386/fpemul/poly_div.s b/sys/gnu/i386/fpemul/poly_div.s
deleted file mode 100644
index 505588d..0000000
--- a/sys/gnu/i386/fpemul/poly_div.s
+++ /dev/null
@@ -1,138 +0,0 @@
- .file "poly_div.S"
-/*
- * poly_div.S
- *
- * A set of functions to divide 64 bit integers by fixed numbers.
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-#include <gnu/i386/fpemul/fpu_asm.h>
-
-.text
-
-/*---------------------------------------------------------------------------*/
-ENTRY(poly_div2)
- pushl %ebp
- movl %esp,%ebp
-
- movl PARAM1,%ecx
- movw (%ecx),%ax
-
- shrl $1,4(%ecx)
- rcrl $1,(%ecx)
-
- testw $1,%ax
- je poly_div2_exit
-
- addl $1,(%ecx)
- adcl $0,4(%ecx)
-poly_div2_exit:
-
- leave
- ret
-/*---------------------------------------------------------------------------*/
-ENTRY(poly_div4)
- pushl %ebp
- movl %esp,%ebp
-
- movl PARAM1,%ecx
- movw (%ecx),%ax
-
- movl 4(%ecx),%edx
- shll $30,%edx
-
- shrl $2,4(%ecx)
- shrl $2,(%ecx)
-
- orl %edx,(%ecx)
-
- testw $2,%ax
- je poly_div4_exit
-
- addl $1,(%ecx)
- adcl $0,4(%ecx)
-poly_div4_exit:
-
- leave
- ret
-/*---------------------------------------------------------------------------*/
-ENTRY(poly_div16)
- pushl %ebp
- movl %esp,%ebp
-
- movl PARAM1,%ecx
- movw (%ecx),%ax
-
- movl 4(%ecx),%edx
- shll $28,%edx
-
- shrl $4,4(%ecx)
- shrl $4,(%ecx)
-
- orl %edx,(%ecx)
-
- testw $8,%ax
- je poly_div16_exit
-
- addl $1,(%ecx)
- adcl $0,4(%ecx)
-poly_div16_exit:
-
- leave
- ret
-/*---------------------------------------------------------------------------*/
diff --git a/sys/gnu/i386/fpemul/poly_l2.c b/sys/gnu/i386/fpemul/poly_l2.c
deleted file mode 100644
index 19a5501..0000000
--- a/sys/gnu/i386/fpemul/poly_l2.c
+++ /dev/null
@@ -1,316 +0,0 @@
-/*
- * poly_l2.c
- *
- * Compute the base 2 log of a FPU_REG, using a polynomial approximation.
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-
-#include <gnu/i386/fpemul/reg_constant.h>
-#include <gnu/i386/fpemul/control_w.h>
-
-
-
-#define HIPOWER 9
-static unsigned short lterms[HIPOWER][4] =
-{
- /* Ideal computation with these coeffs gives about 64.6 bit rel
- * accuracy. */
- {0xe177, 0xb82f, 0x7652, 0x7154},
- {0xee0f, 0xe80f, 0x2770, 0x7b1c},
- {0x0fc0, 0xbe87, 0xb143, 0x49dd},
- {0x78b9, 0xdadd, 0xec54, 0x34c2},
- {0x003a, 0x5de9, 0x628b, 0x2909},
- {0x5588, 0xed16, 0x4abf, 0x2193},
- {0xb461, 0x85f7, 0x347a, 0x1c6a},
- {0x0975, 0x87b3, 0xd5bf, 0x1876},
- {0xe85c, 0xcec9, 0x84e7, 0x187d}
-};
-
-
-
-
-/*--- poly_l2() -------------------------------------------------------------+
- | Base 2 logarithm by a polynomial approximation. |
- +---------------------------------------------------------------------------*/
-void
-poly_l2(FPU_REG * arg, FPU_REG * result)
-{
- short exponent;
- char zero; /* flag for an Xx == 0 */
- unsigned short bits, shift;
- long long Xsq;
- FPU_REG accum, denom, num, Xx;
-
-
- exponent = arg->exp - EXP_BIAS;
-
- accum.tag = TW_Valid; /* set the tags to Valid */
-
- if (arg->sigh > (unsigned) 0xb504f334) {
- /* This is good enough for the computation of the polynomial
- * sum, but actually results in a loss of precision for the
- * computation of Xx. This will matter only if exponent
- * becomes zero. */
- exponent++;
- accum.sign = 1; /* sign to negative */
- num.exp = EXP_BIAS; /* needed to prevent errors in div
- * routine */
- reg_u_div(&CONST_1, arg, &num, FULL_PRECISION);
- } else {
- accum.sign = 0; /* set the sign to positive */
- num.sigl = arg->sigl; /* copy the mantissa */
- num.sigh = arg->sigh;
- }
-
-
- /* shift num left, lose the ms bit */
- num.sigh <<= 1;
- if (num.sigl & 0x80000000)
- num.sigh |= 1;
- num.sigl <<= 1;
-
- denom.sigl = num.sigl;
- denom.sigh = num.sigh;
- poly_div4((long long *) &(denom.sigl));
- denom.sigh += 0x80000000; /* set the msb */
- Xx.exp = EXP_BIAS; /* needed to prevent errors in div routine */
- reg_u_div(&num, &denom, &Xx, FULL_PRECISION);
-
- zero = !(Xx.sigh | Xx.sigl);
-
- mul64((long long *) &Xx.sigl, (long long *) &Xx.sigl, &Xsq);
- poly_div16(&Xsq);
-
- accum.exp = -1; /* exponent of accum */
-
- /* Do the basic fixed point polynomial evaluation */
- polynomial((unsigned *) &accum.sigl, (unsigned *) &Xsq, lterms, HIPOWER - 1);
-
- if (!exponent) {
- /* If the exponent is zero, then we would lose precision by
- * sticking to fixed point computation here */
- /* We need to re-compute Xx because of loss of precision. */
- FPU_REG lXx;
- char sign;
-
- sign = accum.sign;
- accum.sign = 0;
-
- /* make accum compatible and normalize */
- accum.exp = EXP_BIAS + accum.exp;
- normalize(&accum);
-
- if (zero) {
- reg_move(&CONST_Z, result);
- } else {
- /* we need to re-compute lXx to better accuracy */
- num.tag = TW_Valid; /* set the tags to Vaild */
- num.sign = 0; /* set the sign to positive */
- num.exp = EXP_BIAS - 1;
- if (sign) {
- /* The argument is of the form 1-x */
- /* Use 1-1/(1-x) = x/(1-x) */
- *((long long *) &num.sigl) = -*((long long *) &(arg->sigl));
- normalize(&num);
- reg_div(&num, arg, &num, FULL_PRECISION);
- } else {
- normalize(&num);
- }
-
- denom.tag = TW_Valid; /* set the tags to Valid */
- denom.sign = SIGN_POS; /* set the sign to positive */
- denom.exp = EXP_BIAS;
-
- reg_div(&num, &denom, &lXx, FULL_PRECISION);
-
- reg_u_mul(&lXx, &accum, &accum, FULL_PRECISION);
-
- reg_u_add(&lXx, &accum, result, FULL_PRECISION);
-
- normalize(result);
- }
-
- result->sign = sign;
- return;
- }
- mul64((long long *) &accum.sigl,
- (long long *) &Xx.sigl, (long long *) &accum.sigl);
-
- *((long long *) (&accum.sigl)) += *((long long *) (&Xx.sigl));
-
- if (Xx.sigh > accum.sigh) {
- /* There was an overflow */
-
- poly_div2((long long *) &accum.sigl);
- accum.sigh |= 0x80000000;
- accum.exp++;
- }
- /* When we add the exponent to the accum result later, we will require
- * that their signs are the same. Here we ensure that this is so. */
- if (exponent && ((exponent < 0) ^ (accum.sign))) {
- /* signs are different */
-
- accum.sign = !accum.sign;
-
- /* An exceptional case is when accum is zero */
- if (accum.sigl | accum.sigh) {
- /* find 1-accum */
- /* Shift to get exponent == 0 */
- if (accum.exp < 0) {
- poly_div2((long long *) &accum.sigl);
- accum.exp++;
- }
- /* Just negate, but throw away the sign */
- *((long long *) &(accum.sigl)) = -*((long long *) &(accum.sigl));
- if (exponent < 0)
- exponent++;
- else
- exponent--;
- }
- }
- shift = exponent >= 0 ? exponent : -exponent;
- bits = 0;
- if (shift) {
- if (accum.exp) {
- accum.exp++;
- poly_div2((long long *) &accum.sigl);
- }
- while (shift) {
- poly_div2((long long *) &accum.sigl);
- if (shift & 1)
- accum.sigh |= 0x80000000;
- shift >>= 1;
- bits++;
- }
- }
- /* Convert to 64 bit signed-compatible */
- accum.exp += bits + EXP_BIAS - 1;
-
- reg_move(&accum, result);
- normalize(result);
-
- return;
-}
-
-
-/*--- poly_l2p1() -----------------------------------------------------------+
- | Base 2 logarithm by a polynomial approximation. |
- | log2(x+1) |
- +---------------------------------------------------------------------------*/
-int
-poly_l2p1(FPU_REG * arg, FPU_REG * result)
-{
- char sign = 0;
- long long Xsq;
- FPU_REG arg_pl1, denom, accum, local_arg, poly_arg;
-
-
- sign = arg->sign;
-
- reg_add(arg, &CONST_1, &arg_pl1, FULL_PRECISION);
-
- if ((arg_pl1.sign) | (arg_pl1.tag)) { /* We need a valid positive
- * number! */
- return 1;
- }
- reg_add(&CONST_1, &arg_pl1, &denom, FULL_PRECISION);
- reg_div(arg, &denom, &local_arg, FULL_PRECISION);
- local_arg.sign = 0; /* Make the sign positive */
-
- /* Now we need to check that |local_arg| is less than 3-2*sqrt(2) =
- * 0.17157.. = .0xafb0ccc0 * 2^-2 */
-
- if (local_arg.exp >= EXP_BIAS - 3) {
- if ((local_arg.exp > EXP_BIAS - 3) ||
- (local_arg.sigh > (unsigned) 0xafb0ccc0)) {
- /* The argument is large */
- poly_l2(&arg_pl1, result);
- return 0;
- }
- }
- /* Make a copy of local_arg */
- reg_move(&local_arg, &poly_arg);
-
- /* Get poly_arg bits aligned as required */
- shrx((unsigned *) &(poly_arg.sigl), -(poly_arg.exp - EXP_BIAS + 3));
-
- mul64((long long *) &(poly_arg.sigl), (long long *) &(poly_arg.sigl), &Xsq);
- poly_div16(&Xsq);
-
- /* Do the basic fixed point polynomial evaluation */
- polynomial((u_int *) &accum.sigl, (unsigned *) &Xsq, lterms, HIPOWER - 1);
-
- accum.tag = TW_Valid; /* set the tags to Valid */
- accum.sign = SIGN_POS; /* and make accum positive */
-
- /* make accum compatible and normalize */
- accum.exp = EXP_BIAS - 1;
- normalize(&accum);
-
- reg_u_mul(&local_arg, &accum, &accum, FULL_PRECISION);
-
- reg_u_add(&local_arg, &accum, result, FULL_PRECISION);
-
- /* Multiply the result by 2 */
- result->exp++;
-
- result->sign = sign;
-
- return 0;
-}
diff --git a/sys/gnu/i386/fpemul/poly_mul64.s b/sys/gnu/i386/fpemul/poly_mul64.s
deleted file mode 100644
index 2c6f12e..0000000
--- a/sys/gnu/i386/fpemul/poly_mul64.s
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * poly_mul64.S
- *
- * Multiply two 64 bit integers.
- *
- * Call from C as:
- * void mul64(long long *a, long long *b, long long *result)
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-
-#include <gnu/i386/fpemul/fpu_asm.h>
-
-.text
-ENTRY(mul64)
- pushl %ebp
- movl %esp,%ebp
- subl $16,%esp
- pushl %esi
- pushl %ebx
-
- movl PARAM1,%esi
- movl PARAM2,%ecx
- movl PARAM3,%ebx
-
- xor %eax,%eax
- movl %eax,-4(%ebp)
- movl %eax,-8(%ebp)
-
- movl (%esi),%eax
- mull (%ecx)
- movl %eax,-16(%ebp) /* Not used */
- movl %edx,-12(%ebp)
-
- movl (%esi),%eax
- mull 4(%ecx)
- addl %eax,-12(%ebp)
- adcl %edx,-8(%ebp)
- adcl $0,-4(%ebp)
-
- movl 4(%esi),%eax
- mull (%ecx)
- addl %eax,-12(%ebp)
- adcl %edx,-8(%ebp)
- adcl $0,-4(%ebp)
-
- movl 4(%esi),%eax
- mull 4(%ecx)
- addl %eax,-8(%ebp)
- adcl %edx,-4(%ebp)
-
- testb $128,-9(%ebp)
- je L_no_round
-
- addl $1,-8(%ebp)
- adcl $0,-4(%ebp)
-
-L_no_round:
- movl -8(%ebp),%esi
- movl %esi,(%ebx)
- movl -4(%ebp),%esi
- movl %esi,4(%ebx)
-
- popl %ebx
- popl %esi
- leave
- ret
diff --git a/sys/gnu/i386/fpemul/poly_sin.c b/sys/gnu/i386/fpemul/poly_sin.c
deleted file mode 100644
index efc478f..0000000
--- a/sys/gnu/i386/fpemul/poly_sin.c
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * poly_sin.c
- *
- * Computation of an approximation of the sin function by a polynomial
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-#ifdef DEBUG
-#include <sys/types.h>
-#include <sys/systm.h> /* for printf() in EXCEPTION() */
-#endif
-
-#include <gnu/i386/fpemul/exception.h>
-#include <gnu/i386/fpemul/reg_constant.h>
-#include <gnu/i386/fpemul/control_w.h>
-
-
-#define HIPOWER 5
-static unsigned short lterms[HIPOWER][4] =
-{
- {0x846a, 0x42d1, 0xb544, 0x921f},
- {0xe110, 0x75aa, 0xbc67, 0x1466},
- {0x503d, 0xa43f, 0x83c1, 0x000a},
- {0x8f9d, 0x7a19, 0x00f4, 0x0000},
- {0xda03, 0x06aa, 0x0000, 0x0000},
-};
-
-static unsigned short negterms[HIPOWER][4] =
-{
- {0x95ed, 0x2df2, 0xe731, 0xa55d},
- {0xd159, 0xe62b, 0xd2cc, 0x0132},
- {0x6342, 0xe9fb, 0x3c60, 0x0000},
- {0x6256, 0xdf5a, 0x0002, 0x0000},
- {0xf279, 0x000b, 0x0000, 0x0000},
-};
-
-
-/*--- poly_sine() -----------------------------------------------------------+
- | |
- +---------------------------------------------------------------------------*/
-void
-poly_sine(FPU_REG * arg, FPU_REG * result)
-{
- short exponent;
- FPU_REG Xx, Xx2, Xx4, accum, negaccum;
-
-
- exponent = arg->exp - EXP_BIAS;
-
- if (arg->tag == TW_Zero) {
- /* Return 0.0 */
- reg_move(&CONST_Z, result);
- return;
- }
-#ifdef PARANOID
- if (arg->sign != 0) { /* Can't hack a number < 0.0 */
- EXCEPTION(EX_Invalid);
- reg_move(&CONST_QNaN, result);
- return;
- }
- if (exponent >= 0) { /* Can't hack a number > 1.0 */
- if ((exponent == 0) && (arg->sigl == 0) && (arg->sigh == 0x80000000)) {
- reg_move(&CONST_1, result);
- return;
- }
- EXCEPTION(EX_Invalid);
- reg_move(&CONST_QNaN, result);
- return;
- }
-#endif /* PARANOID */
-
- Xx.sigl = arg->sigl;
- Xx.sigh = arg->sigh;
- if (exponent < -1) {
- /* shift the argument right by the required places */
- if (shrx(&(Xx.sigl), -1 - exponent) >= (unsigned)0x80000000)
- (*((long long *) (&(Xx.sigl))))++; /* round up */
- }
- mul64((long long *) &(Xx.sigl), (long long *) &(Xx.sigl),
- (long long *) &(Xx2.sigl));
- mul64((long long *) &(Xx2.sigl), (long long *) &(Xx2.sigl),
- (long long *) &(Xx4.sigl));
-
- /* will be a valid positive nr with expon = 0 */
- *(short *) &(accum.sign) = 0;
- accum.exp = 0;
-
- /* Do the basic fixed point polynomial evaluation */
- polynomial((u_int *) &(accum.sigl), (u_int *)&(Xx4.sigl), lterms, HIPOWER - 1);
-
- /* will be a valid positive nr with expon = 0 */
- *(short *) &(negaccum.sign) = 0;
- negaccum.exp = 0;
-
- /* Do the basic fixed point polynomial evaluation */
- polynomial((u_int *) &(negaccum.sigl), (u_int *)&(Xx4.sigl), negterms, HIPOWER - 1);
- mul64((long long *) &(Xx2.sigl), (long long *) &(negaccum.sigl),
- (long long *) &(negaccum.sigl));
-
- /* Subtract the mantissas */
- *((long long *) (&(accum.sigl))) -= *((long long *) (&(negaccum.sigl)));
-
- /* Convert to 64 bit signed-compatible */
- accum.exp = EXP_BIAS - 1 + accum.exp;
-
- *(short *) &(result->sign) = *(short *) &(accum.sign);
- result->exp = accum.exp;
- result->sigl = accum.sigl;
- result->sigh = accum.sigh;
-
- normalize(result);
-
- reg_mul(result, arg, result, FULL_PRECISION);
- reg_u_add(result, arg, result, FULL_PRECISION);
-
- /* A small overflow may be possible... but an illegal result. */
- if (result->exp >= EXP_BIAS) {
- if ((result->exp > EXP_BIAS) /* Larger or equal 2.0 */
- ||(result->sigl > 1) /* Larger than 1.0+msb */
- ||(result->sigh != 0x80000000) /* Much > 1.0 */
- ) {
-#ifdef DEBUGGING
- RE_ENTRANT_CHECK_OFF
- printk("\nEXP=%d, MS=%08x, LS=%08x\n", result->exp,
- result->sigh, result->sigl);
- RE_ENTRANT_CHECK_ON
-#endif /* DEBUGGING */
- EXCEPTION(EX_INTERNAL | 0x103);
- }
-#ifdef DEBUGGING
- RE_ENTRANT_CHECK_OFF
- printk("\n***CORRECTING ILLEGAL RESULT*** in poly_sin() computation\n");
- printk("EXP=%d, MS=%08x, LS=%08x\n", result->exp,
- result->sigh, result->sigl);
- RE_ENTRANT_CHECK_ON
-#endif /* DEBUGGING */
-
- result->sigl = 0; /* Truncate the result to 1.00 */
- }
-}
diff --git a/sys/gnu/i386/fpemul/poly_tan.c b/sys/gnu/i386/fpemul/poly_tan.c
deleted file mode 100644
index 7dbbddf..0000000
--- a/sys/gnu/i386/fpemul/poly_tan.c
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * poly_tan.c
- *
- * Compute the tan of a FPU_REG, using a polynomial approximation.
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-#include <gnu/i386/fpemul/reg_constant.h>
-#include <gnu/i386/fpemul/control_w.h>
-
-
-#define HIPOWERop 3 /* odd poly, positive terms */
-static unsigned short oddplterms[HIPOWERop][4] =
-{
- {0x846a, 0x42d1, 0xb544, 0x921f},
- {0x6fb2, 0x0215, 0x95c0, 0x099c},
- {0xfce6, 0x0cc8, 0x1c9a, 0x0000}
-};
-#define HIPOWERon 2 /* odd poly, negative terms */
-static unsigned short oddnegterms[HIPOWERon][4] =
-{
- {0x6906, 0xe205, 0x25c8, 0x8838},
- {0x1dd7, 0x3fe3, 0x944e, 0x002c}
-};
-#define HIPOWERep 2 /* even poly, positive terms */
-static unsigned short evenplterms[HIPOWERep][4] =
-{
- {0xdb8f, 0x3761, 0x1432, 0x2acf},
- {0x16eb, 0x13c1, 0x3099, 0x0003}
-};
-#define HIPOWERen 2 /* even poly, negative terms */
-static unsigned short evennegterms[HIPOWERen][4] =
-{
- {0x3a7c, 0xe4c5, 0x7f87, 0x2945},
- {0x572b, 0x664c, 0xc543, 0x018c}
-};
-
-
-/*--- poly_tan() ------------------------------------------------------------+
- | |
- +---------------------------------------------------------------------------*/
-void
-poly_tan(FPU_REG * arg, FPU_REG * y_reg)
-{
- char invert = 0;
- short exponent;
- FPU_REG odd_poly, even_poly, pos_poly, neg_poly;
- FPU_REG argSq;
- long long arg_signif, argSqSq;
-
-
- exponent = arg->exp - EXP_BIAS;
-
- if (arg->tag == TW_Zero) {
- /* Return 0.0 */
- reg_move(&CONST_Z, y_reg);
- return;
- }
- if (exponent >= -1) {
- /* argument is in the range [0.5 .. 1.0] */
- if (exponent >= 0) {
-#ifdef PARANOID
- if ((exponent == 0) &&
- (arg->sigl == 0) && (arg->sigh == 0x80000000))
-#endif /* PARANOID */
- {
- arith_overflow(y_reg);
- return;
- }
-#ifdef PARANOID
- EXCEPTION(EX_INTERNAL | 0x104); /* There must be a logic
- * error */
- return;
-#endif /* PARANOID */
- }
- /* The argument is in the range [0.5 .. 1.0) */
- /* Convert the argument to a number in the range (0.0 .. 0.5] */
- *((long long *) (&arg->sigl)) = -*((long long *) (&arg->sigl));
- normalize(arg); /* Needed later */
- exponent = arg->exp - EXP_BIAS;
- invert = 1;
- }
-#ifdef PARANOID
- if (arg->sign != 0) { /* Can't hack a number < 0.0 */
- arith_invalid(y_reg);
- return;
- } /* Need a positive number */
-#endif /* PARANOID */
-
- *(long long *) &arg_signif = *(long long *) &(arg->sigl);
- if (exponent < -1) {
- /* shift the argument right by the required places */
- if (shrx(&arg_signif, -1 - exponent) >= (unsigned)0x80000000)
- arg_signif++; /* round up */
- }
- mul64(&arg_signif, &arg_signif, (long long *) (&argSq.sigl));
- mul64((long long *) (&argSq.sigl), (long long *) (&argSq.sigl), &argSqSq);
-
- /* will be a valid positive nr with expon = 0 */
- *(short *) &(pos_poly.sign) = 0;
- pos_poly.exp = EXP_BIAS;
-
- /* Do the basic fixed point polynomial evaluation */
- polynomial((u_int *) &pos_poly.sigl, (unsigned *) &argSqSq, oddplterms, HIPOWERop - 1);
-
- /* will be a valid positive nr with expon = 0 */
- *(short *) &(neg_poly.sign) = 0;
- neg_poly.exp = EXP_BIAS;
-
- /* Do the basic fixed point polynomial evaluation */
- polynomial((u_int *) &neg_poly.sigl, (unsigned *) &argSqSq, oddnegterms, HIPOWERon - 1);
- mul64((long long *) (&argSq.sigl), (long long *) (&neg_poly.sigl),
- (long long *) (&neg_poly.sigl));
-
- /* Subtract the mantissas */
- *((long long *) (&pos_poly.sigl)) -= *((long long *) (&neg_poly.sigl));
-
- /* Convert to 64 bit signed-compatible */
- pos_poly.exp -= 1;
-
- reg_move(&pos_poly, &odd_poly);
- normalize(&odd_poly);
-
- reg_mul(&odd_poly, arg, &odd_poly, FULL_PRECISION);
- reg_u_add(&odd_poly, arg, &odd_poly, FULL_PRECISION); /* This is just the odd
- * polynomial */
-
-
- /* will be a valid positive nr with expon = 0 */
- *(short *) &(pos_poly.sign) = 0;
- pos_poly.exp = EXP_BIAS;
-
- /* Do the basic fixed point polynomial evaluation */
- polynomial((u_int *) &pos_poly.sigl, (unsigned *) &argSqSq, evenplterms, HIPOWERep - 1);
- mul64((long long *) (&argSq.sigl),
- (long long *) (&pos_poly.sigl), (long long *) (&pos_poly.sigl));
-
- /* will be a valid positive nr with expon = 0 */
- *(short *) &(neg_poly.sign) = 0;
- neg_poly.exp = EXP_BIAS;
-
- /* Do the basic fixed point polynomial evaluation */
- polynomial((u_int *) &neg_poly.sigl, (unsigned *) &argSqSq, evennegterms, HIPOWERen - 1);
-
- /* Subtract the mantissas */
- *((long long *) (&neg_poly.sigl)) -= *((long long *) (&pos_poly.sigl));
- /* and multiply by argSq */
-
- /* Convert argSq to a valid reg number */
- *(short *) &(argSq.sign) = 0;
- argSq.exp = EXP_BIAS - 1;
- normalize(&argSq);
-
- /* Convert to 64 bit signed-compatible */
- neg_poly.exp -= 1;
-
- reg_move(&neg_poly, &even_poly);
- normalize(&even_poly);
-
- reg_mul(&even_poly, &argSq, &even_poly, FULL_PRECISION);
- reg_add(&even_poly, &argSq, &even_poly, FULL_PRECISION);
- reg_sub(&CONST_1, &even_poly, &even_poly, FULL_PRECISION); /* This is just the even
- * polynomial */
-
- /* Now ready to copy the results */
- if (invert) {
- reg_div(&even_poly, &odd_poly, y_reg, FULL_PRECISION);
- } else {
- reg_div(&odd_poly, &even_poly, y_reg, FULL_PRECISION);
- }
-
-}
diff --git a/sys/gnu/i386/fpemul/polynomial.s b/sys/gnu/i386/fpemul/polynomial.s
deleted file mode 100644
index 172bcc6..0000000
--- a/sys/gnu/i386/fpemul/polynomial.s
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * polynomial.S
- *
- * Fixed point arithmetic polynomial evaluation.
- *
- * Call from C as:
- * void polynomial(unsigned accum[], unsigned x[], unsigned terms[][2],
- * int n)
- *
- * Computes:
- * terms[0] + (terms[1] + (terms[2] + ... + (terms[n-1]*x)*x)*x)*x) ... )*x
- * The result is returned in accum.
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
- .file "fpolynom.s"
-
-#include <gnu/i386/fpemul/fpu_asm.h>
-
-
-/* #define EXTRA_PRECISE*/
-
-#define TERM_SIZE $8
-
-
-.text
-ENTRY(polynomial)
- pushl %ebp
- movl %esp,%ebp
- subl $32,%esp
- pushl %esi
- pushl %edi
- pushl %ebx
-
- movl PARAM1,%esi /* accum */
- movl PARAM2,%edi /* x */
- movl PARAM3,%ebx /* terms */
- movl PARAM4,%ecx /* n */
-
- movl TERM_SIZE,%eax
- mull %ecx
- movl %eax,%ecx
-
- movl 4(%ebx,%ecx,1),%edx /* terms[n] */
- movl %edx,-20(%ebp)
- movl (%ebx,%ecx,1),%edx /* terms[n] */
- movl %edx,-24(%ebp)
- xor %eax,%eax
- movl %eax,-28(%ebp)
-
- subl TERM_SIZE,%ecx
- js L_accum_done
-
-L_accum_loop:
- xor %eax,%eax
- movl %eax,-4(%ebp)
- movl %eax,-8(%ebp)
-
-#ifdef EXTRA_PRECISE
- movl -28(%ebp),%eax
- mull 4(%edi) /* x ms long */
- movl %edx,-12(%ebp)
-#endif EXTRA_PRECISE
-
- movl -24(%ebp),%eax
- mull (%edi) /* x ls long */
-/* movl %eax,-16(%ebp) */ /* Not needed */
- addl %edx,-12(%ebp)
- adcl $0,-8(%ebp)
-
- movl -24(%ebp),%eax
- mull 4(%edi) /* x ms long */
- addl %eax,-12(%ebp)
- adcl %edx,-8(%ebp)
- adcl $0,-4(%ebp)
-
- movl -20(%ebp),%eax
- mull (%edi)
- addl %eax,-12(%ebp)
- adcl %edx,-8(%ebp)
- adcl $0,-4(%ebp)
-
- movl -20(%ebp),%eax
- mull 4(%edi)
- addl %eax,-8(%ebp)
- adcl %edx,-4(%ebp)
-
-/* Now add the next term */
- movl (%ebx,%ecx,1),%eax
- addl %eax,-8(%ebp)
- movl 4(%ebx,%ecx,1),%eax
- adcl %eax,-4(%ebp)
-
-/* And put into the second register */
- movl -4(%ebp),%eax
- movl %eax,-20(%ebp)
- movl -8(%ebp),%eax
- movl %eax,-24(%ebp)
-
-#ifdef EXTRA_PRECISE
- movl -12(%ebp),%eax
- movl %eax,-28(%ebp)
-#else
- testb $128,-25(%ebp)
- je L_no_poly_round
-
- addl $1,-24(%ebp)
- adcl $0,-20(%ebp)
-L_no_poly_round:
-#endif EXTRA_PRECISE
-
- subl TERM_SIZE,%ecx
- jns L_accum_loop
-
-L_accum_done:
-#ifdef EXTRA_PRECISE
-/* And round the result */
- testb $128,-25(%ebp)
- je L_poly_done
-
- addl $1,-24(%ebp)
- adcl $0,-20(%ebp)
-#endif EXTRA_PRECISE
-
-L_poly_done:
- movl -24(%ebp),%eax
- movl %eax,(%esi)
- movl -20(%ebp),%eax
- movl %eax,4(%esi)
-
- popl %ebx
- popl %edi
- popl %esi
- leave
- ret
diff --git a/sys/gnu/i386/fpemul/reg_add_sub.c b/sys/gnu/i386/fpemul/reg_add_sub.c
deleted file mode 100644
index df08bcd..0000000
--- a/sys/gnu/i386/fpemul/reg_add_sub.c
+++ /dev/null
@@ -1,300 +0,0 @@
-/*
- * reg_add_sub.c
- *
- * Functions to add or subtract two registers and put the result in a third.
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-/*---------------------------------------------------------------------------+
- | For each function, the destination may be any FPU_REG, including one of |
- | the source FPU_REGs. |
- +---------------------------------------------------------------------------*/
-
-#include <gnu/i386/fpemul/reg_constant.h>
-#include <gnu/i386/fpemul/control_w.h>
-
-
-void
-reg_add(FPU_REG * a, FPU_REG * b, FPU_REG * dest, int control_w)
-{
- int diff;
-
- if (!(a->tag | b->tag)) {
- /* Both registers are valid */
- if (!(a->sign ^ b->sign)) {
- /* signs are the same */
- reg_u_add(a, b, dest, control_w);
- dest->sign = a->sign;
- return;
- }
- /* The signs are different, so do a subtraction */
- diff = a->exp - b->exp;
- if (!diff) {
- diff = a->sigh - b->sigh; /* Works only if ms bits
- * are identical */
- if (!diff) {
- diff = a->sigl > b->sigl;
- if (!diff)
- diff = -(a->sigl < b->sigl);
- }
- }
- if (diff > 0) {
- reg_u_sub(a, b, dest, control_w);
- dest->sign = a->sign;
- } else
- if (diff == 0) {
- reg_move(&CONST_Z, dest);
- /* sign depends upon rounding mode */
- dest->sign = ((control_w & CW_RC) != RC_DOWN)
- ? SIGN_POS : SIGN_NEG;
- } else {
- reg_u_sub(b, a, dest, control_w);
- dest->sign = b->sign;
- }
- return;
- } else {
- if ((a->tag == TW_NaN) || (b->tag == TW_NaN)) {
- real_2op_NaN(a, b, dest);
- return;
- } else
- if (a->tag == TW_Zero) {
- if (b->tag == TW_Zero) {
- char different_signs = a->sign ^ b->sign;
- /* Both are zero, result will be zero. */
- reg_move(a, dest);
- if (different_signs) {
- /* Signs are different. */
- /* Sign of answer depends upon
- * rounding mode. */
- dest->sign = ((control_w & CW_RC) != RC_DOWN)
- ? SIGN_POS : SIGN_NEG;
- }
- } else {
-#ifdef DENORM_OPERAND
- if ((b->tag == TW_Valid) && (b->exp <= EXP_UNDER) &&
- denormal_operand())
- return;
-#endif /* DENORM_OPERAND */
- reg_move(b, dest);
- }
- return;
- } else
- if (b->tag == TW_Zero) {
-#ifdef DENORM_OPERAND
- if ((a->tag == TW_Valid) && (a->exp <= EXP_UNDER) &&
- denormal_operand())
- return;
-#endif /* DENORM_OPERAND */
- reg_move(a, dest);
- return;
- } else
- if (a->tag == TW_Infinity) {
- if (b->tag != TW_Infinity) {
-#ifdef DENORM_OPERAND
- if ((b->tag == TW_Valid) && (b->exp <= EXP_UNDER) &&
- denormal_operand())
- return;
-#endif /* DENORM_OPERAND */
- reg_move(a, dest);
- return;
- }
- if (a->sign == b->sign) {
- /* They are both + or
- * - infinity */
- reg_move(a, dest);
- return;
- }
- arith_invalid(dest); /* Infinity-Infinity is
- * undefined. */
- return;
- } else
- if (b->tag == TW_Infinity) {
-#ifdef DENORM_OPERAND
- if ((a->tag == TW_Valid) && (a->exp <= EXP_UNDER) &&
- denormal_operand())
- return;
-#endif /* DENORM_OPERAND */
- reg_move(b, dest);
- return;
- }
- }
-#ifdef PARANOID
- EXCEPTION(EX_INTERNAL | 0x101);
-#endif
-}
-
-
-/* Subtract b from a. (a-b) -> dest */
-void
-reg_sub(FPU_REG * a, FPU_REG * b, FPU_REG * dest, int control_w)
-{
- int diff;
-
- if (!(a->tag | b->tag)) {
- /* Both registers are valid */
- diff = a->exp - b->exp;
- if (!diff) {
- diff = a->sigh - b->sigh; /* Works only if ms bits
- * are identical */
- if (!diff) {
- diff = a->sigl > b->sigl;
- if (!diff)
- diff = -(a->sigl < b->sigl);
- }
- }
- switch (a->sign * 2 + b->sign) {
- case 0: /* P - P */
- case 3: /* N - N */
- if (diff > 0) {
- reg_u_sub(a, b, dest, control_w);
- dest->sign = a->sign;
- } else
- if (diff == 0) {
-#ifdef DENORM_OPERAND
- if ((b->tag == TW_Valid) && (b->exp <= EXP_UNDER) &&
- denormal_operand())
- return;
-#endif /* DENORM_OPERAND */
- reg_move(&CONST_Z, dest);
- /* sign depends upon rounding mode */
- dest->sign = ((control_w & CW_RC) != RC_DOWN)
- ? SIGN_POS : SIGN_NEG;
- } else {
- reg_u_sub(b, a, dest, control_w);
- dest->sign = a->sign ^ SIGN_POS ^ SIGN_NEG;
- }
- return;
- case 1: /* P - N */
- reg_u_add(a, b, dest, control_w);
- dest->sign = SIGN_POS;
- return;
- case 2: /* N - P */
- reg_u_add(a, b, dest, control_w);
- dest->sign = SIGN_NEG;
- return;
- }
- } else {
- if ((a->tag == TW_NaN) || (b->tag == TW_NaN)) {
- real_2op_NaN(a, b, dest);
- return;
- } else
- if (b->tag == TW_Zero) {
- if (a->tag == TW_Zero) {
- char same_signs = !(a->sign ^ b->sign);
- /* Both are zero, result will be zero. */
- reg_move(a, dest); /* Answer for different
- * signs. */
- if (same_signs) {
- /* Sign depends upon rounding
- * mode */
- dest->sign = ((control_w & CW_RC) != RC_DOWN)
- ? SIGN_POS : SIGN_NEG;
- }
- } else {
-#ifdef DENORM_OPERAND
- if ((a->tag == TW_Valid) && (a->exp <= EXP_UNDER) &&
- denormal_operand())
- return;
-#endif /* DENORM_OPERAND */
- reg_move(a, dest);
- }
- return;
- } else
- if (a->tag == TW_Zero) {
-#ifdef DENORM_OPERAND
- if ((b->tag == TW_Valid) && (b->exp <= EXP_UNDER) &&
- denormal_operand())
- return;
-#endif /* DENORM_OPERAND */
- reg_move(b, dest);
- dest->sign ^= SIGN_POS ^ SIGN_NEG;
- return;
- } else
- if (a->tag == TW_Infinity) {
- if (b->tag != TW_Infinity) {
-#ifdef DENORM_OPERAND
- if ((b->tag == TW_Valid) && (b->exp <= EXP_UNDER) &&
- denormal_operand())
- return;
-#endif /* DENORM_OPERAND */
- reg_move(a, dest);
- return;
- }
- /* Both args are Infinity */
- if (a->sign == b->sign) {
- arith_invalid(dest); /* Infinity-Infinity is
- * undefined. */
- return;
- }
- reg_move(a, dest);
- return;
- } else
- if (b->tag == TW_Infinity) {
-#ifdef DENORM_OPERAND
- if ((a->tag == TW_Valid) && (a->exp <= EXP_UNDER) &&
- denormal_operand())
- return;
-#endif /* DENORM_OPERAND */
- reg_move(b, dest);
- dest->sign ^= SIGN_POS ^ SIGN_NEG;
- return;
- }
- }
-#ifdef PARANOID
- EXCEPTION(EX_INTERNAL | 0x110);
-#endif
-}
diff --git a/sys/gnu/i386/fpemul/reg_compare.c b/sys/gnu/i386/fpemul/reg_compare.c
deleted file mode 100644
index a23a7a5..0000000
--- a/sys/gnu/i386/fpemul/reg_compare.c
+++ /dev/null
@@ -1,385 +0,0 @@
-/*
- * reg_compare.c
- *
- * Compare two floating point registers
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-/*---------------------------------------------------------------------------+
- | compare() is the core FPU_REG comparison function |
- +---------------------------------------------------------------------------*/
-#include <sys/param.h>
-#include <sys/proc.h>
-#include <sys/systm.h>
-#include <machine/pcb.h>
-
-#include <gnu/i386/fpemul/fpu_emu.h>
-#include <gnu/i386/fpemul/fpu_system.h>
-#include <gnu/i386/fpemul/exception.h>
-#include <gnu/i386/fpemul/control_w.h>
-#include <gnu/i386/fpemul/status_w.h>
-
-
-int
-compare(FPU_REG * b)
-{
- int diff;
-
- if (FPU_st0_ptr->tag | b->tag) {
- if (FPU_st0_ptr->tag == TW_Zero) {
- if (b->tag == TW_Zero)
- return COMP_A_eq_B;
- if (b->tag == TW_Valid) {
-#ifdef DENORM_OPERAND
- if ((b->exp <= EXP_UNDER) && (denormal_operand()))
- return COMP_Denormal;
-#endif /* DENORM_OPERAND */
- return (b->sign == SIGN_POS) ? COMP_A_lt_B : COMP_A_gt_B;
- }
- } else
- if (b->tag == TW_Zero) {
- if (FPU_st0_ptr->tag == TW_Valid) {
-#ifdef DENORM_OPERAND
- if ((FPU_st0_ptr->exp <= EXP_UNDER) && (denormal_operand()))
- return COMP_Denormal;
-#endif /* DENORM_OPERAND */
- return (FPU_st0_ptr->sign == SIGN_POS) ? COMP_A_gt_B : COMP_A_lt_B;
- }
- }
- if (FPU_st0_ptr->tag == TW_Infinity) {
- if ((b->tag == TW_Valid) || (b->tag == TW_Zero)) {
-#ifdef DENORM_OPERAND
- if ((b->tag == TW_Valid) && (b->exp <= EXP_UNDER)
- && (denormal_operand()))
- return COMP_Denormal;
-#endif /* DENORM_OPERAND */
- return (FPU_st0_ptr->sign == SIGN_POS) ? COMP_A_gt_B : COMP_A_lt_B;
- } else
- if (b->tag == TW_Infinity) {
- /* The 80486 book says that infinities
- * can be equal! */
- return (FPU_st0_ptr->sign == b->sign) ? COMP_A_eq_B :
- ((FPU_st0_ptr->sign == SIGN_POS) ? COMP_A_gt_B : COMP_A_lt_B);
- }
- /* Fall through to the NaN code */
- } else
- if (b->tag == TW_Infinity) {
- if ((FPU_st0_ptr->tag == TW_Valid) || (FPU_st0_ptr->tag == TW_Zero)) {
-#ifdef DENORM_OPERAND
- if ((FPU_st0_ptr->tag == TW_Valid)
- && (FPU_st0_ptr->exp <= EXP_UNDER)
- && (denormal_operand()))
- return COMP_Denormal;
-#endif /* DENORM_OPERAND */
- return (b->sign == SIGN_POS) ? COMP_A_lt_B : COMP_A_gt_B;
- }
- /* Fall through to the NaN code */
- }
- /* The only possibility now should be that one of the
- * arguments is a NaN */
- if ((FPU_st0_ptr->tag == TW_NaN) || (b->tag == TW_NaN)) {
- if (((FPU_st0_ptr->tag == TW_NaN) && !(FPU_st0_ptr->sigh & 0x40000000))
- || ((b->tag == TW_NaN) && !(b->sigh & 0x40000000)))
- /* At least one arg is a signaling NaN */
- return COMP_No_Comp | COMP_SNaN | COMP_NaN;
- else
- /* Neither is a signaling NaN */
- return COMP_No_Comp | COMP_NaN;
- }
- EXCEPTION(EX_Invalid);
- }
-#ifdef PARANOID
- if (!(FPU_st0_ptr->sigh & 0x80000000))
- EXCEPTION(EX_Invalid);
- if (!(b->sigh & 0x80000000))
- EXCEPTION(EX_Invalid);
-#endif /* PARANOID */
-
-#ifdef DENORM_OPERAND
- if (((FPU_st0_ptr->exp <= EXP_UNDER) ||
- (b->exp <= EXP_UNDER)) && (denormal_operand()))
- return COMP_Denormal;
-#endif /* DENORM_OPERAND */
-
- if (FPU_st0_ptr->sign != b->sign)
- return (FPU_st0_ptr->sign == SIGN_POS) ? COMP_A_gt_B : COMP_A_lt_B;
-
- diff = FPU_st0_ptr->exp - b->exp;
- if (diff == 0) {
- diff = FPU_st0_ptr->sigh - b->sigh; /* Works only if ms bits
- * are identical */
- if (diff == 0) {
- diff = FPU_st0_ptr->sigl > b->sigl;
- if (diff == 0)
- diff = -(FPU_st0_ptr->sigl < b->sigl);
- }
- }
- if (diff > 0)
- return (FPU_st0_ptr->sign == SIGN_POS) ? COMP_A_gt_B : COMP_A_lt_B;
- if (diff < 0)
- return (FPU_st0_ptr->sign == SIGN_POS) ? COMP_A_lt_B : COMP_A_gt_B;
- return COMP_A_eq_B;
-
-}
-
-
-/* This function requires that st(0) is not empty */
-int
-compare_st_data(void)
-{
- int f = 0, c;
-
- c = compare(&FPU_loaded_data);
-
- if (c & (COMP_NaN | COMP_Denormal)) {
- if (c & COMP_NaN) {
- EXCEPTION(EX_Invalid);
- f = SW_C3 | SW_C2 | SW_C0;
- } else {
- /* One of the operands is a de-normal */
- return 0;
- }
- } else
- switch (c) {
- case COMP_A_lt_B:
- f = SW_C0;
- break;
- case COMP_A_eq_B:
- f = SW_C3;
- break;
- case COMP_A_gt_B:
- f = 0;
- break;
- case COMP_No_Comp:
- f = SW_C3 | SW_C2 | SW_C0;
- break;
-#ifdef PARANOID
- default:
- EXCEPTION(EX_INTERNAL | 0x121);
- f = SW_C3 | SW_C2 | SW_C0;
- break;
-#endif /* PARANOID */
- }
- setcc(f);
- return 1;
-}
-
-
-static int
-compare_st_st(int nr)
-{
- int f = 0, c;
-
- if (!NOT_EMPTY_0 || !NOT_EMPTY(nr)) {
- setcc(SW_C3 | SW_C2 | SW_C0);
- /* Stack fault */
- EXCEPTION(EX_StackUnder);
- return control_word & CW_Invalid;
- }
- c = compare(&st(nr));
- if (c & (COMP_NaN | COMP_Denormal)) {
- if (c & COMP_NaN) {
- setcc(SW_C3 | SW_C2 | SW_C0);
- EXCEPTION(EX_Invalid);
- return control_word & CW_Invalid;
- } else {
- /* One of the operands is a de-normal */
- return control_word & CW_Denormal;
- }
- } else
- switch (c) {
- case COMP_A_lt_B:
- f = SW_C0;
- break;
- case COMP_A_eq_B:
- f = SW_C3;
- break;
- case COMP_A_gt_B:
- f = 0;
- break;
- case COMP_No_Comp:
- f = SW_C3 | SW_C2 | SW_C0;
- break;
-#ifdef PARANOID
- default:
- EXCEPTION(EX_INTERNAL | 0x122);
- f = SW_C3 | SW_C2 | SW_C0;
- break;
-#endif /* PARANOID */
- }
- setcc(f);
- return 1;
-}
-
-
-static int
-compare_u_st_st(int nr)
-{
- int f = 0, c;
-
- if (!NOT_EMPTY_0 || !NOT_EMPTY(nr)) {
- setcc(SW_C3 | SW_C2 | SW_C0);
- /* Stack fault */
- EXCEPTION(EX_StackUnder);
- return control_word & CW_Invalid;
- }
- c = compare(&st(nr));
- if (c & (COMP_NaN | COMP_Denormal)) {
- if (c & COMP_NaN) {
- setcc(SW_C3 | SW_C2 | SW_C0);
- if (c & COMP_SNaN) { /* This is the only difference
- * between un-ordered and
- * ordinary comparisons */
- EXCEPTION(EX_Invalid);
- return control_word & CW_Invalid;
- }
- return 1;
- } else {
- /* One of the operands is a de-normal */
- return control_word & CW_Denormal;
- }
- } else
- switch (c) {
- case COMP_A_lt_B:
- f = SW_C0;
- break;
- case COMP_A_eq_B:
- f = SW_C3;
- break;
- case COMP_A_gt_B:
- f = 0;
- break;
- case COMP_No_Comp:
- f = SW_C3 | SW_C2 | SW_C0;
- break;
-#ifdef PARANOID
- default:
- EXCEPTION(EX_INTERNAL | 0x123);
- f = SW_C3 | SW_C2 | SW_C0;
- break;
-#endif /* PARANOID */
- }
- setcc(f);
- return 1;
-}
-/*---------------------------------------------------------------------------*/
-
-void
-fcom_st()
-{
- /* fcom st(i) */
- compare_st_st(FPU_rm);
-}
-
-
-void
-fcompst()
-{
- /* fcomp st(i) */
- if (compare_st_st(FPU_rm))
- pop();
-}
-
-
-void
-fcompp()
-{
- /* fcompp */
- if (FPU_rm != 1) {
- Un_impl();
- return;
- }
- if (compare_st_st(1)) {
- pop();
- FPU_st0_ptr = &st(0);
- pop();
- }
-}
-
-
-void
-fucom_()
-{
- /* fucom st(i) */
- compare_u_st_st(FPU_rm);
-
-}
-
-
-void
-fucomp()
-{
- /* fucomp st(i) */
- if (compare_u_st_st(FPU_rm))
- pop();
-}
-
-
-void
-fucompp()
-{
- /* fucompp */
- if (FPU_rm == 1) {
- if (compare_u_st_st(1)) {
- pop();
- FPU_st0_ptr = &st(0);
- pop();
- }
- } else
- Un_impl();
-}
diff --git a/sys/gnu/i386/fpemul/reg_constant.c b/sys/gnu/i386/fpemul/reg_constant.c
deleted file mode 100644
index fc2860a..0000000
--- a/sys/gnu/i386/fpemul/reg_constant.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * reg_constant.c
- *
- * All of the constant FPU_REGs
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $id:$
- *
- */
-
-
-
-#include <sys/param.h>
-#include <sys/proc.h>
-#include <machine/pcb.h>
-
-#include <gnu/i386/fpemul/fpu_emu.h>
-#include <gnu/i386/fpemul/fpu_system.h>
-#include <gnu/i386/fpemul/status_w.h>
-
-
-FPU_REG CONST_1 = {SIGN_POS, TW_Valid, EXP_BIAS,
-0x00000000, 0x80000000};
-static FPU_REG CONST_L2T = {SIGN_POS, TW_Valid, EXP_BIAS + 1,
-0xcd1b8afe, 0xd49a784b};
-static FPU_REG CONST_L2E = {SIGN_POS, TW_Valid, EXP_BIAS,
-0x5c17f0bc, 0xb8aa3b29};
-FPU_REG CONST_PI = {SIGN_POS, TW_Valid, EXP_BIAS + 1,
-0x2168c235, 0xc90fdaa2};
-FPU_REG CONST_PI2 = {SIGN_POS, TW_Valid, EXP_BIAS,
-0x2168c235, 0xc90fdaa2};
-FPU_REG CONST_PI4 = {SIGN_POS, TW_Valid, EXP_BIAS - 1,
-0x2168c235, 0xc90fdaa2};
-static FPU_REG CONST_LG2 = {SIGN_POS, TW_Valid, EXP_BIAS - 2,
-0xfbcff799, 0x9a209a84};
-FPU_REG CONST_LN2 = {SIGN_POS, TW_Valid, EXP_BIAS - 1,
-0xd1cf79ac, 0xb17217f7};
-/* Only the sign (and tag) is used in internal zeroes */
-FPU_REG CONST_Z = {SIGN_POS, TW_Zero, 0, 0x0, 0x0};
-/* Only the sign and significand (and tag) are used in internal NaNs */
-/* The 80486 never generates one of these
-FPU_REG CONST_SNAN = { SIGN_POS, TW_NaN, EXP_OVER, 0x00000001, 0x80000000 };
- */
-/* This is the real indefinite QNaN */
-FPU_REG CONST_QNaN = {SIGN_NEG, TW_NaN, EXP_OVER, 0x00000000, 0xC0000000};
-/* Only the sign (and tag) is used in internal infinities */
-FPU_REG CONST_INF = {SIGN_POS, TW_Infinity, EXP_OVER, 0x00000000, 0x80000000};
-
-
-
-static void
-fld_const(FPU_REG * c)
-{
- FPU_REG *st_new_ptr;
-
- if (STACK_OVERFLOW) {
- stack_overflow();
- return;
- }
- push();
- reg_move(c, FPU_st0_ptr);
- status_word &= ~SW_C1;
-}
-
-
-static void
-fld1(void)
-{
- fld_const(&CONST_1);
-}
-
-static void
-fldl2t(void)
-{
- fld_const(&CONST_L2T);
-}
-
-static void
-fldl2e(void)
-{
- fld_const(&CONST_L2E);
-}
-
-static void
-fldpi(void)
-{
- fld_const(&CONST_PI);
-}
-
-static void
-fldlg2(void)
-{
- fld_const(&CONST_LG2);
-}
-
-static void
-fldln2(void)
-{
- fld_const(&CONST_LN2);
-}
-
-static void
-fldz(void)
-{
- fld_const(&CONST_Z);
-}
-
-static FUNC constants_table[] = {
- fld1, fldl2t, fldl2e, fldpi, fldlg2, fldln2, fldz, Un_impl
-};
-
-void
-fconst(void)
-{
- (constants_table[FPU_rm]) ();
-}
diff --git a/sys/gnu/i386/fpemul/reg_constant.h b/sys/gnu/i386/fpemul/reg_constant.h
deleted file mode 100644
index 6c22cd7..0000000
--- a/sys/gnu/i386/fpemul/reg_constant.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * reg_constant.h
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-#ifndef _REG_CONSTANT_H_
-#define _REG_CONSTANT_H_
-
-#include <gnu/i386/fpemul/fpu_emu.h>
-
-extern FPU_REG CONST_1;
-extern FPU_REG CONST_2;
-extern FPU_REG CONST_HALF;
-extern FPU_REG CONST_L2T;
-extern FPU_REG CONST_L2E;
-extern FPU_REG CONST_PI;
-extern FPU_REG CONST_PI2;
-extern FPU_REG CONST_PI4;
-extern FPU_REG CONST_LG2;
-extern FPU_REG CONST_LN2;
-extern FPU_REG CONST_Z;
-extern FPU_REG CONST_PINF;
-extern FPU_REG CONST_INF;
-extern FPU_REG CONST_MINF;
-extern FPU_REG CONST_QNaN;
-
-#endif /* _REG_CONSTANT_H_ */
diff --git a/sys/gnu/i386/fpemul/reg_div.s b/sys/gnu/i386/fpemul/reg_div.s
deleted file mode 100644
index fe73048..0000000
--- a/sys/gnu/i386/fpemul/reg_div.s
+++ /dev/null
@@ -1,290 +0,0 @@
- .file "reg_div.S"
-/*
- * reg_div.S
- *
- * Divide one FPU_REG by another and put the result in a destination FPU_REG.
- *
- * Call from C as:
- * void reg_div(FPU_REG *a, FPU_REG *b, FPU_REG *dest,
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-#include <gnu/i386/fpemul/fpu_asm.h>
-
-.text
-ENTRY(reg_div)
- pushl %ebp
- movl %esp,%ebp
-
- pushl %esi
- pushl %edi
- pushl %ebx
-
- movl PARAM1,%esi
- movl PARAM2,%ebx
- movl PARAM3,%edi
-
- movb TAG(%esi),%al
- orb TAG(%ebx),%al
-
- jne L_div_special /* Not (both numbers TW_Valid) */
-
-#ifdef DENORM_OPERAND
-/* Check for denormals */
- cmpl EXP_UNDER,EXP(%esi)
- jg xL_arg1_not_denormal
-
- call _denormal_operand
- orl %eax,%eax
- jnz FPU_Arith_exit
-
-xL_arg1_not_denormal:
- cmpl EXP_UNDER,EXP(%ebx)
- jg xL_arg2_not_denormal
-
- call _denormal_operand
- orl %eax,%eax
- jnz FPU_Arith_exit
-
-xL_arg2_not_denormal:
-#endif DENORM_OPERAND
-
-/* Both arguments are TW_Valid */
- movb TW_Valid,TAG(%edi)
-
- movb SIGN(%esi),%cl
- cmpb %cl,SIGN(%ebx)
- setne (%edi) /* Set the sign, requires SIGN_NEG=1, SIGN_POS=0 */
-
- movl EXP(%esi),%edx
- movl EXP(%ebx),%eax
- subl %eax,%edx
- addl EXP_BIAS,%edx
- movl %edx,EXP(%edi)
-
- jmp _divide_kernel
-
-
-/*-----------------------------------------------------------------------*/
-L_div_special:
- cmpb TW_NaN,TAG(%esi) /* A NaN with anything to give NaN */
- je L_arg1_NaN
-
- cmpb TW_NaN,TAG(%ebx) /* A NaN with anything to give NaN */
- jne L_no_NaN_arg
-
-/* Operations on NaNs */
-L_arg1_NaN:
-L_arg2_NaN:
- pushl %edi /* Destination */
- pushl %ebx
- pushl %esi
- call _real_2op_NaN
- jmp LDiv_exit
-
-/* Invalid operations */
-L_zero_zero:
-L_inf_inf:
- pushl %edi /* Destination */
- call _arith_invalid /* 0/0 or Infinity/Infinity */
- jmp LDiv_exit
-
-L_no_NaN_arg:
- cmpb TW_Infinity,TAG(%esi)
- jne L_arg1_not_inf
-
- cmpb TW_Infinity,TAG(%ebx)
- je L_inf_inf /* invalid operation */
-
- cmpb TW_Valid,TAG(%ebx)
- je L_inf_valid
-
-#ifdef PARANOID
- /* arg2 must be zero or valid */
- cmpb TW_Zero,TAG(%ebx)
- ja L_unknown_tags
-#endif PARANOID
-
- /* Note that p16-9 says that infinity/0 returns infinity */
- jmp L_copy_arg1 /* Answer is Inf */
-
-L_inf_valid:
-#ifdef DENORM_OPERAND
- cmpl EXP_UNDER,EXP(%ebx)
- jg L_copy_arg1 /* Answer is Inf */
-
- call _denormal_operand
- orl %eax,%eax
- jnz FPU_Arith_exit
-#endif DENORM_OPERAND
-
- jmp L_copy_arg1 /* Answer is Inf */
-
-L_arg1_not_inf:
- cmpb TW_Zero,TAG(%ebx) /* Priority to div-by-zero error */
- jne L_arg2_not_zero
-
- cmpb TW_Zero,TAG(%esi)
- je L_zero_zero /* invalid operation */
-
-#ifdef PARANOID
- /* arg1 must be valid */
- cmpb TW_Valid,TAG(%esi)
- ja L_unknown_tags
-#endif PARANOID
-
-/* Division by zero error */
- pushl %edi /* destination */
- movb SIGN(%esi),%al
- xorb SIGN(%ebx),%al
- pushl %eax /* lower 8 bits have the sign */
- call _divide_by_zero
- jmp LDiv_exit
-
-L_arg2_not_zero:
- cmpb TW_Infinity,TAG(%ebx)
- jne L_arg2_not_inf
-
-#ifdef DENORM_OPERAND
- cmpb TW_Valid,TAG(%esi)
- jne L_return_zero
-
- cmpl EXP_UNDER,EXP(%esi)
- jg L_return_zero /* Answer is zero */
-
- call _denormal_operand
- orl %eax,%eax
- jnz FPU_Arith_exit
-#endif DENORM_OPERAND
-
- jmp L_return_zero /* Answer is zero */
-
-L_arg2_not_inf:
-
-#ifdef PARANOID
- cmpb TW_Zero,TAG(%esi)
- jne L_unknown_tags
-#endif PARANOID
-
- /* arg1 is zero, arg2 is not Infinity or a NaN */
-
-#ifdef DENORM_OPERAND
- cmpl EXP_UNDER,EXP(%ebx)
- jg L_copy_arg1 /* Answer is zero */
-
- call _denormal_operand
- orl %eax,%eax
- jnz FPU_Arith_exit
-#endif DENORM_OPERAND
-
-L_copy_arg1:
- movb TAG(%esi),%ax
- movb %ax,TAG(%edi)
- movl EXP(%esi),%eax
- movl %eax,EXP(%edi)
- movl SIGL(%esi),%eax
- movl %eax,SIGL(%edi)
- movl SIGH(%esi),%eax
- movl %eax,SIGH(%edi)
-
- movb SIGN(%esi),%cl
- cmpb %cl,SIGN(%ebx)
- jne LDiv_negative_result
-
- movb SIGN_POS,SIGN(%edi)
- jmp LDiv_exit
-
-LDiv_set_result_sign:
- movb SIGN(%esi),%cl
- cmpb %cl,SIGN(%edi)
- jne LDiv_negative_result
-
- movb SIGN_POS,SIGN(%ebx)
- jmp LDiv_exit
-
-LDiv_negative_result:
- movb SIGN_NEG,SIGN(%edi)
-
-LDiv_exit:
- leal -12(%ebp),%esp
-
- popl %ebx
- popl %edi
- popl %esi
- leave
- ret
-
-
-L_return_zero:
- movb TW_Zero,TAG(%edi)
- jmp LDiv_set_result_sign
-
-#ifdef PARANOID
-L_unknown_tags:
- push EX_INTERNAL | 0x208
- call EXCEPTION
-
- /* Generate a NaN for unknown tags */
- movl _CONST_QNaN,%eax
- movl %eax,(%edi)
- movl _CONST_QNaN+4,%eax
- movl %eax,SIGL(%edi)
- movl _CONST_QNaN+8,%eax
- movl %eax,SIGH(%edi)
- jmp LDiv_exit
-#endif PARANOID
diff --git a/sys/gnu/i386/fpemul/reg_ld_str.c b/sys/gnu/i386/fpemul/reg_ld_str.c
deleted file mode 100644
index 5a2bcb8..0000000
--- a/sys/gnu/i386/fpemul/reg_ld_str.c
+++ /dev/null
@@ -1,1388 +0,0 @@
-/*
- * reg_ld_str.c
- *
- * All of the functions which transfer data between user memory and FPU_REGs.
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-
-/*---------------------------------------------------------------------------+
- | Note: |
- | The file contains code which accesses user memory. |
- | Emulator static data may change when user memory is accessed, due to |
- | other processes using the emulator while swapping is in progress. |
- +---------------------------------------------------------------------------*/
-#include <sys/param.h>
-#include <sys/proc.h>
-#include <sys/systm.h>
-#include <machine/pcb.h>
-
-#include <gnu/i386/fpemul/fpu_emu.h>
-#include <gnu/i386/fpemul/fpu_system.h>
-#include <gnu/i386/fpemul/exception.h>
-#include <gnu/i386/fpemul/reg_constant.h>
-#include <gnu/i386/fpemul/control_w.h>
-#include <gnu/i386/fpemul/status_w.h>
-
-
-#define EXTENDED_Emax 0x3fff /* largest valid exponent */
-#define EXTENDED_Ebias 0x3fff
-#define EXTENDED_Emin (-0x3ffe) /* smallest valid exponent */
-
-#define DOUBLE_Emax 1023 /* largest valid exponent */
-#define DOUBLE_Ebias 1023
-#define DOUBLE_Emin (-1022) /* smallest valid exponent */
-
-#define SINGLE_Emax 127 /* largest valid exponent */
-#define SINGLE_Ebias 127
-#define SINGLE_Emin (-126) /* smallest valid exponent */
-
-#define LOST_UP (EX_Precision | SW_C1)
-#define LOST_DOWN EX_Precision
-
-FPU_REG FPU_loaded_data;
-
-
-/* Get a long double from user memory */
-void
-reg_load_extended(void)
-{
- long double *s = (long double *) FPU_data_address;
- unsigned long sigl, sigh, exp;
-
- REENTRANT_CHECK(OFF);
- /* Use temporary variables here because FPU_loaded data is static and
- * hence re-entrancy problems can arise */
- sigl = fuword((unsigned long *) s);
- sigh = fuword(1 + (unsigned long *) s);
- exp = fusword(4 + (unsigned short *) s);
- REENTRANT_CHECK(ON);
-
- FPU_loaded_data.sigl = sigl;
- FPU_loaded_data.sigh = sigh;
- FPU_loaded_data.exp = exp;
-
- if (FPU_loaded_data.exp & 0x8000)
- FPU_loaded_data.sign = SIGN_NEG;
- else
- FPU_loaded_data.sign = SIGN_POS;
- if ((FPU_loaded_data.exp &= 0x7fff) == 0) {
- if (!(FPU_loaded_data.sigl | FPU_loaded_data.sigh)) {
- FPU_loaded_data.tag = TW_Zero;
- return;
- }
- /* The number is a de-normal or pseudodenormal. */
- /* The 80486 doesn't regard pseudodenormals as denormals here. */
- if (!(FPU_loaded_data.sigh & 0x80000000))
- EXCEPTION(EX_Denormal);
- FPU_loaded_data.exp++;
-
- /* The default behaviour will now take care of it. */
- } else
- if (FPU_loaded_data.exp == 0x7fff) {
- FPU_loaded_data.exp = EXTENDED_Emax;
- if ((FPU_loaded_data.sigh == 0x80000000)
- && (FPU_loaded_data.sigl == 0)) {
- FPU_loaded_data.tag = TW_Infinity;
- return;
- } else
- if (!(FPU_loaded_data.sigh & 0x80000000)) {
- /* Unsupported NaN data type */
- EXCEPTION(EX_Invalid);
- FPU_loaded_data.tag = TW_NaN;
- return;
- }
- FPU_loaded_data.tag = TW_NaN;
- return;
- }
- FPU_loaded_data.exp = (FPU_loaded_data.exp & 0x7fff) - EXTENDED_Ebias
- + EXP_BIAS;
- FPU_loaded_data.tag = TW_Valid;
-
- if (!(sigh & 0x80000000)) {
- /* Unsupported data type */
- EXCEPTION(EX_Invalid);
- normalize_nuo(&FPU_loaded_data);
- }
-}
-
-
-/* Get a double from user memory */
-void
-reg_load_double(void)
-{
- double *dfloat = (double *) FPU_data_address;
- int exp;
- unsigned m64, l64;
-
- REENTRANT_CHECK(OFF);
- m64 = fuword(1 + (unsigned long *) dfloat);
- l64 = fuword((unsigned long *) dfloat);
- REENTRANT_CHECK(ON);
-
- if (m64 & 0x80000000)
- FPU_loaded_data.sign = SIGN_NEG;
- else
- FPU_loaded_data.sign = SIGN_POS;
- exp = ((m64 & 0x7ff00000) >> 20) - DOUBLE_Ebias;
- m64 &= 0xfffff;
- if (exp > DOUBLE_Emax) {
- /* Infinity or NaN */
- if ((m64 == 0) && (l64 == 0)) {
- /* +- infinity */
- FPU_loaded_data.exp = EXTENDED_Emax;
- FPU_loaded_data.tag = TW_Infinity;
- return;
- } else {
- /* Must be a signaling or quiet NaN */
- FPU_loaded_data.exp = EXTENDED_Emax;
- FPU_loaded_data.tag = TW_NaN;
- FPU_loaded_data.sigh = (m64 << 11) | 0x80000000;
- FPU_loaded_data.sigh |= l64 >> 21;
- FPU_loaded_data.sigl = l64 << 11;
- return;
- }
- } else
- if (exp < DOUBLE_Emin) {
- /* Zero or de-normal */
- if ((m64 == 0) && (l64 == 0)) {
- /* Zero */
- int c = FPU_loaded_data.sign;
- reg_move(&CONST_Z, &FPU_loaded_data);
- FPU_loaded_data.sign = c;
- return;
- } else {
- /* De-normal */
- EXCEPTION(EX_Denormal);
- FPU_loaded_data.exp = DOUBLE_Emin + EXP_BIAS;
- FPU_loaded_data.tag = TW_Valid;
- FPU_loaded_data.sigh = m64 << 11;
- FPU_loaded_data.sigh |= l64 >> 21;
- FPU_loaded_data.sigl = l64 << 11;
- normalize_nuo(&FPU_loaded_data);
- return;
- }
- } else {
- FPU_loaded_data.exp = exp + EXP_BIAS;
- FPU_loaded_data.tag = TW_Valid;
- FPU_loaded_data.sigh = (m64 << 11) | 0x80000000;
- FPU_loaded_data.sigh |= l64 >> 21;
- FPU_loaded_data.sigl = l64 << 11;
-
- return;
- }
-}
-
-
-/* Get a float from user memory */
-void
-reg_load_single(void)
-{
- float *single = (float *) FPU_data_address;
- unsigned m32;
- int exp;
-
- REENTRANT_CHECK(OFF);
- m32 = fuword((unsigned long *) single);
- REENTRANT_CHECK(ON);
-
- if (m32 & 0x80000000)
- FPU_loaded_data.sign = SIGN_NEG;
- else
- FPU_loaded_data.sign = SIGN_POS;
- if (!(m32 & 0x7fffffff)) {
- /* Zero */
- int c = FPU_loaded_data.sign;
- reg_move(&CONST_Z, &FPU_loaded_data);
- FPU_loaded_data.sign = c;
- return;
- }
- exp = ((m32 & 0x7f800000) >> 23) - SINGLE_Ebias;
- m32 = (m32 & 0x7fffff) << 8;
- if (exp < SINGLE_Emin) {
- /* De-normals */
- EXCEPTION(EX_Denormal);
- FPU_loaded_data.exp = SINGLE_Emin + EXP_BIAS;
- FPU_loaded_data.tag = TW_Valid;
- FPU_loaded_data.sigh = m32;
- FPU_loaded_data.sigl = 0;
- normalize_nuo(&FPU_loaded_data);
- return;
- } else
- if (exp > SINGLE_Emax) {
- /* Infinity or NaN */
- if (m32 == 0) {
- /* +- infinity */
- FPU_loaded_data.exp = EXTENDED_Emax;
- FPU_loaded_data.tag = TW_Infinity;
- return;
- } else {
- /* Must be a signaling or quiet NaN */
- FPU_loaded_data.exp = EXTENDED_Emax;
- FPU_loaded_data.tag = TW_NaN;
- FPU_loaded_data.sigh = m32 | 0x80000000;
- FPU_loaded_data.sigl = 0;
- return;
- }
- } else {
- FPU_loaded_data.exp = exp + EXP_BIAS;
- FPU_loaded_data.sigh = m32 | 0x80000000;
- FPU_loaded_data.sigl = 0;
- FPU_loaded_data.tag = TW_Valid;
- }
-}
-
-
-/* Get a long long from user memory */
-void
-reg_load_int64(void)
-{
- long long *_s = (long long *) FPU_data_address;
- int e;
- long long s;
-
- REENTRANT_CHECK(OFF);
- ((unsigned long *) &s)[0] = fuword((unsigned long *) _s);
- ((unsigned long *) &s)[1] = fuword(1 + (unsigned long *) _s);
- REENTRANT_CHECK(ON);
-
- if (s == 0) {
- reg_move(&CONST_Z, &FPU_loaded_data);
- return;
- }
- if (s > 0)
- FPU_loaded_data.sign = SIGN_POS;
- else {
- s = -s;
- FPU_loaded_data.sign = SIGN_NEG;
- }
-
- e = EXP_BIAS + 63;
- *((long long *) &FPU_loaded_data.sigl) = s;
- FPU_loaded_data.exp = e;
- FPU_loaded_data.tag = TW_Valid;
- normalize_nuo(&FPU_loaded_data);
-}
-
-
-/* Get a long from user memory */
-void
-reg_load_int32(void)
-{
- long *_s = (long *) FPU_data_address;
- long s;
- int e;
-
- REENTRANT_CHECK(OFF);
- s = (long) fuword((unsigned long *) _s);
- REENTRANT_CHECK(ON);
-
- if (s == 0) {
- reg_move(&CONST_Z, &FPU_loaded_data);
- return;
- }
- if (s > 0)
- FPU_loaded_data.sign = SIGN_POS;
- else {
- s = -s;
- FPU_loaded_data.sign = SIGN_NEG;
- }
-
- e = EXP_BIAS + 31;
- FPU_loaded_data.sigh = s;
- FPU_loaded_data.sigl = 0;
- FPU_loaded_data.exp = e;
- FPU_loaded_data.tag = TW_Valid;
- normalize_nuo(&FPU_loaded_data);
-}
-
-
-/* Get a short from user memory */
-void
-reg_load_int16(void)
-{
- short *_s = (short *) FPU_data_address;
- int s, e;
-
- REENTRANT_CHECK(OFF);
- /* Cast as short to get the sign extended. */
- s = (short) fusword((unsigned short *) _s);
- REENTRANT_CHECK(ON);
-
- if (s == 0) {
- reg_move(&CONST_Z, &FPU_loaded_data);
- return;
- }
- if (s > 0)
- FPU_loaded_data.sign = SIGN_POS;
- else {
- s = -s;
- FPU_loaded_data.sign = SIGN_NEG;
- }
-
- e = EXP_BIAS + 15;
- FPU_loaded_data.sigh = s << 16;
-
- FPU_loaded_data.sigl = 0;
- FPU_loaded_data.exp = e;
- FPU_loaded_data.tag = TW_Valid;
- normalize_nuo(&FPU_loaded_data);
-}
-
-
-/* Get a packed bcd array from user memory */
-void
-reg_load_bcd(void)
-{
- char *s = (char *) FPU_data_address;
- int pos;
- unsigned char bcd;
- long long l = 0;
-
- for (pos = 8; pos >= 0; pos--) {
- l *= 10;
- REENTRANT_CHECK(OFF);
- bcd = (unsigned char) fubyte((unsigned char *) s + pos);
- REENTRANT_CHECK(ON);
- l += bcd >> 4;
- l *= 10;
- l += bcd & 0x0f;
- }
-
- /* Finish all access to user memory before putting stuff into the
- * static FPU_loaded_data */
- REENTRANT_CHECK(OFF);
- FPU_loaded_data.sign =
- ((unsigned char) fubyte((unsigned char *) s + 9)) & 0x80 ?
- SIGN_NEG : SIGN_POS;
- REENTRANT_CHECK(ON);
-
- if (l == 0) {
- char sign = FPU_loaded_data.sign;
- reg_move(&CONST_Z, &FPU_loaded_data);
- FPU_loaded_data.sign = sign;
- } else {
- *((long long *) &FPU_loaded_data.sigl) = l;
- FPU_loaded_data.exp = EXP_BIAS + 63;
- FPU_loaded_data.tag = TW_Valid;
- normalize_nuo(&FPU_loaded_data);
- }
-}
-/*===========================================================================*/
-
-/* Put a long double into user memory */
-int
-reg_store_extended(void)
-{
- long double *d = (long double *) FPU_data_address;
- long e = FPU_st0_ptr->exp - EXP_BIAS + EXTENDED_Ebias;
- unsigned short sign = FPU_st0_ptr->sign * 0x8000;
- unsigned long ls, ms;
-
-
- if (FPU_st0_tag == TW_Valid) {
- if (e >= 0x7fff) {
- EXCEPTION(EX_Overflow); /* Overflow */
- /* This is a special case: see sec 16.2.5.1 of the
- * 80486 book */
- if (control_word & EX_Overflow) {
- /* Overflow to infinity */
- ls = 0;
- ms = 0x80000000;
- e = 0x7fff;
- } else
- return 0;
- } else
- if (e <= 0) {
- if (e > -63) {
- /* Correctly format the de-normal */
- int precision_loss;
- FPU_REG tmp;
-
- EXCEPTION(EX_Denormal);
- reg_move(FPU_st0_ptr, &tmp);
- tmp.exp += -EXTENDED_Emin + 63; /* largest exp to be 62 */
- if ((precision_loss = round_to_int(&tmp))) {
- EXCEPTION(EX_Underflow | precision_loss);
- /* This is a special case: see
- * sec 16.2.5.1 of the 80486
- * book */
- if (!(control_word & EX_Underflow))
- return 0;
- }
- e = 0;
- ls = tmp.sigl;
- ms = tmp.sigh;
- } else {
- /* ****** ??? This should not be
- * possible */
- EXCEPTION(EX_Underflow); /* Underflow */
- /* This is a special case: see sec
- * 16.2.5.1 of the 80486 book */
- if (control_word & EX_Underflow) {
- /* Underflow to zero */
- ls = 0;
- ms = 0;
- e = FPU_st0_ptr->sign == SIGN_POS ? 0x7fff : 0xffff;
- } else
- return 0;
- }
- } else {
- ls = FPU_st0_ptr->sigl;
- ms = FPU_st0_ptr->sigh;
- }
- } else
- if (FPU_st0_tag == TW_Zero) {
- ls = ms = 0;
- e = 0;
- } else
- if (FPU_st0_tag == TW_Infinity) {
- ls = 0;
- ms = 0x80000000;
- e = 0x7fff;
- } else
- if (FPU_st0_tag == TW_NaN) {
- ls = FPU_st0_ptr->sigl;
- ms = FPU_st0_ptr->sigh;
- e = 0x7fff;
- } else
- if (FPU_st0_tag == TW_Empty) {
- /* Empty register (stack
- * underflow) */
- EXCEPTION(EX_StackUnder);
- if (control_word & EX_Invalid) {
- /* The masked response */
- /* Put out the QNaN
- * indefinite */
- ls = 0;
- ms = 0xc0000000;
- e = 0xffff;
- } else
- return 0;
- } else {
- /* We don't use TW_Denormal
- * yet ... perhaps never! */
- EXCEPTION(EX_Invalid);
- /* Store a NaN */
- e = 0x7fff;
- ls = 1;
- ms = 0x80000000;
- }
- REENTRANT_CHECK(OFF);
-/* verify_area(VERIFY_WRITE, d, 10); */
- suword((unsigned long *) d, ls);
- suword(1 + (unsigned long *) d, ms);
- susword(4 + (short *) d, (unsigned short) e | sign);
- REENTRANT_CHECK(ON);
-
- return 1;
-
-}
-
-
-/* Put a double into user memory */
-int
-reg_store_double(void)
-{
- double *dfloat = (double *) FPU_data_address;
- unsigned long l[2];
- if (FPU_st0_tag == TW_Valid) {
- int exp;
- FPU_REG tmp;
-
- reg_move(FPU_st0_ptr, &tmp);
- exp = tmp.exp - EXP_BIAS;
-
- if (exp < DOUBLE_Emin) { /* It may be a denormal */
- /* Make a de-normal */
- int precision_loss;
-
- if (exp <= -EXTENDED_Ebias)
- EXCEPTION(EX_Denormal);
-
- tmp.exp += -DOUBLE_Emin + 52; /* largest exp to be 51 */
-
- if ((precision_loss = round_to_int(&tmp))) {
-#ifdef PECULIAR_486
- /* Did it round to a non-denormal ? */
- /* This behaviour might be regarded as
- * peculiar, it appears that the 80486 rounds
- * to the dest precision, then converts to
- * decide underflow. */
- if ((tmp.sigh == 0x00100000) && (tmp.sigl == 0) &&
- (FPU_st0_ptr->sigl & 0x000007ff))
- EXCEPTION(precision_loss);
- else
-#endif /* PECULIAR_486 */
- {
- EXCEPTION(EX_Underflow | precision_loss);
- /* This is a special case: see sec
- * 16.2.5.1 of the 80486 book */
- if (!(control_word & EX_Underflow))
- return 0;
- }
- }
- l[0] = tmp.sigl;
- l[1] = tmp.sigh;
- } else {
- if (tmp.sigl & 0x000007ff) {
- unsigned long increment = 0; /* avoid gcc warnings */
-
- switch (control_word & CW_RC) {
- case RC_RND:
- /* Rounding can get a little messy.. */
- increment = ((tmp.sigl & 0x7ff) > 0x400) | /* nearest */
- ((tmp.sigl & 0xc00) == 0xc00); /* odd -> even */
- break;
- case RC_DOWN: /* towards -infinity */
- increment = (tmp.sign == SIGN_POS) ? 0 : tmp.sigl & 0x7ff;
- break;
- case RC_UP: /* towards +infinity */
- increment = (tmp.sign == SIGN_POS) ? tmp.sigl & 0x7ff : 0;
- break;
- case RC_CHOP:
- increment = 0;
- break;
- }
-
- /* Truncate the mantissa */
- tmp.sigl &= 0xfffff800;
-
- if (increment) {
- set_precision_flag_up();
-
- if (tmp.sigl >= 0xfffff800) {
- /* the sigl part overflows */
- if (tmp.sigh == 0xffffffff) {
- /* The sigh part
- * overflows */
- tmp.sigh = 0x80000000;
- exp++;
- if (exp >= EXP_OVER)
- goto overflow;
- } else {
- tmp.sigh++;
- }
- tmp.sigl = 0x00000000;
- } else {
- /* We only need to increment
- * sigl */
- tmp.sigl += 0x00000800;
- }
- } else
- set_precision_flag_down();
- }
- l[0] = (tmp.sigl >> 11) | (tmp.sigh << 21);
- l[1] = ((tmp.sigh >> 11) & 0xfffff);
-
- if (exp > DOUBLE_Emax) {
- overflow:
- EXCEPTION(EX_Overflow);
- /* This is a special case: see sec 16.2.5.1 of
- * the 80486 book */
- if (control_word & EX_Overflow) {
- /* Overflow to infinity */
- l[0] = 0x00000000; /* Set to */
- l[1] = 0x7ff00000; /* + INF */
- } else
- return 0;
- } else {
- /* Add the exponent */
- l[1] |= (((exp + DOUBLE_Ebias) & 0x7ff) << 20);
- }
- }
- } else
- if (FPU_st0_tag == TW_Zero) {
- /* Number is zero */
- l[0] = 0;
- l[1] = 0;
- } else
- if (FPU_st0_tag == TW_Infinity) {
- l[0] = 0;
- l[1] = 0x7ff00000;
- } else
- if (FPU_st0_tag == TW_NaN) {
- /* See if we can get a valid NaN from
- * the FPU_REG */
- l[0] = (FPU_st0_ptr->sigl >> 11) | (FPU_st0_ptr->sigh << 21);
- l[1] = ((FPU_st0_ptr->sigh >> 11) & 0xfffff);
- if (!(l[0] | l[1])) {
- /* This case does not seem to
- * be handled by the 80486
- * specs */
- EXCEPTION(EX_Invalid);
- /* Make the quiet NaN "real
- * indefinite" */
- goto put_indefinite;
- }
- l[1] |= 0x7ff00000;
- } else
- if (FPU_st0_tag == TW_Empty) {
- /* Empty register (stack
- * underflow) */
- EXCEPTION(EX_StackUnder);
- if (control_word & EX_Invalid) {
- /* The masked response */
- /* Put out the QNaN
- * indefinite */
- put_indefinite:
- REENTRANT_CHECK(OFF);
- /* verify_area(VERIFY_W
- * RITE, (void *)
- * dfloat, 8); */
- suword((unsigned long *) dfloat, 0);
- suword(1 + (unsigned long *) dfloat, 0xfff80000);
- REENTRANT_CHECK(ON);
- return 1;
- } else
- return 0;
- }
-#if 0 /* TW_Denormal is not used yet, and probably
- * won't be */
- else
- if (FPU_st0_tag == TW_Denormal) {
- /* Extended real ->
- * double real will
- * always underflow */
- l[0] = l[1] = 0;
- EXCEPTION(EX_Underflow);
- }
-#endif
- if (FPU_st0_ptr->sign)
- l[1] |= 0x80000000;
-
- REENTRANT_CHECK(OFF);
-/* verify_area(VERIFY_WRITE, (void *) dfloat, 8);*/
- suword((u_long *) dfloat, l[0]);
- suword((u_long *) dfloat + 1, l[1]);
-/*
- suword(l[0], (unsigned long *) dfloat);
- suword(l[1], 1 + (unsigned long *) dfloat);*/
- REENTRANT_CHECK(ON);
-
- return 1;
-}
-
-
-/* Put a float into user memory */
-int
-reg_store_single(void)
-{
- float *single = (float *) FPU_data_address;
- long templ = 0;
-
- if (FPU_st0_tag == TW_Valid) {
- int exp;
- FPU_REG tmp;
-
- reg_move(FPU_st0_ptr, &tmp);
- exp = tmp.exp - EXP_BIAS;
-
- if (exp < SINGLE_Emin) {
- /* Make a de-normal */
- int precision_loss;
-
- if (exp <= -EXTENDED_Ebias)
- EXCEPTION(EX_Denormal);
-
- tmp.exp += -SINGLE_Emin + 23; /* largest exp to be 22 */
-
- if ((precision_loss = round_to_int(&tmp))) {
-#ifdef PECULIAR_486
- /* Did it round to a non-denormal ? */
- /* This behaviour might be regarded as
- * peculiar, it appears that the 80486 rounds
- * to the dest precision, then converts to
- * decide underflow. */
- if ((tmp.sigl == 0x00800000) &&
- ((FPU_st0_ptr->sigh & 0x000000ff) || FPU_st0_ptr->sigl))
- EXCEPTION(precision_loss);
- else
-#endif /* PECULIAR_486 */
- {
- EXCEPTION(EX_Underflow | precision_loss);
- /* This is a special case: see sec
- * 16.2.5.1 of the 80486 book */
- if (!(control_word & EX_Underflow))
- return 0;
- }
- }
- templ = tmp.sigl;
- } else {
- if (tmp.sigl | (tmp.sigh & 0x000000ff)) {
- unsigned long increment = 0; /* avoid gcc warnings */
- unsigned long sigh = tmp.sigh;
- unsigned long sigl = tmp.sigl;
-
- switch (control_word & CW_RC) {
- case RC_RND:
- increment = ((sigh & 0xff) > 0x80) /* more than half */
- ||(((sigh & 0xff) == 0x80) && sigl) /* more than half */
- ||((sigh & 0x180) == 0x180); /* round to even */
- break;
- case RC_DOWN: /* towards -infinity */
- increment = (tmp.sign == SIGN_POS)
- ? 0 : (sigl | (sigh & 0xff));
- break;
- case RC_UP: /* towards +infinity */
- increment = (tmp.sign == SIGN_POS)
- ? (sigl | (sigh & 0xff)) : 0;
- break;
- case RC_CHOP:
- increment = 0;
- break;
- }
-
- /* Truncate part of the mantissa */
- tmp.sigl = 0;
-
- if (increment) {
- set_precision_flag_up();
-
- if (sigh >= 0xffffff00) {
- /* The sigh part overflows */
- tmp.sigh = 0x80000000;
- exp++;
- if (exp >= EXP_OVER)
- goto overflow;
- } else {
- tmp.sigh &= 0xffffff00;
- tmp.sigh += 0x100;
- }
- } else {
- set_precision_flag_down();
- tmp.sigh &= 0xffffff00; /* Finish the truncation */
- }
- }
- templ = (tmp.sigh >> 8) & 0x007fffff;
-
- if (exp > SINGLE_Emax) {
- overflow:
- EXCEPTION(EX_Overflow);
- /* This is a special case: see sec 16.2.5.1 of
- * the 80486 book */
- if (control_word & EX_Overflow) {
- /* Overflow to infinity */
- templ = 0x7f800000;
- } else
- return 0;
- } else
- templ |= ((exp + SINGLE_Ebias) & 0xff) << 23;
- }
- } else
- if (FPU_st0_tag == TW_Zero) {
- templ = 0;
- } else
- if (FPU_st0_tag == TW_Infinity) {
- templ = 0x7f800000;
- } else
- if (FPU_st0_tag == TW_NaN) {
- /* See if we can get a valid NaN from
- * the FPU_REG */
- templ = FPU_st0_ptr->sigh >> 8;
- if (!(templ & 0x3fffff)) {
- /* This case does not seem to
- * be handled by the 80486
- * specs */
- EXCEPTION(EX_Invalid);
- /* Make the quiet NaN "real
- * indefinite" */
- goto put_indefinite;
- }
- templ |= 0x7f800000;
- } else
- if (FPU_st0_tag == TW_Empty) {
- /* Empty register (stack
- * underflow) */
- EXCEPTION(EX_StackUnder);
- if (control_word & EX_Invalid) {
- /* The masked response */
- /* Put out the QNaN
- * indefinite */
- put_indefinite:
- REENTRANT_CHECK(OFF);
-/* verify_area(VERIFY_WRITE, (void *) single, 4); */
- suword((unsigned long *) single, 0xffc00000);
- REENTRANT_CHECK(ON);
- return 1;
- } else
- return 0;
- }
-#if 0 /* TW_Denormal is not used yet, and probably
- * won't be */
- else
- if (FPU_st0_tag == TW_Denormal) {
- /* Extended real ->
- * real will always
- * underflow */
- templ = 0;
- EXCEPTION(EX_Underflow);
- }
-#endif
-#ifdef PARANOID
- else {
- EXCEPTION(EX_INTERNAL | 0x106);
- return 0;
- }
-#endif
- if (FPU_st0_ptr->sign)
- templ |= 0x80000000;
-
- REENTRANT_CHECK(OFF);
-/* verify_area(VERIFY_WRITE, (void *) single, 4); */
- suword((unsigned long *) single, templ);
- REENTRANT_CHECK(ON);
-
- return 1;
-}
-
-
-/* Put a long long into user memory */
-int
-reg_store_int64(void)
-{
- long long *d = (long long *) FPU_data_address;
- FPU_REG t;
- long long tll;
-
- if (FPU_st0_tag == TW_Empty) {
- /* Empty register (stack underflow) */
- EXCEPTION(EX_StackUnder);
- if (control_word & EX_Invalid) {
- /* The masked response */
- /* Put out the QNaN indefinite */
- goto put_indefinite;
- } else
- return 0;
- }
- reg_move(FPU_st0_ptr, &t);
- round_to_int(&t);
- ((long *) &tll)[0] = t.sigl;
- ((long *) &tll)[1] = t.sigh;
- if ((t.sigh & 0x80000000) &&
- !((t.sigh == 0x80000000) && (t.sigl == 0) && (t.sign == SIGN_NEG))) {
- EXCEPTION(EX_Invalid);
- /* This is a special case: see sec 16.2.5.1 of the 80486 book */
- if (control_word & EX_Invalid) {
- /* Produce "indefinite" */
- put_indefinite:
- ((long *) &tll)[1] = 0x80000000;
- ((long *) &tll)[0] = 0;
- } else
- return 0;
- } else
- if (t.sign)
- tll = -tll;
-
- REENTRANT_CHECK(OFF);
-/* verify_area(VERIFY_WRITE, (void *) d, 8); */
- suword((unsigned long *) d, ((long *) &tll)[0]);
- suword(1 + (unsigned long *) d, ((long *) &tll)[1]);
- REENTRANT_CHECK(ON);
-
- return 1;
-}
-
-
-/* Put a long into user memory */
-int
-reg_store_int32(void)
-{
- long *d = (long *) FPU_data_address;
- FPU_REG t;
-
- if (FPU_st0_tag == TW_Empty) {
- /* Empty register (stack underflow) */
- EXCEPTION(EX_StackUnder);
- if (control_word & EX_Invalid) {
- /* The masked response */
- /* Put out the QNaN indefinite */
- REENTRANT_CHECK(OFF);
-/* verify_area(VERIFY_WRITE, d, 4);*/
- suword((unsigned long *) d, 0x80000000);
- REENTRANT_CHECK(ON);
- return 1;
- } else
- return 0;
- }
- reg_move(FPU_st0_ptr, &t);
- round_to_int(&t);
- if (t.sigh ||
- ((t.sigl & 0x80000000) &&
- !((t.sigl == 0x80000000) && (t.sign == SIGN_NEG)))) {
- EXCEPTION(EX_Invalid);
- /* This is a special case: see sec 16.2.5.1 of the 80486 book */
- if (control_word & EX_Invalid) {
- /* Produce "indefinite" */
- t.sigl = 0x80000000;
- } else
- return 0;
- } else
- if (t.sign)
- t.sigl = -(long) t.sigl;
-
- REENTRANT_CHECK(OFF);
-/* verify_area(VERIFY_WRITE, d, 4); */
- suword((unsigned long *) d, t.sigl);
- REENTRANT_CHECK(ON);
-
- return 1;
-}
-
-
-/* Put a short into user memory */
-int
-reg_store_int16(void)
-{
- short *d = (short *) FPU_data_address;
- FPU_REG t;
- short ts;
-
- if (FPU_st0_tag == TW_Empty) {
- /* Empty register (stack underflow) */
- EXCEPTION(EX_StackUnder);
- if (control_word & EX_Invalid) {
- /* The masked response */
- /* Put out the QNaN indefinite */
- REENTRANT_CHECK(OFF);
-/* verify_area(VERIFY_WRITE, d, 2);*/
- susword((unsigned short *) d, 0x8000);
- REENTRANT_CHECK(ON);
- return 1;
- } else
- return 0;
- }
- reg_move(FPU_st0_ptr, &t);
- round_to_int(&t);
- if (t.sigh ||
- ((t.sigl & 0xffff8000) &&
- !((t.sigl == 0x8000) && (t.sign == SIGN_NEG)))) {
- EXCEPTION(EX_Invalid);
- /* This is a special case: see sec 16.2.5.1 of the 80486 book */
- if (control_word & EX_Invalid) {
- /* Produce "indefinite" */
- ts = 0x8000;
- } else
- return 0;
- } else
- if (t.sign)
- t.sigl = -t.sigl;
-
- REENTRANT_CHECK(OFF);
-/* verify_area(VERIFY_WRITE, d, 2); */
- susword((short *) d, (short) t.sigl);
- REENTRANT_CHECK(ON);
-
- return 1;
-}
-
-
-/* Put a packed bcd array into user memory */
-int
-reg_store_bcd(void)
-{
- char *d = (char *) FPU_data_address;
- FPU_REG t;
- long long ll;
- unsigned char b;
- int i;
- unsigned char sign = (FPU_st0_ptr->sign == SIGN_NEG) ? 0x80 : 0;
-
- if (FPU_st0_tag == TW_Empty) {
- /* Empty register (stack underflow) */
- EXCEPTION(EX_StackUnder);
- if (control_word & EX_Invalid) {
- /* The masked response */
- /* Put out the QNaN indefinite */
- goto put_indefinite;
- } else
- return 0;
- }
- reg_move(FPU_st0_ptr, &t);
- round_to_int(&t);
- ll = *(long long *) (&t.sigl);
-
- /* Check for overflow, by comparing with 999999999999999999 decimal. */
- if ((t.sigh > 0x0de0b6b3) ||
- ((t.sigh == 0x0de0b6b3) && (t.sigl > 0xa763ffff))) {
- EXCEPTION(EX_Invalid);
- /* This is a special case: see sec 16.2.5.1 of the 80486 book */
- if (control_word & EX_Invalid) {
- put_indefinite:
- /* Produce "indefinite" */
- REENTRANT_CHECK(OFF);
-/* verify_area(VERIFY_WRITE, d, 10);*/
- subyte((unsigned char *) d + 7, 0xff);
- subyte((unsigned char *) d + 8, 0xff);
- subyte((unsigned char *) d + 9, 0xff);
- REENTRANT_CHECK(ON);
- return 1;
- } else
- return 0;
- }
-/* verify_area(VERIFY_WRITE, d, 10);*/
- for (i = 0; i < 9; i++) {
- b = div_small(&ll, 10);
- b |= (div_small(&ll, 10)) << 4;
- REENTRANT_CHECK(OFF);
- subyte((unsigned char *) d + i, b);
- REENTRANT_CHECK(ON);
- }
- REENTRANT_CHECK(OFF);
- subyte((unsigned char *) d + 9, sign);
- REENTRANT_CHECK(ON);
-
- return 1;
-}
-/*===========================================================================*/
-
-/* r gets mangled such that sig is int, sign:
- it is NOT normalized */
-/* The return value (in eax) is zero if the result is exact,
- if bits are changed due to rounding, truncation, etc, then
- a non-zero value is returned */
-/* Overflow is signalled by a non-zero return value (in eax).
- In the case of overflow, the returned significand always has the
- the largest possible value */
-/* The value returned in eax is never actually needed :-) */
-int
-round_to_int(FPU_REG * r)
-{
- char very_big;
- unsigned eax;
-
- if (r->tag == TW_Zero) {
- /* Make sure that zero is returned */
- *(long long *) &r->sigl = 0;
- return 0; /* o.k. */
- }
- if (r->exp > EXP_BIAS + 63) {
- r->sigl = r->sigh = ~0; /* The largest representable number */
- return 1; /* overflow */
- }
- eax = shrxs(&r->sigl, EXP_BIAS + 63 - r->exp);
- very_big = !(~(r->sigh) | ~(r->sigl)); /* test for 0xfff...fff */
-#define half_or_more (eax & 0x80000000)
-#define frac_part (eax)
-#define more_than_half ((eax & 0x80000001) == 0x80000001)
- switch (control_word & CW_RC) {
- case RC_RND:
- if (more_than_half /* nearest */
- || (half_or_more && (r->sigl & 1))) { /* odd -> even */
- if (very_big)
- return 1; /* overflow */
- (*(long long *) (&r->sigl))++;
- return LOST_UP;
- }
- break;
- case RC_DOWN:
- if (frac_part && r->sign) {
- if (very_big)
- return 1; /* overflow */
- (*(long long *) (&r->sigl))++;
- return LOST_UP;
- }
- break;
- case RC_UP:
- if (frac_part && !r->sign) {
- if (very_big)
- return 1; /* overflow */
- (*(long long *) (&r->sigl))++;
- return LOST_UP;
- }
- break;
- case RC_CHOP:
- break;
- }
-
- return eax ? LOST_DOWN : 0;
-
-}
-/*===========================================================================*/
-
-char *
-fldenv(void)
-{
- char *s = (char *) FPU_data_address;
- unsigned short tag_word = 0;
- unsigned char tag;
- int i;
-
- REENTRANT_CHECK(OFF);
- control_word = fusword((unsigned short *) s);
- status_word = fusword((unsigned short *) (s + 4));
- tag_word = fusword((unsigned short *) (s + 8));
- ip_offset = fuword((unsigned long *) (s + 0x0c));
- cs_selector = fuword((unsigned long *) (s + 0x10));
- data_operand_offset = fuword((unsigned long *) (s + 0x14));
- operand_selector = fuword((unsigned long *) (s + 0x18));
- REENTRANT_CHECK(ON);
-
- top = (status_word >> SW_Top_Shift) & 7;
-
- for (i = 0; i < 8; i++) {
- tag = tag_word & 3;
- tag_word >>= 2;
-
- switch (tag) {
- case 0:
- regs[i].tag = TW_Valid;
- break;
- case 1:
- regs[i].tag = TW_Zero;
- break;
- case 2:
- regs[i].tag = TW_NaN;
- break;
- case 3:
- regs[i].tag = TW_Empty;
- break;
- }
- }
-
- /* We want no net effect: */
- FPU_data_address = (void *) (intptr_t) data_operand_offset;
- FPU_entry_eip = ip_offset; /* We want no net effect */
-
- return s + 0x1c;
-}
-
-
-void
-frstor(void)
-{
- int i, stnr;
- unsigned char tag;
- unsigned short saved_status, saved_control;
- char *s = (char *) fldenv();
-
- saved_status = status_word;
- saved_control = control_word;
- control_word = 0x037f; /* Mask all interrupts while we load. */
- for (i = 0; i < 8; i++) {
- /* load each register */
- FPU_data_address = (void *) (s + i * 10);
- reg_load_extended();
- stnr = (i + top) & 7;
- tag = regs[stnr].tag; /* derived from the loaded tag word */
- reg_move(&FPU_loaded_data, &regs[stnr]);
- if (tag == TW_NaN) {
- /* The current data is a special, i.e. NaN,
- * unsupported, infinity, or denormal */
- unsigned char t = regs[stnr].tag; /* derived from the new
- * data */
- if ( /* (t == TW_Valid) || *** */ (t == TW_Zero))
- regs[stnr].tag = TW_NaN;
- } else
- regs[stnr].tag = tag;
- }
- control_word = saved_control;
- status_word = saved_status;
-
- /* We want no net effect: */
- FPU_data_address = (void *) (intptr_t) data_operand_offset;
-}
-
-
-unsigned short
-tag_word(void)
-{
- unsigned short word = 0;
- unsigned char tag;
- int i;
-
- for (i = 7; i >= 0; i--) {
- switch (tag = regs[i].tag) {
-#if 0 /* TW_Denormal is not used yet, and probably
- * won't be */
- case TW_Denormal:
-#endif
- case TW_Valid:
- if (regs[i].exp <= (EXP_BIAS - EXTENDED_Ebias))
- tag = 2;
- break;
- case TW_Infinity:
- case TW_NaN:
- tag = 2;
- break;
- case TW_Empty:
- tag = 3;
- break;
- /* TW_Valid and TW_Zero already have the correct value */
- }
- word <<= 2;
- word |= tag;
- }
- return word;
-}
-
-
-char *
-fstenv(void)
-{
- char *d = (char *) FPU_data_address;
-
-/* verify_area(VERIFY_WRITE, d, 28);*/
-
-#if 0 /****/
- *(unsigned short *) &cs_selector = fpu_cs;
- *(unsigned short *) &operand_selector = fpu_os;
-#endif /****/
-
- REENTRANT_CHECK(OFF);
- susword((unsigned short *) d, control_word);
- susword((unsigned short *) (d + 4), (status_word & ~SW_Top) | ((top & 7) << SW_Top_Shift));
- susword((unsigned short *) (d + 8), tag_word());
- suword((unsigned long *) (d + 0x0c), ip_offset);
- suword((unsigned long *) (d + 0x10), cs_selector);
- suword((unsigned long *) (d + 0x14), data_operand_offset);
- suword((unsigned long *) (d + 0x18), operand_selector);
- REENTRANT_CHECK(ON);
-
- return d + 0x1c;
-}
-
-
-void
-fsave(void)
-{
- char *d;
- FPU_REG tmp, *rp;
- int i;
- short e;
-
- d = fstenv();
-/* verify_area(VERIFY_WRITE, d, 80);*/
- for (i = 0; i < 8; i++) {
- /* Store each register in the order: st(0), st(1), ... */
- rp = &regs[(top + i) & 7];
-
- e = rp->exp - EXP_BIAS + EXTENDED_Ebias;
-
- if (rp->tag == TW_Valid) {
- if (e >= 0x7fff) {
- /* Overflow to infinity */
- REENTRANT_CHECK(OFF);
- suword((unsigned long *) (d + i * 10), 0);
- suword((unsigned long *) (d + i * 10 + 4), 0);
- REENTRANT_CHECK(ON);
- e = 0x7fff;
- } else
- if (e <= 0) {
- if (e > -63) {
- /* Make a de-normal */
- reg_move(rp, &tmp);
- tmp.exp += -EXTENDED_Emin + 63; /* largest exp to be 62 */
- round_to_int(&tmp);
- REENTRANT_CHECK(OFF);
- suword((unsigned long *) (d + i * 10), tmp.sigl);
- suword((unsigned long *) (d + i * 10 + 4), tmp.sigh);
- REENTRANT_CHECK(ON);
- } else {
- /* Underflow to zero */
- REENTRANT_CHECK(OFF);
- suword((unsigned long *) (d + i * 10), 0);
- suword((unsigned long *) (d + i * 10 + 4), 0);
- REENTRANT_CHECK(ON);
- }
- e = 0;
- } else {
- REENTRANT_CHECK(OFF);
- suword((unsigned long *) (d + i * 10), rp->sigl);
- suword((unsigned long *) (d + i * 10 + 4), rp->sigh);
- REENTRANT_CHECK(ON);
- }
- } else
- if (rp->tag == TW_Zero) {
- REENTRANT_CHECK(OFF);
- suword((unsigned long *) (d + i * 10), 0);
- suword((unsigned long *) (d + i * 10 + 4), 0);
- REENTRANT_CHECK(ON);
- e = 0;
- } else
- if (rp->tag == TW_Infinity) {
- REENTRANT_CHECK(OFF);
- suword((unsigned long *) (d + i * 10), 0);
- suword((unsigned long *) (d + i * 10 + 4), 0x80000000);
- REENTRANT_CHECK(ON);
- e = 0x7fff;
- } else
- if (rp->tag == TW_NaN) {
- REENTRANT_CHECK(OFF);
- suword((unsigned long *) (d + i * 10), rp->sigl);
- suword((unsigned long *) (d + i * 10 + 4), rp->sigh);
- REENTRANT_CHECK(ON);
- e = 0x7fff;
- } else
- if (rp->tag == TW_Empty) {
- /* just copy the reg */
- REENTRANT_CHECK(OFF);
- suword((unsigned long *) (d + i * 10), rp->sigl);
- suword((unsigned long *) (d + i * 10 + 4), rp->sigh);
- REENTRANT_CHECK(ON);
- }
- e |= rp->sign == SIGN_POS ? 0 : 0x8000;
- REENTRANT_CHECK(OFF);
- susword((unsigned short *) (d + i * 10 + 8), e);
- REENTRANT_CHECK(ON);
- }
-
- finit();
-
-}
-/*===========================================================================*/
diff --git a/sys/gnu/i386/fpemul/reg_mul.c b/sys/gnu/i386/fpemul/reg_mul.c
deleted file mode 100644
index 1b9cf2b..0000000
--- a/sys/gnu/i386/fpemul/reg_mul.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * reg_mul.c
- *
- * Multiply one FPU_REG by another, put the result in a destination FPU_REG.
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-/*---------------------------------------------------------------------------+
- | The destination may be any FPU_REG, including one of the source FPU_REGs. |
- +---------------------------------------------------------------------------*/
-
-#include <gnu/i386/fpemul/reg_constant.h>
-
-
-/* This routine must be called with non-empty source registers */
-void
-reg_mul(FPU_REG * a, FPU_REG * b, FPU_REG * dest, unsigned int control_w)
-{
- char sign = (a->sign ^ b->sign);
-
- if (!(a->tag | b->tag)) {
- /* This should be the most common case */
- reg_u_mul(a, b, dest, control_w);
- dest->sign = sign;
- return;
- } else
- if ((a->tag <= TW_Zero) && (b->tag <= TW_Zero)) {
-#ifdef DENORM_OPERAND
- if (((b->tag == TW_Valid) && (b->exp <= EXP_UNDER)) ||
- ((a->tag == TW_Valid) && (a->exp <= EXP_UNDER))) {
- if (denormal_operand())
- return;
- }
-#endif /* DENORM_OPERAND */
- /* Must have either both arguments == zero, or one
- * valid and the other zero. The result is therefore
- * zero. */
- reg_move(&CONST_Z, dest);
-#ifdef PECULIAR_486
- /* The 80486 book says that the answer is +0, but a
- * real 80486 appears to behave this way... */
- dest->sign = sign;
-#endif /* PECULIAR_486 */
- return;
- }
-#if 0 /* TW_Denormal is not used yet... perhaps
- * never will be. */
- else
- if ((a->tag <= TW_Denormal) && (b->tag <= TW_Denormal)) {
- /* One or both arguments are de-normalized */
- /* Internal de-normalized numbers are not
- * supported yet */
- EXCEPTION(EX_INTERNAL | 0x105);
- reg_move(&CONST_Z, dest);
- }
-#endif
- else {
- /* Must have infinities, NaNs, etc */
- if ((a->tag == TW_NaN) || (b->tag == TW_NaN)) {
- real_2op_NaN(a, b, dest);
- return;
- } else
- if (a->tag == TW_Infinity) {
- if (b->tag == TW_Zero) {
- arith_invalid(dest);
- return;
- }
- /* Zero*Infinity is invalid */
- else {
-#ifdef DENORM_OPERAND
- if ((b->tag == TW_Valid) && (b->exp <= EXP_UNDER) &&
- denormal_operand())
- return;
-#endif /* DENORM_OPERAND */
- reg_move(a, dest);
- dest->sign = sign;
- }
- return;
- } else
- if (b->tag == TW_Infinity) {
- if (a->tag == TW_Zero) {
- arith_invalid(dest);
- return;
- }
- /* Zero*Infinity is
- * invalid */
- else {
-#ifdef DENORM_OPERAND
- if ((a->tag == TW_Valid) && (a->exp <= EXP_UNDER) &&
- denormal_operand())
- return;
-#endif /* DENORM_OPERAND */
- reg_move(b, dest);
- dest->sign = sign;
- }
- return;
- }
-#ifdef PARANOID
- else {
- EXCEPTION(EX_INTERNAL | 0x102);
- }
-#endif /* PARANOID */
- }
-}
diff --git a/sys/gnu/i386/fpemul/reg_norm.s b/sys/gnu/i386/fpemul/reg_norm.s
deleted file mode 100644
index 40d6a1d..0000000
--- a/sys/gnu/i386/fpemul/reg_norm.s
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * reg_norm.s
- *
- * Normalize the value in a FPU_REG.
- *
- * Call from C as:
- * void normalize(FPU_REG *n)
- *
- * void normalize_nuo(FPU_REG *n)
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-
-#include <gnu/i386/fpemul/fpu_asm.h>
-
-
-.text
-
-ENTRY(normalize)
- pushl %ebp
- movl %esp,%ebp
- pushl %ebx
-
- movl PARAM1,%ebx
-
- movl SIGH(%ebx),%edx
- movl SIGL(%ebx),%eax
-
- orl %edx,%edx /* ms bits */
- js L_done /* Already normalized */
- jnz L_shift_1 /* Shift left 1 - 31 bits */
-
- orl %eax,%eax
- jz L_zero /* The contents are zero */
-
-/* L_shift_32: */
- movl %eax,%edx
- xorl %eax,%eax
- subl $32,EXP(%ebx) /* This can cause an underflow */
-
-/* We need to shift left by 1 - 31 bits */
-L_shift_1:
- bsrl %edx,%ecx /* get the required shift in %ecx */
- subl $31,%ecx
- negl %ecx
- shld %cl,%eax,%edx
- shl %cl,%eax
- subl %ecx,EXP(%ebx) /* This can cause an underflow */
-
- movl %edx,SIGH(%ebx)
- movl %eax,SIGL(%ebx)
-
-L_done:
- cmpl EXP_OVER,EXP(%ebx)
- jge L_overflow
-
- cmpl EXP_UNDER,EXP(%ebx)
- jle L_underflow
-
-L_exit:
- popl %ebx
- leave
- ret
-
-
-L_zero:
- movl EXP_UNDER,EXP(%ebx)
- movb TW_Zero,TAG(%ebx)
- jmp L_exit
-
-L_underflow:
- push %ebx
- call _arith_underflow
- pop %ebx
- jmp L_exit
-
-L_overflow:
- push %ebx
- call _arith_overflow
- pop %ebx
- jmp L_exit
-
-
-
-/* Normalise without reporting underflow or overflow */
-ENTRY(normalize_nuo)
- pushl %ebp
- movl %esp,%ebp
- pushl %ebx
-
- movl PARAM1,%ebx
-
- movl SIGH(%ebx),%edx
- movl SIGL(%ebx),%eax
-
- orl %edx,%edx /* ms bits */
- js L_exit /* Already normalized */
- jnz L_nuo_shift_1 /* Shift left 1 - 31 bits */
-
- orl %eax,%eax
- jz L_zero /* The contents are zero */
-
-/* L_nuo_shift_32: */
- movl %eax,%edx
- xorl %eax,%eax
- subl $32,EXP(%ebx) /* This can cause an underflow */
-
-/* We need to shift left by 1 - 31 bits */
-L_nuo_shift_1:
- bsrl %edx,%ecx /* get the required shift in %ecx */
- subl $31,%ecx
- negl %ecx
- shld %cl,%eax,%edx
- shl %cl,%eax
- subl %ecx,EXP(%ebx) /* This can cause an underflow */
-
- movl %edx,SIGH(%ebx)
- movl %eax,SIGL(%ebx)
- jmp L_exit
-
-
diff --git a/sys/gnu/i386/fpemul/reg_round.s b/sys/gnu/i386/fpemul/reg_round.s
deleted file mode 100644
index a01422f..0000000
--- a/sys/gnu/i386/fpemul/reg_round.s
+++ /dev/null
@@ -1,650 +0,0 @@
- .file "reg_round.S"
-/*
- * reg_round.S
- *
- * Rounding/truncation/etc for FPU basic arithmetic functions.
- *
- * This code has four possible entry points.
- * The following must be entered by a jmp intruction:
- * FPU_round, FPU_round_sqrt, and FPU_Arith_exit.
- *
- * The _round_reg entry point is intended to be used by C code.
- * From C, call as:
- * void round_reg(FPU_REG *arg, unsigned int extent, unsigned int control_w)
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-
-/*---------------------------------------------------------------------------+
- | Four entry points. |
- | |
- | Needed by both the FPU_round and FPU_round_sqrt entry points: |
- | %eax:%ebx 64 bit significand |
- | %edx 32 bit extension of the significand |
- | %edi pointer to an FPU_REG for the result to be stored |
- | stack calling function must have set up a C stack frame and |
- | pushed %esi, %edi, and %ebx |
- | |
- | Needed just for the FPU_round_sqrt entry point: |
- | %cx A control word in the same format as the FPU control word. |
- | Otherwise, PARAM4 must give such a value. |
- | |
- | |
- | The significand and its extension are assumed to be exact in the |
- | following sense: |
- | If the significand by itself is the exact result then the significand |
- | extension (%edx) must contain 0, otherwise the significand extension |
- | must be non-zero. |
- | If the significand extension is non-zero then the significand is |
- | smaller than the magnitude of the correct exact result by an amount |
- | greater than zero and less than one ls bit of the significand. |
- | The significand extension is only required to have three possible |
- | non-zero values: |
- | less than 0x80000000 <=> the significand is less than 1/2 an ls |
- | bit smaller than the magnitude of the |
- | true exact result. |
- | exactly 0x80000000 <=> the significand is exactly 1/2 an ls bit |
- | smaller than the magnitude of the true |
- | exact result. |
- | greater than 0x80000000 <=> the significand is more than 1/2 an ls |
- | bit smaller than the magnitude of the |
- | true exact result. |
- | |
- +---------------------------------------------------------------------------*/
-
-/*---------------------------------------------------------------------------+
- | The code in this module has become quite complex, but it should handle |
- | all of the FPU flags which are set at this stage of the basic arithmetic |
- | computations. |
- | There are a few rare cases where the results are not set identically to |
- | a real FPU. These require a bit more thought because at this stage the |
- | results of the code here appear to be more consistent... |
- | This may be changed in a future version. |
- +---------------------------------------------------------------------------*/
-
-
-#include <gnu/i386/fpemul/exception.h>
-#include <gnu/i386/fpemul/control_w.h>
-
-#define LOST_DOWN $1
-#define LOST_UP $2
-#define DENORMAL $1
-#define UNMASKED_UNDERFLOW $2
-
-.data
- ALIGN_DATA
-FPU_bits_lost:
- .byte 0
-FPU_denormal:
- .byte 0
-
-.text
-.globl FPU_round
-.globl FPU_round_sqrt
-.globl FPU_Arith_exit
-
-/* Entry point when called from C */
-ENTRY(round_reg)
- pushl %ebp
- movl %esp,%ebp
- pushl %esi
- pushl %edi
- pushl %ebx
-
- movl PARAM1,%edi
- movl SIGH(%edi),%eax
- movl SIGL(%edi),%ebx
- movl PARAM2,%edx
- movl PARAM3,%ecx
- jmp FPU_round_sqrt
-
-FPU_round: /* Normal entry point */
- movl PARAM4,%ecx
-
-FPU_round_sqrt: /* Entry point from wm_sqrt.S */
-
-#ifdef PARANOID
-/* Cannot use this here yet */
-/* orl %eax,%eax */
-/* jns L_entry_bugged */
-#endif PARANOID
-
- cmpl EXP_UNDER,EXP(%edi)
- jle xMake_denorm /* The number is a de-normal*/
-
- movb $0,FPU_denormal /* 0 -> not a de-normal*/
-
-xDenorm_done:
- movb $0,FPU_bits_lost /*No bits yet lost in rounding*/
-
- movl %ecx,%esi
- andl CW_PC,%ecx
- cmpl PR_64_BITS,%ecx
- je LRound_To_64
-
- cmpl PR_53_BITS,%ecx
- je LRound_To_53
-
- cmpl PR_24_BITS,%ecx
- je LRound_To_24
-
-#ifdef PARANOID
- jmp L_bugged /* There is no bug, just a bad control word */
-#endif PARANOID
-
-
-/* Round etc to 24 bit precision */
-LRound_To_24:
- movl %esi,%ecx
- andl CW_RC,%ecx
- cmpl RC_RND,%ecx
- je LRound_nearest_24
-
- cmpl RC_CHOP,%ecx
- je LCheck_truncate_24
-
- cmpl RC_UP,%ecx /* Towards +infinity */
- je LUp_24
-
- cmpl RC_DOWN,%ecx /* Towards -infinity */
- je LDown_24
-
-#ifdef PARANOID
- jmp L_bugged
-#endif PARANOID
-
-LUp_24:
- cmpb SIGN_POS,SIGN(%edi)
- jne LCheck_truncate_24 /* If negative then up==truncate */
-
- jmp LCheck_24_round_up
-
-LDown_24:
- cmpb SIGN_POS,SIGN(%edi)
- je LCheck_truncate_24 /* If positive then down==truncate */
-
-LCheck_24_round_up:
- movl %eax,%ecx
- andl $0x000000ff,%ecx
- orl %ebx,%ecx
- orl %edx,%ecx
- jnz LDo_24_round_up
- jmp LRe_normalise
-
-LRound_nearest_24:
- /* Do rounding of the 24th bit if needed (nearest or even) */
- movl %eax,%ecx
- andl $0x000000ff,%ecx
- cmpl $0x00000080,%ecx
- jc LCheck_truncate_24 /*less than half, no increment needed*/
-
- jne LGreater_Half_24 /* greater than half, increment needed*/
-
- /* Possibly half, we need to check the ls bits */
- orl %ebx,%ebx
- jnz LGreater_Half_24 /* greater than half, increment needed*/
-
- orl %edx,%edx
- jnz LGreater_Half_24 /* greater than half, increment needed*/
-
- /* Exactly half, increment only if 24th bit is 1 (round to even)*/
- testl $0x00000100,%eax
- jz LDo_truncate_24
-
-LGreater_Half_24: /*Rounding: increment at the 24th bit*/
-LDo_24_round_up:
- andl $0xffffff00,%eax /*Truncate to 24 bits*/
- xorl %ebx,%ebx
- movb LOST_UP,FPU_bits_lost
- addl $0x00000100,%eax
- jmp LCheck_Round_Overflow
-
-LCheck_truncate_24:
- movl %eax,%ecx
- andl $0x000000ff,%ecx
- orl %ebx,%ecx
- orl %edx,%ecx
- jz LRe_normalise /* No truncation needed*/
-
-LDo_truncate_24:
- andl $0xffffff00,%eax /* Truncate to 24 bits*/
- xorl %ebx,%ebx
- movb LOST_DOWN,FPU_bits_lost
- jmp LRe_normalise
-
-
-/* Round etc to 53 bit precision */
-LRound_To_53:
- movl %esi,%ecx
- andl CW_RC,%ecx
- cmpl RC_RND,%ecx
- je LRound_nearest_53
-
- cmpl RC_CHOP,%ecx
- je LCheck_truncate_53
-
- cmpl RC_UP,%ecx /* Towards +infinity*/
- je LUp_53
-
- cmpl RC_DOWN,%ecx /* Towards -infinity*/
- je LDown_53
-
-#ifdef PARANOID
- jmp L_bugged
-#endif PARANOID
-
-LUp_53:
- cmpb SIGN_POS,SIGN(%edi)
- jne LCheck_truncate_53 /* If negative then up==truncate*/
-
- jmp LCheck_53_round_up
-
-LDown_53:
- cmpb SIGN_POS,SIGN(%edi)
- je LCheck_truncate_53 /* If positive then down==truncate*/
-
-LCheck_53_round_up:
- movl %ebx,%ecx
- andl $0x000007ff,%ecx
- orl %edx,%ecx
- jnz LDo_53_round_up
- jmp LRe_normalise
-
-LRound_nearest_53:
- /*Do rounding of the 53rd bit if needed (nearest or even)*/
- movl %ebx,%ecx
- andl $0x000007ff,%ecx
- cmpl $0x00000400,%ecx
- jc LCheck_truncate_53 /* less than half, no increment needed*/
-
- jnz LGreater_Half_53 /* greater than half, increment needed*/
-
- /*Possibly half, we need to check the ls bits*/
- orl %edx,%edx
- jnz LGreater_Half_53 /* greater than half, increment needed*/
-
- /* Exactly half, increment only if 53rd bit is 1 (round to even)*/
- testl $0x00000800,%ebx
- jz LTruncate_53
-
-LGreater_Half_53: /*Rounding: increment at the 53rd bit*/
-LDo_53_round_up:
- movb LOST_UP,FPU_bits_lost
- andl $0xfffff800,%ebx /* Truncate to 53 bits*/
- addl $0x00000800,%ebx
- adcl $0,%eax
- jmp LCheck_Round_Overflow
-
-LCheck_truncate_53:
- movl %ebx,%ecx
- andl $0x000007ff,%ecx
- orl %edx,%ecx
- jz LRe_normalise
-
-LTruncate_53:
- movb LOST_DOWN,FPU_bits_lost
- andl $0xfffff800,%ebx /* Truncate to 53 bits*/
- jmp LRe_normalise
-
-
-/* Round etc to 64 bit precision*/
-LRound_To_64:
- movl %esi,%ecx
- andl CW_RC,%ecx
- cmpl RC_RND,%ecx
- je LRound_nearest_64
-
- cmpl RC_CHOP,%ecx
- je LCheck_truncate_64
-
- cmpl RC_UP,%ecx /* Towards +infinity*/
- je LUp_64
-
- cmpl RC_DOWN,%ecx /* Towards -infinity*/
- je LDown_64
-
-#ifdef PARANOID
- jmp L_bugged
-#endif PARANOID
-
-LUp_64:
- cmpb SIGN_POS,SIGN(%edi)
- jne LCheck_truncate_64 /* If negative then up==truncate*/
-
- orl %edx,%edx
- jnz LDo_64_round_up
- jmp LRe_normalise
-
-LDown_64:
- cmpb SIGN_POS,SIGN(%edi)
- je LCheck_truncate_64 /*If positive then down==truncate*/
-
- orl %edx,%edx
- jnz LDo_64_round_up
- jmp LRe_normalise
-
-LRound_nearest_64:
- cmpl $0x80000000,%edx
- jc LCheck_truncate_64
-
- jne LDo_64_round_up
-
- /* Now test for round-to-even */
- testb $1,%ebx
- jz LCheck_truncate_64
-
-LDo_64_round_up:
- movb LOST_UP,FPU_bits_lost
- addl $1,%ebx
- adcl $0,%eax
-
-LCheck_Round_Overflow:
- jnc LRe_normalise /* Rounding done, no overflow */
-
- /* Overflow, adjust the result (to 1.0) */
- rcrl $1,%eax
- rcrl $1,%ebx
- incl EXP(%edi)
- jmp LRe_normalise
-
-LCheck_truncate_64:
- orl %edx,%edx
- jz LRe_normalise
-
-LTruncate_64:
- movb LOST_DOWN,FPU_bits_lost
-
-LRe_normalise:
- testb $0xff,FPU_denormal
- jnz xNormalise_result
-
-xL_Normalised:
- cmpb LOST_UP,FPU_bits_lost
- je xL_precision_lost_up
-
- cmpb LOST_DOWN,FPU_bits_lost
- je xL_precision_lost_down
-
-xL_no_precision_loss:
- cmpl EXP_OVER,EXP(%edi)
- jge L_overflow
-
- /* store the result */
- movb TW_Valid,TAG(%edi)
-
-xL_Store_significand:
- movl %eax,SIGH(%edi)
- movl %ebx,SIGL(%edi)
-
-FPU_Arith_exit:
- popl %ebx
- popl %edi
- popl %esi
- leave
- ret
-
-
-/* Set the FPU status flags to represent precision loss due to*/
-/* round-up.*/
-xL_precision_lost_up:
- push %eax
- call _set_precision_flag_up
- popl %eax
- jmp xL_no_precision_loss
-
-/* Set the FPU status flags to represent precision loss due to*/
-/* truncation.*/
-xL_precision_lost_down:
- push %eax
- call _set_precision_flag_down
- popl %eax
- jmp xL_no_precision_loss
-
-
-/* The number is a denormal (which might get rounded up to a normal)
-// Shift the number right the required number of bits, which will
-// have to be undone later...*/
-xMake_denorm:
- /* The action to be taken depends upon whether the underflow
- // exception is masked*/
- testb CW_Underflow,%cl /* Underflow mask.*/
- jz xUnmasked_underflow /* Do not make a denormal.*/
-
- movb DENORMAL,FPU_denormal
-
- pushl %ecx /* Save*/
- movl EXP(%edi),%ecx
- subl EXP_UNDER+1,%ecx
- negl %ecx
-
- cmpl $64,%ecx /* shrd only works for 0..31 bits */
- jnc xDenorm_shift_more_than_63
-
- cmpl $32,%ecx /* shrd only works for 0..31 bits */
- jnc xDenorm_shift_more_than_32
-
-/* We got here without jumps by assuming that the most common requirement
-// is for a small de-normalising shift.
-// Shift by [1..31] bits */
- addl %ecx,EXP(%edi)
- orl %edx,%edx /* extension*/
- setne %ch
- xorl %edx,%edx
- shrd %cl,%ebx,%edx
- shrd %cl,%eax,%ebx
- shr %cl,%eax
- orb %ch,%dl
- popl %ecx
- jmp xDenorm_done
-
-/* Shift by [32..63] bits*/
-xDenorm_shift_more_than_32:
- addl %ecx,EXP(%edi)
- subb $32,%cl
- orl %edx,%edx
- setne %ch
- orb %ch,%bl
- xorl %edx,%edx
- shrd %cl,%ebx,%edx
- shrd %cl,%eax,%ebx
- shr %cl,%eax
- orl %edx,%edx /*test these 32 bits*/
- setne %cl
- orb %ch,%bl
- orb %cl,%bl
- movl %ebx,%edx
- movl %eax,%ebx
- xorl %eax,%eax
- popl %ecx
- jmp xDenorm_done
-
-/* Shift by [64..) bits*/
-xDenorm_shift_more_than_63:
- cmpl $64,%ecx
- jne xDenorm_shift_more_than_64
-
-/* Exactly 64 bit shift*/
- addl %ecx,EXP(%edi)
- xorl %ecx,%ecx
- orl %edx,%edx
- setne %cl
- orl %ebx,%ebx
- setne %ch
- orb %ch,%cl
- orb %cl,%al
- movl %eax,%edx
- xorl %eax,%eax
- xorl %ebx,%ebx
- popl %ecx
- jmp xDenorm_done
-
-xDenorm_shift_more_than_64:
- movl EXP_UNDER+1,EXP(%edi)
-/* This is easy, %eax must be non-zero, so..*/
- movl $1,%edx
- xorl %eax,%eax
- xorl %ebx,%ebx
- popl %ecx
- jmp xDenorm_done
-
-
-xUnmasked_underflow:
- /* Increase the exponent by the magic number*/
- addl $(3*(1<<13)),EXP(%edi)
- movb UNMASKED_UNDERFLOW,FPU_denormal
- jmp xDenorm_done
-
-
-/* Undo the de-normalisation.*/
-xNormalise_result:
- cmpb UNMASKED_UNDERFLOW,FPU_denormal
- je xSignal_underflow
-
-/* The number must be a denormal if we got here.*/
-#ifdef PARANOID
- /* But check it... just in case.*/
- cmpl EXP_UNDER+1,EXP(%edi)
- jne L_norm_bugged
-#endif PARANOID
-
- orl %eax,%eax /* ms bits*/
- jnz LNormalise_shift_up_to_31 /* Shift left 0 - 31 bits*/
-
- orl %ebx,%ebx
- jz L_underflow_to_zero /* The contents are zero*/
-
-/* Shift left 32 - 63 bits*/
- movl %ebx,%eax
- xorl %ebx,%ebx
- subl $32,EXP(%edi)
-
-LNormalise_shift_up_to_31:
- bsrl %eax,%ecx /* get the required shift in %ecx */
- subl $31,%ecx
- negl %ecx
- shld %cl,%ebx,%eax
- shl %cl,%ebx
- subl %ecx,EXP(%edi)
-
-LNormalise_shift_done:
- testb $0xff,FPU_bits_lost /* bits lost == underflow*/
- jz xL_Normalised
-
- /* There must be a masked underflow*/
- push %eax
- pushl EX_Underflow
- call _exception
- popl %eax
- popl %eax
- jmp xL_Normalised
-
-
-/* The operations resulted in a number too small to represent.
-// Masked response.*/
-L_underflow_to_zero:
- push %eax
- call _set_precision_flag_down
- popl %eax
-
- push %eax
- pushl EX_Underflow
- call _exception
- popl %eax
- popl %eax
-
- movb TW_Zero,TAG(%edi)
- jmp xL_Store_significand
-
-
-/* The operations resulted in a number too large to represent.*/
-L_overflow:
- push %edi
- call _arith_overflow
- pop %edi
- jmp FPU_Arith_exit
-
-
-xSignal_underflow:
- push %eax
- pushl EX_Underflow
- call EXCEPTION
- popl %eax
- popl %eax
- jmp xL_Normalised
-
-
-#ifdef PARANOID
-/* If we ever get here then we have problems! */
-L_bugged:
- pushl EX_INTERNAL|0x201
- call EXCEPTION
- popl %ebx
- jmp FPU_Arith_exit
-
-L_norm_bugged:
- pushl EX_INTERNAL|0x216
- call EXCEPTION
- popl %ebx
- jmp FPU_Arith_exit
-
-L_entry_bugged:
- pushl EX_INTERNAL|0x217
- call EXCEPTION
- popl %ebx
- jmp FPU_Arith_exit
-#endif PARANOID
diff --git a/sys/gnu/i386/fpemul/reg_u_add.s b/sys/gnu/i386/fpemul/reg_u_add.s
deleted file mode 100644
index fb70809..0000000
--- a/sys/gnu/i386/fpemul/reg_u_add.s
+++ /dev/null
@@ -1,240 +0,0 @@
- .file "reg_u_add.S"
-/*
- * reg_u_add.S
- *
- * Add two valid (TW_Valid) FPU_REG numbers, of the same sign, and put the
- * result in a destination FPU_REG.
- *
- * Call from C as:
- * void reg_u_add(FPU_REG *arg1, FPU_REG *arg2, FPU_REG *answ,
- * int control_w)
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-
-/*
- | Kernel addition routine reg_u_add(reg *arg1, reg *arg2, reg *answ).
- | Takes two valid reg f.p. numbers (TW_Valid), which are
- | treated as unsigned numbers,
- | and returns their sum as a TW_Valid or TW_S f.p. number.
- | The returned number is normalized.
- | Basic checks are performed if PARANOID is defined.
- */
-
-#include <gnu/i386/fpemul/fpu_asm.h>
-
-.text
-ENTRY(reg_u_add)
- pushl %ebp
- movl %esp,%ebp
-/* subl $16,%esp*/
- pushl %esi
- pushl %edi
- pushl %ebx
-
- movl PARAM1,%esi /* source 1 */
- movl PARAM2,%edi /* source 2 */
-
-#ifdef DENORM_OPERAND
- cmpl EXP_UNDER,EXP(%esi)
- jg xOp1_not_denorm
-
- call _denormal_operand
- orl %eax,%eax
- jnz FPU_Arith_exit
-
-xOp1_not_denorm:
- cmpl EXP_UNDER,EXP(%edi)
- jg xOp2_not_denorm
-
- call _denormal_operand
- orl %eax,%eax
- jnz FPU_Arith_exit
-
-xOp2_not_denorm:
-#endif DENORM_OPERAND
-
-/* xorl %ecx,%ecx*/
- movl EXP(%esi),%ecx
- subl EXP(%edi),%ecx /* exp1 - exp2 */
-/* jnc L_arg1_larger*/
- jge L_arg1_larger
-
- /* num1 is smaller */
- movl SIGL(%esi),%ebx
- movl SIGH(%esi),%eax
-
- movl %edi,%esi
- negw %cx
- jmp L_accum_loaded
-
-L_arg1_larger:
- /* num1 has larger or equal exponent */
- movl SIGL(%edi),%ebx
- movl SIGH(%edi),%eax
-
-L_accum_loaded:
- movl PARAM3,%edi /* destination */
- movb SIGN(%esi),%dl
- movb %dl,SIGN(%edi) /* Copy the sign from the first arg */
-
-
- movl EXP(%esi),%edx
- movl %edx,EXP(%edi) /* Copy exponent to destination */
-
- xorl %edx,%edx /* clear the extension */
-
-#ifdef PARANOID
- testl $0x80000000,%eax
- je L_bugged
-
- testl $0x80000000,SIGH(%esi)
- je L_bugged
-#endif PARANOID
-
-/* The number to be shifted is in %eax:%ebx:%edx*/
- cmpw $32,%cx /* shrd only works for 0..31 bits */
- jnc L_more_than_31
-
-/* less than 32 bits */
- shrd %cl,%ebx,%edx
- shrd %cl,%eax,%ebx
- shr %cl,%eax
- jmp L_shift_done
-
-L_more_than_31:
- cmpw $64,%cx
- jnc L_more_than_63
-
- subb $32,%cl
- jz L_exactly_32
-
- shrd %cl,%eax,%edx
- shr %cl,%eax
- orl %ebx,%ebx
- jz L_more_31_no_low /* none of the lowest bits is set*/
-
- orl $1,%edx /* record the fact in the extension*/
-
-L_more_31_no_low:
- movl %eax,%ebx
- xorl %eax,%eax
- jmp L_shift_done
-
-L_exactly_32:
- movl %ebx,%edx
- movl %eax,%ebx
- xorl %eax,%eax
- jmp L_shift_done
-
-L_more_than_63:
- cmpw $65,%cx
- jnc L_more_than_64
-
- movl %eax,%edx
- orl %ebx,%ebx
- jz L_more_63_no_low
-
- orl $1,%edx
- jmp L_more_63_no_low
-
-L_more_than_64:
- movl $1,%edx /* The shifted nr always at least one '1'*/
-
-L_more_63_no_low:
- xorl %ebx,%ebx
- xorl %eax,%eax
-
-L_shift_done:
- /* Now do the addition */
- addl SIGL(%esi),%ebx
- adcl SIGH(%esi),%eax
- jnc L_round_the_result
-
- /* Overflow, adjust the result */
- rcrl $1,%eax
- rcrl $1,%ebx
- rcrl $1,%edx
- jnc L_no_bit_lost
-
- orl $1,%edx
-
-L_no_bit_lost:
- incl EXP(%edi)
-
-L_round_the_result:
- jmp FPU_round /* Round the result*/
-
-
-
-#ifdef PARANOID
-/* If we ever get here then we have problems! */
-L_bugged:
- pushl EX_INTERNAL|0x201
- call EXCEPTION
- pop %ebx
- jmp L_exit
-#endif PARANOID
-
-
-L_exit:
- popl %ebx
- popl %edi
- popl %esi
- leave
- ret
diff --git a/sys/gnu/i386/fpemul/reg_u_div.s b/sys/gnu/i386/fpemul/reg_u_div.s
deleted file mode 100644
index 8a7c234..0000000
--- a/sys/gnu/i386/fpemul/reg_u_div.s
+++ /dev/null
@@ -1,501 +0,0 @@
- .file "reg_u_div.S"
-/*
- * reg_u_div.S
- *
- * Core division routines
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-/*---------------------------------------------------------------------------+
- | Kernel for the division routines. |
- | |
- | void reg_u_div(FPU_REG *a, FPU_REG *a, |
- | FPU_REG *dest, unsigned int control_word) |
- | |
- | Does not compute the destination exponent, but does adjust it. |
- +---------------------------------------------------------------------------*/
-
-#include <gnu/i386/fpemul/fpu_asm.h>
-
-
-/* #define dSIGL(x) (x) */
-/* #define dSIGH(x) 4(x) */
-
-
-.data
-/*
- Local storage:
- Result: accum_3:accum_2:accum_1:accum_0
- Overflow flag: ovfl_flag
- */
- ALIGN_DATA
-accum_3:
- .long 0
-accum_2:
- .long 0
-accum_1:
- .long 0
-accum_0:
- .long 0
-result_1:
- .long 0
-result_2:
- .long 0
-ovfl_flag:
- .byte 0
-
-
-.text
-
-.globl _divide_kernel
-
-ENTRY(reg_u_div)
- pushl %ebp
- movl %esp,%ebp
-
- pushl %esi
- pushl %edi
- pushl %ebx
-
- movl PARAM1,%esi /* pointer to num */
- movl PARAM2,%ebx /* pointer to denom */
- movl PARAM3,%edi /* pointer to answer */
-
-#ifdef DENORM_OPERAND
- movl EXP(%esi),%eax
- cmpl EXP_UNDER,%eax
- jg xOp1_not_denorm
-
- call _denormal_operand
- orl %eax,%eax
- jnz FPU_Arith_exit
-
-xOp1_not_denorm:
- movl EXP(%ebx),%eax
- cmpl EXP_UNDER,%eax
- jg xOp2_not_denorm
-
- call _denormal_operand
- orl %eax,%eax
- jnz FPU_Arith_exit
-
-xOp2_not_denorm:
-#endif DENORM_OPERAND
-
-_divide_kernel:
-#ifdef PARANOID
-/* testl $0x80000000, SIGH(%esi) *//* Dividend */
-/* je L_bugged */
- testl $0x80000000, SIGH(%ebx) /* Divisor*/
- je L_bugged
-#endif PARANOID
-
-/* Check if the divisor can be treated as having just 32 bits */
- cmpl $0,SIGL(%ebx)
- jnz L_Full_Division /* Can't do a quick divide */
-
-/* We should be able to zip through the division here */
- movl SIGH(%ebx),%ecx /* The divisor */
- movl SIGH(%esi),%edx /* Dividend */
- movl SIGL(%esi),%eax /* Dividend */
-
- cmpl %ecx,%edx
- setaeb ovfl_flag /* Keep a record */
- jb L_no_adjust
-
- subl %ecx,%edx /* Prevent the overflow */
-
-L_no_adjust:
- /* Divide the 64 bit number by the 32 bit denominator */
- divl %ecx
- movl %eax,result_2
-
- /* Work on the remainder of the first division */
- xorl %eax,%eax
- divl %ecx
- movl %eax,result_1
-
- /* Work on the remainder of the 64 bit division */
- xorl %eax,%eax
- divl %ecx
-
- testb $255,ovfl_flag /* was the num > denom ? */
- je L_no_overflow
-
- /* Do the shifting here */
- /* increase the exponent */
- incl EXP(%edi)
-
- /* shift the mantissa right one bit */
- stc /* To set the ms bit */
- rcrl result_2
- rcrl result_1
- rcrl %eax
-
-L_no_overflow:
- jmp LRound_precision /* Do the rounding as required*/
-
-
-/*---------------------------------------------------------------------------+
- | Divide: Return arg1/arg2 to arg3. |
- | |
- | This routine does not use the exponents of arg1 and arg2, but does |
- | adjust the exponent of arg3. |
- | |
- | The maximum returned value is (ignoring exponents) |
- | .ffffffff ffffffff |
- | ------------------ = 1.ffffffff fffffffe |
- | .80000000 00000000 |
- | and the minimum is |
- | .80000000 00000000 |
- | ------------------ = .80000000 00000001 (rounded) |
- | .ffffffff ffffffff |
- | |
- +---------------------------------------------------------------------------*/
-
-
-L_Full_Division:
- /* Save extended dividend in local register*/
- movl SIGL(%esi),%eax
- movl %eax,accum_2
- movl SIGH(%esi),%eax
- movl %eax,accum_3
- xorl %eax,%eax
- movl %eax,accum_1 /* zero the extension */
- movl %eax,accum_0 /* zero the extension */
-
- movl SIGL(%esi),%eax /* Get the current num */
- movl SIGH(%esi),%edx
-
-/*----------------------------------------------------------------------*/
-/* Initialization done */
-/* Do the first 32 bits */
-
- movb $0,ovfl_flag
- cmpl SIGH(%ebx),%edx /* Test for imminent overflow */
- jb LLess_than_1
- ja LGreater_than_1
-
- cmpl SIGL(%ebx),%eax
- jb LLess_than_1
-
-LGreater_than_1:
-/* The dividend is greater or equal, would cause overflow */
- setaeb ovfl_flag /* Keep a record */
-
- subl SIGL(%ebx),%eax
- sbbl SIGH(%ebx),%edx /* Prevent the overflow */
- movl %eax,accum_2
- movl %edx,accum_3
-
-LLess_than_1:
-/* At this point, we have a dividend < divisor, with a record of
- adjustment in ovfl_flag */
-
- /* We will divide by a number which is too large */
- movl SIGH(%ebx),%ecx
- addl $1,%ecx
- jnc LFirst_div_not_1
-
- /* here we need to divide by 100000000h,
- i.e., no division at all.. */
- mov %edx,%eax
- jmp LFirst_div_done
-
-LFirst_div_not_1:
- divl %ecx /* Divide the numerator by the augmented
- denom ms dw */
-
-LFirst_div_done:
- movl %eax,result_2 /* Put the result in the answer */
-
- mull SIGH(%ebx) /* mul by the ms dw of the denom */
-
- subl %eax,accum_2 /* Subtract from the num local reg */
- sbbl %edx,accum_3
-
- movl result_2,%eax /* Get the result back */
- mull SIGL(%ebx) /* now mul the ls dw of the denom */
-
- subl %eax,accum_1 /* Subtract from the num local reg */
- sbbl %edx,accum_2
- sbbl $0,accum_3
- je LDo_2nd_32_bits /* Must check for non-zero result here */
-
-#ifdef PARANOID
- jb L_bugged_1
-#endif PARANOID
-
- /* need to subtract another once of the denom */
- incl result_2 /* Correct the answer */
-
- movl SIGL(%ebx),%eax
- movl SIGH(%ebx),%edx
- subl %eax,accum_1 /* Subtract from the num local reg */
- sbbl %edx,accum_2
-
-#ifdef PARANOID
- sbbl $0,accum_3
- jne L_bugged_1 /* Must check for non-zero result here */
-#endif PARANOID
-
-/*----------------------------------------------------------------------*/
-/* Half of the main problem is done, there is just a reduced numerator
- to handle now */
-/* Work with the second 32 bits, accum_0 not used from now on */
-LDo_2nd_32_bits:
- movl accum_2,%edx /* get the reduced num */
- movl accum_1,%eax
-
- /* need to check for possible subsequent overflow */
- cmpl SIGH(%ebx),%edx
- jb LDo_2nd_div
- ja LPrevent_2nd_overflow
-
- cmpl SIGL(%ebx),%eax
- jb LDo_2nd_div
-
-LPrevent_2nd_overflow:
-/* The numerator is greater or equal, would cause overflow */
- /* prevent overflow */
- subl SIGL(%ebx),%eax
- sbbl SIGH(%ebx),%edx
- movl %edx,accum_2
- movl %eax,accum_1
-
- incl result_2 /* Reflect the subtraction in the answer */
-
-#ifdef PARANOID
- je L_bugged_2 /* Can't bump the result to 1.0 */
-#endif PARANOID
-
-LDo_2nd_div:
- cmpl $0,%ecx /* augmented denom msw*/
- jnz LSecond_div_not_1
-
- /* %ecx == 0, we are dividing by 1.0 */
- mov %edx,%eax
- jmp LSecond_div_done
-
-LSecond_div_not_1:
- divl %ecx /* Divide the numerator by the denom ms dw */
-
-LSecond_div_done:
- movl %eax,result_1 /* Put the result in the answer */
-
- mull SIGH(%ebx) /* mul by the ms dw of the denom */
-
- subl %eax,accum_1 /* Subtract from the num local reg */
- sbbl %edx,accum_2
-
-#ifdef PARANOID
- jc L_bugged_2
-#endif PARANOID
-
- movl result_1,%eax /* Get the result back */
- mull SIGL(%ebx) /* now mul the ls dw of the denom */
-
- subl %eax,accum_0 /* Subtract from the num local reg */
- sbbl %edx,accum_1 /* Subtract from the num local reg */
- sbbl $0,accum_2
-
-#ifdef PARANOID
- jc L_bugged_2
-#endif PARANOID
-
- jz LDo_3rd_32_bits
-
-#ifdef PARANOID
- cmpl $1,accum_2
- jne L_bugged_2
-#endif PARANOID
-
- /* need to subtract another once of the denom */
- movl SIGL(%ebx),%eax
- movl SIGH(%ebx),%edx
- subl %eax,accum_0 /* Subtract from the num local reg */
- sbbl %edx,accum_1
- sbbl $0,accum_2
-
-#ifdef PARANOID
- jc L_bugged_2
- jne L_bugged_2
-#endif PARANOID
-
- addl $1,result_1 /* Correct the answer */
- adcl $0,result_2
-
-#ifdef PARANOID
- jc L_bugged_2 /* Must check for non-zero result here */
-#endif PARANOID
-
-/*----------------------------------------------------------------------*/
-/* The division is essentially finished here, we just need to perform
- tidying operations. */
-/* deal with the 3rd 32 bits */
-LDo_3rd_32_bits:
- movl accum_1,%edx /* get the reduced num */
- movl accum_0,%eax
-
- /* need to check for possible subsequent overflow */
- cmpl SIGH(%ebx),%edx /* denom*/
- jb LRound_prep
- ja LPrevent_3rd_overflow
-
- cmpl SIGL(%ebx),%eax /* denom */
- jb LRound_prep
-
-LPrevent_3rd_overflow:
- /* prevent overflow */
- subl SIGL(%ebx),%eax
- sbbl SIGH(%ebx),%edx
- movl %edx,accum_1
- movl %eax,accum_0
-
- addl $1,result_1 /* Reflect the subtraction in the answer */
- adcl $0,result_2
- jne LRound_prep
- jnc LRound_prep
-
- /* This is a tricky spot, there is an overflow of the answer */
- movb $255,ovfl_flag /* Overflow -> 1.000 */
-
-LRound_prep:
-/* Prepare for rounding.
-// To test for rounding, we just need to compare 2*accum with the
-// denom. */
- movl accum_0,%ecx
- movl accum_1,%edx
- movl %ecx,%eax
- orl %edx,%eax
- jz LRound_ovfl /* The accumulator contains zero.*/
-
- /* Multiply by 2 */
- clc
- rcll $1,%ecx
- rcll $1,%edx
- jc LRound_large /* No need to compare, denom smaller */
-
- subl SIGL(%ebx),%ecx
- sbbl SIGH(%ebx),%edx
- jnc LRound_not_small
-
- movl $0x70000000,%eax /* Denom was larger */
- jmp LRound_ovfl
-
-LRound_not_small:
- jnz LRound_large
-
- movl $0x80000000,%eax /* Remainder was exactly 1/2 denom */
- jmp LRound_ovfl
-
-LRound_large:
- movl $0xff000000,%eax /* Denom was smaller */
-
-LRound_ovfl:
-/* We are now ready to deal with rounding, but first we must get
- the bits properly aligned */
- testb $255,ovfl_flag /* was the num > denom ? */
- je LRound_precision
-
- incl EXP(%edi)
-
- /* shift the mantissa right one bit */
- stc /* Will set the ms bit */
- rcrl result_2
- rcrl result_1
- rcrl %eax
-
-/* Round the result as required */
-LRound_precision:
- decl EXP(%edi) /* binary point between 1st & 2nd bits */
-
- movl %eax,%edx
- movl result_1,%ebx
- movl result_2,%eax
- jmp FPU_round
-
-
-#ifdef PARANOID
-/* The logic is wrong if we got here */
-L_bugged:
- pushl EX_INTERNAL|0x202
- call EXCEPTION
- pop %ebx
- jmp L_exit
-
-L_bugged_1:
- pushl EX_INTERNAL|0x203
- call EXCEPTION
- pop %ebx
- jmp L_exit
-
-L_bugged_2:
- pushl EX_INTERNAL|0x204
- call EXCEPTION
- pop %ebx
- jmp L_exit
-
-L_exit:
- popl %ebx
- popl %edi
- popl %esi
-
- leave
- ret
-#endif PARANOID
diff --git a/sys/gnu/i386/fpemul/reg_u_mul.s b/sys/gnu/i386/fpemul/reg_u_mul.s
deleted file mode 100644
index 4ce893c..0000000
--- a/sys/gnu/i386/fpemul/reg_u_mul.s
+++ /dev/null
@@ -1,194 +0,0 @@
- .file "reg_u_mul.S"
-/*
- * reg_u_mul.S
- *
- * Core multiplication routine
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-/*---------------------------------------------------------------------------+
- | Basic multiplication routine. |
- | Does not check the resulting exponent for overflow/underflow |
- | |
- | reg_u_mul(FPU_REG *a, FPU_REG *b, FPU_REG *c, unsigned int cw); |
- | |
- | Internal working is at approx 128 bits. |
- | Result is rounded to nearest 53 or 64 bits, using "nearest or even". |
- +---------------------------------------------------------------------------*/
-
-#include <gnu/i386/fpemul/fpu_asm.h>
-
-
-.data
- ALIGN_DATA
-accum_0:
- .long 0
-accum_1:
- .long 0
-
-
-.text
-ENTRY(reg_u_mul)
- pushl %ebp
- movl %esp,%ebp
- pushl %esi
- pushl %edi
- pushl %ebx
-
- movl PARAM1,%esi
- movl PARAM2,%edi
-
-#ifdef PARANOID
- testl $0x80000000,SIGH(%esi)
- jz L_bugged
- testl $0x80000000,SIGH(%edi)
- jz L_bugged
-#endif PARANOID
-
-#ifdef DENORM_OPERAND
- movl EXP(%esi),%eax
- cmpl EXP_UNDER,%eax
- jg xOp1_not_denorm
-
- call _denormal_operand
- orl %eax,%eax
- jnz FPU_Arith_exit
-
-xOp1_not_denorm:
- movl EXP(%edi),%eax
- cmpl EXP_UNDER,%eax
- jg xOp2_not_denorm
-
- call _denormal_operand
- orl %eax,%eax
- jnz FPU_Arith_exit
-
-xOp2_not_denorm:
-#endif DENORM_OPERAND
-
- xorl %ecx,%ecx
- xorl %ebx,%ebx
-
- movl SIGL(%esi),%eax
- mull SIGL(%edi)
- movl %eax,accum_0
- movl %edx,accum_1
-
- movl SIGL(%esi),%eax
- mull SIGH(%edi)
- addl %eax,accum_1
- adcl %edx,%ebx
-/* adcl $0,%ecx *//* overflow here is not possible */
-
- movl SIGH(%esi),%eax
- mull SIGL(%edi)
- addl %eax,accum_1
- adcl %edx,%ebx
- adcl $0,%ecx
-
- movl SIGH(%esi),%eax
- mull SIGH(%edi)
- addl %eax,%ebx
- adcl %edx,%ecx
-
- movl EXP(%esi),%eax /* Compute the exponent */
- addl EXP(%edi),%eax
- subl EXP_BIAS-1,%eax
-/* Have now finished with the sources */
- movl PARAM3,%edi /* Point to the destination */
- movl %eax,EXP(%edi)
-
-/* Now make sure that the result is normalized */
- testl $0x80000000,%ecx
- jnz LResult_Normalised
-
- /* Normalize by shifting left one bit */
- shll $1,accum_0
- rcll $1,accum_1
- rcll $1,%ebx
- rcll $1,%ecx
- decl EXP(%edi)
-
-LResult_Normalised:
- movl accum_0,%eax
- movl accum_1,%edx
- orl %eax,%eax
- jz L_extent_zero
-
- orl $1,%edx
-
-L_extent_zero:
- movl %ecx,%eax
- jmp FPU_round
-
-
-#ifdef PARANOID
-L_bugged:
- pushl EX_INTERNAL|0x205
- call EXCEPTION
- pop %ebx
- jmp L_exit
-
-L_exit:
- popl %ebx
- popl %edi
- popl %esi
- leave
- ret
-#endif PARANOID
-
diff --git a/sys/gnu/i386/fpemul/reg_u_sub.s b/sys/gnu/i386/fpemul/reg_u_sub.s
deleted file mode 100644
index e24c4af..0000000
--- a/sys/gnu/i386/fpemul/reg_u_sub.s
+++ /dev/null
@@ -1,357 +0,0 @@
- .file "reg_u_sub.S"
-/*
- * reg_u_sub.S
- *
- * Core floating point subtraction routine.
- *
- * Call from C as:
- * void reg_u_sub(FPU_REG *arg1, FPU_REG *arg2, FPU_REG *answ,
- * int control_w)
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-/*
- | Kernel subtraction routine reg_u_sub(reg *arg1, reg *arg2, reg *answ).
- | Takes two valid reg f.p. numbers (TW_Valid), which are
- | treated as unsigned numbers,
- | and returns their difference as a TW_Valid or TW_Zero f.p.
- | number.
- | The first number (arg1) must be the larger.
- | The returned number is normalized.
- | Basic checks are performed if PARANOID is defined.
- */
-
-#include <gnu/i386/fpemul/fpu_asm.h>
-
-.text
-ENTRY(reg_u_sub)
- pushl %ebp
- movl %esp,%ebp
- pushl %esi
- pushl %edi
- pushl %ebx
-
- movl PARAM1,%esi /* source 1 */
- movl PARAM2,%edi /* source 2 */
-
-#ifdef DENORM_OPERAND
- cmpl EXP_UNDER,EXP(%esi)
- jg xOp1_not_denorm
-
- call _denormal_operand
- orl %eax,%eax
- jnz FPU_Arith_exit
-
-xOp1_not_denorm:
- cmpl EXP_UNDER,EXP(%edi)
- jg xOp2_not_denorm
-
- call _denormal_operand
- orl %eax,%eax
- jnz FPU_Arith_exit
-
-xOp2_not_denorm:
-#endif DENORM_OPERAND
-
-/* xorl %ecx,%ecx */
- movl EXP(%esi),%ecx
- subl EXP(%edi),%ecx /* exp1 - exp2 */
-
-#ifdef PARANOID
- /* source 2 is always smaller than source 1 */
-/* jc L_bugged */
- js L_bugged_1
-
- testl $0x80000000,SIGH(%edi) /* The args are assumed to be be normalized */
- je L_bugged_2
-
- testl $0x80000000,SIGH(%esi)
- je L_bugged_2
-#endif PARANOID
-
-/*--------------------------------------+
- | Form a register holding the |
- | smaller number |
- +--------------------------------------*/
- movl SIGH(%edi),%eax /* register ms word */
- movl SIGL(%edi),%ebx /* register ls word */
-
- movl PARAM3,%edi /* destination */
- movl EXP(%esi),%edx
- movl %edx,EXP(%edi) /* Copy exponent to destination */
- movb SIGN(%esi),%dl
- movb %dl,SIGN(%edi) /* Copy the sign from the first arg */
-
- xorl %edx,%edx /* register extension */
-
-/*--------------------------------------+
- | Shift the temporary register |
- | right the required number of |
- | places. |
- +--------------------------------------*/
-L_shift_r:
- cmpl $32,%ecx /* shrd only works for 0..31 bits */
- jnc L_more_than_31
-
-/* less than 32 bits */
- shrd %cl,%ebx,%edx
- shrd %cl,%eax,%ebx
- shr %cl,%eax
- jmp L_shift_done
-
-L_more_than_31:
- cmpl $64,%ecx
- jnc L_more_than_63
-
- subb $32,%cl
- jz L_exactly_32
-
- shrd %cl,%eax,%edx
- shr %cl,%eax
- orl %ebx,%ebx
- jz L_more_31_no_low /* none of the lowest bits is set */
-
- orl $1,%edx /* record the fact in the extension */
-
-L_more_31_no_low:
- movl %eax,%ebx
- xorl %eax,%eax
- jmp L_shift_done
-
-L_exactly_32:
- movl %ebx,%edx
- movl %eax,%ebx
- xorl %eax,%eax
- jmp L_shift_done
-
-L_more_than_63:
- cmpw $65,%cx
- jnc L_more_than_64
-
- /* Shift right by 64 bits */
- movl %eax,%edx
- orl %ebx,%ebx
- jz L_more_63_no_low
-
- orl $1,%edx
- jmp L_more_63_no_low
-
-L_more_than_64:
- jne L_more_than_65
-
- /* Shift right by 65 bits */
- /* Carry is clear if we get here */
- movl %eax,%edx
- rcrl %edx
- jnc L_shift_65_nc
-
- orl $1,%edx
- jmp L_more_63_no_low
-
-L_shift_65_nc:
- orl %ebx,%ebx
- jz L_more_63_no_low
-
- orl $1,%edx
- jmp L_more_63_no_low
-
-L_more_than_65:
- movl $1,%edx /* The shifted nr always at least one '1' */
-
-L_more_63_no_low:
- xorl %ebx,%ebx
- xorl %eax,%eax
-
-L_shift_done:
-L_subtr:
-/*------------------------------+
- | Do the subtraction |
- +------------------------------*/
- xorl %ecx,%ecx
- subl %edx,%ecx
- movl %ecx,%edx
- movl SIGL(%esi),%ecx
- sbbl %ebx,%ecx
- movl %ecx,%ebx
- movl SIGH(%esi),%ecx
- sbbl %eax,%ecx
- movl %ecx,%eax
-
-#ifdef PARANOID
- /* We can never get a borrow */
- jc L_bugged
-#endif PARANOID
-
-/*--------------------------------------+
- | Normalize the result |
- +--------------------------------------*/
- testl $0x80000000,%eax
- jnz L_round /* no shifting needed */
-
- orl %eax,%eax
- jnz L_shift_1 /* shift left 1 - 31 bits */
-
- orl %ebx,%ebx
- jnz L_shift_32 /* shift left 32 - 63 bits */
-
-/* A rare case, the only one which is non-zero if we got here
-// is: 1000000 .... 0000
-// -0111111 .... 1111 1
-// --------------------
-// 0000000 .... 0000 1 */
-
- cmpl $0x80000000,%edx
- jnz L_must_be_zero
-
- /* Shift left 64 bits */
- subl $64,EXP(%edi)
- movl %edx,%eax
- jmp L_store
-
-L_must_be_zero:
-#ifdef PARANOID
- orl %edx,%edx
- jnz L_bugged_3
-#endif PARANOID
-
- /* The result is zero */
- movb TW_Zero,TAG(%edi)
- movl $0,EXP(%edi) /* exponent */
- movl $0,SIGL(%edi)
- movl $0,SIGH(%edi)
- jmp L_exit /* Does not underflow */
-
-L_shift_32:
- movl %ebx,%eax
- movl %edx,%ebx
- movl $0,%edx
- subl $32,EXP(%edi) /* Can get underflow here */
-
-/* We need to shift left by 1 - 31 bits */
-L_shift_1:
- bsrl %eax,%ecx /* get the required shift in %ecx */
- subl $31,%ecx
- negl %ecx
- shld %cl,%ebx,%eax
- shld %cl,%edx,%ebx
- shl %cl,%edx
- subl %ecx,EXP(%edi) /* Can get underflow here */
-
-L_round:
- jmp FPU_round /* Round the result */
-
-
-#ifdef PARANOID
-L_bugged_1:
- pushl EX_INTERNAL|0x206
- call EXCEPTION
- pop %ebx
- jmp L_exit
-
-L_bugged_2:
- pushl EX_INTERNAL|0x209
- call EXCEPTION
- pop %ebx
- jmp L_exit
-
-L_bugged_3:
- pushl EX_INTERNAL|0x210
- call EXCEPTION
- pop %ebx
- jmp L_exit
-
-L_bugged_4:
- pushl EX_INTERNAL|0x211
- call EXCEPTION
- pop %ebx
- jmp L_exit
-
-L_bugged:
- pushl EX_INTERNAL|0x212
- call EXCEPTION
- pop %ebx
- jmp L_exit
-#endif PARANOID
-
-
-L_store:
-/*------------------------------+
- | Store the result |
- +------------------------------*/
- movl %eax,SIGH(%edi)
- movl %ebx,SIGL(%edi)
-
- movb TW_Valid,TAG(%edi) /* Set the tags to TW_Valid */
-
- cmpl EXP_UNDER,EXP(%edi)
- jle L_underflow
-
-L_exit:
- popl %ebx
- popl %edi
- popl %esi
- leave
- ret
-
-
-L_underflow:
- push %edi
- call _arith_underflow
- pop %ebx
- jmp L_exit
-
diff --git a/sys/gnu/i386/fpemul/status_w.h b/sys/gnu/i386/fpemul/status_w.h
deleted file mode 100644
index 4d15641..0000000
--- a/sys/gnu/i386/fpemul/status_w.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * status_w.h
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-
-#ifndef _STATUS_H_
-#define _STATUS_H_
-
-
-#ifdef LOCORE
-#define Const__(x) $/**/x
-#else
-#define Const__(x) x
-#endif
-
-#define SW_Backward Const__(0x8000) /* backward compatibility */
-#define SW_C3 Const__(0x4000) /* condition bit 3 */
-#define SW_Top Const__(0x3800) /* top of stack */
-#define SW_Top_Shift Const__(11) /* shift for top of stack bits */
-#define SW_C2 Const__(0x0400) /* condition bit 2 */
-#define SW_C1 Const__(0x0200) /* condition bit 1 */
-#define SW_C0 Const__(0x0100) /* condition bit 0 */
-#define SW_Summary Const__(0x0080) /* exception summary */
-#define SW_Stack_Fault Const__(0x0040) /* stack fault */
-#define SW_Precision Const__(0x0020) /* loss of precision */
-#define SW_Underflow Const__(0x0010) /* underflow */
-#define SW_Overflow Const__(0x0008) /* overflow */
-#define SW_Zero_Div Const__(0x0004) /* divide by zero */
-#define SW_Denorm_Op Const__(0x0002) /* denormalized operand */
-#define SW_Invalid Const__(0x0001) /* invalid operation */
-
-#define SW_Exc_Mask Const__(0x27f) /* Status word exception bit mask */
-
-#ifndef LOCORE
-
-#define COMP_A_gt_B 1
-#define COMP_A_eq_B 2
-#define COMP_A_lt_B 3
-#define COMP_No_Comp 4
-#define COMP_Denormal 0x20
-#define COMP_NaN 0x40
-#define COMP_SNaN 0x80
-
-#define setcc(cc) ({ \
- status_word &= ~(SW_C0|SW_C1|SW_C2|SW_C3); \
- status_word |= (cc) & (SW_C0|SW_C1|SW_C2|SW_C3); })
-
-#endif /* LOCORE */
-
-#endif /* _STATUS_H_ */
diff --git a/sys/gnu/i386/fpemul/version.h b/sys/gnu/i386/fpemul/version.h
deleted file mode 100644
index 38f6b93..0000000
--- a/sys/gnu/i386/fpemul/version.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * version.h
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-#define FPU_VERSION "wm-FPU-emu version BETA 1.4"
diff --git a/sys/gnu/i386/fpemul/wm_shrx.s b/sys/gnu/i386/fpemul/wm_shrx.s
deleted file mode 100644
index e64219f..0000000
--- a/sys/gnu/i386/fpemul/wm_shrx.s
+++ /dev/null
@@ -1,258 +0,0 @@
- .file "wm_shrx.S"
-/*
- * wm_shrx.S
- *
- * 64 bit right shift functions
- *
- * Call from C as:
- * unsigned shrx(void *arg1, unsigned arg2)
- * and
- * unsigned shrxs(void *arg1, unsigned arg2)
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-
-#include <gnu/i386/fpemul/fpu_asm.h>
-
-.text
-
-/*---------------------------------------------------------------------------+
- | unsigned shrx(void *arg1, unsigned arg2) |
- | |
- | Extended shift right function. |
- | Fastest for small shifts. |
- | Shifts the 64 bit quantity pointed to by the first arg (arg1) |
- | right by the number of bits specified by the second arg (arg2). |
- | Forms a 96 bit quantity from the 64 bit arg and eax: |
- | [ 64 bit arg ][ eax ] |
- | shift right ---------> |
- | The eax register is initialized to 0 before the shifting. |
- | Results returned in the 64 bit arg and eax. |
- +---------------------------------------------------------------------------*/
-
-ENTRY(shrx)
- push %ebp
- movl %esp,%ebp
- pushl %esi
- movl PARAM2,%ecx
- movl PARAM1,%esi
- cmpl $32,%ecx /* shrd only works for 0..31 bits */
- jnc L_more_than_31
-
-/* less than 32 bits */
- pushl %ebx
- movl (%esi),%ebx /* lsl */
- movl 4(%esi),%edx /* msl */
- xorl %eax,%eax /* extension */
- shrd %cl,%ebx,%eax
- shrd %cl,%edx,%ebx
- shr %cl,%edx
- movl %ebx,(%esi)
- movl %edx,4(%esi)
- popl %ebx
- popl %esi
- leave
- ret
-
-L_more_than_31:
- cmpl $64,%ecx
- jnc L_more_than_63
-
- subb $32,%cl
- movl (%esi),%eax /* lsl */
- movl 4(%esi),%edx /* msl */
- shrd %cl,%edx,%eax
- shr %cl,%edx
- movl %edx,(%esi)
- movl $0,4(%esi)
- popl %esi
- leave
- ret
-
-L_more_than_63:
- cmpl $96,%ecx
- jnc L_more_than_95
-
- subb $64,%cl
- movl 4(%esi),%eax /* msl */
- shr %cl,%eax
- xorl %edx,%edx
- movl %edx,(%esi)
- movl %edx,4(%esi)
- popl %esi
- leave
- ret
-
-L_more_than_95:
- xorl %eax,%eax
- movl %eax,(%esi)
- movl %eax,4(%esi)
- popl %esi
- leave
- ret
-
-
-/*---------------------------------------------------------------------------+
- | unsigned shrxs(void *arg1, unsigned arg2) |
- | |
- | Extended shift right function (optimized for small floating point |
- | integers). |
- | Shifts the 64 bit quantity pointed to by the first arg (arg1) |
- | right by the number of bits specified by the second arg (arg2). |
- | Forms a 96 bit quantity from the 64 bit arg and eax: |
- | [ 64 bit arg ][ eax ] |
- | shift right ---------> |
- | The eax register is initialized to 0 before the shifting. |
- | The lower 8 bits of eax are lost and replaced by a flag which is |
- | set (to 0x01) if any bit, apart from the first one, is set in the |
- | part which has been shifted out of the arg. |
- | Results returned in the 64 bit arg and eax. |
- +---------------------------------------------------------------------------*/
- .globl _shrxs
-_shrxs:
- push %ebp
- movl %esp,%ebp
- pushl %esi
- pushl %ebx
- movl PARAM2,%ecx
- movl PARAM1,%esi
- cmpl $64,%ecx /* shrd only works for 0..31 bits */
- jnc Ls_more_than_63
-
- cmpl $32,%ecx /* shrd only works for 0..31 bits */
- jc Ls_less_than_32
-
-/* We got here without jumps by assuming that the most common requirement
- is for small integers */
-/* Shift by [32..63] bits */
- subb $32,%cl
- movl (%esi),%eax /* lsl */
- movl 4(%esi),%edx /* msl */
- xorl %ebx,%ebx
- shrd %cl,%eax,%ebx
- shrd %cl,%edx,%eax
- shr %cl,%edx
- orl %ebx,%ebx /* test these 32 bits */
- setne %bl
- test $0x7fffffff,%eax /* and 31 bits here */
- setne %bh
- orw %bx,%bx /* Any of the 63 bit set ? */
- setne %al
- movl %edx,(%esi)
- movl $0,4(%esi)
- popl %ebx
- popl %esi
- leave
- ret
-
-/* Shift by [0..31] bits */
-Ls_less_than_32:
- movl (%esi),%ebx /* lsl */
- movl 4(%esi),%edx /* msl */
- xorl %eax,%eax /* extension */
- shrd %cl,%ebx,%eax
- shrd %cl,%edx,%ebx
- shr %cl,%edx
- test $0x7fffffff,%eax /* only need to look at eax here */
- setne %al
- movl %ebx,(%esi)
- movl %edx,4(%esi)
- popl %ebx
- popl %esi
- leave
- ret
-
-/* Shift by [64..95] bits */
-Ls_more_than_63:
- cmpl $96,%ecx
- jnc Ls_more_than_95
-
- subb $64,%cl
- movl (%esi),%ebx /* lsl */
- movl 4(%esi),%eax /* msl */
- xorl %edx,%edx /* extension */
- shrd %cl,%ebx,%edx
- shrd %cl,%eax,%ebx
- shr %cl,%eax
- orl %ebx,%edx
- setne %bl
- test $0x7fffffff,%eax /* only need to look at eax here */
- setne %bh
- orw %bx,%bx
- setne %al
- xorl %edx,%edx
- movl %edx,(%esi) /* set to zero */
- movl %edx,4(%esi) /* set to zero */
- popl %ebx
- popl %esi
- leave
- ret
-
-Ls_more_than_95:
-/* Shift by [96..inf) bits */
- xorl %eax,%eax
- movl (%esi),%ebx
- orl 4(%esi),%ebx
- setne %al
- xorl %ebx,%ebx
- movl %ebx,(%esi)
- movl %ebx,4(%esi)
- popl %ebx
- popl %esi
- leave
- ret
diff --git a/sys/gnu/i386/fpemul/wm_sqrt.s b/sys/gnu/i386/fpemul/wm_sqrt.s
deleted file mode 100644
index dac6389..0000000
--- a/sys/gnu/i386/fpemul/wm_sqrt.s
+++ /dev/null
@@ -1,492 +0,0 @@
- .file "wm_sqrt.S"
-/*
- * wm_sqrt.S
- *
- * Fixed point arithmetic square root evaluation.
- *
- * Call from C as:
- * void wm_sqrt(FPU_REG *n, unsigned int control_word)
- *
- *
- * Copyright (C) 1992,1993,1994
- * W. Metzenthen, 22 Parker St, Ormond, Vic 3163,
- * Australia. E-mail billm@vaxc.cc.monash.edu.au
- * All rights reserved.
- *
- * This copyright notice covers the redistribution and use of the
- * FPU emulator developed by W. Metzenthen. It covers only its use
- * in the 386BSD, FreeBSD and NetBSD operating systems. Any other
- * use is not permitted under this copyright.
- *
- * 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 include information specifying
- * that source code for the emulator is freely available and include
- * either:
- * a) an offer to provide the source code for a nominal distribution
- * fee, or
- * b) list at least two alternative methods whereby the source
- * can be obtained, e.g. a publically accessible bulletin board
- * and an anonymous ftp site from which the software can be
- * downloaded.
- * 3. All advertising materials specifically mentioning features or use of
- * this emulator must acknowledge that it was developed by W. Metzenthen.
- * 4. The name of W. Metzenthen may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED ``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
- * W. METZENTHEN 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.
- *
- *
- * The purpose of this copyright, based upon the Berkeley copyright, is to
- * ensure that the covered software remains freely available to everyone.
- *
- * The software (with necessary differences) is also available, but under
- * the terms of the GNU copyleft, for the Linux operating system and for
- * the djgpp ms-dos extender.
- *
- * W. Metzenthen June 1994.
- *
- *
- * $FreeBSD$
- *
- */
-
-
-/*---------------------------------------------------------------------------+
- | wm_sqrt(FPU_REG *n, unsigned int control_word) |
- | returns the square root of n in n. |
- | |
- | Use Newton's method to compute the square root of a number, which must |
- | be in the range [1.0 .. 4.0), to 64 bits accuracy. |
- | Does not check the sign or tag of the argument. |
- | Sets the exponent, but not the sign or tag of the result. |
- | |
- | The guess is kept in %esi:%edi |
- +---------------------------------------------------------------------------*/
-
-#include <gnu/i386/fpemul/fpu_asm.h>
-
-
-.data
-/*
- Local storage:
- */
- ALIGN_DATA
-accum_3:
- .long 0 /* ms word */
-accum_2:
- .long 0
-accum_1:
- .long 0
-accum_0:
- .long 0
-
-/* The de-normalised argument:
-// sq_2 sq_1 sq_0
-// b b b b b b b ... b b b b b b .... b b b b 0 0 0 ... 0
-// ^ binary point here */
-fsqrt_arg_2:
- .long 0 /* ms word */
-fsqrt_arg_1:
- .long 0
-fsqrt_arg_0:
- .long 0 /* ls word, at most the ms bit is set */
-
-.text
-
-ENTRY(wm_sqrt)
- pushl %ebp
- movl %esp,%ebp
- pushl %esi
- pushl %edi
- pushl %ebx
-
- movl PARAM1,%esi
-
- movl SIGH(%esi),%eax
- movl SIGL(%esi),%ecx
- xorl %edx,%edx
-
-/* We use a rough linear estimate for the first guess.. */
-
- cmpl EXP_BIAS,EXP(%esi)
- jnz sqrt_arg_ge_2
-
- shrl $1,%eax /* arg is in the range [1.0 .. 2.0) */
- rcrl $1,%ecx
- rcrl $1,%edx
-
-sqrt_arg_ge_2:
-/* From here on, n is never accessed directly again until it is
-// replaced by the answer. */
-
- movl %eax,fsqrt_arg_2 /* ms word of n */
- movl %ecx,fsqrt_arg_1
- movl %edx,fsqrt_arg_0
-
-/* Make a linear first estimate */
- shrl $1,%eax
- addl $0x40000000,%eax
- movl $0xaaaaaaaa,%ecx
- mull %ecx
- shll %edx /* max result was 7fff... */
- testl $0x80000000,%edx /* but min was 3fff... */
- jnz sqrt_prelim_no_adjust
-
- movl $0x80000000,%edx /* round up */
-
-sqrt_prelim_no_adjust:
- movl %edx,%esi /* Our first guess */
-
-/* We have now computed (approx) (2 + x) / 3, which forms the basis
- for a few iterations of Newton's method */
-
- movl fsqrt_arg_2,%ecx /* ms word */
-
-/* From our initial estimate, three iterations are enough to get us
-// to 30 bits or so. This will then allow two iterations at better
-// precision to complete the process.
-
-// Compute (g + n/g)/2 at each iteration (g is the guess). */
- shrl %ecx /* Doing this first will prevent a divide */
- /* overflow later. */
-
- movl %ecx,%edx /* msw of the arg / 2 */
- divl %esi /* current estimate */
- shrl %esi /* divide by 2 */
- addl %eax,%esi /* the new estimate */
-
- movl %ecx,%edx
- divl %esi
- shrl %esi
- addl %eax,%esi
-
- movl %ecx,%edx
- divl %esi
- shrl %esi
- addl %eax,%esi
-
-/* Now that an estimate accurate to about 30 bits has been obtained (in %esi),
-// we improve it to 60 bits or so.
-
-// The strategy from now on is to compute new estimates from
-// guess := guess + (n - guess^2) / (2 * guess) */
-
-/* First, find the square of the guess */
- movl %esi,%eax
- mull %esi
-/* guess^2 now in %edx:%eax */
-
- movl fsqrt_arg_1,%ecx
- subl %ecx,%eax
- movl fsqrt_arg_2,%ecx /* ms word of normalized n */
- sbbl %ecx,%edx
- jnc sqrt_stage_2_positive
-/* subtraction gives a negative result
-// negate the result before division */
- notl %edx
- notl %eax
- addl $1,%eax
- adcl $0,%edx
-
- divl %esi
- movl %eax,%ecx
-
- movl %edx,%eax
- divl %esi
- jmp sqrt_stage_2_finish
-
-sqrt_stage_2_positive:
- divl %esi
- movl %eax,%ecx
-
- movl %edx,%eax
- divl %esi
-
- notl %ecx
- notl %eax
- addl $1,%eax
- adcl $0,%ecx
-
-sqrt_stage_2_finish:
- sarl $1,%ecx /* divide by 2 */
- rcrl $1,%eax
-
- /* Form the new estimate in %esi:%edi */
- movl %eax,%edi
- addl %ecx,%esi
-
- jnz sqrt_stage_2_done /* result should be [1..2) */
-
-#ifdef PARANOID
-/* It should be possible to get here only if the arg is ffff....ffff*/
- cmp $0xffffffff,fsqrt_arg_1
- jnz sqrt_stage_2_error
-#endif PARANOID
-
-/* The best rounded result.*/
- xorl %eax,%eax
- decl %eax
- movl %eax,%edi
- movl %eax,%esi
- movl $0x7fffffff,%eax
- jmp sqrt_round_result
-
-#ifdef PARANOID
-sqrt_stage_2_error:
- pushl EX_INTERNAL|0x213
- call EXCEPTION
-#endif PARANOID
-
-sqrt_stage_2_done:
-
-/* Now the square root has been computed to better than 60 bits */
-
-/* Find the square of the guess*/
- movl %edi,%eax /* ls word of guess*/
- mull %edi
- movl %edx,accum_1
-
- movl %esi,%eax
- mull %esi
- movl %edx,accum_3
- movl %eax,accum_2
-
- movl %edi,%eax
- mull %esi
- addl %eax,accum_1
- adcl %edx,accum_2
- adcl $0,accum_3
-
-/* movl %esi,%eax*/
-/* mull %edi*/
- addl %eax,accum_1
- adcl %edx,accum_2
- adcl $0,accum_3
-
-/* guess^2 now in accum_3:accum_2:accum_1*/
-
- movl fsqrt_arg_0,%eax /* get normalized n*/
- subl %eax,accum_1
- movl fsqrt_arg_1,%eax
- sbbl %eax,accum_2
- movl fsqrt_arg_2,%eax /* ms word of normalized n*/
- sbbl %eax,accum_3
- jnc sqrt_stage_3_positive
-
-/* subtraction gives a negative result*/
-/* negate the result before division */
- notl accum_1
- notl accum_2
- notl accum_3
- addl $1,accum_1
- adcl $0,accum_2
-
-#ifdef PARANOID
- adcl $0,accum_3 /* This must be zero */
- jz sqrt_stage_3_no_error
-
-sqrt_stage_3_error:
- pushl EX_INTERNAL|0x207
- call EXCEPTION
-
-sqrt_stage_3_no_error:
-#endif PARANOID
-
- movl accum_2,%edx
- movl accum_1,%eax
- divl %esi
- movl %eax,%ecx
-
- movl %edx,%eax
- divl %esi
-
- sarl $1,%ecx / divide by 2*/
- rcrl $1,%eax
-
- /* prepare to round the result*/
-
- addl %ecx,%edi
- adcl $0,%esi
-
- jmp sqrt_stage_3_finished
-
-sqrt_stage_3_positive:
- movl accum_2,%edx
- movl accum_1,%eax
- divl %esi
- movl %eax,%ecx
-
- movl %edx,%eax
- divl %esi
-
- sarl $1,%ecx /* divide by 2*/
- rcrl $1,%eax
-
- /* prepare to round the result*/
-
- notl %eax /* Negate the correction term*/
- notl %ecx
- addl $1,%eax
- adcl $0,%ecx /* carry here ==> correction == 0*/
- adcl $0xffffffff,%esi
-
- addl %ecx,%edi
- adcl $0,%esi
-
-sqrt_stage_3_finished:
-
-/* The result in %esi:%edi:%esi should be good to about 90 bits here,
-// and the rounding information here does not have sufficient accuracy
-// in a few rare cases. */
- cmpl $0xffffffe0,%eax
- ja sqrt_near_exact_x
-
- cmpl $0x00000020,%eax
- jb sqrt_near_exact
-
- cmpl $0x7fffffe0,%eax
- jb sqrt_round_result
-
- cmpl $0x80000020,%eax
- jb sqrt_get_more_precision
-
-sqrt_round_result:
-/* Set up for rounding operations*/
- movl %eax,%edx
- movl %esi,%eax
- movl %edi,%ebx
- movl PARAM1,%edi
- movl EXP_BIAS,EXP(%edi) /* Result is in [1.0 .. 2.0)*/
- movl PARAM2,%ecx
- jmp FPU_round_sqrt
-
-
-sqrt_near_exact_x:
-/* First, the estimate must be rounded up.*/
- addl $1,%edi
- adcl $0,%esi
-
-sqrt_near_exact:
-/* This is an easy case because x^1/2 is monotonic.
-// We need just find the square of our estimate, compare it
-// with the argument, and deduce whether our estimate is
-// above, below, or exact. We use the fact that the estimate
-// is known to be accurate to about 90 bits. */
- movl %edi,%eax /* ls word of guess*/
- mull %edi
- movl %edx,%ebx /* 2nd ls word of square*/
- movl %eax,%ecx /* ls word of square*/
-
- movl %edi,%eax
- mull %esi
- addl %eax,%ebx
- addl %eax,%ebx
-
-#ifdef PARANOID
- cmp $0xffffffb0,%ebx
- jb sqrt_near_exact_ok
-
- cmp $0x00000050,%ebx
- ja sqrt_near_exact_ok
-
- pushl EX_INTERNAL|0x214
- call EXCEPTION
-
-sqrt_near_exact_ok:
-#endif PARANOID
-
- or %ebx,%ebx
- js sqrt_near_exact_small
-
- jnz sqrt_near_exact_large
-
- or %ebx,%edx
- jnz sqrt_near_exact_large
-
-/* Our estimate is exactly the right answer*/
- xorl %eax,%eax
- jmp sqrt_round_result
-
-sqrt_near_exact_small:
-/* Our estimate is too small*/
- movl $0x000000ff,%eax
- jmp sqrt_round_result
-
-sqrt_near_exact_large:
-/* Our estimate is too large, we need to decrement it*/
- subl $1,%edi
- sbbl $0,%esi
- movl $0xffffff00,%eax
- jmp sqrt_round_result
-
-
-sqrt_get_more_precision:
-/* This case is almost the same as the above, except we start*/
-/* with an extra bit of precision in the estimate.*/
- stc /* The extra bit.*/
- rcll $1,%edi /* Shift the estimate left one bit*/
- rcll $1,%esi
-
- movl %edi,%eax /* ls word of guess*/
- mull %edi
- movl %edx,%ebx /* 2nd ls word of square*/
- movl %eax,%ecx /* ls word of square*/
-
- movl %edi,%eax
- mull %esi
- addl %eax,%ebx
- addl %eax,%ebx
-
-/* Put our estimate back to its original value*/
- stc /* The ms bit.*/
- rcrl $1,%esi /* Shift the estimate left one bit*/
- rcrl $1,%edi
-
-#ifdef PARANOID
- cmp $0xffffff60,%ebx
- jb sqrt_more_prec_ok
-
- cmp $0x000000a0,%ebx
- ja sqrt_more_prec_ok
-
- pushl EX_INTERNAL|0x215
- call EXCEPTION
-
-sqrt_more_prec_ok:
-#endif PARANOID
-
- or %ebx,%ebx
- js sqrt_more_prec_small
-
- jnz sqrt_more_prec_large
-
- or %ebx,%ecx
- jnz sqrt_more_prec_large
-
-/* Our estimate is exactly the right answer*/
- movl $0x80000000,%eax
- jmp sqrt_round_result
-
-sqrt_more_prec_small:
-/* Our estimate is too small*/
- movl $0x800000ff,%eax
- jmp sqrt_round_result
-
-sqrt_more_prec_large:
-/* Our estimate is too large*/
- movl $0x7fffff00,%eax
- jmp sqrt_round_result
diff --git a/sys/gnu/i386/isa/dgb.c b/sys/gnu/i386/isa/dgb.c
deleted file mode 100644
index f054e7b..0000000
--- a/sys/gnu/i386/isa/dgb.c
+++ /dev/null
@@ -1,2199 +0,0 @@
-/*-
- * dgb.c $FreeBSD$
- *
- * Digiboard driver.
- *
- * Stage 1. "Better than nothing".
- * Stage 2. "Gee, it works!".
- *
- * Based on sio driver by Bruce Evans and on Linux driver by Troy
- * De Jongh <troyd@digibd.com> or <troyd@skypoint.com>
- * which is under GNU General Public License version 2 so this driver
- * is forced to be under GPL 2 too.
- *
- * Written by Serge Babkin,
- * Joint Stock Commercial Bank "Chelindbank"
- * (Chelyabinsk, Russia)
- * babkin@hq.icb.chel.su
- *
- * Assorted hacks to make it more functional and working under 3.0-current.
- * Fixed broken routines to prevent processes hanging on closed (thanks
- * to Bruce for his patience and assistance). Thanks also to Maxim Bolotin
- * <max@run.net> for his patches which did most of the work to get this
- * running under 2.2/3.0-current.
- * Implemented ioctls: TIOCMSDTRWAIT, TIOCMGDTRWAIT, TIOCTIMESTAMP &
- * TIOCDCDTIMESTAMP.
- * Sysctl debug flag is now a bitflag, to filter noise during debugging.
- * David L. Nugent <davidn@blaze.net.au>
- */
-
-#include "opt_compat.h"
-#include "opt_dgb.h"
-
-#include "dgb.h"
-
-/* Helg: i.e.25 times per sec board will be polled */
-#define POLLSPERSEC 25
-/* How many charactes can we write to input tty rawq */
-#define DGB_IBUFSIZE (TTYHOG-100)
-
-/* the overall number of ports controlled by this driver */
-
-#ifndef NDGBPORTS
-# define NDGBPORTS (NDGB*16)
-#endif
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/tty.h>
-#include <sys/proc.h>
-#include <sys/conf.h>
-#include <sys/dkstat.h>
-#include <sys/fcntl.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-
-#include <machine/clock.h>
-
-#include <vm/vm.h>
-#include <vm/pmap.h>
-
-#include <i386/isa/isa_device.h>
-
-#include <gnu/i386/isa/dgbios.h>
-#include <gnu/i386/isa/dgfep.h>
-
-#define DGB_DEBUG /* Enable debugging info via sysctl */
-#include <gnu/i386/isa/dgreg.h>
-
-#define CALLOUT_MASK 0x80
-#define CONTROL_MASK 0x60
-#define CONTROL_INIT_STATE 0x20
-#define CONTROL_LOCK_STATE 0x40
-#define UNIT_MASK 0x30000
-#define PORT_MASK 0x1F
-#define DEV_TO_UNIT(dev) (MINOR_TO_UNIT(minor(dev)))
-#define MINOR_MAGIC_MASK (CALLOUT_MASK | CONTROL_MASK)
-#define MINOR_TO_UNIT(mynor) (((mynor) & UNIT_MASK)>>16)
-#define MINOR_TO_PORT(mynor) ((mynor) & PORT_MASK)
-
-/* types. XXX - should be elsewhere */
-typedef u_char bool_t; /* boolean */
-
-/* digiboard port structure */
-struct dgb_p {
- bool_t status;
-
- u_char unit; /* board unit number */
- u_char pnum; /* port number */
- u_char omodem; /* FEP output modem status */
- u_char imodem; /* FEP input modem status */
- u_char modemfake; /* Modem values to be forced */
- u_char modem; /* Force values */
- u_char hflow;
- u_char dsr;
- u_char dcd;
- u_char stopc;
- u_char startc;
- u_char stopca;
- u_char startca;
- u_char fepstopc;
- u_char fepstartc;
- u_char fepstopca;
- u_char fepstartca;
- u_char txwin;
- u_char rxwin;
- ushort fepiflag;
- ushort fepcflag;
- ushort fepoflag;
- ushort txbufhead;
- ushort txbufsize;
- ushort rxbufhead;
- ushort rxbufsize;
- int close_delay;
- int count;
- int blocked_open;
- int event;
- int asyncflags;
- u_long statusflags;
- u_char *txptr;
- u_char *rxptr;
- volatile struct board_chan *brdchan;
- struct tty *tty;
-
- bool_t active_out; /* nonzero if the callout device is open */
- u_int wopeners; /* # processes waiting for DCD in open() */
-
- /* Initial state. */
- struct termios it_in; /* should be in struct tty */
- struct termios it_out;
-
- /* Lock state. */
- struct termios lt_in; /* should be in struct tty */
- struct termios lt_out;
-
- bool_t do_timestamp;
- bool_t do_dcd_timestamp;
- struct timeval timestamp;
- struct timeval dcd_timestamp;
-
- /* flags of state, are used in sleep() too */
- u_char closing; /* port is being closed now */
- u_char draining; /* port is being drained now */
- u_char used; /* port is being used now */
- u_char mustdrain; /* data must be waited to drain in dgbparam() */
-};
-
-/* Digiboard per-board structure */
-struct dgb_softc {
- /* struct board_info */
- u_char status; /* status: DISABLED/ENABLED */
- u_char unit; /* unit number */
- u_char type; /* type of card: PCXE, PCXI, PCXEVE */
- u_char altpin; /* do we need alternate pin setting ? */
- int numports; /* number of ports on card */
- int port; /* I/O port */
- u_char *vmem; /* virtual memory address */
- long pmem; /* physical memory address */
- int mem_seg; /* internal memory segment */
- struct dgb_p *ports; /* pointer to array of port descriptors */
- struct tty *ttys; /* pointer to array of TTY structures */
- volatile struct global_data *mailbox;
- };
-
-
-static struct dgb_softc dgb_softc[NDGB];
-static struct dgb_p dgb_ports[NDGBPORTS];
-static struct tty dgb_tty[NDGBPORTS];
-
-/*
- * The public functions in the com module ought to be declared in a com-driver
- * system header.
- */
-
-/* Interrupt handling entry points. */
-static void dgbpoll __P((void *unit_c));
-
-/* Device switch entry points. */
-#define dgbreset noreset
-#define dgbmmap nommap
-#define dgbstrategy nostrategy
-
-static int dgbattach __P((struct isa_device *dev));
-static int dgbprobe __P((struct isa_device *dev));
-
-static void fepcmd(struct dgb_p *port, unsigned cmd, unsigned op1, unsigned op2,
- unsigned ncmds, unsigned bytecmd);
-
-static void dgbstart __P((struct tty *tp));
-static void dgbstop __P((struct tty *tp, int rw));
-static int dgbparam __P((struct tty *tp, struct termios *t));
-static void dgbhardclose __P((struct dgb_p *port));
-static void dgb_drain_or_flush __P((struct dgb_p *port));
-static int dgbdrain __P((struct dgb_p *port));
-static void dgb_pause __P((void *chan));
-static void wakeflush __P((void *p));
-static void disc_optim __P((struct tty *tp, struct termios *t));
-
-
-struct isa_driver dgbdriver = {
- dgbprobe, dgbattach, "dgb",0
-};
-
-static d_open_t dgbopen;
-static d_close_t dgbclose;
-static d_ioctl_t dgbioctl;
-
-#define CDEV_MAJOR 58
-static struct cdevsw dgb_cdevsw = {
- /* open */ dgbopen,
- /* close */ dgbclose,
- /* read */ ttyread,
- /* write */ ttywrite,
- /* ioctl */ dgbioctl,
- /* poll */ ttypoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "dgb",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY,
- /* bmaj */ -1
-};
-
-static speed_t dgbdefaultrate = TTYDEF_SPEED;
-
-static struct speedtab dgbspeedtab[] = {
- 0, FEP_B0, /* old (sysV-like) Bx codes */
- 50, FEP_B50,
- 75, FEP_B75,
- 110, FEP_B110,
- 134, FEP_B134,
- 150, FEP_B150,
- 200, FEP_B200,
- 300, FEP_B300,
- 600, FEP_B600,
- 1200, FEP_B1200,
- 1800, FEP_B1800,
- 2400, FEP_B2400,
- 4800, FEP_B4800,
- 9600, FEP_B9600,
- 19200, FEP_B19200,
- 38400, FEP_B38400,
- 57600, (FEP_FASTBAUD|FEP_B50), /* B50 & fast baud table */
- 115200, (FEP_FASTBAUD|FEP_B110), /* B100 & fast baud table */
- -1, -1
-};
-
-static struct dbgflagtbl
-{
- tcflag_t in_mask;
- tcflag_t in_val;
- tcflag_t out_val;
-} dgb_cflags[] =
-{
- { PARODD, PARODD, FEP_PARODD },
- { PARENB, PARENB, FEP_PARENB },
- { CSTOPB, CSTOPB, FEP_CSTOPB },
- { CSIZE, CS5, FEP_CS6 },
- { CSIZE, CS6, FEP_CS6 },
- { CSIZE, CS7, FEP_CS7 },
- { CSIZE, CS8, FEP_CS8 },
- { CLOCAL, CLOCAL, FEP_CLOCAL },
- { (tcflag_t)-1 }
-}, dgb_iflags[] =
-{
- { IGNBRK, IGNBRK, FEP_IGNBRK },
- { BRKINT, BRKINT, FEP_BRKINT },
- { IGNPAR, IGNPAR, FEP_IGNPAR },
- { PARMRK, PARMRK, FEP_PARMRK },
- { INPCK, INPCK, FEP_INPCK },
- { ISTRIP, ISTRIP, FEP_ISTRIP },
- { IXON, IXON, FEP_IXON },
- { IXOFF, IXOFF, FEP_IXOFF },
- { IXANY, IXANY, FEP_IXANY },
- { (tcflag_t)-1 }
-}, dgb_flow[] =
-{
- { CRTSCTS, CRTSCTS, CTS|RTS },
- { CRTSCTS, CCTS_OFLOW, CTS },
- { CRTSCTS, CRTS_IFLOW, RTS },
- { (tcflag_t)-1 }
-};
-
-/* xlat bsd termios flags to dgb sys-v style */
-static tcflag_t
-dgbflags(struct dbgflagtbl *tbl, tcflag_t input)
-{
- tcflag_t output = 0;
- int i;
-
- for (i=0; tbl[i].in_mask != (tcflag_t)-1; i++)
- {
- if ((input & tbl[i].in_mask) == tbl[i].in_val)
- output |= tbl[i].out_val;
- }
- return output;
-}
-
-#ifdef DGB_DEBUG
-static int dgbdebug=0;
-SYSCTL_INT(_debug, OID_AUTO, dgb_debug, CTLFLAG_RW, &dgbdebug, 0, "");
-#endif
-
-static __inline int setwin __P((struct dgb_softc *sc, unsigned addr));
-static __inline int setinitwin __P((struct dgb_softc *sc, unsigned addr));
-static __inline void hidewin __P((struct dgb_softc *sc));
-static __inline void towin __P((struct dgb_softc *sc, int win));
-
-/*Helg: to allow recursive dgb...() calls */
-typedef struct
- { /* If we were called and don't want to disturb we need: */
- int port; /* write to this port */
- u_char data; /* this data on exit */
- /* or DATA_WINOFF to close memory window on entry */
- } BoardMemWinState; /* so several channels and even boards can coexist */
-#define DATA_WINOFF 0
-static BoardMemWinState bmws;
-
-/* return current memory window state and close window */
-static BoardMemWinState
-bmws_get(void)
-{
- BoardMemWinState bmwsRet=bmws;
- if(bmws.data!=DATA_WINOFF)
- outb(bmws.port, bmws.data=DATA_WINOFF);
- return bmwsRet;
-}
-
-/* restore memory window state */
-static void
-bmws_set(BoardMemWinState ws)
-{
- if(ws.data != bmws.data || ws.port!=bmws.port ) {
- if(bmws.data!=DATA_WINOFF)
- outb(bmws.port,DATA_WINOFF);
- if(ws.data!=DATA_WINOFF)
- outb(ws.port, ws.data);
- bmws=ws;
- }
-}
-
-static __inline int
-setwin(sc,addr)
- struct dgb_softc *sc;
- unsigned int addr;
-{
- if(sc->type==PCXEVE) {
- outb(bmws.port=sc->port+1, bmws.data=FEPWIN|(addr>>13));
- DPRINT3(DB_WIN,"dgb%d: switched to window 0x%x\n",sc->unit,addr>>13);
- return (addr & 0x1FFF);
- } else {
- outb(bmws.port=sc->port,bmws.data=FEPMEM);
- return addr;
- }
-}
-
-static __inline int
-setinitwin(sc,addr)
- struct dgb_softc *sc;
- unsigned int addr;
-{
- if(sc->type==PCXEVE) {
- outb(bmws.port=sc->port+1, bmws.data=FEPWIN|(addr>>13));
- DPRINT3(DB_WIN,"dgb%d: switched to window 0x%x\n",sc->unit,addr>>13);
- return (addr & 0x1FFF);
- } else {
- outb(bmws.port=sc->port,bmws.data=inb(sc->port)|FEPMEM);
- return addr;
- }
-}
-
-static __inline void
-hidewin(sc)
- struct dgb_softc *sc;
-{
- bmws.data=0;
- if(sc->type==PCXEVE)
- outb(bmws.port=sc->port+1, bmws.data);
- else
- outb(bmws.port=sc->port, bmws.data);
-}
-
-static __inline void
-towin(sc,win)
- struct dgb_softc *sc;
- int win;
-{
- if(sc->type==PCXEVE) {
- outb(bmws.port=sc->port+1, bmws.data=win);
- } else {
- outb(bmws.port=sc->port,bmws.data=FEPMEM);
- }
-}
-
-static int
-dgbprobe(dev)
- struct isa_device *dev;
-{
- struct dgb_softc *sc= &dgb_softc[dev->id_unit];
- int i, v;
- u_long win_size; /* size of vizible memory window */
- int unit=dev->id_unit;
- static int once;
-
- if (!once++)
- cdevsw_add(&dgb_cdevsw);
- sc->unit=dev->id_unit;
- sc->port=dev->id_iobase;
-
- if(dev->id_flags & DGBFLAG_ALTPIN)
- sc->altpin=1;
- else
- sc->altpin=0;
-
- /* left 24 bits only (ISA address) */
- sc->pmem=((intptr_t)(void *)dev->id_maddr & 0xFFFFFF);
-
- DPRINT4(DB_INFO,"dgb%d: port 0x%x mem 0x%lx\n",unit,sc->port,sc->pmem);
-
- outb(sc->port, FEPRST);
- sc->status=DISABLED;
-
- for(i=0; i< 1000; i++) {
- DELAY(1);
- if( (inb(sc->port) & FEPMASK) == FEPRST ) {
- sc->status=ENABLED;
- DPRINT3(DB_EXCEPT,"dgb%d: got reset after %d us\n",unit,i);
- break;
- }
- }
-
- if(sc->status!=ENABLED) {
- DPRINT2(DB_EXCEPT,"dgb%d: failed to respond\n",dev->id_unit);
- return 0;
- }
-
- /* check type of card and get internal memory characteristics */
-
- v=inb(sc->port);
-
- if( v & 0x1 ) {
- switch( v&0x30 ) {
- case 0:
- sc->mem_seg=0xF000;
- win_size=0x10000;
- printf("dgb%d: PC/Xi 64K\n",dev->id_unit);
- break;
- case 0x10:
- sc->mem_seg=0xE000;
- win_size=0x20000;
- printf("dgb%d: PC/Xi 128K\n",dev->id_unit);
- break;
- case 0x20:
- sc->mem_seg=0xC000;
- win_size=0x40000;
- printf("dgb%d: PC/Xi 256K\n",dev->id_unit);
- break;
- default: /* case 0x30: */
- sc->mem_seg=0x8000;
- win_size=0x80000;
- printf("dgb%d: PC/Xi 512K\n",dev->id_unit);
- break;
- }
- sc->type=PCXI;
- } else {
- outb(sc->port, 1);
- v=inb(sc->port);
-
- if( v & 0x1 ) {
- printf("dgb%d: PC/Xm isn't supported\n",dev->id_unit);
- sc->status=DISABLED;
- return 0;
- }
-
- sc->mem_seg=0xF000;
-
- if(dev->id_flags==DGBFLAG_NOWIN || ( v&0xC0 )==0) {
- win_size=0x10000;
- printf("dgb%d: PC/Xe 64K\n",dev->id_unit);
- sc->type=PCXE;
- } else {
- win_size=0x2000;
- printf("dgb%d: PC/Xe 64/8K (windowed)\n",dev->id_unit);
- sc->type=PCXEVE;
- if((u_long)sc->pmem & ~0xFFE000) {
- printf("dgb%d: warning: address 0x%lx truncated to 0x%lx\n",
- dev->id_unit, sc->pmem,
- sc->pmem & 0xFFE000);
-
- dev->id_maddr= (u_char *)(void *)(intptr_t)( sc->pmem & 0xFFE000 );
- }
- }
- }
-
- /* save size of vizible memory segment */
- dev->id_msize=win_size;
-
- /* map memory */
- dev->id_maddr=sc->vmem=pmap_mapdev(sc->pmem,dev->id_msize);
-
- outb(sc->port, FEPCLR); /* drop RESET */
- hidewin(sc); /* Helg: to set initial bmws state */
-
- return 4; /* we need I/O space of 4 ports */
-}
-
-static int
-dgbattach(dev)
- struct isa_device *dev;
-{
- int unit=dev->id_unit;
- struct dgb_softc *sc= &dgb_softc[dev->id_unit];
- int i, t;
- u_char volatile *mem;
- u_char volatile *ptr;
- int addr;
- struct dgb_p *port;
- volatile struct board_chan *bc;
- int shrinkmem;
- int nfails;
- ushort *pstat;
- int lowwater;
- static int nports=0;
- char suffix;
-
- if(sc->status!=ENABLED) {
- DPRINT2(DB_EXCEPT,"dbg%d: try to attach a disabled card\n",unit);
- return 0;
- }
-
- mem=sc->vmem;
-
- DPRINT3(DB_INFO,"dgb%d: internal memory segment 0x%x\n",unit,sc->mem_seg);
-
- outb(sc->port, FEPRST); DELAY(1);
-
- for(i=0; (inb(sc->port) & FEPMASK) != FEPRST ; i++) {
- if(i>10000) {
- printf("dgb%d: 1st reset failed\n",dev->id_unit);
- sc->status=DISABLED;
- hidewin(sc);
- return 0;
- }
- DELAY(1);
- }
-
- DPRINT3(DB_INFO,"dgb%d: got reset after %d us\n",unit,i);
-
- /* for PCXEVE set up interrupt and base address */
-
- if(sc->type==PCXEVE) {
- t=(((u_long)sc->pmem>>8) & 0xFFE0) | 0x10 /* enable windowing */;
- /* IRQ isn't used */
- outb(sc->port+2,t & 0xFF);
- outb(sc->port+3,t>>8);
- } else if(sc->type==PCXE) {
- t=(((u_long)sc->pmem>>8) & 0xFFE0) /* disable windowing */;
- outb(sc->port+2,t & 0xFF);
- outb(sc->port+3,t>>8);
- }
-
-
- if(sc->type==PCXI || sc->type==PCXE) {
- outb(sc->port, FEPRST|FEPMEM); DELAY(1);
-
- for(i=0; (inb(sc->port) & FEPMASK) != (FEPRST|FEPMEM) ; i++) {
- if(i>10000) {
- printf("dgb%d: 2nd reset failed\n",dev->id_unit);
- sc->status=DISABLED;
- hidewin(sc);
- return 0;
- }
- DELAY(1);
- }
-
- DPRINT3(DB_INFO,"dgb%d: got memory after %d us\n",unit,i);
- }
-
- mem=sc->vmem;
-
- /* very short memory test */
-
- addr=setinitwin(sc,BOTWIN);
- *(u_long volatile *)(mem+addr) = 0xA55A3CC3;
- if(*(u_long volatile *)(mem+addr)!=0xA55A3CC3) {
- printf("dgb%d: 1st memory test failed\n",dev->id_unit);
- sc->status=DISABLED;
- hidewin(sc);
- return 0;
- }
-
- addr=setinitwin(sc,TOPWIN);
- *(u_long volatile *)(mem+addr) = 0x5AA5C33C;
- if(*(u_long volatile *)(mem+addr)!=0x5AA5C33C) {
- printf("dgb%d: 2nd memory test failed\n",dev->id_unit);
- sc->status=DISABLED;
- hidewin(sc);
- return 0;
- }
-
- addr=setinitwin(sc,BIOSCODE+((0xF000-sc->mem_seg)<<4));
- *(u_long volatile *)(mem+addr) = 0x5AA5C33C;
- if(*(u_long volatile *)(mem+addr)!=0x5AA5C33C) {
- printf("dgb%d: 3rd (BIOS) memory test failed\n",dev->id_unit);
- }
-
- addr=setinitwin(sc,MISCGLOBAL);
- for(i=0; i<16; i++) {
- mem[addr+i]=0;
- }
-
- if(sc->type==PCXI || sc->type==PCXE) {
-
- addr=BIOSCODE+((0xF000-sc->mem_seg)<<4);
-
- DPRINT3(DB_INFO,"dgb%d: BIOS local address=0x%x\n",unit,addr);
-
- ptr= mem+addr;
-
- for(i=0; i<pcxx_nbios; i++, ptr++)
- *ptr = pcxx_bios[i];
-
- ptr= mem+addr;
-
- nfails=0;
- for(i=0; i<pcxx_nbios; i++, ptr++)
- if( *ptr != pcxx_bios[i] ) {
- DPRINT5(DB_EXCEPT,"dgb%d: wrong code in BIOS at addr 0x%x : \
-0x%x instead of 0x%x\n", unit, ptr-(mem+addr), *ptr, pcxx_bios[i] );
-
- if(++nfails>=5) {
- printf("dgb%d: 4th memory test (BIOS load) fails\n",unit);
- break;
- }
- }
-
- outb(sc->port,FEPMEM);
-
- for(i=0; (inb(sc->port) & FEPMASK) != FEPMEM ; i++) {
- if(i>10000) {
- printf("dgb%d: BIOS start failed\n",dev->id_unit);
- sc->status=DISABLED;
- hidewin(sc);
- return 0;
- }
- DELAY(1);
- }
-
- DPRINT3(DB_INFO,"dgb%d: reset dropped after %d us\n",unit,i);
-
- for(i=0; i<200000; i++) {
- if( *((ushort volatile *)(mem+MISCGLOBAL)) == *((ushort *)"GD") )
- goto load_fep;
- DELAY(1);
- }
- printf("dgb%d: BIOS download failed\n",dev->id_unit);
- DPRINT4(DB_EXCEPT,"dgb%d: code=0x%x must be 0x%x\n",
- dev->id_unit,
- *((ushort volatile *)(mem+MISCGLOBAL)),
- *((ushort *)"GD"));
-
- sc->status=DISABLED;
- hidewin(sc);
- return 0;
- }
-
- if(sc->type==PCXEVE) {
- /* set window 7 */
- outb(sc->port+1,0xFF);
-
- ptr= mem+(BIOSCODE & 0x1FFF);
-
- for(i=0; i<pcxx_nbios; i++)
- *ptr++ = pcxx_bios[i];
-
- ptr= mem+(BIOSCODE & 0x1FFF);
-
- nfails=0;
- for(i=0; i<pcxx_nbios; i++, ptr++)
- if( *ptr != pcxx_bios[i] ) {
- DPRINT5(DB_EXCEPT,"dgb%d: wrong code in BIOS at addr 0x%x : \
-0x%x instead of 0x%x\n", unit, ptr-(mem+addr), *ptr, pcxx_bios[i] );
-
- if(++nfails>=5) {
- printf("dgb%d: 4th memory test (BIOS load) fails\n",unit);
- break;
- }
- }
-
- outb(sc->port,FEPCLR);
-
- setwin(sc,0);
-
- for(i=0; (inb(sc->port) & FEPMASK) != FEPCLR ; i++) {
- if(i>10000) {
- printf("dgb%d: BIOS start failed\n",dev->id_unit);
- sc->status=DISABLED;
- hidewin(sc);
- return 0;
- }
- DELAY(1);
- }
-
- DPRINT3(DB_INFO,"dgb%d: reset dropped after %d us\n",unit,i);
-
- addr=setwin(sc,MISCGLOBAL);
-
- for(i=0; i<200000; i++) {
- if(*(ushort volatile *)(mem+addr)== *(ushort *)"GD")
- goto load_fep;
- DELAY(1);
- }
- printf("dgb%d: BIOS download failed\n",dev->id_unit);
- DPRINT5(DB_EXCEPT,"dgb%d: Error#(0x%x,0x%x) code=0x%x\n",
- dev->id_unit,
- *(ushort volatile *)(mem+0xC12),
- *(ushort volatile *)(mem+0xC14),
- *(ushort volatile *)(mem+MISCGLOBAL));
-
- sc->status=DISABLED;
- hidewin(sc);
- return 0;
- }
-
-load_fep:
- DPRINT2(DB_INFO,"dgb%d: BIOS loaded\n",dev->id_unit);
-
- addr=setwin(sc,FEPCODE);
-
- ptr= mem+addr;
-
- for(i=0; i<pcxx_ncook; i++)
- *ptr++ = pcxx_cook[i];
-
- addr=setwin(sc,MBOX);
- *(ushort volatile *)(mem+addr+ 0)=2;
- *(ushort volatile *)(mem+addr+ 2)=sc->mem_seg+FEPCODESEG;
- *(ushort volatile *)(mem+addr+ 4)=0;
- *(ushort volatile *)(mem+addr+ 6)=FEPCODESEG;
- *(ushort volatile *)(mem+addr+ 8)=0;
- *(ushort volatile *)(mem+addr+10)=pcxx_ncook;
-
- outb(sc->port,FEPMEM|FEPINT); /* send interrupt to BIOS */
- outb(sc->port,FEPMEM);
-
- for(i=0; *(ushort volatile *)(mem+addr)!=0; i++) {
- if(i>200000) {
- printf("dgb%d: FEP code download failed\n",unit);
- DPRINT3(DB_EXCEPT,"dgb%d: code=0x%x must be 0\n", unit,
- *(ushort volatile *)(mem+addr));
- sc->status=DISABLED;
- hidewin(sc);
- return 0;
- }
- }
-
- DPRINT2(DB_INFO,"dgb%d: FEP code loaded\n",unit);
-
- *(ushort volatile *)(mem+setwin(sc,FEPSTAT))=0;
- addr=setwin(sc,MBOX);
- *(ushort volatile *)(mem+addr+0)=1;
- *(ushort volatile *)(mem+addr+2)=FEPCODESEG;
- *(ushort volatile *)(mem+addr+4)=0x4;
-
- outb(sc->port,FEPINT); /* send interrupt to BIOS */
- outb(sc->port,FEPCLR);
-
- addr=setwin(sc,FEPSTAT);
- for(i=0; *(ushort volatile *)(mem+addr)!= *(ushort *)"OS"; i++) {
- if(i>200000) {
- printf("dgb%d: FEP/OS start failed\n",dev->id_unit);
- sc->status=DISABLED;
- hidewin(sc);
- return 0;
- }
- }
-
- DPRINT2(DB_INFO,"dgb%d: FEP/OS started\n",dev->id_unit);
-
- sc->numports= *(ushort volatile *)(mem+setwin(sc,NPORT));
-
- printf("dgb%d: %d ports\n",unit,sc->numports);
-
- if(sc->numports > MAX_DGB_PORTS) {
- printf("dgb%d: too many ports\n",unit);
- sc->status=DISABLED;
- hidewin(sc);
- return 0;
- }
-
- if(nports+sc->numports>NDGBPORTS) {
- printf("dgb%d: only %d ports are usable\n", unit, NDGBPORTS-nports);
- sc->numports=NDGBPORTS-nports;
- }
-
- /* allocate port and tty structures */
- sc->ports=&dgb_ports[nports];
- sc->ttys=&dgb_tty[nports];
- nports+=sc->numports;
-
- addr=setwin(sc,PORTBASE);
- pstat=(ushort volatile *)(mem+addr);
-
- for(i=0; i<sc->numports && pstat[i]; i++)
- if(pstat[i])
- sc->ports[i].status=ENABLED;
- else {
- sc->ports[i].status=DISABLED;
- printf("dgb%d: port%d is broken\n", unit, i);
- }
-
- /* We should now init per-port structures */
- bc=(volatile struct board_chan *)(mem + CHANSTRUCT);
- sc->mailbox=(volatile struct global_data *)(mem + FEP_GLOBAL);
-
- if(sc->numports<3)
- shrinkmem=1;
- else
- shrinkmem=0;
-
- for(i=0; i<sc->numports; i++, bc++) {
- port= &sc->ports[i];
-
- port->tty=&sc->ttys[i];
- port->unit=unit;
-
- port->brdchan=bc;
-
- if(sc->altpin) {
- port->dsr=CD;
- port->dcd=DSR;
- } else {
- port->dcd=CD;
- port->dsr=DSR;
- }
-
- port->pnum=i;
-
- if(shrinkmem) {
- DPRINT2(DB_INFO,"dgb%d: shrinking memory\n",unit);
- fepcmd(port, SETBUFFER, 32, 0, 0, 0);
- shrinkmem=0;
- }
-
- if(sc->type!=PCXEVE) {
- port->txptr=mem+((bc->tseg-sc->mem_seg)<<4);
- port->rxptr=mem+((bc->rseg-sc->mem_seg)<<4);
- port->txwin=port->rxwin=0;
- } else {
- port->txptr=mem+( ((bc->tseg-sc->mem_seg)<<4) & 0x1FFF );
- port->rxptr=mem+( ((bc->rseg-sc->mem_seg)<<4) & 0x1FFF );
- port->txwin=FEPWIN | ((bc->tseg-sc->mem_seg)>>9);
- port->rxwin=FEPWIN | ((bc->rseg-sc->mem_seg)>>9);
- }
-
- port->txbufhead=0;
- port->rxbufhead=0;
- port->txbufsize=bc->tmax+1;
- port->rxbufsize=bc->rmax+1;
-
- lowwater= (port->txbufsize>=2000) ? 1024 : (port->txbufsize/2);
- setwin(sc,0);
- fepcmd(port, STXLWATER, lowwater, 0, 10, 0);
- fepcmd(port, SRXLWATER, port->rxbufsize/4, 0, 10, 0);
- fepcmd(port, SRXHWATER, 3*port->rxbufsize/4, 0, 10, 0);
-
- bc->edelay=100;
- bc->idata=1;
-
- port->startc=bc->startc;
- port->startca=bc->startca;
- port->stopc=bc->stopc;
- port->stopca=bc->stopca;
-
- /*port->close_delay=50;*/
- port->close_delay=3 * hz;
- port->do_timestamp=0;
- port->do_dcd_timestamp=0;
-
- /*
- * We don't use all the flags from <sys/ttydefaults.h> since they
- * are only relevant for logins. It's important to have echo off
- * initially so that the line doesn't start blathering before the
- * echo flag can be turned off.
- */
- port->it_in.c_iflag = TTYDEF_IFLAG;
- port->it_in.c_oflag = TTYDEF_OFLAG;
- port->it_in.c_cflag = TTYDEF_CFLAG;
- port->it_in.c_lflag = TTYDEF_LFLAG;
- termioschars(&port->it_in);
- port->it_in.c_ispeed = port->it_in.c_ospeed = dgbdefaultrate;
- port->it_out = port->it_in;
- /* MAX_DGB_PORTS is 32 => [0-9a-v] */
- suffix = i < 10 ? '0' + i : 'a' + i - 10;
- make_dev(&dgb_cdevsw, (unit*32)+i,
- UID_ROOT, GID_WHEEL, 0600, "ttyD%d%c", unit, suffix);
-
- make_dev(&dgb_cdevsw, (unit*32)+i+32,
- UID_ROOT, GID_WHEEL, 0600, "ttyiD%d%c", unit, suffix);
-
- make_dev(&dgb_cdevsw, (unit*32)+i+64,
- UID_ROOT, GID_WHEEL, 0600, "ttylD%d%c", unit, suffix);
-
- make_dev(&dgb_cdevsw, (unit*32)+i+128,
- UID_UUCP, GID_DIALER, 0660, "cuaD%d%c", unit, suffix);
-
- make_dev(&dgb_cdevsw, (unit*32)+i+160,
- UID_UUCP, GID_DIALER, 0660, "cuaiD%d%c", unit, suffix);
-
- make_dev(&dgb_cdevsw, (unit*32)+i+192,
- UID_UUCP, GID_DIALER, 0660, "cualD%d%c", unit, suffix);
- }
-
- hidewin(sc);
-
- /* register the polling function */
- timeout(dgbpoll, (void *)unit, hz/POLLSPERSEC);
-
- return 1;
-}
-
-/* ARGSUSED */
-static int
-dgbopen(dev, flag, mode, p)
- dev_t dev;
- int flag;
- int mode;
- struct proc *p;
-{
- struct dgb_softc *sc;
- struct tty *tp;
- int unit;
- int mynor;
- int pnum;
- struct dgb_p *port;
- int s,cs;
- int error;
- volatile struct board_chan *bc;
-
- error=0;
-
- mynor=minor(dev);
- unit=MINOR_TO_UNIT(mynor);
- pnum=MINOR_TO_PORT(mynor);
-
- if(unit >= NDGB) {
- DPRINT2(DB_EXCEPT,"dgb%d: try to open a nonexisting card\n",unit);
- return ENXIO;
- }
-
- sc=&dgb_softc[unit];
-
- if(sc->status!=ENABLED) {
- DPRINT2(DB_EXCEPT,"dgb%d: try to open a disabled card\n",unit);
- return ENXIO;
- }
-
- if(pnum>=sc->numports) {
- DPRINT3(DB_EXCEPT,"dgb%d: try to open non-existing port %d\n",unit,pnum);
- return ENXIO;
- }
-
- if(mynor & CONTROL_MASK)
- return 0;
-
- tp=&sc->ttys[pnum];
- dev->si_tty = tp;
- port=&sc->ports[pnum];
- bc=port->brdchan;
-
-open_top:
-
- s=spltty();
-
- while(port->closing) {
- error=tsleep(&port->closing, TTOPRI|PCATCH, "dgocl", 0);
-
- if(error) {
- DPRINT4(DB_OPEN,"dgb%d: port%d: tsleep(dgocl) error=%d\n",unit,pnum,error);
- goto out;
- }
- }
-
- if (tp->t_state & TS_ISOPEN) {
- /*
- * The device is open, so everything has been initialized.
- * Handle conflicts.
- */
- if (mynor & CALLOUT_MASK) {
- if (!port->active_out) {
- error = EBUSY;
- DPRINT4(DB_OPEN,"dgb%d: port%d: BUSY error=%d\n",unit,pnum,error);
- goto out;
- }
- } else {
- if (port->active_out) {
- if (flag & O_NONBLOCK) {
- error = EBUSY;
- DPRINT4(DB_OPEN,"dgb%d: port%d: BUSY error=%d\n",unit,pnum,error);
- goto out;
- }
- error = tsleep(&port->active_out,
- TTIPRI | PCATCH, "dgbi", 0);
- if (error != 0) {
- DPRINT4(DB_OPEN,"dgb%d: port%d: tsleep(dgbi) error=%d\n",
- unit,pnum,error);
- goto out;
- }
- splx(s);
- goto open_top;
- }
- }
- if (tp->t_state & TS_XCLUDE &&
- suser(p)) {
- error = EBUSY;
- goto out;
- }
- } else {
- /*
- * The device isn't open, so there are no conflicts.
- * Initialize it. Initialization is done twice in many
- * cases: to preempt sleeping callin opens if we are
- * callout, and to complete a callin open after DCD rises.
- */
- tp->t_oproc=dgbstart;
- tp->t_param=dgbparam;
- tp->t_stop=dgbstop;
- tp->t_dev=dev;
- tp->t_termios= (mynor & CALLOUT_MASK) ?
- port->it_out :
- port->it_in;
-
- cs=splclock();
- setwin(sc,0);
- port->imodem=bc->mstat;
- bc->rout=bc->rin; /* clear input queue */
- bc->idata=1;
-#ifdef PRINT_BUFSIZE
- printf("dgb buffers tx=%x:%x rx=%x:%x\n",bc->tseg,bc->tmax,bc->rseg,bc->rmax);
-#endif
-
- hidewin(sc);
- splx(cs);
-
- port->wopeners++;
- error=dgbparam(tp, &tp->t_termios);
- port->wopeners--;
-
- if(error!=0) {
- DPRINT4(DB_OPEN,"dgb%d: port%d: dgbparam error=%d\n",unit,pnum,error);
- goto out;
- }
-
- /* handle fake DCD for callout devices */
- /* and initial DCD */
-
- if( (port->imodem & port->dcd) || mynor & CALLOUT_MASK )
- linesw[tp->t_line].l_modem(tp,1);
-
- }
-
- /*
- * Wait for DCD if necessary.
- */
- if (!(tp->t_state & TS_CARR_ON) && !(mynor & CALLOUT_MASK)
- && !(tp->t_cflag & CLOCAL) && !(flag & O_NONBLOCK)) {
- ++port->wopeners;
- error = tsleep(TSA_CARR_ON(tp), TTIPRI | PCATCH, "dgdcd", 0);
- --port->wopeners;
- if (error != 0) {
- DPRINT4(DB_OPEN,"dgb%d: port%d: tsleep(dgdcd) error=%d\n",unit,pnum,error);
- goto out;
- }
- splx(s);
- goto open_top;
- }
- error = linesw[tp->t_line].l_open(dev, tp);
- disc_optim(tp,&tp->t_termios);
- DPRINT4(DB_OPEN,"dgb%d: port%d: l_open error=%d\n",unit,pnum,error);
-
- if (tp->t_state & TS_ISOPEN && mynor & CALLOUT_MASK)
- port->active_out = TRUE;
-
- port->used=1;
-
- /* If any port is open (i.e. the open() call is completed for it)
- * the device is busy
- */
-
-out:
- disc_optim(tp,&tp->t_termios);
- splx(s);
-
- if( !(tp->t_state & TS_ISOPEN) && port->wopeners==0 )
- dgbhardclose(port);
-
- DPRINT4(DB_OPEN,"dgb%d: port%d: open() returns %d\n",unit,pnum,error);
-
- return error;
-}
-
-/*ARGSUSED*/
-static int
-dgbclose(dev, flag, mode, p)
- dev_t dev;
- int flag;
- int mode;
- struct proc *p;
-{
- int mynor;
- struct tty *tp;
- int unit, pnum;
- struct dgb_softc *sc;
- struct dgb_p *port;
- int s;
- int i;
-
- mynor=minor(dev);
- if(mynor & CONTROL_MASK)
- return 0;
- unit=MINOR_TO_UNIT(mynor);
- pnum=MINOR_TO_PORT(mynor);
-
- sc=&dgb_softc[unit];
- tp=&sc->ttys[pnum];
- port=sc->ports+pnum;
-
- DPRINT3(DB_CLOSE,"dgb%d: port%d: closing\n",unit,pnum);
-
- DPRINT3(DB_CLOSE,"dgb%d: port%d: draining port\n",unit,pnum);
- dgb_drain_or_flush(port);
-
- s=spltty();
-
- port->closing=1;
- DPRINT3(DB_CLOSE,"dgb%d: port%d: closing line disc\n",unit,pnum);
- linesw[tp->t_line].l_close(tp,flag);
- disc_optim(tp,&tp->t_termios);
-
- DPRINT3(DB_CLOSE,"dgb%d: port%d: hard closing\n",unit,pnum);
- dgbhardclose(port);
- DPRINT3(DB_CLOSE,"dgb%d: port%d: closing tty\n",unit,pnum);
- ttyclose(tp);
- port->closing=0;
- wakeup(&port->closing);
- port->used=0;
-
- /* mark the card idle when all ports are closed */
-
- for(i=0; i<sc->numports; i++)
- if(sc->ports[i].used)
- break;
-
- splx(s);
-
- DPRINT3(DB_CLOSE,"dgb%d: port%d: closed\n",unit,pnum);
-
- wakeup(TSA_CARR_ON(tp));
- wakeup(&port->active_out);
- port->active_out=0;
-
- DPRINT3(DB_CLOSE,"dgb%d: port%d: close exit\n",unit,pnum);
-
- return 0;
-}
-
-static void
-dgbhardclose(port)
- struct dgb_p *port;
-{
- struct dgb_softc *sc=&dgb_softc[port->unit];
- volatile struct board_chan *bc=port->brdchan;
- int cs;
-
- cs=splclock();
- port->do_timestamp = 0;
- setwin(sc,0);
-
- bc->idata=0; bc->iempty=0; bc->ilow=0;
- if(port->tty->t_cflag & HUPCL) {
- port->omodem &= ~(RTS|DTR);
- fepcmd(port, SETMODEM, 0, DTR|RTS, 0, 1);
- }
-
- hidewin(sc);
- splx(cs);
-
- timeout(dgb_pause, &port->brdchan, hz/2);
- tsleep(&port->brdchan, TTIPRI | PCATCH, "dgclo", 0);
-}
-
-static void
-dgb_pause(chan)
- void *chan;
-{
- wakeup((caddr_t)chan);
-}
-
-static void
-dgbpoll(unit_c)
- void *unit_c;
-{
- int unit=(int)unit_c;
- int pnum;
- struct dgb_p *port;
- struct dgb_softc *sc=&dgb_softc[unit];
- int head, tail;
- u_char *eventbuf;
- int event, mstat, lstat;
- volatile struct board_chan *bc;
- struct tty *tp;
- int rhead, rtail;
- int whead, wtail;
- int size;
- u_char *ptr;
- int ocount;
- int ibuf_full,obuf_full;
-
- BoardMemWinState ws=bmws_get();
-
- if(sc->status==DISABLED) {
- printf("dgb%d: polling of disabled board stopped\n",unit);
- return;
- }
-
- setwin(sc,0);
-
- head=sc->mailbox->ein;
- tail=sc->mailbox->eout;
-
- while(head!=tail) {
- if(head >= FEP_IMAX-FEP_ISTART
- || tail >= FEP_IMAX-FEP_ISTART
- || (head|tail) & 03 ) {
- printf("dgb%d: event queue's head or tail is wrong! hd=%d,tl=%d\n", unit,head,tail);
- break;
- }
-
- eventbuf=sc->vmem+tail+FEP_ISTART;
- pnum=eventbuf[0];
- event=eventbuf[1];
- mstat=eventbuf[2];
- lstat=eventbuf[3];
-
- port=&sc->ports[pnum];
- bc=port->brdchan;
- tp=&sc->ttys[pnum];
-
- if(pnum>=sc->numports || port->status==DISABLED) {
- printf("dgb%d: port%d: got event on nonexisting port\n",unit,pnum);
- } else if(port->used || port->wopeners>0 ) {
-
- int wrapmask=port->rxbufsize-1;
-
- if( !(event & ALL_IND) )
- printf("dgb%d: port%d: ? event 0x%x mstat 0x%x lstat 0x%x\n",
- unit, pnum, event, mstat, lstat);
-
- if(event & DATA_IND) {
- DPRINT3(DB_DATA,"dgb%d: port%d: DATA_IND\n",unit,pnum);
-
- rhead=bc->rin & wrapmask;
- rtail=bc->rout & wrapmask;
-
- if( !(tp->t_cflag & CREAD) || !port->used ) {
- bc->rout=rhead;
- goto end_of_data;
- }
-
- if(bc->orun) {
- printf("dgb%d: port%d: overrun\n", unit, pnum);
- bc->orun=0;
- }
-
- if(!(tp->t_state & TS_ISOPEN))
- goto end_of_data;
-
- for(ibuf_full=FALSE;rhead!=rtail && !ibuf_full;) {
- DPRINT5(DB_RXDATA,"dgb%d: port%d: p rx head=%d tail=%d\n",
- unit,pnum,rhead,rtail);
-
- if(rhead>rtail)
- size=rhead-rtail;
- else
- size=port->rxbufsize-rtail;
-
- ptr=port->rxptr+rtail;
-
-/* Helg: */
- if( tp->t_rawq.c_cc + size > DGB_IBUFSIZE ) {
- size=DGB_IBUFSIZE-tp->t_rawq.c_cc;
- DPRINT1(DB_RXDATA,"*");
- ibuf_full=TRUE;
- }
-
- if(size) {
- if (tp->t_state & TS_CAN_BYPASS_L_RINT) {
- DPRINT1(DB_RXDATA,"!");
- towin(sc,port->rxwin);
- tk_nin += size;
- tk_rawcc += size;
- tp->t_rawcc += size;
- b_to_q(ptr,size,&tp->t_rawq);
- setwin(sc,0);
- } else {
- int i=size;
- unsigned char chr;
- do {
- towin(sc,port->rxwin);
- chr= *ptr++;
- hidewin(sc);
- (*linesw[tp->t_line].l_rint)(chr, tp);
- } while (--i > 0 );
- setwin(sc,0);
- }
- }
- rtail= (rtail + size) & wrapmask;
- bc->rout=rtail;
- rhead=bc->rin & wrapmask;
- hidewin(sc);
- ttwakeup(tp);
- setwin(sc,0);
- }
- end_of_data: ;
- }
-
- if(event & MODEMCHG_IND) {
- DPRINT3(DB_MODEM,"dgb%d: port%d: MODEMCHG_IND\n",unit,pnum);
- port->imodem=mstat;
- if(mstat & port->dcd) {
- hidewin(sc);
- linesw[tp->t_line].l_modem(tp,1);
- setwin(sc,0);
- wakeup(TSA_CARR_ON(tp));
- } else {
- hidewin(sc);
- linesw[tp->t_line].l_modem(tp,0);
- setwin(sc,0);
- if( port->draining) {
- port->draining=0;
- wakeup(&port->draining);
- }
- }
- }
-
- if(event & BREAK_IND) {
- if((tp->t_state & TS_ISOPEN) && (tp->t_iflag & IGNBRK)) {
- DPRINT3(DB_BREAK,"dgb%d: port%d: BREAK_IND\n",unit,pnum);
- hidewin(sc);
- linesw[tp->t_line].l_rint(TTY_BI, tp);
- setwin(sc,0);
- }
- }
-
-/* Helg: with output flow control */
-
- if(event & (LOWTX_IND | EMPTYTX_IND) ) {
- DPRINT3(DB_TXDATA,"dgb%d: port%d: LOWTX_IND or EMPTYTX_IND\n",unit,pnum);
-
- if( (event & EMPTYTX_IND ) && tp->t_outq.c_cc==0
- && port->draining) {
- port->draining=0;
- wakeup(&port->draining);
- bc->ilow=0; bc->iempty=0;
- } else {
-
- int wrapmask=port->txbufsize-1;
-
- for(obuf_full=FALSE; tp->t_outq.c_cc!=0 && !obuf_full; ) {
- int s;
- /* add "last-minute" data to write buffer */
- if(!(tp->t_state & TS_BUSY)) {
- hidewin(sc);
-#ifndef TS_ASLEEP /* post 2.0.5 FreeBSD */
- ttwwakeup(tp);
-#else
- if(tp->t_outq.c_cc <= tp->t_lowat) {
- if(tp->t_state & TS_ASLEEP) {
- tp->t_state &= ~TS_ASLEEP;
- wakeup(TSA_OLOWAT(tp));
- }
- /* selwakeup(&tp->t_wsel); */
- }
-#endif
- setwin(sc,0);
- }
- s=spltty();
-
- whead=bc->tin & wrapmask;
- wtail=bc->tout & wrapmask;
-
- if(whead<wtail)
- size=wtail-whead-1;
- else {
- size=port->txbufsize-whead;
- if(wtail==0)
- size--;
- }
-
- if(size==0) {
- DPRINT5(DB_WR,"dgb: head=%d tail=%d size=%d full=%d\n",
- whead,wtail,size,obuf_full);
- bc->iempty=1; bc->ilow=1;
- obuf_full=TRUE;
- splx(s);
- break;
- }
-
- towin(sc,port->txwin);
-
- ocount=q_to_b(&tp->t_outq, port->txptr+whead, size);
- whead+=ocount;
-
- setwin(sc,0);
- bc->tin=whead;
- bc->tin=whead & wrapmask;
- splx(s);
- }
-
- if(obuf_full) {
- DPRINT1(DB_WR," +BUSY\n");
- tp->t_state|=TS_BUSY;
- } else {
- DPRINT1(DB_WR," -BUSY\n");
- hidewin(sc);
-#ifndef TS_ASLEEP /* post 2.0.5 FreeBSD */
- /* should clear TS_BUSY before ttwwakeup */
- if(tp->t_state & TS_BUSY) {
- tp->t_state &= ~TS_BUSY;
- linesw[tp->t_line].l_start(tp);
- ttwwakeup(tp);
- }
-#else
- if(tp->t_state & TS_ASLEEP) {
- tp->t_state &= ~TS_ASLEEP;
- wakeup(TSA_OLOWAT(tp));
- }
- tp->t_state &= ~TS_BUSY;
-#endif
- setwin(sc,0);
- }
- }
- }
- bc->idata=1; /* require event on incoming data */
-
- } else {
- bc=port->brdchan;
- DPRINT4(DB_EXCEPT,"dgb%d: port%d: got event 0x%x on closed port\n",
- unit,pnum,event);
- bc->rout=bc->rin;
- bc->idata=bc->iempty=bc->ilow=0;
- }
-
- tail= (tail+4) & (FEP_IMAX-FEP_ISTART-4);
- }
-
- sc->mailbox->eout=tail;
- bmws_set(ws);
-
- timeout(dgbpoll, unit_c, hz/POLLSPERSEC);
-}
-
-static int
-dgbioctl(dev, cmd, data, flag, p)
- dev_t dev;
- u_long cmd;
- caddr_t data;
- int flag;
- struct proc *p;
-{
- struct dgb_softc *sc;
- int unit, pnum;
- struct dgb_p *port;
- int mynor;
- struct tty *tp;
- volatile struct board_chan *bc;
- int error;
- int s,cs;
- int tiocm_xxx;
-
-#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
- u_long oldcmd;
- struct termios term;
-#endif
-
- BoardMemWinState ws=bmws_get();
-
- mynor=minor(dev);
- unit=MINOR_TO_UNIT(mynor);
- pnum=MINOR_TO_PORT(mynor);
-
- sc=&dgb_softc[unit];
- port=&sc->ports[pnum];
- tp=&sc->ttys[pnum];
- bc=port->brdchan;
-
- if (mynor & CONTROL_MASK) {
- struct termios *ct;
-
- switch (mynor & CONTROL_MASK) {
- case CONTROL_INIT_STATE:
- ct = mynor & CALLOUT_MASK ? &port->it_out : &port->it_in;
- break;
- case CONTROL_LOCK_STATE:
- ct = mynor & CALLOUT_MASK ? &port->lt_out : &port->lt_in;
- break;
- default:
- return (ENODEV); /* /dev/nodev */
- }
- switch (cmd) {
- case TIOCSETA:
- error = suser(p);
- if (error != 0)
- return (error);
- *ct = *(struct termios *)data;
- return (0);
- case TIOCGETA:
- *(struct termios *)data = *ct;
- return (0);
- case TIOCGETD:
- *(int *)data = TTYDISC;
- return (0);
- case TIOCGWINSZ:
- bzero(data, sizeof(struct winsize));
- return (0);
- default:
- return (ENOTTY);
- }
- }
-
-#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
- term = tp->t_termios;
- if (cmd == TIOCSETA || cmd == TIOCSETAW || cmd == TIOCSETAF) {
- DPRINT6(DB_PARAM,"dgb%d: port%d: dgbioctl-ISNOW c=0x%x i=0x%x l=0x%x\n",unit,pnum,term.c_cflag,term.c_iflag,term.c_lflag);
- }
- oldcmd = cmd;
- error = ttsetcompat(tp, &cmd, data, &term);
- if (error != 0)
- return (error);
- if (cmd != oldcmd)
- data = (caddr_t)&term;
-#endif
-
- if (cmd == TIOCSETA || cmd == TIOCSETAW || cmd == TIOCSETAF) {
- int cc;
- struct termios *dt = (struct termios *)data;
- struct termios *lt = mynor & CALLOUT_MASK
- ? &port->lt_out : &port->lt_in;
-
- DPRINT6(DB_PARAM,"dgb%d: port%d: dgbioctl-TOSET c=0x%x i=0x%x l=0x%x\n",unit,pnum,dt->c_cflag,dt->c_iflag,dt->c_lflag);
- dt->c_iflag = (tp->t_iflag & lt->c_iflag)
- | (dt->c_iflag & ~lt->c_iflag);
- dt->c_oflag = (tp->t_oflag & lt->c_oflag)
- | (dt->c_oflag & ~lt->c_oflag);
- dt->c_cflag = (tp->t_cflag & lt->c_cflag)
- | (dt->c_cflag & ~lt->c_cflag);
- dt->c_lflag = (tp->t_lflag & lt->c_lflag)
- | (dt->c_lflag & ~lt->c_lflag);
- for (cc = 0; cc < NCCS; ++cc)
- if (lt->c_cc[cc] != 0)
- dt->c_cc[cc] = tp->t_cc[cc];
- if (lt->c_ispeed != 0)
- dt->c_ispeed = tp->t_ispeed;
- if (lt->c_ospeed != 0)
- dt->c_ospeed = tp->t_ospeed;
- }
-
- if(cmd==TIOCSTOP) {
- cs=splclock();
- setwin(sc,0);
- fepcmd(port, PAUSETX, 0, 0, 0, 0);
- bmws_set(ws);
- splx(cs);
- return 0;
- } else if(cmd==TIOCSTART) {
- cs=splclock();
- setwin(sc,0);
- fepcmd(port, RESUMETX, 0, 0, 0, 0);
- bmws_set(ws);
- splx(cs);
- return 0;
- }
-
- if(cmd==TIOCSETAW || cmd==TIOCSETAF)
- port->mustdrain=1;
-
- error = linesw[tp->t_line].l_ioctl(tp, cmd, data, flag, p);
- if (error != ENOIOCTL)
- return error;
- s = spltty();
- error = ttioctl(tp, cmd, data, flag);
- disc_optim(tp,&tp->t_termios);
- port->mustdrain=0;
- if (error != ENOIOCTL) {
- splx(s);
- if (cmd == TIOCSETA || cmd == TIOCSETAW || cmd == TIOCSETAF) {
- DPRINT6(DB_PARAM,"dgb%d: port%d: dgbioctl-RES c=0x%x i=0x%x l=0x%x\n",unit,pnum,tp->t_cflag,tp->t_iflag,tp->t_lflag);
- }
- return error;
- }
-
- switch (cmd) {
- case TIOCSBRK:
-/* Helg: commented */
-/* error=dgbdrain(port);*/
-
- if(error!=0) {
- splx(s);
- return error;
- }
-
- cs=splclock();
- setwin(sc,0);
-
- /* now it sends 250 millisecond break because I don't know */
- /* how to send an infinite break */
-
- fepcmd(port, SENDBREAK, 250, 0, 10, 0);
- hidewin(sc);
- splx(cs);
- break;
- case TIOCCBRK:
- /* now it's empty */
- break;
- case TIOCSDTR:
- DPRINT3(DB_MODEM,"dgb%d: port%d: set DTR\n",unit,pnum);
- port->omodem |= DTR;
- cs=splclock();
- setwin(sc,0);
- fepcmd(port, SETMODEM, port->omodem, RTS, 0, 1);
-
- if( !(bc->mstat & DTR) ) {
- DPRINT3(DB_MODEM,"dgb%d: port%d: DTR is off\n",unit,pnum);
- }
-
- hidewin(sc);
- splx(cs);
- break;
- case TIOCCDTR:
- DPRINT3(DB_MODEM,"dgb%d: port%d: reset DTR\n",unit,pnum);
- port->omodem &= ~DTR;
- cs=splclock();
- setwin(sc,0);
- fepcmd(port, SETMODEM, port->omodem, RTS|DTR, 0, 1);
-
- if( bc->mstat & DTR ) {
- DPRINT3(DB_MODEM,"dgb%d: port%d: DTR is on\n",unit,pnum);
- }
-
- hidewin(sc);
- splx(cs);
- break;
- case TIOCMSET:
- if(*(int *)data & TIOCM_DTR)
- port->omodem |=DTR;
- else
- port->omodem &=~DTR;
-
- if(*(int *)data & TIOCM_RTS)
- port->omodem |=RTS;
- else
- port->omodem &=~RTS;
-
- cs=splclock();
- setwin(sc,0);
- fepcmd(port, SETMODEM, port->omodem, RTS|DTR, 0, 1);
- hidewin(sc);
- splx(cs);
- break;
- case TIOCMBIS:
- if(*(int *)data & TIOCM_DTR)
- port->omodem |=DTR;
-
- if(*(int *)data & TIOCM_RTS)
- port->omodem |=RTS;
-
- cs=splclock();
- setwin(sc,0);
- fepcmd(port, SETMODEM, port->omodem, RTS|DTR, 0, 1);
- hidewin(sc);
- splx(cs);
- break;
- case TIOCMBIC:
- if(*(int *)data & TIOCM_DTR)
- port->omodem &=~DTR;
-
- if(*(int *)data & TIOCM_RTS)
- port->omodem &=~RTS;
-
- cs=splclock();
- setwin(sc,0);
- fepcmd(port, SETMODEM, port->omodem, RTS|DTR, 0, 1);
- hidewin(sc);
- splx(cs);
- break;
- case TIOCMGET:
- setwin(sc,0);
- port->imodem=bc->mstat;
- hidewin(sc);
-
- tiocm_xxx = TIOCM_LE; /* XXX - always enabled while open */
-
- DPRINT3(DB_MODEM,"dgb%d: port%d: modem stat -- ",unit,pnum);
-
- if (port->imodem & DTR) {
- DPRINT1(DB_MODEM,"DTR ");
- tiocm_xxx |= TIOCM_DTR;
- }
- if (port->imodem & RTS) {
- DPRINT1(DB_MODEM,"RTS ");
- tiocm_xxx |= TIOCM_RTS;
- }
- if (port->imodem & CTS) {
- DPRINT1(DB_MODEM,"CTS ");
- tiocm_xxx |= TIOCM_CTS;
- }
- if (port->imodem & port->dcd) {
- DPRINT1(DB_MODEM,"DCD ");
- tiocm_xxx |= TIOCM_CD;
- }
- if (port->imodem & port->dsr) {
- DPRINT1(DB_MODEM,"DSR ");
- tiocm_xxx |= TIOCM_DSR;
- }
- if (port->imodem & RI) {
- DPRINT1(DB_MODEM,"RI ");
- tiocm_xxx |= TIOCM_RI;
- }
- *(int *)data = tiocm_xxx;
- DPRINT1(DB_MODEM,"--\n");
- break;
- case TIOCMSDTRWAIT:
- /* must be root since the wait applies to following logins */
- error = suser(p);
- if (error != 0) {
- splx(s);
- return (error);
- }
- port->close_delay = *(int *)data * hz / 100;
- break;
- case TIOCMGDTRWAIT:
- *(int *)data = port->close_delay * 100 / hz;
- break;
- case TIOCTIMESTAMP:
- port->do_timestamp = TRUE;
- *(struct timeval *)data = port->timestamp;
- break;
- case TIOCDCDTIMESTAMP:
- port->do_dcd_timestamp = TRUE;
- *(struct timeval *)data = port->dcd_timestamp;
- break;
- default:
- bmws_set(ws);
- splx(s);
- return ENOTTY;
- }
- bmws_set(ws);
- splx(s);
-
- return 0;
-}
-
-static void
-wakeflush(p)
- void *p;
-{
- struct dgb_p *port=p;
-
- wakeup(&port->draining);
-}
-
-/* wait for the output to drain */
-
-static int
-dgbdrain(port)
- struct dgb_p *port;
-{
- struct dgb_softc *sc=&dgb_softc[port->unit];
- volatile struct board_chan *bc=port->brdchan;
- int error;
- int head, tail;
-
- BoardMemWinState ws=bmws_get();
-
- setwin(sc,0);
-
- bc->iempty=1;
- tail=bc->tout;
- head=bc->tin;
-
- while(tail!=head) {
- DPRINT5(DB_WR,"dgb%d: port%d: drain: head=%d tail=%d\n",
- port->unit, port->pnum, head, tail);
-
- hidewin(sc);
- port->draining=1;
- timeout(wakeflush,port, hz);
- error=tsleep(&port->draining, TTIPRI | PCATCH, "dgdrn", 0);
- port->draining=0;
- setwin(sc,0);
-
- if (error != 0) {
- DPRINT4(DB_WR,"dgb%d: port%d: tsleep(dgdrn) error=%d\n",
- port->unit,port->pnum,error);
-
- bc->iempty=0;
- bmws_set(ws);
- return error;
- }
-
- tail=bc->tout;
- head=bc->tin;
- }
- DPRINT5(DB_WR,"dgb%d: port%d: drain: head=%d tail=%d\n",
- port->unit, port->pnum, head, tail);
- bmws_set(ws);
- return 0;
-}
-
-/* wait for the output to drain */
-/* or simply clear the buffer it it's stopped */
-
-static void
-dgb_drain_or_flush(port)
- struct dgb_p *port;
-{
- struct tty *tp=port->tty;
- struct dgb_softc *sc=&dgb_softc[port->unit];
- volatile struct board_chan *bc=port->brdchan;
- int error;
- int lasttail;
- int head, tail;
-
- setwin(sc,0);
-
- lasttail=-1;
- bc->iempty=1;
- tail=bc->tout;
- head=bc->tin;
-
- while(tail!=head /* && tail!=lasttail */ ) {
- DPRINT5(DB_WR,"dgb%d: port%d: flush: head=%d tail=%d\n",
- port->unit, port->pnum, head, tail);
-
- /* if there is no carrier simply clean the buffer */
- if( !(tp->t_state & TS_CARR_ON) ) {
- bc->tout=bc->tin=0;
- bc->iempty=0;
- hidewin(sc);
- return;
- }
-
- hidewin(sc);
- port->draining=1;
- timeout(wakeflush,port, hz);
- error=tsleep(&port->draining, TTIPRI | PCATCH, "dgfls", 0);
- port->draining=0;
- setwin(sc,0);
-
- if (error != 0) {
- DPRINT4(DB_WR,"dgb%d: port%d: tsleep(dgfls) error=%d\n",
- port->unit,port->pnum,error);
-
- /* silently clean the buffer */
-
- bc->tout=bc->tin=0;
- bc->iempty=0;
- hidewin(sc);
- return;
- }
-
- lasttail=tail;
- tail=bc->tout;
- head=bc->tin;
- }
- hidewin(sc);
- DPRINT5(DB_WR,"dgb%d: port%d: flush: head=%d tail=%d\n",
- port->unit, port->pnum, head, tail);
-}
-
-static int
-dgbparam(tp, t)
- struct tty *tp;
- struct termios *t;
-{
- int unit=MINOR_TO_UNIT(minor(tp->t_dev));
- int pnum=MINOR_TO_PORT(minor(tp->t_dev));
- struct dgb_softc *sc=&dgb_softc[unit];
- struct dgb_p *port=&sc->ports[pnum];
- volatile struct board_chan *bc=port->brdchan;
- int cflag;
- int head;
- int mval;
- int iflag;
- int hflow;
- int cs;
-
- BoardMemWinState ws=bmws_get();
-
- DPRINT6(DB_PARAM,"dgb%d: port%d: dgbparm c=0x%x i=0x%x l=0x%x\n",unit,pnum,t->c_cflag,t->c_iflag,t->c_lflag);
-
- if(port->mustdrain) {
- DPRINT3(DB_PARAM,"dgb%d: port%d: must call dgbdrain()\n",unit,pnum);
- dgbdrain(port);
- }
-
- cflag=ttspeedtab(t->c_ospeed, dgbspeedtab);
-
- if (t->c_ispeed == 0)
- t->c_ispeed = t->c_ospeed;
-
- if (cflag < 0 /* || cflag > 0 && t->c_ispeed != t->c_ospeed */) {
- DPRINT4(DB_PARAM,"dgb%d: port%d: invalid cflag=0%o\n",unit,pnum,cflag);
- return (EINVAL);
- }
-
- cs=splclock();
- setwin(sc,0);
-
- if(cflag==0) { /* hangup */
- DPRINT3(DB_PARAM,"dgb%d: port%d: hangup\n",unit,pnum);
- head=bc->rin;
- bc->rout=head;
- head=bc->tin;
- fepcmd(port, STOUT, (unsigned)head, 0, 0, 0);
- mval= port->omodem & ~(DTR|RTS);
- } else {
- cflag |= dgbflags(dgb_cflags, t->c_cflag);
-
- if(cflag!=port->fepcflag) {
- port->fepcflag=cflag;
- DPRINT5(DB_PARAM,"dgb%d: port%d: set cflag=0x%x c=0x%x\n",
- unit,pnum,cflag,t->c_cflag&~CRTSCTS);
- fepcmd(port, SETCTRLFLAGS, (unsigned)cflag, 0, 0, 0);
- }
- mval= port->omodem | (DTR|RTS);
- }
-
- iflag=dgbflags(dgb_iflags, t->c_iflag);
- if(iflag!=port->fepiflag) {
- port->fepiflag=iflag;
- DPRINT5(DB_PARAM,"dgb%d: port%d: set iflag=0x%x c=0x%x\n",unit,pnum,iflag,t->c_iflag);
- fepcmd(port, SETIFLAGS, (unsigned)iflag, 0, 0, 0);
- }
-
- bc->mint=port->dcd;
-
- hflow=dgbflags(dgb_flow, t->c_cflag);
- if(hflow!=port->hflow) {
- port->hflow=hflow;
- DPRINT5(DB_PARAM,"dgb%d: port%d: set hflow=0x%x f=0x%x\n",unit,pnum,hflow,t->c_cflag&CRTSCTS);
- fepcmd(port, SETHFLOW, (unsigned)hflow, 0xff, 0, 1);
- }
-
- if(port->omodem != mval) {
- DPRINT5(DB_PARAM,"dgb%d: port%d: setting modem parameters 0x%x was 0x%x\n",
- unit,pnum,mval,port->omodem);
- port->omodem=mval;
- fepcmd(port, SETMODEM, (unsigned)mval, RTS|DTR, 0, 1);
- }
-
- if(port->fepstartc!=t->c_cc[VSTART] || port->fepstopc!=t->c_cc[VSTOP]) {
- DPRINT5(DB_PARAM,"dgb%d: port%d: set startc=%d, stopc=%d\n",unit,pnum,t->c_cc[VSTART],t->c_cc[VSTOP]);
- port->fepstartc=t->c_cc[VSTART];
- port->fepstopc=t->c_cc[VSTOP];
- fepcmd(port, SONOFFC, port->fepstartc, port->fepstopc, 0, 1);
- }
-
- bmws_set(ws);
- splx(cs);
-
- return 0;
-
-}
-
-static void
-dgbstart(tp)
- struct tty *tp;
-{
- int unit;
- int pnum;
- struct dgb_p *port;
- struct dgb_softc *sc;
- volatile struct board_chan *bc;
- int head, tail;
- int size, ocount;
- int s;
- int wmask;
-
- BoardMemWinState ws=bmws_get();
-
- unit=MINOR_TO_UNIT(minor(tp->t_dev));
- pnum=MINOR_TO_PORT(minor(tp->t_dev));
- sc=&dgb_softc[unit];
- port=&sc->ports[pnum];
- bc=port->brdchan;
-
- wmask=port->txbufsize-1;
-
- s=spltty();
-
- while( tp->t_outq.c_cc!=0 ) {
- int cs;
-#ifndef TS_ASLEEP /* post 2.0.5 FreeBSD */
- ttwwakeup(tp);
-#else
- if(tp->t_outq.c_cc <= tp->t_lowat) {
- if(tp->t_state & TS_ASLEEP) {
- tp->t_state &= ~TS_ASLEEP;
- wakeup(TSA_OLOWAT(tp));
- }
- /*selwakeup(&tp->t_wsel);*/
- }
-#endif
- cs=splclock();
- setwin(sc,0);
-
- head=bc->tin & wmask;
-
- do { tail=bc->tout; } while (tail != bc->tout);
- tail=bc->tout & wmask;
-
- DPRINT5(DB_WR,"dgb%d: port%d: s tx head=%d tail=%d\n",unit,pnum,head,tail);
-
-#ifdef LEAVE_FREE_CHARS
- if(tail>head) {
- size=tail-head-LEAVE_FREE_CHARS;
- if (size <0)
- size=0;
- } else {
- size=port->txbufsize-head;
- if(tail+port->txbufsize < head)
- size=0;
- }
- }
-#else
- if(tail>head)
- size=tail-head-1;
- else {
- size=port->txbufsize-head/*-1*/;
- if(tail==0)
- size--;
- }
-#endif
-
- if(size==0) {
- bc->iempty=1; bc->ilow=1;
- splx(cs);
- bmws_set(ws);
- tp->t_state|=TS_BUSY;
- splx(s);
- return;
- }
-
- towin(sc,port->txwin);
-
- ocount=q_to_b(&tp->t_outq, port->txptr+head, size);
- head+=ocount;
- if(head>=port->txbufsize)
- head-=port->txbufsize;
-
- setwin(sc,0);
- bc->tin=head;
-
- DPRINT5(DB_WR,"dgb%d: port%d: tx avail=%d count=%d\n",unit,pnum,size,ocount);
- hidewin(sc);
- splx(cs);
- }
-
- bmws_set(ws);
- splx(s);
-
-#ifndef TS_ASLEEP /* post 2.0.5 FreeBSD */
- if(tp->t_state & TS_BUSY) {
- tp->t_state&=~TS_BUSY;
- linesw[tp->t_line].l_start(tp);
- ttwwakeup(tp);
- }
-#else
- if(tp->t_state & TS_ASLEEP) {
- tp->t_state &= ~TS_ASLEEP;
- wakeup(TSA_OLOWAT(tp));
- }
- tp->t_state&=~TS_BUSY;
-#endif
-}
-
-void
-dgbstop(tp, rw)
- struct tty *tp;
- int rw;
-{
- int unit;
- int pnum;
- struct dgb_p *port;
- struct dgb_softc *sc;
- volatile struct board_chan *bc;
- int s;
-
- BoardMemWinState ws=bmws_get();
-
- unit=MINOR_TO_UNIT(minor(tp->t_dev));
- pnum=MINOR_TO_PORT(minor(tp->t_dev));
-
- sc=&dgb_softc[unit];
- port=&sc->ports[pnum];
- bc=port->brdchan;
-
- DPRINT3(DB_WR,"dgb%d: port%d: stop\n",port->unit, port->pnum);
-
- s = spltty();
- setwin(sc,0);
-
- if (rw & FWRITE) {
- /* clear output queue */
- bc->tout=bc->tin=0;
- bc->ilow=0;bc->iempty=0;
- }
- if (rw & FREAD) {
- /* clear input queue */
- bc->rout=bc->rin;
- bc->idata=1;
- }
- hidewin(sc);
- bmws_set(ws);
- splx(s);
- dgbstart(tp);
-}
-
-static void
-fepcmd(port, cmd, op1, op2, ncmds, bytecmd)
- struct dgb_p *port;
- unsigned cmd, op1, op2, ncmds, bytecmd;
-{
- struct dgb_softc *sc=&dgb_softc[port->unit];
- u_char *mem=sc->vmem;
- unsigned tail, head;
- int count, n;
-
- if(port->status==DISABLED) {
- printf("dgb%d: port%d: FEP command on disabled port\n",
- port->unit, port->pnum);
- return;
- }
-
- /* setwin(sc,0); Require this to be set by caller */
- head=sc->mailbox->cin;
-
- if(head>=(FEP_CMAX-FEP_CSTART) || (head & 3)) {
- printf("dgb%d: port%d: wrong pointer head of command queue : 0x%x\n",
- port->unit, port->pnum, head);
- return;
- }
-
- mem[head+FEP_CSTART+0]=cmd;
- mem[head+FEP_CSTART+1]=port->pnum;
- if(bytecmd) {
- mem[head+FEP_CSTART+2]=op1;
- mem[head+FEP_CSTART+3]=op2;
- } else {
- mem[head+FEP_CSTART+2]=op1&0xff;
- mem[head+FEP_CSTART+3]=(op1>>8)&0xff;
- }
-
- DPRINT7(DB_FEP,"dgb%d: port%d: %s cmd=0x%x op1=0x%x op2=0x%x\n", port->unit, port->pnum,
- (bytecmd)?"byte":"word", cmd, mem[head+FEP_CSTART+2], mem[head+FEP_CSTART+3]);
-
- head=(head+4) & (FEP_CMAX-FEP_CSTART-4);
- sc->mailbox->cin=head;
-
- count=FEPTIMEOUT;
-
- while (count-- != 0) {
- head=sc->mailbox->cin;
- tail=sc->mailbox->cout;
-
- n = (head-tail) & (FEP_CMAX-FEP_CSTART-4);
- if(n <= ncmds * (sizeof(ushort)*4))
- return;
- }
- printf("dgb%d(%d): timeout on FEP cmd=0x%x\n", port->unit, port->pnum, cmd);
-}
-
-static void
-disc_optim(tp, t)
- struct tty *tp;
- struct termios *t;
-{
- if (!(t->c_iflag & (ICRNL | IGNCR | IMAXBEL | INLCR | ISTRIP | IXON))
- && (!(t->c_iflag & BRKINT) || (t->c_iflag & IGNBRK))
- && (!(t->c_iflag & PARMRK)
- || (t->c_iflag & (IGNPAR | IGNBRK)) == (IGNPAR | IGNBRK))
- && !(t->c_lflag & (ECHO | ICANON | IEXTEN | ISIG | PENDIN))
- && linesw[tp->t_line].l_rint == ttyinput)
- tp->t_state |= TS_CAN_BYPASS_L_RINT;
- else
- tp->t_state &= ~TS_CAN_BYPASS_L_RINT;
-}
diff --git a/sys/gnu/i386/isa/dgbios.h b/sys/gnu/i386/isa/dgbios.h
deleted file mode 100644
index 02dd6bb..0000000
--- a/sys/gnu/i386/isa/dgbios.h
+++ /dev/null
@@ -1,175 +0,0 @@
-static unsigned char pcxx_bios[] = {
- 0x28,0x43,0x29,0x20,0x43,0x6f,0x70,0x79,0x72,0x69,0x67,0x68,
- 0x74,0x20,0x31,0x39,0x39,0x34,0x2c,0x20,0x44,0x69,0x67,0x69,
- 0x42,0x6f,0x61,0x72,0x64,0x20,0x49,0x6e,0x63,0x2e,0x00,0x00,
- 0x8a,0xf8,0x8a,0xf8,0x15,0xf9,0x8a,0xf8,0x8a,0xf8,0x8a,0xf8,
- 0x8a,0xf8,0x8a,0xf8,0xbc,0xf8,0x8a,0xf8,0x96,0xf8,0x96,0xf8,
- 0x96,0xf8,0x96,0xf8,0x96,0xf8,0x96,0xf8,0x8a,0xf8,0x8a,0xf8,
- 0x96,0xf8,0x96,0xf8,0x8a,0xf8,0xad,0xf8,0xb0,0xf8,0x8a,0xf8,
- 0x8a,0xf8,0x8a,0xf8,0x8a,0xf8,0x8a,0xf8,0x8a,0xf8,0x8a,0xf8,
- 0x8a,0xf8,0x8a,0xf8,0x8a,0xf8,0x04,0x02,0x00,0x02,0x14,0x02,
- 0x10,0x02,0x24,0x02,0x20,0x02,0x34,0x02,0x30,0x02,0x44,0x02,
- 0x40,0x02,0x54,0x02,0x50,0x02,0x64,0x02,0x60,0x02,0x74,0x02,
- 0x70,0x02,0x04,0x01,0x00,0x01,0x1e,0x2e,0x8e,0x1e,0x22,0xf8,
- 0xfe,0x06,0x70,0x00,0x1f,0xcf,0x1e,0x50,0x52,0x2e,0x8e,0x1e,
- 0x22,0xf8,0xfe,0x06,0x71,0x00,0xb8,0x00,0x80,0xba,0x22,0xff,
- 0xef,0x5a,0x58,0x1f,0xcf,0xb4,0x80,0xcf,0x1e,0x2e,0x8e,0x1e,
- 0x22,0xf8,0xfe,0x06,0x2b,0x00,0x1f,0xcf,0x1e,0x52,0x50,0x2e,
- 0x8e,0x1e,0x22,0xf8,0xcd,0x16,0xfe,0x06,0x2a,0x00,0x80,0x3e,
- 0x2a,0x00,0x12,0x72,0x39,0xc6,0x06,0x2a,0x00,0x00,0xfe,0x06,
- 0x29,0x00,0x80,0x3e,0x29,0x00,0x3c,0x72,0x29,0xc6,0x06,0x29,
- 0x00,0x00,0xfe,0x06,0x28,0x00,0x80,0x3e,0x28,0x00,0x3c,0x72,
- 0x19,0xc6,0x06,0x28,0x00,0x00,0xfe,0x06,0x27,0x00,0x80,0x3e,
- 0x27,0x00,0x18,0x72,0x09,0xc6,0x06,0x27,0x00,0x00,0xff,0x06,
- 0x25,0x00,0xba,0x22,0xff,0xb8,0x00,0x80,0xef,0x58,0x5a,0x1f,
- 0xcf,0x60,0x1e,0x06,0xfc,0x2e,0x8e,0x06,0x22,0xf8,0x2e,0x8e,
- 0x1e,0x22,0xf8,0x8d,0x36,0x40,0x00,0xad,0x3c,0x3f,0x7f,0x22,
- 0x3c,0x1f,0x7f,0x22,0x32,0xe4,0xd1,0xe0,0x3d,0x16,0x00,0x90,
- 0x73,0x14,0xbb,0x56,0xf9,0x03,0xd8,0x2e,0xff,0x17,0x8d,0x36,
- 0x40,0x00,0xb0,0x00,0x89,0x04,0x07,0x1f,0x61,0xcf,0xb4,0x80,
- 0xeb,0xf0,0xcd,0x15,0xeb,0xec,0x6c,0xf9,0x79,0xf9,0xb9,0xf9,
- 0xd3,0xf9,0xd8,0xf9,0xe1,0xf9,0xe9,0xf9,0xf2,0xf9,0xfa,0xf9,
- 0xfd,0xf9,0x2a,0xfa,0xe4,0x00,0x24,0xf7,0xe6,0x00,0x0c,0x08,
- 0xe6,0x00,0xb4,0x00,0xc3,0x1e,0xad,0x8b,0xd8,0xad,0x8e,0xdb,
- 0x8b,0xf0,0x33,0xdb,0x8b,0x07,0x3d,0x4f,0x53,0x75,0x2a,0x8a,
- 0x47,0x02,0x32,0xe4,0x86,0xc4,0x8b,0xc8,0x32,0xc0,0x02,0x07,
- 0x43,0xe2,0xfb,0x0a,0xc0,0x75,0x16,0x8c,0xd9,0x1f,0x89,0x0e,
- 0x2e,0x00,0x89,0x36,0x2c,0x00,0x8d,0x1e,0x02,0x00,0xc7,0x07,
- 0x45,0x4d,0x32,0xe4,0xc3,0x1f,0xb4,0x80,0xc3,0xad,0x8b,0xd8,
- 0xad,0x8b,0xd0,0xad,0x8e,0xc0,0xad,0x8b,0xf8,0xad,0x8b,0xc8,
- 0x8b,0xf2,0x1e,0x8e,0xdb,0xf3,0xa4,0x1f,0x32,0xe4,0xc3,0xea,
- 0xf0,0xff,0x00,0xf0,0xad,0x8b,0xd0,0xec,0x88,0x04,0x32,0xe4,
- 0xc3,0xad,0x8b,0xd0,0xac,0xee,0x32,0xe4,0xc3,0xad,0x8b,0xd0,
- 0xed,0x89,0x04,0x32,0xe4,0xc3,0xad,0x8b,0xd0,0xad,0xef,0x32,
- 0xe4,0xc3,0xb4,0x80,0xc3,0xac,0x3c,0x12,0x7f,0x25,0xfe,0xc8,
- 0x32,0xe4,0xd1,0xe0,0x8d,0x1e,0x66,0xf8,0x03,0xd8,0x2e,0x8b,
- 0x17,0xec,0xac,0x3c,0x0f,0x7f,0x10,0x3c,0x00,0x74,0x03,0xee,
- 0x90,0x90,0xec,0x8b,0xfe,0x1e,0x07,0xaa,0x32,0xe4,0xc3,0xb4,
- 0x80,0xc3,0xac,0x3c,0x12,0x7f,0x1f,0xfe,0xc8,0x32,0xe4,0xd1,
- 0xe0,0x8d,0x1e,0x66,0xf8,0x03,0xd8,0x2e,0x8b,0x17,0xec,0xac,
- 0x3c,0x0f,0x7f,0x0a,0x3c,0x00,0x74,0x01,0xee,0xac,0xee,0x32,
- 0xe4,0xc3,0xb4,0x80,0xc3,0xfc,0x8e,0xc0,0xb8,0xff,0xff,0x8b,
- 0xcb,0x33,0xff,0xf3,0xab,0x8b,0xcb,0x33,0xff,0xf3,0xaf,0xe3,
- 0x01,0xc3,0x8b,0xcb,0xbf,0x00,0x00,0x26,0x89,0x3d,0x83,0xc7,
- 0x02,0xe2,0xf8,0xbe,0x00,0x00,0x8b,0xcb,0x26,0x8b,0x3c,0x3b,
- 0xfe,0x74,0x01,0xc3,0x83,0xc6,0x02,0x83,0xc7,0x02,0xe2,0xf0,
- 0x33,0xc0,0x8b,0xcb,0x33,0xff,0xf3,0xab,0x8b,0xcb,0x33,0xff,
- 0xf3,0xaf,0xc3,0x32,0xc0,0x26,0x80,0x3e,0x23,0x00,0x00,0x74,
- 0x02,0x0c,0x01,0x26,0xf7,0x06,0x20,0x00,0x0f,0x00,0x74,0x02,
- 0x0c,0x02,0x26,0xf7,0x06,0x20,0x00,0xf0,0x00,0x74,0x02,0x0c,
- 0x04,0x26,0xf7,0x06,0x20,0x00,0x00,0xff,0x74,0x02,0x0c,0x08,
- 0x26,0xa2,0x24,0x00,0xb8,0x00,0x40,0xba,0x5e,0xff,0xef,0xba,
- 0x66,0xff,0xef,0xba,0x52,0xff,0xb8,0x63,0x0e,0xef,0xba,0x56,
- 0xff,0xb8,0x05,0xe0,0xef,0xba,0x28,0xff,0xb8,0xfc,0x00,0xef,
- 0xb8,0x00,0x02,0x26,0xa3,0x2e,0x00,0xb8,0x04,0x00,0x26,0xa3,
- 0x2c,0x00,0xb0,0xc3,0xe6,0x08,0x8a,0xd8,0xe4,0x08,0x3a,0xc3,
- 0x75,0x06,0x26,0xc6,0x06,0xb4,0x00,0x01,0xb0,0x00,0xe6,0x00,
- 0xfc,0x8d,0x3e,0x00,0x00,0xb8,0x47,0x44,0xab,0xb8,0xff,0xff,
- 0xab,0xab,0xab,0xb8,0x42,0x49,0xab,0xb8,0x4f,0x53,0xab,0xb8,
- 0x58,0x69,0x26,0x80,0x3e,0x10,0x00,0x04,0x74,0x0e,0xb8,0x58,
- 0x65,0x26,0x80,0x3e,0x10,0x00,0x03,0x74,0x03,0xb8,0x58,0x74,
- 0xab,0x8d,0x36,0xfe,0xff,0x8a,0x04,0x8d,0x36,0xff,0xff,0x8a,
- 0x24,0xab,0xfb,0x26,0x81,0x0e,0x12,0x00,0x00,0x08,0x06,0x1f,
- 0xa1,0x00,0x00,0x8b,0x1e,0x02,0x00,0x3d,0x44,0x47,0x75,0x0b,
- 0x26,0x81,0x0e,0x12,0x00,0x00,0x10,0xff,0x2e,0x2c,0x00,0x81,
- 0xfb,0x45,0x4d,0x75,0xe3,0x26,0x81,0x0e,0x12,0x00,0x00,0x20,
- 0xff,0x2e,0x2c,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xfa,0xba,0xa8,0xff,0xb8,0xba,0x81,0xef,
- 0xba,0xa4,0xff,0xb8,0x3a,0x00,0xef,0x90,0xe4,0x00,0xa8,0x60,
- 0x75,0x0c,0x24,0x06,0x74,0x14,0x3c,0x02,0x74,0x1c,0x3c,0x04,
- 0x74,0x24,0xbb,0x38,0xc0,0xbe,0xf8,0x81,0xbf,0xba,0xa0,0xeb,
- 0x22,0x90,0xbb,0x38,0xf0,0xbe,0xf8,0x41,0xbf,0xba,0x81,0xeb,
- 0x16,0x90,0xbb,0x38,0xf0,0xbe,0xf8,0xe1,0xbf,0xba,0x88,0xeb,
- 0x0a,0x90,0xbb,0x38,0xc0,0xbe,0xf8,0x41,0xbf,0xba,0x81,0xba,
- 0xa0,0xff,0x8b,0xc3,0xef,0xba,0xa2,0xff,0xb8,0xf8,0x0f,0xef,
- 0xba,0xa6,0xff,0x8b,0xc6,0xef,0xba,0xa8,0xff,0x8b,0xc7,0xef,
- 0x8c,0xc8,0x8e,0xd8,0xe4,0x00,0x24,0x06,0x74,0x17,0xbb,0x00,
- 0x80,0xbd,0xc0,0xe0,0x3c,0x02,0x74,0x5a,0xbd,0xc0,0xc0,0x3c,
- 0x04,0x74,0x53,0xbd,0xc0,0x80,0xeb,0x4e,0x90,0xb9,0x08,0x00,
- 0xb8,0x00,0x80,0x8e,0xc0,0x26,0xa3,0x00,0x00,0x05,0x00,0x10,
- 0xe2,0xf5,0xbd,0xc0,0xf0,0xbb,0x00,0x7c,0xb8,0x00,0xe0,0x8e,
- 0xc0,0x26,0x8b,0x0e,0x00,0x00,0x3b,0xc8,0x75,0x28,0xbb,0x00,
- 0x80,0xbd,0xc0,0xe0,0xb8,0x00,0xc0,0x8e,0xc0,0x26,0x8b,0x0e,
- 0x00,0x00,0x3b,0xc8,0x75,0x14,0xbd,0xc0,0xc0,0xb8,0x00,0x80,
- 0x8e,0xc0,0x26,0x8b,0x0e,0x00,0x00,0x3b,0xc8,0x75,0x03,0xbd,
- 0xc0,0x80,0x8c,0xc8,0x8e,0xd0,0xbc,0xed,0xfc,0x8b,0xc5,0x25,
- 0x00,0xf0,0xe9,0x6c,0xfd,0xb4,0x00,0x74,0x06,0xb4,0xff,0xeb,
- 0x02,0xe5,0xfc,0x8e,0xc5,0x2e,0x89,0x2e,0x22,0xf8,0xe4,0x00,
- 0x24,0x16,0x26,0xa2,0x11,0x00,0x26,0x83,0x0e,0x12,0x00,0x01,
- 0x80,0xfc,0x00,0x74,0x06,0x26,0x83,0x0e,0x14,0x00,0x01,0x26,
- 0xc7,0x06,0x18,0x00,0x40,0x00,0x26,0xc6,0x06,0x10,0x00,0x03,
- 0xa8,0x10,0x74,0x06,0x26,0xc6,0x06,0x10,0x00,0x04,0xb8,0x00,
- 0x00,0x8e,0xc0,0xb8,0xaa,0x55,0x26,0xa3,0x00,0x00,0x26,0xc7,
- 0x06,0x02,0x00,0x00,0x00,0x26,0xc7,0x06,0x04,0x00,0x00,0x00,
- 0x8b,0xcd,0x81,0xe1,0x00,0xf0,0x8e,0xc1,0x26,0x8b,0x1e,0x00,
- 0x00,0x3b,0xc3,0x75,0x13,0x8e,0xc5,0x26,0xc6,0x06,0x10,0x00,
- 0x05,0xb8,0x40,0x00,0x8e,0xd0,0xbc,0x00,0x04,0xe9,0x99,0x00,
- 0x8c,0xc8,0x8e,0xd0,0xbc,0x7c,0xfd,0xb8,0x00,0x00,0xbb,0x00,
- 0x20,0xe9,0xdd,0xfc,0xb4,0x00,0x74,0x06,0xb4,0xff,0xeb,0x02,
- 0x74,0xfd,0x8e,0xc5,0x80,0xfc,0x00,0x74,0x08,0x26,0x83,0x0e,
- 0x14,0x00,0x02,0xeb,0x0d,0x26,0xc7,0x06,0x16,0x00,0x10,0x00,
- 0x26,0x83,0x0e,0x12,0x00,0x02,0xb8,0x40,0x00,0x8e,0xd0,0xbc,
- 0x00,0x04,0xe4,0x00,0xa8,0x60,0x75,0x07,0xba,0xa2,0xff,0xb8,
- 0xfc,0x0f,0xef,0xb8,0x00,0x04,0x8e,0xc0,0xb8,0xaa,0x55,0x26,
- 0xa3,0x00,0x00,0x26,0xc7,0x06,0x02,0x00,0x00,0x00,0x26,0xc7,
- 0x06,0x04,0x00,0x00,0x00,0xb9,0x00,0x00,0x8e,0xc1,0x26,0x8b,
- 0x1e,0x00,0x00,0x3b,0xc3,0x75,0x02,0xeb,0x24,0x8e,0xc5,0x26,
- 0x83,0x0e,0x12,0x00,0x04,0xb8,0x00,0x04,0xbb,0x00,0x60,0x06,
- 0xe8,0x66,0xfc,0x07,0x75,0x09,0x26,0xc7,0x06,0x16,0x00,0x40,
- 0x00,0xeb,0x06,0x26,0x83,0x0e,0x14,0x00,0x04,0x8e,0xc5,0x8c,
- 0xc0,0x3d,0xc0,0xf0,0x75,0x03,0xe9,0x9f,0x00,0x3d,0xc0,0x80,
- 0x74,0x62,0x3d,0xc0,0xc0,0x74,0x23,0x26,0x83,0x0e,0x12,0x00,
- 0x08,0xb8,0x00,0xf0,0xbb,0x00,0x7c,0x06,0xe8,0x2e,0xfc,0x07,
- 0x75,0x08,0x26,0x83,0x06,0x18,0x00,0x40,0xeb,0x06,0x26,0x83,
- 0x0e,0x14,0x00,0x08,0xeb,0x72,0xb9,0x03,0x00,0xb8,0x00,0xd0,
- 0xba,0x08,0x00,0xbb,0x00,0x80,0x3d,0x00,0xf0,0x75,0x03,0xbb,
- 0x00,0x7c,0x26,0x09,0x16,0x12,0x00,0x06,0x50,0x51,0xe8,0xfc,
- 0xfb,0x59,0x58,0x07,0x75,0x0f,0x26,0x83,0x06,0x18,0x00,0x40,
- 0xd1,0xe2,0x05,0x00,0x10,0xe2,0xd8,0xeb,0x05,0x26,0x09,0x16,
- 0x14,0x00,0xeb,0x38,0xb9,0x07,0x00,0xb8,0x00,0x90,0xba,0x08,
- 0x00,0xbb,0x00,0x80,0x3d,0x00,0xf0,0x75,0x03,0xbb,0x00,0x7c,
- 0x26,0x09,0x16,0x12,0x00,0x06,0x50,0x51,0xe8,0xc2,0xfb,0x59,
- 0x58,0x07,0x75,0x0f,0x26,0x83,0x06,0x18,0x00,0x40,0xd1,0xe2,
- 0x05,0x00,0x10,0xe2,0xd8,0xeb,0x05,0x26,0x09,0x16,0x14,0x00,
- 0x26,0xa1,0x18,0x00,0x2d,0x10,0x00,0x26,0xa3,0x1a,0x00,0x06,
- 0xfc,0x33,0xff,0x8e,0xc7,0xb9,0x00,0x02,0xb8,0x00,0xf0,0xf3,
- 0xab,0x33,0xff,0xbe,0x24,0xf8,0xb9,0x20,0x00,0xa5,0x47,0x47,
- 0xe2,0xfb,0xbe,0x64,0xf8,0xb9,0xe0,0x00,0x8b,0x1c,0x26,0x89,
- 0x1d,0x83,0xc7,0x04,0xe2,0xf8,0x07,0xba,0x28,0xff,0xb8,0xfd,
- 0x00,0xef,0xba,0x32,0xff,0xb8,0x0d,0x00,0xef,0xba,0x34,0xff,
- 0xb8,0x0f,0x00,0xef,0xba,0x36,0xff,0xb8,0x0e,0x00,0xef,0xba,
- 0x38,0xff,0xb8,0x19,0x00,0xef,0xba,0x3a,0xff,0xb8,0x18,0x00,
- 0xef,0xba,0x3c,0xff,0xb8,0x0b,0x00,0xef,0xba,0x3e,0xff,0xb8,
- 0x1a,0x00,0xef,0x8d,0x3e,0x90,0x00,0x8d,0x36,0x66,0xf8,0xb9,
- 0x10,0x00,0xf3,0xa5,0x8d,0x3e,0xb0,0x00,0x8d,0x36,0x86,0xf8,
- 0xb9,0x02,0x00,0xf3,0xa5,0xb9,0x10,0x00,0x8d,0x36,0x90,0x00,
- 0x83,0xc6,0x1e,0x26,0x8b,0x14,0xb3,0x10,0x32,0xc0,0xec,0xb0,
- 0x0c,0xee,0x8a,0xc3,0x8a,0xc3,0xee,0x83,0xee,0x02,0x26,0x8b,
- 0x14,0xfe,0xcb,0xe2,0xeb,0xb9,0x10,0x00,0x8d,0x36,0x90,0x00,
- 0x26,0x8b,0x14,0xb3,0x01,0xbf,0x00,0x80,0xb0,0x0c,0xee,0xf6,
- 0xe8,0xec,0x3a,0xc3,0x75,0x0e,0xd1,0xc7,0x26,0x09,0x3e,0x20,
- 0x00,0x26,0xfe,0x06,0x22,0x00,0xeb,0x07,0x33,0xc0,0x26,0x89,
- 0x04,0xd1,0xc7,0x83,0xc6,0x02,0x26,0x8b,0x14,0xfe,0xc3,0xe2,
- 0xd7,0x26,0xc6,0x06,0x23,0x00,0x01,0x8d,0x36,0xb0,0x00,0x26,
- 0x8b,0x14,0x32,0xc0,0xee,0xb0,0x0c,0xee,0xb0,0x5a,0xee,0xb0,
- 0x0c,0xee,0xf6,0xe8,0xec,0x3c,0x5a,0x74,0x14,0x26,0xc7,0x06,
- 0xb0,0x00,0x00,0x00,0x26,0xc7,0x06,0xb2,0x00,0x00,0x00,0x26,
- 0xc6,0x06,0x23,0x00,0x00,0xe9,0xd3,0xfa,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xea,0x00,0xfc,0x00,0xf0,0x4d,0x2f,0x50,
- 0x43,0x2f,0x58,0x2a,0x39,0x34,0x34,0x31
-};
-
-static unsigned pcxx_nbios=sizeof(pcxx_bios);
diff --git a/sys/gnu/i386/isa/dgfep.h b/sys/gnu/i386/isa/dgfep.h
deleted file mode 100644
index 9ed4f7d..0000000
--- a/sys/gnu/i386/isa/dgfep.h
+++ /dev/null
@@ -1,516 +0,0 @@
-static unsigned char pcxx_cook[] = {
- 0x4f,0x53,0x18,0x80,0xe9,0xbf,0x15,0x00,0x40,0x28,0x23,0x29,
- 0x46,0x45,0x50,0x4f,0x53,0x20,0x37,0x2e,0x30,0x38,0x20,0x34,
- 0x2f,0x32,0x30,0x2f,0x39,0x35,0x00,0x40,0x28,0x23,0x29,0x28,
- 0x43,0x29,0x43,0x6f,0x70,0x79,0x72,0x69,0x67,0x68,0x74,0x20,
- 0x31,0x39,0x38,0x39,0x2d,0x31,0x39,0x39,0x35,0x20,0x44,0x69,
- 0x67,0x69,0x42,0x6f,0x61,0x72,0x64,0x20,0x49,0x6e,0x63,0x2e,
- 0x00,0xcb,0x0c,0xcb,0x0c,0xe2,0x0c,0xcb,0x0c,0xcb,0x0c,0xcb,
- 0x0c,0xcb,0x0c,0xcb,0x0c,0x57,0x0c,0xcb,0x0c,0xcb,0x0c,0xcb,
- 0x0c,0x53,0x0b,0xcb,0x0c,0xcb,0x0c,0x42,0x0b,0xcb,0x0c,0xcb,
- 0x0c,0x12,0x0d,0xcb,0x0c,0xcb,0x0c,0xcb,0x0c,0xcb,0x0c,0xcb,
- 0x0c,0xcb,0x0c,0xcb,0x0c,0xcb,0x0c,0xcb,0x0c,0xcb,0x0c,0xcb,
- 0x0c,0xcb,0x0c,0xcb,0x0c,0x00,0x10,0x80,0x10,0x00,0x11,0x80,
- 0x11,0x00,0x12,0x80,0x12,0x00,0x13,0x80,0x13,0x00,0x14,0x80,
- 0x14,0x00,0x15,0x80,0x15,0x00,0x16,0x80,0x16,0x00,0x17,0x80,
- 0x17,0x78,0x0b,0xb9,0x0b,0x50,0x0c,0xb9,0x0b,0x8d,0x0b,0x8d,
- 0x0b,0x8d,0x0b,0x8d,0x0b,0xc0,0x0b,0xc0,0x0b,0xc0,0x0b,0xc0,
- 0x0b,0x8d,0x0b,0x8d,0x0b,0x8d,0x0b,0x8d,0x0b,0x50,0x0c,0xb9,
- 0x0b,0x50,0x0c,0xb9,0x0b,0x8d,0x0b,0x8d,0x0b,0x8d,0x0b,0x8d,
- 0x0b,0xc0,0x0b,0xc0,0x0b,0xc0,0x0b,0xc0,0x0b,0x8d,0x0b,0x8d,
- 0x0b,0x8d,0x0b,0x8d,0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,
- 0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,
- 0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,
- 0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,
- 0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,
- 0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x16,0x00,0xfe,
- 0x11,0xfe,0x0b,0x2c,0x08,0xb5,0x06,0xfe,0x05,0x7e,0x04,0xfe,
- 0x02,0x7e,0x01,0xbe,0x00,0x7e,0x00,0x5e,0x00,0x2e,0x00,0x16,
- 0x00,0x0a,0x00,0x04,0x00,0x16,0x00,0x02,0x00,0x01,0x00,0x00,
- 0x00,0x0e,0x00,0x06,0x00,0x7e,0x04,0xfe,0x02,0x7e,0x01,0xbe,
- 0x00,0x7e,0x00,0x5e,0x00,0x2e,0x00,0x16,0x00,0x0a,0x00,0x04,
- 0x00,0x18,0x00,0x86,0x13,0x03,0x0d,0xdf,0x08,0x41,0x07,0x81,
- 0x06,0xe0,0x04,0x3f,0x03,0x9f,0x01,0xce,0x00,0x89,0x00,0x66,
- 0x00,0x32,0x00,0x18,0x00,0x0b,0x00,0x0b,0x00,0x18,0x00,0x0b,
- 0x00,0x0b,0x00,0x0b,0x00,0x41,0x07,0x81,0x06,0xe0,0x04,0x3f,
- 0x03,0x9f,0x01,0xce,0x00,0x89,0x00,0x66,0x00,0x32,0x00,0x18,
- 0x00,0x0b,0x00,0x0b,0x00,0x00,0x80,0x40,0xc0,0x1f,0x3f,0x7f,
- 0xff,0x00,0x04,0x02,0x06,0x08,0x0c,0x0a,0x0e,0x00,0x04,0x02,
- 0x06,0x08,0x0c,0x0a,0x0e,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,
- 0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0x1e,0x06,0x3e,
- 0x06,0xef,0x06,0xf8,0x05,0x0e,0x06,0x55,0x07,0xa0,0x08,0xa0,
- 0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,
- 0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,
- 0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0x9d,0x08,0x9d,
- 0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
- 0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
- 0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
- 0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
- 0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
- 0x08,0x9d,0x08,0xa1,0x05,0xa1,0x05,0xa1,0x05,0xa1,0x05,0xa1,
- 0x05,0xa1,0x05,0xa1,0x05,0xa1,0x05,0xa1,0x05,0xa1,0x05,0xa1,
- 0x05,0xa1,0x05,0xa1,0x05,0xa1,0x05,0xa1,0x05,0xa1,0x05,0xa1,
- 0x05,0xa1,0x05,0xa1,0x05,0xa1,0x05,0xa1,0x05,0xa1,0x05,0xa1,
- 0x05,0xa1,0x05,0xa1,0x05,0xa1,0x05,0x9d,0x08,0x9d,0x08,0x9d,
- 0x08,0x9d,0x08,0x9d,0x08,0x5b,0x05,0xea,0x05,0xea,0x05,0xea,
- 0x05,0xea,0x05,0xea,0x05,0xea,0x05,0xea,0x05,0xea,0x05,0xea,
- 0x05,0xea,0x05,0xea,0x05,0xea,0x05,0xea,0x05,0xea,0x05,0xea,
- 0x05,0xea,0x05,0xea,0x05,0xea,0x05,0xea,0x05,0xea,0x05,0xea,
- 0x05,0xea,0x05,0xea,0x05,0xea,0x05,0xea,0x05,0xea,0x05,0x69,
- 0x05,0x77,0x05,0x85,0x05,0x93,0x05,0xa0,0x08,0xa0,0x08,0xa0,
- 0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,
- 0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,
- 0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,
- 0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,
- 0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,
- 0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
- 0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
- 0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
- 0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
- 0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
- 0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
- 0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
- 0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
- 0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
- 0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
- 0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
- 0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
- 0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
- 0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
- 0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
- 0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
- 0x08,0x00,0x00,0xfa,0x8a,0x5c,0x50,0xf6,0xc3,0x0e,0x75,0x3c,
- 0xf6,0xc3,0x40,0x75,0x16,0xf6,0xc3,0x10,0x74,0x26,0xf6,0xc3,
- 0x01,0x75,0x13,0xf6,0xc3,0x20,0x75,0x15,0xc7,0x04,0xb6,0x04,
- 0xe9,0xcf,0x00,0x8b,0x44,0x02,0x89,0x04,0xff,0xe0,0xc7,0x04,
- 0x03,0x05,0xe9,0x0e,0x01,0xc7,0x04,0x66,0x08,0xe9,0x6a,0x04,
- 0xf6,0xc3,0x20,0x74,0x1a,0xc7,0x04,0xb3,0x08,0xe9,0xab,0x04,
- 0x8b,0x54,0x20,0xec,0x8a,0xc8,0xf6,0xc3,0x02,0x75,0x42,0xf6,
- 0xc3,0x08,0x75,0x0e,0xeb,0x69,0x90,0xc7,0x04,0x20,0x04,0xfb,
- 0x81,0xc6,0x80,0x00,0xff,0x24,0xf6,0xc1,0x04,0x74,0x27,0x80,
- 0x64,0x50,0xf7,0xf6,0x44,0x51,0x02,0x74,0x13,0xf6,0x44,0x29,
- 0x10,0x74,0x0d,0x8a,0x44,0x5d,0x83,0xc2,0x02,0xee,0x83,0xea,
- 0x02,0xe9,0x49,0x04,0x8a,0x44,0x5c,0x83,0xc2,0x02,0xee,0x83,
- 0xea,0x02,0xe9,0x3c,0x04,0xf6,0x44,0x50,0x04,0x75,0x28,0x83,
- 0x7c,0x24,0xff,0x74,0x1f,0xa1,0x00,0x0e,0x2b,0x44,0x26,0x3d,
- 0x64,0x00,0x77,0x14,0xb0,0x05,0xee,0x8a,0x44,0x75,0x24,0xef,
- 0x88,0x44,0x75,0xee,0x80,0x64,0x50,0xfd,0x80,0x64,0x4b,0xfd,
- 0xe9,0x0e,0x04,0xb0,0x01,0xee,0x90,0x90,0x90,0xec,0xa8,0x01,
- 0x74,0x25,0xb0,0x05,0xee,0x8a,0x44,0x75,0x0c,0x10,0x88,0x44,
- 0x75,0xee,0xa1,0x00,0x0e,0x03,0x44,0x24,0x89,0x44,0x26,0x80,
- 0x64,0x50,0xfb,0x80,0x64,0x4b,0xfb,0x80,0x4c,0x50,0x02,0x80,
- 0x4c,0x4b,0x02,0xe9,0xdb,0x03,0xfa,0x8b,0x54,0x20,0xec,0x8a,
- 0xc8,0x22,0x44,0x52,0x3a,0x44,0x53,0x75,0x19,0x8b,0x7c,0x0c,
- 0x3b,0x7c,0x0a,0x74,0x18,0x8e,0x44,0x08,0x26,0x8a,0x05,0x47,
- 0x23,0x7c,0x0e,0x89,0x7c,0x0c,0x83,0xc2,0x02,0xee,0xfb,0x81,
- 0xc6,0x80,0x00,0xff,0x24,0xb0,0x01,0xee,0x90,0x90,0x90,0xec,
- 0xa8,0x01,0x74,0x0c,0x80,0x64,0x50,0xef,0x80,0x64,0x4b,0xef,
- 0xc7,0x04,0xc3,0x03,0xfb,0x81,0xc6,0x80,0x00,0xff,0x24,0xfa,
- 0x8b,0x54,0x20,0xec,0x8a,0xc8,0x22,0x44,0x52,0x3a,0x44,0x53,
- 0x75,0x3a,0x8b,0x7c,0x0c,0x3b,0x7c,0x0a,0x74,0x1b,0x8e,0x44,
- 0x08,0x26,0x8a,0x05,0x47,0x23,0x7c,0x0e,0x89,0x7c,0x0c,0x8a,
- 0xd8,0x22,0x5c,0x62,0x32,0xff,0x03,0xdb,0x2e,0xff,0xa7,0xc1,
- 0x01,0xb0,0x01,0xee,0x90,0x90,0x90,0xec,0xa8,0x01,0x74,0x0c,
- 0x80,0x64,0x50,0xef,0x80,0x64,0x4b,0xef,0xc7,0x04,0xc3,0x03,
- 0xf6,0xc1,0x01,0x75,0x07,0xfb,0x81,0xc6,0x80,0x00,0xff,0x24,
- 0xe9,0x61,0x03,0xf6,0x44,0x2a,0x01,0x75,0x03,0xe9,0x39,0x03,
- 0xb0,0x27,0xeb,0x42,0x90,0xf6,0x44,0x2a,0x01,0x75,0x03,0xe9,
- 0x2b,0x03,0xb0,0x28,0xeb,0x34,0x90,0xf6,0x44,0x2a,0x01,0x75,
- 0x03,0xe9,0x1d,0x03,0xb0,0x21,0xeb,0x26,0x90,0xf6,0x44,0x2a,
- 0x01,0x75,0x03,0xe9,0x0f,0x03,0xb0,0x29,0xeb,0x18,0x90,0xf6,
- 0x44,0x2a,0x01,0x75,0x03,0xe9,0x01,0x03,0xb0,0x5e,0xeb,0x0a,
- 0x90,0xf6,0x44,0x2a,0x01,0x75,0x03,0xe9,0xf3,0x02,0x88,0x44,
- 0x61,0xb0,0x5c,0x83,0xc2,0x02,0xee,0x83,0xea,0x02,0x80,0x4c,
- 0x50,0x40,0xc7,0x04,0xc6,0x05,0xc7,0x44,0x02,0xc6,0x05,0xe9,
- 0xcb,0x02,0xfa,0x8b,0x54,0x20,0xec,0x8a,0xc8,0x22,0x44,0x52,
- 0x3a,0x44,0x53,0x75,0x12,0x80,0x64,0x50,0xbf,0xc7,0x04,0x03,
- 0x05,0x83,0x44,0x30,0x02,0x8a,0x44,0x61,0xe9,0xb9,0x02,0xe9,
- 0xa7,0x02,0xf6,0x44,0x2a,0x02,0x75,0x03,0xe9,0xaa,0x02,0x2c,
- 0x20,0xe9,0xa5,0x02,0x83,0xc2,0x02,0xee,0x83,0xea,0x02,0xf6,
- 0x44,0x2b,0x40,0x75,0x03,0xe9,0x89,0x02,0xb8,0x7f,0x00,0xe9,
- 0x9b,0x01,0x83,0xc2,0x02,0xee,0x83,0xea,0x02,0xf6,0x44,0x2b,
- 0x80,0x75,0xed,0xe9,0x73,0x02,0x83,0xc2,0x02,0xee,0x83,0xea,
- 0x02,0xf7,0x44,0x30,0xff,0xff,0x74,0x03,0xff,0x4c,0x30,0xf6,
- 0x44,0x2b,0x20,0x75,0x03,0xe9,0x59,0x02,0xb8,0x02,0x00,0xe9,
- 0x6b,0x01,0xb3,0x18,0x22,0x5c,0x2b,0x75,0x16,0x83,0xc2,0x02,
- 0xee,0x83,0xea,0x02,0x8b,0x44,0x30,0x05,0x08,0x00,0x25,0xf8,
- 0xff,0x89,0x44,0x30,0xe9,0x36,0x02,0x80,0xfb,0x18,0x75,0x57,
- 0xb0,0x20,0x83,0xc2,0x02,0xee,0x83,0xea,0x02,0x8b,0x44,0x30,
- 0x8b,0xd8,0x05,0x08,0x00,0x25,0xf8,0xff,0x89,0x44,0x30,0x2b,
- 0xc3,0x48,0x74,0x38,0x89,0x44,0x32,0x80,0x4c,0x50,0x40,0xc7,
- 0x44,0x02,0x8f,0x06,0xc7,0x04,0x8f,0x06,0xe9,0x02,0x02,0xfa,
- 0x8b,0x54,0x20,0xec,0x8a,0xc8,0x22,0x44,0x52,0x3a,0x44,0x53,
- 0x75,0x16,0xb0,0x20,0x83,0xc2,0x02,0xee,0x83,0xea,0x02,0xff,
- 0x4c,0x32,0x75,0x08,0x80,0x64,0x50,0xbf,0xc7,0x04,0x03,0x05,
- 0xe9,0xda,0x01,0x83,0xc2,0x02,0xee,0x83,0xea,0x02,0x80,0xfb,
- 0x08,0x75,0x18,0x8b,0x44,0x30,0x8b,0xd8,0x05,0x08,0x00,0x25,
- 0xf8,0xff,0x89,0x44,0x30,0x2b,0xc3,0x3d,0x05,0x00,0x7c,0xdc,
- 0xe9,0xce,0x00,0x8b,0x44,0x30,0x8b,0xd8,0x05,0x08,0x00,0x25,
- 0xf8,0xff,0x89,0x44,0x30,0xb8,0x02,0x00,0xe9,0xba,0x00,0xf6,
- 0x44,0x2a,0x20,0x75,0x43,0xf6,0x44,0x2a,0x04,0x74,0x42,0xf6,
- 0x44,0x2a,0x10,0x74,0x07,0xf7,0x44,0x30,0xff,0xff,0x74,0x30,
- 0xb0,0x0d,0x83,0xc2,0x02,0xee,0x83,0xea,0x02,0x80,0x4c,0x50,
- 0x40,0xc7,0x04,0x21,0x07,0xc7,0x44,0x02,0x21,0x07,0xe9,0x70,
- 0x01,0xfa,0x8b,0x54,0x20,0xec,0x8a,0xc8,0x22,0x44,0x52,0x3a,
- 0x44,0x53,0x75,0x1c,0x80,0x64,0x50,0xbf,0xc7,0x04,0x03,0x05,
- 0xb0,0x0a,0xeb,0x2b,0x90,0xb0,0x0a,0x83,0xc2,0x02,0xee,0x83,
- 0xea,0x02,0xf6,0x44,0x2b,0x01,0x75,0x03,0xe9,0x42,0x01,0xb8,
- 0x05,0x00,0xeb,0x55,0x90,0xf6,0x44,0x2a,0x08,0x75,0xe2,0xf6,
- 0x44,0x2a,0x10,0x74,0x06,0x83,0x7c,0x30,0x00,0x74,0x13,0x83,
- 0xc2,0x02,0xee,0x83,0xea,0x02,0xb3,0x06,0x22,0x5c,0x2b,0x75,
- 0x08,0xc7,0x44,0x30,0x00,0x00,0xe9,0x14,0x01,0x80,0xfb,0x02,
- 0x75,0x14,0x8b,0x44,0x30,0xc1,0xe8,0x04,0x05,0x03,0x00,0x3d,
- 0x06,0x00,0x72,0x14,0xb8,0x06,0x00,0xeb,0x0f,0x90,0x80,0xfb,
- 0x04,0x75,0x06,0xb8,0x05,0x00,0xeb,0x04,0x90,0xb8,0x09,0x00,
- 0xc7,0x44,0x30,0x00,0x00,0xf6,0x44,0x2a,0x40,0x74,0x45,0x3d,
- 0x20,0x00,0x77,0x40,0xbb,0x01,0x00,0x3d,0x03,0x00,0x7e,0x03,
- 0xbb,0x02,0x00,0x89,0x5c,0x32,0x80,0x4c,0x50,0x40,0xc7,0x44,
- 0x02,0xd2,0x07,0xc7,0x04,0xd2,0x07,0xe9,0xbf,0x00,0xfa,0x8b,
- 0x54,0x20,0xec,0x8a,0xc8,0x22,0x44,0x52,0x3a,0x44,0x53,0x75,
- 0x10,0x8a,0x44,0x60,0x83,0xc2,0x02,0xee,0x83,0xea,0x02,0x83,
- 0x6c,0x32,0x01,0x7e,0x50,0xe9,0x9d,0x00,0x05,0x06,0x00,0x03,
- 0xc0,0x89,0x44,0x32,0x80,0x4c,0x50,0x40,0xc7,0x44,0x02,0x0c,
- 0x08,0xc7,0x04,0x0c,0x08,0xe9,0x85,0x00,0xfa,0x8b,0x54,0x20,
- 0xec,0x8a,0xc8,0xb0,0x01,0xee,0x90,0x90,0x90,0xec,0xa8,0x01,
- 0x74,0x0f,0xa1,0x00,0x0e,0x01,0x44,0x32,0xc7,0x44,0x02,0x30,
- 0x08,0xc7,0x04,0x30,0x08,0xeb,0x62,0x90,0x8b,0x54,0x20,0xec,
- 0x8a,0xc8,0xa1,0x00,0x0e,0x2b,0x44,0x32,0x3d,0xe8,0x03,0x77,
- 0xec,0x80,0x64,0x50,0xbf,0xc7,0x04,0x03,0x05,0xeb,0x46,0x90,
- 0xb0,0x01,0xee,0x90,0x90,0x90,0xec,0xa8,0x01,0x74,0x3a,0x80,
- 0x64,0x50,0xef,0x80,0x64,0x4b,0xef,0xc7,0x04,0xb3,0x08,0xeb,
- 0x2c,0x90,0xfa,0x8b,0x54,0x20,0xec,0x8a,0xc8,0x22,0x44,0x52,
- 0x3a,0x44,0x53,0x75,0x1c,0x8b,0x7c,0x0c,0x3b,0x7c,0x0a,0x74,
- 0xcf,0x8e,0x44,0x08,0x26,0x8a,0x05,0x47,0x23,0x7c,0x0e,0x89,
- 0x7c,0x0c,0x83,0xc2,0x02,0xee,0x83,0xea,0x02,0xf6,0xc1,0x01,
- 0x75,0x26,0xfb,0x81,0xc6,0x80,0x00,0xff,0x24,0xff,0x44,0x30,
- 0x83,0xc2,0x02,0xee,0x83,0xea,0x02,0xf6,0xc1,0x01,0x75,0x10,
- 0xfb,0x81,0xc6,0x80,0x00,0xff,0x24,0xfa,0x8b,0x54,0x20,0xec,
- 0xa8,0x01,0x74,0xda,0xc6,0x44,0x49,0x02,0x8b,0x7c,0x12,0x8e,
- 0x44,0x10,0xb0,0x01,0xee,0x90,0x90,0x90,0xec,0x8a,0xe0,0x90,
- 0xb0,0x30,0xee,0x83,0xc2,0x02,0x90,0xec,0x83,0xea,0x02,0x23,
- 0x44,0x34,0xff,0x64,0x06,0xb3,0x1c,0x22,0x5c,0x51,0x75,0x1a,
- 0xf6,0x44,0x29,0x04,0x74,0x21,0xf6,0x44,0x29,0x20,0x75,0x2b,
- 0x80,0x7c,0x5e,0x00,0x75,0x1d,0xc7,0x44,0x06,0x58,0x0a,0xe9,
- 0x56,0x01,0xf6,0xc3,0x10,0x75,0x2e,0xf6,0xc3,0x04,0x75,0x74,
- 0xeb,0x6b,0x90,0xc7,0x44,0x06,0x62,0x0a,0xe9,0x4b,0x01,0xc7,
- 0x44,0x06,0x53,0x0a,0xe9,0x34,0x01,0x80,0x7c,0x5e,0x00,0x75,
- 0x08,0xc7,0x44,0x06,0xca,0x09,0xe9,0x9d,0x00,0xc7,0x44,0x06,
- 0xc5,0x09,0xe9,0x90,0x00,0x0a,0xc0,0x74,0x2a,0xfe,0x4c,0x63,
- 0x74,0x1a,0x80,0xe3,0xef,0x75,0xc4,0xf6,0x44,0x29,0x04,0x74,
- 0x21,0xf6,0x44,0x29,0x20,0x75,0x21,0x80,0x7c,0x5e,0x00,0x75,
- 0x18,0xe9,0x00,0x01,0x80,0x64,0x51,0xef,0x80,0xe3,0xef,0x75,
- 0xa6,0xeb,0x85,0x80,0x64,0x51,0xef,0xe9,0x06,0x01,0xe9,0xf5,
- 0x00,0xe9,0xe3,0x00,0x80,0x7c,0x5e,0x00,0x75,0x4f,0xeb,0x52,
- 0x90,0x80,0x64,0x51,0xf7,0xe9,0xe2,0x00,0x80,0x64,0x53,0x3f,
- 0x80,0x64,0x54,0xfe,0x80,0x4c,0x58,0x01,0x80,0x64,0x51,0xfb,
- 0xf6,0x44,0x29,0x40,0x75,0x2c,0x3a,0x44,0x5d,0x74,0x27,0x3a,
- 0x44,0x5c,0x74,0x22,0xf6,0x44,0x29,0x20,0x74,0x0a,0x3a,0x44,
- 0x5a,0x74,0x17,0x3a,0x44,0x5b,0x74,0x12,0xf6,0x44,0x5e,0xff,
- 0x74,0x09,0x3a,0x44,0x5e,0x75,0x04,0x80,0x4c,0x51,0x08,0xe9,
- 0xa0,0x00,0xe9,0xab,0x00,0x3a,0x44,0x5e,0x74,0x7d,0x3a,0x44,
- 0x5c,0x74,0x3d,0x3a,0x44,0x5d,0x74,0x55,0x3a,0x44,0x5a,0x74,
- 0x08,0x3a,0x44,0x5b,0x74,0x18,0xe9,0x81,0x00,0xf6,0x44,0x53,
- 0x40,0x74,0x07,0x80,0x64,0x53,0xbf,0xe9,0x82,0x00,0x3a,0x44,
- 0x5b,0x74,0x03,0xeb,0x7b,0x90,0x80,0x4c,0x53,0x40,0xf6,0x44,
- 0x29,0x08,0x74,0x70,0x80,0x4c,0x51,0x04,0xc7,0x44,0x06,0xe1,
- 0x08,0xeb,0x65,0x90,0xf6,0x44,0x53,0x80,0x74,0x0f,0x80,0x64,
- 0x53,0x7f,0x80,0x64,0x54,0xfe,0x80,0x4c,0x58,0x01,0xeb,0x50,
- 0x90,0x3a,0x44,0x5d,0x74,0x03,0xeb,0x48,0x90,0x80,0x4c,0x53,
- 0x80,0x80,0x4c,0x54,0x01,0x80,0x4c,0x58,0x01,0xf6,0x44,0x29,
- 0x08,0x74,0x35,0x80,0x4c,0x51,0x04,0xc7,0x44,0x06,0xe1,0x08,
- 0xeb,0x2a,0x90,0x80,0x4c,0x51,0x08,0xc7,0x44,0x06,0xe1,0x08,
- 0xeb,0x10,0x90,0x3a,0x44,0x5e,0x74,0xef,0x3a,0x44,0x5c,0x74,
- 0xaf,0x3a,0x44,0x5d,0x74,0xc7,0x3d,0xff,0x00,0x73,0x26,0xaa,
- 0x23,0x7c,0x16,0x3b,0x7c,0x14,0x74,0x4f,0xec,0xa8,0x01,0x74,
- 0x03,0xe9,0x4e,0xfe,0x89,0x7c,0x12,0x2b,0x7c,0x14,0x23,0x7c,
- 0x16,0x3b,0x7c,0x1c,0x73,0x46,0xfb,0x81,0xc6,0x80,0x00,0xff,
- 0x24,0x0a,0xe4,0x75,0x1e,0xb3,0x0c,0x22,0x5c,0x28,0x80,0xfb,
- 0x08,0x75,0xcc,0xaa,0x23,0x7c,0x16,0x3b,0x7c,0x14,0x74,0x1b,
- 0xaa,0x23,0x7c,0x16,0x3b,0x7c,0x14,0x74,0x12,0xeb,0xc1,0xf6,
- 0x44,0x28,0x04,0x75,0xbb,0xf6,0x44,0x28,0x08,0x75,0x50,0x32,
- 0xc0,0xeb,0xa8,0x4f,0x23,0x7c,0x16,0x89,0x7c,0x12,0xc6,0x44,
- 0x59,0x01,0xeb,0xa4,0xf6,0x44,0x51,0x02,0x74,0x07,0xfb,0x81,
- 0xc6,0x80,0x00,0xff,0x24,0x80,0x4c,0x51,0x02,0xb0,0x05,0xee,
- 0xb0,0x82,0x22,0x44,0x5f,0xf6,0xd0,0x22,0x44,0x75,0x88,0x44,
- 0x75,0xee,0xf6,0x44,0x29,0x10,0x74,0x10,0x80,0x4c,0x54,0x04,
- 0x80,0x4c,0x58,0x04,0x80,0x74,0x50,0x08,0xc7,0x04,0xc3,0x03,
- 0xfb,0x81,0xc6,0x80,0x00,0xff,0x24,0x26,0xc6,0x05,0xff,0x47,
- 0x23,0x7c,0x16,0x3b,0x7c,0x14,0x74,0xa7,0x32,0xff,0xf6,0x44,
- 0x29,0x80,0x74,0x0a,0x8a,0xdc,0xc0,0xeb,0x04,0x2e,0x8a,0xbf,
- 0xb1,0x01,0x26,0x88,0x3d,0x47,0x23,0x7c,0x16,0x3b,0x7c,0x14,
- 0x74,0x89,0xaa,0x23,0x7c,0x16,0x3b,0x7c,0x14,0x74,0x80,0xe9,
- 0x2e,0xff,0x1e,0x2e,0x8e,0x1e,0xc1,0x03,0xff,0x06,0x1c,0x0e,
- 0x60,0xbe,0x00,0x14,0xeb,0x0f,0x90,0x1e,0x2e,0x8e,0x1e,0xc1,
- 0x03,0xff,0x06,0x1a,0x0e,0x60,0xbe,0x00,0x10,0xb9,0x08,0x00,
- 0x8b,0x54,0x20,0xb0,0x03,0xee,0x90,0x90,0x32,0xff,0xec,0x8a,
- 0xd8,0x02,0xd8,0x2e,0xff,0xa7,0xa9,0x00,0x81,0xc6,0x00,0x01,
- 0x8b,0x54,0x20,0x0b,0xd2,0xe0,0xe4,0xb8,0x00,0x80,0xba,0x22,
- 0xff,0xef,0x61,0x1f,0xcf,0x81,0xce,0x80,0x00,0x8b,0x54,0x20,
- 0xff,0x06,0x20,0x0e,0xb0,0x01,0xee,0x8a,0x44,0x71,0x24,0xe7,
- 0x88,0x44,0x71,0xee,0xc6,0x44,0x49,0x02,0x80,0x4c,0x50,0x20,
- 0xc7,0x04,0xc3,0x03,0x81,0xe6,0x7f,0xff,0x8b,0x54,0x20,0xeb,
- 0xae,0x81,0xce,0x80,0x00,0x8b,0x54,0x20,0xff,0x06,0x22,0x0e,
- 0xec,0x0a,0xc0,0x79,0x7a,0x80,0x4c,0x51,0x10,0xc7,0x44,0x06,
- 0xe1,0x08,0xc6,0x44,0x63,0x04,0xf6,0x44,0x51,0x04,0x74,0x08,
- 0x80,0x64,0x51,0xfb,0x80,0x64,0x53,0x3f,0xf6,0x44,0x28,0x01,
- 0x75,0x59,0xf6,0x44,0x28,0x02,0x75,0x4f,0x8b,0x7c,0x12,0x8c,
- 0xc3,0x8e,0x44,0x10,0xf6,0x44,0x28,0x08,0x74,0x1e,0xb0,0xff,
- 0xaa,0x23,0x7c,0x16,0x3b,0x7c,0x14,0x74,0x26,0x32,0xc0,0xf6,
- 0x44,0x29,0x80,0x74,0x02,0xb0,0x10,0xaa,0x23,0x7c,0x16,0x3b,
- 0x7c,0x14,0x74,0x13,0x32,0xc0,0xaa,0x23,0x7c,0x16,0x3b,0x7c,
- 0x14,0x74,0x08,0x8e,0xc3,0x89,0x7c,0x12,0xeb,0x15,0x90,0x8e,
- 0xc3,0x4f,0x23,0x7c,0x16,0x89,0x7c,0x12,0xc6,0x44,0x59,0x01,
- 0xeb,0x05,0x90,0x80,0x4c,0x4f,0x01,0xb0,0x10,0xee,0x81,0xe6,
- 0x7f,0xff,0x8b,0x54,0x20,0xe9,0x17,0xff,0xff,0x06,0x1e,0x0e,
- 0xe9,0x10,0xff,0x1e,0x2e,0x8e,0x1e,0xc1,0x03,0x50,0x52,0x55,
- 0x8b,0xec,0x8b,0x46,0x08,0xa3,0x12,0x0e,0x32,0xe4,0xa0,0x22,
- 0x0c,0xa3,0x10,0x0e,0xff,0x06,0x00,0x0e,0x83,0x06,0x0e,0x0e,
- 0x0a,0x83,0x3e,0x04,0x0e,0x00,0x74,0x31,0x8b,0x16,0x00,0x0e,
- 0x2b,0x16,0x02,0x0e,0x3b,0x16,0x04,0x0e,0x72,0x23,0x8b,0x16,
- 0x00,0x0e,0x89,0x16,0x02,0x0e,0x8b,0x16,0x18,0x0d,0x3b,0x16,
- 0x1a,0x0d,0x74,0x11,0x80,0x3e,0x10,0x0c,0x01,0x74,0x16,0xb0,
- 0x00,0x90,0xe6,0x00,0x0c,0x08,0x90,0xe6,0x00,0xb8,0x00,0x80,
- 0xba,0x22,0xff,0xef,0x5d,0x5a,0x58,0x1f,0xcf,0xb0,0x80,0xe6,
- 0x00,0xa0,0x11,0x0c,0x0c,0x10,0xa2,0x11,0x0c,0xeb,0xe6,0x1e,
- 0x2e,0x8e,0x1e,0xc1,0x03,0xff,0x06,0x28,0x0e,0x55,0x8b,0xec,
- 0x8b,0x6e,0x02,0x89,0x2e,0x16,0x0e,0x5d,0x1f,0xcf,0x1e,0x2e,
- 0x8e,0x1e,0xc1,0x03,0xff,0x06,0x24,0x0e,0x55,0x8b,0xec,0x8b,
- 0x6e,0x02,0x89,0x2e,0x14,0x0e,0x5d,0x80,0x3e,0x10,0x0c,0x01,
- 0x75,0x12,0x50,0xa0,0x11,0x0c,0x0c,0x01,0xa2,0x11,0x0c,0xe4,
- 0x00,0x90,0x90,0x24,0x7f,0xe6,0x00,0x58,0x1f,0xcf,0x1e,0x06,
- 0x60,0xb8,0x00,0x80,0xba,0x22,0xff,0xef,0x2e,0x8e,0x1e,0xc1,
- 0x03,0x2e,0x8e,0x06,0xc1,0x03,0x2e,0xff,0x06,0x30,0x0d,0xfc,
- 0xff,0x26,0x2e,0x0e,0x00,0x00,0xfb,0x40,0x43,0x41,0x42,0x46,
- 0x47,0x45,0xeb,0xf6,0xc3,0x00,0x00,0x8f,0x06,0x2e,0x0e,0x2e,
- 0xff,0x06,0x3d,0x0d,0xb8,0x00,0x00,0xba,0x58,0xff,0xef,0xb8,
- 0x00,0xe0,0xba,0x5e,0xff,0xef,0x61,0x07,0x1f,0xcf,0xc2,0xfe,
- 0xff,0x8b,0x7c,0x0a,0x2b,0x7c,0x0c,0x23,0x7c,0x0e,0x3b,0x7c,
- 0x18,0x77,0x2e,0xc6,0x44,0x4d,0x00,0x80,0x4c,0x4f,0x02,0xeb,
- 0x5a,0x90,0x8b,0x7c,0x0a,0x3b,0x7c,0x0c,0x75,0x1b,0x8b,0x3e,
- 0x10,0x0d,0x3b,0x3e,0x12,0x0d,0x75,0x53,0xf6,0x44,0x4b,0xff,
- 0x75,0x4d,0xc6,0x44,0x4c,0x00,0x80,0x4c,0x4f,0x04,0xeb,0x43,
- 0x90,0xf6,0x44,0x50,0x10,0x75,0x3c,0xeb,0x09,0x90,0x8b,0x7c,
- 0x0a,0x2b,0x7c,0x0c,0x74,0x31,0x80,0x4c,0x50,0x10,0x80,0x4c,
- 0x4b,0x10,0xc7,0x04,0xc3,0x03,0xeb,0x23,0x90,0xfa,0x8b,0x36,
- 0x08,0x0e,0x8b,0x54,0x20,0xec,0x8a,0xf8,0x8a,0x5c,0x54,0x32,
- 0xfb,0xf6,0x44,0x4d,0xff,0x75,0x8e,0xf6,0x44,0x4c,0xff,0x75,
- 0xa1,0xf6,0x44,0x50,0x10,0x74,0xc7,0xec,0x32,0xc3,0x22,0xf8,
- 0x83,0x2e,0x10,0x0e,0x01,0x78,0x05,0xd0,0x6c,0x49,0x72,0x45,
- 0x8b,0x7c,0x12,0x2b,0x7c,0x14,0x74,0x22,0x80,0x7c,0x4e,0x00,
- 0x74,0x1c,0x23,0x7c,0x16,0x03,0xff,0x3b,0x7c,0x16,0x73,0x43,
- 0x8b,0x0e,0x0e,0x0e,0x2b,0x4c,0x6e,0x3b,0x4c,0x22,0x73,0x37,
- 0x80,0x7c,0x49,0x00,0x74,0x31,0xf6,0x44,0x51,0x02,0x75,0x3c,
- 0xec,0x32,0xc3,0x22,0xf8,0x80,0xe7,0x38,0xfb,0x89,0x1e,0x30,
- 0x0e,0xbe,0x00,0x10,0xff,0x14,0xeb,0x61,0x90,0xb0,0x01,0xee,
- 0x8a,0x44,0x71,0x0c,0x10,0x88,0x44,0x71,0xee,0x80,0x64,0x50,
- 0xdf,0xc7,0x04,0xc3,0x03,0xeb,0xa5,0xc6,0x44,0x4e,0x00,0x8b,
- 0x0e,0x0e,0x0e,0x89,0x4c,0x6e,0x80,0x4c,0x4f,0x08,0xeb,0xbe,
- 0x8b,0x7c,0x12,0x2b,0x7c,0x14,0x23,0x7c,0x16,0x3b,0x7c,0x1a,
- 0x73,0xb6,0x80,0x64,0x51,0xfd,0xf6,0x44,0x29,0x10,0x74,0x10,
- 0x80,0x64,0x54,0xfb,0x80,0x4c,0x58,0x04,0x80,0x74,0x50,0x08,
- 0xc7,0x04,0xc3,0x03,0xb0,0x05,0xee,0xb0,0x82,0x22,0x44,0x5f,
- 0x0a,0x44,0x75,0x88,0x44,0x75,0xee,0xeb,0x8b,0xfa,0x8b,0x36,
- 0x08,0x0e,0x8b,0x1e,0x30,0x0e,0x8a,0xcb,0xe5,0x80,0x23,0x44,
- 0x2e,0x74,0x02,0xf6,0xd1,0x80,0xe1,0x40,0x0a,0xf9,0x8a,0xdf,
- 0x22,0x5c,0x55,0x30,0x5c,0x54,0x32,0xfb,0x88,0x7c,0x55,0x0a,
- 0x5c,0x58,0x88,0x5c,0x58,0x22,0x5c,0x56,0x75,0x24,0x80,0x7c,
- 0x4f,0x00,0x75,0x22,0xfb,0x03,0x74,0x1e,0x89,0x36,0x08,0x0e,
- 0xff,0x06,0x26,0x0e,0x8b,0x3e,0x12,0x0d,0x3b,0x3e,0x10,0x0d,
- 0x75,0x46,0xbe,0x00,0x10,0xff,0x14,0xe9,0xd3,0xfe,0x80,0x4c,
- 0x4f,0x20,0x8b,0x3e,0x18,0x0d,0x8a,0x44,0x48,0x8a,0x64,0x4f,
- 0x89,0x85,0x00,0x08,0x8a,0x44,0x54,0x8a,0x64,0x57,0x89,0x85,
- 0x02,0x08,0x83,0xc7,0x04,0x81,0xe7,0xfc,0x03,0x3b,0x3e,0x1a,
- 0x0d,0x74,0x13,0x88,0x44,0x57,0xc6,0x44,0x4f,0x00,0x8a,0x44,
- 0x56,0xf6,0xd0,0x20,0x44,0x58,0x89,0x3e,0x18,0x0d,0xeb,0xa4,
- 0xff,0x06,0x2c,0x0e,0xbe,0x00,0x10,0xff,0x14,0xfa,0x8b,0x3e,
- 0x12,0x0d,0x81,0xc7,0x00,0x04,0x8a,0x5d,0x01,0x83,0xe3,0x0f,
- 0x03,0xdb,0x2e,0x8b,0xb7,0x89,0x00,0x8b,0x54,0x20,0x0b,0xd2,
- 0x74,0x0d,0x8a,0x1d,0x83,0xe3,0x1f,0x03,0xdb,0xfa,0x2e,0xff,
- 0xa7,0x9c,0x0f,0xff,0x06,0x2a,0x0e,0x8b,0x3e,0x12,0x0d,0x8b,
- 0x36,0x18,0x0d,0x8b,0x9d,0x00,0x04,0x89,0x9c,0x00,0x08,0x8b,
- 0x9d,0x02,0x04,0x89,0x9c,0x02,0x08,0x83,0xc6,0x04,0x81,0xe6,
- 0xfc,0x03,0x3b,0x36,0x1a,0x0d,0x74,0x04,0x89,0x36,0x18,0x0d,
- 0xfb,0x8b,0x3e,0x12,0x0d,0x83,0xc7,0x04,0x81,0xe7,0xfc,0x03,
- 0x89,0x3e,0x12,0x0d,0xbe,0x00,0x10,0xff,0x14,0xe9,0x1d,0xfe,
- 0xdc,0x0f,0xe4,0x0f,0xec,0x0f,0x0d,0x10,0x1c,0x10,0x57,0x0f,
- 0x2f,0x10,0x57,0x0f,0x3b,0x10,0x54,0x10,0x83,0x10,0xcf,0x10,
- 0xdb,0x10,0xe4,0x10,0xeb,0x10,0x35,0x11,0x7d,0x11,0x83,0x11,
- 0xa1,0x11,0xb9,0x11,0xf2,0x11,0x38,0x12,0x03,0x13,0x0c,0x13,
- 0x57,0x0f,0x57,0x0f,0x57,0x0f,0x57,0x0f,0x57,0x0f,0x57,0x0f,
- 0x57,0x0f,0x57,0x0f,0x8b,0x45,0x02,0x89,0x44,0x1a,0xeb,0xa0,
- 0x8b,0x45,0x02,0x89,0x44,0x1c,0xeb,0x98,0x8b,0x45,0x02,0x8b,
- 0x5c,0x0a,0x2b,0x5c,0x0c,0x23,0x5c,0x0e,0x8b,0x4c,0x0a,0x2b,
- 0xc8,0x23,0x4c,0x0e,0x3b,0xd9,0x76,0x06,0x23,0x44,0x0e,0x89,
- 0x44,0x0c,0xe9,0x77,0xff,0x80,0x4c,0x53,0x80,0x80,0x4c,0x54,
- 0x01,0x80,0x4c,0x58,0x01,0xe9,0x68,0xff,0x80,0x64,0x53,0x3f,
- 0x80,0x64,0x54,0xfe,0x80,0x4c,0x58,0x01,0x80,0x64,0x51,0xfb,
- 0xe9,0x55,0xff,0x8b,0x45,0x02,0x88,0x44,0x5a,0x88,0x64,0x5b,
- 0xe9,0x49,0xff,0x8b,0x45,0x02,0x0b,0xc0,0x74,0x03,0x89,0x44,
- 0x24,0x80,0x4c,0x50,0x04,0x80,0x4c,0x4b,0x04,0xc7,0x04,0xc3,
- 0x03,0xe9,0x30,0xff,0x8b,0x5d,0x02,0xf6,0xd7,0x22,0x7c,0x54,
- 0x0a,0xdf,0x8a,0x44,0x54,0x32,0xc3,0x24,0x82,0x30,0x44,0x54,
- 0xb0,0x05,0xee,0x8a,0x44,0x75,0x32,0xd8,0x8a,0x7c,0x5f,0xf6,
- 0xd7,0x22,0xdf,0x80,0xe3,0x82,0x32,0xc3,0x88,0x44,0x75,0xee,
- 0xe9,0x01,0xff,0x8b,0x5d,0x02,0xf6,0xc7,0x04,0x75,0x08,0x80,
- 0x64,0x53,0x3f,0x80,0x64,0x51,0xfb,0x8a,0x44,0x29,0x32,0xc7,
- 0xa8,0x10,0x74,0x0e,0xf6,0x44,0x51,0x02,0x74,0x08,0x80,0x74,
- 0x50,0x08,0xc7,0x04,0xc3,0x03,0x88,0x5c,0x28,0x88,0x7c,0x29,
- 0xb4,0x60,0xf6,0xc3,0x10,0x74,0x03,0x80,0xcc,0x10,0x8a,0x44,
- 0x62,0xf6,0xc3,0x20,0x74,0x02,0x24,0x7f,0x89,0x44,0x34,0xc7,
- 0x44,0x06,0xe1,0x08,0xe9,0xb5,0xfe,0x8b,0x45,0x02,0x88,0x44,
- 0x5c,0x88,0x64,0x5d,0xe9,0xa9,0xfe,0x8b,0x45,0x02,0x89,0x44,
- 0x18,0xe9,0xa0,0xfe,0xff,0x1e,0x24,0x0d,0xe9,0x99,0xfe,0xf6,
- 0x44,0x51,0x02,0x75,0x41,0x8b,0x44,0x12,0x2b,0x44,0x14,0x23,
- 0x44,0x16,0x3b,0x44,0x1a,0x72,0x33,0x80,0x4c,0x51,0x02,0xf6,
- 0x44,0x29,0x10,0x74,0x10,0x80,0x4c,0x54,0x04,0x80,0x4c,0x58,
- 0x04,0x80,0x74,0x50,0x08,0xc7,0x04,0xc3,0x03,0xf6,0x44,0x5f,
- 0x82,0x74,0x13,0xb0,0x05,0xee,0x8a,0x44,0x75,0xb4,0x82,0x22,
- 0x64,0x5f,0xf6,0xd4,0x22,0xc4,0x88,0x44,0x75,0xee,0xe9,0x4f,
- 0xfe,0xf6,0x44,0x51,0x02,0x74,0x3f,0x8b,0x44,0x12,0x2b,0x44,
- 0x14,0x23,0x44,0x16,0x3b,0x44,0x1c,0x73,0xe9,0x80,0x64,0x51,
- 0xfd,0xf6,0x44,0x29,0x10,0x74,0x10,0x80,0x64,0x54,0xfb,0x80,
- 0x4c,0x58,0x04,0x80,0x74,0x50,0x08,0xc7,0x04,0xc3,0x03,0xf6,
- 0x44,0x5f,0x02,0x74,0x11,0xb0,0x05,0xee,0x8a,0x44,0x75,0xb4,
- 0x82,0x22,0x64,0x5f,0x0a,0xc4,0x88,0x44,0x75,0xee,0xe9,0x07,
- 0xfe,0xe8,0x8a,0x02,0xe9,0x01,0xfe,0x8b,0x45,0x02,0xbb,0x10,
- 0x27,0xf7,0xe3,0xbb,0x0f,0x00,0xf7,0xf3,0xa3,0x06,0x0e,0xba,
- 0x52,0xff,0xef,0xba,0x50,0xff,0xb8,0x00,0x00,0xef,0xe9,0xe3,
- 0xfd,0x8b,0x45,0x02,0x3a,0x06,0x22,0x0c,0x72,0x0c,0x3b,0x06,
- 0x1a,0x0c,0x77,0x06,0xe8,0xab,0x01,0xe9,0xce,0xfd,0xe9,0x9e,
- 0xfd,0x8b,0x45,0x02,0x88,0x44,0x2a,0x88,0x64,0x2b,0x0b,0xc0,
- 0x75,0x07,0x80,0x64,0x50,0xfe,0xeb,0x10,0x90,0xf6,0x44,0x50,
- 0x01,0x75,0x09,0x80,0x4c,0x50,0x01,0xc7,0x44,0x30,0x00,0x00,
- 0xa8,0x80,0x75,0x07,0xc6,0x44,0x60,0x00,0xeb,0x05,0x90,0xc6,
- 0x44,0x60,0x7f,0xc7,0x04,0xc3,0x03,0xe9,0x92,0xfd,0x8b,0x5d,
- 0x02,0xf6,0xd7,0x22,0x7c,0x5f,0x0a,0xdf,0x8a,0xfb,0x88,0x5c,
- 0x5f,0x8a,0x44,0x52,0x8a,0x64,0x53,0x8b,0xcb,0x33,0xc8,0x81,
- 0xe1,0x38,0x38,0x33,0xc1,0x88,0x44,0x52,0x88,0x64,0x53,0xb0,
- 0x05,0xee,0xf6,0xd3,0x22,0x5c,0x54,0xf6,0x44,0x51,0x02,0x75,
- 0x02,0x0a,0xdf,0x8a,0x44,0x75,0x32,0xd8,0x80,0xe3,0x82,0x32,
- 0xc3,0x88,0x44,0x75,0xee,0xe9,0x4c,0xfd,0x8b,0x5d,0x02,0x88,
- 0x5c,0x2c,0x88,0x7c,0x2d,0x8b,0xcb,0x83,0xe3,0x0f,0x03,0xdb,
- 0x80,0x3e,0x10,0x0c,0x01,0x75,0x1f,0xa1,0x0e,0x0c,0x86,0xe0,
- 0x3d,0x32,0x31,0x73,0x15,0xf6,0xc5,0x04,0x75,0x08,0x2e,0x8b,
- 0x9f,0x69,0x01,0xeb,0x1b,0x90,0x2e,0x8b,0x9f,0x89,0x01,0xeb,
- 0x13,0x90,0xf6,0xc5,0x04,0x75,0x08,0x2e,0x8b,0x9f,0x29,0x01,
- 0xeb,0x06,0x90,0x2e,0x8b,0x9f,0x49,0x01,0xb0,0x0c,0xee,0x8a,
- 0xc3,0x88,0x44,0x7c,0xee,0xb0,0x0d,0x90,0x90,0xee,0x8a,0xc7,
- 0x88,0x44,0x7d,0xee,0xb0,0x04,0xee,0xb0,0x44,0xf6,0xc1,0x40,
- 0x74,0x0c,0xf6,0xc1,0x80,0x74,0x05,0x04,0x04,0xeb,0x03,0x90,
- 0x0c,0x08,0xf6,0xc5,0x01,0x74,0x09,0x0c,0x01,0xf6,0xc5,0x02,
- 0x75,0x02,0x0c,0x02,0x88,0x44,0x74,0xee,0xb0,0x03,0x90,0x90,
- 0xee,0x8a,0xd9,0x80,0xe3,0x30,0xc0,0xeb,0x04,0x32,0xff,0x2e,
- 0x8a,0xa7,0xa9,0x01,0x8a,0x44,0x73,0x24,0x3f,0x0a,0xc4,0x88,
- 0x44,0x73,0xee,0x90,0x90,0xb0,0x05,0xee,0xd0,0xec,0x8a,0x44,
- 0x75,0x24,0x9f,0x0a,0xc4,0x88,0x44,0x75,0xee,0x2e,0x8a,0x87,
- 0xad,0x01,0x88,0x44,0x62,0xf6,0x44,0x28,0x20,0x74,0x02,0x24,
- 0x7f,0x88,0x44,0x34,0xe9,0x81,0xfc,0x8a,0x45,0x02,0x88,0x44,
- 0x5e,0xe9,0x78,0xfc,0x8b,0x45,0x02,0xba,0x5a,0xff,0xef,0x9c,
- 0xff,0x36,0x26,0x0d,0xff,0x36,0x24,0x0d,0x1e,0x06,0x60,0x8b,
- 0x36,0x0a,0x0e,0xc7,0x04,0x3f,0x0d,0xe9,0x5a,0xfc,0xb8,0x00,
- 0x00,0x8e,0xc0,0x8b,0xf0,0x8b,0xf8,0x2e,0x8b,0x9c,0x49,0x00,
- 0x83,0xc6,0x02,0x26,0x89,0x1d,0x26,0x8c,0x4d,0x02,0x83,0xc7,
- 0x04,0x81,0xff,0x80,0x00,0x72,0xe8,0x26,0xc7,0x05,0xcb,0x0c,
- 0x26,0x8c,0x4d,0x02,0x83,0xc7,0x04,0x81,0xff,0x00,0x04,0x72,
- 0xee,0xc3,0xc1,0xe0,0x06,0x8b,0xd8,0x8c,0xda,0x81,0xc2,0x00,
- 0x04,0x8b,0xfa,0x8a,0x0e,0x22,0x0c,0xb5,0x00,0xbe,0x00,0x10,
- 0x33,0xc0,0x89,0x44,0x0a,0x89,0x44,0x0c,0x89,0x44,0x12,0x89,
- 0x44,0x14,0x81,0xc6,0x80,0x00,0xe2,0xee,0x89,0x36,0x0a,0x0e,
- 0xb8,0x01,0x00,0x8b,0xd0,0xb3,0x00,0x8a,0x0e,0x22,0x0c,0xb5,
- 0x00,0xbe,0x00,0x10,0x2b,0xda,0x72,0x29,0x89,0x44,0x16,0x81,
- 0xc6,0x80,0x00,0xe2,0xf3,0x8a,0x0e,0x22,0x0c,0xb5,0x00,0xbe,
- 0x00,0x10,0x2b,0xda,0x72,0x13,0x89,0x44,0x0e,0x81,0xc6,0x80,
- 0x00,0xe2,0xf3,0x8b,0xd0,0x03,0xc0,0x81,0xfa,0x00,0x02,0x72,
- 0xca,0x8a,0x0e,0x22,0x0c,0xb5,0x00,0xbe,0x00,0x10,0x89,0x7c,
- 0x10,0x8b,0x44,0x16,0x03,0xf8,0x8b,0xd7,0xc1,0xe0,0x04,0x48,
- 0x89,0x44,0x16,0x81,0xc6,0x80,0x00,0xe2,0xe9,0x8a,0x0e,0x22,
- 0x0c,0xb5,0x00,0xbe,0x00,0x10,0x89,0x7c,0x08,0x8b,0x44,0x0e,
- 0x03,0xf8,0x8b,0xd7,0xc1,0xe0,0x04,0x48,0x89,0x44,0x0e,0x81,
- 0xc6,0x80,0x00,0xe2,0xe9,0xc3,0xc7,0x04,0x20,0x04,0xc7,0x44,
- 0x06,0xe1,0x08,0x8b,0xc6,0x2d,0x00,0x10,0xb1,0x80,0xf6,0xf1,
- 0x88,0x44,0x48,0xc7,0x44,0x0a,0x00,0x00,0xc7,0x44,0x0c,0x00,
- 0x00,0xc7,0x44,0x12,0x00,0x00,0xc7,0x44,0x14,0x00,0x00,0xc7,
- 0x44,0x18,0x00,0x00,0xc7,0x44,0x1a,0x00,0x00,0xc7,0x44,0x1c,
- 0xff,0xff,0x8a,0x5c,0x48,0x83,0xe3,0x0f,0x03,0xdb,0x8b,0x97,
- 0x90,0x0c,0x89,0x54,0x20,0xb8,0x01,0x00,0x8a,0x4c,0x48,0xd3,
- 0xe0,0x89,0x44,0x2e,0xc7,0x44,0x24,0x19,0x00,0xc7,0x44,0x26,
- 0x00,0x00,0xc6,0x44,0x4a,0x00,0xc7,0x44,0x30,0x00,0x00,0xc7,
- 0x44,0x32,0x00,0x00,0xc6,0x44,0x4c,0x00,0xc6,0x44,0x4d,0x00,
- 0xc6,0x44,0x4e,0x00,0xc6,0x44,0x4f,0x00,0xc6,0x44,0x50,0x00,
- 0xc6,0x44,0x4b,0x00,0xc6,0x44,0x51,0x00,0xc6,0x44,0x28,0x00,
- 0xc6,0x44,0x29,0x00,0xc6,0x44,0x2a,0x00,0xc6,0x44,0x2b,0x00,
- 0xc6,0x44,0x54,0x00,0xc6,0x44,0x57,0x00,0xc6,0x44,0x55,0x00,
- 0xc6,0x44,0x56,0x00,0xc6,0x44,0x58,0x00,0xc6,0x44,0x52,0x04,
- 0xc6,0x44,0x53,0x04,0xc6,0x44,0x5f,0x00,0xc6,0x44,0x2c,0x3d,
- 0xc6,0x44,0x2d,0x00,0xc7,0x44,0x34,0xff,0x60,0xc6,0x44,0x62,
- 0xff,0xc6,0x44,0x5d,0x13,0xc6,0x44,0x5c,0x11,0xc6,0x44,0x5e,
- 0x00,0xc6,0x44,0x60,0x23,0xc6,0x44,0x61,0x23,0x0b,0xd2,0x75,
- 0x03,0xe9,0xd9,0x00,0xb0,0x09,0xee,0x8a,0x4c,0x48,0xb0,0x80,
- 0xd2,0xe8,0xee,0xc6,0x44,0x70,0x00,0xb0,0x01,0xee,0xb0,0x11,
- 0x88,0x44,0x71,0xee,0xb0,0x02,0x90,0x90,0xee,0x8a,0x44,0x48,
- 0xc0,0xe0,0x03,0x24,0xf0,0x88,0x44,0x72,0xee,0xb0,0x03,0x90,
- 0x90,0xee,0xb0,0xc0,0x88,0x44,0x73,0xee,0xb0,0x04,0x90,0x90,
- 0xee,0xb0,0x44,0x88,0x44,0x74,0xee,0xb0,0x05,0x90,0xee,0xb0,
- 0x60,0x88,0x44,0x75,0xee,0xc6,0x44,0x76,0x00,0xc6,0x44,0x77,
- 0x00,0xc6,0x44,0x78,0x00,0xb0,0x09,0xee,0xb0,0x09,0x88,0x44,
- 0x79,0xee,0xc6,0x44,0x7a,0x00,0xb0,0x0b,0xee,0xb0,0x52,0x88,
- 0x44,0x7b,0xee,0x80,0x3e,0x10,0x0c,0x01,0x75,0x21,0xa1,0x0e,
- 0x0c,0x86,0xe0,0x3d,0x32,0x31,0x73,0x17,0xb0,0x0c,0xee,0xb0,
- 0x18,0x88,0x44,0x7c,0xee,0xb0,0x0d,0x90,0x90,0xee,0xb0,0x00,
- 0x88,0x44,0x7d,0xee,0xeb,0x15,0x90,0xb0,0x0c,0xee,0xb0,0x16,
- 0x88,0x44,0x7c,0xee,0xb0,0x0d,0x90,0x90,0xee,0xb0,0x00,0x88,
- 0x44,0x7d,0xee,0xb0,0x0e,0x90,0x90,0xee,0xb0,0x03,0x88,0x44,
- 0x7e,0xee,0xb0,0x0f,0x90,0x90,0xee,0xb0,0x80,0x88,0x44,0x7f,
- 0xee,0xb0,0x03,0x90,0x90,0xee,0x8a,0x44,0x73,0x0c,0x01,0x88,
- 0x44,0x73,0xee,0x90,0x90,0xb0,0x05,0xee,0x8a,0x44,0x75,0x0c,
- 0x08,0x88,0x44,0x75,0xee,0xc3,0xfa,0x8c,0xd8,0x25,0x00,0xf0,
- 0x8e,0xd0,0xbc,0xfe,0x1f,0x8c,0xd8,0x25,0x00,0xf0,0x8e,0xd8,
- 0x80,0x3e,0x40,0x0d,0x01,0x75,0x51,0xa1,0x0e,0x0c,0x86,0xe0,
- 0x3d,0x30,0x32,0x73,0x47,0x8b,0x1e,0x20,0x0c,0x8a,0x16,0x23,
- 0x0c,0xc6,0x06,0x23,0x0c,0x00,0x83,0xfb,0x00,0x74,0x07,0xfe,
- 0xca,0xc6,0x06,0x23,0x0c,0x01,0x88,0x16,0x22,0x0c,0xbe,0x10,
- 0x0c,0xbf,0x90,0x0c,0xb9,0x08,0x00,0x1e,0x07,0xfc,0xf3,0xa5,
- 0xbf,0xa0,0x0c,0xb8,0x00,0x00,0xb9,0x08,0x00,0xf3,0xab,0xc7,
- 0x06,0x1a,0x0c,0x70,0x00,0xa0,0x40,0x0d,0xa2,0x10,0x0c,0xc6,
- 0x06,0x11,0x0c,0x00,0x2e,0x8c,0x1e,0xc1,0x03,0xc7,0x06,0x18,
- 0x0e,0x02,0x00,0xe8,0xec,0xfc,0xc7,0x06,0x24,0x0d,0x5a,0x0d,
- 0x8c,0x0e,0x26,0x0d,0xc7,0x06,0x18,0x0e,0x06,0x00,0xa1,0x1a,
- 0x0c,0xe8,0x0a,0xfd,0xc7,0x06,0x18,0x0e,0x0a,0x00,0xbe,0x00,
- 0x10,0xc7,0x44,0x1e,0x80,0x00,0xe8,0xa5,0xfd,0x81,0xc6,0x80,
- 0x00,0x81,0xfe,0x00,0x18,0x72,0xee,0xa0,0x22,0x0c,0xb4,0x80,
- 0xf6,0xe4,0xbe,0x00,0x10,0x03,0xf0,0x89,0x36,0x0a,0x0e,0x29,
- 0x44,0x9e,0xc7,0x06,0x00,0x0e,0x00,0x00,0xc7,0x06,0x02,0x0e,
- 0x00,0x00,0xc7,0x06,0x04,0x0e,0x00,0x00,0xc7,0x06,0x06,0x0e,
- 0x9a,0x02,0xba,0x52,0xff,0xa1,0x06,0x0e,0xef,0xba,0x50,0xff,
- 0xb8,0x00,0x00,0xef,0xba,0x56,0xff,0xb8,0x05,0xe0,0xef,0xba,
- 0x5e,0xff,0xb8,0x00,0x40,0xef,0xba,0x66,0xff,0xb8,0x00,0x40,
- 0xef,0xc7,0x06,0x10,0x0d,0x00,0x00,0xc7,0x06,0x12,0x0d,0x00,
- 0x00,0xc7,0x06,0x14,0x0d,0x00,0x04,0xc7,0x06,0x16,0x0d,0xfc,
- 0x03,0xc7,0x06,0x18,0x0d,0x00,0x00,0xc7,0x06,0x1a,0x0d,0x00,
- 0x00,0xc7,0x06,0x1c,0x0d,0x00,0x08,0xc7,0x06,0x1e,0x0d,0xfc,
- 0x03,0xb0,0x00,0x90,0xe6,0x00,0xc7,0x06,0x18,0x0e,0x32,0x00,
- 0xba,0x38,0xff,0xb8,0x11,0x00,0xef,0xba,0x3a,0xff,0xb8,0x08,
- 0x00,0xef,0xba,0x3c,0xff,0xb8,0x08,0x00,0xef,0xba,0x3e,0xff,
- 0xb8,0x08,0x00,0x80,0x3e,0x22,0x0c,0x08,0x76,0x03,0xb8,0x12,
- 0x00,0xef,0xba,0x32,0xff,0xb8,0x05,0x00,0xef,0xba,0x28,0xff,
- 0xb8,0x6c,0x00,0xef,0xba,0x22,0xff,0xb8,0x00,0x80,0xef,0xc7,
- 0x06,0x18,0x0e,0x33,0x00,0xc7,0x06,0x20,0x0d,0x4f,0x00,0xc7,
- 0x06,0x21,0x0d,0x53,0x00,0x8b,0x36,0x0a,0x0e,0xc7,0x04,0x3c,
- 0x0d,0xc7,0x06,0x08,0x0e,0x00,0x10,0xe9,0x63,0xf6,0x40,0x28,
- 0x23,0x29,0x20,0x24,0x49,0x64,0x3a,0x20,0x78,0x61,0x63,0x6f,
- 0x6f,0x6b,0x2e,0x61,0x73,0x6d,0x2c,0x76,0x20,0x37,0x2e,0x32,
- 0x35,0x20,0x31,0x39,0x39,0x35,0x2f,0x30,0x31,0x2f,0x31,0x32,
- 0x20,0x32,0x30,0x3a,0x35,0x39,0x3a,0x32,0x31,0x20,0x6d,0x69,
- 0x6c,0x74,0x20,0x45,0x78,0x70,0x20,0x24,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
-};
-
-static unsigned pcxx_ncook=sizeof(pcxx_cook);
diff --git a/sys/gnu/i386/isa/dgm.c b/sys/gnu/i386/isa/dgm.c
deleted file mode 100644
index 18122f0..0000000
--- a/sys/gnu/i386/isa/dgm.c
+++ /dev/null
@@ -1,2002 +0,0 @@
-/*-
- * $FreeBSD$
- *
- * This driver and the associated header files support the ISA PC/Xem
- * Digiboards. Its evolutionary roots are described below.
- * Jack O'Neill <jack@diamond.xtalwind.net>
- *
- * Digiboard driver.
- *
- * Stage 1. "Better than nothing".
- * Stage 2. "Gee, it works!".
- *
- * Based on sio driver by Bruce Evans and on Linux driver by Troy
- * De Jongh <troyd@digibd.com> or <troyd@skypoint.com>
- * which is under GNU General Public License version 2 so this driver
- * is forced to be under GPL 2 too.
- *
- * Written by Serge Babkin,
- * Joint Stock Commercial Bank "Chelindbank"
- * (Chelyabinsk, Russia)
- * babkin@hq.icb.chel.su
- *
- * Assorted hacks to make it more functional and working under 3.0-current.
- * Fixed broken routines to prevent processes hanging on closed (thanks
- * to Bruce for his patience and assistance). Thanks also to Maxim Bolotin
- * <max@run.net> for his patches which did most of the work to get this
- * running under 2.2/3.0-current.
- * Implemented ioctls: TIOCMSDTRWAIT, TIOCMGDTRWAIT, TIOCTIMESTAMP &
- * TIOCDCDTIMESTAMP.
- * Sysctl debug flag is now a bitflag, to filter noise during debugging.
- * David L. Nugent <davidn@blaze.net.au>
- */
-
-#include "opt_compat.h"
-
-#include "dgm.h"
-
-/* Helg: i.e.25 times per sec board will be polled */
-#define POLLSPERSEC 25
-/* How many charactes can we write to input tty rawq */
-#define DGB_IBUFSIZE (TTYHOG-100)
-
-/* the overall number of ports controlled by this driver */
-
-#ifndef NDGMPORTS
-# define NDGMPORTS (NDGM*64)
-#endif
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/tty.h>
-#include <sys/proc.h>
-#include <sys/conf.h>
-#include <sys/dkstat.h>
-#include <sys/fcntl.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-
-#include <machine/clock.h>
-
-#include <vm/vm.h>
-#include <vm/pmap.h>
-
-#include <i386/isa/isa_device.h>
-
-#include <gnu/i386/isa/dgmfep.h>
-#include <gnu/i386/isa/dgmbios.h>
-#include <gnu/i386/isa/dgmreg.h>
-
-#define CALLOUT_MASK 0x40000
-#define CONTROL_MASK 0xC0
-#define CONTROL_INIT_STATE 0x40
-#define CONTROL_LOCK_STATE 0x80
-#define UNIT_MASK 0x30000
-#define PORT_MASK 0x3F
-#define DEV_TO_UNIT(dev) (MINOR_TO_UNIT(minor(dev)))
-#define MINOR_MAGIC_MASK (CALLOUT_MASK | CONTROL_MASK)
-#define MINOR_TO_UNIT(mynor) (((mynor) & UNIT_MASK)>>16)
-#define MINOR_TO_PORT(mynor) ((mynor) & PORT_MASK)
-
-/* types. XXX - should be elsewhere */
-typedef u_char bool_t; /* boolean */
-
-/* digiboard port structure */
-struct dgm_p {
- bool_t status;
-
- u_char unit; /* board unit number */
- u_char pnum; /* port number */
- u_char omodem; /* FEP output modem status */
- u_char imodem; /* FEP input modem status */
- u_char modemfake; /* Modem values to be forced */
- u_char modem; /* Force values */
- u_char hflow;
- u_char dsr;
- u_char dcd;
- u_char stopc;
- u_char startc;
- u_char stopca;
- u_char startca;
- u_char fepstopc;
- u_char fepstartc;
- u_char fepstopca;
- u_char fepstartca;
- u_char txwin;
- u_char rxwin;
- ushort fepiflag;
- ushort fepcflag;
- ushort fepoflag;
- ushort txbufhead;
- ushort txbufsize;
- ushort rxbufhead;
- ushort rxbufsize;
- int close_delay;
- int count;
- int blocked_open;
- int event;
- int asyncflags;
- u_long statusflags;
- u_char *txptr;
- u_char *rxptr;
- volatile struct board_chan *brdchan;
- struct tty *tty;
-
- bool_t active_out; /* nonzero if the callout device is open */
- u_int wopeners; /* # processes waiting for DCD in open() */
-
- /* Initial state. */
- struct termios it_in; /* should be in struct tty */
- struct termios it_out;
-
- /* Lock state. */
- struct termios lt_in; /* should be in struct tty */
- struct termios lt_out;
-
- bool_t do_timestamp;
- bool_t do_dcd_timestamp;
- struct timeval timestamp;
- struct timeval dcd_timestamp;
-
- /* flags of state, are used in sleep() too */
- u_char closing; /* port is being closed now */
- u_char draining; /* port is being drained now */
- u_char used; /* port is being used now */
- u_char mustdrain; /* data must be waited to drain in dgmparam() */
-};
-
-/* Digiboard per-board structure */
-struct dgm_softc {
- /* struct board_info */
- u_char status; /* status: DISABLED/ENABLED */
- u_char unit; /* unit number */
- u_char type; /* type of card: PCXE, PCXI, PCXEVE */
- u_char altpin; /* do we need alternate pin setting ? */
- int numports; /* number of ports on card */
- int port; /* I/O port */
- u_char *vmem; /* virtual memory address */
- long pmem; /* physical memory address */
- int mem_seg; /* internal memory segment */
- struct dgm_p *ports; /* pointer to array of port descriptors */
- struct tty *ttys; /* pointer to array of TTY structures */
- volatile struct global_data *mailbox;
- };
-
-
-static struct dgm_softc dgm_softc[NDGM];
-static struct dgm_p dgm_ports[NDGMPORTS];
-static struct tty dgm_tty[NDGMPORTS];
-
-int fi(void);
-
-/*
- * The public functions in the com module ought to be declared in a com-driver
- * system header.
- */
-
-/* Interrupt handling entry points. */
-static void dgmpoll __P((void *unit_c));
-
-/* Device switch entry points. */
-#define dgmreset noreset
-#define dgmmmap nommap
-#define dgmstrategy nostrategy
-
-static int dgmattach __P((struct isa_device *dev));
-static int dgmprobe __P((struct isa_device *dev));
-
-static void fepcmd(struct dgm_p *port, unsigned cmd, unsigned op1, unsigned op2,
- unsigned ncmds, unsigned bytecmd);
-
-static void dgmstart __P((struct tty *tp));
-static void dgmstop __P((struct tty *tp, int rw));
-static int dgmparam __P((struct tty *tp, struct termios *t));
-static void dgmhardclose __P((struct dgm_p *port));
-static void dgm_drain_or_flush __P((struct dgm_p *port));
-static int dgmdrain __P((struct dgm_p *port));
-static void dgm_pause __P((void *chan));
-static void wakeflush __P((void *p));
-static void disc_optim __P((struct tty *tp, struct termios *t));
-
-
-struct isa_driver dgmdriver = {
- dgmprobe, dgmattach, "dgm",0
-};
-
-static d_open_t dgmopen;
-static d_close_t dgmclose;
-static d_ioctl_t dgmioctl;
-
-#define CDEV_MAJOR 101
-static struct cdevsw dgm_cdevsw = {
- /* open */ dgmopen,
- /* close */ dgmclose,
- /* read */ ttyread,
- /* write */ ttywrite,
- /* ioctl */ dgmioctl,
- /* poll */ ttypoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "dgm",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY,
- /* bmaj */ -1
-};
-
-static speed_t dgmdefaultrate = TTYDEF_SPEED;
-
-static struct speedtab dgmspeedtab[] = {
- 0, FEP_B0, /* old (sysV-like) Bx codes */
- 50, FEP_B50,
- 75, FEP_B75,
- 110, FEP_B110,
- 134, FEP_B134,
- 150, FEP_B150,
- 200, FEP_B200,
- 300, FEP_B300,
- 600, FEP_B600,
- 1200, FEP_B1200,
- 1800, FEP_B1800,
- 2400, FEP_B2400,
- 4800, FEP_B4800,
- 9600, FEP_B9600,
- 19200, FEP_B19200,
- 38400, FEP_B38400,
- 57600, (FEP_FASTBAUD|FEP_B50), /* B50 & fast baud table */
- 115200, (FEP_FASTBAUD|FEP_B110), /* B100 & fast baud table */
- -1, -1
-};
-
-static struct dbgflagtbl
-{
- tcflag_t in_mask;
- tcflag_t in_val;
- tcflag_t out_val;
-} dgm_cflags[] =
-{
- { PARODD, PARODD, FEP_PARODD },
- { PARENB, PARENB, FEP_PARENB },
- { CSTOPB, CSTOPB, FEP_CSTOPB },
- { CSIZE, CS5, FEP_CS6 },
- { CSIZE, CS6, FEP_CS6 },
- { CSIZE, CS7, FEP_CS7 },
- { CSIZE, CS8, FEP_CS8 },
- { CLOCAL, CLOCAL, FEP_CLOCAL },
- { (tcflag_t)-1 }
-}, dgm_iflags[] =
-{
- { IGNBRK, IGNBRK, FEP_IGNBRK },
- { BRKINT, BRKINT, FEP_BRKINT },
- { IGNPAR, IGNPAR, FEP_IGNPAR },
- { PARMRK, PARMRK, FEP_PARMRK },
- { INPCK, INPCK, FEP_INPCK },
- { ISTRIP, ISTRIP, FEP_ISTRIP },
- { IXON, IXON, FEP_IXON },
- { IXOFF, IXOFF, FEP_IXOFF },
- { IXANY, IXANY, FEP_IXANY },
- { (tcflag_t)-1 }
-}, dgm_flow[] =
-{
- { CRTSCTS, CRTSCTS, CTS|RTS },
- { CRTSCTS, CCTS_OFLOW, CTS },
- { CRTSCTS, CRTS_IFLOW, RTS },
- { (tcflag_t)-1 }
-};
-
-/* xlat bsd termios flags to dgm sys-v style */
-static tcflag_t
-dgmflags(struct dbgflagtbl *tbl, tcflag_t input)
-{
- tcflag_t output = 0;
- int i;
-
- for (i=0; tbl[i].in_mask != (tcflag_t)-1; i++)
- {
- if ((input & tbl[i].in_mask) == tbl[i].in_val)
- output |= tbl[i].out_val;
- }
- return output;
-}
-
-static int dgmdebug=0;
-SYSCTL_INT(_debug, OID_AUTO, dgm_debug, CTLFLAG_RW, &dgmdebug, 0, "");
-
-static __inline int setwin __P((struct dgm_softc *sc, unsigned addr));
-static __inline void hidewin __P((struct dgm_softc *sc));
-static __inline void towin __P((struct dgm_softc *sc, int win));
-
-/*Helg: to allow recursive dgm...() calls */
-typedef struct
- { /* If we were called and don't want to disturb we need: */
- int port; /* write to this port */
- u_char data; /* this data on exit */
- /* or DATA_WINOFF to close memory window on entry */
- } BoardMemWinState; /* so several channels and even boards can coexist */
-#define DATA_WINOFF 0
-static BoardMemWinState bmws;
-
-/* return current memory window state and close window */
-static BoardMemWinState
-bmws_get(void)
-{
- BoardMemWinState bmwsRet=bmws;
- if(bmws.data!=DATA_WINOFF)
- outb(bmws.port, bmws.data=DATA_WINOFF);
- return bmwsRet;
-}
-
-/* restore memory window state */
-static void
-bmws_set(BoardMemWinState ws)
-{
- if(ws.data != bmws.data || ws.port!=bmws.port ) {
- if(bmws.data!=DATA_WINOFF)
- outb(bmws.port,DATA_WINOFF);
- if(ws.data!=DATA_WINOFF)
- outb(ws.port, ws.data);
- bmws=ws;
- }
-}
-
-static __inline int
-setwin(sc,addr)
- struct dgm_softc *sc;
- unsigned int addr;
-{
- outb(bmws.port=sc->port+1,bmws.data=FEPWIN|(addr >> 15));
- return (addr & 0x7FFF);
-}
-
-static __inline void
-hidewin(sc)
- struct dgm_softc *sc;
-{
- bmws.data=0;
- outb(bmws.port=sc->port+1, bmws.data);
-}
-
-static __inline void
-towin(sc,win)
- struct dgm_softc *sc;
- int win;
-{
- outb(bmws.port=sc->port+1, bmws.data=win);
-}
-
-static int
-dgmprobe(dev)
- struct isa_device *dev;
-{
- struct dgm_softc *sc= &dgm_softc[dev->id_unit];
- int i, v;
- int unit=dev->id_unit;
- static int once;
-
- if (!once++)
- cdevsw_add(&dgm_cdevsw);
-
- sc->unit=dev->id_unit;
- sc->port=dev->id_iobase;
-
- if(dev->id_flags & DGBFLAG_ALTPIN)
- sc->altpin=1;
- else
- sc->altpin=0;
-
- /* left 24 bits only (ISA address) */
- sc->pmem=((intptr_t)(void *)dev->id_maddr & 0xFFFFFF);
-
- DPRINT4(DB_INFO,"dgm%d: port 0x%x mem 0x%lx\n",unit,sc->port,sc->pmem);
-
- outb(sc->port, FEPRST);
- sc->status=DISABLED;
-
- for(i=0; i< 1000; i++) {
- DELAY(1);
- if( (inb(sc->port) & FEPMASK) == FEPRST ) {
- sc->status=ENABLED;
- DPRINT3(DB_EXCEPT,"dgm%d: got reset after %d us\n",unit,i);
- break;
- }
- }
-
- if(sc->status!=ENABLED) {
- DPRINT2(DB_EXCEPT,"dgm%d: failed to respond\n",dev->id_unit);
- return 0;
- }
-
- /* check type of card and get internal memory characteristics */
-
- v = inb(sc->port);
-
- if (!(v & 0x1)) {
- int second;
-
- outb(sc->port, 1);
- second = inb(sc->port);
- printf("dgm%d: PC/Xem (type %d, %d)\n", dev->id_unit, v, second);
- } else
- printf("dgm%d: PC/Xem (type %d)\n", dev->id_unit, v);
- sc->type=PCXEM;
- sc->mem_seg=0x8000;
-
- /* save size of vizible memory segment */
- /* all PCXEMs have a 32k window size */
- dev->id_msize=0x8000;
-
- /* map memory */
- dev->id_maddr=sc->vmem=pmap_mapdev(sc->pmem,dev->id_msize);
-
- outb(sc->port, FEPCLR); /* drop RESET */
- hidewin(sc); /* Helg: to set initial bmws state */
-
- return 4; /* we need I/O space of 4 ports */
-}
-
-static int
-dgmattach(dev)
- struct isa_device *dev;
-{
- int unit=dev->id_unit;
- struct dgm_softc *sc= &dgm_softc[dev->id_unit];
- int i, t;
- u_char *mem;
- u_char *ptr;
- int addr;
- struct dgm_p *port;
- volatile struct board_chan *bc;
- int shrinkmem;
- int lowwater;
- static int nports=0;
-
- if(sc->status!=ENABLED) {
- DPRINT2(DB_EXCEPT,"dbg%d: try to attach a disabled card\n",unit);
- return 0;
- }
-
- mem=sc->vmem;
-
- DPRINT3(DB_INFO,"dgm%d: internal memory segment 0x%x\n",unit,sc->mem_seg);
-
- outb(sc->port, FEPRST); DELAY(1);
-
- for(i=0; (inb(sc->port) & FEPMASK) != FEPRST ; i++) {
- if(i>10000) {
- printf("dgm%d: 1st reset failed\n",dev->id_unit);
- sc->status=DISABLED;
- hidewin(sc);
- return 0;
- }
- DELAY(1);
- }
-
- DPRINT3(DB_INFO,"dgm%d: got reset after %d us\n",unit,i);
-
- t=(((u_long)sc->pmem>>8)) /* disable windowing */;
- outb(sc->port+2,t & 0xFF);
- outb(sc->port+3,t>>8);
-
-
- mem=sc->vmem;
-
- /* very short memory test */
-
- addr=setwin(sc,BOTWIN);
- *(u_long *)(mem+addr) = 0xA55A3CC3;
- if(*(u_long *)(mem+addr)!=0xA55A3CC3) {
- printf("dgm%d: 1st memory test failed\n",dev->id_unit);
- sc->status=DISABLED;
- hidewin(sc);
- return 0;
- }
- addr=setwin(sc,TOPWIN);
- *(u_long *)(mem+addr) = 0x5AA5C33C;
- if(*(u_long *)(mem+addr)!=0x5AA5C33C) {
- printf("dgm%d: 2nd memory test failed\n",dev->id_unit);
- sc->status=DISABLED;
- hidewin(sc);
- return 0;
- }
-
- addr=setwin(sc,BIOSCODE+((0xF000-sc->mem_seg)<<4));
- *(u_long *)(mem+addr) = 0x5AA5C33C;
- if(*(u_long *)(mem+addr)!=0x5AA5C33C) {
- printf("dgm%d: 3rd (BIOS) memory test failed\n",dev->id_unit);
- }
-
- addr=setwin(sc,MISCGLOBAL);
- for(i=0; i<16; i++) {
- mem[addr+i]=0;
- }
-
- addr=setwin(sc,BIOSOFFSET);
- ptr=mem+addr;
- for(i=0; ptr<mem+dev->id_msize; i++){
- *ptr++ = pcem_bios[i];
- }
- ptr=mem+BIOSOFFSET;
- for(i=0; ptr<mem+dev->id_msize; i++){
- if(*ptr++ != pcem_bios[i]){
- printf("Low BIOS load failed\n");
- sc->status = DISABLED;
- hidewin(sc);
- return 0;
- }
- }
- addr=setwin(sc,dev->id_msize);
- ptr =mem+addr;
- for(;i < pcem_nbios; i++){
- *ptr++ = pcem_bios[i];
- }
- ptr=mem;
- for(i = dev->id_msize - BIOSOFFSET; i < pcem_nbios; i++){
- if(*ptr++ != pcem_bios[i]){
- printf("High BIOS load failed\n");
- sc->status = DISABLED;
- hidewin(sc);
- return 0;
- }
- }
- printf("dgm%d: DigiBIOS loaded, initializing",dev->id_unit);
-
- addr=setwin(sc,0);
-
- *(u_int *)(mem+addr+0)=0x0bf00401;
- *(u_int *)(mem+addr+4)=0;
- *(ushort *)(mem+addr+0xc00)=0;
- outb(sc->port, 0);
-
- for(i = 0;*(u_char *)(mem+addr+ 0xc00) != 0x47;i++){
- DELAY(10000);
- if(i> 3000){
- printf("\nBIOS initialize failed(1)\n");
- sc->status = DISABLED;
- hidewin(sc);
- return 0;
- }
- }
-
- if(*(u_char *)(mem+addr+ 0xc01) != 0x44){
- printf("\nBIOS initialize failed(2)\n");
- sc->status = DISABLED;
- hidewin(sc);
- return 0;
- }
- printf(", DigiBIOS running\n");
-
- DELAY(10000);
-
- addr=setwin(sc,BIOSOFFSET);
- ptr=mem+addr;
- for(i=0; i<pcem_ncook; i++){
- *ptr++ = pcem_cook[i];
- }
- ptr=mem+BIOSOFFSET;
- for(i=0; i<pcem_ncook; i++){
- if(*ptr++ != pcem_cook[i]){
- printf("FEP/OS load failed\n");
- sc->status = DISABLED;
- hidewin(sc);
- return 0;
- }
- }
- printf("dgm%d: FEP/OS loaded, initializing",dev->id_unit);
-
- addr=setwin(sc,0);
- *(ushort *)(mem+addr+0xd20)=0;
- *(u_int *)(mem+addr+0xc34)=0xbfc01004;
- *(u_int *)(mem+addr+0xc30)=0x3L;
- outb(sc->port,0);
-
- for(i = 0;*(u_char *)(mem+addr+ 0xd20) != 'O';i++){
- DELAY(10000);
- if(i> 3000){
- printf("\nFEP/OS initialize failed(1)\n");
- sc->status = DISABLED;
- hidewin(sc);
- return 0;
- }
- }
-
- if(*(u_char *)(mem+addr+ 0xd21) != 'S'){
- printf("\nFEP/OS initialize failed(2)\n");
- sc->status = DISABLED;
- hidewin(sc);
- return 0;
- }
- printf(", FEP/OS running\n");
-
- sc->numports= *(ushort *)(mem+setwin(sc,NPORT));
- printf("dgm%d: %d ports\n",unit,sc->numports);
-
- if(sc->numports > MAX_DGM_PORTS) {
- printf("dgm%d: too many ports\n",unit);
- sc->status=DISABLED;
- hidewin(sc);
- return 0;
- }
-
- if(nports+sc->numports>NDGMPORTS) {
- printf("dgm%d: only %d ports are usable\n", unit, NDGMPORTS-nports);
- sc->numports=NDGMPORTS-nports;
- }
-
- /* allocate port and tty structures */
- sc->ports=&dgm_ports[nports];
- sc->ttys=&dgm_tty[nports];
- nports+=sc->numports;
-
- for(i=0; i<sc->numports; i++)
- sc->ports[i].status = ENABLED;
-
- /* We should now init per-port structures */
- setwin(sc,0);
- bc=(volatile struct board_chan *)(mem + CHANSTRUCT);
- sc->mailbox=(volatile struct global_data *)(mem + FEP_GLOBAL);
-
- if(sc->numports<3)
- shrinkmem=1;
- else
- shrinkmem=0;
-
- for(i=0; i<sc->numports; i++, bc++) {
- port= &sc->ports[i];
-
- port->tty=&sc->ttys[i];
- port->unit=unit;
-
- port->brdchan=bc;
-
- port->dcd=CD;
- port->dsr=DSR;
- port->pnum=i;
-
- if(shrinkmem) {
- DPRINT2(DB_INFO,"dgm%d: shrinking memory\n",unit);
- fepcmd(port, SETBUFFER, 32, 0, 0, 0);
- shrinkmem=0;
- }
-
- port->txptr=mem+( ((bc->tseg)<<4) & 0x7FFF );
- port->rxptr=mem+( ((bc->rseg)<<4) & 0x7FFF );
- port->txwin=FEPWIN | ((bc->tseg)>>11);
- port->rxwin=FEPWIN | ((bc->rseg)>>11);
-
- port->txbufhead=0;
- port->rxbufhead=0;
- port->txbufsize=bc->tmax+1;
- port->rxbufsize=bc->rmax+1;
-
- lowwater= (port->txbufsize>=2000) ? 1024 : (port->txbufsize/2);
- setwin(sc,0);
- fepcmd(port, STXLWATER, lowwater, 0, 10, 0);
- fepcmd(port, SRXLWATER, port->rxbufsize/4, 0, 10, 0);
- fepcmd(port, SRXHWATER, 3*port->rxbufsize/4, 0, 10, 0);
-
- bc->edelay=100;
- bc->idata=1;
-
- port->startc=bc->startc;
- port->startca=bc->startca;
- port->stopc=bc->stopc;
- port->stopca=bc->stopca;
-
- /*port->close_delay=50;*/
- port->close_delay=3 * hz;
- port->do_timestamp=0;
- port->do_dcd_timestamp=0;
-
- /*
- * We don't use all the flags from <sys/ttydefaults.h> since they
- * are only relevant for logins. It's important to have echo off
- * initially so that the line doesn't start blathering before the
- * echo flag can be turned off.
- */
- port->it_in.c_iflag = TTYDEF_IFLAG;
- port->it_in.c_oflag = TTYDEF_OFLAG;
- port->it_in.c_cflag = TTYDEF_CFLAG;
- port->it_in.c_lflag = TTYDEF_LFLAG;
- termioschars(&port->it_in);
- port->it_in.c_ispeed = port->it_in.c_ospeed = dgmdefaultrate;
- port->it_out = port->it_in;
- make_dev(&dgm_cdevsw, (unit*65536)+i,
- UID_ROOT, GID_WHEEL, 0600, "ttyM%d%x", unit, i + 0xa0);
- make_dev(&dgm_cdevsw, (unit*65536)+i+64,
- UID_ROOT, GID_WHEEL, 0600, "ttyiM%d%x", unit, i + 0xa0);
- make_dev(&dgm_cdevsw, (unit*65536)+i+128,
- UID_ROOT, GID_WHEEL, 0600, "ttylM%d%x", unit, i + 0xa0);
- make_dev(&dgm_cdevsw, (unit*65536)+i+262144,
- UID_UUCP, GID_DIALER, 0660, "cuaM%d%x", unit, i + 0xa0);
- make_dev(&dgm_cdevsw, (unit*65536)+i+262208,
- UID_UUCP, GID_DIALER, 0660, "cuaiM%d%x", unit, i + 0xa0);
- make_dev(&dgm_cdevsw, (unit*65536)+i+262272,
- UID_UUCP, GID_DIALER, 0660, "cualM%d%x", unit, i + 0xa0);
- }
-
- hidewin(sc);
-
- /* register the polling function */
- timeout(dgmpoll, (void *)unit, hz/POLLSPERSEC);
-
- return 1;
-}
-
-/* ARGSUSED */
-static int
-dgmopen(dev, flag, mode, p)
- dev_t dev;
- int flag;
- int mode;
- struct proc *p;
-{
- struct dgm_softc *sc;
- struct tty *tp;
- int unit;
- int mynor;
- int pnum;
- struct dgm_p *port;
- int s,cs;
- int error;
- volatile struct board_chan *bc;
-
- error=0;
- mynor=minor(dev);
- unit=MINOR_TO_UNIT(mynor);
- pnum=MINOR_TO_PORT(mynor);
-
- if(unit >= NDGM) {
- DPRINT2(DB_EXCEPT,"dgm%d: try to open a nonexisting card\n",unit);
- return ENXIO;
- }
-
- sc=&dgm_softc[unit];
-
- if(sc->status!=ENABLED) {
- DPRINT2(DB_EXCEPT,"dgm%d: try to open a disabled card\n",unit);
- return ENXIO;
- }
-
- if(pnum>=sc->numports) {
- DPRINT3(DB_EXCEPT,"dgm%d: try to open non-existing port %d\n",unit,pnum);
- return ENXIO;
- }
-
- if(mynor & CONTROL_MASK)
- return 0;
-
- tp=&sc->ttys[pnum];
- dev->si_tty = tp;
- port=&sc->ports[pnum];
- bc=port->brdchan;
-
-open_top:
-
- s=spltty();
-
- while(port->closing) {
- error=tsleep(&port->closing, TTOPRI|PCATCH, "dgocl", 0);
-
- if(error) {
- DPRINT4(DB_OPEN,"dgm%d: port%d: tsleep(dgocl) error=%d\n",unit,pnum,error);
- goto out;
- }
- }
-
- if (tp->t_state & TS_ISOPEN) {
- /*
- * The device is open, so everything has been initialized.
- * Handle conflicts.
- */
- if (mynor & CALLOUT_MASK) {
- if (!port->active_out) {
- error = EBUSY;
- DPRINT4(DB_OPEN,"dgm%d: port%d: BUSY error=%d\n",unit,pnum,error);
- goto out;
- }
- } else {
- if (port->active_out) {
- if (flag & O_NONBLOCK) {
- error = EBUSY;
- DPRINT4(DB_OPEN,"dgm%d: port%d: BUSY error=%d\n",unit,pnum,error);
- goto out;
- }
- error = tsleep(&port->active_out,
- TTIPRI | PCATCH, "dgmi", 0);
- if (error != 0) {
- DPRINT4(DB_OPEN,"dgm%d: port%d: tsleep(dgmi) error=%d\n",
- unit,pnum,error);
- goto out;
- }
- splx(s);
- goto open_top;
- }
- }
- if (tp->t_state & TS_XCLUDE &&
- suser(p)) {
- error = EBUSY;
- goto out;
- }
- } else {
- /*
- * The device isn't open, so there are no conflicts.
- * Initialize it. Initialization is done twice in many
- * cases: to preempt sleeping callin opens if we are
- * callout, and to complete a callin open after DCD rises.
- */
- tp->t_oproc=dgmstart;
- tp->t_param=dgmparam;
- tp->t_stop=dgmstop;
- tp->t_dev=dev;
- tp->t_termios= (mynor & CALLOUT_MASK) ?
- port->it_out :
- port->it_in;
-
- cs=splclock();
- setwin(sc,0);
- port->imodem=bc->mstat;
- bc->rout=bc->rin; /* clear input queue */
- bc->idata=1;
-#ifdef PRINT_BUFSIZE
- printf("dgm buffers tx=%x:%x rx=%x:%x\n",bc->tseg,bc->tmax,bc->rseg,bc->rmax);
-#endif
-
- hidewin(sc);
- splx(cs);
-
- port->wopeners++;
- error=dgmparam(tp, &tp->t_termios);
- port->wopeners--;
-
- if(error!=0) {
- DPRINT4(DB_OPEN,"dgm%d: port%d: dgmparam error=%d\n",unit,pnum,error);
- goto out;
- }
-
- /* handle fake DCD for callout devices */
- /* and initial DCD */
-
- if( (port->imodem & port->dcd) || mynor & CALLOUT_MASK )
- linesw[tp->t_line].l_modem(tp,1);
-
- }
-
- /*
- * Wait for DCD if necessary.
- */
- if (!(tp->t_state & TS_CARR_ON) && !(mynor & CALLOUT_MASK)
- && !(tp->t_cflag & CLOCAL) && !(flag & O_NONBLOCK)) {
- ++port->wopeners;
- error = tsleep(TSA_CARR_ON(tp), TTIPRI | PCATCH, "dgdcd", 0);
- --port->wopeners;
- if (error != 0) {
- DPRINT4(DB_OPEN,"dgm%d: port%d: tsleep(dgdcd) error=%d\n",unit,pnum,error);
- goto out;
- }
- splx(s);
- goto open_top;
- }
- error = linesw[tp->t_line].l_open(dev, tp);
- disc_optim(tp,&tp->t_termios);
- DPRINT4(DB_OPEN,"dgm%d: port%d: l_open error=%d\n",unit,pnum,error);
-
- if (tp->t_state & TS_ISOPEN && mynor & CALLOUT_MASK)
- port->active_out = TRUE;
-
- port->used=1;
-
- /* If any port is open (i.e. the open() call is completed for it)
- * the device is busy
- */
-
-out:
- disc_optim(tp,&tp->t_termios);
- splx(s);
-
- if( !(tp->t_state & TS_ISOPEN) && port->wopeners==0 )
- dgmhardclose(port);
-
- DPRINT4(DB_OPEN,"dgm%d: port%d: open() returns %d\n",unit,pnum,error);
-
- return error;
-}
-
-/*ARGSUSED*/
-static int
-dgmclose(dev, flag, mode, p)
- dev_t dev;
- int flag;
- int mode;
- struct proc *p;
-{
- int mynor;
- struct tty *tp;
- int unit, pnum;
- struct dgm_softc *sc;
- struct dgm_p *port;
- int s;
- int i;
-
- mynor=minor(dev);
- if(mynor & CONTROL_MASK)
- return 0;
- unit=MINOR_TO_UNIT(mynor);
- pnum=MINOR_TO_PORT(mynor);
-
- sc=&dgm_softc[unit];
- tp=&sc->ttys[pnum];
- port=sc->ports+pnum;
-
- DPRINT3(DB_CLOSE,"dgm%d: port%d: closing\n",unit,pnum);
-
- DPRINT3(DB_CLOSE,"dgm%d: port%d: draining port\n",unit,pnum);
- dgm_drain_or_flush(port);
-
- s=spltty();
-
- port->closing=1;
- DPRINT3(DB_CLOSE,"dgm%d: port%d: closing line disc\n",unit,pnum);
- linesw[tp->t_line].l_close(tp,flag);
- disc_optim(tp,&tp->t_termios);
-
- DPRINT3(DB_CLOSE,"dgm%d: port%d: hard closing\n",unit,pnum);
- dgmhardclose(port);
- DPRINT3(DB_CLOSE,"dgm%d: port%d: closing tty\n",unit,pnum);
- ttyclose(tp);
- port->closing=0;
- wakeup(&port->closing);
- port->used=0;
-
- /* mark the card idle when all ports are closed */
-
- for(i=0; i<sc->numports; i++)
- if(sc->ports[i].used)
- break;
-
- splx(s);
-
- DPRINT3(DB_CLOSE,"dgm%d: port%d: closed\n",unit,pnum);
-
- wakeup(TSA_CARR_ON(tp));
- wakeup(&port->active_out);
- port->active_out=0;
-
- DPRINT3(DB_CLOSE,"dgm%d: port%d: close exit\n",unit,pnum);
-
- return 0;
-}
-
-static void
-dgmhardclose(port)
- struct dgm_p *port;
-{
- struct dgm_softc *sc=&dgm_softc[port->unit];
- volatile struct board_chan *bc=port->brdchan;
- int cs;
-
- cs=splclock();
- port->do_timestamp = 0;
- setwin(sc,0);
-
- bc->idata=0; bc->iempty=0; bc->ilow=0;
- if(port->tty->t_cflag & HUPCL) {
- port->omodem &= ~(RTS|DTR);
- fepcmd(port, SETMODEM, 0, DTR|RTS, 0, 1);
- }
-
- hidewin(sc);
- splx(cs);
-
- timeout(dgm_pause, &port->brdchan, hz/2);
- tsleep(&port->brdchan, TTIPRI | PCATCH, "dgclo", 0);
-}
-
-static void
-dgm_pause(chan)
- void *chan;
-{
-wakeup((caddr_t)chan);
-}
-
-
-static void
-dgmpoll(unit_c)
- void *unit_c;
-{
- int unit=(int)unit_c;
- int pnum;
- struct dgm_p *port;
- struct dgm_softc *sc=&dgm_softc[unit];
- int head, tail;
- u_char *eventbuf;
- int event, mstat, lstat;
- volatile struct board_chan *bc;
- struct tty *tp;
- int rhead, rtail;
- int whead, wtail;
- int size;
- u_char *ptr;
- int ocount;
- int ibuf_full,obuf_full;
-
- BoardMemWinState ws=bmws_get();
-
- if(sc->status==DISABLED) {
- printf("dgm%d: polling of disabled board stopped\n",unit);
- return;
- }
-
- setwin(sc,0);
-
- head=sc->mailbox->ein;
- tail=sc->mailbox->eout;
-
- while(head!=tail) {
- if(head >= FEP_IMAX-FEP_ISTART
- || tail >= FEP_IMAX-FEP_ISTART
- || (head|tail) & 03 ) {
- printf("dgm%d: event queue's head or tail is wrong! hd=%d,tl=%d\n", unit,head,tail);
- break;
- }
-
- eventbuf=sc->vmem+tail+FEP_ISTART;
- pnum=eventbuf[0];
- event=eventbuf[1];
- mstat=eventbuf[2];
- lstat=eventbuf[3];
-
- port=&sc->ports[pnum];
- bc=port->brdchan;
- tp=&sc->ttys[pnum];
-
- if(pnum>=sc->numports || port->status==DISABLED) {
- printf("dgm%d: port%d: got event on nonexisting port\n",unit,pnum);
- } else if(port->used || port->wopeners>0 ) {
-
- int wrapmask=port->rxbufsize-1;
-
- if( !(event & ALL_IND) )
- printf("dgm%d: port%d: ? event 0x%x mstat 0x%x lstat 0x%x\n",
- unit, pnum, event, mstat, lstat);
-
- if(event & DATA_IND) {
- DPRINT3(DB_DATA,"dgm%d: port%d: DATA_IND\n",unit,pnum);
-
- rhead=bc->rin & wrapmask;
- rtail=bc->rout & wrapmask;
-
- if( !(tp->t_cflag & CREAD) || !port->used ) {
- bc->rout=rhead;
- goto end_of_data;
- }
-
- if(bc->orun) {
- printf("dgm%d: port%d: overrun\n", unit, pnum);
- bc->orun=0;
- }
-
- if(!(tp->t_state & TS_ISOPEN))
- goto end_of_data;
-
- for(ibuf_full=FALSE;rhead!=rtail && !ibuf_full;) {
- DPRINT5(DB_RXDATA,"dgm%d: port%d: p rx head=%d tail=%d\n",
- unit,pnum,rhead,rtail);
-
- if(rhead>rtail)
- size=rhead-rtail;
- else
- size=port->rxbufsize-rtail;
-
- ptr=port->rxptr+rtail;
-
-/* Helg: */
- if( tp->t_rawq.c_cc + size > DGB_IBUFSIZE ) {
- size=DGB_IBUFSIZE-tp->t_rawq.c_cc;
- DPRINT1(DB_RXDATA,"*");
- ibuf_full=TRUE;
- }
-
- if(size) {
- if (tp->t_state & TS_CAN_BYPASS_L_RINT) {
- DPRINT1(DB_RXDATA,"!");
- towin(sc,port->rxwin);
- tk_nin += size;
- tk_rawcc += size;
- tp->t_rawcc += size;
- b_to_q(ptr,size,&tp->t_rawq);
- setwin(sc,0);
- } else {
- int i=size;
- unsigned char chr;
- do {
- towin(sc,port->rxwin);
- chr= *ptr++;
- hidewin(sc);
- (*linesw[tp->t_line].l_rint)(chr, tp);
- } while (--i > 0 );
- setwin(sc,0);
- }
- }
- rtail= (rtail + size) & wrapmask;
- bc->rout=rtail;
- rhead=bc->rin & wrapmask;
- hidewin(sc);
- ttwakeup(tp);
- setwin(sc,0);
- }
- end_of_data: ;
- }
-
- if(event & MODEMCHG_IND) {
- DPRINT3(DB_MODEM,"dgm%d: port%d: MODEMCHG_IND\n",unit,pnum);
- port->imodem=mstat;
- if(mstat & port->dcd) {
- hidewin(sc);
- linesw[tp->t_line].l_modem(tp,1);
- setwin(sc,0);
- wakeup(TSA_CARR_ON(tp));
- } else {
- hidewin(sc);
- linesw[tp->t_line].l_modem(tp,0);
- setwin(sc,0);
- if( port->draining) {
- port->draining=0;
- wakeup(&port->draining);
- }
- }
- }
-
- if(event & BREAK_IND) {
- if((tp->t_state & TS_ISOPEN) && (tp->t_iflag & IGNBRK)) {
- DPRINT3(DB_BREAK,"dgm%d: port%d: BREAK_IND\n",unit,pnum);
- hidewin(sc);
- linesw[tp->t_line].l_rint(TTY_BI, tp);
- setwin(sc,0);
- }
- }
-
-/* Helg: with output flow control */
-
- if(event & (LOWTX_IND | EMPTYTX_IND) ) {
- DPRINT3(DB_TXDATA,"dgm%d: port%d: LOWTX_IND or EMPTYTX_IND\n",unit,pnum);
-
- if( (event & EMPTYTX_IND ) && tp->t_outq.c_cc==0
- && port->draining) {
- port->draining=0;
- wakeup(&port->draining);
- bc->ilow=0; bc->iempty=0;
- } else {
-
- int wrapmask=port->txbufsize-1;
-
- for(obuf_full=FALSE; tp->t_outq.c_cc!=0 && !obuf_full; ) {
- int s;
- /* add "last-minute" data to write buffer */
- if(!(tp->t_state & TS_BUSY)) {
- hidewin(sc);
-#ifndef TS_ASLEEP /* post 2.0.5 FreeBSD */
- ttwwakeup(tp);
-#else
- if(tp->t_outq.c_cc <= tp->t_lowat) {
- if(tp->t_state & TS_ASLEEP) {
- tp->t_state &= ~TS_ASLEEP;
- wakeup(TSA_OLOWAT(tp));
- }
- /* selwakeup(&tp->t_wsel); */
- }
-#endif
- setwin(sc,0);
- }
- s=spltty();
-
- whead=bc->tin & wrapmask;
- wtail=bc->tout & wrapmask;
-
- if(whead<wtail)
- size=wtail-whead-1;
- else {
- size=port->txbufsize-whead;
- if(wtail==0)
- size--;
- }
-
- if(size==0) {
- DPRINT5(DB_WR,"dgm: head=%d tail=%d size=%d full=%d\n",
- whead,wtail,size,obuf_full);
- bc->iempty=1; bc->ilow=1;
- obuf_full=TRUE;
- splx(s);
- break;
- }
-
- towin(sc,port->txwin);
-
- ocount=q_to_b(&tp->t_outq, port->txptr+whead, size);
- whead+=ocount;
-
- setwin(sc,0);
- bc->tin=whead;
- bc->tin=whead & wrapmask;
- splx(s);
- }
-
- if(obuf_full) {
- DPRINT1(DB_WR," +BUSY\n");
- tp->t_state|=TS_BUSY;
- } else {
- DPRINT1(DB_WR," -BUSY\n");
- hidewin(sc);
-#ifndef TS_ASLEEP /* post 2.0.5 FreeBSD */
- /* should clear TS_BUSY before ttwwakeup */
- if(tp->t_state & TS_BUSY) {
- tp->t_state &= ~TS_BUSY;
- linesw[tp->t_line].l_start(tp);
- ttwwakeup(tp);
- }
-#else
- if(tp->t_state & TS_ASLEEP) {
- tp->t_state &= ~TS_ASLEEP;
- wakeup(TSA_OLOWAT(tp));
- }
- tp->t_state &= ~TS_BUSY;
-#endif
- setwin(sc,0);
- }
- }
- }
- bc->idata=1; /* require event on incoming data */
-
- } else {
- bc=port->brdchan;
- DPRINT4(DB_EXCEPT,"dgm%d: port%d: got event 0x%x on closed port\n",
- unit,pnum,event);
- bc->rout=bc->rin;
- bc->idata=bc->iempty=bc->ilow=0;
- }
-
- tail= (tail+4) & (FEP_IMAX-FEP_ISTART-4);
- }
-
- sc->mailbox->eout=tail;
- bmws_set(ws);
-
- timeout(dgmpoll, unit_c, hz/POLLSPERSEC);
-}
-
-static int
-dgmioctl(dev, cmd, data, flag, p)
- dev_t dev;
- u_long cmd;
- caddr_t data;
- int flag;
- struct proc *p;
-{
- struct dgm_softc *sc;
- int unit, pnum;
- struct dgm_p *port;
- int mynor;
- struct tty *tp;
- volatile struct board_chan *bc;
- int error;
- int s,cs;
- int tiocm_xxx;
-
-#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
- u_long oldcmd;
- struct termios term;
-#endif
-
- BoardMemWinState ws=bmws_get();
-
- mynor=minor(dev);
- unit=MINOR_TO_UNIT(mynor);
- pnum=MINOR_TO_PORT(mynor);
-
- sc=&dgm_softc[unit];
- port=&sc->ports[pnum];
- tp=&sc->ttys[pnum];
- bc=port->brdchan;
-
- if (mynor & CONTROL_MASK) {
- struct termios *ct;
-
- switch (mynor & CONTROL_MASK) {
- case CONTROL_INIT_STATE:
- ct = mynor & CALLOUT_MASK ? &port->it_out : &port->it_in;
- break;
- case CONTROL_LOCK_STATE:
- ct = mynor & CALLOUT_MASK ? &port->lt_out : &port->lt_in;
- break;
- default:
- return (ENODEV); /* /dev/nodev */
- }
- switch (cmd) {
- case TIOCSETA:
- error = suser(p);
- if (error != 0)
- return (error);
- *ct = *(struct termios *)data;
- return (0);
- case TIOCGETA:
- *(struct termios *)data = *ct;
- return (0);
- case TIOCGETD:
- *(int *)data = TTYDISC;
- return (0);
- case TIOCGWINSZ:
- bzero(data, sizeof(struct winsize));
- return (0);
- default:
- return (ENOTTY);
- }
- }
-
-#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
- term = tp->t_termios;
- if (cmd == TIOCSETA || cmd == TIOCSETAW || cmd == TIOCSETAF) {
- DPRINT6(DB_PARAM,"dgm%d: port%d: dgmioctl-ISNOW c=0x%x i=0x%x l=0x%x\n",unit,pnum,term.c_cflag,term.c_iflag,term.c_lflag);
- }
- oldcmd = cmd;
- error = ttsetcompat(tp, &cmd, data, &term);
- if (error != 0)
- return (error);
- if (cmd != oldcmd)
- data = (caddr_t)&term;
-#endif
-
- if (cmd == TIOCSETA || cmd == TIOCSETAW || cmd == TIOCSETAF) {
- int cc;
- struct termios *dt = (struct termios *)data;
- struct termios *lt = mynor & CALLOUT_MASK
- ? &port->lt_out : &port->lt_in;
-
- DPRINT6(DB_PARAM,"dgm%d: port%d: dgmioctl-TOSET c=0x%x i=0x%x l=0x%x\n",unit,pnum,dt->c_cflag,dt->c_iflag,dt->c_lflag);
- dt->c_iflag = (tp->t_iflag & lt->c_iflag)
- | (dt->c_iflag & ~lt->c_iflag);
- dt->c_oflag = (tp->t_oflag & lt->c_oflag)
- | (dt->c_oflag & ~lt->c_oflag);
- dt->c_cflag = (tp->t_cflag & lt->c_cflag)
- | (dt->c_cflag & ~lt->c_cflag);
- dt->c_lflag = (tp->t_lflag & lt->c_lflag)
- | (dt->c_lflag & ~lt->c_lflag);
- for (cc = 0; cc < NCCS; ++cc)
- if (lt->c_cc[cc] != 0)
- dt->c_cc[cc] = tp->t_cc[cc];
- if (lt->c_ispeed != 0)
- dt->c_ispeed = tp->t_ispeed;
- if (lt->c_ospeed != 0)
- dt->c_ospeed = tp->t_ospeed;
- }
-
- if(cmd==TIOCSTOP) {
- cs=splclock();
- setwin(sc,0);
- fepcmd(port, PAUSETX, 0, 0, 0, 0);
- bmws_set(ws);
- splx(cs);
- return 0;
- } else if(cmd==TIOCSTART) {
- cs=splclock();
- setwin(sc,0);
- fepcmd(port, RESUMETX, 0, 0, 0, 0);
- bmws_set(ws);
- splx(cs);
- return 0;
- }
-
- if(cmd==TIOCSETAW || cmd==TIOCSETAF)
- port->mustdrain=1;
-
- error = linesw[tp->t_line].l_ioctl(tp, cmd, data, flag, p);
- if (error != ENOIOCTL)
- return error;
- s = spltty();
- error = ttioctl(tp, cmd, data, flag);
- disc_optim(tp,&tp->t_termios);
- port->mustdrain=0;
- if (error != ENOIOCTL) {
- splx(s);
- if (cmd == TIOCSETA || cmd == TIOCSETAW || cmd == TIOCSETAF) {
- DPRINT6(DB_PARAM,"dgm%d: port%d: dgmioctl-RES c=0x%x i=0x%x l=0x%x\n",unit,pnum,tp->t_cflag,tp->t_iflag,tp->t_lflag);
- }
- return error;
- }
-
- switch (cmd) {
- case TIOCSBRK:
-/* Helg: commented */
-/* error=dgmdrain(port);*/
-
- if(error!=0) {
- splx(s);
- return error;
- }
-
- cs=splclock();
- setwin(sc,0);
-
- /* now it sends 250 millisecond break because I don't know */
- /* how to send an infinite break */
-
- fepcmd(port, SENDBREAK, 250, 0, 10, 0);
- hidewin(sc);
- splx(cs);
- break;
- case TIOCCBRK:
- /* now it's empty */
- break;
- case TIOCSDTR:
- DPRINT3(DB_MODEM,"dgm%d: port%d: set DTR\n",unit,pnum);
- port->omodem |= DTR;
- cs=splclock();
- setwin(sc,0);
- fepcmd(port, SETMODEM, port->omodem, RTS, 0, 1);
-
- if( !(bc->mstat & DTR) ) {
- DPRINT3(DB_MODEM,"dgm%d: port%d: DTR is off\n",unit,pnum);
- }
-
- hidewin(sc);
- splx(cs);
- break;
- case TIOCCDTR:
- DPRINT3(DB_MODEM,"dgm%d: port%d: reset DTR\n",unit,pnum);
- port->omodem &= ~DTR;
- cs=splclock();
- setwin(sc,0);
- fepcmd(port, SETMODEM, port->omodem, RTS|DTR, 0, 1);
-
- if( bc->mstat & DTR ) {
- DPRINT3(DB_MODEM,"dgm%d: port%d: DTR is on\n",unit,pnum);
- }
-
- hidewin(sc);
- splx(cs);
- break;
- case TIOCMSET:
- if(*(int *)data & TIOCM_DTR)
- port->omodem |=DTR;
- else
- port->omodem &=~DTR;
-
- if(*(int *)data & TIOCM_RTS)
- port->omodem |=RTS;
- else
- port->omodem &=~RTS;
-
- cs=splclock();
- setwin(sc,0);
- fepcmd(port, SETMODEM, port->omodem, RTS|DTR, 0, 1);
- hidewin(sc);
- splx(cs);
- break;
- case TIOCMBIS:
- if(*(int *)data & TIOCM_DTR)
- port->omodem |=DTR;
-
- if(*(int *)data & TIOCM_RTS)
- port->omodem |=RTS;
-
- cs=splclock();
- setwin(sc,0);
- fepcmd(port, SETMODEM, port->omodem, RTS|DTR, 0, 1);
- hidewin(sc);
- splx(cs);
- break;
- case TIOCMBIC:
- if(*(int *)data & TIOCM_DTR)
- port->omodem &=~DTR;
-
- if(*(int *)data & TIOCM_RTS)
- port->omodem &=~RTS;
-
- cs=splclock();
- setwin(sc,0);
- fepcmd(port, SETMODEM, port->omodem, RTS|DTR, 0, 1);
- hidewin(sc);
- splx(cs);
- break;
- case TIOCMGET:
- setwin(sc,0);
- port->imodem=bc->mstat;
- hidewin(sc);
-
- tiocm_xxx = TIOCM_LE; /* XXX - always enabled while open */
-
- DPRINT3(DB_MODEM,"dgm%d: port%d: modem stat -- ",unit,pnum);
-
- if (port->imodem & DTR) {
- DPRINT1(DB_MODEM,"DTR ");
- tiocm_xxx |= TIOCM_DTR;
- }
- if (port->imodem & RTS) {
- DPRINT1(DB_MODEM,"RTS ");
- tiocm_xxx |= TIOCM_RTS;
- }
- if (port->imodem & CTS) {
- DPRINT1(DB_MODEM,"CTS ");
- tiocm_xxx |= TIOCM_CTS;
- }
- if (port->imodem & port->dcd) {
- DPRINT1(DB_MODEM,"DCD ");
- tiocm_xxx |= TIOCM_CD;
- }
- if (port->imodem & port->dsr) {
- DPRINT1(DB_MODEM,"DSR ");
- tiocm_xxx |= TIOCM_DSR;
- }
- if (port->imodem & RI) {
- DPRINT1(DB_MODEM,"RI ");
- tiocm_xxx |= TIOCM_RI;
- }
- *(int *)data = tiocm_xxx;
- DPRINT1(DB_MODEM,"--\n");
- break;
- case TIOCMSDTRWAIT:
- /* must be root since the wait applies to following logins */
- error = suser(p);
- if (error != 0) {
- splx(s);
- return (error);
- }
- port->close_delay = *(int *)data * hz / 100;
- break;
- case TIOCMGDTRWAIT:
- *(int *)data = port->close_delay * 100 / hz;
- break;
- case TIOCTIMESTAMP:
- port->do_timestamp = TRUE;
- *(struct timeval *)data = port->timestamp;
- break;
- case TIOCDCDTIMESTAMP:
- port->do_dcd_timestamp = TRUE;
- *(struct timeval *)data = port->dcd_timestamp;
- break;
- default:
- bmws_set(ws);
- splx(s);
- return ENOTTY;
- }
- bmws_set(ws);
- splx(s);
-
- return 0;
-}
-
-static void
-wakeflush(p)
- void *p;
-{
- struct dgm_p *port=p;
-
- wakeup(&port->draining);
-}
-
-/* wait for the output to drain */
-
-static int
-dgmdrain(port)
- struct dgm_p *port;
-{
- struct dgm_softc *sc=&dgm_softc[port->unit];
- volatile struct board_chan *bc=port->brdchan;
- int error;
- int head, tail;
-
- BoardMemWinState ws=bmws_get();
-
- setwin(sc,0);
-
- bc->iempty=1;
- tail=bc->tout;
- head=bc->tin;
-
- while(tail!=head) {
- DPRINT5(DB_WR,"dgm%d: port%d: drain: head=%d tail=%d\n",
- port->unit, port->pnum, head, tail);
-
- hidewin(sc);
- port->draining=1;
- timeout(wakeflush,port, hz);
- error=tsleep(&port->draining, TTIPRI | PCATCH, "dgdrn", 0);
- port->draining=0;
- setwin(sc,0);
-
- if (error != 0) {
- DPRINT4(DB_WR,"dgm%d: port%d: tsleep(dgdrn) error=%d\n",
- port->unit,port->pnum,error);
-
- bc->iempty=0;
- bmws_set(ws);
- return error;
- }
-
- tail=bc->tout;
- head=bc->tin;
- }
- DPRINT5(DB_WR,"dgm%d: port%d: drain: head=%d tail=%d\n",
- port->unit, port->pnum, head, tail);
- bmws_set(ws);
- return 0;
-}
-
-/* wait for the output to drain */
-/* or simply clear the buffer it it's stopped */
-
-static void
-dgm_drain_or_flush(port)
- struct dgm_p *port;
-{
- struct tty *tp=port->tty;
- struct dgm_softc *sc=&dgm_softc[port->unit];
- volatile struct board_chan *bc=port->brdchan;
- int error;
- int lasttail;
- int head, tail;
-
- setwin(sc,0);
-
- lasttail=-1;
- bc->iempty=1;
- tail=bc->tout;
- head=bc->tin;
-
- while(tail!=head /* && tail!=lasttail */ ) {
- DPRINT5(DB_WR,"dgm%d: port%d: flush: head=%d tail=%d\n",
- port->unit, port->pnum, head, tail);
-
- /* if there is no carrier simply clean the buffer */
- if( !(tp->t_state & TS_CARR_ON) ) {
- bc->tout=bc->tin=0;
- bc->iempty=0;
- hidewin(sc);
- return;
- }
-
- hidewin(sc);
- port->draining=1;
- timeout(wakeflush,port, hz);
- error=tsleep(&port->draining, TTIPRI | PCATCH, "dgfls", 0);
- port->draining=0;
- setwin(sc,0);
-
- if (error != 0) {
- DPRINT4(DB_WR,"dgm%d: port%d: tsleep(dgfls) error=%d\n",
- port->unit,port->pnum,error);
-
- /* silently clean the buffer */
-
- bc->tout=bc->tin=0;
- bc->iempty=0;
- hidewin(sc);
- return;
- }
-
- lasttail=tail;
- tail=bc->tout;
- head=bc->tin;
- }
- hidewin(sc);
- DPRINT5(DB_WR,"dgm%d: port%d: flush: head=%d tail=%d\n",
- port->unit, port->pnum, head, tail);
-}
-
-static int
-dgmparam(tp, t)
- struct tty *tp;
- struct termios *t;
-{
- int unit=MINOR_TO_UNIT(minor(tp->t_dev));
- int pnum=MINOR_TO_PORT(minor(tp->t_dev));
- struct dgm_softc *sc=&dgm_softc[unit];
- struct dgm_p *port=&sc->ports[pnum];
- volatile struct board_chan *bc=port->brdchan;
- int cflag;
- int head;
- int mval;
- int iflag;
- int hflow;
- int cs;
-
- BoardMemWinState ws=bmws_get();
-
- DPRINT6(DB_PARAM,"dgm%d: port%d: dgmparm c=0x%x i=0x%x l=0x%x\n",unit,pnum,t->c_cflag,t->c_iflag,t->c_lflag);
-
- if(port->mustdrain) {
- DPRINT3(DB_PARAM,"dgm%d: port%d: must call dgmdrain()\n",unit,pnum);
- dgmdrain(port);
- }
-
- cflag=ttspeedtab(t->c_ospeed, dgmspeedtab);
-
- if (t->c_ispeed == 0)
- t->c_ispeed = t->c_ospeed;
-
- if (cflag < 0 /* || cflag > 0 && t->c_ispeed != t->c_ospeed */) {
- DPRINT4(DB_PARAM,"dgm%d: port%d: invalid cflag=0%o\n",unit,pnum,cflag);
- return (EINVAL);
- }
-
- cs=splclock();
- setwin(sc,0);
-
- if(cflag==0) { /* hangup */
- DPRINT3(DB_PARAM,"dgm%d: port%d: hangup\n",unit,pnum);
- head=bc->rin;
- bc->rout=head;
- head=bc->tin;
- fepcmd(port, STOUT, (unsigned)head, 0, 0, 0);
- mval= port->omodem & ~(DTR|RTS);
- } else {
- cflag |= dgmflags(dgm_cflags, t->c_cflag);
-
- if(cflag!=port->fepcflag) {
- port->fepcflag=cflag;
- DPRINT5(DB_PARAM,"dgm%d: port%d: set cflag=0x%x c=0x%x\n",
- unit,pnum,cflag,t->c_cflag&~CRTSCTS);
- fepcmd(port, SETCTRLFLAGS, (unsigned)cflag, 0, 0, 0);
- }
- mval= port->omodem | (DTR|RTS);
- }
-
- iflag=dgmflags(dgm_iflags, t->c_iflag);
- if(iflag!=port->fepiflag) {
- port->fepiflag=iflag;
- DPRINT5(DB_PARAM,"dgm%d: port%d: set iflag=0x%x c=0x%x\n",unit,pnum,iflag,t->c_iflag);
- fepcmd(port, SETIFLAGS, (unsigned)iflag, 0, 0, 0);
- }
-
- bc->mint=port->dcd;
-
- hflow=dgmflags(dgm_flow, t->c_cflag);
- if(hflow!=port->hflow) {
- port->hflow=hflow;
- DPRINT5(DB_PARAM,"dgm%d: port%d: set hflow=0x%x f=0x%x\n",unit,pnum,hflow,t->c_cflag&CRTSCTS);
- fepcmd(port, SETHFLOW, (unsigned)hflow, 0xff, 0, 1);
- }
-
- if(port->omodem != mval) {
- DPRINT5(DB_PARAM,"dgm%d: port%d: setting modem parameters 0x%x was 0x%x\n",
- unit,pnum,mval,port->omodem);
- port->omodem=mval;
- fepcmd(port, SETMODEM, (unsigned)mval, RTS|DTR, 0, 1);
- }
-
- if(port->fepstartc!=t->c_cc[VSTART] || port->fepstopc!=t->c_cc[VSTOP]) {
- DPRINT5(DB_PARAM,"dgm%d: port%d: set startc=%d, stopc=%d\n",unit,pnum,t->c_cc[VSTART],t->c_cc[VSTOP]);
- port->fepstartc=t->c_cc[VSTART];
- port->fepstopc=t->c_cc[VSTOP];
- fepcmd(port, SONOFFC, port->fepstartc, port->fepstopc, 0, 1);
- }
-
- bmws_set(ws);
- splx(cs);
-
- return 0;
-
-}
-
-static void
-dgmstart(tp)
- struct tty *tp;
-{
- int unit;
- int pnum;
- struct dgm_p *port;
- struct dgm_softc *sc;
- volatile struct board_chan *bc;
- int head, tail;
- int size, ocount;
- int s;
- int wmask;
-
- BoardMemWinState ws=bmws_get();
-
- unit=MINOR_TO_UNIT(minor(tp->t_dev));
- pnum=MINOR_TO_PORT(minor(tp->t_dev));
- sc=&dgm_softc[unit];
- port=&sc->ports[pnum];
- bc=port->brdchan;
-
- wmask=port->txbufsize-1;
-
- s=spltty();
-
- while( tp->t_outq.c_cc!=0 ) {
- int cs;
-#ifndef TS_ASLEEP /* post 2.0.5 FreeBSD */
- ttwwakeup(tp);
-#else
- if(tp->t_outq.c_cc <= tp->t_lowat) {
- if(tp->t_state & TS_ASLEEP) {
- tp->t_state &= ~TS_ASLEEP;
- wakeup(TSA_OLOWAT(tp));
- }
- /*selwakeup(&tp->t_wsel);*/
- }
-#endif
- cs=splclock();
- setwin(sc,0);
-
- head=bc->tin & wmask;
-
- do { tail=bc->tout; } while (tail != bc->tout);
- tail=bc->tout & wmask;
-
- DPRINT5(DB_WR,"dgm%d: port%d: s tx head=%d tail=%d\n",unit,pnum,head,tail);
-
-#ifdef LEAVE_FREE_CHARS
- if(tail>head) {
- size=tail-head-LEAVE_FREE_CHARS;
- if (size <0)
- size=0;
- } else {
- size=port->txbufsize-head;
- if(tail+port->txbufsize < head)
- size=0;
- }
- }
-#else
- if(tail>head)
- size=tail-head-1;
- else {
- size=port->txbufsize-head/*-1*/;
- if(tail==0)
- size--;
- }
-#endif
-
- if(size==0) {
- bc->iempty=1; bc->ilow=1;
- splx(cs);
- bmws_set(ws);
- tp->t_state|=TS_BUSY;
- splx(s);
- return;
- }
-
- towin(sc,port->txwin);
-
- ocount=q_to_b(&tp->t_outq, port->txptr+head, size);
- head+=ocount;
- if(head>=port->txbufsize)
- head-=port->txbufsize;
-
- setwin(sc,0);
- bc->tin=head;
-
- DPRINT5(DB_WR,"dgm%d: port%d: tx avail=%d count=%d\n",unit,pnum,size,ocount);
- hidewin(sc);
- splx(cs);
- }
-
- bmws_set(ws);
- splx(s);
-
-#ifndef TS_ASLEEP /* post 2.0.5 FreeBSD */
- if(tp->t_state & TS_BUSY) {
- tp->t_state&=~TS_BUSY;
- linesw[tp->t_line].l_start(tp);
- ttwwakeup(tp);
- }
-#else
- if(tp->t_state & TS_ASLEEP) {
- tp->t_state &= ~TS_ASLEEP;
- wakeup(TSA_OLOWAT(tp));
- }
- tp->t_state&=~TS_BUSY;
-#endif
-}
-
-void
-dgmstop(tp, rw)
- struct tty *tp;
- int rw;
-{
- int unit;
- int pnum;
- struct dgm_p *port;
- struct dgm_softc *sc;
- volatile struct board_chan *bc;
- int s;
-
- BoardMemWinState ws=bmws_get();
-
- unit=MINOR_TO_UNIT(minor(tp->t_dev));
- pnum=MINOR_TO_PORT(minor(tp->t_dev));
-
- sc=&dgm_softc[unit];
- port=&sc->ports[pnum];
- bc=port->brdchan;
-
- DPRINT3(DB_WR,"dgm%d: port%d: stop\n",port->unit, port->pnum);
-
- s = spltty();
- setwin(sc,0);
-
- if (rw & FWRITE) {
- /* clear output queue */
- bc->tout=bc->tin=0;
- bc->ilow=0;bc->iempty=0;
- }
- if (rw & FREAD) {
- /* clear input queue */
- bc->rout=bc->rin;
- bc->idata=1;
- }
- hidewin(sc);
- bmws_set(ws);
- splx(s);
- dgmstart(tp);
-}
-
-static void
-fepcmd(port, cmd, op1, op2, ncmds, bytecmd)
- struct dgm_p *port;
- unsigned cmd, op1, op2, ncmds, bytecmd;
-{
- struct dgm_softc *sc=&dgm_softc[port->unit];
- u_char *mem=sc->vmem;
- unsigned tail, head;
- int count, n;
-
- if(port->status==DISABLED) {
- printf("dgm%d: port%d: FEP command on disabled port\n",
- port->unit, port->pnum);
- return;
- }
-
- /* setwin(sc,0); Require this to be set by caller */
- head=sc->mailbox->cin;
-
- if(head>=(FEP_CMAX-FEP_CSTART) || (head & 3)) {
- printf("dgm%d: port%d: wrong pointer head of command queue : 0x%x\n",
- port->unit, port->pnum, head);
- return;
- }
-
- mem[head+FEP_CSTART+0]=cmd;
- mem[head+FEP_CSTART+1]=port->pnum;
- if(bytecmd) {
- mem[head+FEP_CSTART+2]=op1;
- mem[head+FEP_CSTART+3]=op2;
- } else {
- mem[head+FEP_CSTART+2]=op1&0xff;
- mem[head+FEP_CSTART+3]=(op1>>8)&0xff;
- }
-
- DPRINT7(DB_FEP,"dgm%d: port%d: %s cmd=0x%x op1=0x%x op2=0x%x\n", port->unit, port->pnum,
- (bytecmd)?"byte":"word", cmd, mem[head+FEP_CSTART+2], mem[head+FEP_CSTART+3]);
-
- head=(head+4) & (FEP_CMAX-FEP_CSTART-4);
- sc->mailbox->cin=head;
-
- count=FEPTIMEOUT;
-
- while (count-- != 0) {
- head=sc->mailbox->cin;
- tail=sc->mailbox->cout;
-
- n = (head-tail) & (FEP_CMAX-FEP_CSTART-4);
- if(n <= ncmds * (sizeof(ushort)*4))
- return;
- }
- printf("dgm%d(%d): timeout on FEP cmd=0x%x\n", port->unit, port->pnum, cmd);
-}
-
-static void
-disc_optim(tp, t)
- struct tty *tp;
- struct termios *t;
-{
- if (!(t->c_iflag & (ICRNL | IGNCR | IMAXBEL | INLCR | ISTRIP | IXON))
- && (!(t->c_iflag & BRKINT) || (t->c_iflag & IGNBRK))
- && (!(t->c_iflag & PARMRK)
- || (t->c_iflag & (IGNPAR | IGNBRK)) == (IGNPAR | IGNBRK))
- && !(t->c_lflag & (ECHO | ICANON | IEXTEN | ISIG | PENDIN))
- && linesw[tp->t_line].l_rint == ttyinput)
- tp->t_state |= TS_CAN_BYPASS_L_RINT;
- else
- tp->t_state &= ~TS_CAN_BYPASS_L_RINT;
-}
diff --git a/sys/gnu/i386/isa/dgmbios.h b/sys/gnu/i386/isa/dgmbios.h
deleted file mode 100644
index 498bced..0000000
--- a/sys/gnu/i386/isa/dgmbios.h
+++ /dev/null
@@ -1,2509 +0,0 @@
-/*
- * $FreeBSD$
- *
- * This file is an ascii copy of the file sxbios.bin included in the
- * Digiboard PC/Xem driver for Linux. It is copyright 1992, DIGI
- * International. All Rights Reserved.
- */
-
-static unsigned char pcem_bios[] = {
- 0x4f,0x53,0x75,0xd5,0x4e,0x00,0x00,0x10,0xad,0x00,0x1e,0x24,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x9c,0x72,0xb2,0xa8,0x00,0x00,0x00,0x00,0x40,0x28,0x23,0x29,
- 0x73,0x78,0x62,0x69,0x6f,0x73,0x2e,0x62,0x69,0x6e,0x20,0x20,
- 0x20,0x20,0x32,0x2e,0x31,0x20,0x30,0x38,0x2f,0x31,0x37,0x2f,
- 0x39,0x34,0x00,0x40,0x28,0x23,0x29,0x43,0x6f,0x70,0x79,0x72,
- 0x69,0x67,0x68,0x74,0x20,0x28,0x43,0x29,0x20,0x31,0x39,0x39,
- 0x32,0x2c,0x20,0x44,0x49,0x47,0x49,0x20,0x49,0x6e,0x74,0x65,
- 0x72,0x6e,0x61,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x2e,0x20,0x41,
- 0x6c,0x6c,0x20,0x52,0x69,0x67,0x68,0x74,0x73,0x20,0x52,0x65,
- 0x73,0x65,0x72,0x76,0x65,0x64,0x2e,0x00,0x43,0x50,0x55,0x20,
- 0x64,0x6f,0x65,0x73,0x6e,0x27,0x74,0x20,0x77,0x6f,0x72,0x6b,
- 0x5b,0x00,0x1e,0x24,0x00,0x83,0x01,0x3c,0x00,0xa3,0x04,0x3c,
- 0x10,0x00,0x3e,0xac,0x80,0x01,0x84,0x34,0x0c,0x00,0x88,0x8c,
- 0xff,0x03,0x05,0x24,0x01,0x00,0x08,0x35,0x0c,0x00,0x88,0xac,
- 0x01,0xa0,0x04,0x3c,0x80,0x80,0x84,0x24,0x24,0x20,0x85,0x00,
- 0x00,0xa3,0x05,0x3c,0x00,0x10,0xa5,0x34,0x21,0x20,0x85,0x00,
- 0x00,0x00,0x1e,0x24,0x67,0x00,0x05,0x24,0x00,0xa3,0x09,0x3c,
- 0x10,0x00,0x08,0x24,0x00,0x02,0x29,0x25,0x00,0x00,0x8a,0x80,
- 0x00,0x00,0x00,0x00,0x02,0x00,0x40,0x11,0x00,0x00,0x2a,0xa1,
- 0x01,0x00,0x84,0x24,0xff,0xff,0x08,0x25,0xf9,0xff,0x00,0x1d,
- 0x01,0x00,0x29,0x25,0x00,0xa3,0x01,0x3c,0x10,0x02,0x25,0xac,
- 0x00,0xa3,0x01,0x3c,0x14,0x02,0x3f,0xac,0x00,0xa3,0x01,0x3c,
- 0x18,0x02,0x3d,0xac,0x01,0x00,0x08,0x24,0x00,0xa3,0x01,0x3c,
- 0x00,0xa3,0x1d,0x3c,0x10,0x0c,0x28,0xac,0x00,0x04,0xbd,0x27,
- 0x14,0x28,0x00,0x0c,0x00,0x00,0x00,0x00,0xfd,0xff,0x00,0x10,
- 0x00,0x00,0x00,0x00,0xad,0x00,0x1e,0x24,0x00,0x83,0x01,0x3c,
- 0x10,0x00,0x3e,0xac,0x00,0xa3,0x05,0x3c,0x00,0x00,0x1e,0x24,
- 0x00,0xa3,0x04,0x3c,0x00,0x10,0xa5,0x34,0x04,0x00,0x84,0x24,
- 0xfe,0xff,0x85,0x14,0xfc,0xff,0x80,0xac,0xb8,0x00,0x1e,0x24,
- 0x00,0x83,0x01,0x3c,0x10,0x00,0x3e,0xac,0xff,0xff,0x08,0x24,
- 0xb4,0x00,0x00,0x11,0x00,0x00,0x1e,0x24,0x01,0x00,0x08,0x25,
- 0xb1,0x00,0x00,0x15,0x00,0x00,0x00,0x00,0xff,0xff,0x08,0x24,
- 0x21,0x08,0x00,0x01,0xad,0x00,0x28,0x14,0x01,0x00,0x21,0x24,
- 0xab,0x00,0x20,0x14,0x00,0x00,0x00,0x00,0xff,0xff,0x02,0x24,
- 0xa8,0x00,0x48,0x14,0x00,0x00,0x00,0x00,0x01,0x00,0x42,0x24,
- 0xa5,0x00,0x40,0x14,0x00,0x00,0x00,0x00,0xff,0xff,0x03,0x24,
- 0xa2,0x00,0x68,0x14,0x00,0x00,0x00,0x00,0x01,0x00,0x63,0x24,
- 0x9f,0x00,0x60,0x14,0x00,0x00,0x00,0x00,0xff,0xff,0x04,0x24,
- 0x9c,0x00,0x88,0x14,0x00,0x00,0x00,0x00,0x01,0x00,0x84,0x24,
- 0x99,0x00,0x80,0x14,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x24,
- 0x96,0x00,0xa8,0x14,0x00,0x00,0x00,0x00,0x01,0x00,0xa5,0x24,
- 0x93,0x00,0xa0,0x14,0x00,0x00,0x00,0x00,0xff,0xff,0x06,0x24,
- 0x90,0x00,0xc8,0x14,0x00,0x00,0x00,0x00,0x01,0x00,0xc6,0x24,
- 0x8d,0x00,0xc0,0x14,0x00,0x00,0x00,0x00,0xff,0xff,0x07,0x24,
- 0x8a,0x00,0xe8,0x14,0x00,0x00,0x00,0x00,0x01,0x00,0xe7,0x24,
- 0x87,0x00,0xe0,0x14,0x00,0x00,0x00,0x00,0xff,0xff,0x09,0x24,
- 0x84,0x00,0x28,0x15,0x00,0x00,0x00,0x00,0x01,0x00,0x29,0x25,
- 0x81,0x00,0x20,0x15,0x00,0x00,0x00,0x00,0xff,0xff,0x0a,0x24,
- 0x7e,0x00,0x48,0x15,0x00,0x00,0x00,0x00,0x01,0x00,0x4a,0x25,
- 0x7b,0x00,0x40,0x15,0x00,0x00,0x00,0x00,0xff,0xff,0x0b,0x24,
- 0x78,0x00,0x68,0x15,0x00,0x00,0x00,0x00,0x01,0x00,0x6b,0x25,
- 0x75,0x00,0x60,0x15,0x00,0x00,0x00,0x00,0xff,0xff,0x0c,0x24,
- 0x72,0x00,0x88,0x15,0x00,0x00,0x00,0x00,0x01,0x00,0x8c,0x25,
- 0x6f,0x00,0x80,0x15,0x00,0x00,0x00,0x00,0xff,0xff,0x0d,0x24,
- 0x6c,0x00,0xa8,0x15,0x00,0x00,0x00,0x00,0x01,0x00,0xad,0x25,
- 0x69,0x00,0xa0,0x15,0x00,0x00,0x00,0x00,0xff,0xff,0x0e,0x24,
- 0x66,0x00,0xc8,0x15,0x00,0x00,0x00,0x00,0x01,0x00,0xce,0x25,
- 0x63,0x00,0xc0,0x15,0x00,0x00,0x00,0x00,0xff,0xff,0x0f,0x24,
- 0x60,0x00,0xe8,0x15,0x00,0x00,0x00,0x00,0x01,0x00,0xef,0x25,
- 0x5d,0x00,0xe0,0x15,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x24,
- 0x5a,0x00,0x08,0x17,0x00,0x00,0x00,0x00,0x01,0x00,0x18,0x27,
- 0x57,0x00,0x00,0x17,0x00,0x00,0x00,0x00,0xff,0xff,0x10,0x24,
- 0x54,0x00,0x08,0x16,0x00,0x00,0x00,0x00,0x01,0x00,0x10,0x26,
- 0x51,0x00,0x00,0x16,0x00,0x00,0x00,0x00,0xff,0xff,0x11,0x24,
- 0x4e,0x00,0x28,0x16,0x00,0x00,0x00,0x00,0x01,0x00,0x31,0x26,
- 0x4b,0x00,0x20,0x16,0x00,0x00,0x00,0x00,0xff,0xff,0x12,0x24,
- 0x48,0x00,0x48,0x16,0x00,0x00,0x00,0x00,0x01,0x00,0x52,0x26,
- 0x45,0x00,0x40,0x16,0x00,0x00,0x00,0x00,0xff,0xff,0x13,0x24,
- 0x42,0x00,0x68,0x16,0x00,0x00,0x00,0x00,0x01,0x00,0x73,0x26,
- 0x3f,0x00,0x60,0x16,0x00,0x00,0x00,0x00,0xff,0xff,0x14,0x24,
- 0x3c,0x00,0x88,0x16,0x00,0x00,0x00,0x00,0x01,0x00,0x94,0x26,
- 0x39,0x00,0x80,0x16,0x00,0x00,0x00,0x00,0xff,0xff,0x15,0x24,
- 0x36,0x00,0xa8,0x16,0x00,0x00,0x00,0x00,0x01,0x00,0xb5,0x26,
- 0x33,0x00,0xa0,0x16,0x00,0x00,0x00,0x00,0xff,0xff,0x16,0x24,
- 0x30,0x00,0xc8,0x16,0x00,0x00,0x00,0x00,0x01,0x00,0xd6,0x26,
- 0x2d,0x00,0xc0,0x16,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0x24,
- 0x2a,0x00,0xe8,0x16,0x00,0x00,0x00,0x00,0x01,0x00,0xf7,0x26,
- 0x27,0x00,0xe0,0x16,0x00,0x00,0x00,0x00,0xff,0xff,0x1a,0x24,
- 0x24,0x00,0x48,0x17,0x00,0x00,0x00,0x00,0x01,0x00,0x5a,0x27,
- 0x21,0x00,0x40,0x17,0x00,0x00,0x00,0x00,0xff,0xff,0x1b,0x24,
- 0x1e,0x00,0x68,0x17,0x00,0x00,0x00,0x00,0x01,0x00,0x7b,0x27,
- 0x1b,0x00,0x60,0x17,0x00,0x00,0x00,0x00,0xff,0xff,0x1c,0x24,
- 0x18,0x00,0x88,0x17,0x00,0x00,0x00,0x00,0x01,0x00,0x9c,0x27,
- 0x15,0x00,0x80,0x17,0x00,0x00,0x00,0x00,0xff,0xff,0x1d,0x24,
- 0x12,0x00,0xa8,0x17,0x00,0x00,0x00,0x00,0x01,0x00,0xbd,0x27,
- 0x0f,0x00,0xa0,0x17,0x00,0x00,0x00,0x00,0xff,0xff,0x1e,0x24,
- 0x0c,0x00,0xc8,0x17,0x00,0x00,0x00,0x00,0x01,0x00,0xde,0x27,
- 0x09,0x00,0xc0,0x17,0x00,0x00,0x00,0x00,0xff,0xff,0x1f,0x24,
- 0x06,0x00,0xe8,0x17,0x00,0x00,0x00,0x00,0x01,0x00,0xff,0x27,
- 0x03,0x00,0xe0,0x17,0x00,0x00,0x00,0x00,0x0e,0x00,0x00,0x10,
- 0x6b,0x01,0x1e,0x24,0x01,0xa0,0x04,0x3c,0x90,0x80,0x84,0x24,
- 0xff,0x03,0x05,0x24,0x24,0x20,0x85,0x00,0x00,0xa3,0x05,0x3c,
- 0x5b,0x01,0x1e,0x24,0x00,0x83,0x01,0x3c,0x00,0x10,0xa5,0x34,
- 0x10,0x00,0x3e,0xac,0x21,0x20,0x85,0x00,0x08,0x00,0x80,0x00,
- 0x00,0x00,0x1e,0x24,0x6b,0x01,0x1e,0x24,0x00,0x83,0x01,0x3c,
- 0x10,0x00,0x3e,0xac,0x00,0x00,0x1e,0x24,0x00,0x10,0x08,0x3c,
- 0x00,0x60,0x88,0x40,0x74,0x01,0x1e,0x24,0x00,0x83,0x01,0x3c,
- 0x01,0xa0,0x1c,0x3c,0x10,0x00,0x3e,0xac,0x90,0x5d,0x9c,0x27,
- 0x00,0x00,0x1e,0x24,0x01,0x00,0x11,0x04,0x00,0x00,0x00,0x00,
- 0x01,0xa0,0x04,0x3c,0x8f,0x01,0x1e,0x24,0x00,0x83,0x01,0x3c,
- 0x01,0xa0,0x06,0x3c,0xb0,0x84,0x84,0x24,0x10,0x00,0x3e,0xac,
- 0x01,0xa0,0x05,0x3c,0x70,0xf1,0xc6,0x24,0x23,0x20,0xe4,0x03,
- 0x00,0x00,0x1e,0x24,0x00,0x80,0xa5,0x24,0x21,0x20,0x86,0x00,
- 0xfc,0xff,0x88,0x8c,0xfc,0xff,0xc6,0x24,0x2b,0x08,0xa6,0x00,
- 0xfc,0xff,0x84,0x24,0xfb,0xff,0x20,0x14,0x00,0x00,0xc8,0xac,
- 0x9f,0x01,0x1e,0x24,0x00,0x83,0x01,0x3c,0x10,0x00,0x3e,0xac,
- 0x00,0x00,0x1e,0x24,0xaa,0x01,0x1e,0x24,0x00,0x83,0x01,0x3c,
- 0x10,0x00,0x3e,0xac,0x01,0xa0,0x04,0x3c,0x00,0x86,0x84,0x24,
- 0x00,0xa0,0x01,0x3c,0x01,0xa0,0x1f,0x3c,0x25,0x20,0x81,0x00,
- 0x00,0x00,0x1e,0x24,0x08,0x00,0x80,0x00,0x34,0x85,0xff,0x27,
- 0x00,0xa0,0x0b,0x3c,0xb5,0x01,0x1e,0x24,0x00,0x83,0x01,0x3c,
- 0x01,0xa0,0x09,0x3c,0x01,0xa0,0x0a,0x3c,0x00,0x80,0x6b,0x35,
- 0x10,0x00,0x3e,0xac,0x00,0xa0,0x08,0x3c,0x88,0x85,0x29,0x25,
- 0xd8,0x85,0x4a,0x25,0x00,0x00,0x1e,0x24,0x80,0x00,0x08,0x35,
- 0x25,0x48,0x2b,0x01,0x25,0x50,0x4b,0x01,0x00,0x00,0x2b,0x8d,
- 0x04,0x00,0x29,0x25,0x04,0x00,0x08,0x25,0xfc,0xff,0x2a,0x15,
- 0xfc,0xff,0x0b,0xad,0x16,0x00,0x00,0x10,0xfc,0x01,0x1e,0x24,
- 0x00,0xa3,0x1a,0x3c,0x80,0x01,0x5a,0x37,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x40,0xaf,0x00,0x00,0x00,0x00,0x00,0x60,0x1a,0x40,
- 0x00,0x00,0x00,0x00,0xff,0xff,0x1b,0x3c,0xfe,0x00,0x7b,0x37,
- 0x00,0x00,0x00,0x00,0x24,0xd0,0x5b,0x03,0x00,0x00,0x00,0x00,
- 0x00,0x60,0x9a,0x40,0x00,0x00,0x00,0x00,0x00,0x70,0x1a,0x40,
- 0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x42,0x00,0x00,0x00,0x00,
- 0x08,0x00,0x40,0x03,0x00,0x00,0x00,0x00,0xfc,0x01,0x1e,0x24,
- 0x00,0x83,0x01,0x3c,0x10,0x00,0x3e,0xac,0x00,0x00,0x1e,0x24,
- 0x83,0x23,0x00,0x0c,0xc8,0x97,0x9d,0x27,0x4f,0x20,0x00,0x08,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x01,0xa0,0x08,0x3c,0x18,0x86,0x08,0x25,0x00,0xa0,0x01,0x3c,
- 0x25,0x40,0x01,0x01,0x08,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
- 0x00,0x60,0x04,0x40,0x00,0x00,0x00,0x00,0x01,0x00,0x05,0x3c,
- 0x00,0x60,0x85,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xa0,0x09,0x3c,0x01,0x00,0x01,0x3c,0x23,0x40,0x21,0x01,
- 0x03,0x00,0x00,0xa1,0x04,0x00,0x08,0x25,0xfd,0xff,0x09,0x15,
- 0x00,0x00,0x00,0x00,0x03,0x00,0x05,0x3c,0x00,0x60,0x85,0x40,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x09,0x3c,
- 0x01,0x00,0x01,0x3c,0x23,0x40,0x21,0x01,0x03,0x00,0x00,0xa1,
- 0x04,0x00,0x08,0x25,0xfd,0xff,0x09,0x15,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x84,0x40,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x04,0x40,
- 0xff,0xff,0x08,0x3c,0xff,0x3f,0x08,0x35,0x24,0x20,0x88,0x00,
- 0x00,0x10,0x84,0x40,0x01,0xa0,0x08,0x3c,0xfc,0xff,0x01,0x24,
- 0x01,0xa0,0x09,0x3c,0x70,0xf1,0x08,0x25,0x60,0xf5,0x29,0x25,
- 0x24,0x40,0x01,0x01,0x24,0x48,0x21,0x01,0x04,0x00,0x08,0x25,
- 0xfe,0xff,0x09,0x15,0xfc,0xff,0x00,0xad,0x08,0x00,0xe0,0x03,
- 0x00,0x00,0x00,0x00,0x00,0x60,0x02,0x40,0xff,0xff,0x01,0x3c,
- 0xfe,0x00,0x21,0x34,0x25,0x20,0x81,0x00,0x24,0x40,0x44,0x00,
- 0x00,0x60,0x88,0x40,0x08,0x00,0xe0,0x03,0x01,0xff,0x42,0x30,
- 0x00,0x60,0x02,0x40,0x00,0x00,0x00,0x00,0x26,0x40,0x44,0x00,
- 0x01,0xff,0x08,0x31,0x26,0x40,0x02,0x01,0x00,0x60,0x88,0x40,
- 0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x00,0x60,0x08,0x40,
- 0x00,0x00,0x00,0x00,0xfe,0xff,0x01,0x24,0x24,0x48,0x01,0x01,
- 0x00,0x60,0x89,0x40,0x00,0x68,0x02,0x40,0x00,0x03,0x84,0x30,
- 0x25,0x18,0x44,0x00,0x00,0x68,0x83,0x40,0x00,0x60,0x88,0x40,
- 0x08,0x00,0xe0,0x03,0x24,0x10,0x44,0x00,0x00,0x60,0x08,0x40,
- 0x00,0x03,0x84,0x30,0xfe,0xff,0x01,0x24,0x24,0x48,0x01,0x01,
- 0x00,0x60,0x89,0x40,0x00,0x68,0x02,0x40,0x27,0x18,0x80,0x00,
- 0x24,0x18,0x62,0x00,0x00,0x68,0x83,0x40,0x00,0x60,0x88,0x40,
- 0x08,0x00,0xe0,0x03,0x24,0x10,0x44,0x00,0x40,0x10,0x08,0x3c,
- 0x00,0x60,0x88,0x40,0xc0,0xbf,0x08,0x3c,0x08,0x00,0x00,0x01,
- 0x00,0x00,0x00,0x00,0x00,0x60,0x08,0x40,0x00,0x00,0x00,0x00,
- 0xff,0xff,0x09,0x3c,0xfe,0x00,0x29,0x35,0x00,0x00,0x00,0x00,
- 0x24,0x40,0x09,0x01,0x00,0x00,0x00,0x00,0x25,0x40,0x04,0x01,
- 0x00,0x00,0x00,0x00,0x00,0x60,0x88,0x40,0x00,0x00,0x00,0x00,
- 0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xd0,0xff,0xbd,0x27,0x00,0xa3,0x0d,0x3c,
- 0x30,0x31,0x0e,0x3c,0x04,0x01,0xad,0x35,0x2c,0x00,0xbf,0xaf,
- 0x28,0x00,0xb2,0xaf,0x20,0x00,0xb0,0xaf,0x24,0x00,0xb1,0xaf,
- 0x42,0x54,0xce,0x35,0x23,0x01,0x04,0x3c,0xdc,0xfe,0x06,0x3c,
- 0xff,0xa2,0x07,0x3c,0xff,0xa2,0x08,0x3c,0xf0,0xf0,0x09,0x3c,
- 0xff,0xa2,0x0a,0x3c,0x0f,0x0f,0x0b,0x3c,0x01,0x00,0x0c,0x3c,
- 0x00,0x00,0xae,0xad,0x01,0x00,0x8c,0x35,0x0f,0x0f,0x6b,0x35,
- 0xfc,0xff,0x4a,0x35,0xf0,0xf0,0x29,0x35,0xf8,0xff,0x08,0x35,
- 0x00,0x80,0xe7,0x34,0x98,0xba,0xc6,0x34,0x67,0x45,0x84,0x34,
- 0x10,0x00,0x05,0x3c,0x21,0x18,0xa7,0x00,0xf8,0x7f,0x64,0xac,
- 0x42,0x10,0x05,0x00,0xfc,0x7f,0x66,0xac,0x21,0x78,0x48,0x00,
- 0x00,0x00,0xe9,0xad,0x21,0xc0,0x4a,0x00,0x00,0x00,0x0b,0xaf,
- 0xf8,0x7f,0x79,0x8c,0x00,0x00,0x00,0x00,0x05,0x00,0x99,0x14,
- 0x00,0x00,0x00,0x00,0xfc,0x7f,0x6e,0x8c,0x00,0x00,0x00,0x00,
- 0x06,0x00,0xce,0x10,0x00,0xa3,0x12,0x3c,0x42,0x28,0x05,0x00,
- 0x2b,0x08,0xac,0x00,0xee,0xff,0x20,0x10,0x21,0x18,0xa7,0x00,
- 0x00,0xa3,0x12,0x3c,0x80,0x01,0x52,0x36,0x31,0x30,0x0f,0x3c,
- 0x10,0x00,0x45,0xae,0x42,0x54,0xef,0x35,0x00,0x00,0xaf,0xad,
- 0x29,0x2a,0x00,0x0c,0x20,0x80,0x84,0x27,0x00,0xa3,0x11,0x3c,
- 0x90,0x01,0x31,0x36,0x00,0x00,0x25,0x8e,0x29,0x2a,0x00,0x0c,
- 0x3c,0x80,0x84,0x27,0x29,0x2a,0x00,0x0c,0x50,0x80,0x84,0x27,
- 0x65,0x2a,0x00,0x0c,0x00,0x00,0x00,0x00,0x02,0x00,0x18,0x24,
- 0xc8,0x97,0x98,0xaf,0x02,0x00,0x19,0x24,0x01,0xa1,0x0e,0x3c,
- 0x01,0xa0,0x04,0x3c,0x01,0xa0,0x05,0x3c,0x00,0x80,0xd9,0xa5,
- 0x70,0xf1,0xa5,0x24,0x08,0x28,0x00,0x0c,0x00,0x80,0x84,0x24,
- 0x00,0xa3,0x10,0x3c,0xa0,0x01,0x10,0x36,0x00,0x00,0x02,0xae,
- 0x29,0x2a,0x00,0x0c,0x68,0x80,0x84,0x27,0x00,0x00,0x0f,0x8e,
- 0xff,0xff,0x01,0x24,0x0c,0x00,0xe1,0x11,0x00,0x00,0x00,0x00,
- 0x00,0xa3,0x02,0x3c,0x8c,0x01,0x42,0x34,0x00,0x00,0x58,0x8c,
- 0x80,0x80,0x84,0x27,0x02,0x00,0x19,0x37,0x00,0x00,0x59,0xac,
- 0x00,0x00,0x05,0x8e,0x29,0x2a,0x00,0x0c,0x00,0x00,0x00,0x00,
- 0x03,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x65,0x2a,0x00,0x0c,
- 0x00,0x00,0x00,0x00,0x29,0x2a,0x00,0x0c,0x9c,0x80,0x84,0x27,
- 0x32,0x30,0x0e,0x3c,0x42,0x54,0xce,0x35,0x00,0xa3,0x0f,0x3c,
- 0x04,0x01,0xee,0xad,0x29,0x2a,0x00,0x0c,0xa0,0x80,0x84,0x27,
- 0x00,0xa3,0x10,0x3c,0x00,0x10,0x10,0x36,0x00,0xa3,0x05,0x3c,
- 0x01,0x00,0x18,0x24,0x10,0x00,0xb8,0xaf,0x10,0x40,0xa5,0x34,
- 0x21,0x20,0x00,0x02,0x01,0x00,0x06,0x24,0xfe,0x2b,0x00,0x0c,
- 0x21,0x38,0x00,0x00,0x06,0x00,0x40,0x10,0x00,0x00,0x00,0x00,
- 0x0c,0x00,0x59,0x8e,0x00,0x00,0x00,0x00,0x08,0x00,0x2e,0x37,
- 0x03,0x00,0x00,0x10,0x0c,0x00,0x4e,0xae,0xc1,0x27,0x00,0x0c,
- 0x0a,0x00,0x04,0x24,0x00,0x00,0x2f,0x8e,0x04,0x00,0x01,0x3c,
- 0x01,0x00,0x21,0x34,0x2b,0x08,0xe1,0x01,0x1d,0x00,0x20,0x14,
- 0x00,0x00,0x00,0x00,0x29,0x2a,0x00,0x0c,0xac,0x80,0x84,0x27,
- 0x00,0x00,0x25,0x8e,0x00,0x03,0x01,0x3c,0x25,0x28,0xa1,0x00,
- 0xff,0xff,0x01,0x3c,0x10,0x00,0x21,0x34,0x21,0x28,0xa1,0x00,
- 0xff,0x1f,0x01,0x3c,0xff,0xff,0x21,0x34,0x24,0x28,0xa1,0x00,
- 0x00,0xa0,0x01,0x3c,0x01,0x00,0x18,0x24,0x10,0x00,0xb8,0xaf,
- 0x25,0x28,0xa1,0x00,0x04,0xa3,0x04,0x3c,0x01,0x00,0x06,0x24,
- 0xfe,0x2b,0x00,0x0c,0x21,0x38,0x00,0x00,0x06,0x00,0x40,0x10,
- 0x00,0x00,0x00,0x00,0x0c,0x00,0x59,0x8e,0x00,0x00,0x00,0x00,
- 0x08,0x00,0x2e,0x37,0x03,0x00,0x00,0x10,0x0c,0x00,0x4e,0xae,
- 0xc1,0x27,0x00,0x0c,0x0a,0x00,0x04,0x24,0x29,0x2a,0x00,0x0c,
- 0xb4,0x80,0x84,0x27,0x00,0xa3,0x05,0x3c,0x00,0x20,0xa5,0x34,
- 0x21,0x20,0x00,0x02,0x01,0x00,0x06,0x24,0x21,0x38,0x00,0x00,
- 0xfe,0x2b,0x00,0x0c,0x10,0x00,0xa0,0xaf,0x06,0x00,0x40,0x10,
- 0x00,0x00,0x00,0x00,0x0c,0x00,0x4f,0x8e,0x00,0x00,0x00,0x00,
- 0x08,0x00,0xf8,0x35,0x03,0x00,0x00,0x10,0x0c,0x00,0x58,0xae,
- 0xc1,0x27,0x00,0x0c,0x0a,0x00,0x04,0x24,0x82,0x00,0x19,0x24,
- 0xc8,0x97,0x99,0xaf,0x82,0x00,0x0e,0x24,0x01,0xa1,0x0f,0x3c,
- 0x00,0x80,0xee,0xa5,0x00,0xa3,0x18,0x3c,0xc9,0x01,0x19,0x93,
- 0x00,0x00,0x00,0x00,0x55,0x00,0x20,0x17,0x2c,0x00,0xbf,0x8f,
- 0x33,0x30,0x0e,0x3c,0x42,0x54,0xce,0x35,0x00,0xa3,0x0f,0x3c,
- 0x04,0x01,0xee,0xad,0xc9,0x2a,0x00,0x0c,0x21,0x20,0x00,0x00,
- 0x06,0x00,0x40,0x10,0x00,0x00,0x00,0x00,0x0c,0x00,0x58,0x8e,
- 0x00,0x00,0x00,0x00,0x04,0x00,0x19,0x37,0x03,0x00,0x00,0x10,
- 0x0c,0x00,0x59,0xae,0xc1,0x27,0x00,0x0c,0x0a,0x00,0x04,0x24,
- 0x00,0xa3,0x0e,0x3c,0xc9,0x01,0xcf,0x91,0x00,0x00,0x00,0x00,
- 0x41,0x00,0xe0,0x15,0x2c,0x00,0xbf,0x8f,0x21,0x80,0x00,0x00,
- 0x10,0x80,0x91,0x27,0x00,0x00,0x38,0x8e,0x00,0xa3,0x19,0x3c,
- 0x04,0x01,0x38,0xaf,0x10,0x00,0xa0,0xaf,0x21,0x20,0x00,0x02,
- 0x21,0x28,0x00,0x00,0x21,0x30,0x00,0x00,0x94,0x2e,0x00,0x0c,
- 0x21,0x38,0x00,0x00,0x07,0x00,0x40,0x10,0x00,0x00,0x00,0x00,
- 0x0c,0x00,0x4e,0x8e,0x10,0x00,0x0f,0x24,0x04,0xc0,0x0f,0x02,
- 0x25,0xc8,0xd8,0x01,0x03,0x00,0x00,0x10,0x0c,0x00,0x59,0xae,
- 0xc1,0x27,0x00,0x0c,0x0a,0x00,0x04,0x24,0x00,0xa3,0x0f,0x3c,
- 0xc9,0x01,0xee,0x91,0x00,0x00,0x00,0x00,0x27,0x00,0xc0,0x15,
- 0x2c,0x00,0xbf,0x8f,0x01,0x00,0x10,0x26,0x04,0x00,0x01,0x24,
- 0xe5,0xff,0x01,0x16,0x04,0x00,0x31,0x26,0x2f,0x00,0x58,0x92,
- 0xff,0x00,0x03,0x24,0x08,0x00,0x78,0x14,0x03,0x00,0x10,0x24,
- 0x21,0x10,0x50,0x02,0x2b,0x00,0x59,0x90,0xff,0xff,0x10,0x26,
- 0x03,0x00,0x79,0x14,0xff,0xff,0x42,0x24,0xfb,0xff,0x00,0x16,
- 0x00,0x00,0x00,0x00,0x21,0x10,0x50,0x02,0x2c,0x00,0x4f,0x90,
- 0x00,0x00,0x00,0x00,0x09,0x00,0x6f,0x10,0x00,0x00,0x00,0x00,
- 0x07,0x00,0x00,0x1a,0x00,0x00,0x00,0x00,0x2b,0x00,0x4e,0x90,
- 0xff,0xff,0x10,0x26,0x03,0x00,0x6e,0x10,0xff,0xff,0x42,0x24,
- 0xfb,0xff,0x00,0x1e,0x00,0x00,0x00,0x00,0x09,0x00,0x00,0x12,
- 0x2c,0x00,0xbf,0x8f,0x29,0x2a,0x00,0x0c,0xc0,0x80,0x84,0x27,
- 0x0c,0x00,0x58,0x8e,0x10,0x00,0x19,0x24,0x04,0x78,0x19,0x02,
- 0x25,0x70,0x0f,0x03,0x0c,0x00,0x4e,0xae,0x2c,0x00,0xbf,0x8f,
- 0x20,0x00,0xb0,0x8f,0x24,0x00,0xb1,0x8f,0x28,0x00,0xb2,0x8f,
- 0x08,0x00,0xe0,0x03,0x30,0x00,0xbd,0x27,0xe8,0xff,0xbd,0x27,
- 0x14,0x00,0xbf,0xaf,0xdc,0x80,0x84,0x27,0x35,0x20,0x00,0x0c,
- 0xcf,0x00,0x05,0x24,0x14,0x00,0xbf,0x8f,0x18,0x00,0xbd,0x27,
- 0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0xe8,0xff,0xbd,0x27,
- 0x14,0x00,0xbf,0xaf,0xec,0x80,0x84,0x27,0x35,0x20,0x00,0x0c,
- 0xd9,0x00,0x05,0x24,0x14,0x00,0xbf,0x8f,0x18,0x00,0xbd,0x27,
- 0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0xc0,0xff,0xbd,0x27,
- 0x2c,0x00,0xb5,0xaf,0x1c,0x00,0xb1,0xaf,0x38,0x00,0xbe,0xaf,
- 0x30,0x00,0xb6,0xaf,0x34,0x00,0xb7,0xaf,0x28,0x00,0xb4,0xaf,
- 0x20,0x00,0xb2,0xaf,0x24,0x00,0xb3,0xaf,0x00,0xa3,0x11,0x3c,
- 0x00,0xa3,0x15,0x3c,0x21,0x98,0x80,0x00,0x3c,0x00,0xbf,0xaf,
- 0x18,0x00,0xb0,0xaf,0xc8,0x01,0xb5,0x36,0xc9,0x01,0x31,0x36,
- 0xff,0xff,0x12,0x24,0xff,0xff,0x14,0x24,0x0a,0x00,0x17,0x24,
- 0x08,0x00,0x16,0x24,0x0d,0x00,0x1e,0x24,0x00,0x00,0x2e,0x92,
- 0x00,0x00,0x00,0x00,0x05,0x00,0xc0,0x15,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x2f,0x92,0x00,0x00,0x00,0x00,0xfd,0xff,0xe0,0x11,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xb0,0x92,0x00,0x00,0x20,0xa2,
- 0x07,0x00,0x16,0x12,0x00,0x00,0x00,0x00,0x03,0x00,0x17,0x12,
- 0x00,0x00,0x00,0x00,0x19,0x00,0x1e,0x16,0x10,0x00,0x01,0x24,
- 0x3d,0x00,0x00,0x10,0x21,0x10,0x40,0x02,0xed,0xff,0x54,0x12,
- 0x00,0x00,0x00,0x00,0x5c,0x28,0x00,0x0c,0x08,0x00,0x04,0x24,
- 0x5c,0x28,0x00,0x0c,0x20,0x00,0x04,0x24,0x5c,0x28,0x00,0x0c,
- 0x08,0x00,0x04,0x24,0x1a,0x00,0x53,0x02,0x02,0x00,0x60,0x16,
- 0x00,0x00,0x00,0x00,0x0d,0x00,0x07,0x00,0xff,0xff,0x01,0x24,
- 0x04,0x00,0x61,0x16,0x00,0x80,0x01,0x3c,0x02,0x00,0x41,0x16,
- 0x00,0x00,0x00,0x00,0x0d,0x00,0x06,0x00,0x12,0x90,0x00,0x00,
- 0xdb,0xff,0x00,0x10,0x00,0x00,0x2e,0x92,0x10,0x00,0x01,0x24,
- 0x15,0x00,0x61,0x16,0x61,0x00,0x01,0x2e,0x05,0x00,0x20,0x14,
- 0x67,0x00,0x01,0x2e,0x04,0x00,0x20,0x10,0x41,0x00,0x01,0x2e,
- 0xe0,0x00,0x10,0x26,0xff,0x00,0x10,0x32,0x41,0x00,0x01,0x2e,
- 0x0c,0x00,0x20,0x14,0x47,0x00,0x01,0x2e,0x0b,0x00,0x20,0x10,
- 0x30,0x00,0x01,0x2e,0x02,0x00,0x54,0x16,0x00,0x00,0x00,0x00,
- 0x21,0x90,0x00,0x00,0x19,0x00,0x53,0x02,0x21,0x20,0x00,0x02,
- 0x12,0xc0,0x00,0x00,0x21,0x90,0x10,0x03,0x5c,0x28,0x00,0x0c,
- 0xc9,0xff,0x52,0x26,0x30,0x00,0x01,0x2e,0xc0,0xff,0x20,0x14,
- 0x3a,0x00,0x01,0x2e,0xbe,0xff,0x20,0x10,0x00,0x00,0x00,0x00,
- 0x02,0x00,0x54,0x16,0x00,0x00,0x00,0x00,0x21,0x90,0x00,0x00,
- 0x19,0x00,0x53,0x02,0x21,0x20,0x00,0x02,0x12,0xc8,0x00,0x00,
- 0x21,0x90,0x30,0x03,0x5c,0x28,0x00,0x0c,0xd0,0xff,0x52,0x26,
- 0xb4,0xff,0x00,0x10,0x00,0x00,0x2e,0x92,0x3c,0x00,0xbf,0x8f,
- 0x18,0x00,0xb0,0x8f,0x1c,0x00,0xb1,0x8f,0x20,0x00,0xb2,0x8f,
- 0x24,0x00,0xb3,0x8f,0x28,0x00,0xb4,0x8f,0x2c,0x00,0xb5,0x8f,
- 0x30,0x00,0xb6,0x8f,0x34,0x00,0xb7,0x8f,0x38,0x00,0xbe,0x8f,
- 0x08,0x00,0xe0,0x03,0x40,0x00,0xbd,0x27,0xc8,0xfe,0xbd,0x27,
- 0x24,0x00,0xbf,0xaf,0x1c,0x37,0x00,0x0c,0x00,0x00,0x00,0x00,
- 0x4f,0x53,0x0e,0x3c,0x4c,0x00,0xb0,0xaf,0x42,0x49,0xce,0x35,
- 0x00,0xa3,0x0f,0x3c,0x4f,0x20,0x18,0x3c,0x00,0x01,0xee,0xad,
- 0x20,0x47,0x18,0x37,0x00,0xa3,0x19,0x3c,0x4b,0x20,0x08,0x3c,
- 0x04,0x01,0x38,0xaf,0x20,0x4f,0x08,0x35,0x00,0xa3,0x09,0x3c,
- 0x08,0x01,0x28,0xad,0x20,0x20,0x0a,0x3c,0x20,0x20,0x4a,0x35,
- 0x00,0xa3,0x0b,0x3c,0x0c,0x01,0x6a,0xad,0x03,0x00,0x0c,0x24,
- 0x00,0xa3,0x0d,0x3c,0x14,0x01,0xac,0xad,0x00,0xa3,0x0e,0x3c,
- 0xca,0x01,0xce,0x35,0x00,0xa3,0x0f,0x3c,0x00,0xa3,0x18,0x3c,
- 0x18,0x01,0xee,0xad,0x30,0x0c,0x18,0x37,0x00,0xa3,0x19,0x3c,
- 0x00,0xa3,0x08,0x3c,0x1c,0x01,0x38,0xaf,0x80,0x01,0x08,0x35,
- 0x00,0xa3,0x09,0x3c,0x20,0x01,0x28,0xad,0x00,0xa3,0x0a,0x3c,
- 0x84,0x01,0x40,0xad,0x00,0xa3,0x0b,0x3c,0x88,0x01,0x60,0xad,
- 0x00,0xa3,0x0c,0x3c,0x94,0x01,0x80,0xad,0x00,0xa3,0x0d,0x3c,
- 0x98,0x01,0xa0,0xad,0x01,0x00,0x0e,0x24,0x00,0xa3,0x0f,0x3c,
- 0x9c,0x01,0xee,0xad,0x01,0x01,0x18,0x24,0x00,0xa3,0x19,0x3c,
- 0xa4,0x01,0x38,0xaf,0x00,0xa3,0x08,0x3c,0xa8,0x01,0x00,0xa5,
- 0x00,0xa3,0x09,0x3c,0xaa,0x01,0x20,0xa5,0x00,0xa3,0x0a,0x3c,
- 0xca,0x01,0x40,0xa5,0x00,0xa3,0x0b,0x3c,0x00,0xa3,0x02,0x3c,
- 0xcc,0x01,0x60,0xa5,0x00,0xa3,0x0d,0x3c,0xff,0x01,0x0c,0x24,
- 0x10,0x01,0x42,0x34,0xce,0x01,0xac,0xa5,0x00,0x00,0x50,0x8c,
- 0x00,0x00,0x00,0x00,0x01,0x00,0x10,0x2e,0x04,0x00,0x00,0x12,
- 0x00,0x00,0x00,0x00,0x00,0x17,0x0e,0x3c,0x05,0x06,0xce,0x35,
- 0x00,0x00,0x4e,0xac,0xf0,0x21,0x00,0x0c,0x00,0x00,0x00,0x00,
- 0x00,0xa3,0x02,0x3c,0x39,0x39,0x0f,0x3c,0x04,0x01,0x42,0x34,
- 0x42,0x54,0xef,0x35,0x00,0x00,0x4f,0xac,0x47,0x00,0x18,0x24,
- 0x00,0xa3,0x19,0x3c,0x00,0x0c,0x38,0xa3,0x44,0x00,0x08,0x24,
- 0x00,0xa3,0x09,0x3c,0x01,0x0c,0x28,0xa1,0x00,0xa3,0x0a,0x3c,
- 0x30,0x0c,0x40,0xa1,0x00,0xa3,0x0b,0x3c,0x32,0x0c,0x60,0xa1,
- 0x00,0xa3,0x0c,0x3c,0x45,0x23,0x0d,0x3c,0x38,0x0c,0x80,0xa5,
- 0x89,0x67,0xad,0x35,0x00,0xa3,0x0e,0x3c,0x05,0x00,0x00,0x12,
- 0x10,0x00,0xcd,0xad,0x4e,0x45,0x0f,0x3c,0x44,0x4f,0xef,0x35,
- 0x04,0x00,0x00,0x10,0x00,0x00,0x4f,0xac,0x49,0x54,0x18,0x3c,
- 0x57,0x41,0x18,0x37,0x00,0x00,0x58,0xac,0x38,0x00,0xb4,0xaf,
- 0x00,0xa3,0x14,0x3c,0x30,0x00,0xb6,0xaf,0x0a,0x00,0x16,0x24,
- 0xc9,0x01,0x94,0x36,0x44,0x00,0xb1,0xaf,0x40,0x00,0xb2,0xaf,
- 0x3c,0x00,0xb3,0xaf,0x34,0x00,0xb5,0xaf,0x2c,0x00,0xb7,0xaf,
- 0x28,0x00,0xbe,0xaf,0x00,0xa3,0x02,0x3c,0x10,0x00,0x42,0x34,
- 0x00,0x00,0x59,0x8c,0x00,0x00,0x00,0x00,0x01,0x00,0x28,0x27,
- 0x14,0x28,0x00,0x0c,0x00,0x00,0x48,0xac,0x00,0xa3,0x09,0x3c,
- 0x10,0x01,0x2a,0x8d,0x00,0x00,0x00,0x00,0x09,0x00,0x40,0x15,
- 0x00,0x00,0x00,0x00,0x00,0x17,0x0b,0x3c,0x05,0x06,0x6b,0x35,
- 0x00,0xa3,0x0c,0x3c,0x4e,0x45,0x0d,0x3c,0x10,0x01,0x8b,0xad,
- 0x44,0x4f,0xad,0x35,0x00,0xa3,0x0e,0x3c,0x04,0x01,0xcd,0xad,
- 0x00,0x00,0x8f,0x92,0x00,0x00,0x00,0x00,0xea,0xff,0xe0,0x11,
- 0x00,0xa3,0x02,0x3c,0x00,0xa3,0x18,0x3c,0xc8,0x01,0x19,0x93,
- 0x21,0x98,0x00,0x00,0x30,0x01,0xb9,0xa3,0x00,0x00,0x80,0xa2,
- 0x74,0x00,0xa0,0xaf,0x60,0x00,0xa0,0xaf,0x01,0x00,0x1e,0x24,
- 0x3c,0x01,0xb0,0x27,0x4c,0x01,0xa2,0x27,0x10,0x00,0x10,0x26,
- 0x18,0xff,0x00,0xae,0x2c,0xff,0x00,0xae,0x1c,0xff,0x00,0xae,
- 0x30,0xff,0x00,0xae,0x20,0xff,0x00,0xae,0x34,0xff,0x00,0xae,
- 0x24,0xff,0x00,0xae,0xf7,0xff,0x02,0x16,0x38,0xff,0x00,0xae,
- 0x09,0x03,0x00,0x10,0x30,0x01,0xac,0x93,0x29,0x2a,0x00,0x0c,
- 0x4c,0x81,0x84,0x27,0x29,0x2a,0x00,0x0c,0x6c,0x81,0x84,0x27,
- 0x29,0x2a,0x00,0x0c,0x7c,0x81,0x84,0x27,0x29,0x2a,0x00,0x0c,
- 0x90,0x81,0x84,0x27,0x29,0x2a,0x00,0x0c,0xa4,0x81,0x84,0x27,
- 0x29,0x2a,0x00,0x0c,0xb4,0x81,0x84,0x27,0x29,0x2a,0x00,0x0c,
- 0xd8,0x81,0x84,0x27,0x29,0x2a,0x00,0x0c,0xfc,0x81,0x84,0x27,
- 0x29,0x2a,0x00,0x0c,0x20,0x82,0x84,0x27,0x29,0x2a,0x00,0x0c,
- 0x38,0x82,0x84,0x27,0x29,0x2a,0x00,0x0c,0x70,0x82,0x84,0x27,
- 0x29,0x2a,0x00,0x0c,0x94,0x82,0x84,0x27,0xba,0xff,0x00,0x10,
- 0x00,0xa3,0x02,0x3c,0x65,0x00,0x08,0x24,0x30,0x01,0xa8,0xa3,
- 0x29,0x2a,0x00,0x0c,0xc4,0x82,0x84,0x27,0x14,0x23,0x00,0x0c,
- 0x21,0x20,0xc0,0x02,0x21,0xb8,0x40,0x00,0x29,0x2a,0x00,0x0c,
- 0xe8,0x82,0x84,0x27,0xaf,0xff,0xe0,0x12,0x00,0xa3,0x02,0x3c,
- 0x01,0x00,0x09,0x24,0x10,0x00,0xa9,0xaf,0x21,0x20,0x00,0x00,
- 0x02,0x00,0x05,0x24,0xb0,0x00,0xa6,0x27,0x94,0x2e,0x00,0x0c,
- 0x21,0x38,0x00,0x00,0x01,0x00,0x0a,0x24,0x10,0x00,0xaa,0xaf,
- 0x01,0x00,0x04,0x24,0x02,0x00,0x05,0x24,0xb0,0x00,0xa6,0x27,
- 0x94,0x2e,0x00,0x0c,0x21,0x38,0x00,0x00,0x01,0x00,0x0b,0x24,
- 0x10,0x00,0xab,0xaf,0x02,0x00,0x04,0x24,0x02,0x00,0x05,0x24,
- 0xb0,0x00,0xa6,0x27,0x94,0x2e,0x00,0x0c,0x21,0x38,0x00,0x00,
- 0x01,0x00,0x0c,0x24,0x10,0x00,0xac,0xaf,0x03,0x00,0x04,0x24,
- 0x02,0x00,0x05,0x24,0xb0,0x00,0xa6,0x27,0x94,0x2e,0x00,0x0c,
- 0x21,0x38,0x00,0x00,0x21,0x18,0xe0,0x02,0x67,0x00,0x60,0x10,
- 0xff,0xff,0xf7,0x26,0x30,0x01,0xad,0x93,0x65,0x00,0x01,0x24,
- 0x30,0x00,0xa1,0x11,0x01,0x00,0x73,0x26,0x21,0xa8,0x00,0x00,
- 0xfc,0x80,0x84,0x8f,0x29,0x2a,0x00,0x0c,0x21,0x28,0x60,0x02,
- 0xc9,0x2a,0x00,0x0c,0x21,0x20,0x00,0x00,0x07,0x00,0x40,0x10,
- 0x60,0x00,0xb8,0x8f,0x74,0x00,0xae,0x8f,0x00,0x00,0x00,0x00,
- 0x01,0x00,0xcf,0x25,0x05,0x00,0x00,0x10,0x74,0x00,0xaf,0xaf,
- 0x60,0x00,0xb8,0x8f,0x00,0x00,0x00,0x00,0x01,0x00,0x19,0x27,
- 0x60,0x00,0xb9,0xaf,0x00,0x00,0x88,0x92,0x00,0x00,0x00,0x00,
- 0x4e,0x00,0x00,0x15,0x00,0x00,0x00,0x00,0x01,0x00,0xb5,0x26,
- 0x14,0x00,0x01,0x24,0xe9,0xff,0xa1,0x16,0x00,0x00,0x00,0x00,
- 0xfc,0x80,0x84,0x8f,0x29,0x2a,0x00,0x0c,0x21,0x28,0x60,0x02,
- 0x00,0xa3,0x04,0x3c,0x00,0xa3,0x05,0x3c,0xf0,0x7f,0xa5,0x34,
- 0x10,0x7f,0x84,0x34,0x01,0x00,0x06,0x24,0x21,0x38,0x00,0x00,
- 0xfe,0x2b,0x00,0x0c,0x10,0x00,0xa0,0xaf,0x07,0x00,0x40,0x10,
- 0x64,0x00,0xab,0x8f,0x78,0x00,0xa9,0x8f,0x00,0x00,0x00,0x00,
- 0x01,0x00,0x2a,0x25,0x05,0x00,0x00,0x10,0x78,0x00,0xaa,0xaf,
- 0x64,0x00,0xab,0x8f,0x00,0x00,0x00,0x00,0x01,0x00,0x6c,0x25,
- 0x64,0x00,0xac,0xaf,0x00,0x00,0x8d,0x92,0x00,0x00,0x00,0x00,
- 0x30,0x00,0xa0,0x15,0x00,0x00,0x00,0x00,0x21,0x80,0x00,0x00,
- 0x21,0x90,0x00,0x00,0x21,0x88,0x00,0x00,0xfc,0x80,0x84,0x8f,
- 0x29,0x2a,0x00,0x0c,0x21,0x28,0x60,0x02,0x21,0x20,0x20,0x02,
- 0x21,0x28,0x00,0x02,0xb0,0x00,0xa6,0x27,0x21,0x38,0x00,0x00,
- 0x94,0x2e,0x00,0x0c,0x10,0x00,0xa0,0xaf,0x0a,0x00,0x40,0x10,
- 0x80,0x40,0x10,0x00,0x80,0x70,0x10,0x00,0x38,0x01,0xaf,0x27,
- 0x21,0x10,0xcf,0x01,0x44,0xff,0x58,0x8c,0x00,0x00,0x00,0x00,
- 0x01,0x00,0x19,0x27,0x08,0x00,0x00,0x10,0x44,0xff,0x59,0xac,
- 0x80,0x40,0x10,0x00,0x38,0x01,0xa9,0x27,0x21,0x10,0x09,0x01,
- 0x30,0xff,0x4a,0x8c,0x00,0x00,0x00,0x00,0x01,0x00,0x4b,0x25,
- 0x30,0xff,0x4b,0xac,0x00,0x00,0x8c,0x92,0x00,0x00,0x00,0x00,
- 0x0f,0x00,0x80,0x15,0x00,0x00,0x00,0x00,0x01,0x00,0x31,0x26,
- 0x04,0x00,0x21,0x2a,0xdf,0xff,0x20,0x14,0x00,0x00,0x00,0x00,
- 0x01,0x00,0x52,0x26,0xdc,0xff,0x56,0x16,0x21,0x88,0x00,0x00,
- 0x01,0x00,0x10,0x26,0x02,0x00,0x01,0x24,0xd7,0xff,0x01,0x16,
- 0x21,0x90,0x00,0x00,0x21,0x18,0xe0,0x02,0x9b,0xff,0x60,0x14,
- 0xff,0xff,0xf7,0x26,0x29,0x2a,0x00,0x0c,0xec,0x82,0x84,0x27,
- 0x00,0x83,0x84,0x27,0x29,0x2a,0x00,0x0c,0x21,0x28,0x60,0x02,
- 0x21,0xf0,0x00,0x00,0x38,0x01,0xb0,0x27,0x01,0x00,0xd1,0x27,
- 0x28,0xff,0x06,0x8e,0x3c,0xff,0x07,0x8e,0x21,0x28,0x20,0x02,
- 0x29,0x2a,0x00,0x0c,0x14,0x83,0x84,0x27,0x21,0xf0,0x20,0x02,
- 0x04,0x00,0x01,0x24,0xf7,0xff,0xc1,0x17,0x04,0x00,0x10,0x26,
- 0x16,0xff,0x00,0x10,0x00,0x00,0x80,0xa2,0x29,0x2a,0x00,0x0c,
- 0x38,0x83,0x84,0x27,0x01,0x00,0x73,0x26,0xfc,0x80,0x84,0x8f,
- 0x29,0x2a,0x00,0x0c,0x21,0x28,0x60,0x02,0xc9,0x2a,0x00,0x0c,
- 0x21,0x20,0x00,0x00,0x07,0x00,0x40,0x10,0x60,0x00,0xaf,0x8f,
- 0x74,0x00,0xad,0x8f,0x00,0x00,0x00,0x00,0x01,0x00,0xae,0x25,
- 0x05,0x00,0x00,0x10,0x74,0x00,0xae,0xaf,0x60,0x00,0xaf,0x8f,
- 0x00,0x00,0x00,0x00,0x01,0x00,0xf8,0x25,0x60,0x00,0xb8,0xaf,
- 0x00,0x00,0x99,0x92,0x00,0x00,0x00,0x00,0xec,0xff,0x20,0x13,
- 0x00,0x00,0x00,0x00,0x29,0x2a,0x00,0x0c,0x54,0x83,0x84,0x27,
- 0x70,0x83,0x84,0x27,0x29,0x2a,0x00,0x0c,0x21,0x28,0x60,0x02,
- 0x60,0x00,0xa5,0x8f,0x74,0x00,0xa6,0x8f,0x29,0x2a,0x00,0x0c,
- 0x84,0x83,0x84,0x27,0xf4,0xfe,0x00,0x10,0x00,0x00,0x80,0xa2,
- 0x29,0x2a,0x00,0x0c,0xa4,0x83,0x84,0x27,0x14,0x23,0x00,0x0c,
- 0x10,0x00,0x04,0x24,0xff,0xff,0x01,0x24,0x03,0x00,0x41,0x14,
- 0x21,0x90,0x40,0x00,0x00,0xa3,0x12,0x3c,0x00,0x10,0x52,0x36,
- 0x29,0x2a,0x00,0x0c,0xb4,0x83,0x84,0x27,0x14,0x23,0x00,0x0c,
- 0x10,0x00,0x04,0x24,0xff,0xff,0x01,0x24,0x03,0x00,0x41,0x14,
- 0x21,0x80,0x40,0x00,0x02,0xa3,0x10,0x3c,0xf0,0xff,0x10,0x36,
- 0x29,0x2a,0x00,0x0c,0xc4,0x83,0x84,0x27,0x29,0x2a,0x00,0x0c,
- 0xc8,0x83,0x84,0x27,0x01,0x00,0x73,0x26,0xfc,0x80,0x84,0x8f,
- 0x29,0x2a,0x00,0x0c,0x21,0x28,0x60,0x02,0x21,0x20,0x40,0x02,
- 0x21,0x28,0x00,0x02,0x01,0x00,0x06,0x24,0x21,0x38,0x00,0x00,
- 0xfe,0x2b,0x00,0x0c,0x10,0x00,0xa0,0xaf,0x07,0x00,0x40,0x10,
- 0x64,0x00,0xaa,0x8f,0x78,0x00,0xa8,0x8f,0x00,0x00,0x00,0x00,
- 0x01,0x00,0x09,0x25,0x05,0x00,0x00,0x10,0x78,0x00,0xa9,0xaf,
- 0x64,0x00,0xaa,0x8f,0x00,0x00,0x00,0x00,0x01,0x00,0x4b,0x25,
- 0x64,0x00,0xab,0xaf,0x00,0x00,0x8c,0x92,0x00,0x00,0x00,0x00,
- 0xe8,0xff,0x80,0x11,0x00,0x00,0x00,0x00,0x29,0x2a,0x00,0x0c,
- 0xe4,0x83,0x84,0x27,0xfc,0x83,0x84,0x27,0x29,0x2a,0x00,0x0c,
- 0x21,0x28,0x60,0x02,0x64,0x00,0xa5,0x8f,0x78,0x00,0xa6,0x8f,
- 0x29,0x2a,0x00,0x0c,0x10,0x84,0x84,0x27,0xba,0xfe,0x00,0x10,
- 0x00,0x00,0x80,0xa2,0x29,0x2a,0x00,0x0c,0x30,0x84,0x84,0x27,
- 0x29,0x2a,0x00,0x0c,0x58,0x84,0x84,0x27,0x00,0x00,0x8d,0x92,
- 0x00,0x00,0x00,0x00,0x06,0x00,0xa0,0x15,0x00,0xa3,0x0f,0x3c,
- 0x00,0x00,0x8e,0x92,0x00,0x00,0x00,0x00,0xfd,0xff,0xc0,0x11,
- 0x00,0x00,0x00,0x00,0x00,0xa3,0x0f,0x3c,0xc8,0x01,0xf2,0x91,
- 0x00,0x00,0x80,0xa2,0x29,0x2a,0x00,0x0c,0x7c,0x84,0x84,0x27,
- 0x30,0x00,0x41,0x2a,0xa6,0xfe,0x20,0x14,0x34,0x00,0x41,0x2a,
- 0xa5,0xfe,0x20,0x10,0x00,0xa3,0x02,0x3c,0xd0,0xff,0x42,0x26,
- 0x21,0xa8,0x40,0x00,0x21,0xf0,0x40,0x00,0x29,0x2a,0x00,0x0c,
- 0x80,0x84,0x84,0x27,0x14,0x23,0x00,0x0c,0x21,0x20,0xc0,0x02,
- 0xff,0xff,0x52,0x24,0x0f,0x00,0x52,0x32,0x29,0x2a,0x00,0x0c,
- 0xa0,0x84,0x84,0x27,0x21,0x88,0xc0,0x03,0x2a,0x08,0xbe,0x02,
- 0xff,0xff,0x20,0x14,0x2a,0x08,0xbe,0x02,0xff,0xff,0x18,0x24,
- 0x23,0x80,0x12,0x03,0x01,0x00,0x73,0x26,0xfc,0x80,0x84,0x8f,
- 0x29,0x2a,0x00,0x0c,0x21,0x28,0x60,0x02,0x21,0x20,0x20,0x02,
- 0x21,0x28,0x00,0x02,0x21,0x30,0x00,0x00,0x21,0x38,0x00,0x00,
- 0x94,0x2e,0x00,0x0c,0x10,0x00,0xa0,0xaf,0x07,0x00,0x40,0x10,
- 0x68,0x00,0xa9,0x8f,0x7c,0x00,0xb9,0x8f,0x00,0x00,0x00,0x00,
- 0x01,0x00,0x28,0x27,0x05,0x00,0x00,0x10,0x7c,0x00,0xa8,0xaf,
- 0x68,0x00,0xa9,0x8f,0x00,0x00,0x00,0x00,0x01,0x00,0x2a,0x25,
- 0x68,0x00,0xaa,0xaf,0x00,0x00,0x8b,0x92,0x00,0x00,0x00,0x00,
- 0x07,0x00,0x60,0x15,0x00,0x00,0x00,0x00,0x01,0x00,0x31,0x26,
- 0x2a,0x08,0xb1,0x02,0xe4,0xff,0x20,0x10,0x00,0x00,0x00,0x00,
- 0xdd,0xff,0x00,0x10,0x21,0x88,0xc0,0x03,0x29,0x2a,0x00,0x0c,
- 0xc0,0x84,0x84,0x27,0xd8,0x84,0x84,0x27,0x29,0x2a,0x00,0x0c,
- 0x21,0x28,0x60,0x02,0x68,0x00,0xa6,0x8f,0x7c,0x00,0xa7,0x8f,
- 0xec,0x84,0x84,0x27,0x29,0x2a,0x00,0x0c,0x33,0x00,0x05,0x24,
- 0x68,0xfe,0x00,0x10,0x00,0x00,0x80,0xa2,0x29,0x2a,0x00,0x0c,
- 0x10,0x85,0x84,0x27,0x30,0x01,0xb7,0x93,0x00,0x00,0x00,0x00,
- 0xcd,0xff,0xf7,0x26,0x05,0x00,0xe0,0x12,0x00,0x00,0x00,0x00,
- 0x29,0x2a,0x00,0x0c,0x18,0x85,0x84,0x27,0x03,0x00,0x00,0x10,
- 0x00,0x00,0x00,0x00,0x29,0x2a,0x00,0x0c,0x1c,0x85,0x84,0x27,
- 0x29,0x2a,0x00,0x0c,0x20,0x85,0x84,0x27,0x29,0x2a,0x00,0x0c,
- 0x38,0x85,0x84,0x27,0x00,0x00,0x8c,0x92,0x00,0x00,0x00,0x00,
- 0x06,0x00,0x80,0x15,0x00,0xa3,0x0e,0x3c,0x00,0x00,0x8d,0x92,
- 0x00,0x00,0x00,0x00,0xfd,0xff,0xa0,0x11,0x00,0x00,0x00,0x00,
- 0x00,0xa3,0x0e,0x3c,0xc8,0x01,0xd2,0x91,0x61,0x00,0x01,0x24,
- 0x04,0x00,0x41,0x12,0x00,0x00,0x80,0xa2,0x41,0x00,0x01,0x24,
- 0x05,0x00,0x41,0x16,0x30,0x00,0x41,0x2a,0x21,0xf0,0x00,0x00,
- 0x09,0x00,0x00,0x10,0x03,0x00,0x15,0x24,0x30,0x00,0x41,0x2a,
- 0x41,0xfe,0x20,0x14,0x34,0x00,0x41,0x2a,0x40,0xfe,0x20,0x10,
- 0x00,0xa3,0x02,0x3c,0xd0,0xff,0x42,0x26,0x21,0xa8,0x40,0x00,
- 0x21,0xf0,0x40,0x00,0x29,0x2a,0x00,0x0c,0x6c,0x85,0x84,0x27,
- 0x01,0x00,0x01,0x24,0x0e,0x00,0xe1,0x16,0x2a,0x08,0xbe,0x02,
- 0x0c,0x00,0x20,0x14,0x21,0x88,0xc0,0x03,0x01,0x00,0x0f,0x24,
- 0x10,0x00,0xaf,0xaf,0x21,0x20,0x20,0x02,0x02,0x00,0x05,0x24,
- 0xb0,0x00,0xa6,0x27,0x94,0x2e,0x00,0x0c,0x21,0x38,0x00,0x00,
- 0x01,0x00,0x31,0x26,0x2a,0x08,0xb1,0x02,0xf7,0xff,0x20,0x10,
- 0x01,0x00,0x0f,0x24,0x21,0x88,0xc0,0x03,0x2a,0x08,0xbe,0x02,
- 0xff,0xff,0x20,0x14,0x2a,0x08,0xbe,0x02,0x01,0x00,0x73,0x26,
- 0xfc,0x80,0x84,0x8f,0x29,0x2a,0x00,0x0c,0x21,0x28,0x60,0x02,
- 0x21,0x20,0x20,0x02,0x21,0x28,0xe0,0x02,0xb0,0x00,0xa6,0x27,
- 0x21,0x38,0x00,0x00,0x94,0x2e,0x00,0x0c,0x10,0x00,0xa0,0xaf,
- 0x0b,0x00,0x40,0x10,0x30,0x01,0xab,0x93,0x30,0x01,0xb8,0x93,
- 0x38,0x01,0xa8,0x27,0x80,0xc8,0x18,0x00,0x21,0x80,0x28,0x03,
- 0x78,0xfe,0x09,0x8e,0x00,0x00,0x00,0x00,0x01,0x00,0x2a,0x25,
- 0x09,0x00,0x00,0x10,0x78,0xfe,0x0a,0xae,0x30,0x01,0xab,0x93,
- 0x38,0x01,0xad,0x27,0x80,0x60,0x0b,0x00,0x21,0x80,0x8d,0x01,
- 0x64,0xfe,0x0e,0x8e,0x00,0x00,0x00,0x00,0x01,0x00,0xcf,0x25,
- 0x64,0xfe,0x0f,0xae,0x00,0x00,0x98,0x92,0x00,0x00,0x00,0x00,
- 0x07,0x00,0x00,0x17,0x00,0x00,0x00,0x00,0x01,0x00,0x31,0x26,
- 0x2a,0x08,0xb1,0x02,0xdc,0xff,0x20,0x10,0x00,0x00,0x00,0x00,
- 0xd7,0xff,0x00,0x10,0x21,0x88,0xc0,0x03,0x29,0x2a,0x00,0x0c,
- 0x88,0x85,0x84,0x27,0xa0,0x85,0x84,0x27,0x29,0x2a,0x00,0x0c,
- 0x21,0x28,0x60,0x02,0x30,0x01,0xa5,0x93,0x64,0xfe,0x06,0x8e,
- 0x78,0xfe,0x07,0x8e,0x29,0x2a,0x00,0x0c,0xb4,0x85,0x84,0x27,
- 0xf3,0xfd,0x00,0x10,0x00,0x00,0x80,0xa2,0x01,0xa0,0x04,0x3c,
- 0x01,0xa0,0x05,0x3c,0xa0,0xdd,0xa5,0x24,0x08,0x28,0x00,0x0c,
- 0x00,0x80,0x84,0x24,0x21,0x80,0x40,0x00,0x29,0x2a,0x00,0x0c,
- 0xd8,0x85,0x84,0x27,0x01,0x00,0x73,0x26,0xfc,0x80,0x84,0x8f,
- 0x29,0x2a,0x00,0x0c,0x21,0x28,0x60,0x02,0x29,0x2a,0x00,0x0c,
- 0xf4,0x85,0x84,0x27,0x0f,0xa3,0x02,0x3c,0x23,0x01,0x03,0x3c,
- 0x67,0x45,0x63,0x34,0xf8,0xff,0x42,0x34,0xdc,0xfe,0x19,0x3c,
- 0x00,0x00,0x43,0xac,0x98,0xba,0x39,0x37,0x10,0xa3,0x08,0x3c,
- 0xf0,0xf0,0x09,0x3c,0xfc,0xff,0x19,0xad,0xf0,0xf0,0x29,0x35,
- 0x08,0xa3,0x0a,0x3c,0x0f,0x0f,0x0b,0x3c,0xf8,0xff,0x49,0xad,
- 0x0f,0x0f,0x6b,0x35,0x08,0xa3,0x0c,0x3c,0xfc,0xff,0x8b,0xad,
- 0x00,0x00,0x4d,0x8c,0x00,0x00,0x00,0x00,0x07,0x00,0x6d,0x14,
- 0x00,0x00,0x00,0x00,0x10,0xa3,0x0e,0x3c,0xfc,0xff,0xcf,0x8d,
- 0xdc,0xfe,0x01,0x3c,0x98,0xba,0x21,0x34,0x14,0x00,0xe1,0x11,
- 0x00,0x00,0x00,0x00,0x01,0xa0,0x04,0x3c,0x01,0xa0,0x05,0x3c,
- 0xa0,0xdd,0xa5,0x24,0x08,0x28,0x00,0x0c,0x00,0x80,0x84,0x24,
- 0x05,0x00,0x02,0x16,0x00,0x00,0x00,0x00,0x65,0x2a,0x00,0x0c,
- 0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x10,0x00,0x00,0x98,0x92,
- 0x29,0x2a,0x00,0x0c,0x04,0x86,0x84,0x27,0x05,0x00,0x00,0x10,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x92,0x00,0x00,0x00,0x00,
- 0xcd,0xff,0x00,0x13,0x00,0x00,0x00,0x00,0x29,0x2a,0x00,0x0c,
- 0x2c,0x86,0x84,0x27,0x44,0x86,0x84,0x27,0x29,0x2a,0x00,0x0c,
- 0x21,0x28,0x60,0x02,0x70,0x00,0xa5,0x8f,0x84,0x00,0xa6,0x8f,
- 0x29,0x2a,0x00,0x0c,0x58,0x86,0x84,0x27,0xac,0xfd,0x00,0x10,
- 0x00,0x00,0x80,0xa2,0xc8,0x97,0x82,0x8f,0x00,0xa1,0x03,0x3c,
- 0x00,0x80,0x63,0x34,0x01,0x00,0x59,0x38,0x00,0x00,0x79,0xa4,
- 0x00,0xa3,0x08,0x3c,0x00,0x00,0x00,0x8d,0x78,0x86,0x84,0x27,
- 0x29,0x2a,0x00,0x0c,0x00,0x00,0x62,0xa4,0xa1,0xfd,0x00,0x10,
- 0x00,0xa3,0x02,0x3c,0x29,0x2a,0x00,0x0c,0x98,0x86,0x84,0x27,
- 0x14,0x23,0x00,0x0c,0x10,0x00,0x04,0x24,0xff,0xff,0x01,0x24,
- 0x99,0xfd,0x41,0x10,0x21,0x90,0x40,0x00,0x29,0x2a,0x00,0x0c,
- 0xa8,0x86,0x84,0x27,0x30,0x01,0xa9,0x93,0x64,0x00,0x01,0x24,
- 0x05,0x00,0x21,0x11,0x04,0x00,0x01,0x24,0x03,0x00,0x21,0x11,
- 0x44,0x00,0x01,0x24,0x23,0x00,0x21,0x15,0x30,0x01,0xac,0x93,
- 0x30,0x01,0xaa,0x93,0x64,0x00,0x01,0x24,0x03,0x00,0x41,0x15,
- 0x21,0xf0,0x00,0x00,0x02,0x00,0x00,0x10,0x04,0x00,0x03,0x24,
- 0x10,0x00,0x03,0x24,0x87,0xfd,0x60,0x18,0x00,0xa3,0x02,0x3c,
- 0x00,0x89,0x1e,0x00,0x21,0x80,0x51,0x02,0x21,0x28,0x00,0x02,
- 0x29,0x2a,0x00,0x0c,0xac,0x86,0x84,0x27,0x00,0xa0,0x01,0x3c,
- 0x25,0x20,0x01,0x02,0x6d,0x2a,0x00,0x0c,0x10,0x00,0x05,0x24,
- 0x29,0x2a,0x00,0x0c,0xb4,0x86,0x84,0x27,0x30,0x01,0xab,0x93,
- 0x64,0x00,0x01,0x24,0x01,0x00,0xde,0x27,0x03,0x00,0x61,0x15,
- 0x10,0x00,0x31,0x26,0x02,0x00,0x00,0x10,0x04,0x00,0x03,0x24,
- 0x10,0x00,0x03,0x24,0x2a,0x08,0xc3,0x03,0xed,0xff,0x20,0x14,
- 0x21,0x80,0x51,0x02,0x6f,0xfd,0x00,0x10,0x00,0xa3,0x02,0x3c,
- 0x30,0x01,0xac,0x93,0x72,0x00,0x01,0x24,0x07,0x00,0x81,0x15,
- 0x00,0xa0,0x01,0x3c,0x25,0x68,0x41,0x02,0x00,0x00,0xa5,0x91,
- 0x29,0x2a,0x00,0x0c,0xb8,0x86,0x84,0x27,0x65,0xfd,0x00,0x10,
- 0x00,0xa3,0x02,0x3c,0x30,0x01,0xae,0x93,0x12,0x00,0x01,0x24,
- 0x07,0x00,0xc1,0x15,0x00,0xa0,0x01,0x3c,0x25,0x78,0x41,0x02,
- 0x00,0x00,0xe5,0x95,0x29,0x2a,0x00,0x0c,0xc0,0x86,0x84,0x27,
- 0x5b,0xfd,0x00,0x10,0x00,0xa3,0x02,0x3c,0x30,0x01,0xb8,0x93,
- 0x52,0x00,0x01,0x24,0x07,0x00,0x01,0x17,0x00,0xa0,0x01,0x3c,
- 0x25,0xc8,0x41,0x02,0x00,0x00,0x25,0x8f,0x29,0x2a,0x00,0x0c,
- 0xc8,0x86,0x84,0x27,0x51,0xfd,0x00,0x10,0x00,0xa3,0x02,0x3c,
- 0x30,0x01,0xa8,0x93,0x66,0x00,0x01,0x24,0x03,0x00,0x01,0x11,
- 0x77,0x00,0x01,0x24,0x06,0x00,0x01,0x15,0x30,0x01,0xa9,0x93,
- 0x29,0x2a,0x00,0x0c,0xd0,0x86,0x84,0x27,0x0d,0x00,0x00,0x10,
- 0x00,0x00,0x00,0x00,0x30,0x01,0xa9,0x93,0x06,0x00,0x01,0x24,
- 0x03,0x00,0x21,0x11,0x17,0x00,0x01,0x24,0x05,0x00,0x21,0x15,
- 0x00,0x00,0x00,0x00,0x29,0x2a,0x00,0x0c,0xd4,0x86,0x84,0x27,
- 0x03,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x29,0x2a,0x00,0x0c,
- 0xd8,0x86,0x84,0x27,0x29,0x2a,0x00,0x0c,0xdc,0x86,0x84,0x27,
- 0x14,0x23,0x00,0x0c,0x10,0x00,0x04,0x24,0x21,0x80,0x40,0x00,
- 0x29,0x2a,0x00,0x0c,0xf0,0x86,0x84,0x27,0x30,0x01,0xaa,0x93,
- 0x66,0x00,0x01,0x24,0x05,0x00,0x41,0x11,0x06,0x00,0x01,0x24,
- 0x03,0x00,0x41,0x11,0x46,0x00,0x01,0x24,0x0b,0x00,0x41,0x15,
- 0x21,0xa8,0x00,0x00,0x29,0x2a,0x00,0x0c,0xf4,0x86,0x84,0x27,
- 0x14,0x23,0x00,0x0c,0x10,0x00,0x04,0x24,0xff,0xff,0x55,0x24,
- 0x29,0x2a,0x00,0x0c,0x04,0x87,0x84,0x27,0x03,0x00,0x00,0x10,
- 0x00,0xa0,0x01,0x3c,0x21,0xa8,0x00,0x00,0x00,0xa0,0x01,0x3c,
- 0x25,0x90,0x41,0x02,0x30,0x01,0xab,0x93,0x77,0x00,0x01,0x24,
- 0x03,0x00,0x61,0x11,0x66,0x00,0x01,0x24,0x05,0x00,0x61,0x15,
- 0x30,0x01,0xad,0x93,0x21,0x60,0x55,0x02,0x0e,0x00,0x00,0x10,
- 0x00,0x00,0x90,0xa1,0x30,0x01,0xad,0x93,0x17,0x00,0x01,0x24,
- 0x03,0x00,0xa1,0x11,0x06,0x00,0x01,0x24,0x06,0x00,0xa1,0x15,
- 0x80,0xc0,0x15,0x00,0x40,0x70,0x15,0x00,0x21,0x78,0x4e,0x02,
- 0x04,0x00,0x00,0x10,0x00,0x00,0xf0,0xa5,0x80,0xc0,0x15,0x00,
- 0x21,0xc8,0x58,0x02,0x00,0x00,0x30,0xaf,0xff,0xff,0xb5,0x26,
- 0xe9,0xff,0xa1,0x06,0x30,0x01,0xab,0x93,0x05,0xfd,0x00,0x10,
- 0x00,0xa3,0x02,0x3c,0xc9,0x2a,0x00,0x0c,0x21,0x20,0x00,0x00,
- 0x00,0xa3,0x08,0x3c,0x88,0x01,0x02,0xad,0x01,0x00,0x09,0x24,
- 0x00,0xa3,0x0a,0x3c,0xfc,0xfc,0x00,0x10,0xc8,0x01,0x49,0xa1,
- 0x00,0xa3,0x04,0x3c,0x00,0xa3,0x05,0x3c,0x10,0x40,0xa5,0x34,
- 0x00,0x10,0x84,0x34,0x21,0x30,0x00,0x00,0x21,0x38,0x00,0x00,
- 0xfe,0x2b,0x00,0x0c,0x10,0x00,0xa0,0xaf,0x00,0xa3,0x0b,0x3c,
- 0x88,0x01,0x62,0xad,0x01,0x00,0x0c,0x24,0x00,0xa3,0x0d,0x3c,
- 0xee,0xfc,0x00,0x10,0xc8,0x01,0xac,0xa1,0x00,0xa3,0x0e,0x3c,
- 0x88,0x01,0xde,0x8d,0x10,0x00,0xa0,0xaf,0x21,0x28,0x00,0x00,
- 0x21,0x30,0x00,0x00,0x21,0x38,0x00,0x00,0x94,0x2e,0x00,0x0c,
- 0x21,0x20,0xc0,0x03,0x00,0xa3,0x0f,0x3c,0x88,0x01,0xe2,0xad,
- 0x01,0x00,0x18,0x24,0x00,0xa3,0x19,0x3c,0xe0,0xfc,0x00,0x10,
- 0xc8,0x01,0x38,0xa3,0x00,0xa3,0x02,0x3c,0x88,0x01,0x42,0x34,
- 0x00,0x00,0x5e,0x8c,0x00,0x00,0x55,0x8c,0xff,0xff,0x08,0x24,
- 0x02,0xaa,0x15,0x00,0xff,0x00,0xb5,0x32,0xff,0x00,0xde,0x33,
- 0x21,0x20,0xc0,0x03,0x23,0x28,0x15,0x01,0x10,0x00,0xa0,0xaf,
- 0x21,0x30,0x00,0x00,0x94,0x2e,0x00,0x0c,0x01,0x00,0x07,0x24,
- 0x00,0xa3,0x09,0x3c,0x88,0x01,0x22,0xad,0x01,0x00,0x0a,0x24,
- 0x00,0xa3,0x0b,0x3c,0xcc,0xfc,0x00,0x10,0xc8,0x01,0x6a,0xa1,
- 0x30,0x01,0xac,0x93,0x49,0x00,0x01,0x24,0x1d,0xff,0x81,0x11,
- 0x4a,0x00,0x81,0x2d,0x4d,0x00,0x20,0x10,0x33,0x00,0x01,0x24,
- 0x5d,0xfe,0x81,0x11,0x34,0x00,0x81,0x2d,0x25,0x00,0x20,0x10,
- 0x17,0x00,0x01,0x24,0x21,0xff,0x81,0x11,0x18,0x00,0x81,0x2d,
- 0x11,0x00,0x20,0x10,0x06,0x00,0x01,0x24,0x1d,0xff,0x81,0x11,
- 0x07,0x00,0x81,0x2d,0x05,0x00,0x20,0x10,0x04,0x00,0x01,0x24,
- 0x19,0xff,0x81,0x11,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x10,
- 0x00,0x00,0x00,0x00,0x30,0x01,0xad,0x93,0x12,0x00,0x01,0x24,
- 0x13,0xff,0xa1,0x11,0x00,0x00,0x00,0x00,0x29,0x2a,0x00,0x0c,
- 0x08,0x87,0x84,0x27,0xaf,0xfc,0x00,0x10,0x00,0xa3,0x02,0x3c,
- 0x30,0x01,0xae,0x93,0x31,0x00,0x01,0x24,0x95,0xfd,0xc1,0x11,
- 0x32,0x00,0xc1,0x2d,0x05,0x00,0x20,0x10,0x24,0x00,0x01,0x24,
- 0xed,0xfd,0xc1,0x11,0x00,0x00,0x00,0x00,0xf3,0xff,0x00,0x10,
- 0x00,0x00,0x00,0x00,0x30,0x01,0xaf,0x93,0x32,0x00,0x01,0x24,
- 0xad,0xfd,0xe1,0x11,0x00,0x00,0x00,0x00,0xed,0xff,0x00,0x10,
- 0x00,0x00,0x00,0x00,0x30,0x01,0xb8,0x93,0x41,0x00,0x01,0x24,
- 0xe4,0xfc,0x01,0x13,0x42,0x00,0x01,0x2f,0x0f,0x00,0x20,0x10,
- 0x35,0x00,0x01,0x24,0xa4,0xfe,0x01,0x13,0x36,0x00,0x01,0x2f,
- 0x05,0x00,0x20,0x10,0x34,0x00,0x01,0x24,0x2b,0xfe,0x01,0x13,
- 0x00,0x00,0x00,0x00,0xdf,0xff,0x00,0x10,0x00,0x00,0x00,0x00,
- 0x30,0x01,0xb9,0x93,0x3f,0x00,0x01,0x24,0xba,0xfc,0x21,0x13,
- 0x00,0x00,0x00,0x00,0xd9,0xff,0x00,0x10,0x00,0x00,0x00,0x00,
- 0x30,0x01,0xa8,0x93,0x45,0x00,0x01,0x24,0xce,0xfc,0x01,0x11,
- 0x46,0x00,0x01,0x2d,0x05,0x00,0x20,0x10,0x44,0x00,0x01,0x24,
- 0xe3,0xfe,0x01,0x11,0x00,0x00,0x00,0x00,0xcf,0xff,0x00,0x10,
- 0x00,0x00,0x00,0x00,0x30,0x01,0xa9,0x93,0x46,0x00,0x01,0x24,
- 0xdd,0xfe,0x21,0x11,0x00,0x00,0x00,0x00,0xc9,0xff,0x00,0x10,
- 0x00,0x00,0x00,0x00,0x30,0x01,0xaa,0x93,0x72,0x00,0x01,0x24,
- 0xd7,0xfe,0x41,0x11,0x73,0x00,0x41,0x2d,0x23,0x00,0x20,0x10,
- 0x64,0x00,0x01,0x24,0xd3,0xfe,0x41,0x11,0x65,0x00,0x41,0x2d,
- 0x0f,0x00,0x20,0x10,0x57,0x00,0x01,0x24,0xcf,0xfe,0x41,0x11,
- 0x58,0x00,0x41,0x2d,0x05,0x00,0x20,0x10,0x52,0x00,0x01,0x24,
- 0xcb,0xfe,0x41,0x11,0x00,0x00,0x00,0x00,0xb7,0xff,0x00,0x10,
- 0x00,0x00,0x00,0x00,0x30,0x01,0xab,0x93,0x61,0x00,0x01,0x24,
- 0xae,0xfc,0x61,0x11,0x00,0x00,0x00,0x00,0xb1,0xff,0x00,0x10,
- 0x00,0x00,0x00,0x00,0x30,0x01,0xac,0x93,0x66,0x00,0x01,0x24,
- 0xbf,0xfe,0x81,0x11,0x67,0x00,0x81,0x2d,0x05,0x00,0x20,0x10,
- 0x65,0x00,0x01,0x24,0xa4,0xfc,0x81,0x11,0x00,0x00,0x00,0x00,
- 0xa7,0xff,0x00,0x10,0x00,0x00,0x00,0x00,0x30,0x01,0xad,0x93,
- 0x69,0x00,0x01,0x24,0xa9,0xfe,0xa1,0x11,0x00,0x00,0x00,0x00,
- 0xa1,0xff,0x00,0x10,0x00,0x00,0x00,0x00,0x30,0x01,0xae,0x93,
- 0x83,0x00,0x01,0x24,0x61,0xff,0xc1,0x11,0x84,0x00,0xc1,0x2d,
- 0x0f,0x00,0x20,0x10,0x81,0x00,0x01,0x24,0x47,0xff,0xc1,0x11,
- 0x82,0x00,0xc1,0x2d,0x05,0x00,0x20,0x10,0x77,0x00,0x01,0x24,
- 0xa7,0xfe,0xc1,0x11,0x00,0x00,0x00,0x00,0x93,0xff,0x00,0x10,
- 0x00,0x00,0x00,0x00,0x30,0x01,0xaf,0x93,0x82,0x00,0x01,0x24,
- 0x46,0xff,0xe1,0x11,0x00,0xa3,0x04,0x3c,0x8d,0xff,0x00,0x10,
- 0x00,0x00,0x00,0x00,0x30,0x01,0xb8,0x93,0x84,0x00,0x01,0x24,
- 0x5c,0xff,0x01,0x13,0x00,0xa3,0x02,0x3c,0x87,0xff,0x00,0x10,
- 0x00,0x00,0x00,0x00,0x24,0x00,0xbf,0x8f,0x38,0x01,0xbd,0x27,
- 0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x00,0xa3,0x03,0x3c,
- 0x80,0x01,0x63,0x34,0x4a,0x00,0x6e,0x94,0xff,0x00,0x84,0x30,
- 0x21,0x78,0x6e,0x00,0x50,0x00,0xe4,0xa1,0x4a,0x00,0x78,0x94,
- 0x4e,0x00,0x68,0x94,0x01,0x00,0x19,0x27,0x4c,0x00,0x69,0x94,
- 0x24,0x10,0x28,0x03,0xff,0xff,0x42,0x30,0x02,0x00,0x49,0x10,
- 0x00,0x00,0x00,0x00,0x4a,0x00,0x62,0xa4,0x08,0x00,0xe0,0x03,
- 0x00,0x00,0x00,0x00,0xe8,0xff,0xbd,0x27,0x14,0x00,0xbf,0xaf,
- 0x00,0xa3,0x0e,0x3c,0x80,0x01,0xcf,0x8d,0x01,0x00,0x01,0x24,
- 0x09,0x00,0xe1,0x15,0x00,0x00,0x00,0x00,0x30,0x87,0x83,0x97,
- 0x00,0x00,0x00,0x00,0x21,0x10,0x60,0x00,0xff,0xff,0x63,0x24,
- 0x03,0x00,0x40,0x10,0xff,0xff,0x63,0x30,0x0f,0x00,0x00,0x10,
- 0x30,0x87,0x83,0xa7,0x2c,0x87,0x98,0x97,0x00,0xa1,0x08,0x3c,
- 0x01,0x00,0x19,0x27,0x2c,0x87,0x99,0xa7,0xe8,0x03,0x03,0x24,
- 0x00,0x40,0x00,0xa5,0x30,0x87,0x83,0xa7,0xe1,0x21,0x00,0x0c,
- 0x21,0x20,0x00,0x00,0x01,0x00,0x09,0x24,0x00,0xa3,0x0a,0x3c,
- 0x80,0x01,0x49,0xad,0xe1,0x21,0x00,0x0c,0x01,0x04,0x04,0x24,
- 0x14,0x00,0xbf,0x8f,0x18,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,
- 0x00,0x00,0x00,0x00,0x00,0xa3,0x02,0x3c,0xcc,0x01,0x42,0x34,
- 0x00,0x00,0x4e,0x94,0x00,0x00,0x00,0x00,0x0d,0x00,0xc0,0x11,
- 0x00,0x00,0x00,0x00,0x00,0xa3,0x03,0x3c,0xca,0x01,0x63,0x34,
- 0x00,0x00,0x6f,0x94,0x00,0x00,0x58,0x94,0x00,0x00,0x00,0x00,
- 0x06,0x00,0xf8,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x79,0x94,
- 0x00,0x00,0x48,0x94,0x00,0x00,0x00,0x00,0xfc,0xff,0x28,0x17,
- 0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x2b,0x08,0x85,0x00,0x08,0x00,0x20,0x10,
- 0x21,0x18,0x00,0x00,0x00,0x00,0x8e,0x8c,0x04,0x00,0x84,0x24,
- 0x21,0x10,0x6e,0x00,0x2b,0x78,0x43,0x00,0x2b,0x08,0x85,0x00,
- 0xfa,0xff,0x20,0x14,0x21,0x18,0x4f,0x00,0x08,0x00,0xe0,0x03,
- 0x21,0x10,0x60,0x00,0xe8,0xff,0xbd,0x27,0x00,0xa3,0x07,0x3c,
- 0x30,0x0c,0xe7,0x34,0x14,0x00,0xbf,0xaf,0x00,0x00,0xee,0x90,
- 0x00,0x00,0x00,0x00,0x3c,0x00,0xc0,0x11,0x14,0x00,0xbf,0x8f,
- 0x00,0xa3,0x0f,0x3c,0x32,0x0c,0xf8,0x91,0x00,0x00,0x00,0x00,
- 0x37,0x00,0x00,0x17,0x14,0x00,0xbf,0x8f,0x00,0xa3,0x03,0x3c,
- 0x34,0x0c,0x63,0x34,0x00,0x00,0x65,0x8c,0xff,0x3f,0x01,0x3c,
- 0x00,0xa3,0x06,0x3c,0xff,0xff,0x21,0x34,0x38,0x0c,0xc6,0x34,
- 0x24,0x28,0xa1,0x00,0x00,0x00,0xd9,0x94,0x00,0x80,0x01,0x3c,
- 0x25,0x28,0xa1,0x00,0x81,0x00,0x21,0x2f,0x03,0x00,0x20,0x14,
- 0x00,0x00,0x00,0x00,0x80,0x00,0x08,0x24,0x00,0x00,0xc8,0xa4,
- 0x00,0x00,0xe2,0x90,0x1d,0x00,0x00,0x10,0x01,0x00,0x01,0x24,
- 0x00,0xa3,0x04,0x3c,0x00,0x00,0xc2,0x94,0x21,0x18,0xa0,0x00,
- 0x05,0x00,0x00,0x10,0x3a,0x0c,0x84,0x34,0x00,0xa3,0x03,0x3c,
- 0x00,0x00,0xc2,0x94,0x3a,0x0c,0x63,0x34,0x21,0x20,0xa0,0x00,
- 0xff,0xff,0x42,0x24,0x07,0x00,0x40,0x04,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x69,0x90,0xff,0xff,0x42,0x24,0x01,0x00,0x63,0x24,
- 0x01,0x00,0x84,0x24,0xfb,0xff,0x41,0x04,0xff,0xff,0x89,0xa0,
- 0x0f,0x00,0x00,0x10,0x00,0x00,0xe0,0xa0,0x00,0x00,0xe0,0xa0,
- 0x00,0x00,0x6a,0x8c,0x00,0x00,0x00,0x00,0x09,0xf8,0x40,0x01,
- 0x00,0x00,0x00,0x00,0x09,0x00,0x00,0x10,0x14,0x00,0xbf,0x8f,
- 0x01,0x00,0x01,0x24,0xe3,0xff,0x41,0x10,0x02,0x00,0x01,0x24,
- 0xe6,0xff,0x41,0x10,0x03,0x00,0x01,0x24,0xf3,0xff,0x41,0x10,
- 0x00,0x00,0x00,0x00,0x14,0x00,0xbf,0x8f,0x18,0x00,0xbd,0x27,
- 0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xe8,0xff,0xbd,0x27,0x14,0x00,0xbf,0xaf,
- 0x13,0x00,0x00,0x10,0xff,0x00,0x84,0x30,0x40,0x87,0x82,0x93,
- 0x00,0x00,0x00,0x00,0x01,0x00,0x4e,0x30,0x1a,0x00,0xc0,0x15,
- 0x14,0x00,0xbf,0x8f,0x01,0x00,0x42,0x34,0xff,0x00,0x42,0x30,
- 0x11,0x00,0x00,0x10,0x40,0x87,0x82,0xa3,0x40,0x87,0x82,0x93,
- 0x00,0x00,0x00,0x00,0x02,0x00,0x4f,0x30,0x11,0x00,0xe0,0x15,
- 0x14,0x00,0xbf,0x8f,0x02,0x00,0x42,0x34,0xff,0x00,0x42,0x30,
- 0x08,0x00,0x00,0x10,0x40,0x87,0x82,0xa3,0x0a,0x00,0x01,0x24,
- 0xec,0xff,0x81,0x10,0x0d,0x00,0x01,0x24,0xf3,0xff,0x81,0x10,
- 0x00,0x00,0x00,0x00,0x21,0x10,0x00,0x00,0x40,0x87,0x82,0xa3,
- 0xc1,0x27,0x00,0x0c,0x00,0x00,0x00,0x00,0xf3,0x27,0x00,0x0c,
- 0x00,0x00,0x00,0x00,0x14,0x00,0xbf,0x8f,0x18,0x00,0xbd,0x27,
- 0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0xe8,0xff,0xbd,0x27,
- 0x14,0x00,0xbf,0xaf,0x5c,0x28,0x00,0x0c,0xff,0x00,0x84,0x30,
- 0x14,0x00,0xbf,0x8f,0x18,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,
- 0x00,0x00,0x00,0x00,0xa0,0xff,0xbd,0x27,0x18,0x00,0xb0,0xaf,
- 0x1c,0x00,0xb1,0xaf,0x21,0x88,0xe0,0x00,0x24,0x00,0xbf,0xaf,
- 0x20,0x00,0xb2,0xaf,0x68,0x00,0xa6,0xaf,0x04,0x00,0xa0,0x14,
- 0x21,0x80,0x00,0x00,0x70,0x00,0xa2,0x8f,0x0a,0x00,0x00,0x10,
- 0x5b,0x00,0xb2,0x27,0x70,0x00,0xa2,0x8f,0x00,0x00,0x00,0x00,
- 0x06,0x00,0x41,0x04,0x5b,0x00,0xb2,0x27,0x2d,0x00,0x10,0x24,
- 0x02,0x00,0x20,0x12,0x23,0x10,0x02,0x00,0xff,0xff,0x31,0x26,
- 0x5b,0x00,0xb2,0x27,0x5b,0x00,0xa0,0xa3,0x44,0x87,0x83,0x27,
- 0x1b,0x00,0x44,0x00,0xff,0xff,0x52,0x26,0x10,0x70,0x00,0x00,
- 0x21,0x78,0x6e,0x00,0x00,0x00,0xf8,0x91,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x58,0xa2,0x02,0x00,0x80,0x14,0x00,0x00,0x00,0x00,
- 0x0d,0x00,0x07,0x00,0x02,0x00,0x20,0x12,0x00,0x00,0x00,0x00,
- 0xff,0xff,0x31,0x26,0x1b,0x00,0x44,0x00,0x12,0x10,0x00,0x00,
- 0x02,0x00,0x80,0x14,0x00,0x00,0x00,0x00,0x0d,0x00,0x07,0x00,
- 0xed,0xff,0x40,0x14,0x00,0x00,0x00,0x00,0x68,0x00,0xb9,0x93,
- 0x01,0x00,0x01,0x24,0x09,0x00,0x21,0x17,0x00,0x00,0x00,0x00,
- 0x21,0x10,0x20,0x02,0x06,0x00,0x40,0x10,0xff,0xff,0x31,0x26,
- 0x81,0x28,0x00,0x0c,0x20,0x00,0x04,0x24,0x21,0x10,0x20,0x02,
- 0xfc,0xff,0x40,0x14,0xff,0xff,0x31,0x26,0x04,0x00,0x00,0x12,
- 0x68,0x00,0xa8,0x93,0x81,0x28,0x00,0x0c,0x21,0x20,0x00,0x02,
- 0x68,0x00,0xa8,0x93,0x02,0x00,0x01,0x24,0x09,0x00,0x01,0x15,
- 0x00,0x00,0x00,0x00,0x21,0x10,0x20,0x02,0x06,0x00,0x40,0x10,
- 0xff,0xff,0x31,0x26,0x81,0x28,0x00,0x0c,0x30,0x00,0x04,0x24,
- 0x21,0x10,0x20,0x02,0xfc,0xff,0x40,0x14,0xff,0xff,0x31,0x26,
- 0x00,0x00,0x50,0x92,0x00,0x00,0x00,0x00,0x09,0x00,0x00,0x12,
- 0x68,0x00,0xa9,0x93,0x21,0x20,0x00,0x02,0x81,0x28,0x00,0x0c,
- 0x01,0x00,0x52,0x26,0x00,0x00,0x50,0x92,0x00,0x00,0x00,0x00,
- 0xfb,0xff,0x00,0x16,0x21,0x20,0x00,0x02,0x68,0x00,0xa9,0x93,
- 0x03,0x00,0x01,0x24,0x0a,0x00,0x21,0x15,0x24,0x00,0xbf,0x8f,
- 0x21,0x10,0x20,0x02,0x06,0x00,0x40,0x10,0xff,0xff,0x31,0x26,
- 0x81,0x28,0x00,0x0c,0x20,0x00,0x04,0x24,0x21,0x10,0x20,0x02,
- 0xfc,0xff,0x40,0x14,0xff,0xff,0x31,0x26,0x24,0x00,0xbf,0x8f,
- 0x18,0x00,0xb0,0x8f,0x1c,0x00,0xb1,0x8f,0x20,0x00,0xb2,0x8f,
- 0x08,0x00,0xe0,0x03,0x60,0x00,0xbd,0x27,0x00,0x00,0x82,0x90,
- 0x21,0x18,0x00,0x00,0x05,0x00,0x40,0x10,0x01,0x00,0x84,0x24,
- 0x00,0x00,0x82,0x90,0x01,0x00,0x63,0x24,0xfd,0xff,0x40,0x14,
- 0x01,0x00,0x84,0x24,0x08,0x00,0xe0,0x03,0x21,0x10,0x60,0x00,
- 0xd8,0xff,0xbd,0x27,0x20,0x00,0xb2,0xaf,0x21,0x90,0xc0,0x00,
- 0x24,0x00,0xbf,0xaf,0x1c,0x00,0xb1,0xaf,0x28,0x00,0xa4,0xaf,
- 0x21,0x88,0xa0,0x00,0x18,0x00,0xb0,0xaf,0xed,0x28,0x00,0x0c,
- 0x21,0x20,0x40,0x02,0x2a,0x08,0x51,0x00,0x03,0x00,0x20,0x10,
- 0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x10,0x23,0x88,0x22,0x02,
- 0x21,0x88,0x00,0x00,0x28,0x00,0xae,0x93,0x01,0x00,0x01,0x24,
- 0x0a,0x00,0xc1,0x15,0x28,0x00,0xaf,0x93,0x21,0x10,0x20,0x02,
- 0x06,0x00,0x40,0x10,0xff,0xff,0x31,0x26,0x81,0x28,0x00,0x0c,
- 0x20,0x00,0x04,0x24,0x21,0x10,0x20,0x02,0xfc,0xff,0x40,0x14,
- 0xff,0xff,0x31,0x26,0x28,0x00,0xaf,0x93,0x02,0x00,0x01,0x24,
- 0x09,0x00,0xe1,0x15,0x00,0x00,0x00,0x00,0x21,0x10,0x20,0x02,
- 0x06,0x00,0x40,0x10,0xff,0xff,0x31,0x26,0x81,0x28,0x00,0x0c,
- 0x30,0x00,0x04,0x24,0x21,0x10,0x20,0x02,0xfc,0xff,0x40,0x14,
- 0xff,0xff,0x31,0x26,0x00,0x00,0x50,0x92,0x00,0x00,0x00,0x00,
- 0x09,0x00,0x00,0x12,0x28,0x00,0xb8,0x93,0x21,0x20,0x00,0x02,
- 0x81,0x28,0x00,0x0c,0x01,0x00,0x52,0x26,0x00,0x00,0x50,0x92,
- 0x00,0x00,0x00,0x00,0xfb,0xff,0x00,0x16,0x21,0x20,0x00,0x02,
- 0x28,0x00,0xb8,0x93,0x03,0x00,0x01,0x24,0x0a,0x00,0x01,0x17,
- 0x24,0x00,0xbf,0x8f,0x21,0x10,0x20,0x02,0x06,0x00,0x40,0x10,
- 0xff,0xff,0x31,0x26,0x81,0x28,0x00,0x0c,0x20,0x00,0x04,0x24,
- 0x21,0x10,0x20,0x02,0xfc,0xff,0x40,0x14,0xff,0xff,0x31,0x26,
- 0x24,0x00,0xbf,0x8f,0x18,0x00,0xb0,0x8f,0x1c,0x00,0xb1,0x8f,
- 0x20,0x00,0xb2,0x8f,0x08,0x00,0xe0,0x03,0x28,0x00,0xbd,0x27,
- 0xc0,0xff,0xbd,0x27,0x40,0x00,0xa4,0xaf,0x40,0x00,0xae,0x8f,
- 0x24,0x00,0xbf,0xaf,0x44,0x00,0xa5,0xaf,0x01,0x00,0xcf,0x91,
- 0x21,0x40,0x00,0x00,0x21,0x38,0x00,0x00,0xdd,0x00,0xe0,0x11,
- 0x01,0x00,0x02,0x24,0x01,0x00,0xc9,0x25,0x00,0x00,0x23,0x91,
- 0x62,0x00,0x04,0x24,0x35,0x00,0x05,0x24,0x31,0x00,0x06,0x24,
- 0x2d,0x00,0x0a,0x24,0x30,0x00,0x0b,0x24,0x33,0x00,0x0c,0x24,
- 0x32,0x00,0x0d,0x24,0x34,0x00,0x1f,0x24,0x6d,0x00,0x00,0x10,
- 0x21,0x10,0x60,0x00,0x25,0x00,0x04,0x24,0x81,0x28,0x00,0x0c,
- 0x2c,0x00,0xa9,0xaf,0x2c,0x00,0xa9,0x8f,0xce,0x00,0x00,0x10,
- 0x01,0x00,0x22,0x25,0x21,0x20,0x00,0x00,0x21,0x28,0x00,0x00,
- 0x58,0x87,0x86,0x27,0xf7,0x28,0x00,0x0c,0x2c,0x00,0xa9,0xaf,
- 0x2c,0x00,0xa9,0x8f,0xc6,0x00,0x00,0x10,0x01,0x00,0x22,0x25,
- 0x44,0x00,0xa4,0x93,0x81,0x28,0x00,0x0c,0x2c,0x00,0xa9,0xaf,
- 0x2c,0x00,0xa9,0x8f,0xc0,0x00,0x00,0x10,0x01,0x00,0x22,0x25,
- 0x44,0x00,0xb8,0x8f,0x02,0x00,0x04,0x24,0x21,0x28,0x00,0x00,
- 0x21,0x30,0x00,0x01,0x2c,0x00,0xa9,0xaf,0x89,0x28,0x00,0x0c,
- 0x10,0x00,0xb8,0xaf,0x2c,0x00,0xa9,0x8f,0x81,0x28,0x00,0x0c,
- 0x42,0x00,0x04,0x24,0x2c,0x00,0xa9,0x8f,0xb3,0x00,0x00,0x10,
- 0x01,0x00,0x22,0x25,0x44,0x00,0xb9,0x8f,0x08,0x00,0x04,0x24,
- 0x21,0x28,0x00,0x00,0x21,0x30,0x00,0x01,0x2c,0x00,0xa9,0xaf,
- 0x89,0x28,0x00,0x0c,0x10,0x00,0xb9,0xaf,0x2c,0x00,0xa9,0x8f,
- 0x81,0x28,0x00,0x0c,0x51,0x00,0x04,0x24,0x2c,0x00,0xa9,0x8f,
- 0xa6,0x00,0x00,0x10,0x01,0x00,0x22,0x25,0x44,0x00,0xaf,0x8f,
- 0x0a,0x00,0x04,0x24,0x01,0x00,0x05,0x24,0x21,0x30,0x00,0x01,
- 0x2c,0x00,0xa9,0xaf,0x89,0x28,0x00,0x0c,0x10,0x00,0xaf,0xaf,
- 0x2c,0x00,0xa9,0x8f,0x9c,0x00,0x00,0x10,0x01,0x00,0x22,0x25,
- 0x44,0x00,0xae,0x8f,0x0a,0x00,0x04,0x24,0x21,0x28,0x00,0x00,
- 0x21,0x30,0x00,0x01,0x2c,0x00,0xa9,0xaf,0x89,0x28,0x00,0x0c,
- 0x10,0x00,0xae,0xaf,0x2c,0x00,0xa9,0x8f,0x92,0x00,0x00,0x10,
- 0x01,0x00,0x22,0x25,0x21,0x20,0x00,0x00,0x21,0x28,0x00,0x00,
- 0x64,0x87,0x86,0x27,0x34,0x00,0xa7,0xaf,0x38,0x00,0xa8,0xa3,
- 0xf7,0x28,0x00,0x0c,0x2c,0x00,0xa9,0xaf,0x34,0x00,0xa7,0x8f,
- 0x38,0x00,0xa8,0x93,0x2c,0x00,0xa9,0x8f,0x00,0x00,0x00,0x00,
- 0x44,0x00,0xb8,0x8f,0x10,0x00,0x04,0x24,0x21,0x28,0x00,0x00,
- 0x21,0x30,0x00,0x01,0x2c,0x00,0xa9,0xaf,0x89,0x28,0x00,0x0c,
- 0x10,0x00,0xb8,0xaf,0x2c,0x00,0xa9,0x8f,0x7d,0x00,0x00,0x10,
- 0x01,0x00,0x22,0x25,0x44,0x00,0xa6,0x8f,0x21,0x20,0x00,0x01,
- 0x21,0x28,0xe0,0x00,0xf7,0x28,0x00,0x0c,0x2c,0x00,0xa9,0xaf,
- 0x2c,0x00,0xa9,0x8f,0x75,0x00,0x00,0x10,0x01,0x00,0x22,0x25,
- 0x6c,0x00,0x00,0x10,0x03,0x00,0x08,0x24,0x03,0x00,0x00,0x15,
- 0x80,0xc8,0x07,0x00,0x02,0x00,0x08,0x24,0x80,0xc8,0x07,0x00,
- 0x21,0xc8,0x27,0x03,0x40,0xc8,0x19,0x00,0x21,0x38,0x23,0x03,
- 0x63,0x00,0x00,0x15,0xd0,0xff,0xe7,0x24,0x61,0x00,0x00,0x10,
- 0x01,0x00,0x08,0x24,0xa7,0xff,0x44,0x10,0x63,0x00,0x41,0x2c,
- 0x3e,0x00,0x20,0x10,0x6f,0x00,0x01,0x24,0xf3,0xff,0x45,0x10,
- 0x36,0x00,0x41,0x2c,0x1f,0x00,0x20,0x10,0x39,0x00,0x01,0x24,
- 0xef,0xff,0x46,0x10,0x32,0x00,0x41,0x2c,0x0e,0x00,0x20,0x10,
- 0x00,0x00,0x00,0x00,0xe6,0xff,0x4a,0x10,0x2e,0x00,0x41,0x2c,
- 0x05,0x00,0x20,0x10,0x25,0x00,0x01,0x24,0x84,0xff,0x41,0x10,
- 0x25,0x00,0x04,0x24,0x04,0x00,0x00,0x10,0x40,0x00,0xa2,0x8f,
- 0xe0,0xff,0x4b,0x10,0x00,0x00,0x00,0x00,0x40,0x00,0xa2,0x8f,
- 0x4f,0x00,0x00,0x10,0x01,0x00,0x42,0x24,0xde,0xff,0x4c,0x10,
- 0x34,0x00,0x41,0x2c,0x05,0x00,0x20,0x10,0x00,0x00,0x00,0x00,
- 0xdb,0xff,0x4d,0x10,0x80,0xc8,0x07,0x00,0xf7,0xff,0x00,0x10,
- 0x40,0x00,0xa2,0x8f,0xd7,0xff,0x5f,0x10,0x80,0xc8,0x07,0x00,
- 0xf3,0xff,0x00,0x10,0x40,0x00,0xa2,0x8f,0x39,0x00,0x01,0x24,
- 0xd1,0xff,0x41,0x10,0x3a,0x00,0x41,0x2c,0x0e,0x00,0x20,0x10,
- 0x37,0x00,0x01,0x24,0xcd,0xff,0x41,0x10,0x38,0x00,0x41,0x2c,
- 0x05,0x00,0x20,0x10,0x36,0x00,0x01,0x24,0xca,0xff,0x41,0x10,
- 0x80,0xc8,0x07,0x00,0xe6,0xff,0x00,0x10,0x40,0x00,0xa2,0x8f,
- 0x38,0x00,0x01,0x24,0xc5,0xff,0x41,0x10,0x80,0xc8,0x07,0x00,
- 0xe1,0xff,0x00,0x10,0x40,0x00,0xa2,0x8f,0x58,0x00,0x01,0x24,
- 0xa8,0xff,0x41,0x10,0x59,0x00,0x41,0x2c,0xdb,0xff,0x20,0x10,
- 0x45,0x00,0x01,0x24,0x5e,0xff,0x41,0x10,0x21,0x20,0x00,0x00,
- 0xd8,0xff,0x00,0x10,0x40,0x00,0xa2,0x8f,0x6f,0x00,0x01,0x24,
- 0x73,0xff,0x41,0x10,0x70,0x00,0x41,0x2c,0x0e,0x00,0x20,0x10,
- 0x64,0x00,0x01,0x24,0x7c,0xff,0x41,0x10,0x65,0x00,0x41,0x2c,
- 0x05,0x00,0x20,0x10,0x63,0x00,0x01,0x24,0x59,0xff,0x41,0x10,
- 0x44,0x00,0xa4,0x93,0xcb,0xff,0x00,0x10,0x40,0x00,0xa2,0x8f,
- 0x6c,0x00,0x01,0x24,0x11,0x00,0x41,0x10,0x00,0x00,0x00,0x00,
- 0xc6,0xff,0x00,0x10,0x40,0x00,0xa2,0x8f,0x75,0x00,0x01,0x24,
- 0x78,0xff,0x41,0x10,0x76,0x00,0x41,0x2c,0x05,0x00,0x20,0x10,
- 0x73,0x00,0x01,0x24,0x94,0xff,0x41,0x10,0x44,0x00,0xa6,0x8f,
- 0xbd,0xff,0x00,0x10,0x40,0x00,0xa2,0x8f,0x78,0x00,0x01,0x24,
- 0x7a,0xff,0x41,0x10,0x21,0x20,0x00,0x00,0xb8,0xff,0x00,0x10,
- 0x40,0x00,0xa2,0x8f,0x01,0x00,0x23,0x91,0x01,0x00,0x29,0x25,
- 0x2f,0xff,0x60,0x14,0x00,0x00,0x00,0x00,0x40,0x00,0xa2,0x8f,
- 0x00,0x00,0x00,0x00,0x01,0x00,0x42,0x24,0x24,0x00,0xbf,0x8f,
- 0x40,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,
- 0xb8,0xff,0xbd,0x27,0x20,0x00,0xb4,0xaf,0x48,0x00,0xae,0x27,
- 0xfc,0xff,0x14,0x24,0x03,0x00,0xcf,0x25,0x24,0x00,0xbf,0xaf,
- 0x18,0x00,0xb0,0xaf,0x1c,0x00,0xb1,0xaf,0x48,0x00,0xa4,0xaf,
- 0x4c,0x00,0xa5,0xaf,0x50,0x00,0xa6,0xaf,0x54,0x00,0xa7,0xaf,
- 0x24,0x10,0xf4,0x01,0x00,0x00,0x50,0x8c,0x04,0x00,0x42,0x24,
- 0x00,0x00,0x04,0x92,0x21,0x88,0x40,0x00,0x25,0x00,0x80,0x10,
- 0x24,0x00,0xbf,0x8f,0x30,0x00,0xb2,0xaf,0x2c,0x00,0xb3,0xaf,
- 0x45,0x00,0x13,0x24,0x25,0x00,0x12,0x24,0x21,0x10,0x80,0x00,
- 0x14,0x00,0x52,0x14,0x00,0x00,0x00,0x00,0x01,0x00,0x02,0x92,
- 0x00,0x00,0x00,0x00,0x04,0x00,0x42,0x12,0x21,0x20,0x00,0x02,
- 0x07,0x00,0x62,0x16,0x03,0x00,0x38,0x26,0x21,0x20,0x00,0x02,
- 0x3c,0x29,0x00,0x0c,0x21,0x28,0x00,0x00,0x0b,0x00,0x00,0x10,
- 0x21,0x80,0x40,0x00,0x03,0x00,0x38,0x26,0x24,0x88,0x14,0x03,
- 0x00,0x00,0x25,0x8e,0x04,0x00,0x31,0x26,0x3c,0x29,0x00,0x0c,
- 0x21,0x20,0x00,0x02,0x03,0x00,0x00,0x10,0x21,0x80,0x40,0x00,
- 0x81,0x28,0x00,0x0c,0x01,0x00,0x10,0x26,0x00,0x00,0x04,0x92,
- 0x00,0x00,0x00,0x00,0xe5,0xff,0x80,0x14,0x00,0x00,0x00,0x00,
- 0x30,0x00,0xb2,0x8f,0x2c,0x00,0xb3,0x8f,0x00,0x00,0x00,0x00,
- 0x24,0x00,0xbf,0x8f,0x18,0x00,0xb0,0x8f,0x1c,0x00,0xb1,0x8f,
- 0x20,0x00,0xb4,0x8f,0x08,0x00,0xe0,0x03,0x48,0x00,0xbd,0x27,
- 0xe8,0xff,0xbd,0x27,0x14,0x00,0xbf,0xaf,0x29,0x2a,0x00,0x0c,
- 0x68,0x87,0x84,0x27,0x14,0x00,0xbf,0x8f,0x18,0x00,0xbd,0x27,
- 0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0xc0,0xff,0xbd,0x27,
- 0x14,0x00,0xb1,0xaf,0x21,0x88,0xa0,0x00,0x18,0x00,0xb2,0xaf,
- 0x21,0x90,0x80,0x00,0x24,0x00,0xbf,0xaf,0x20,0x00,0xb4,0xaf,
- 0x03,0x00,0x20,0x1e,0x1c,0x00,0xb3,0xaf,0x05,0x00,0x00,0x10,
- 0x01,0x00,0x11,0x24,0x1a,0x00,0x21,0x2a,0x03,0x00,0x20,0x14,
- 0x21,0x98,0x20,0x02,0x19,0x00,0x11,0x24,0x21,0x98,0x20,0x02,
- 0x21,0x10,0x20,0x02,0x21,0xa0,0x40,0x02,0x0d,0x00,0x40,0x10,
- 0xff,0xff,0x31,0x26,0x2c,0x00,0xb0,0xaf,0x70,0x87,0x90,0x27,
- 0x00,0x00,0x45,0x92,0x21,0x20,0x00,0x02,0x29,0x2a,0x00,0x0c,
- 0xff,0x00,0xa5,0x30,0x21,0x10,0x20,0x02,0x01,0x00,0x52,0x26,
- 0xf9,0xff,0x40,0x14,0xff,0xff,0x31,0x26,0x2c,0x00,0xb0,0x8f,
- 0x00,0x00,0x00,0x00,0x11,0x00,0x61,0x2a,0x18,0x00,0x20,0x10,
- 0x24,0x00,0xbf,0x8f,0x5c,0x28,0x00,0x0c,0x20,0x00,0x04,0x24,
- 0x21,0x10,0x60,0x02,0x12,0x00,0x40,0x10,0xff,0xff,0x73,0x26,
- 0x00,0x00,0x84,0x92,0x00,0x00,0x00,0x00,0x20,0x00,0x81,0x2c,
- 0x07,0x00,0x20,0x14,0x7f,0x00,0x81,0x2c,0x05,0x00,0x20,0x10,
- 0x00,0x00,0x00,0x00,0x5c,0x28,0x00,0x0c,0x00,0x00,0x00,0x00,
- 0x04,0x00,0x00,0x10,0x21,0x10,0x60,0x02,0x5c,0x28,0x00,0x0c,
- 0x2e,0x00,0x04,0x24,0x21,0x10,0x60,0x02,0x01,0x00,0x94,0x26,
- 0xf0,0xff,0x40,0x14,0xff,0xff,0x73,0x26,0x24,0x00,0xbf,0x8f,
- 0x14,0x00,0xb1,0x8f,0x18,0x00,0xb2,0x8f,0x1c,0x00,0xb3,0x8f,
- 0x20,0x00,0xb4,0x8f,0x08,0x00,0xe0,0x03,0x40,0x00,0xbd,0x27,
- 0xe0,0xff,0xbd,0x27,0x1c,0x00,0xbf,0xaf,0x18,0x00,0xb1,0xaf,
- 0x14,0x00,0xb0,0xaf,0x5c,0x28,0x00,0x0c,0x0d,0x00,0x04,0x24,
- 0x21,0x80,0x00,0x00,0x4e,0x00,0x11,0x24,0x5c,0x28,0x00,0x0c,
- 0x20,0x00,0x04,0x24,0x01,0x00,0x10,0x26,0xfc,0xff,0x11,0x16,
- 0x00,0x00,0x00,0x00,0x5c,0x28,0x00,0x0c,0x0d,0x00,0x04,0x24,
- 0x1c,0x00,0xbf,0x8f,0x14,0x00,0xb0,0x8f,0x18,0x00,0xb1,0x8f,
- 0x08,0x00,0xe0,0x03,0x20,0x00,0xbd,0x27,0x21,0x10,0x80,0x00,
- 0x04,0x00,0x40,0x10,0xff,0xff,0x84,0x24,0x21,0x10,0x80,0x00,
- 0xfe,0xff,0x40,0x14,0xff,0xff,0x84,0x24,0x08,0x00,0xe0,0x03,
- 0x00,0x00,0x00,0x00,0xc0,0xff,0xbd,0x27,0x2c,0x00,0xbf,0xaf,
- 0x28,0x00,0xb4,0xaf,0x20,0x00,0xb2,0xaf,0x24,0x00,0xb3,0xaf,
- 0x18,0x00,0xb0,0xaf,0x03,0x00,0x80,0x10,0x1c,0x00,0xb1,0xaf,
- 0xad,0x2a,0x00,0x0c,0x00,0x00,0x00,0x00,0x29,0x2a,0x00,0x0c,
- 0x78,0x87,0x84,0x27,0x34,0x00,0xa0,0xaf,0x00,0xa1,0x0e,0x3c,
- 0x00,0xa1,0x12,0x3c,0x00,0x40,0xc0,0xa5,0x0c,0x00,0x52,0x36,
- 0x63,0x00,0x10,0x24,0x00,0xa1,0x11,0x3c,0xd2,0x27,0x00,0x0c,
- 0x00,0x00,0x00,0x00,0xc1,0x2a,0x00,0x0c,0x0a,0x00,0x04,0x24,
- 0x34,0x00,0x0f,0x24,0x00,0x00,0x4f,0xa2,0xc1,0x2a,0x00,0x0c,
- 0x0a,0x00,0x04,0x24,0x10,0x00,0x18,0x24,0x00,0x00,0x38,0xa2,
- 0xc1,0x2a,0x00,0x0c,0x0a,0x00,0x04,0x24,0x10,0x00,0x19,0x24,
- 0x00,0x00,0x39,0xa2,0xc1,0x2a,0x00,0x0c,0x0a,0x00,0x04,0x24,
- 0xe2,0x00,0x08,0x24,0x00,0x00,0x48,0xa2,0xc1,0x2a,0x00,0x0c,
- 0x0a,0x00,0x04,0x24,0x00,0x00,0x29,0x92,0x00,0x00,0x00,0x00,
- 0x40,0x00,0x2a,0x31,0x05,0x00,0x40,0x11,0x2b,0x10,0x10,0x00,
- 0xff,0xff,0x10,0x26,0xe5,0xff,0x00,0x16,0x00,0x00,0x00,0x00,
- 0x2b,0x10,0x10,0x00,0x05,0x00,0x40,0x14,0x63,0x00,0x10,0x24,
- 0x08,0x00,0x0b,0x24,0x34,0x00,0xab,0xaf,0x29,0x2a,0x00,0x0c,
- 0x90,0x87,0x84,0x27,0x00,0xa1,0x13,0x3c,0x08,0x00,0x73,0x36,
- 0xff,0x00,0x14,0x24,0xd2,0x27,0x00,0x0c,0x00,0x00,0x00,0x00,
- 0xc1,0x2a,0x00,0x0c,0x0a,0x00,0x04,0x24,0xb4,0x00,0x0c,0x24,
- 0x00,0x00,0x4c,0xa2,0xc1,0x2a,0x00,0x0c,0x0a,0x00,0x04,0x24,
- 0x00,0x00,0x74,0xa2,0xc1,0x2a,0x00,0x0c,0x0a,0x00,0x04,0x24,
- 0x00,0x00,0x74,0xa2,0xc1,0x2a,0x00,0x0c,0x0a,0x00,0x04,0x24,
- 0xe8,0x00,0x0d,0x24,0x00,0x00,0x4d,0xa2,0xc1,0x2a,0x00,0x0c,
- 0x0a,0x00,0x04,0x24,0x00,0x00,0x6e,0x92,0x00,0x00,0x00,0x00,
- 0x40,0x00,0xcf,0x31,0x04,0x00,0xe0,0x11,0x00,0x00,0x00,0x00,
- 0xff,0xff,0x10,0x26,0xe7,0xff,0x00,0x16,0x00,0x00,0x00,0x00,
- 0x07,0x00,0x00,0x16,0x02,0x00,0x03,0x24,0x34,0x00,0xb8,0x8f,
- 0xac,0x87,0x84,0x27,0x08,0x00,0x19,0x37,0x29,0x2a,0x00,0x0c,
- 0x34,0x00,0xb9,0xaf,0x02,0x00,0x03,0x24,0xd2,0x27,0x00,0x0c,
- 0x3c,0x00,0xa3,0xaf,0x3c,0x00,0xa3,0x8f,0x00,0x00,0x00,0x00,
- 0x21,0x10,0x60,0x00,0xfa,0xff,0x40,0x14,0xff,0xff,0x63,0x24,
- 0xd8,0x00,0x08,0x24,0x00,0x00,0x48,0xa2,0xc1,0x2a,0x00,0x0c,
- 0x0a,0x00,0x04,0x24,0x00,0x00,0x70,0x92,0xc1,0x2a,0x00,0x0c,
- 0x0a,0x00,0x04,0x24,0x00,0x00,0x69,0x92,0x00,0x00,0x00,0x00,
- 0x05,0x00,0x89,0x16,0xff,0x00,0x01,0x24,0x04,0x00,0x01,0x16,
- 0x00,0xa1,0x0a,0x3c,0x29,0x2a,0x00,0x0c,0xc8,0x87,0x84,0x27,
- 0x00,0xa1,0x0a,0x3c,0x00,0x40,0x40,0xa5,0xe1,0x21,0x00,0x0c,
- 0x21,0x20,0x00,0x00,0x01,0x00,0x0b,0x24,0x00,0xa3,0x0c,0x3c,
- 0x80,0x01,0x8b,0xad,0xe1,0x21,0x00,0x0c,0x01,0x04,0x04,0x24,
- 0x00,0xa3,0x0d,0x3c,0x80,0x01,0xae,0x8d,0x01,0x00,0x01,0x24,
- 0x07,0x00,0xc1,0x11,0x06,0x00,0x03,0x3c,0x34,0x00,0xaf,0x8f,
- 0xe0,0x87,0x84,0x27,0x01,0x00,0xf8,0x35,0x29,0x2a,0x00,0x0c,
- 0x34,0x00,0xb8,0xaf,0x06,0x00,0x03,0x3c,0x7f,0x1a,0x63,0x34,
- 0xd2,0x27,0x00,0x0c,0x3c,0x00,0xa3,0xaf,0x00,0xa3,0x19,0x3c,
- 0x80,0x01,0x28,0x8f,0x3c,0x00,0xa3,0x8f,0x05,0x00,0x00,0x11,
- 0x00,0xa3,0x09,0x3c,0x21,0x10,0x60,0x00,0xf7,0xff,0x40,0x14,
- 0xff,0xff,0x63,0x24,0x00,0xa3,0x09,0x3c,0x80,0x01,0x2a,0x8d,
- 0x00,0x00,0x00,0x00,0x07,0x00,0x40,0x11,0x00,0xa1,0x0d,0x3c,
- 0x34,0x00,0xab,0x8f,0xfc,0x87,0x84,0x27,0x02,0x00,0x6c,0x35,
- 0x29,0x2a,0x00,0x0c,0x34,0x00,0xac,0xaf,0x00,0xa1,0x0d,0x3c,
- 0x00,0x40,0xa0,0xa5,0x63,0x00,0x10,0x24,0xd2,0x27,0x00,0x0c,
- 0x00,0x00,0x00,0x00,0xc1,0x2a,0x00,0x0c,0x0a,0x00,0x04,0x24,
- 0x34,0x00,0x0e,0x24,0x00,0x00,0x4e,0xa2,0xc1,0x2a,0x00,0x0c,
- 0x0a,0x00,0x04,0x24,0x00,0x00,0x34,0xa2,0xc1,0x2a,0x00,0x0c,
- 0x0a,0x00,0x04,0x24,0x00,0x00,0x34,0xa2,0xc1,0x2a,0x00,0x0c,
- 0x0a,0x00,0x04,0x24,0xe2,0x00,0x0f,0x24,0x00,0x00,0x4f,0xa2,
- 0xc1,0x2a,0x00,0x0c,0x0a,0x00,0x04,0x24,0x00,0x00,0x38,0x92,
- 0x00,0x00,0x00,0x00,0x40,0x00,0x19,0x33,0x05,0x00,0x20,0x13,
- 0x2b,0x10,0x10,0x00,0xff,0xff,0x10,0x26,0xe7,0xff,0x00,0x16,
- 0x00,0x00,0x00,0x00,0x2b,0x10,0x10,0x00,0x06,0x00,0x40,0x14,
- 0x63,0x00,0x10,0x24,0x34,0x00,0xa8,0x8f,0x1c,0x88,0x84,0x27,
- 0x08,0x00,0x09,0x35,0x29,0x2a,0x00,0x0c,0x34,0x00,0xa9,0xaf,
- 0xe1,0x21,0x00,0x0c,0x21,0x20,0x00,0x00,0x01,0x00,0x0a,0x24,
- 0x00,0xa3,0x0b,0x3c,0x80,0x01,0x6a,0xad,0xe1,0x21,0x00,0x0c,
- 0x01,0x04,0x04,0x24,0xc1,0x2a,0x00,0x0c,0x0a,0x00,0x04,0x24,
- 0xd2,0x27,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0xa3,0x0c,0x3c,
- 0x80,0x01,0x8d,0x8d,0x01,0x00,0x01,0x24,0x06,0x00,0xa1,0x11,
- 0x00,0x00,0x00,0x00,0x34,0x00,0xae,0x8f,0x38,0x88,0x84,0x27,
- 0x04,0x00,0xcf,0x35,0x29,0x2a,0x00,0x0c,0x34,0x00,0xaf,0xaf,
- 0xe1,0x21,0x00,0x0c,0x21,0x20,0x00,0x00,0x00,0xa1,0x18,0x3c,
- 0x00,0x40,0x00,0xa7,0xd2,0x27,0x00,0x0c,0x00,0x00,0x00,0x00,
- 0xc1,0x2a,0x00,0x0c,0x0a,0x00,0x04,0x24,0x34,0x00,0x19,0x24,
- 0x00,0x00,0x59,0xa2,0xc1,0x2a,0x00,0x0c,0x0a,0x00,0x04,0x24,
- 0xcc,0x00,0x08,0x24,0x00,0x00,0x28,0xa2,0xc1,0x2a,0x00,0x0c,
- 0x0a,0x00,0x04,0x24,0x1c,0x00,0x09,0x24,0x00,0x00,0x29,0xa2,
- 0xc1,0x2a,0x00,0x0c,0x0a,0x00,0x04,0x24,0xe2,0x00,0x0a,0x24,
- 0x00,0x00,0x4a,0xa2,0xc1,0x2a,0x00,0x0c,0x0a,0x00,0x04,0x24,
- 0x00,0x00,0x2b,0x92,0x00,0x00,0x00,0x00,0x40,0x00,0x6c,0x31,
- 0x05,0x00,0x80,0x11,0x2b,0x10,0x10,0x00,0xff,0xff,0x10,0x26,
- 0xe5,0xff,0x00,0x16,0x00,0x00,0x00,0x00,0x2b,0x10,0x10,0x00,
- 0x06,0x00,0x40,0x14,0x63,0x00,0x10,0x24,0x34,0x00,0xad,0x8f,
- 0x58,0x88,0x84,0x27,0x08,0x00,0xae,0x35,0x29,0x2a,0x00,0x0c,
- 0x34,0x00,0xae,0xaf,0xd2,0x27,0x00,0x0c,0x00,0x00,0x00,0x00,
- 0xc1,0x2a,0x00,0x0c,0x0a,0x00,0x04,0x24,0xb4,0x00,0x0f,0x24,
- 0x00,0x00,0x4f,0xa2,0xc1,0x2a,0x00,0x0c,0x0a,0x00,0x04,0x24,
- 0x00,0x00,0x74,0xa2,0xc1,0x2a,0x00,0x0c,0x0a,0x00,0x04,0x24,
- 0x00,0x00,0x74,0xa2,0xc1,0x2a,0x00,0x0c,0x0a,0x00,0x04,0x24,
- 0xe8,0x00,0x18,0x24,0x00,0x00,0x58,0xa2,0xc1,0x2a,0x00,0x0c,
- 0x0a,0x00,0x04,0x24,0x00,0x00,0x79,0x92,0x00,0x00,0x00,0x00,
- 0x40,0x00,0x28,0x33,0x04,0x00,0x00,0x11,0x00,0x00,0x00,0x00,
- 0xff,0xff,0x10,0x26,0xe7,0xff,0x00,0x16,0x00,0x00,0x00,0x00,
- 0x07,0x00,0x00,0x16,0x00,0xa1,0x0b,0x3c,0x34,0x00,0xa9,0x8f,
- 0x74,0x88,0x84,0x27,0x08,0x00,0x2a,0x35,0x29,0x2a,0x00,0x0c,
- 0x34,0x00,0xaa,0xaf,0x00,0xa1,0x0b,0x3c,0x00,0x40,0x60,0xa5,
- 0xe1,0x21,0x00,0x0c,0x21,0x20,0x00,0x00,0x01,0x00,0x0c,0x24,
- 0x00,0xa3,0x0d,0x3c,0x80,0x01,0xac,0xad,0xe1,0x21,0x00,0x0c,
- 0x01,0x04,0x04,0x24,0x34,0x00,0xae,0x8f,0x00,0x00,0x00,0x00,
- 0x04,0x00,0xc0,0x15,0x2c,0x00,0xbf,0x8f,0x65,0x2a,0x00,0x0c,
- 0x00,0x00,0x00,0x00,0x2c,0x00,0xbf,0x8f,0x34,0x00,0xa2,0x8f,
- 0x18,0x00,0xb0,0x8f,0x1c,0x00,0xb1,0x8f,0x20,0x00,0xb2,0x8f,
- 0x24,0x00,0xb3,0x8f,0x28,0x00,0xb4,0x8f,0x08,0x00,0xe0,0x03,
- 0x40,0x00,0xbd,0x27,0xb8,0xff,0xbd,0x27,0x50,0x00,0xa6,0xaf,
- 0x50,0x00,0xae,0x8f,0x40,0x00,0xb6,0xaf,0x3c,0x00,0xb5,0xaf,
- 0x21,0xa8,0xa0,0x00,0x21,0xb0,0x80,0x00,0x44,0x00,0xbf,0xaf,
- 0x38,0x00,0xb4,0xaf,0x30,0x00,0xb2,0xaf,0x34,0x00,0xb3,0xaf,
- 0x28,0x00,0xb0,0xaf,0x09,0x00,0xc0,0x11,0x2c,0x00,0xb1,0xaf,
- 0x03,0x00,0xe0,0x10,0x00,0x00,0x00,0x00,0xad,0x2a,0x00,0x0c,
- 0x00,0x00,0x00,0x00,0xbc,0x88,0x84,0x27,0x21,0x28,0xc0,0x02,
- 0x29,0x2a,0x00,0x0c,0x21,0x30,0xa0,0x02,0x2b,0x08,0xb6,0x02,
- 0x21,0xa0,0x00,0x00,0x05,0x00,0x20,0x14,0x21,0x80,0xc0,0x02,
- 0x04,0x00,0x10,0x26,0x2b,0x08,0xb0,0x02,0xfd,0xff,0x20,0x10,
- 0xfc,0xff,0x00,0xae,0xd2,0x27,0x00,0x0c,0x00,0x00,0x00,0x00,
- 0x58,0x00,0xaf,0x8f,0x00,0x00,0x00,0x00,0xa3,0x00,0xe0,0x11,
- 0x2b,0x08,0xb6,0x02,0x08,0x00,0x20,0x10,0x21,0x80,0xc0,0x02,
- 0x77,0x77,0x13,0x3c,0x33,0x33,0x12,0x3c,0x11,0x11,0x11,0x3c,
- 0x11,0x11,0x31,0x36,0x33,0x33,0x52,0x36,0x4e,0x00,0x00,0x10,
- 0x77,0x77,0x73,0x36,0x11,0x11,0x11,0x3c,0x33,0x33,0x12,0x3c,
- 0x77,0x77,0x13,0x3c,0x77,0x77,0x73,0x36,0x33,0x33,0x52,0x36,
- 0x11,0x11,0x31,0x36,0x00,0x00,0x18,0x8e,0x00,0x00,0x00,0x00,
- 0x08,0x00,0x00,0x13,0x00,0x00,0x00,0x00,0x90,0x88,0x84,0x8f,
- 0x00,0x00,0x07,0x8e,0x10,0x00,0xb0,0xaf,0x01,0x00,0x05,0x24,
- 0x29,0x2a,0x00,0x0c,0x21,0x30,0x00,0x00,0x01,0x00,0x94,0x36,
- 0x00,0x00,0x11,0xae,0x00,0x00,0x19,0x8e,0x00,0x00,0x00,0x00,
- 0x09,0x00,0x39,0x12,0x00,0x00,0x00,0x00,0x90,0x88,0x84,0x8f,
- 0x11,0x11,0x06,0x3c,0x00,0x00,0x07,0x8e,0x10,0x00,0xb0,0xaf,
- 0x11,0x11,0xc6,0x34,0x29,0x2a,0x00,0x0c,0x02,0x00,0x05,0x24,
- 0x02,0x00,0x94,0x36,0x00,0x00,0x12,0xae,0x00,0x00,0x08,0x8e,
- 0x00,0x00,0x00,0x00,0x09,0x00,0x48,0x12,0x00,0x00,0x00,0x00,
- 0x90,0x88,0x84,0x8f,0x33,0x33,0x06,0x3c,0x00,0x00,0x07,0x8e,
- 0x10,0x00,0xb0,0xaf,0x33,0x33,0xc6,0x34,0x29,0x2a,0x00,0x0c,
- 0x03,0x00,0x05,0x24,0x04,0x00,0x94,0x36,0x00,0x00,0x13,0xae,
- 0x00,0x00,0x09,0x8e,0x00,0x00,0x00,0x00,0x0a,0x00,0x69,0x12,
- 0xff,0xff,0x0a,0x24,0x90,0x88,0x84,0x8f,0x77,0x77,0x06,0x3c,
- 0x00,0x00,0x07,0x8e,0x10,0x00,0xb0,0xaf,0x77,0x77,0xc6,0x34,
- 0x29,0x2a,0x00,0x0c,0x04,0x00,0x05,0x24,0x08,0x00,0x94,0x36,
- 0xff,0xff,0x0a,0x24,0x00,0x00,0x0a,0xae,0x00,0x00,0x0b,0x8e,
- 0xff,0xff,0x01,0x24,0x09,0x00,0x61,0x11,0xff,0x00,0x0c,0x32,
- 0x90,0x88,0x84,0x8f,0x00,0x00,0x07,0x8e,0x10,0x00,0xb0,0xaf,
- 0x05,0x00,0x05,0x24,0x29,0x2a,0x00,0x0c,0xff,0xff,0x06,0x24,
- 0x10,0x00,0x94,0x36,0xff,0x00,0x0c,0x32,0x03,0x00,0x80,0x15,
- 0x00,0x00,0x00,0x00,0xd2,0x27,0x00,0x0c,0x00,0x00,0x00,0x00,
- 0x04,0x00,0x10,0x26,0x2b,0x08,0xb0,0x02,0xb9,0xff,0x20,0x10,
- 0x2b,0x08,0xb6,0x02,0xee,0x01,0x20,0x14,0x21,0x80,0xa0,0x02,
- 0x00,0x00,0x0d,0x8e,0xff,0xff,0x01,0x24,0x08,0x00,0xa1,0x11,
- 0x00,0x00,0x00,0x00,0x90,0x88,0x84,0x8f,0x00,0x00,0x07,0x8e,
- 0x10,0x00,0xb0,0xaf,0x06,0x00,0x05,0x24,0x29,0x2a,0x00,0x0c,
- 0xff,0xff,0x06,0x24,0x20,0x00,0x94,0x36,0x00,0x00,0x13,0xae,
- 0x00,0x00,0x0e,0x8e,0x00,0x00,0x00,0x00,0x09,0x00,0x6e,0x12,
- 0x00,0x00,0x00,0x00,0x90,0x88,0x84,0x8f,0x77,0x77,0x06,0x3c,
- 0x00,0x00,0x07,0x8e,0x10,0x00,0xb0,0xaf,0x77,0x77,0xc6,0x34,
- 0x29,0x2a,0x00,0x0c,0x07,0x00,0x05,0x24,0x40,0x00,0x94,0x36,
- 0x00,0x00,0x12,0xae,0x00,0x00,0x0f,0x8e,0x00,0x00,0x00,0x00,
- 0x09,0x00,0x4f,0x12,0x00,0x00,0x00,0x00,0x90,0x88,0x84,0x8f,
- 0x33,0x33,0x06,0x3c,0x00,0x00,0x07,0x8e,0x10,0x00,0xb0,0xaf,
- 0x33,0x33,0xc6,0x34,0x29,0x2a,0x00,0x0c,0x08,0x00,0x05,0x24,
- 0x80,0x00,0x94,0x36,0x00,0x00,0x11,0xae,0x00,0x00,0x18,0x8e,
- 0x00,0x00,0x00,0x00,0x09,0x00,0x38,0x12,0x00,0x00,0x00,0x00,
- 0x90,0x88,0x84,0x8f,0x11,0x11,0x06,0x3c,0x00,0x00,0x07,0x8e,
- 0x10,0x00,0xb0,0xaf,0x11,0x11,0xc6,0x34,0x29,0x2a,0x00,0x0c,
- 0x09,0x00,0x05,0x24,0x00,0x01,0x94,0x36,0x00,0x00,0x00,0xae,
- 0x00,0x00,0x19,0x8e,0x00,0x00,0x00,0x00,0x09,0x00,0x20,0x13,
- 0xff,0x00,0x08,0x32,0x90,0x88,0x84,0x8f,0x00,0x00,0x07,0x8e,
- 0x10,0x00,0xb0,0xaf,0x0a,0x00,0x05,0x24,0x29,0x2a,0x00,0x0c,
- 0x21,0x30,0x00,0x00,0x00,0x02,0x94,0x36,0xff,0x00,0x08,0x32,
- 0x03,0x00,0x00,0x15,0x00,0x00,0x00,0x00,0xd2,0x27,0x00,0x0c,
- 0x00,0x00,0x00,0x00,0xfc,0xff,0x10,0x26,0x2b,0x08,0x16,0x02,
- 0xba,0xff,0x20,0x10,0x00,0x00,0x00,0x00,0xa5,0x01,0x00,0x10,
- 0x00,0x00,0x00,0x00,0x2b,0x08,0xb6,0x02,0x37,0x00,0x20,0x14,
- 0x21,0x98,0xc0,0x02,0x01,0x00,0x12,0x24,0x21,0x88,0x00,0x00,
- 0x00,0x00,0x69,0x92,0x00,0x00,0x00,0x00,0x09,0x00,0x29,0x12,
- 0x25,0x80,0x32,0x02,0x90,0x88,0x84,0x8f,0x00,0x00,0x67,0x92,
- 0x10,0x00,0xb3,0xaf,0x01,0x00,0x05,0x24,0x29,0x2a,0x00,0x0c,
- 0x21,0x30,0x20,0x02,0x01,0x00,0x94,0x36,0x25,0x80,0x32,0x02,
- 0x00,0x00,0x70,0xa2,0x00,0x00,0x6a,0x92,0x00,0x00,0x00,0x00,
- 0x08,0x00,0x0a,0x12,0x00,0x00,0x00,0x00,0x90,0x88,0x84,0x8f,
- 0x00,0x00,0x67,0x92,0x10,0x00,0xb3,0xaf,0x02,0x00,0x05,0x24,
- 0x29,0x2a,0x00,0x0c,0x21,0x30,0x00,0x02,0x02,0x00,0x94,0x36,
- 0x00,0x00,0x71,0xa2,0x00,0x00,0x6b,0x92,0x00,0x00,0x00,0x00,
- 0x08,0x00,0x2b,0x12,0x00,0x00,0x00,0x00,0x90,0x88,0x84,0x8f,
- 0x00,0x00,0x67,0x92,0x10,0x00,0xb3,0xaf,0x03,0x00,0x05,0x24,
- 0x29,0x2a,0x00,0x0c,0x21,0x30,0x20,0x02,0x04,0x00,0x94,0x36,
- 0x40,0x90,0x12,0x00,0xff,0x00,0x52,0x32,0xff,0xff,0x51,0x26,
- 0x00,0x00,0x70,0xa2,0xd7,0xff,0x40,0x16,0xff,0x00,0x31,0x32,
- 0xff,0x00,0x6c,0x32,0x03,0x00,0x80,0x15,0x00,0x00,0x00,0x00,
- 0xd2,0x27,0x00,0x0c,0x00,0x00,0x00,0x00,0x01,0x00,0x73,0x26,
- 0x2b,0x08,0xb3,0x02,0xcd,0xff,0x20,0x10,0x01,0x00,0x12,0x24,
- 0x21,0x98,0xc0,0x02,0x2b,0x08,0xb6,0x02,0x1f,0x00,0x20,0x14,
- 0x2b,0x08,0xb6,0x02,0x01,0x00,0x12,0x24,0xfe,0x00,0x11,0x24,
- 0x00,0x00,0x6d,0x92,0x25,0x80,0x32,0x02,0x08,0x00,0x0d,0x12,
- 0x00,0x00,0x00,0x00,0x90,0x88,0x84,0x8f,0x00,0x00,0x67,0x92,
- 0x10,0x00,0xb3,0xaf,0x04,0x00,0x05,0x24,0x29,0x2a,0x00,0x0c,
- 0x21,0x30,0x00,0x02,0x08,0x00,0x94,0x36,0x00,0x00,0x71,0xa2,
- 0x40,0x88,0x11,0x00,0x40,0x90,0x12,0x00,0xff,0x00,0x52,0x32,
- 0x01,0x00,0x31,0x36,0x00,0x00,0x70,0xa2,0xee,0xff,0x40,0x16,
- 0xff,0x00,0x31,0x32,0xff,0x00,0x6e,0x32,0x03,0x00,0xc0,0x15,
- 0x00,0x00,0x00,0x00,0xd2,0x27,0x00,0x0c,0x00,0x00,0x00,0x00,
- 0x01,0x00,0x73,0x26,0x2b,0x08,0xb3,0x02,0xe3,0xff,0x20,0x10,
- 0x2b,0x08,0xb6,0x02,0x20,0x00,0x20,0x14,0x21,0x98,0xa0,0x02,
- 0x80,0x00,0x12,0x24,0x7f,0x00,0x11,0x24,0x00,0x00,0x6f,0x92,
- 0x25,0x80,0x32,0x02,0x08,0x00,0x0f,0x12,0x00,0x00,0x00,0x00,
- 0x90,0x88,0x84,0x8f,0x00,0x00,0x67,0x92,0x10,0x00,0xb3,0xaf,
- 0x05,0x00,0x05,0x24,0x29,0x2a,0x00,0x0c,0x21,0x30,0x00,0x02,
- 0x10,0x00,0x94,0x36,0x00,0x00,0x71,0xa2,0x00,0x00,0x70,0xa2,
- 0x00,0x00,0x71,0xa2,0x42,0x90,0x12,0x00,0xff,0x00,0x52,0x32,
- 0x42,0x88,0x11,0x00,0xee,0xff,0x40,0x16,0xff,0x00,0x31,0x32,
- 0xff,0x00,0x78,0x32,0x03,0x00,0x00,0x17,0x00,0x00,0x00,0x00,
- 0xd2,0x27,0x00,0x0c,0x00,0x00,0x00,0x00,0xff,0xff,0x73,0x26,
- 0x2b,0x08,0x76,0x02,0xe4,0xff,0x20,0x10,0x80,0x00,0x12,0x24,
- 0x21,0x98,0xa0,0x02,0x2b,0x08,0xb6,0x02,0x1b,0x00,0x20,0x14,
- 0x00,0x00,0x00,0x00,0x80,0x00,0x12,0x24,0x00,0x00,0x79,0x92,
- 0x00,0x00,0x00,0x00,0x08,0x00,0x20,0x13,0x00,0x00,0x00,0x00,
- 0x90,0x88,0x84,0x8f,0x00,0x00,0x67,0x92,0x10,0x00,0xb3,0xaf,
- 0x06,0x00,0x05,0x24,0x29,0x2a,0x00,0x0c,0x21,0x30,0x00,0x00,
- 0x20,0x00,0x94,0x36,0x00,0x00,0x72,0xa2,0x42,0x90,0x12,0x00,
- 0xff,0x00,0x52,0x32,0xf1,0xff,0x40,0x16,0x00,0x00,0x60,0xa2,
- 0xff,0x00,0x68,0x32,0x03,0x00,0x00,0x15,0x00,0x00,0x00,0x00,
- 0xd2,0x27,0x00,0x0c,0x00,0x00,0x00,0x00,0xff,0xff,0x73,0x26,
- 0x2b,0x08,0x76,0x02,0xe8,0xff,0x20,0x10,0x80,0x00,0x12,0x24,
- 0x00,0x44,0x13,0x3c,0x00,0x11,0x73,0x36,0x0f,0x00,0x12,0x24,
- 0x01,0x00,0x49,0x32,0x21,0x88,0x00,0x00,0x02,0x00,0x20,0x11,
- 0x21,0x80,0xc0,0x02,0x21,0x88,0x60,0x02,0x02,0x00,0x4a,0x32,
- 0x03,0x00,0x40,0x11,0x00,0x11,0x01,0x3c,0x00,0x44,0x21,0x34,
- 0x25,0x88,0x21,0x02,0x04,0x00,0x4b,0x32,0x03,0x00,0x60,0x11,
- 0x88,0x00,0x01,0x3c,0x22,0x00,0x21,0x34,0x25,0x88,0x21,0x02,
- 0x08,0x00,0x4c,0x32,0x03,0x00,0x80,0x11,0x22,0x00,0x01,0x3c,
- 0x88,0x00,0x21,0x34,0x25,0x88,0x21,0x02,0x2b,0x08,0xb6,0x02,
- 0x06,0x00,0x20,0x14,0x00,0x00,0x00,0x00,0x04,0x00,0x10,0x26,
- 0x2b,0x08,0xb0,0x02,0xfd,0xff,0x20,0x10,0xfc,0xff,0x11,0xae,
- 0x21,0x80,0xc0,0x02,0xd2,0x27,0x00,0x0c,0x00,0x00,0x00,0x00,
- 0x2b,0x08,0xb6,0x02,0x17,0x00,0x20,0x14,0x55,0xaa,0x01,0x3c,
- 0x00,0x00,0x0d,0x8e,0x00,0x00,0x00,0x00,0x09,0x00,0x2d,0x12,
- 0xff,0x00,0x0e,0x32,0x90,0x88,0x84,0x8f,0x00,0x00,0x07,0x8e,
- 0x10,0x00,0xb0,0xaf,0x07,0x00,0x05,0x24,0x29,0x2a,0x00,0x0c,
- 0x21,0x30,0x20,0x02,0x40,0x00,0x94,0x36,0xff,0x00,0x0e,0x32,
- 0x03,0x00,0xc0,0x15,0x00,0x00,0x00,0x00,0xd2,0x27,0x00,0x0c,
- 0x00,0x00,0x00,0x00,0x04,0x00,0x10,0x26,0x2b,0x08,0xb0,0x02,
- 0xed,0xff,0x20,0x10,0x00,0x00,0x00,0x00,0x21,0x80,0xc0,0x02,
- 0x55,0xaa,0x01,0x3c,0x55,0xaa,0x21,0x34,0x25,0x88,0x21,0x02,
- 0x2b,0x08,0xb6,0x02,0x06,0x00,0x20,0x14,0x00,0x00,0x00,0x00,
- 0x04,0x00,0x10,0x26,0x2b,0x08,0xb0,0x02,0xfd,0xff,0x20,0x10,
- 0xfc,0xff,0x11,0xae,0x21,0x80,0xc0,0x02,0xd2,0x27,0x00,0x0c,
- 0x00,0x00,0x00,0x00,0x2b,0x08,0xb6,0x02,0x17,0x00,0x20,0x14,
- 0xaa,0x55,0x01,0x3c,0x00,0x00,0x0f,0x8e,0x00,0x00,0x00,0x00,
- 0x09,0x00,0x2f,0x12,0xff,0x00,0x18,0x32,0x90,0x88,0x84,0x8f,
- 0x00,0x00,0x07,0x8e,0x10,0x00,0xb0,0xaf,0x08,0x00,0x05,0x24,
- 0x29,0x2a,0x00,0x0c,0x21,0x30,0x20,0x02,0x80,0x00,0x94,0x36,
- 0xff,0x00,0x18,0x32,0x03,0x00,0x00,0x17,0x00,0x00,0x00,0x00,
- 0xd2,0x27,0x00,0x0c,0x00,0x00,0x00,0x00,0x04,0x00,0x10,0x26,
- 0x2b,0x08,0xb0,0x02,0xed,0xff,0x20,0x10,0x00,0x00,0x00,0x00,
- 0x21,0x80,0xc0,0x02,0xaa,0x55,0x01,0x3c,0xaa,0x55,0x21,0x34,
- 0x24,0x88,0x21,0x02,0x2b,0x08,0xb6,0x02,0x06,0x00,0x20,0x14,
- 0x00,0x00,0x00,0x00,0x04,0x00,0x10,0x26,0x2b,0x08,0xb0,0x02,
- 0xfd,0xff,0x20,0x10,0xfc,0xff,0x11,0xae,0x21,0x80,0xc0,0x02,
- 0xd2,0x27,0x00,0x0c,0x00,0x00,0x00,0x00,0x2b,0x08,0xb6,0x02,
- 0x15,0x00,0x20,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x19,0x8e,
- 0x00,0x00,0x00,0x00,0x09,0x00,0x39,0x12,0xff,0x00,0x08,0x32,
- 0x90,0x88,0x84,0x8f,0x00,0x00,0x07,0x8e,0x10,0x00,0xb0,0xaf,
- 0x09,0x00,0x05,0x24,0x29,0x2a,0x00,0x0c,0x21,0x30,0x20,0x02,
- 0x00,0x01,0x94,0x36,0xff,0x00,0x08,0x32,0x03,0x00,0x00,0x15,
- 0x00,0x00,0x00,0x00,0xd2,0x27,0x00,0x0c,0x00,0x00,0x00,0x00,
- 0x04,0x00,0x10,0x26,0x2b,0x08,0xb0,0x02,0xed,0xff,0x20,0x10,
- 0x00,0x00,0x00,0x00,0xff,0xff,0x52,0x26,0xff,0xff,0x01,0x24,
- 0x7f,0xff,0x41,0x16,0x01,0x00,0x49,0x32,0x00,0x88,0x13,0x3c,
- 0x00,0x22,0x73,0x36,0x0f,0x00,0x12,0x24,0x01,0x00,0x49,0x32,
- 0x21,0x88,0x00,0x00,0x02,0x00,0x20,0x11,0x21,0x80,0xc0,0x02,
- 0x21,0x88,0x60,0x02,0x02,0x00,0x4a,0x32,0x03,0x00,0x40,0x11,
- 0x00,0x22,0x01,0x3c,0x00,0x88,0x21,0x34,0x25,0x88,0x21,0x02,
- 0x04,0x00,0x4b,0x32,0x03,0x00,0x60,0x11,0x44,0x00,0x01,0x3c,
- 0x11,0x00,0x21,0x34,0x25,0x88,0x21,0x02,0x08,0x00,0x4c,0x32,
- 0x03,0x00,0x80,0x11,0x11,0x00,0x01,0x3c,0x44,0x00,0x21,0x34,
- 0x25,0x88,0x21,0x02,0x2b,0x08,0xb6,0x02,0x06,0x00,0x20,0x14,
- 0x00,0x00,0x00,0x00,0x04,0x00,0x10,0x26,0x2b,0x08,0xb0,0x02,
- 0xfd,0xff,0x20,0x10,0xfc,0xff,0x11,0xae,0x21,0x80,0xc0,0x02,
- 0xd2,0x27,0x00,0x0c,0x00,0x00,0x00,0x00,0x2b,0x08,0xb6,0x02,
- 0x17,0x00,0x20,0x14,0xaa,0x55,0x01,0x3c,0x00,0x00,0x0d,0x8e,
- 0x00,0x00,0x00,0x00,0x09,0x00,0x2d,0x12,0xff,0x00,0x0e,0x32,
- 0x90,0x88,0x84,0x8f,0x00,0x00,0x07,0x8e,0x10,0x00,0xb0,0xaf,
- 0x0a,0x00,0x05,0x24,0x29,0x2a,0x00,0x0c,0x21,0x30,0x20,0x02,
- 0x00,0x02,0x94,0x36,0xff,0x00,0x0e,0x32,0x03,0x00,0xc0,0x15,
- 0x00,0x00,0x00,0x00,0xd2,0x27,0x00,0x0c,0x00,0x00,0x00,0x00,
- 0x04,0x00,0x10,0x26,0x2b,0x08,0xb0,0x02,0xed,0xff,0x20,0x10,
- 0x00,0x00,0x00,0x00,0x21,0x80,0xc0,0x02,0xaa,0x55,0x01,0x3c,
- 0xaa,0x55,0x21,0x34,0x25,0x88,0x21,0x02,0x2b,0x08,0xb6,0x02,
- 0x06,0x00,0x20,0x14,0x00,0x00,0x00,0x00,0x04,0x00,0x10,0x26,
- 0x2b,0x08,0xb0,0x02,0xfd,0xff,0x20,0x10,0xfc,0xff,0x11,0xae,
- 0x21,0x80,0xc0,0x02,0xd2,0x27,0x00,0x0c,0x00,0x00,0x00,0x00,
- 0x2b,0x08,0xb6,0x02,0x17,0x00,0x20,0x14,0x55,0xaa,0x01,0x3c,
- 0x00,0x00,0x0f,0x8e,0x00,0x00,0x00,0x00,0x09,0x00,0x2f,0x12,
- 0xff,0x00,0x18,0x32,0x90,0x88,0x84,0x8f,0x00,0x00,0x07,0x8e,
- 0x10,0x00,0xb0,0xaf,0x0b,0x00,0x05,0x24,0x29,0x2a,0x00,0x0c,
- 0x21,0x30,0x20,0x02,0x00,0x02,0x94,0x36,0xff,0x00,0x18,0x32,
- 0x03,0x00,0x00,0x17,0x00,0x00,0x00,0x00,0xd2,0x27,0x00,0x0c,
- 0x00,0x00,0x00,0x00,0x04,0x00,0x10,0x26,0x2b,0x08,0xb0,0x02,
- 0xed,0xff,0x20,0x10,0x00,0x00,0x00,0x00,0x21,0x80,0xc0,0x02,
- 0x55,0xaa,0x01,0x3c,0x55,0xaa,0x21,0x34,0x24,0x88,0x21,0x02,
- 0x2b,0x08,0xb6,0x02,0x06,0x00,0x20,0x14,0x00,0x00,0x00,0x00,
- 0x04,0x00,0x10,0x26,0x2b,0x08,0xb0,0x02,0xfd,0xff,0x20,0x10,
- 0xfc,0xff,0x11,0xae,0x21,0x80,0xc0,0x02,0xd2,0x27,0x00,0x0c,
- 0x00,0x00,0x00,0x00,0x2b,0x08,0xb6,0x02,0x15,0x00,0x20,0x14,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x19,0x8e,0x00,0x00,0x00,0x00,
- 0x09,0x00,0x39,0x12,0xff,0x00,0x08,0x32,0x90,0x88,0x84,0x8f,
- 0x00,0x00,0x07,0x8e,0x10,0x00,0xb0,0xaf,0x0c,0x00,0x05,0x24,
- 0x29,0x2a,0x00,0x0c,0x21,0x30,0x20,0x02,0x00,0x02,0x94,0x36,
- 0xff,0x00,0x08,0x32,0x03,0x00,0x00,0x15,0x00,0x00,0x00,0x00,
- 0xd2,0x27,0x00,0x0c,0x00,0x00,0x00,0x00,0x04,0x00,0x10,0x26,
- 0x2b,0x08,0xb0,0x02,0xed,0xff,0x20,0x10,0x00,0x00,0x00,0x00,
- 0xff,0xff,0x52,0x26,0xff,0xff,0x01,0x24,0x7f,0xff,0x41,0x16,
- 0x01,0x00,0x49,0x32,0x08,0x00,0x80,0x16,0x44,0x00,0xbf,0x8f,
- 0x50,0x00,0xa9,0x8f,0x00,0x00,0x00,0x00,0x04,0x00,0x20,0x11,
- 0x44,0x00,0xbf,0x8f,0x65,0x2a,0x00,0x0c,0x00,0x00,0x00,0x00,
- 0x44,0x00,0xbf,0x8f,0x21,0x10,0x80,0x02,0x38,0x00,0xb4,0x8f,
- 0x28,0x00,0xb0,0x8f,0x2c,0x00,0xb1,0x8f,0x30,0x00,0xb2,0x8f,
- 0x34,0x00,0xb3,0x8f,0x3c,0x00,0xb5,0x8f,0x40,0x00,0xb6,0x8f,
- 0x08,0x00,0xe0,0x03,0x48,0x00,0xbd,0x27,0xf8,0xff,0xbd,0x27,
- 0x10,0x27,0x0e,0x24,0x04,0x00,0xae,0xaf,0x04,0x00,0xa2,0x8f,
- 0x04,0x00,0xaf,0x8f,0x00,0x00,0x00,0x00,0xff,0xff,0xf8,0x25,
- 0x0f,0x00,0x40,0x10,0x04,0x00,0xb8,0xaf,0x2c,0x00,0x99,0x90,
- 0x00,0x00,0x00,0x00,0x0b,0x00,0x20,0x13,0x00,0x00,0x00,0x00,
- 0x04,0x00,0xa2,0x8f,0x04,0x00,0xa8,0x8f,0x00,0x00,0x00,0x00,
- 0xff,0xff,0x09,0x25,0x05,0x00,0x40,0x10,0x04,0x00,0xa9,0xaf,
- 0x2c,0x00,0x8a,0x90,0x00,0x00,0x00,0x00,0xf7,0xff,0x40,0x15,
- 0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x08,0x00,0xbd,0x27,
- 0x28,0xff,0xbd,0x27,0xd8,0x00,0xa4,0xaf,0xd8,0x00,0xae,0x8f,
- 0x01,0xa1,0x01,0x3c,0x80,0x7b,0x0e,0x00,0x21,0xc0,0xe1,0x01,
- 0x44,0x00,0xb6,0xaf,0x01,0xa1,0x01,0x3c,0x4c,0x00,0xbf,0xaf,
- 0x48,0x00,0xb7,0xaf,0x40,0x00,0xb3,0xaf,0x3c,0x00,0xb0,0xaf,
- 0xdc,0x00,0xa5,0xaf,0xe0,0x00,0xa6,0xaf,0x21,0x08,0x2f,0x00,
- 0x88,0x00,0xb8,0xaf,0x8c,0x00,0xaf,0xaf,0xff,0x00,0x19,0x24,
- 0x00,0x00,0x39,0xa0,0x21,0xb0,0x00,0x00,0xf4,0x01,0x02,0x24,
- 0x04,0x00,0xd6,0x26,0xff,0xff,0xc2,0x16,0x04,0x00,0xd6,0x26,
- 0x88,0x00,0xa9,0x8f,0xd8,0x00,0xaa,0x8f,0x00,0x00,0x33,0x91,
- 0x06,0x00,0x40,0x11,0x1c,0x00,0x01,0x24,0x03,0x00,0x61,0x12,
- 0x20,0x00,0x01,0x24,0x03,0x00,0x61,0x16,0xd8,0x00,0xab,0x8f,
- 0xff,0x00,0x13,0x24,0xd8,0x00,0xab,0x8f,0x00,0xa3,0x01,0x3c,
- 0x21,0x08,0x2b,0x00,0xac,0x01,0x33,0xa0,0x00,0xa3,0x01,0x3c,
- 0xb0,0x01,0x21,0x34,0x21,0x60,0x61,0x01,0x00,0xa3,0x01,0x3c,
- 0x84,0x00,0xac,0xaf,0x21,0x08,0x2b,0x00,0xb0,0x01,0x20,0xa0,
- 0x00,0xa3,0x01,0x3c,0xb4,0x01,0x21,0x34,0x21,0x68,0x61,0x01,
- 0x00,0xa3,0x01,0x3c,0x80,0x00,0xad,0xaf,0x21,0x08,0x2b,0x00,
- 0xb4,0x01,0x20,0xa0,0x00,0xa3,0x01,0x3c,0xb8,0x01,0x21,0x34,
- 0x80,0x70,0x0b,0x00,0x21,0xc0,0xc1,0x01,0x00,0xa3,0x01,0x3c,
- 0x21,0x08,0x2e,0x00,0x7c,0x00,0xb8,0xaf,0xb8,0x01,0x20,0xac,
- 0x83,0xb8,0x13,0x00,0x10,0x00,0x19,0x24,0x3f,0x00,0xf7,0x32,
- 0x04,0x00,0x01,0x24,0xbc,0x00,0xa0,0xaf,0xa0,0x00,0xb9,0xaf,
- 0x08,0x00,0xe1,0x12,0x9c,0x00,0xa0,0xaf,0x06,0x00,0x01,0x24,
- 0x05,0x00,0xe1,0x12,0x0c,0x00,0x01,0x24,0x03,0x00,0xe1,0x12,
- 0x0e,0x00,0x01,0x24,0x04,0x00,0xe1,0x16,0x04,0x00,0x01,0x24,
- 0x08,0x00,0x0f,0x24,0xa0,0x00,0xaf,0xaf,0x04,0x00,0x01,0x24,
- 0x03,0x00,0xe1,0x12,0x0c,0x00,0x01,0x24,0x04,0x00,0xe1,0x16,
- 0x07,0x00,0x04,0x24,0x01,0x00,0x09,0x24,0x9c,0x00,0xa9,0xaf,
- 0x07,0x00,0x04,0x24,0x04,0x00,0xe4,0x16,0x08,0x00,0x03,0x24,
- 0x04,0x00,0x0a,0x24,0xa0,0x00,0xaa,0xaf,0x08,0x00,0x03,0x24,
- 0x03,0x00,0xe3,0x16,0x01,0x00,0x0c,0x24,0xa0,0x00,0xa3,0xaf,
- 0x01,0x00,0x0c,0x24,0x94,0x00,0xac,0xaf,0xde,0x07,0x00,0x10,
- 0x21,0x10,0xe0,0x02,0xdc,0x00,0xad,0x8f,0x60,0x00,0xb4,0xaf,
- 0x5c,0x00,0xb5,0xaf,0x04,0x00,0xa0,0x11,0x58,0x00,0xbe,0xaf,
- 0xf7,0xff,0x01,0x24,0xfa,0x00,0xa1,0x15,0xdc,0x00,0xac,0x8f,
- 0xd8,0x00,0xa5,0x8f,0x08,0x89,0x84,0x27,0x29,0x2a,0x00,0x0c,
- 0x21,0x30,0x60,0x02,0x8c,0x00,0xbe,0x8f,0x01,0xa1,0x01,0x3c,
- 0x00,0x08,0x21,0x34,0x21,0xf0,0xc1,0x03,0x7b,0x2e,0x00,0x0c,
- 0x21,0x20,0xc0,0x03,0x81,0x00,0x14,0x24,0x2c,0x00,0xd4,0xa3,
- 0x3c,0x00,0xcb,0x93,0x00,0x00,0x00,0x00,0x0e,0x00,0x60,0x15,
- 0xf0,0x01,0x10,0x24,0x0f,0x00,0x02,0x3c,0x40,0x42,0x42,0x34,
- 0x0f,0x00,0x16,0x3c,0x08,0x00,0x40,0x10,0x3f,0x42,0xd6,0x36,
- 0x3c,0x00,0xd8,0x93,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x17,
- 0xf0,0x01,0x10,0x24,0x21,0x10,0xc0,0x02,0xfa,0xff,0x40,0x14,
- 0xff,0xff,0xd6,0x26,0xf0,0x01,0x10,0x24,0xfc,0xff,0x10,0x26,
- 0xff,0xff,0x00,0x16,0xfc,0xff,0x10,0x26,0xed,0x00,0x0e,0x24,
- 0x10,0x00,0xce,0xa3,0x10,0x00,0xd9,0x93,0xed,0x00,0x01,0x24,
- 0xc2,0x00,0x21,0x17,0x21,0xa8,0x00,0x00,0x80,0x00,0xaf,0x8f,
- 0x54,0x00,0xb1,0xaf,0x50,0x00,0xb2,0xaf,0x00,0x00,0xe9,0x91,
- 0xff,0x00,0x0c,0x24,0x01,0x00,0x2a,0x25,0x00,0x00,0xea,0xa1,
- 0x10,0x00,0xc0,0xa3,0x10,0x00,0xd2,0x93,0x10,0x00,0xcc,0xa3,
- 0x10,0x00,0xd0,0x93,0x03,0x00,0x40,0x16,0xff,0x00,0x01,0x24,
- 0x07,0x00,0x01,0x12,0x00,0x00,0x00,0x00,0xd8,0x00,0xa5,0x8f,
- 0x00,0x02,0x15,0x24,0x24,0x89,0x84,0x27,0x21,0x30,0x40,0x02,
- 0x29,0x2a,0x00,0x0c,0x21,0x38,0x00,0x02,0x28,0x00,0xc0,0xa3,
- 0x7b,0x2e,0x00,0x0c,0x21,0x20,0xc0,0x03,0x80,0x00,0x0d,0x24,
- 0x2c,0x00,0xcd,0xa3,0xf0,0x01,0x10,0x24,0xfc,0xff,0x10,0x26,
- 0xff,0xff,0x00,0x16,0xfc,0xff,0x10,0x26,0x7b,0x2e,0x00,0x0c,
- 0x21,0x20,0xc0,0x03,0x42,0x00,0x0b,0x24,0x2c,0x00,0xcb,0xa3,
- 0xf0,0x01,0x10,0x24,0xfc,0xff,0x10,0x26,0xff,0xff,0x00,0x16,
- 0xfc,0xff,0x10,0x26,0x48,0x00,0xc0,0x93,0x21,0xb0,0x00,0x00,
- 0x80,0x00,0x10,0x24,0x48,0x00,0xd6,0xa3,0x01,0x00,0xd8,0x26,
- 0x02,0x00,0xce,0x26,0x48,0x00,0xd8,0xa3,0x03,0x00,0xd9,0x26,
- 0x04,0x00,0xd6,0x26,0x48,0x00,0xce,0xa3,0xf8,0xff,0xd0,0x16,
- 0x48,0x00,0xd9,0xa3,0x21,0xb0,0x00,0x00,0x60,0x89,0x91,0x27,
- 0x48,0x00,0xd2,0x93,0x00,0x00,0x00,0x00,0x07,0x00,0x56,0x12,
- 0x00,0x00,0x00,0x00,0xd8,0x00,0xa5,0x8f,0x10,0x00,0xb5,0x36,
- 0x21,0x20,0x20,0x02,0x21,0x30,0xc0,0x02,0x29,0x2a,0x00,0x0c,
- 0x21,0x38,0x40,0x02,0x01,0x00,0xd6,0x26,0xf4,0xff,0xd0,0x16,
- 0x00,0x00,0x00,0x00,0x7b,0x2e,0x00,0x0c,0x21,0x20,0xc0,0x03,
- 0x42,0x00,0x09,0x24,0x2c,0x00,0xc9,0xa3,0xf0,0x01,0x10,0x24,
- 0xfc,0xff,0x10,0x26,0xff,0xff,0x00,0x16,0xfc,0xff,0x10,0x26,
- 0x7b,0x2e,0x00,0x0c,0x21,0x20,0xc0,0x03,0x43,0x00,0x0a,0x24,
- 0x2c,0x00,0xca,0xa3,0xe1,0x21,0x00,0x0c,0x21,0x20,0x00,0x00,
- 0x01,0x00,0x0f,0x24,0x00,0xa3,0x0c,0x3c,0x80,0x01,0x8f,0xad,
- 0xd8,0x00,0xad,0x8f,0xdc,0x88,0x98,0x27,0x80,0x58,0x0d,0x00,
- 0x21,0x70,0x78,0x01,0x70,0x00,0xae,0xaf,0x00,0x00,0xc4,0x8d,
- 0xe1,0x21,0x00,0x0c,0x01,0x00,0x84,0x24,0x84,0x13,0x10,0x24,
- 0xfc,0xff,0x10,0x26,0xff,0xff,0x00,0x16,0xfc,0xff,0x10,0x26,
- 0x00,0xa3,0x19,0x3c,0x80,0x01,0x29,0x8f,0x01,0x00,0x01,0x24,
- 0x06,0x00,0x21,0x11,0x88,0x00,0xb1,0x8f,0xd8,0x00,0xa5,0x8f,
- 0x40,0x00,0xb5,0x36,0x29,0x2a,0x00,0x0c,0x94,0x89,0x84,0x27,
- 0x88,0x00,0xb1,0x8f,0x00,0x00,0x00,0x00,0x08,0x00,0x2a,0x92,
- 0x08,0x00,0x31,0x26,0x01,0x00,0x4f,0x31,0x06,0x00,0xe0,0x11,
- 0x05,0x00,0x02,0x24,0xd8,0x00,0xa5,0x8f,0x40,0x00,0xb5,0x36,
- 0x29,0x2a,0x00,0x0c,0xc0,0x89,0x84,0x27,0x05,0x00,0x02,0x24,
- 0x00,0x00,0xc0,0xa3,0x10,0x00,0xc2,0xa3,0x14,0x00,0xc2,0xa3,
- 0x7b,0x2e,0x00,0x0c,0x21,0x20,0xc0,0x03,0x18,0x00,0x0c,0x24,
- 0x2c,0x00,0xcc,0xa3,0x04,0x00,0xd4,0xa3,0x0c,0x27,0x10,0x24,
- 0xfc,0xff,0x10,0x26,0xff,0xff,0x00,0x16,0xfc,0xff,0x10,0x26,
- 0x00,0x00,0x2d,0x92,0x00,0x00,0x00,0x00,0x01,0x00,0xab,0x31,
- 0x05,0x00,0x60,0x15,0x00,0x00,0x00,0x00,0xd8,0x00,0xa5,0x8f,
- 0x40,0x00,0xb5,0x36,0x29,0x2a,0x00,0x0c,0xfc,0x89,0x84,0x27,
- 0x40,0x00,0xc0,0xa3,0x30,0x00,0xc0,0xa3,0x10,0x00,0xc0,0xa3,
- 0x14,0x00,0xc0,0xa3,0x7b,0x2e,0x00,0x0c,0x21,0x20,0xc0,0x03,
- 0x10,0x00,0x18,0x24,0x2c,0x00,0xd8,0xa3,0x00,0x00,0xc0,0xa3,
- 0x04,0x00,0xc0,0xa3,0x00,0xa3,0x0e,0x3c,0x80,0x01,0xd9,0x8d,
- 0x00,0x00,0x00,0x00,0x05,0x00,0x20,0x13,0x00,0x00,0x00,0x00,
- 0xd8,0x00,0xa5,0x8f,0x80,0x00,0xb5,0x36,0x29,0x2a,0x00,0x0c,
- 0x38,0x8a,0x84,0x27,0xe1,0x21,0x00,0x0c,0x21,0x20,0x00,0x00,
- 0x01,0x00,0x09,0x24,0x00,0xa3,0x0a,0x3c,0x80,0x01,0x49,0xad,
- 0x70,0x00,0xaf,0x8f,0x00,0x00,0x00,0x00,0x00,0x00,0xe4,0x8d,
- 0xe1,0x21,0x00,0x0c,0x01,0x00,0x84,0x24,0x0c,0x27,0x10,0x24,
- 0xfc,0xff,0x10,0x26,0xff,0xff,0x00,0x16,0xfc,0xff,0x10,0x26,
- 0x00,0xa3,0x0c,0x3c,0x80,0x01,0x8d,0x8d,0x01,0x00,0x01,0x24,
- 0x05,0x00,0xa1,0x11,0x00,0x00,0x00,0x00,0xd8,0x00,0xa5,0x8f,
- 0x00,0x01,0xb5,0x36,0x29,0x2a,0x00,0x0c,0x6c,0x8a,0x84,0x27,
- 0x00,0x00,0x2b,0x92,0x00,0x00,0x00,0x00,0x01,0x00,0x78,0x31,
- 0x05,0x00,0x00,0x13,0x00,0x00,0x00,0x00,0xd8,0x00,0xa5,0x8f,
- 0x40,0x00,0xb5,0x36,0x29,0x2a,0x00,0x0c,0xa0,0x8a,0x84,0x27,
- 0xe1,0x21,0x00,0x0c,0x21,0x20,0x00,0x00,0x54,0x00,0xb1,0x8f,
- 0x50,0x00,0xb2,0x8f,0x05,0x00,0x00,0x10,0x00,0x00,0x00,0x00,
- 0xd8,0x00,0xa5,0x8f,0x00,0x02,0x15,0x24,0x29,0x2a,0x00,0x0c,
- 0xdc,0x8a,0x84,0x27,0x08,0x00,0xa0,0x12,0x00,0x00,0x00,0x00,
- 0x7c,0x00,0xae,0x8f,0x01,0x00,0x0a,0x24,0x00,0x00,0xd9,0x8d,
- 0x00,0x00,0x00,0x00,0x00,0x02,0x29,0x37,0x00,0x00,0xc9,0xad,
- 0xbc,0x00,0xaa,0xaf,0x7b,0x2e,0x00,0x0c,0x21,0x20,0xc0,0x03,
- 0x42,0x00,0x0f,0x24,0x2c,0x00,0xcf,0xa3,0xdc,0x00,0xac,0x8f,
- 0xf7,0xff,0x01,0x24,0x07,0x00,0x81,0x15,0x60,0x00,0xb4,0x8f,
- 0x60,0x00,0xb4,0x8f,0x5c,0x00,0xb5,0x8f,0x58,0x00,0xbe,0x8f,
- 0x13,0x07,0x00,0x10,0x00,0x00,0x00,0x00,0x60,0x00,0xb4,0x8f,
- 0x5c,0x00,0xb5,0x8f,0x58,0x00,0xbe,0x8f,0x02,0x00,0x10,0x24,
- 0xe8,0x00,0xad,0x8f,0x00,0x00,0x00,0x00,0x04,0x00,0xa0,0x11,
- 0xdc,0x00,0xab,0x8f,0xad,0x2a,0x00,0x0c,0x00,0x00,0x00,0x00,
- 0xdc,0x00,0xab,0x8f,0x00,0x00,0x00,0x00,0x0c,0x00,0x70,0x15,
- 0xd8,0x00,0xa5,0x8f,0xd8,0x00,0xa5,0x8f,0x29,0x2a,0x00,0x0c,
- 0x04,0x8b,0x84,0x27,0xd8,0x00,0xb8,0x8f,0x00,0x00,0x00,0x00,
- 0x09,0x00,0x00,0x17,0xdc,0x00,0xa3,0x8f,0xff,0x00,0x19,0x24,
- 0x05,0x00,0x00,0x10,0xec,0x88,0x99,0xaf,0xd8,0x00,0xa5,0x8f,
- 0x1c,0x8b,0x84,0x27,0x29,0x2a,0x00,0x0c,0x21,0x30,0x60,0x02,
- 0xdc,0x00,0xa3,0x8f,0x00,0x00,0x00,0x00,0x12,0x02,0x60,0x14,
- 0x00,0x00,0x00,0x00,0xd8,0x00,0xa9,0x8f,0xa0,0x00,0xaa,0x8f,
- 0x01,0x00,0x2e,0x2d,0x6c,0x00,0xae,0xaf,0xdd,0x01,0x40,0x19,
- 0x21,0xb0,0x00,0x00,0x58,0x00,0xbe,0xaf,0x7c,0x8b,0x9e,0x27,
- 0x54,0x00,0xb1,0xaf,0x50,0x00,0xb2,0xaf,0x60,0x00,0xb4,0xaf,
- 0x5c,0x00,0xb5,0xaf,0x68,0x00,0xa0,0xaf,0xed,0x00,0x02,0x24,
- 0x10,0x00,0x13,0x24,0x88,0x00,0xaf,0x8f,0x68,0x00,0xac,0x8f,
- 0x21,0xa8,0x00,0x00,0x21,0x88,0xec,0x01,0x1c,0x01,0x22,0xa2,
- 0x1c,0x01,0x2d,0x92,0x00,0x00,0x00,0x00,0xad,0x01,0x4d,0x14,
- 0x7c,0x00,0xac,0x8f,0xd8,0x00,0xab,0x8f,0x00,0x00,0x00,0x00,
- 0x07,0x00,0x60,0x15,0x80,0x00,0xa3,0x8f,0x00,0xa3,0x19,0x3c,
- 0xa8,0x01,0x29,0x97,0x01,0x00,0xd8,0x26,0xa4,0x01,0x09,0x13,
- 0x7c,0x00,0xac,0x8f,0x80,0x00,0xa3,0x8f,0x00,0x01,0x34,0x26,
- 0x00,0x00,0x6e,0x90,0xff,0x00,0x02,0x24,0x01,0x00,0xca,0x25,
- 0x00,0x00,0x6a,0xa0,0x1c,0x00,0x80,0xa2,0x0c,0x00,0x82,0xa2,
- 0x1c,0x00,0x92,0x92,0x1c,0x00,0x82,0xa2,0x0c,0x00,0x80,0xa2,
- 0xd8,0x00,0xaf,0x8f,0xdc,0x88,0x8d,0x27,0x80,0x60,0x0f,0x00,
- 0x1c,0x00,0x90,0x92,0x21,0x58,0x8d,0x01,0x04,0x00,0x40,0x16,
- 0x70,0x00,0xab,0xaf,0xff,0x00,0x01,0x24,0x09,0x00,0x01,0x12,
- 0x00,0x00,0x00,0x00,0x94,0x00,0xb9,0x8f,0xd8,0x00,0xa5,0x8f,
- 0x00,0x02,0x15,0x24,0x38,0x8b,0x84,0x27,0x21,0x38,0x40,0x02,
- 0x10,0x00,0xb0,0xaf,0x29,0x2a,0x00,0x0c,0x21,0x30,0xd9,0x02,
- 0x1c,0x00,0x80,0xa2,0x07,0x00,0x18,0x24,0x01,0x00,0x02,0x24,
- 0x08,0x00,0x98,0xa2,0x08,0x00,0x82,0xa2,0x8f,0x00,0x09,0x24,
- 0x0c,0x00,0x89,0xa2,0x04,0x00,0x0e,0x24,0x00,0x00,0x8e,0xa2,
- 0x04,0x00,0x80,0xa2,0x0f,0x00,0x0a,0x24,0x0c,0x00,0x8a,0xa2,
- 0x04,0x00,0x82,0xa2,0x1b,0x00,0x0f,0x24,0x10,0x00,0x8f,0xa2,
- 0x3f,0x00,0x12,0x24,0x00,0x00,0x80,0x92,0x21,0x10,0x40,0x02,
- 0xfd,0xff,0x40,0x14,0xff,0xff,0x52,0x26,0xc1,0x2a,0x00,0x0c,
- 0xc4,0x09,0x04,0x24,0x21,0x90,0x00,0x00,0x05,0x00,0x01,0x24,
- 0x07,0x00,0xe1,0x12,0x7f,0x00,0x01,0x24,0x05,0x00,0xe1,0x12,
- 0x0c,0x00,0x01,0x24,0x03,0x00,0xe1,0x12,0x0e,0x00,0x01,0x24,
- 0x0f,0x00,0xe1,0x16,0x00,0x00,0x00,0x00,0x14,0x00,0x8c,0x92,
- 0x00,0x00,0x00,0x00,0x01,0x00,0x8d,0x31,0x0a,0x00,0xa0,0x11,
- 0x00,0x00,0x00,0x00,0x94,0x00,0xab,0x8f,0xd8,0x00,0xa5,0x8f,
- 0x01,0x00,0xb5,0x36,0x21,0x20,0xc0,0x03,0x21,0x90,0x00,0x00,
- 0x29,0x2a,0x00,0x0c,0x21,0x30,0xcb,0x02,0x98,0x00,0x00,0x10,
- 0x0c,0x00,0x4d,0x32,0x14,0x00,0x99,0x92,0x00,0x00,0x00,0x00,
- 0x20,0x00,0x38,0x33,0x0a,0x00,0x00,0x17,0x00,0x00,0x00,0x00,
- 0x94,0x00,0xa9,0x8f,0xd8,0x00,0xa5,0x8f,0x02,0x00,0xb5,0x36,
- 0xa4,0x8b,0x84,0x27,0x21,0x90,0x00,0x00,0x29,0x2a,0x00,0x0c,
- 0x21,0x30,0xc9,0x02,0x8a,0x00,0x00,0x10,0x0c,0x00,0x4d,0x32,
- 0x00,0x00,0x80,0x92,0x00,0x00,0x92,0xa2,0x14,0x00,0x8e,0x92,
- 0x00,0x00,0x00,0x00,0x40,0x00,0xca,0x31,0x0d,0x00,0x40,0x11,
- 0xc3,0x09,0x10,0x24,0x94,0x00,0xaf,0x8f,0xd8,0x00,0xa5,0x8f,
- 0x04,0x00,0xb5,0x36,0xc8,0x8b,0x84,0x27,0x21,0x90,0x00,0x00,
- 0x29,0x2a,0x00,0x0c,0x21,0x30,0xcf,0x02,0xc1,0x2a,0x00,0x0c,
- 0xc4,0x09,0x04,0x24,0x78,0x00,0x00,0x10,0x0c,0x00,0x4d,0x32,
- 0xc3,0x09,0x10,0x24,0xd2,0x27,0x00,0x0c,0x00,0x00,0x00,0x00,
- 0x08,0x00,0x8c,0x92,0x00,0x00,0x00,0x00,0x01,0x00,0x8d,0x31,
- 0x04,0x00,0xa0,0x11,0x00,0x00,0x00,0x00,0x21,0x10,0x00,0x02,
- 0xf7,0xff,0x40,0x14,0xff,0xff,0x10,0x26,0x0a,0x00,0x01,0x06,
- 0x00,0x00,0x00,0x00,0x94,0x00,0xab,0x8f,0xd8,0x00,0xa5,0x8f,
- 0x00,0x04,0xb5,0x36,0xfc,0x8b,0x84,0x27,0x21,0x90,0x00,0x00,
- 0x29,0x2a,0x00,0x0c,0x21,0x30,0xcb,0x02,0x62,0x00,0x00,0x10,
- 0x0c,0x00,0x4d,0x32,0x14,0x00,0x99,0x92,0x00,0x00,0x00,0x00,
- 0x0e,0x00,0x38,0x33,0x1f,0x00,0x00,0x13,0x05,0x00,0x01,0x24,
- 0x94,0x00,0xa9,0x8f,0xd8,0x00,0xa5,0x8f,0x08,0x00,0xb5,0x36,
- 0x24,0x8c,0x84,0x27,0x29,0x2a,0x00,0x0c,0x21,0x30,0xc9,0x02,
- 0x14,0x00,0x8e,0x92,0x00,0x00,0x00,0x00,0x02,0x00,0xca,0x31,
- 0x03,0x00,0x40,0x11,0x00,0x00,0x00,0x00,0x29,0x2a,0x00,0x0c,
- 0x38,0x8c,0x84,0x27,0x14,0x00,0x8f,0x92,0x00,0x00,0x00,0x00,
- 0x04,0x00,0xec,0x31,0x03,0x00,0x80,0x11,0x00,0x00,0x00,0x00,
- 0x29,0x2a,0x00,0x0c,0x48,0x8c,0x84,0x27,0x14,0x00,0x8d,0x92,
- 0x00,0x00,0x00,0x00,0x08,0x00,0xab,0x31,0x03,0x00,0x60,0x11,
- 0x00,0x00,0x00,0x00,0x29,0x2a,0x00,0x0c,0x58,0x8c,0x84,0x27,
- 0x29,0x2a,0x00,0x0c,0x68,0x8c,0x84,0x27,0x05,0x00,0x01,0x24,
- 0x07,0x00,0xe1,0x12,0x7f,0x00,0x01,0x24,0x05,0x00,0xe1,0x12,
- 0x0c,0x00,0x01,0x24,0x03,0x00,0xe1,0x12,0x0e,0x00,0x01,0x24,
- 0x0f,0x00,0xe1,0x16,0x00,0x00,0x00,0x00,0x14,0x00,0x99,0x92,
- 0x00,0x00,0x00,0x00,0x01,0x00,0x38,0x33,0x0a,0x00,0x00,0x17,
- 0x00,0x00,0x00,0x00,0x94,0x00,0xa9,0x8f,0xd8,0x00,0xa5,0x8f,
- 0x01,0x00,0xb5,0x36,0x6c,0x8c,0x84,0x27,0x21,0x90,0x00,0x00,
- 0x29,0x2a,0x00,0x0c,0x21,0x30,0xc9,0x02,0x29,0x00,0x00,0x10,
- 0x0c,0x00,0x4d,0x32,0x00,0x00,0x90,0x92,0x05,0x00,0x01,0x24,
- 0x07,0x00,0xe1,0x12,0x7f,0x00,0x01,0x24,0x05,0x00,0xe1,0x12,
- 0x0c,0x00,0x01,0x24,0x03,0x00,0xe1,0x12,0x0e,0x00,0x01,0x24,
- 0x0f,0x00,0xe1,0x16,0x00,0x00,0x00,0x00,0x14,0x00,0x8e,0x92,
- 0x00,0x00,0x00,0x00,0x01,0x00,0xca,0x31,0x0a,0x00,0x40,0x11,
- 0x00,0x00,0x00,0x00,0x94,0x00,0xaf,0x8f,0xd8,0x00,0xa5,0x8f,
- 0x01,0x00,0xb5,0x36,0x94,0x8c,0x84,0x27,0x21,0x90,0x00,0x00,
- 0x29,0x2a,0x00,0x0c,0x21,0x30,0xcf,0x02,0x11,0x00,0x00,0x10,
- 0x0c,0x00,0x4d,0x32,0x09,0x00,0x12,0x12,0x00,0x00,0x00,0x00,
- 0x94,0x00,0xac,0x8f,0xd8,0x00,0xa5,0x8f,0x10,0x00,0xb5,0x36,
- 0xc0,0x8c,0x84,0x27,0x21,0x38,0x40,0x02,0x10,0x00,0xb0,0xaf,
- 0x29,0x2a,0x00,0x0c,0x21,0x30,0xcc,0x02,0x01,0x00,0x52,0x26,
- 0x00,0x01,0x41,0x2a,0x56,0xff,0x20,0x14,0x05,0x00,0x01,0x24,
- 0x21,0x90,0x00,0x00,0x0c,0x00,0x4d,0x32,0x01,0x00,0x59,0x32,
- 0x40,0xc0,0x19,0x00,0x10,0x00,0xab,0x35,0x02,0x00,0x4e,0x32,
- 0x43,0x50,0x0e,0x00,0x25,0x48,0x78,0x01,0x25,0x78,0x2a,0x01,
- 0x10,0x00,0x8f,0xa2,0xc1,0x2a,0x00,0x0c,0xfa,0x00,0x04,0x24,
- 0x18,0x00,0x90,0x92,0x00,0x00,0x00,0x00,0x02,0x81,0x10,0x00,
- 0x0f,0x00,0x10,0x32,0x20,0x00,0x12,0x12,0x00,0x00,0x00,0x00,
- 0x94,0x00,0xac,0x8f,0xd8,0x00,0xa5,0x8f,0x20,0x00,0xb5,0x36,
- 0xec,0x8c,0x84,0x27,0x21,0x38,0x40,0x02,0x10,0x00,0xb0,0xaf,
- 0x29,0x2a,0x00,0x0c,0x21,0x30,0xcc,0x02,0x26,0x88,0x12,0x02,
- 0x01,0x00,0x2d,0x32,0x04,0x00,0xa0,0x11,0x02,0x00,0x39,0x32,
- 0x29,0x2a,0x00,0x0c,0x20,0x8d,0x84,0x27,0x02,0x00,0x39,0x32,
- 0x04,0x00,0x20,0x13,0x04,0x00,0x2b,0x32,0x29,0x2a,0x00,0x0c,
- 0x2c,0x8d,0x84,0x27,0x04,0x00,0x2b,0x32,0x04,0x00,0x60,0x11,
- 0x08,0x00,0x38,0x32,0x29,0x2a,0x00,0x0c,0x38,0x8d,0x84,0x27,
- 0x08,0x00,0x38,0x32,0x03,0x00,0x00,0x13,0x00,0x00,0x00,0x00,
- 0x29,0x2a,0x00,0x0c,0x44,0x8d,0x84,0x27,0x29,0x2a,0x00,0x0c,
- 0x50,0x8d,0x84,0x27,0x01,0x00,0x52,0x26,0xcf,0xff,0x53,0x16,
- 0x0c,0x00,0x4d,0x32,0x1b,0x00,0x0e,0x24,0x10,0x00,0x8e,0xa2,
- 0xe1,0x21,0x00,0x0c,0x21,0x20,0x00,0x00,0x01,0x00,0x09,0x24,
- 0x00,0xa3,0x0a,0x3c,0x80,0x01,0x49,0xad,0x70,0x00,0xaf,0x8f,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xe4,0x8d,0xe1,0x21,0x00,0x0c,
- 0x01,0x00,0x84,0x24,0x01,0x00,0x0c,0x24,0x04,0x00,0x8c,0xa2,
- 0x00,0x00,0x80,0x92,0x08,0x00,0x80,0x92,0xc0,0x09,0x10,0x24,
- 0xfc,0xff,0x10,0x26,0xff,0xff,0x00,0x16,0xfc,0xff,0x10,0x26,
- 0x00,0xa3,0x0d,0x3c,0x80,0x01,0xb9,0x8d,0x01,0x00,0x01,0x24,
- 0x08,0x00,0x21,0x13,0x08,0x00,0xce,0x32,0x94,0x00,0xab,0x8f,
- 0xd8,0x00,0xa5,0x8f,0x40,0x00,0xb5,0x36,0x54,0x8d,0x84,0x27,
- 0x29,0x2a,0x00,0x0c,0x21,0x30,0xcb,0x02,0x08,0x00,0xce,0x32,
- 0x88,0x00,0xb8,0x8f,0x08,0x00,0xc9,0x25,0x43,0x50,0x09,0x00,
- 0x21,0x88,0x0a,0x03,0x00,0x00,0x2d,0x92,0x07,0x00,0xcf,0x32,
- 0x01,0x00,0x0c,0x24,0x04,0x90,0xec,0x01,0x24,0xc8,0xb2,0x01,
- 0x08,0x00,0x20,0x13,0x2a,0x00,0x0e,0x24,0x94,0x00,0xab,0x8f,
- 0xd8,0x00,0xa5,0x8f,0x40,0x00,0xb5,0x36,0x74,0x8d,0x84,0x27,
- 0x29,0x2a,0x00,0x0c,0x21,0x30,0xcb,0x02,0x2a,0x00,0x0e,0x24,
- 0x00,0x00,0x8e,0xa2,0xc3,0x09,0x10,0x24,0x00,0xa3,0x09,0x3c,
- 0x80,0x01,0x38,0x8d,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x13,
- 0x00,0x00,0x00,0x00,0xff,0xff,0x10,0x26,0xfa,0xff,0x00,0x16,
- 0x00,0xa3,0x09,0x3c,0xc0,0x09,0x10,0x24,0xfc,0xff,0x10,0x26,
- 0xff,0xff,0x00,0x16,0xfc,0xff,0x10,0x26,0x00,0x00,0x2a,0x92,
- 0x00,0x00,0x00,0x00,0x24,0x60,0x52,0x01,0x07,0x00,0x80,0x15,
- 0x00,0x00,0x00,0x00,0x94,0x00,0xaf,0x8f,0xd8,0x00,0xa5,0x8f,
- 0x40,0x00,0xb5,0x36,0xa4,0x8d,0x84,0x27,0x29,0x2a,0x00,0x0c,
- 0x21,0x30,0xcf,0x02,0x00,0x00,0x80,0x92,0x08,0x00,0x80,0x92,
- 0x00,0xa3,0x0d,0x3c,0x80,0x01,0xb9,0x8d,0x00,0x00,0x00,0x00,
- 0x07,0x00,0x20,0x13,0x00,0x00,0x00,0x00,0x94,0x00,0xab,0x8f,
- 0xd8,0x00,0xa5,0x8f,0x80,0x00,0xb5,0x36,0xd4,0x8d,0x84,0x27,
- 0x29,0x2a,0x00,0x0c,0x21,0x30,0xcb,0x02,0xe1,0x21,0x00,0x0c,
- 0x21,0x20,0x00,0x00,0x01,0x00,0x0e,0x24,0x00,0xa3,0x09,0x3c,
- 0x80,0x01,0x2e,0xad,0x70,0x00,0xb8,0x8f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x04,0x8f,0xe1,0x21,0x00,0x0c,0x01,0x00,0x84,0x24,
- 0xc0,0x09,0x10,0x24,0xfc,0xff,0x10,0x26,0xff,0xff,0x00,0x16,
- 0xfc,0xff,0x10,0x26,0x00,0xa3,0x0a,0x3c,0x80,0x01,0x4c,0x8d,
- 0x01,0x00,0x01,0x24,0x07,0x00,0x81,0x11,0x00,0x00,0x00,0x00,
- 0x94,0x00,0xaf,0x8f,0xd8,0x00,0xa5,0x8f,0x00,0x01,0xb5,0x36,
- 0xfc,0x8d,0x84,0x27,0x29,0x2a,0x00,0x0c,0x21,0x30,0xcf,0x02,
- 0x00,0x00,0x2d,0x92,0x00,0x00,0x00,0x00,0x24,0xc8,0xb2,0x01,
- 0x07,0x00,0x20,0x13,0x00,0x00,0x00,0x00,0x94,0x00,0xab,0x8f,
- 0xd8,0x00,0xa5,0x8f,0x40,0x00,0xb5,0x36,0x24,0x8e,0x84,0x27,
- 0x29,0x2a,0x00,0x0c,0x21,0x30,0xcb,0x02,0xe1,0x21,0x00,0x0c,
- 0x21,0x20,0x00,0x00,0x07,0x00,0x02,0x24,0x04,0x00,0x80,0xa2,
- 0x08,0x00,0x82,0xa2,0x01,0x00,0x0e,0x24,0x08,0x00,0x8e,0xa2,
- 0x87,0x00,0x09,0x24,0x0c,0x00,0x89,0xa2,0x30,0x00,0x18,0x24,
- 0x00,0x00,0x98,0xa2,0x04,0x00,0x80,0xa2,0x0c,0x00,0x82,0xa2,
- 0x08,0x00,0x0a,0x24,0x10,0x00,0x8a,0xa2,0x00,0x00,0x80,0x92,
- 0x07,0x00,0x00,0x10,0xed,0x00,0x02,0x24,0x7c,0x00,0xac,0x8f,
- 0x01,0x00,0x0d,0x24,0x00,0x00,0x8f,0x8d,0x04,0xc8,0xcd,0x02,
- 0x25,0x58,0xf9,0x01,0x00,0x00,0x8b,0xad,0x0c,0x00,0xa0,0x12,
- 0x68,0x00,0xab,0x8f,0x7c,0x00,0xae,0x8f,0x01,0x00,0x18,0x24,
- 0x00,0x00,0xc9,0x8d,0x04,0x50,0xd8,0x02,0x25,0x68,0x2a,0x01,
- 0x00,0x00,0xcd,0xad,0xbc,0x00,0xaf,0x8f,0x00,0x00,0x00,0x00,
- 0x01,0x00,0xf9,0x35,0xbc,0x00,0xb9,0xaf,0x68,0x00,0xab,0x8f,
- 0xa0,0x00,0xb8,0x8f,0x01,0x00,0xd6,0x26,0x20,0x00,0x6c,0x25,
- 0x2a,0x08,0xd8,0x02,0x34,0xfe,0x20,0x14,0x68,0x00,0xac,0xaf,
- 0x54,0x00,0xb1,0x8f,0x50,0x00,0xb2,0x8f,0x60,0x00,0xb4,0x8f,
- 0x5c,0x00,0xb5,0x8f,0x58,0x00,0xbe,0x8f,0x00,0x00,0x00,0x00,
- 0x6c,0x00,0xa9,0x8f,0x00,0x00,0x00,0x00,0x05,0x00,0x20,0x11,
- 0x21,0x10,0x20,0x01,0x00,0xa3,0x0a,0x3c,0xa8,0x01,0x42,0x95,
- 0x00,0x00,0x00,0x00,0x2b,0x10,0x02,0x00,0x80,0x00,0xae,0x8f,
- 0x9c,0x00,0xa3,0x8f,0xa0,0x00,0xa7,0x8f,0x00,0x00,0xcf,0x91,
- 0x21,0x68,0xe3,0x00,0x21,0xc8,0xe2,0x01,0x0a,0x00,0xb9,0x11,
- 0xbc,0x00,0xb8,0x8f,0xbc,0x00,0xab,0x8f,0xd8,0x00,0xa5,0x8f,
- 0x02,0x00,0x6c,0x35,0xbc,0x00,0xac,0xaf,0x00,0x00,0xc6,0x91,
- 0x10,0x00,0xa3,0xaf,0x29,0x2a,0x00,0x0c,0x54,0x8e,0x84,0x27,
- 0xbc,0x00,0xb8,0x8f,0x00,0x00,0x00,0x00,0x11,0x00,0x00,0x17,
- 0x84,0x00,0xad,0x8f,0x80,0x00,0xa9,0x8f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x2a,0x91,0x00,0x00,0x00,0x00,0x08,0x00,0x40,0x11,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x91,0x29,0x2a,0x00,0x0c,
- 0x80,0x8e,0x84,0x27,0x65,0x2a,0x00,0x0c,0x00,0x00,0x00,0x00,
- 0x04,0x00,0x00,0x10,0x84,0x00,0xad,0x8f,0x29,0x2a,0x00,0x0c,
- 0x8c,0x8e,0x84,0x27,0x84,0x00,0xad,0x8f,0x01,0x00,0x0f,0x24,
- 0xe2,0x04,0x00,0x10,0x00,0x00,0xaf,0xa1,0x07,0x00,0x61,0x04,
- 0xa0,0x00,0xab,0x8f,0x23,0x10,0x03,0x00,0xff,0xff,0x59,0x24,
- 0xac,0x00,0xb9,0xaf,0x04,0x00,0x00,0x10,0xa8,0x00,0xa2,0xaf,
- 0xa0,0x00,0xab,0x8f,0xac,0x00,0xa0,0xaf,0xa8,0x00,0xab,0xaf,
- 0xac,0x00,0xac,0x8f,0xa8,0x00,0xae,0x8f,0x21,0xb0,0x80,0x01,
- 0x2a,0x08,0x8e,0x01,0x2b,0x00,0x20,0x10,0x00,0x00,0x00,0x00,
- 0x60,0x00,0xb4,0xaf,0xd8,0x00,0xb8,0x8f,0x00,0x00,0x00,0x00,
- 0x07,0x00,0x00,0x17,0x88,0x00,0xad,0x8f,0x00,0xa3,0x09,0x3c,
- 0xa8,0x01,0x2f,0x95,0x01,0x00,0xca,0x26,0x14,0x00,0x4f,0x11,
- 0x00,0x00,0x00,0x00,0x88,0x00,0xad,0x8f,0x40,0xc9,0x16,0x00,
- 0x21,0xa0,0xb9,0x01,0x07,0x00,0x0b,0x24,0x08,0x01,0x8b,0xa2,
- 0x01,0x00,0x0c,0x24,0x08,0x01,0x8c,0xa2,0x8f,0x00,0x0e,0x24,
- 0x0c,0x01,0x8e,0xa2,0x04,0x00,0x18,0x24,0x00,0x01,0x98,0xa2,
- 0x04,0x01,0x80,0xa2,0x0f,0x00,0x09,0x24,0x0c,0x01,0x89,0xa2,
- 0x01,0x00,0x0a,0x24,0x04,0x01,0x8a,0xa2,0x08,0x00,0x0f,0x24,
- 0x00,0x01,0x94,0x26,0x10,0x00,0x8f,0xa2,0xc1,0x2a,0x00,0x0c,
- 0xc4,0x09,0x04,0x24,0xa8,0x00,0xad,0x8f,0x01,0x00,0xd6,0x26,
- 0x2a,0x08,0xcd,0x02,0x05,0x00,0x20,0x10,0x60,0x00,0xb4,0x8f,
- 0xdc,0x00,0xa3,0x8f,0xdc,0xff,0x00,0x10,0xd8,0x00,0xb8,0x8f,
- 0x60,0x00,0xb4,0x8f,0xdc,0x00,0xa3,0x8f,0x00,0x00,0x00,0x00,
- 0x9c,0x01,0x70,0x14,0x00,0x00,0x00,0x00,0xd8,0x00,0xa3,0x8f,
- 0xe0,0x00,0xab,0x8f,0x40,0x61,0x03,0x00,0x54,0x00,0xb1,0xaf,
- 0x01,0x00,0x79,0x2c,0x21,0xb8,0x6c,0x01,0x50,0x00,0xb2,0xaf,
- 0x21,0x88,0xe0,0x02,0x6c,0x00,0xb9,0xaf,0x21,0xb0,0x00,0x00,
- 0xff,0xff,0x02,0x24,0x10,0x00,0x13,0x24,0x04,0x00,0xd6,0x26,
- 0x00,0x00,0x22,0xa6,0x02,0x00,0x22,0xa6,0x04,0x00,0x22,0xa6,
- 0x06,0x00,0x22,0xa6,0xfa,0xff,0xd3,0x16,0x08,0x00,0x31,0x26,
- 0x9c,0x00,0xae,0x8f,0x01,0x00,0x01,0x24,0x7b,0x00,0xc1,0x15,
- 0x00,0x00,0x00,0x00,0xec,0x88,0x98,0x8f,0xff,0x00,0x01,0x24,
- 0x10,0x00,0x01,0x17,0x00,0x00,0x00,0x00,0x58,0x00,0xbe,0xaf,
- 0x8c,0x00,0xbe,0x8f,0x01,0xa1,0x01,0x3c,0x00,0x08,0x21,0x34,
- 0x80,0x00,0x69,0x24,0x21,0xf0,0xc1,0x03,0xec,0x88,0x89,0xaf,
- 0x7b,0x2e,0x00,0x0c,0x21,0x20,0xc0,0x03,0x42,0x00,0x0a,0x24,
- 0x2c,0x00,0xca,0xa3,0xd8,0x00,0xa3,0x8f,0x58,0x00,0xbe,0x8f,
- 0x68,0x00,0x00,0x10,0xff,0xff,0x02,0x24,0xec,0x88,0x8f,0x8f,
- 0x00,0x00,0x00,0x00,0x80,0x00,0xed,0x31,0x63,0x00,0xa0,0x11,
- 0x00,0x00,0x00,0x00,0x80,0x00,0x72,0x24,0x60,0x00,0xf2,0x11,
- 0x00,0x00,0x00,0x00,0x58,0x00,0xbe,0xaf,0x8c,0x00,0xbe,0x8f,
- 0x01,0xa1,0x01,0x3c,0x00,0x08,0x21,0x34,0x60,0x00,0xb4,0xaf,
- 0x03,0x00,0x19,0x24,0x21,0xf0,0xc1,0x03,0x28,0x00,0xd9,0xa3,
- 0x7b,0x2e,0x00,0x0c,0x21,0x20,0xc0,0x03,0x80,0x00,0x0b,0x24,
- 0x2c,0x00,0xcb,0xa3,0x08,0x00,0x0c,0x24,0x78,0x00,0xcc,0xa3,
- 0x7b,0x2e,0x00,0x0c,0x21,0x20,0xc0,0x03,0x42,0x00,0x0e,0x24,
- 0x2c,0x00,0xce,0xa3,0x04,0x00,0x18,0x24,0x08,0x00,0xd8,0xa3,
- 0x04,0x00,0x09,0x24,0x0c,0x00,0xc9,0xa3,0xec,0x88,0x90,0x8f,
- 0x01,0xa1,0x01,0x3c,0x7f,0x00,0x10,0x32,0x80,0x83,0x10,0x00,
- 0x00,0x08,0x21,0x34,0x21,0x80,0x01,0x02,0x21,0xa0,0x00,0x02,
- 0x28,0x00,0x00,0xa2,0x7b,0x2e,0x00,0x0c,0x21,0x20,0x00,0x02,
- 0x80,0x00,0x0a,0x24,0x2c,0x00,0x0a,0xa2,0x09,0x00,0x0d,0x24,
- 0x78,0x00,0x0d,0xa2,0x7b,0x2e,0x00,0x0c,0x21,0x20,0x00,0x02,
- 0x42,0x00,0x0f,0x24,0x2c,0x00,0x0f,0xa2,0x04,0x00,0x19,0x24,
- 0x08,0x00,0x19,0xa2,0x04,0x00,0x0b,0x24,0x0c,0x00,0x0b,0xa2,
- 0x7b,0x2e,0x00,0x0c,0x21,0x20,0x00,0x02,0x43,0x00,0x0c,0x24,
- 0x2c,0x00,0x0c,0xa2,0x7b,0x2e,0x00,0x0c,0x21,0x20,0xc0,0x03,
- 0x43,0x00,0x0e,0x24,0x2c,0x00,0xce,0xa3,0xd8,0x00,0xb1,0x8f,
- 0x0f,0x27,0x16,0x24,0x50,0x00,0x31,0x26,0x48,0x00,0x11,0xa2,
- 0xd2,0x27,0x00,0x0c,0x00,0x00,0x00,0x00,0x38,0x00,0xd8,0x93,
- 0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x17,0x00,0x00,0x00,0x00,
- 0x21,0x10,0xc0,0x02,0xf8,0xff,0x40,0x14,0xff,0xff,0xd6,0x26,
- 0x48,0x00,0xc9,0x93,0x00,0x00,0x00,0x00,0x0d,0x00,0x29,0x16,
- 0x00,0x00,0x00,0x00,0xa0,0x00,0xad,0x8f,0xec,0x88,0x8a,0x8f,
- 0x40,0x78,0x0d,0x00,0x21,0xc8,0xef,0x02,0x00,0x00,0x2a,0xa7,
- 0xe0,0x00,0xab,0x8f,0x7f,0x00,0x4c,0x31,0x40,0x71,0x0c,0x00,
- 0x40,0x48,0x0d,0x00,0x21,0xc0,0x6e,0x01,0x21,0x78,0x09,0x03,
- 0x00,0x00,0xf2,0xa5,0x7b,0x2e,0x00,0x0c,0x21,0x20,0x80,0x02,
- 0x42,0x00,0x19,0x24,0x2c,0x00,0x99,0xa2,0x7b,0x2e,0x00,0x0c,
- 0x21,0x20,0xc0,0x03,0x42,0x00,0x0a,0x24,0x2c,0x00,0xca,0xa3,
- 0xff,0x00,0x0c,0x24,0xd8,0x00,0xa3,0x8f,0x58,0x00,0xbe,0x8f,
- 0x60,0x00,0xb4,0x8f,0xec,0x88,0x8c,0xaf,0xff,0xff,0x02,0x24,
- 0xa0,0x00,0xa5,0x8f,0x21,0xb0,0x00,0x00,0x06,0x00,0xa0,0x1c,
- 0x00,0xa3,0x07,0x3c,0x00,0xa3,0x07,0x3c,0x88,0x00,0xa6,0x8f,
- 0x12,0x00,0x00,0x10,0xa8,0x01,0xe7,0x34,0x00,0xa3,0x07,0x3c,
- 0x88,0x00,0xa6,0x8f,0xa8,0x01,0xe7,0x34,0x06,0x00,0x60,0x14,
- 0x40,0x69,0x16,0x00,0x00,0x00,0xee,0x94,0x01,0x00,0xcb,0x26,
- 0x04,0x00,0x6e,0x11,0x00,0x00,0x00,0x00,0x40,0x69,0x16,0x00,
- 0x21,0xc0,0xcd,0x00,0x00,0x01,0x16,0xa3,0x01,0x00,0xd6,0x26,
- 0x2a,0x08,0xc5,0x02,0xf4,0xff,0x20,0x14,0x00,0x00,0x00,0x00,
- 0x21,0xb0,0x00,0x00,0xc1,0x2a,0x00,0x0c,0x10,0x27,0x04,0x24,
- 0xa0,0x00,0xa2,0x8f,0x00,0x00,0x00,0x00,0x05,0x00,0x40,0x1c,
- 0x00,0x00,0x00,0x00,0x00,0xa3,0x08,0x3c,0xd8,0x00,0xa7,0x8f,
- 0x5c,0x00,0x00,0x10,0xa8,0x01,0x08,0x35,0x5c,0x00,0xb5,0xaf,
- 0x00,0xa3,0x08,0x3c,0xd8,0x00,0xa7,0x8f,0xa8,0x01,0x08,0x35,
- 0xd4,0x8e,0x95,0x27,0x60,0x00,0xb4,0xaf,0x9c,0x8e,0x93,0x27,
- 0x06,0x00,0xe0,0x14,0x88,0x00,0xb9,0x8f,0x00,0x00,0x0f,0x95,
- 0x01,0x00,0xc9,0x26,0x48,0x00,0x2f,0x11,0x00,0x00,0x00,0x00,
- 0x88,0x00,0xb9,0x8f,0x40,0x51,0x16,0x00,0x21,0xa0,0x2a,0x03,
- 0x14,0x01,0x8c,0x92,0x00,0x01,0x94,0x26,0x01,0x00,0x8b,0x31,
- 0x05,0x00,0x60,0x11,0xff,0x00,0x12,0x24,0x00,0x00,0x92,0x92,
- 0x02,0x00,0x00,0x10,0x7f,0x00,0x52,0x32,0xff,0x00,0x12,0x24,
- 0xff,0x00,0x01,0x24,0x39,0x00,0x41,0x12,0x00,0x00,0x00,0x00,
- 0x40,0x70,0x16,0x00,0x2a,0x00,0x40,0x06,0x21,0x88,0xee,0x02,
- 0x2a,0x08,0x42,0x02,0x28,0x00,0x20,0x10,0x94,0x00,0xa2,0x8f,
- 0x05,0x00,0xe0,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x95,
- 0x01,0x00,0x4d,0x26,0x22,0x00,0xb8,0x11,0x94,0x00,0xa2,0x8f,
- 0x00,0x00,0x23,0x86,0xff,0xff,0x01,0x24,0x04,0x00,0x61,0x10,
- 0x40,0x48,0x12,0x00,0x0a,0x00,0x43,0x16,0x40,0x78,0x12,0x00,
- 0x40,0x48,0x12,0x00,0x21,0x80,0xe9,0x02,0x00,0x00,0x02,0x86,
- 0xff,0xff,0x01,0x24,0x12,0x00,0x41,0x10,0x00,0x00,0x00,0x00,
- 0x10,0x00,0xc2,0x12,0x00,0x00,0x00,0x00,0x40,0x78,0x12,0x00,
- 0x94,0x00,0xa2,0x8f,0x21,0x80,0xef,0x02,0x00,0x00,0x06,0x86,
- 0x21,0xc8,0x42,0x02,0x10,0x00,0xb9,0xaf,0x21,0x20,0x60,0x02,
- 0x01,0x00,0x65,0x24,0x21,0x38,0xc2,0x02,0x29,0x2a,0x00,0x0c,
- 0x01,0x00,0xc6,0x24,0xff,0xff,0x02,0x24,0x00,0x00,0x22,0xa6,
- 0x0c,0x00,0x00,0x10,0x00,0x00,0x02,0xa6,0x00,0x00,0x32,0xa6,
- 0x09,0x00,0x00,0x10,0x00,0x00,0x16,0xa6,0x94,0x00,0xa2,0x8f,
- 0x00,0x00,0x2a,0x86,0x21,0x20,0xa0,0x02,0x21,0x30,0x42,0x02,
- 0x29,0x2a,0x00,0x0c,0x21,0x28,0x42,0x01,0xff,0xff,0x0c,0x24,
- 0x00,0x00,0x2c,0xa6,0x00,0xa3,0x08,0x3c,0xa0,0x00,0xa2,0x8f,
- 0xd8,0x00,0xa7,0x8f,0xa8,0x01,0x08,0x35,0x01,0x00,0xd6,0x26,
- 0x2a,0x08,0xc2,0x02,0xb0,0xff,0x20,0x14,0x00,0x00,0x00,0x00,
- 0x60,0x00,0xb4,0x8f,0x5c,0x00,0xb5,0x8f,0x21,0xb0,0x00,0x00,
- 0x35,0x00,0x40,0x18,0x21,0x90,0x00,0x00,0x60,0x00,0xb4,0xaf,
- 0x04,0x8f,0x94,0x27,0x21,0x88,0xe0,0x02,0xfc,0x8e,0x90,0x27,
- 0x00,0x8f,0x93,0x27,0x00,0x00,0x23,0x86,0xff,0xff,0x01,0x24,
- 0x13,0x00,0x61,0x10,0x2a,0x08,0x76,0x00,0x0f,0x00,0x20,0x14,
- 0x00,0x00,0x00,0x00,0x21,0x20,0x00,0x02,0x29,0x2a,0x00,0x0c,
- 0x01,0x00,0xc5,0x26,0x00,0x00,0x23,0x86,0x00,0x00,0x00,0x00,
- 0x05,0x00,0xc3,0x12,0x00,0x00,0x00,0x00,0x21,0x20,0x60,0x02,
- 0x29,0x2a,0x00,0x0c,0x01,0x00,0x65,0x24,0x01,0x00,0x52,0x26,
- 0x5c,0x28,0x00,0x0c,0x20,0x00,0x04,0x24,0x01,0x00,0x52,0x26,
- 0x0c,0x00,0x00,0x10,0x01,0x00,0xc2,0x26,0xd8,0x00,0xab,0x8f,
- 0x00,0x00,0x00,0x00,0x05,0x00,0x60,0x15,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x0d,0x95,0x01,0x00,0xce,0x26,0x04,0x00,0xcd,0x11,
- 0x01,0x00,0xc2,0x26,0x29,0x2a,0x00,0x0c,0x21,0x20,0x80,0x02,
- 0x01,0x00,0xc2,0x26,0xa0,0x00,0xb8,0x8f,0x21,0xb0,0x40,0x00,
- 0x2a,0x08,0xd8,0x02,0x05,0x00,0x20,0x10,0x02,0x00,0x31,0x26,
- 0x00,0xa3,0x08,0x3c,0xa8,0x01,0x08,0x35,0xd7,0xff,0x00,0x10,
- 0x21,0x10,0x00,0x03,0x00,0xa3,0x08,0x3c,0x60,0x00,0xb4,0x8f,
- 0xa0,0x00,0xa2,0x8f,0xd8,0x00,0xa7,0x8f,0xa8,0x01,0x08,0x35,
- 0x9c,0x00,0xa9,0x8f,0x01,0x00,0x01,0x24,0x13,0x00,0x21,0x15,
- 0x6c,0x00,0xac,0x8f,0xa0,0x00,0xaf,0x8f,0xff,0xff,0x01,0x24,
- 0x40,0xc8,0x0f,0x00,0x21,0x50,0xf9,0x02,0x00,0x00,0x42,0x85,
- 0x00,0x00,0x00,0x00,0x03,0x00,0x41,0x14,0x00,0x00,0x00,0x00,
- 0x08,0x00,0x00,0x10,0x21,0x10,0xe0,0x01,0x08,0x8f,0x84,0x27,
- 0x7f,0x00,0x45,0x30,0x29,0x2a,0x00,0x0c,0x21,0x30,0xe0,0x00,
- 0x00,0xa3,0x08,0x3c,0xa0,0x00,0xa2,0x8f,0xa8,0x01,0x08,0x35,
- 0x6c,0x00,0xac,0x8f,0x00,0x00,0x00,0x00,0x0c,0x00,0x80,0x11,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x0b,0x95,0x00,0x00,0x00,0x00,
- 0x08,0x00,0x60,0x11,0x00,0x00,0x00,0x00,0x00,0xa3,0x0e,0x3c,
- 0xa8,0x01,0xc5,0x95,0x29,0x2a,0x00,0x0c,0x14,0x8f,0x84,0x27,
- 0x00,0xa3,0x08,0x3c,0xa0,0x00,0xa2,0x8f,0xa8,0x01,0x08,0x35,
- 0x0a,0x00,0x40,0x16,0x6c,0x00,0xa9,0x8f,0x29,0x2a,0x00,0x0c,
- 0x20,0x8f,0x84,0x27,0xbc,0x00,0xad,0x8f,0x00,0xa3,0x08,0x3c,
- 0x00,0x80,0xb8,0x35,0xa0,0x00,0xa2,0x8f,0xbc,0x00,0xb8,0xaf,
- 0xa8,0x01,0x08,0x35,0x6c,0x00,0xa9,0x8f,0x00,0x00,0x00,0x00,
- 0x06,0x00,0x20,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x19,0x95,
- 0x00,0x00,0x00,0x00,0x02,0x00,0x20,0x13,0x00,0x00,0x00,0x00,
- 0x01,0x00,0x52,0x26,0x29,0x2a,0x00,0x0c,0x44,0x8f,0x84,0x27,
- 0xa0,0x00,0xaa,0x8f,0x00,0x00,0x00,0x00,0x2a,0x08,0x4a,0x02,
- 0x04,0x00,0x20,0x10,0x9c,0x00,0xaf,0x8f,0x29,0x2a,0x00,0x0c,
- 0x48,0x8f,0x84,0x27,0x9c,0x00,0xaf,0x8f,0x01,0x00,0x01,0x24,
- 0x10,0x00,0xe1,0x15,0x54,0x00,0xb1,0x8f,0xa0,0x00,0xac,0x8f,
- 0xff,0xff,0x01,0x24,0x40,0x58,0x0c,0x00,0x21,0x70,0xeb,0x02,
- 0x00,0x00,0xcd,0x85,0x00,0x00,0x00,0x00,0x08,0x00,0xa1,0x15,
- 0x54,0x00,0xb1,0x8f,0xec,0x88,0x98,0x8f,0xff,0x00,0x01,0x24,
- 0x04,0x00,0x01,0x17,0x54,0x00,0xb1,0x8f,0x29,0x2a,0x00,0x0c,
- 0x78,0x8f,0x84,0x27,0x54,0x00,0xb1,0x8f,0x50,0x00,0xb2,0x8f,
- 0x0b,0x03,0x00,0x10,0x00,0x00,0x00,0x00,0x5c,0x00,0xb5,0xaf,
- 0x21,0xa8,0x00,0x00,0x04,0x00,0x61,0x04,0xec,0x88,0x80,0xaf,
- 0xe0,0x00,0xa6,0x8f,0xa3,0x00,0x00,0x10,0xac,0x00,0xad,0x8f,
- 0x9c,0x00,0xa9,0x8f,0x01,0x00,0x01,0x24,0x05,0x00,0x21,0x11,
- 0xe0,0x00,0xa6,0x8f,0xe0,0x00,0xa6,0x8f,0x9c,0x00,0x00,0x10,
- 0xac,0x00,0xad,0x8f,0xe0,0x00,0xa6,0x8f,0x00,0x00,0x00,0x00,
- 0x98,0x00,0xc0,0x10,0xac,0x00,0xad,0x8f,0xd8,0x00,0xb9,0x8f,
- 0xa0,0x00,0xac,0x8f,0x40,0x51,0x19,0x00,0x21,0x78,0xca,0x00,
- 0x40,0x58,0x0c,0x00,0x21,0x10,0xeb,0x01,0x00,0x00,0x4e,0x84,
- 0xff,0xff,0x01,0x24,0x8e,0x00,0xc1,0x11,0xac,0x00,0xad,0x8f,
- 0x58,0x00,0xbe,0xaf,0x8c,0x00,0xbe,0x8f,0x01,0xa1,0x01,0x3c,
- 0x00,0x08,0x21,0x34,0x54,0x00,0xb1,0xaf,0x50,0x00,0xb2,0xaf,
- 0x60,0x00,0xb4,0xaf,0x03,0x00,0x0d,0x24,0x21,0xf0,0xc1,0x03,
- 0x28,0x00,0xcd,0xa3,0x84,0x00,0xa2,0xaf,0x7b,0x2e,0x00,0x0c,
- 0x21,0x20,0xc0,0x03,0x80,0x00,0x18,0x24,0x2c,0x00,0xd8,0xa3,
- 0x08,0x00,0x09,0x24,0x78,0x00,0xc9,0xa3,0x7b,0x2e,0x00,0x0c,
- 0x21,0x20,0xc0,0x03,0x42,0x00,0x19,0x24,0x2c,0x00,0xd9,0xa3,
- 0x04,0x00,0x0a,0x24,0x08,0x00,0xca,0xa3,0x04,0x00,0x0c,0x24,
- 0x0c,0x00,0xcc,0xa3,0x84,0x00,0xaf,0x8f,0x01,0xa1,0x01,0x3c,
- 0x00,0x00,0xf4,0x85,0x00,0x08,0x21,0x34,0x7f,0x00,0x94,0x32,
- 0x80,0xa3,0x14,0x00,0x21,0xa0,0x81,0x02,0x28,0x00,0x80,0xa2,
- 0x7b,0x2e,0x00,0x0c,0x21,0x20,0x80,0x02,0x80,0x00,0x0b,0x24,
- 0x2c,0x00,0x8b,0xa2,0x09,0x00,0x0e,0x24,0x78,0x00,0x8e,0xa2,
- 0x7b,0x2e,0x00,0x0c,0x21,0x20,0x80,0x02,0x42,0x00,0x0d,0x24,
- 0x2c,0x00,0x8d,0xa2,0x04,0x00,0x18,0x24,0x08,0x00,0x98,0xa2,
- 0x04,0x00,0x09,0x24,0x0c,0x00,0x89,0xa2,0x7b,0x2e,0x00,0x0c,
- 0x21,0x20,0xc0,0x03,0x43,0x00,0x19,0x24,0x2c,0x00,0xd9,0xa3,
- 0x7b,0x2e,0x00,0x0c,0x21,0x20,0x80,0x02,0x43,0x00,0x0a,0x24,
- 0x2c,0x00,0x8a,0xa2,0x7b,0x2e,0x00,0x0c,0x21,0x20,0xc0,0x03,
- 0x7b,0x2e,0x00,0x0c,0x21,0x20,0x80,0x02,0xf0,0x88,0x8c,0x93,
- 0x01,0xa0,0x02,0x3c,0x48,0x00,0x8c,0xa2,0xf1,0x88,0x8f,0x93,
- 0x96,0xe6,0x42,0x24,0x02,0x00,0x16,0x24,0xf2,0x88,0x90,0x27,
- 0x48,0x00,0x8f,0xa2,0x00,0x00,0x0b,0x92,0x04,0x00,0x10,0x26,
- 0x48,0x00,0x8b,0xa2,0xfd,0xff,0x0e,0x92,0x00,0x00,0x00,0x00,
- 0x48,0x00,0x8e,0xa2,0xfe,0xff,0x0d,0x92,0x00,0x00,0x00,0x00,
- 0x48,0x00,0x8d,0xa2,0xff,0xff,0x18,0x92,0xf5,0xff,0x02,0x16,
- 0x48,0x00,0x98,0xa2,0x0f,0x27,0x16,0x24,0xd2,0x27,0x00,0x0c,
- 0x00,0x00,0x00,0x00,0x38,0x00,0xc9,0x93,0x00,0x00,0x00,0x00,
- 0x16,0x00,0x21,0x2d,0x04,0x00,0x20,0x10,0x00,0x00,0x00,0x00,
- 0x21,0x10,0xc0,0x02,0xf7,0xff,0x40,0x14,0xff,0xff,0xd6,0x26,
- 0x38,0x00,0xd9,0x93,0x16,0x00,0x01,0x24,0x0b,0x00,0x21,0x13,
- 0x00,0x00,0x00,0x00,0x84,0x00,0xaa,0x8f,0x38,0x00,0xcc,0x93,
- 0x00,0x00,0x45,0x85,0xd8,0x00,0xa7,0x8f,0xa4,0x8f,0x84,0x27,
- 0x16,0x00,0x06,0x24,0x10,0x00,0xac,0xaf,0x29,0x2a,0x00,0x0c,
- 0x7f,0x00,0xa5,0x30,0x00,0x04,0x15,0x24,0x01,0xa0,0x13,0x3c,
- 0x96,0xe6,0x73,0x26,0x21,0xb0,0x00,0x00,0xf0,0x88,0x90,0x27,
- 0xf0,0x8f,0x91,0x27,0x48,0x00,0xd2,0x93,0x00,0x00,0x06,0x92,
- 0x00,0x00,0x00,0x00,0x09,0x00,0x46,0x12,0x00,0x00,0x00,0x00,
- 0x84,0x00,0xaf,0x8f,0xd8,0x00,0xa7,0x8f,0x00,0x00,0xe5,0x85,
- 0x10,0x00,0xb2,0xaf,0x21,0x20,0x20,0x02,0x29,0x2a,0x00,0x0c,
- 0x7f,0x00,0xa5,0x30,0x10,0x00,0xb5,0x36,0x01,0x00,0x10,0x26,
- 0xf1,0xff,0x13,0x16,0x00,0x00,0x00,0x00,0x7b,0x2e,0x00,0x0c,
- 0x21,0x20,0x80,0x02,0x42,0x00,0x0b,0x24,0x2c,0x00,0x8b,0xa2,
- 0x7b,0x2e,0x00,0x0c,0x21,0x20,0xc0,0x03,0x42,0x00,0x0e,0x24,
- 0x2c,0x00,0xce,0xa3,0xe0,0x00,0xa6,0x8f,0xdc,0x00,0xa3,0x8f,
- 0x58,0x00,0xbe,0x8f,0x60,0x00,0xb4,0x8f,0x50,0x00,0xb2,0x8f,
- 0x54,0x00,0xb1,0x8f,0x00,0x00,0x00,0x00,0xac,0x00,0xad,0x8f,
- 0xa8,0x00,0xb8,0x8f,0x21,0xb0,0xa0,0x01,0x2a,0x08,0xb8,0x01,
- 0xc4,0x01,0x20,0x10,0xbc,0x00,0xad,0x8f,0x54,0x00,0xb1,0xaf,
- 0x50,0x00,0xb2,0xaf,0x60,0x00,0xb4,0xaf,0x58,0x00,0xbe,0xaf,
- 0x04,0x00,0x10,0x24,0x0c,0x00,0x61,0x04,0xd8,0x00,0xab,0x8f,
- 0xd8,0x00,0xa9,0x8f,0xdc,0x88,0x8a,0x27,0x80,0xc8,0x09,0x00,
- 0x21,0x60,0x2a,0x03,0x40,0x79,0x16,0x00,0x21,0xf0,0xc0,0x02,
- 0x68,0x00,0xaf,0xaf,0x70,0x00,0xac,0xaf,0x3b,0x00,0x00,0x10,
- 0x21,0x90,0x00,0x00,0xd8,0x00,0xab,0x8f,0x40,0xc0,0x16,0x00,
- 0x40,0x71,0x0b,0x00,0x21,0x68,0xce,0x00,0x21,0x48,0xb8,0x01,
- 0x00,0x00,0x3e,0x85,0xff,0xff,0x01,0x24,0x2b,0x00,0xc1,0x17,
- 0xd8,0x00,0xad,0x8f,0x00,0xa3,0x0a,0x3c,0xa8,0x01,0x4c,0x95,
- 0x01,0x00,0xd9,0x26,0x04,0x00,0x2c,0x17,0x88,0x00,0xaf,0x8f,
- 0x98,0x01,0x00,0x10,0x04,0x00,0x10,0x24,0x88,0x00,0xaf,0x8f,
- 0x40,0x59,0x16,0x00,0x21,0x88,0xeb,0x01,0x14,0x01,0x2e,0x92,
- 0x21,0x90,0x00,0x00,0x20,0x00,0xcd,0x31,0x08,0x00,0xa0,0x15,
- 0x00,0x01,0x34,0x26,0x94,0x00,0xb8,0x8f,0xd8,0x00,0xa5,0x8f,
- 0x02,0x00,0xb5,0x36,0x34,0x90,0x84,0x27,0x29,0x2a,0x00,0x0c,
- 0x21,0x30,0xd8,0x02,0x00,0x01,0x34,0x26,0x55,0x00,0x09,0x24,
- 0x00,0x00,0x89,0xa2,0x04,0x00,0x10,0x24,0x01,0x00,0x4a,0x32,
- 0x40,0xc8,0x0a,0x00,0x02,0x00,0x4f,0x32,0x43,0x58,0x0f,0x00,
- 0x08,0x00,0x2c,0x37,0x25,0x70,0x8b,0x01,0x10,0x00,0x8e,0xa2,
- 0xc1,0x2a,0x00,0x0c,0xfa,0x00,0x04,0x24,0x01,0x00,0x52,0x26,
- 0xf6,0xff,0x50,0x16,0x01,0x00,0x4a,0x32,0xdc,0x00,0xa3,0x8f,
- 0xe0,0x00,0xa6,0x8f,0x77,0x01,0x00,0x10,0xa8,0x00,0xae,0x8f,
- 0xd8,0x00,0xad,0x8f,0xdc,0x88,0x89,0x27,0x80,0xc0,0x0d,0x00,
- 0x21,0x50,0x09,0x03,0x40,0xc9,0x16,0x00,0x68,0x00,0xb9,0xaf,
- 0x70,0x00,0xaa,0xaf,0x21,0x90,0x00,0x00,0x88,0x00,0xa2,0x8f,
- 0x68,0x00,0xaf,0x8f,0x40,0x61,0x1e,0x00,0x21,0x98,0x4c,0x00,
- 0x21,0xa0,0x4f,0x00,0x00,0x01,0x94,0x26,0x00,0x01,0x73,0x26,
- 0x05,0x00,0x01,0x24,0x07,0x00,0xe1,0x12,0x7f,0x00,0x01,0x24,
- 0x05,0x00,0xe1,0x12,0x0c,0x00,0x01,0x24,0x03,0x00,0xe1,0x12,
- 0x0e,0x00,0x01,0x24,0x0f,0x00,0xe1,0x16,0x00,0x00,0x00,0x00,
- 0x14,0x00,0x6b,0x92,0x00,0x00,0x00,0x00,0x01,0x00,0x6e,0x31,
- 0x0a,0x00,0xc0,0x11,0x00,0x00,0x00,0x00,0x94,0x00,0xad,0x8f,
- 0xd8,0x00,0xa5,0x8f,0x01,0x00,0xb5,0x36,0x58,0x90,0x84,0x27,
- 0x21,0x90,0x00,0x00,0x29,0x2a,0x00,0x0c,0x21,0x30,0xcd,0x03,
- 0x98,0x00,0x00,0x10,0x01,0x00,0x4e,0x32,0x14,0x00,0x98,0x92,
- 0x00,0x00,0x00,0x00,0x20,0x00,0x09,0x33,0x0a,0x00,0x20,0x15,
- 0x00,0x00,0x00,0x00,0x94,0x00,0xaa,0x8f,0xd8,0x00,0xa5,0x8f,
- 0x02,0x00,0xb5,0x36,0x80,0x90,0x84,0x27,0x21,0x90,0x00,0x00,
- 0x29,0x2a,0x00,0x0c,0x21,0x30,0xca,0x02,0x8a,0x00,0x00,0x10,
- 0x01,0x00,0x4e,0x32,0x00,0x00,0x60,0x92,0x00,0x00,0x92,0xa2,
- 0x14,0x00,0x99,0x92,0x00,0x00,0x00,0x00,0x40,0x00,0x2f,0x33,
- 0x0d,0x00,0xe0,0x11,0xc3,0x09,0x10,0x24,0x94,0x00,0xac,0x8f,
- 0xd8,0x00,0xa5,0x8f,0x04,0x00,0xb5,0x36,0xa4,0x90,0x84,0x27,
- 0x21,0x90,0x00,0x00,0x29,0x2a,0x00,0x0c,0x21,0x30,0xcc,0x02,
- 0xc1,0x2a,0x00,0x0c,0xc4,0x09,0x04,0x24,0x78,0x00,0x00,0x10,
- 0x01,0x00,0x4e,0x32,0xc3,0x09,0x10,0x24,0xd2,0x27,0x00,0x0c,
- 0x00,0x00,0x00,0x00,0x08,0x00,0x6b,0x92,0x00,0x00,0x00,0x00,
- 0x01,0x00,0x6e,0x31,0x04,0x00,0xc0,0x11,0x00,0x00,0x00,0x00,
- 0x21,0x10,0x00,0x02,0xf7,0xff,0x40,0x14,0xff,0xff,0x10,0x26,
- 0x0a,0x00,0x01,0x06,0x00,0x00,0x00,0x00,0x94,0x00,0xad,0x8f,
- 0xd8,0x00,0xa5,0x8f,0x00,0x04,0xb5,0x36,0xd8,0x90,0x84,0x27,
- 0x21,0x90,0x00,0x00,0x29,0x2a,0x00,0x0c,0x21,0x30,0xcd,0x02,
- 0x62,0x00,0x00,0x10,0x01,0x00,0x4e,0x32,0x14,0x00,0x78,0x92,
- 0x00,0x00,0x00,0x00,0x0e,0x00,0x09,0x33,0x1f,0x00,0x20,0x11,
- 0x05,0x00,0x01,0x24,0x94,0x00,0xaa,0x8f,0xd8,0x00,0xa5,0x8f,
- 0x08,0x00,0xb5,0x36,0x00,0x91,0x84,0x27,0x29,0x2a,0x00,0x0c,
- 0x21,0x30,0xca,0x03,0x14,0x00,0x79,0x92,0x00,0x00,0x00,0x00,
- 0x02,0x00,0x2f,0x33,0x03,0x00,0xe0,0x11,0x00,0x00,0x00,0x00,
- 0x29,0x2a,0x00,0x0c,0x14,0x91,0x84,0x27,0x14,0x00,0x6c,0x92,
- 0x00,0x00,0x00,0x00,0x04,0x00,0x8b,0x31,0x03,0x00,0x60,0x11,
- 0x00,0x00,0x00,0x00,0x29,0x2a,0x00,0x0c,0x24,0x91,0x84,0x27,
- 0x14,0x00,0x6e,0x92,0x00,0x00,0x00,0x00,0x08,0x00,0xcd,0x31,
- 0x03,0x00,0xa0,0x11,0x00,0x00,0x00,0x00,0x29,0x2a,0x00,0x0c,
- 0x34,0x91,0x84,0x27,0x29,0x2a,0x00,0x0c,0x44,0x91,0x84,0x27,
- 0x05,0x00,0x01,0x24,0x07,0x00,0xe1,0x12,0x7f,0x00,0x01,0x24,
- 0x05,0x00,0xe1,0x12,0x0c,0x00,0x01,0x24,0x03,0x00,0xe1,0x12,
- 0x0e,0x00,0x01,0x24,0x0f,0x00,0xe1,0x16,0x00,0x00,0x00,0x00,
- 0x14,0x00,0x78,0x92,0x00,0x00,0x00,0x00,0x01,0x00,0x09,0x33,
- 0x0a,0x00,0x20,0x15,0x00,0x00,0x00,0x00,0x94,0x00,0xaa,0x8f,
- 0xd8,0x00,0xa5,0x8f,0x01,0x00,0xb5,0x36,0x48,0x91,0x84,0x27,
- 0x21,0x90,0x00,0x00,0x29,0x2a,0x00,0x0c,0x21,0x30,0xca,0x02,
- 0x29,0x00,0x00,0x10,0x01,0x00,0x4e,0x32,0x00,0x00,0x70,0x92,
- 0x05,0x00,0x01,0x24,0x07,0x00,0xe1,0x12,0x7f,0x00,0x01,0x24,
- 0x05,0x00,0xe1,0x12,0x0c,0x00,0x01,0x24,0x03,0x00,0xe1,0x12,
- 0x0e,0x00,0x01,0x24,0x0f,0x00,0xe1,0x16,0x00,0x00,0x00,0x00,
- 0x14,0x00,0x79,0x92,0x00,0x00,0x00,0x00,0x01,0x00,0x2f,0x33,
- 0x0a,0x00,0xe0,0x11,0x00,0x00,0x00,0x00,0x94,0x00,0xac,0x8f,
- 0xd8,0x00,0xa5,0x8f,0x01,0x00,0xb5,0x36,0x70,0x91,0x84,0x27,
- 0x21,0x90,0x00,0x00,0x29,0x2a,0x00,0x0c,0x21,0x30,0xcc,0x02,
- 0x11,0x00,0x00,0x10,0x01,0x00,0x4e,0x32,0x09,0x00,0x12,0x12,
- 0x00,0x00,0x00,0x00,0x94,0x00,0xab,0x8f,0xd8,0x00,0xa5,0x8f,
- 0x10,0x00,0xb5,0x36,0x9c,0x91,0x84,0x27,0x21,0x38,0x40,0x02,
- 0x10,0x00,0xb0,0xaf,0x29,0x2a,0x00,0x0c,0x21,0x30,0xcb,0x03,
- 0x01,0x00,0x52,0x26,0x00,0x01,0x41,0x2a,0x56,0xff,0x20,0x14,
- 0x05,0x00,0x01,0x24,0x21,0x90,0x00,0x00,0x01,0x00,0x4e,0x32,
- 0x40,0x68,0x0e,0x00,0x02,0x00,0x49,0x32,0x43,0x50,0x09,0x00,
- 0x08,0x00,0xb8,0x35,0x25,0xc8,0x0a,0x03,0x10,0x00,0x99,0xa2,
- 0xc1,0x2a,0x00,0x0c,0xfa,0x00,0x04,0x24,0x18,0x00,0x60,0x92,
- 0x18,0x00,0x60,0x92,0x18,0x00,0x70,0x92,0x02,0x01,0x00,0x00,
- 0x02,0x81,0x10,0x00,0x03,0x00,0x10,0x32,0x03,0x00,0x00,0x30,
- 0x02,0x01,0x00,0x00,0x15,0x00,0x12,0x12,0x03,0x00,0x00,0x30,
- 0x94,0x00,0xaf,0x8f,0xd8,0x00,0xa5,0x8f,0x20,0x00,0xb5,0x36,
- 0xc8,0x91,0x84,0x27,0x10,0x00,0xb2,0xaf,0x14,0x00,0xb0,0xaf,
- 0x21,0x30,0xcf,0x02,0x29,0x2a,0x00,0x0c,0x21,0x38,0xcf,0x03,
- 0x26,0x88,0x12,0x02,0x01,0x00,0x2c,0x32,0x04,0x00,0x80,0x11,
- 0x02,0x00,0x2b,0x32,0x29,0x2a,0x00,0x0c,0x04,0x92,0x84,0x27,
- 0x02,0x00,0x2b,0x32,0x03,0x00,0x60,0x11,0x00,0x00,0x00,0x00,
- 0x29,0x2a,0x00,0x0c,0x10,0x92,0x84,0x27,0x01,0x00,0x52,0x26,
- 0x04,0x00,0x01,0x24,0xd7,0xff,0x41,0x16,0x01,0x00,0x4e,0x32,
- 0x08,0x00,0x0e,0x24,0x10,0x00,0x8e,0xa2,0xe1,0x21,0x00,0x0c,
- 0x21,0x20,0x00,0x00,0x01,0x00,0x0d,0x24,0x00,0xa3,0x09,0x3c,
- 0x80,0x01,0x2d,0xad,0x70,0x00,0xb8,0x8f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x04,0x8f,0xe1,0x21,0x00,0x0c,0x01,0x00,0x84,0x24,
- 0xa0,0x00,0xa7,0x8f,0x01,0x00,0x0a,0x24,0x04,0x00,0x6a,0xa2,
- 0x0d,0x00,0xe0,0x18,0x21,0x90,0x00,0x00,0x88,0x00,0xa5,0x8f,
- 0x21,0x18,0x00,0x00,0x40,0x21,0x07,0x00,0x21,0x10,0xa3,0x00,
- 0x00,0x01,0x40,0x90,0x00,0x01,0x40,0x90,0x00,0x01,0x40,0x90,
- 0x20,0x00,0x63,0x24,0x08,0x01,0x40,0x90,0x2a,0x08,0x64,0x00,
- 0xf9,0xff,0x20,0x14,0x21,0x10,0xa3,0x00,0xc0,0x09,0x10,0x24,
- 0xfc,0xff,0x10,0x26,0xff,0xff,0x00,0x16,0xfc,0xff,0x10,0x26,
- 0x00,0xa3,0x19,0x3c,0x80,0x01,0x2f,0x8f,0x01,0x00,0x01,0x24,
- 0x08,0x00,0xe1,0x11,0x08,0x00,0xce,0x33,0x94,0x00,0xac,0x8f,
- 0xd8,0x00,0xa5,0x8f,0x40,0x00,0xb5,0x36,0x1c,0x92,0x84,0x27,
- 0x29,0x2a,0x00,0x0c,0x21,0x30,0xcc,0x03,0x08,0x00,0xce,0x33,
- 0x88,0x00,0xab,0x8f,0x08,0x00,0xcd,0x25,0x43,0x48,0x0d,0x00,
- 0x21,0x88,0x69,0x01,0x00,0x00,0x39,0x92,0x07,0x00,0xd8,0x33,
- 0x01,0x00,0x0a,0x24,0x04,0x90,0x0a,0x03,0x24,0x78,0x32,0x03,
- 0x08,0x00,0xe0,0x11,0x2a,0x00,0x0e,0x24,0x94,0x00,0xac,0x8f,
- 0xd8,0x00,0xa5,0x8f,0x40,0x00,0xb5,0x36,0x3c,0x92,0x84,0x27,
- 0x29,0x2a,0x00,0x0c,0x21,0x30,0xcc,0x03,0x2a,0x00,0x0e,0x24,
- 0x00,0x00,0x8e,0xa2,0xc3,0x09,0x10,0x24,0x00,0xa3,0x0d,0x3c,
- 0x80,0x01,0xab,0x8d,0x00,0x00,0x00,0x00,0x04,0x00,0x60,0x11,
- 0x00,0x00,0x00,0x00,0xff,0xff,0x10,0x26,0xfa,0xff,0x00,0x16,
- 0x00,0xa3,0x0d,0x3c,0xc0,0x09,0x10,0x24,0xfc,0xff,0x10,0x26,
- 0xff,0xff,0x00,0x16,0xfc,0xff,0x10,0x26,0x00,0x00,0x29,0x92,
- 0x00,0x00,0x00,0x00,0x24,0x50,0x32,0x01,0x07,0x00,0x40,0x15,
- 0x00,0x00,0x00,0x00,0x94,0x00,0xb8,0x8f,0xd8,0x00,0xa5,0x8f,
- 0x40,0x00,0xb5,0x36,0x6c,0x92,0x84,0x27,0x29,0x2a,0x00,0x0c,
- 0x21,0x30,0xd8,0x03,0x00,0x00,0x60,0x92,0x08,0x00,0x60,0x92,
- 0x00,0xa3,0x19,0x3c,0x80,0x01,0x2f,0x8f,0x00,0x00,0x00,0x00,
- 0x07,0x00,0xe0,0x11,0x00,0x00,0x00,0x00,0x94,0x00,0xac,0x8f,
- 0xd8,0x00,0xa5,0x8f,0x80,0x00,0xb5,0x36,0x9c,0x92,0x84,0x27,
- 0x29,0x2a,0x00,0x0c,0x21,0x30,0xcc,0x03,0xe1,0x21,0x00,0x0c,
- 0x21,0x20,0x00,0x00,0x01,0x00,0x0e,0x24,0x00,0xa3,0x0d,0x3c,
- 0x80,0x01,0xae,0xad,0x70,0x00,0xab,0x8f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x64,0x8d,0xe1,0x21,0x00,0x0c,0x01,0x00,0x84,0x24,
- 0xc0,0x09,0x10,0x24,0xfc,0xff,0x10,0x26,0xff,0xff,0x00,0x16,
- 0xfc,0xff,0x10,0x26,0x00,0xa3,0x09,0x3c,0x80,0x01,0x2a,0x8d,
- 0x01,0x00,0x01,0x24,0x07,0x00,0x41,0x11,0x00,0x00,0x00,0x00,
- 0x94,0x00,0xb8,0x8f,0xd8,0x00,0xa5,0x8f,0x00,0x01,0xb5,0x36,
- 0xc4,0x92,0x84,0x27,0x29,0x2a,0x00,0x0c,0x21,0x30,0xd8,0x03,
- 0x00,0x00,0x39,0x92,0x00,0x00,0x00,0x00,0x24,0x78,0x32,0x03,
- 0x07,0x00,0xe0,0x11,0x00,0x00,0x00,0x00,0x94,0x00,0xac,0x8f,
- 0xd8,0x00,0xa5,0x8f,0x40,0x00,0xb5,0x36,0xec,0x92,0x84,0x27,
- 0x29,0x2a,0x00,0x0c,0x21,0x30,0xcc,0x03,0xe1,0x21,0x00,0x0c,
- 0x21,0x20,0x00,0x00,0xdc,0x00,0xa3,0x8f,0xe0,0x00,0xa6,0x8f,
- 0x04,0x00,0x10,0x24,0xa8,0x00,0xae,0x8f,0x01,0x00,0xd6,0x26,
- 0x2a,0x08,0xce,0x02,0x49,0xfe,0x20,0x14,0x00,0x00,0x00,0x00,
- 0x54,0x00,0xb1,0x8f,0x50,0x00,0xb2,0x8f,0x60,0x00,0xb4,0x8f,
- 0x58,0x00,0xbe,0x8f,0x00,0x00,0x00,0x00,0xbc,0x00,0xad,0x8f,
- 0x00,0x00,0x00,0x00,0x25,0x58,0xb5,0x01,0x3a,0x00,0x60,0x15,
- 0xbc,0x00,0xab,0xaf,0x03,0x00,0x61,0x04,0x50,0x00,0xb2,0xaf,
- 0x19,0x00,0x00,0x10,0x01,0x00,0x12,0x24,0xac,0x00,0xa9,0x8f,
- 0xa8,0x00,0xaa,0x8f,0x21,0x90,0x00,0x00,0x2a,0x08,0x2a,0x01,
- 0x13,0x00,0x20,0x10,0x21,0xb0,0x20,0x01,0xd8,0x00,0xb8,0x8f,
- 0x54,0x00,0xb1,0xaf,0x40,0xc9,0x18,0x00,0x21,0x78,0xd9,0x00,
- 0x40,0x60,0x16,0x00,0x21,0x88,0xec,0x01,0x00,0x00,0x2e,0x86,
- 0xff,0xff,0x01,0x24,0x03,0x00,0xc1,0x11,0xa8,0x00,0xad,0x8f,
- 0x01,0x00,0x52,0x26,0xa8,0x00,0xad,0x8f,0x01,0x00,0xd6,0x26,
- 0x2a,0x08,0xcd,0x02,0xf7,0xff,0x20,0x14,0x02,0x00,0x31,0x26,
- 0x54,0x00,0xb1,0x8f,0x00,0x00,0x00,0x00,0x1a,0x00,0x40,0x12,
- 0x00,0x00,0x00,0x00,0x1c,0x93,0x84,0x27,0x29,0x2a,0x00,0x0c,
- 0x21,0x28,0x40,0x02,0x9c,0x00,0xab,0x8f,0x01,0x00,0x01,0x24,
- 0x11,0x00,0x61,0x15,0x00,0x00,0x00,0x00,0xe0,0x00,0xa9,0x8f,
- 0x00,0x00,0x00,0x00,0x0d,0x00,0x20,0x11,0x00,0x00,0x00,0x00,
- 0xd8,0x00,0xaa,0x8f,0xa0,0x00,0xaf,0x8f,0x40,0xc1,0x0a,0x00,
- 0x21,0xc8,0x38,0x01,0x40,0x60,0x0f,0x00,0x21,0x70,0x2c,0x03,
- 0x00,0x00,0xcd,0x85,0xff,0xff,0x01,0x24,0x03,0x00,0xa1,0x11,
- 0x00,0x00,0x00,0x00,0x29,0x2a,0x00,0x0c,0x28,0x93,0x84,0x27,
- 0x65,0x2a,0x00,0x0c,0x00,0x00,0x00,0x00,0x50,0x00,0xb2,0x8f,
- 0x00,0x00,0x00,0x00,0x5c,0x00,0xb5,0x8f,0x5a,0x00,0x00,0x10,
- 0x00,0x00,0x00,0x00,0x58,0x00,0xe0,0x14,0x00,0x00,0x00,0x00,
- 0xe8,0x00,0xab,0x8f,0x00,0x00,0x00,0x00,0x03,0x00,0x60,0x11,
- 0x00,0x00,0x00,0x00,0xad,0x2a,0x00,0x0c,0x00,0x00,0x00,0x00,
- 0xd8,0x00,0xa5,0x8f,0x29,0x2a,0x00,0x0c,0x34,0x93,0x84,0x27,
- 0x4d,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x4b,0x00,0xe0,0x14,
- 0x00,0x00,0x00,0x00,0xe8,0x00,0xaa,0x8f,0x00,0x00,0x00,0x00,
- 0x03,0x00,0x40,0x11,0x00,0x00,0x00,0x00,0xad,0x2a,0x00,0x0c,
- 0x00,0x00,0x00,0x00,0xd8,0x00,0xa5,0x8f,0x50,0x93,0x84,0x27,
- 0x29,0x2a,0x00,0x0c,0x21,0x30,0x60,0x02,0x3f,0x00,0x00,0x10,
- 0x00,0x00,0x00,0x00,0x04,0x00,0x43,0x14,0x09,0x00,0x41,0x28,
- 0x2d,0xf9,0x00,0x10,0x02,0x00,0x10,0x24,0x09,0x00,0x41,0x28,
- 0x23,0x00,0x20,0x10,0x04,0x00,0x01,0x24,0x1b,0xf8,0x41,0x10,
- 0x05,0x00,0x41,0x28,0x10,0x00,0x20,0x10,0x06,0x00,0x01,0x24,
- 0x02,0x00,0x10,0x24,0x23,0xf9,0x50,0x10,0x03,0x00,0x41,0x28,
- 0x05,0x00,0x20,0x10,0x01,0x00,0x01,0x24,0x20,0xf9,0x41,0x10,
- 0xe8,0x00,0xad,0x8f,0xdf,0xff,0x00,0x10,0x00,0x00,0x00,0x00,
- 0x03,0x00,0x01,0x24,0x1b,0xf9,0x41,0x10,0xe8,0x00,0xad,0x8f,
- 0xda,0xff,0x00,0x10,0x00,0x00,0x00,0x00,0x06,0x00,0x01,0x24,
- 0x04,0x00,0x41,0x14,0x07,0x00,0x41,0x28,0x13,0xf9,0x00,0x10,
- 0x02,0x00,0x10,0x24,0x07,0x00,0x41,0x28,0x05,0x00,0x20,0x10,
- 0x05,0x00,0x01,0x24,0xd0,0xff,0x41,0x14,0x00,0x00,0x00,0x00,
- 0x0c,0xf9,0x00,0x10,0x02,0x00,0x10,0x24,0xcc,0xff,0x44,0x14,
- 0x00,0x00,0x00,0x00,0x08,0xf9,0x00,0x10,0x02,0x00,0x10,0x24,
- 0x3f,0x00,0x01,0x24,0xba,0xff,0x41,0x10,0x40,0x00,0x41,0x28,
- 0x0c,0x00,0x20,0x10,0x0e,0x00,0x01,0x24,0x04,0x00,0x41,0x14,
- 0x0f,0x00,0x41,0x28,0xff,0xf8,0x00,0x10,0x02,0x00,0x10,0x24,
- 0x0f,0x00,0x41,0x28,0xbe,0xff,0x20,0x10,0x0c,0x00,0x01,0x24,
- 0xee,0xf7,0x41,0x10,0xdc,0x00,0xad,0x8f,0xba,0xff,0x00,0x10,
- 0x00,0x00,0x00,0x00,0x7f,0x00,0x01,0x24,0xb7,0xff,0x41,0x14,
- 0x00,0x00,0x00,0x00,0xf3,0xf8,0x00,0x10,0x02,0x00,0x10,0x24,
- 0xe1,0x21,0x00,0x0c,0x01,0x04,0x04,0x24,0x4c,0x00,0xbf,0x8f,
- 0xbc,0x00,0xa2,0x8f,0x3c,0x00,0xb0,0x8f,0x40,0x00,0xb3,0x8f,
- 0x44,0x00,0xb6,0x8f,0x48,0x00,0xb7,0x8f,0x08,0x00,0xe0,0x03,
- 0xd8,0x00,0xbd,0x27,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xc8,0xff,0xbd,0x27,0x30,0x00,0xb6,0xaf,0x28,0x00,0xb4,0xaf,
- 0x2c,0x00,0xb5,0xaf,0x24,0x00,0xb3,0xaf,0x18,0x00,0xb0,0xaf,
- 0x1c,0x00,0xb1,0xaf,0x34,0x00,0xbf,0xaf,0x20,0x00,0xb2,0xaf,
- 0x04,0x00,0x11,0x24,0x00,0xa1,0x10,0x3c,0x90,0x93,0x93,0x27,
- 0x21,0xa8,0x00,0x00,0xcc,0x93,0x94,0x27,0x0f,0x00,0x16,0x24,
- 0x21,0x90,0x00,0x00,0xcc,0x97,0x80,0xaf,0x21,0x18,0x00,0x00,
- 0x21,0x10,0x60,0x02,0x00,0x00,0x4f,0x94,0x02,0x00,0x4e,0x94,
- 0x21,0xc0,0xf0,0x01,0x00,0x00,0x0e,0xa3,0xcc,0x97,0x80,0xaf,
- 0x04,0x00,0x48,0x94,0x06,0x00,0x59,0x94,0x21,0x48,0x10,0x01,
- 0x00,0x00,0x39,0xa1,0xcc,0x97,0x80,0xaf,0x08,0x00,0x4b,0x94,
- 0x0a,0x00,0x4a,0x94,0x21,0x60,0x70,0x01,0x00,0x00,0x8a,0xa1,
- 0xcc,0x97,0x80,0xaf,0x0c,0x00,0x4f,0x94,0x0e,0x00,0x4d,0x94,
- 0x04,0x00,0x42,0x24,0x04,0x00,0x42,0x24,0x21,0x70,0xf0,0x01,
- 0x04,0x00,0x42,0x24,0x04,0x00,0x63,0x24,0x00,0x00,0xcd,0xa1,
- 0xcc,0x97,0x80,0xaf,0xe7,0xff,0x71,0x14,0x04,0x00,0x42,0x24,
- 0x00,0x00,0x58,0x94,0x00,0x00,0x00,0x00,0x21,0x40,0x18,0x02,
- 0x00,0x00,0x19,0x91,0x00,0x00,0x00,0x00,0x40,0x00,0x29,0x33,
- 0x08,0x00,0x20,0x11,0x64,0x00,0x41,0x2a,0x04,0x00,0x20,0x14,
- 0x00,0x00,0x00,0x00,0x21,0x20,0x80,0x02,0x35,0x20,0x00,0x0c,
- 0x47,0x00,0x05,0x24,0xd5,0xff,0x00,0x10,0x01,0x00,0x52,0x26,
- 0x05,0x00,0xb5,0x26,0xd1,0xff,0xb6,0x16,0x14,0x00,0x73,0x26,
- 0x34,0x00,0xbf,0x8f,0x18,0x00,0xb0,0x8f,0x1c,0x00,0xb1,0x8f,
- 0x20,0x00,0xb2,0x8f,0x24,0x00,0xb3,0x8f,0x28,0x00,0xb4,0x8f,
- 0x2c,0x00,0xb5,0x8f,0x30,0x00,0xb6,0x8f,0x08,0x00,0xe0,0x03,
- 0x38,0x00,0xbd,0x27,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x42,0x54,0x34,0x30,0x42,0x54,0x34,0x31,
- 0x42,0x54,0x34,0x32,0x42,0x54,0x34,0x33,0x0a,0x0d,0x44,0x69,
- 0x67,0x69,0x42,0x6f,0x61,0x72,0x64,0x20,0x53,0x6d,0x61,0x72,
- 0x74,0x43,0x6f,0x6d,0x6d,0x20,0x42,0x49,0x4f,0x53,0x00,0x00,
- 0x0a,0x0d,0x52,0x41,0x4d,0x20,0x73,0x69,0x7a,0x65,0x3a,0x20,
- 0x25,0x30,0x38,0x78,0x00,0x00,0x00,0x00,0x0a,0x0d,0x43,0x50,
- 0x55,0x20,0x74,0x65,0x73,0x74,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
- 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x00,0x00,0x0a,0x0d,0x63,0x6f,
- 0x64,0x65,0x20,0x63,0x68,0x65,0x63,0x6b,0x73,0x75,0x6d,0x20,
- 0x74,0x65,0x73,0x74,0x2e,0x2e,0x00,0x00,0x25,0x45,0x20,0x62,
- 0x61,0x64,0x20,0x63,0x6f,0x64,0x65,0x20,0x63,0x68,0x65,0x63,
- 0x6b,0x73,0x75,0x6d,0x3a,0x20,0x25,0x30,0x38,0x78,0x00,0x00,
- 0x0d,0x0a,0x00,0x00,0x53,0x69,0x6d,0x70,0x6c,0x65,0x0a,0x0d,
- 0x00,0x00,0x00,0x00,0x48,0x69,0x67,0x68,0x0a,0x0d,0x00,0x00,
- 0x43,0x6f,0x6d,0x70,0x6c,0x65,0x78,0x0a,0x0d,0x00,0x00,0x00,
- 0x25,0x45,0x20,0x47,0x61,0x70,0x20,0x69,0x6e,0x20,0x45,0x42,
- 0x49,0x20,0x73,0x65,0x71,0x75,0x65,0x6e,0x63,0x65,0x0a,0x0d,
- 0x00,0x00,0x00,0x00,0x2e,0x2e,0x2f,0x73,0x6d,0x61,0x72,0x74,
- 0x62,0x69,0x6f,0x73,0x2e,0x63,0x00,0x00,0x2e,0x2e,0x2f,0x73,
- 0x6d,0x61,0x72,0x74,0x62,0x69,0x6f,0x73,0x2e,0x63,0x00,0x00,
- 0x90,0xde,0x00,0xa0,0x0d,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
- 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
- 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
- 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
- 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
- 0x20,0x20,0x20,0x20,0x50,0x61,0x73,0x73,0x20,0x25,0x64,0x20,
- 0x20,0x20,0x20,0x20,0x00,0x00,0x00,0x00,0x2d,0x2d,0x2d,0x20,
- 0x53,0x6d,0x61,0x72,0x74,0x43,0x6f,0x6d,0x6d,0x20,0x44,0x69,
- 0x61,0x67,0x6e,0x6f,0x73,0x74,0x69,0x63,0x73,0x20,0x2d,0x2d,
- 0x2d,0x0a,0x0d,0x00,0x41,0x20,0x3d,0x20,0x41,0x6c,0x6c,0x20,
- 0x74,0x65,0x73,0x74,0x73,0x0a,0x0d,0x00,0x45,0x20,0x3d,0x20,
- 0x41,0x6c,0x6c,0x20,0x45,0x42,0x49,0x20,0x74,0x65,0x73,0x74,
- 0x73,0x0a,0x0d,0x00,0x31,0x20,0x3d,0x20,0x54,0x69,0x6d,0x65,
- 0x72,0x20,0x74,0x65,0x73,0x74,0x0a,0x0d,0x00,0x00,0x00,0x00,
- 0x32,0x20,0x3d,0x20,0x52,0x41,0x4d,0x20,0x74,0x65,0x73,0x74,
- 0x0a,0x0d,0x00,0x00,0x33,0x20,0x3d,0x20,0x45,0x42,0x49,0x20,
- 0x69,0x6e,0x74,0x65,0x72,0x6e,0x61,0x6c,0x20,0x6c,0x6f,0x6f,
- 0x70,0x62,0x61,0x63,0x6b,0x20,0x74,0x65,0x73,0x74,0x0a,0x0d,
- 0x00,0x00,0x00,0x00,0x34,0x20,0x3d,0x20,0x45,0x42,0x49,0x20,
- 0x65,0x78,0x74,0x65,0x72,0x6e,0x61,0x6c,0x20,0x6c,0x6f,0x6f,
- 0x70,0x62,0x61,0x63,0x6b,0x20,0x74,0x65,0x73,0x74,0x0a,0x0d,
- 0x00,0x00,0x00,0x00,0x24,0x20,0x3d,0x20,0x45,0x42,0x49,0x20,
- 0x73,0x69,0x6e,0x67,0x6c,0x65,0x20,0x65,0x78,0x74,0x65,0x72,
- 0x6e,0x61,0x6c,0x20,0x70,0x6f,0x72,0x74,0x20,0x74,0x65,0x73,
- 0x74,0x0a,0x0d,0x00,0x35,0x20,0x3d,0x20,0x53,0x70,0x65,0x63,
- 0x69,0x61,0x6c,0x20,0x50,0x41,0x4c,0x20,0x74,0x65,0x73,0x74,
- 0x0a,0x0d,0x00,0x00,0x74,0x2f,0x5e,0x54,0x2f,0x54,0x20,0x3d,
- 0x20,0x48,0x6f,0x73,0x74,0x20,0x73,0x69,0x64,0x65,0x20,0x20,
- 0x38,0x2f,0x31,0x36,0x2f,0x33,0x32,0x2d,0x62,0x69,0x74,0x20,
- 0x52,0x41,0x4d,0x20,0x74,0x65,0x73,0x74,0x20,0x73,0x74,0x61,
- 0x72,0x74,0x2f,0x73,0x74,0x6f,0x70,0x0a,0x0d,0x00,0x00,0x00,
- 0x69,0x20,0x3d,0x20,0x63,0x61,0x72,0x64,0x2d,0x74,0x6f,0x2d,
- 0x68,0x6f,0x73,0x74,0x20,0x69,0x6e,0x74,0x65,0x72,0x72,0x75,
- 0x70,0x74,0x20,0x74,0x65,0x73,0x74,0x0a,0x0d,0x00,0x00,0x00,
- 0x64,0x5e,0x44,0x44,0x29,0x75,0x6d,0x70,0x2c,0x20,0x72,0x5e,
- 0x52,0x52,0x29,0x65,0x61,0x64,0x2c,0x20,0x77,0x5e,0x57,0x57,
- 0x29,0x72,0x69,0x74,0x65,0x2c,0x20,0x66,0x5e,0x46,0x46,0x29,
- 0x69,0x6c,0x6c,0x20,0x52,0x41,0x4d,0x0a,0x0d,0x00,0x00,0x00,
- 0x0d,0x0a,0x4e,0x75,0x6d,0x62,0x65,0x72,0x20,0x6f,0x66,0x20,
- 0x74,0x69,0x6d,0x65,0x73,0x20,0x74,0x6f,0x20,0x64,0x6f,0x20,
- 0x61,0x6c,0x6c,0x20,0x74,0x65,0x73,0x74,0x73,0x3a,0x20,0x00,
- 0x0a,0x00,0x00,0x00,0x0a,0x0d,0x20,0x20,0x54,0x65,0x73,0x74,
- 0x73,0x20,0x73,0x74,0x6f,0x70,0x70,0x65,0x64,0x0a,0x0d,0x00,
- 0x54,0x6f,0x74,0x61,0x6c,0x20,0x70,0x61,0x73,0x73,0x65,0x73,
- 0x3a,0x20,0x25,0x64,0x0a,0x0d,0x00,0x00,0x20,0x20,0x54,0x65,
- 0x73,0x74,0x20,0x25,0x64,0x3a,0x20,0x25,0x64,0x20,0x70,0x61,
- 0x73,0x73,0x20,0x25,0x64,0x20,0x66,0x61,0x69,0x6c,0x75,0x72,
- 0x65,0x73,0x0a,0x0d,0x00,0x00,0x00,0x00,0x20,0x20,0x28,0x70,
- 0x72,0x65,0x73,0x73,0x20,0x61,0x6e,0x79,0x20,0x6b,0x65,0x79,
- 0x20,0x74,0x6f,0x20,0x73,0x74,0x6f,0x70,0x29,0x0a,0x00,0x00,
- 0x0a,0x0d,0x20,0x20,0x54,0x69,0x6d,0x65,0x72,0x20,0x74,0x65,
- 0x73,0x74,0x20,0x73,0x74,0x6f,0x70,0x70,0x65,0x64,0x0a,0x0d,
- 0x00,0x00,0x00,0x00,0x54,0x6f,0x74,0x61,0x6c,0x20,0x70,0x61,
- 0x73,0x73,0x65,0x73,0x3a,0x20,0x25,0x64,0x0a,0x0d,0x00,0x00,
- 0x20,0x20,0x54,0x65,0x73,0x74,0x20,0x31,0x3a,0x20,0x25,0x64,
- 0x20,0x70,0x61,0x73,0x73,0x20,0x25,0x64,0x20,0x66,0x61,0x69,
- 0x6c,0x75,0x72,0x65,0x73,0x0a,0x0d,0x00,0x53,0x74,0x61,0x72,
- 0x74,0x20,0x41,0x64,0x64,0x72,0x65,0x73,0x73,0x3a,0x20,0x00,
- 0x0a,0x0d,0x45,0x6e,0x64,0x20,0x41,0x64,0x64,0x72,0x65,0x73,
- 0x73,0x3a,0x20,0x00,0x0a,0x0d,0x00,0x00,0x20,0x20,0x28,0x70,
- 0x72,0x65,0x73,0x73,0x20,0x61,0x6e,0x79,0x20,0x6b,0x65,0x79,
- 0x20,0x74,0x6f,0x20,0x73,0x74,0x6f,0x70,0x29,0x0a,0x00,0x00,
- 0x0a,0x0d,0x20,0x20,0x52,0x41,0x4d,0x20,0x74,0x65,0x73,0x74,
- 0x20,0x73,0x74,0x6f,0x70,0x70,0x65,0x64,0x0a,0x0d,0x00,0x00,
- 0x54,0x6f,0x74,0x61,0x6c,0x20,0x70,0x61,0x73,0x73,0x65,0x73,
- 0x3a,0x20,0x25,0x64,0x0a,0x0d,0x00,0x00,0x20,0x20,0x54,0x65,
- 0x73,0x74,0x20,0x32,0x3a,0x20,0x25,0x64,0x20,0x70,0x61,0x73,
- 0x73,0x20,0x25,0x64,0x20,0x66,0x61,0x69,0x6c,0x75,0x72,0x65,
- 0x73,0x0a,0x0d,0x00,0x20,0x20,0x45,0x42,0x49,0x20,0x73,0x69,
- 0x6e,0x67,0x6c,0x65,0x20,0x65,0x78,0x74,0x65,0x72,0x6e,0x61,
- 0x6c,0x20,0x6c,0x6f,0x6f,0x70,0x62,0x61,0x63,0x6b,0x20,0x74,
- 0x65,0x73,0x74,0x0a,0x0d,0x00,0x00,0x00,0x20,0x20,0x45,0x6e,
- 0x74,0x65,0x72,0x20,0x45,0x42,0x49,0x20,0x6e,0x75,0x6d,0x62,
- 0x65,0x72,0x20,0x74,0x6f,0x20,0x74,0x65,0x73,0x74,0x20,0x28,
- 0x30,0x2d,0x33,0x29,0x20,0x00,0x00,0x00,0x0a,0x0d,0x00,0x00,
- 0x20,0x20,0x45,0x6e,0x74,0x65,0x72,0x20,0x70,0x6f,0x72,0x74,
- 0x20,0x74,0x6f,0x20,0x74,0x65,0x73,0x74,0x20,0x28,0x31,0x2d,
- 0x31,0x36,0x29,0x20,0x00,0x00,0x00,0x00,0x0a,0x0d,0x20,0x20,
- 0x28,0x70,0x72,0x65,0x73,0x73,0x20,0x61,0x6e,0x79,0x20,0x6b,
- 0x65,0x79,0x20,0x74,0x6f,0x20,0x73,0x74,0x6f,0x70,0x29,0x0a,
- 0x00,0x00,0x00,0x00,0x0a,0x0d,0x20,0x20,0x45,0x42,0x49,0x20,
- 0x74,0x65,0x73,0x74,0x20,0x73,0x74,0x6f,0x70,0x70,0x65,0x64,
- 0x0a,0x0d,0x00,0x00,0x54,0x6f,0x74,0x61,0x6c,0x20,0x70,0x61,
- 0x73,0x73,0x65,0x73,0x3a,0x20,0x25,0x64,0x0a,0x0d,0x00,0x00,
- 0x20,0x20,0x54,0x65,0x73,0x74,0x20,0x25,0x63,0x3a,0x20,0x25,
- 0x64,0x20,0x70,0x61,0x73,0x73,0x20,0x25,0x64,0x20,0x66,0x61,
- 0x69,0x6c,0x75,0x72,0x65,0x73,0x0a,0x0d,0x00,0x00,0x00,0x00,
- 0x20,0x20,0x45,0x42,0x49,0x20,0x00,0x00,0x65,0x78,0x00,0x00,
- 0x69,0x6e,0x00,0x00,0x74,0x65,0x72,0x6e,0x61,0x6c,0x20,0x6c,
- 0x6f,0x6f,0x70,0x62,0x61,0x63,0x6b,0x20,0x74,0x65,0x73,0x74,
- 0x0a,0x0d,0x00,0x00,0x20,0x20,0x45,0x6e,0x74,0x65,0x72,0x20,
- 0x45,0x42,0x49,0x20,0x6e,0x75,0x6d,0x62,0x65,0x72,0x20,0x74,
- 0x6f,0x20,0x74,0x65,0x73,0x74,0x20,0x28,0x30,0x2d,0x33,0x29,
- 0x20,0x6f,0x72,0x20,0x27,0x41,0x27,0x20,0x66,0x6f,0x72,0x20,
- 0x61,0x6c,0x6c,0x0a,0x0d,0x00,0x00,0x00,0x20,0x20,0x28,0x70,
- 0x72,0x65,0x73,0x73,0x20,0x61,0x6e,0x79,0x20,0x6b,0x65,0x79,
- 0x20,0x74,0x6f,0x20,0x73,0x74,0x6f,0x70,0x29,0x0a,0x00,0x00,
- 0x0a,0x0d,0x20,0x20,0x45,0x42,0x49,0x20,0x74,0x65,0x73,0x74,
- 0x20,0x73,0x74,0x6f,0x70,0x70,0x65,0x64,0x0a,0x0d,0x00,0x00,
- 0x54,0x6f,0x74,0x61,0x6c,0x20,0x70,0x61,0x73,0x73,0x65,0x73,
- 0x3a,0x20,0x25,0x64,0x0a,0x0d,0x00,0x00,0x20,0x20,0x54,0x65,
- 0x73,0x74,0x20,0x25,0x63,0x3a,0x20,0x25,0x64,0x20,0x70,0x61,
- 0x73,0x73,0x20,0x25,0x64,0x20,0x66,0x61,0x69,0x6c,0x75,0x72,
- 0x65,0x73,0x0a,0x0d,0x00,0x00,0x00,0x00,0x20,0x20,0x28,0x70,
- 0x72,0x65,0x73,0x73,0x20,0x61,0x6e,0x79,0x20,0x6b,0x65,0x79,
- 0x20,0x74,0x6f,0x20,0x73,0x74,0x6f,0x70,0x29,0x0a,0x00,0x00,
- 0x0d,0x50,0x41,0x4c,0x20,0x74,0x65,0x73,0x74,0x2e,0x2e,0x2e,
- 0x2e,0x2e,0x00,0x00,0x0a,0x0d,0x46,0x41,0x49,0x4c,0x45,0x44,
- 0x20,0x2d,0x20,0x74,0x65,0x6c,0x6c,0x20,0x54,0x4a,0x20,0x43,
- 0x61,0x72,0x74,0x65,0x72,0x20,0x61,0x74,0x20,0x39,0x34,0x33,
- 0x2d,0x35,0x33,0x36,0x31,0x0a,0x0d,0x00,0x0a,0x0d,0x20,0x20,
- 0x50,0x41,0x4c,0x20,0x74,0x65,0x73,0x74,0x20,0x73,0x74,0x6f,
- 0x70,0x70,0x65,0x64,0x0a,0x0d,0x00,0x00,0x54,0x6f,0x74,0x61,
- 0x6c,0x20,0x70,0x61,0x73,0x73,0x65,0x73,0x3a,0x20,0x25,0x64,
- 0x0a,0x0d,0x00,0x00,0x20,0x20,0x54,0x65,0x73,0x74,0x20,0x35,
- 0x3a,0x20,0x25,0x64,0x20,0x70,0x61,0x73,0x73,0x20,0x25,0x64,
- 0x20,0x66,0x61,0x69,0x6c,0x75,0x72,0x65,0x73,0x0a,0x0d,0x00,
- 0x43,0x61,0x72,0x64,0x2d,0x74,0x6f,0x2d,0x68,0x6f,0x73,0x74,
- 0x20,0x69,0x6e,0x74,0x65,0x72,0x72,0x75,0x70,0x74,0x20,0x74,
- 0x65,0x73,0x74,0x2e,0x2e,0x2e,0x00,0x00,0x48,0x65,0x78,0x20,
- 0x41,0x64,0x64,0x72,0x65,0x73,0x73,0x3a,0x20,0x00,0x00,0x00,
- 0x0a,0x0d,0x00,0x00,0x25,0x30,0x38,0x78,0x3a,0x20,0x00,0x00,
- 0x0a,0x0d,0x00,0x00,0x25,0x30,0x32,0x78,0x0a,0x0d,0x00,0x00,
- 0x25,0x30,0x34,0x78,0x0a,0x0d,0x00,0x00,0x25,0x30,0x38,0x78,
- 0x0a,0x0d,0x00,0x00,0x38,0x00,0x00,0x00,0x31,0x36,0x00,0x00,
- 0x33,0x32,0x00,0x00,0x2d,0x62,0x69,0x74,0x20,0x48,0x65,0x78,
- 0x20,0x56,0x61,0x6c,0x75,0x65,0x3a,0x20,0x00,0x00,0x00,0x00,
- 0x0a,0x0d,0x00,0x00,0x48,0x65,0x78,0x20,0x4c,0x65,0x6e,0x67,
- 0x74,0x68,0x3a,0x20,0x00,0x00,0x00,0x00,0x0a,0x0d,0x00,0x00,
- 0x50,0x72,0x65,0x73,0x73,0x20,0x27,0x3f,0x27,0x20,0x66,0x6f,
- 0x72,0x20,0x64,0x69,0x61,0x67,0x6e,0x6f,0x73,0x74,0x69,0x63,
- 0x73,0x20,0x6d,0x65,0x6e,0x75,0x0a,0x0d,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xe8,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x41,0x42,
- 0x43,0x44,0x45,0x46,0x00,0x00,0x00,0x00,0x0a,0x0d,0x45,0x52,
- 0x52,0x4f,0x52,0x20,0x2d,0x00,0x00,0x00,0x30,0x78,0x00,0x00,
- 0x70,0x61,0x73,0x73,0x65,0x64,0x00,0x00,0x25,0x30,0x32,0x58,
- 0x20,0x00,0x00,0x00,0x0d,0x54,0x69,0x6d,0x65,0x72,0x20,0x74,
- 0x65,0x73,0x74,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
- 0x2e,0x00,0x00,0x00,0x25,0x45,0x20,0x63,0x61,0x6e,0x27,0x74,
- 0x20,0x73,0x65,0x74,0x20,0x75,0x70,0x20,0x74,0x69,0x6d,0x65,
- 0x72,0x20,0x30,0x0a,0x0d,0x00,0x00,0x00,0x25,0x45,0x20,0x63,
- 0x61,0x6e,0x27,0x74,0x20,0x73,0x65,0x74,0x20,0x75,0x70,0x20,
- 0x74,0x69,0x6d,0x65,0x72,0x20,0x32,0x0a,0x0d,0x00,0x00,0x00,
- 0x25,0x45,0x20,0x74,0x69,0x6d,0x65,0x72,0x20,0x32,0x20,0x62,
- 0x61,0x64,0x20,0x63,0x6f,0x75,0x6e,0x74,0x0a,0x0d,0x00,0x00,
- 0x25,0x45,0x20,0x74,0x69,0x6d,0x65,0x72,0x20,0x30,0x20,0x49,
- 0x4e,0x54,0x20,0x73,0x74,0x75,0x63,0x6b,0x20,0x6f,0x6e,0x0a,
- 0x0d,0x00,0x00,0x00,0x25,0x45,0x20,0x74,0x69,0x6d,0x65,0x72,
- 0x20,0x30,0x20,0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,
- 0x69,0x6e,0x74,0x65,0x72,0x72,0x75,0x70,0x74,0x0a,0x0d,0x00,
- 0x25,0x45,0x20,0x63,0x61,0x6e,0x27,0x74,0x20,0x73,0x65,0x74,
- 0x20,0x75,0x70,0x20,0x74,0x69,0x6d,0x65,0x72,0x20,0x30,0x0a,
- 0x0d,0x00,0x00,0x00,0x25,0x45,0x20,0x74,0x69,0x6d,0x65,0x72,
- 0x20,0x30,0x20,0x49,0x4e,0x54,0x20,0x77,0x6f,0x6e,0x27,0x74,
- 0x20,0x67,0x6f,0x20,0x61,0x77,0x61,0x79,0x0a,0x0d,0x00,0x00,
- 0x25,0x45,0x20,0x63,0x61,0x6e,0x27,0x74,0x20,0x73,0x65,0x74,
- 0x20,0x75,0x70,0x20,0x74,0x69,0x6d,0x65,0x72,0x20,0x30,0x0a,
- 0x0d,0x00,0x00,0x00,0x25,0x45,0x20,0x63,0x61,0x6e,0x27,0x74,
- 0x20,0x73,0x65,0x74,0x20,0x75,0x70,0x20,0x74,0x69,0x6d,0x65,
- 0x72,0x20,0x32,0x0a,0x0d,0x00,0x00,0x00,0x24,0xe6,0x00,0xa0,
- 0x25,0x45,0x20,0x54,0x25,0x64,0x20,0x77,0x72,0x6f,0x74,0x65,
- 0x20,0x25,0x30,0x38,0x78,0x20,0x72,0x65,0x61,0x64,0x20,0x25,
- 0x30,0x38,0x78,0x20,0x61,0x74,0x20,0x25,0x30,0x38,0x78,0x0a,
- 0x0d,0x00,0x00,0x00,0x0d,0x52,0x41,0x4d,0x20,0x74,0x65,0x73,
- 0x74,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
- 0x2e,0x25,0x30,0x38,0x78,0x2d,0x25,0x30,0x38,0x78,0x20,0x00,
- 0x00,0x10,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x40,0x00,0x00,
- 0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x01,0x02,
- 0x04,0x08,0x10,0x20,0x40,0x80,0x7f,0xbf,0xdf,0xef,0xf7,0xfb,
- 0xfd,0xfe,0x55,0xaa,0xf0,0x0f,0x00,0x00,0x0d,0x54,0x65,0x73,
- 0x74,0x20,0x45,0x42,0x49,0x20,0x25,0x64,0x20,0x50,0x41,0x52,
- 0x41,0x2d,0x25,0x30,0x32,0x58,0x2e,0x2e,0x00,0x00,0x00,0x00,
- 0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x61,
- 0x72,0x61,0x6c,0x6c,0x65,0x6c,0x20,0x70,0x6f,0x72,0x74,0x20,
- 0x54,0x50,0x52,0x20,0x77,0x72,0x6f,0x74,0x65,0x20,0x30,0x78,
- 0x30,0x30,0x20,0x30,0x78,0x46,0x46,0x20,0x72,0x65,0x61,0x64,
- 0x20,0x25,0x30,0x32,0x78,0x20,0x25,0x30,0x32,0x78,0x0a,0x00,
- 0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x61,
- 0x72,0x61,0x6c,0x6c,0x65,0x6c,0x20,0x70,0x6f,0x72,0x74,0x20,
- 0x73,0x65,0x6e,0x64,0x20,0x25,0x30,0x32,0x78,0x20,0x72,0x65,
- 0x63,0x65,0x69,0x76,0x65,0x64,0x20,0x25,0x30,0x32,0x78,0x0a,
- 0x00,0x00,0x00,0x00,0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,
- 0x64,0x20,0x70,0x61,0x72,0x61,0x6c,0x6c,0x65,0x6c,0x20,0x70,
- 0x6f,0x72,0x74,0x20,0x69,0x6e,0x74,0x65,0x72,0x72,0x75,0x70,
- 0x74,0x20,0x73,0x74,0x75,0x63,0x6b,0x20,0x6f,0x6e,0x0a,0x00,
- 0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x61,
- 0x72,0x61,0x6c,0x6c,0x65,0x6c,0x20,0x70,0x6f,0x72,0x74,0x20,
- 0x69,0x6e,0x74,0x65,0x72,0x72,0x75,0x70,0x74,0x20,0x6d,0x61,
- 0x73,0x6b,0x20,0x6f,0x6e,0x20,0x77,0x2f,0x6f,0x20,0x69,0x6e,
- 0x74,0x65,0x72,0x72,0x75,0x70,0x74,0x0a,0x00,0x00,0x00,0x00,
- 0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x61,
- 0x72,0x61,0x6c,0x6c,0x65,0x6c,0x20,0x70,0x6f,0x72,0x74,0x20,
- 0x69,0x6e,0x74,0x65,0x72,0x72,0x75,0x70,0x74,0x20,0x6d,0x61,
- 0x73,0x6b,0x20,0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,
- 0x73,0x65,0x74,0x20,0x62,0x69,0x74,0x0a,0x00,0x00,0x00,0x00,
- 0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x61,
- 0x72,0x61,0x6c,0x6c,0x65,0x6c,0x20,0x70,0x6f,0x72,0x74,0x20,
- 0x69,0x6e,0x74,0x65,0x72,0x72,0x75,0x70,0x74,0x20,0x64,0x6f,
- 0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x77,0x6f,0x72,0x6b,0x0a,
- 0x00,0x00,0x00,0x00,0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,
- 0x64,0x20,0x70,0x61,0x72,0x61,0x6c,0x6c,0x65,0x6c,0x20,0x70,
- 0x6f,0x72,0x74,0x20,0x69,0x6e,0x74,0x65,0x72,0x72,0x75,0x70,
- 0x74,0x20,0x77,0x6f,0x6e,0x27,0x74,0x20,0x67,0x6f,0x20,0x61,
- 0x77,0x61,0x79,0x0a,0x00,0x00,0x00,0x00,0x25,0x45,0x20,0x45,
- 0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x61,0x72,0x61,0x6c,0x6c,
- 0x65,0x6c,0x20,0x70,0x6f,0x72,0x74,0x20,0x69,0x6e,0x74,0x65,
- 0x72,0x72,0x75,0x70,0x74,0x20,0x6d,0x61,0x73,0x6b,0x20,0x64,
- 0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x72,0x65,0x73,0x65,
- 0x74,0x20,0x62,0x69,0x74,0x0a,0x00,0x00,0x25,0x45,0x20,0x45,
- 0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x61,0x72,0x61,0x6c,0x6c,
- 0x65,0x6c,0x20,0x70,0x6f,0x72,0x74,0x20,0x54,0x50,0x52,0x20,
- 0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,0x64,0x0a,0x00,0x00,
- 0x0d,0x45,0x42,0x49,0x20,0x25,0x64,0x20,0x65,0x78,0x74,0x2e,
- 0x20,0x6c,0x6f,0x6f,0x70,0x62,0x61,0x63,0x6b,0x3a,0x20,0x00,
- 0x0d,0x54,0x65,0x73,0x74,0x20,0x45,0x42,0x49,0x20,0x25,0x64,
- 0x20,0x55,0x41,0x52,0x54,0x2d,0x25,0x30,0x32,0x58,0x2e,0x2e,
- 0x00,0x00,0x00,0x00,0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,
- 0x64,0x20,0x70,0x6f,0x72,0x74,0x20,0x25,0x64,0x20,0x73,0x63,
- 0x72,0x61,0x74,0x63,0x68,0x20,0x72,0x65,0x67,0x69,0x73,0x74,
- 0x65,0x72,0x20,0x77,0x72,0x6f,0x74,0x65,0x20,0x30,0x78,0x30,
- 0x30,0x20,0x30,0x78,0x46,0x46,0x20,0x72,0x65,0x61,0x64,0x20,
- 0x25,0x30,0x32,0x78,0x20,0x25,0x30,0x32,0x78,0x0a,0x00,0x00,
- 0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x6f,
- 0x72,0x74,0x20,0x25,0x64,0x20,0x27,0x64,0x61,0x74,0x61,0x20,
- 0x72,0x65,0x61,0x64,0x79,0x20,0x73,0x74,0x75,0x63,0x6b,0x20,
- 0x6f,0x6e,0x0a,0x00,0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,
- 0x64,0x20,0x70,0x6f,0x72,0x74,0x20,0x25,0x64,0x20,0x54,0x48,
- 0x52,0x45,0x20,0x6e,0x65,0x76,0x65,0x72,0x20,0x72,0x65,0x61,
- 0x64,0x79,0x0a,0x00,0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,
- 0x64,0x20,0x70,0x6f,0x72,0x74,0x20,0x25,0x64,0x20,0x6e,0x6f,
- 0x6e,0x65,0x6d,0x70,0x74,0x79,0x20,0x74,0x72,0x61,0x6e,0x73,
- 0x6d,0x69,0x74,0x74,0x65,0x72,0x20,0x6c,0x6f,0x6f,0x6b,0x73,
- 0x20,0x65,0x6d,0x70,0x74,0x79,0x0a,0x00,0x25,0x45,0x20,0x45,
- 0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x6f,0x72,0x74,0x20,0x25,
- 0x64,0x20,0x64,0x61,0x74,0x61,0x20,0x6e,0x65,0x76,0x65,0x72,
- 0x20,0x61,0x72,0x72,0x69,0x76,0x65,0x64,0x0a,0x00,0x00,0x00,
- 0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x6f,
- 0x72,0x74,0x20,0x25,0x64,0x00,0x00,0x00,0x20,0x6f,0x76,0x65,
- 0x72,0x72,0x75,0x6e,0x20,0x65,0x72,0x72,0x6f,0x72,0x00,0x00,
- 0x20,0x70,0x61,0x72,0x69,0x74,0x79,0x20,0x65,0x72,0x72,0x6f,
- 0x72,0x00,0x00,0x00,0x20,0x66,0x72,0x61,0x6d,0x69,0x6e,0x67,
- 0x20,0x65,0x72,0x72,0x6f,0x72,0x00,0x00,0x0a,0x00,0x00,0x00,
- 0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x6f,
- 0x72,0x74,0x20,0x25,0x64,0x20,0x27,0x64,0x61,0x74,0x61,0x20,
- 0x72,0x65,0x61,0x64,0x79,0x27,0x20,0x6e,0x6f,0x74,0x20,0x73,
- 0x65,0x74,0x0a,0x00,0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,
- 0x64,0x20,0x70,0x6f,0x72,0x74,0x20,0x25,0x64,0x20,0x27,0x64,
- 0x61,0x74,0x61,0x20,0x72,0x65,0x61,0x64,0x79,0x27,0x20,0x73,
- 0x74,0x69,0x6c,0x6c,0x20,0x73,0x65,0x74,0x0a,0x00,0x00,0x00,
- 0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x6f,
- 0x72,0x74,0x20,0x25,0x64,0x20,0x73,0x65,0x6e,0x64,0x20,0x25,
- 0x30,0x32,0x78,0x20,0x72,0x65,0x63,0x65,0x69,0x76,0x65,0x64,
- 0x20,0x25,0x30,0x32,0x78,0x0a,0x00,0x00,0x25,0x45,0x20,0x45,
- 0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x6f,0x72,0x74,0x20,0x25,
- 0x64,0x20,0x6d,0x6f,0x64,0x65,0x6d,0x20,0x73,0x74,0x61,0x74,
- 0x75,0x73,0x20,0x6f,0x75,0x74,0x20,0x25,0x30,0x32,0x78,0x20,
- 0x69,0x6e,0x20,0x25,0x30,0x32,0x78,0x0a,0x0d,0x00,0x00,0x00,
- 0x20,0x43,0x54,0x53,0x2f,0x52,0x54,0x53,0x00,0x00,0x00,0x00,
- 0x20,0x44,0x53,0x52,0x2f,0x44,0x54,0x52,0x00,0x00,0x00,0x00,
- 0x20,0x52,0x49,0x2f,0x4f,0x55,0x54,0x31,0x00,0x00,0x00,0x00,
- 0x20,0x44,0x43,0x44,0x2f,0x4f,0x55,0x54,0x32,0x00,0x00,0x00,
- 0x0a,0x00,0x00,0x00,0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,
- 0x64,0x20,0x70,0x6f,0x72,0x74,0x20,0x25,0x64,0x20,0x49,0x4e,
- 0x54,0x20,0x73,0x74,0x75,0x63,0x6b,0x20,0x6f,0x6e,0x0a,0x00,
- 0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x6f,
- 0x72,0x74,0x20,0x25,0x64,0x20,0x49,0x4e,0x54,0x20,0x6d,0x61,
- 0x73,0x6b,0x20,0x6f,0x6e,0x20,0x77,0x2f,0x6f,0x20,0x69,0x6e,
- 0x74,0x65,0x72,0x72,0x75,0x70,0x74,0x0a,0x00,0x00,0x00,0x00,
- 0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x6f,
- 0x72,0x74,0x20,0x25,0x64,0x20,0x49,0x4e,0x54,0x20,0x6d,0x61,
- 0x73,0x6b,0x20,0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,
- 0x73,0x65,0x74,0x20,0x62,0x69,0x74,0x0a,0x00,0x00,0x00,0x00,
- 0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x6f,
- 0x72,0x74,0x20,0x25,0x64,0x20,0x49,0x4e,0x54,0x20,0x64,0x6f,
- 0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x77,0x6f,0x72,0x6b,0x0a,
- 0x00,0x00,0x00,0x00,0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,
- 0x64,0x20,0x70,0x6f,0x72,0x74,0x20,0x25,0x64,0x20,0x49,0x4e,
- 0x54,0x20,0x77,0x6f,0x6e,0x27,0x74,0x20,0x67,0x6f,0x20,0x61,
- 0x77,0x61,0x79,0x0a,0x00,0x00,0x00,0x00,0x25,0x45,0x20,0x45,
- 0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x6f,0x72,0x74,0x20,0x25,
- 0x64,0x20,0x49,0x4e,0x54,0x20,0x6d,0x61,0x73,0x6b,0x20,0x64,
- 0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x72,0x65,0x73,0x65,
- 0x74,0x20,0x62,0x69,0x74,0x0a,0x00,0x00,0x25,0x45,0x20,0x45,
- 0x42,0x49,0x20,0x25,0x64,0x20,0x68,0x61,0x73,0x20,0x25,0x64,
- 0x20,0x70,0x6f,0x72,0x74,0x73,0x2c,0x20,0x73,0x68,0x6f,0x75,
- 0x6c,0x64,0x20,0x62,0x65,0x20,0x25,0x64,0x73,0x20,0x25,0x64,
- 0x70,0x0a,0x00,0x00,0x25,0x64,0x20,0x64,0x65,0x76,0x69,0x63,
- 0x65,0x73,0x20,0x00,0x6e,0x6f,0x74,0x20,0x70,0x6f,0x70,0x75,
- 0x6c,0x61,0x74,0x65,0x64,0x00,0x00,0x00,0x25,0x45,0x20,0x6c,
- 0x6f,0x6f,0x70,0x62,0x61,0x63,0x6b,0x20,0x70,0x6f,0x72,0x74,
- 0x20,0x6d,0x69,0x73,0x6d,0x61,0x74,0x63,0x68,0x3a,0x20,0x70,
- 0x6f,0x72,0x74,0x20,0x25,0x64,0x3d,0x25,0x64,0x2c,0x20,0x61,
- 0x6e,0x64,0x20,0x70,0x6f,0x72,0x74,0x20,0x25,0x64,0x3d,0x25,
- 0x64,0x0a,0x00,0x00,0x25,0x45,0x20,0x6c,0x6f,0x6f,0x70,0x62,
- 0x61,0x63,0x6b,0x20,0x70,0x6f,0x72,0x74,0x20,0x6d,0x69,0x73,
- 0x6d,0x61,0x74,0x63,0x68,0x3a,0x20,0x70,0x6f,0x72,0x74,0x20,
- 0x25,0x64,0x3d,0x25,0x64,0x3f,0x0a,0x00,0x25,0x64,0x00,0x00,
- 0x3d,0x25,0x64,0x00,0x3f,0x20,0x00,0x00,0x50,0x25,0x64,0x3d,
- 0x50,0x25,0x64,0x20,0x00,0x00,0x00,0x00,0x25,0x64,0x3d,0x64,
- 0x65,0x62,0x75,0x67,0x00,0x00,0x00,0x00,0x25,0x45,0x20,0x4e,
- 0x6f,0x20,0x65,0x78,0x74,0x65,0x72,0x6e,0x61,0x6c,0x20,0x63,
- 0x6f,0x6e,0x6e,0x65,0x63,0x74,0x69,0x6f,0x6e,0x73,0x20,0x66,
- 0x6f,0x75,0x6e,0x64,0x00,0x00,0x00,0x00,0x0a,0x0d,0x00,0x00,
- 0x57,0x41,0x52,0x4e,0x49,0x4e,0x47,0x20,0x2d,0x20,0x4e,0x6f,
- 0x74,0x20,0x61,0x6c,0x6c,0x20,0x55,0x41,0x52,0x54,0x53,0x20,
- 0x64,0x65,0x74,0x65,0x63,0x74,0x65,0x64,0x20,0x69,0x6e,0x20,
- 0x6c,0x6f,0x6f,0x70,0x62,0x61,0x63,0x6b,0x0a,0x0d,0x00,0x00,
- 0x57,0x41,0x52,0x4e,0x49,0x4e,0x47,0x20,0x2d,0x20,0x50,0x61,
- 0x72,0x61,0x6c,0x6c,0x65,0x6c,0x20,0x70,0x6f,0x72,0x74,0x73,
- 0x20,0x6e,0x6f,0x74,0x20,0x6c,0x6f,0x6f,0x70,0x65,0x64,0x20,
- 0x62,0x61,0x63,0x6b,0x0a,0x0d,0x00,0x00,0x25,0x45,0x20,0x45,
- 0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x61,0x72,0x61,0x6c,0x6c,
- 0x65,0x6c,0x20,0x70,0x6f,0x72,0x74,0x20,0x73,0x65,0x6e,0x74,
- 0x20,0x25,0x64,0x20,0x62,0x79,0x74,0x65,0x73,0x2c,0x20,0x45,
- 0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x61,0x72,0x61,0x6c,0x6c,
- 0x65,0x6c,0x20,0x70,0x6f,0x72,0x74,0x20,0x67,0x6f,0x74,0x20,
- 0x25,0x64,0x20,0x62,0x79,0x74,0x65,0x73,0x0a,0x00,0x00,0x00,
- 0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x61,
- 0x72,0x61,0x6c,0x6c,0x65,0x6c,0x20,0x70,0x6f,0x72,0x74,0x20,
- 0x77,0x72,0x6f,0x74,0x65,0x20,0x25,0x30,0x32,0x78,0x2c,0x20,
- 0x45,0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x61,0x72,0x61,0x6c,
- 0x6c,0x65,0x6c,0x20,0x70,0x6f,0x72,0x74,0x20,0x72,0x65,0x61,
- 0x64,0x20,0x25,0x30,0x32,0x78,0x0a,0x00,0x25,0x45,0x20,0x45,
- 0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x6f,0x72,0x74,0x20,0x25,
- 0x64,0x20,0x54,0x48,0x52,0x45,0x20,0x6e,0x65,0x76,0x65,0x72,
- 0x20,0x72,0x65,0x61,0x64,0x79,0x0a,0x00,0x25,0x45,0x20,0x45,
- 0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x6f,0x72,0x74,0x20,0x25,
- 0x64,0x20,0x27,0x64,0x61,0x74,0x61,0x20,0x72,0x65,0x61,0x64,
- 0x79,0x20,0x73,0x74,0x75,0x63,0x6b,0x20,0x6f,0x6e,0x0a,0x00,
- 0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x6f,
- 0x72,0x74,0x20,0x25,0x64,0x20,0x54,0x48,0x52,0x45,0x20,0x6e,
- 0x65,0x76,0x65,0x72,0x20,0x72,0x65,0x61,0x64,0x79,0x0a,0x00,
- 0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x6f,
- 0x72,0x74,0x20,0x25,0x64,0x20,0x6e,0x6f,0x6e,0x65,0x6d,0x70,
- 0x74,0x79,0x20,0x74,0x72,0x61,0x6e,0x73,0x6d,0x69,0x74,0x74,
- 0x65,0x72,0x20,0x6c,0x6f,0x6f,0x6b,0x73,0x20,0x65,0x6d,0x70,
- 0x74,0x79,0x0a,0x00,0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,
- 0x64,0x20,0x70,0x6f,0x72,0x74,0x20,0x25,0x64,0x20,0x64,0x61,
- 0x74,0x61,0x20,0x6e,0x65,0x76,0x65,0x72,0x20,0x61,0x72,0x72,
- 0x69,0x76,0x65,0x64,0x0a,0x00,0x00,0x00,0x25,0x45,0x20,0x45,
- 0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x6f,0x72,0x74,0x20,0x25,
- 0x64,0x00,0x00,0x00,0x20,0x6f,0x76,0x65,0x72,0x72,0x75,0x6e,
- 0x20,0x65,0x72,0x72,0x6f,0x72,0x00,0x00,0x20,0x70,0x61,0x72,
- 0x69,0x74,0x79,0x20,0x65,0x72,0x72,0x6f,0x72,0x00,0x00,0x00,
- 0x20,0x66,0x72,0x61,0x6d,0x69,0x6e,0x67,0x20,0x65,0x72,0x72,
- 0x6f,0x72,0x00,0x00,0x0a,0x00,0x00,0x00,0x25,0x45,0x20,0x45,
- 0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x6f,0x72,0x74,0x20,0x25,
- 0x64,0x20,0x27,0x64,0x61,0x74,0x61,0x20,0x72,0x65,0x61,0x64,
- 0x79,0x27,0x20,0x6e,0x6f,0x74,0x20,0x73,0x65,0x74,0x0a,0x00,
- 0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x6f,
- 0x72,0x74,0x20,0x25,0x64,0x20,0x27,0x64,0x61,0x74,0x61,0x20,
- 0x72,0x65,0x61,0x64,0x79,0x27,0x20,0x73,0x74,0x69,0x6c,0x6c,
- 0x20,0x73,0x65,0x74,0x0a,0x00,0x00,0x00,0x25,0x45,0x20,0x45,
- 0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x6f,0x72,0x74,0x20,0x25,
- 0x64,0x20,0x73,0x65,0x6e,0x64,0x20,0x25,0x30,0x32,0x78,0x20,
- 0x72,0x65,0x63,0x65,0x69,0x76,0x65,0x64,0x20,0x25,0x30,0x32,
- 0x78,0x0a,0x00,0x00,0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,
- 0x64,0x20,0x70,0x6f,0x72,0x74,0x20,0x25,0x64,0x20,0x26,0x20,
- 0x70,0x6f,0x72,0x74,0x20,0x25,0x64,0x20,0x6d,0x6f,0x64,0x65,
- 0x6d,0x20,0x73,0x74,0x61,0x74,0x75,0x73,0x20,0x6f,0x75,0x74,
- 0x20,0x25,0x30,0x32,0x78,0x20,0x69,0x6e,0x20,0x25,0x30,0x32,
- 0x78,0x0a,0x0d,0x00,0x20,0x43,0x54,0x53,0x2f,0x52,0x54,0x53,
- 0x00,0x00,0x00,0x00,0x20,0x44,0x53,0x52,0x2f,0x44,0x54,0x52,
- 0x00,0x00,0x00,0x00,0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,
- 0x64,0x20,0x70,0x6f,0x72,0x74,0x20,0x25,0x64,0x20,0x49,0x4e,
- 0x54,0x20,0x73,0x74,0x75,0x63,0x6b,0x20,0x6f,0x6e,0x0a,0x00,
- 0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x6f,
- 0x72,0x74,0x20,0x25,0x64,0x20,0x49,0x4e,0x54,0x20,0x6d,0x61,
- 0x73,0x6b,0x20,0x6f,0x6e,0x20,0x77,0x2f,0x6f,0x20,0x69,0x6e,
- 0x74,0x65,0x72,0x72,0x75,0x70,0x74,0x0a,0x00,0x00,0x00,0x00,
- 0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x6f,
- 0x72,0x74,0x20,0x25,0x64,0x20,0x49,0x4e,0x54,0x20,0x6d,0x61,
- 0x73,0x6b,0x20,0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,
- 0x73,0x65,0x74,0x20,0x62,0x69,0x74,0x0a,0x00,0x00,0x00,0x00,
- 0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x6f,
- 0x72,0x74,0x20,0x25,0x64,0x20,0x49,0x4e,0x54,0x20,0x64,0x6f,
- 0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x77,0x6f,0x72,0x6b,0x0a,
- 0x00,0x00,0x00,0x00,0x25,0x45,0x20,0x45,0x42,0x49,0x20,0x25,
- 0x64,0x20,0x70,0x6f,0x72,0x74,0x20,0x25,0x64,0x20,0x49,0x4e,
- 0x54,0x20,0x77,0x6f,0x6e,0x27,0x74,0x20,0x67,0x6f,0x20,0x61,
- 0x77,0x61,0x79,0x0a,0x00,0x00,0x00,0x00,0x25,0x45,0x20,0x45,
- 0x42,0x49,0x20,0x25,0x64,0x20,0x70,0x6f,0x72,0x74,0x20,0x25,
- 0x64,0x20,0x49,0x4e,0x54,0x20,0x6d,0x61,0x73,0x6b,0x20,0x64,
- 0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x72,0x65,0x73,0x65,
- 0x74,0x20,0x62,0x69,0x74,0x0a,0x00,0x00,0x25,0x64,0x20,0x55,
- 0x41,0x52,0x54,0x73,0x20,0x00,0x00,0x00,0x31,0x20,0x70,0x61,
- 0x72,0x61,0x6c,0x6c,0x65,0x6c,0x20,0x00,0x0d,0x45,0x42,0x49,
- 0x20,0x25,0x64,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
- 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x6e,0x6f,0x6e,0x65,0x00,0x00,
- 0x0d,0x45,0x42,0x49,0x20,0x25,0x64,0x2e,0x2e,0x2e,0x2e,0x2e,
- 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x75,0x6e,
- 0x6b,0x6e,0x6f,0x77,0x6e,0x20,0x45,0x42,0x49,0x20,0x74,0x79,
- 0x70,0x65,0x20,0x25,0x30,0x32,0x78,0x2c,0x20,0x6e,0x6f,0x74,
- 0x20,0x74,0x65,0x73,0x74,0x65,0x64,0x0d,0x0a,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x0c,0x00,0x34,0x00,0x00,0x00,0x41,0x0b,
- 0x00,0x00,0x0b,0x00,0x0c,0x00,0xe2,0x00,0x00,0x00,0x40,0x00,
- 0x0c,0x00,0x74,0x00,0x04,0x00,0x6e,0x00,0x04,0x00,0x00,0x00,
- 0x0c,0x00,0xe4,0x00,0x04,0x00,0x40,0x00,0x0c,0x00,0xb4,0x00,
- 0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x0c,0x00,0xe8,0x00,
- 0x08,0x00,0x40,0x00,0x2e,0x2e,0x2f,0x74,0x69,0x6d,0x65,0x72,
- 0x2e,0x63,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x40,0x28,0x23,0x29,0x62,0x69,0x6f,0x73,0x69,0x6e,0x69,0x74,
- 0x2e,0x73,0x20,0x20,0x20,0x20,0x33,0x2e,0x36,0x2e,0x31,0x20,
- 0x20,0x37,0x2f,0x31,0x2f,0x39,0x34,0x00,0x40,0x28,0x23,0x29,
- 0x62,0x69,0x6f,0x73,0x69,0x6e,0x69,0x74,0x2e,0x73,0x20,0x20,
- 0x20,0x20,0x33,0x2e,0x36,0x20,0x20,0x37,0x2f,0x31,0x2f,0x39,
- 0x34,0x00,0x40,0x28,0x23,0x29,0x63,0x68,0x65,0x63,0x6b,0x72,
- 0x61,0x6e,0x67,0x65,0x2e,0x63,0x20,0x20,0x31,0x2e,0x31,0x20,
- 0x20,0x35,0x2f,0x31,0x38,0x2f,0x39,0x32,0x00,0x40,0x28,0x23,
- 0x29,0x63,0x6f,0x6d,0x6d,0x6f,0x6e,0x2e,0x6d,0x6b,0x20,0x20,
- 0x20,0x20,0x20,0x33,0x2e,0x31,0x30,0x20,0x20,0x31,0x2f,0x36,
- 0x2f,0x39,0x34,0x00,0x40,0x28,0x23,0x29,0x64,0x65,0x66,0x73,
- 0x2e,0x68,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x33,0x2e,
- 0x32,0x20,0x20,0x34,0x2f,0x36,0x2f,0x39,0x34,0x00,0x40,0x28,
- 0x23,0x29,0x64,0x65,0x76,0x69,0x63,0x65,0x2e,0x68,0x20,0x20,
- 0x20,0x20,0x20,0x20,0x33,0x2e,0x38,0x20,0x20,0x34,0x2f,0x31,
- 0x34,0x2f,0x39,0x34,0x00,0x40,0x28,0x23,0x29,0x68,0x6f,0x73,
- 0x74,0x63,0x6f,0x6d,0x6d,0x2e,0x68,0x20,0x20,0x20,0x20,0x33,
- 0x2e,0x33,0x20,0x20,0x33,0x2f,0x32,0x32,0x2f,0x39,0x33,0x00,
- 0x40,0x28,0x23,0x29,0x6d,0x69,0x64,0x2e,0x68,0x20,0x20,0x20,
- 0x20,0x20,0x20,0x20,0x20,0x20,0x33,0x2e,0x33,0x20,0x20,0x34,
- 0x2f,0x36,0x2f,0x39,0x34,0x00,0x40,0x28,0x23,0x29,0x6d,0x6f,
- 0x64,0x75,0x6c,0x65,0x2e,0x68,0x20,0x20,0x20,0x20,0x20,0x20,
- 0x33,0x2e,0x31,0x20,0x20,0x38,0x2f,0x32,0x30,0x2f,0x39,0x33,
- 0x00,0x40,0x28,0x23,0x29,0x70,0x61,0x72,0x61,0x2e,0x68,0x20,
- 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x31,0x2e,0x31,0x20,0x20,
- 0x37,0x2f,0x37,0x2f,0x39,0x33,0x00,0x40,0x28,0x23,0x29,0x70,
- 0x62,0x75,0x73,0x2e,0x68,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
- 0x20,0x33,0x2e,0x32,0x20,0x20,0x34,0x2f,0x36,0x2f,0x39,0x34,
- 0x00,0x40,0x28,0x23,0x29,0x72,0x65,0x67,0x2e,0x68,0x20,0x20,
- 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x33,0x2e,0x32,0x20,0x20,
- 0x38,0x2f,0x32,0x35,0x2f,0x39,0x33,0x00,0x40,0x28,0x23,0x29,
- 0x72,0x65,0x6c,0x65,0x61,0x73,0x65,0x2e,0x68,0x20,0x20,0x20,
- 0x20,0x20,0x33,0x2e,0x39,0x20,0x20,0x38,0x2f,0x31,0x37,0x2f,
- 0x39,0x34,0x00,0x40,0x28,0x23,0x29,0x72,0x77,0x2e,0x63,0x20,
- 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x33,0x2e,0x31,
- 0x20,0x20,0x31,0x31,0x2f,0x35,0x2f,0x39,0x32,0x00,0x40,0x28,
- 0x23,0x29,0x72,0x77,0x2e,0x68,0x20,0x20,0x20,0x20,0x20,0x20,
- 0x20,0x20,0x20,0x20,0x32,0x2e,0x31,0x20,0x20,0x33,0x2f,0x31,
- 0x2f,0x39,0x32,0x00,0x40,0x28,0x23,0x29,0x73,0x63,0x61,0x2e,
- 0x68,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x33,0x2e,
- 0x34,0x20,0x20,0x34,0x2f,0x31,0x39,0x2f,0x39,0x33,0x00,0x40,
- 0x28,0x23,0x29,0x73,0x6d,0x61,0x72,0x74,0x62,0x69,0x6f,0x73,
- 0x2e,0x63,0x20,0x20,0x20,0x33,0x2e,0x31,0x31,0x20,0x20,0x37,
- 0x2f,0x31,0x2f,0x39,0x34,0x00,0x40,0x28,0x23,0x29,0x73,0x6d,
- 0x61,0x72,0x74,0x62,0x69,0x6f,0x73,0x2e,0x68,0x20,0x20,0x20,
- 0x33,0x2e,0x31,0x20,0x20,0x38,0x2f,0x32,0x30,0x2f,0x39,0x33,
- 0x00,0x40,0x28,0x23,0x29,0x73,0x78,0x62,0x69,0x6f,0x73,0x2e,
- 0x6d,0x6b,0x20,0x20,0x20,0x20,0x20,0x33,0x2e,0x33,0x20,0x20,
- 0x37,0x2f,0x31,0x2f,0x39,0x34,0x00,0x40,0x28,0x23,0x29,0x74,
- 0x65,0x73,0x74,0x73,0x2e,0x63,0x20,0x20,0x20,0x20,0x20,0x20,
- 0x20,0x33,0x2e,0x32,0x33,0x20,0x20,0x37,0x2f,0x32,0x31,0x2f,
- 0x39,0x34,0x00,0x40,0x28,0x23,0x29,0x74,0x69,0x6d,0x65,0x72,
- 0x2e,0x63,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x33,0x2e,0x33,
- 0x20,0x20,0x37,0x2f,0x37,0x2f,0x39,0x33,0x00,0x40,0x28,0x23,
- 0x29,0x74,0x69,0x6d,0x65,0x72,0x2e,0x68,0x20,0x20,0x20,0x20,
- 0x20,0x20,0x20,0x33,0x2e,0x33,0x20,0x20,0x34,0x2f,0x36,0x2f,
- 0x39,0x34,0x00,0x40,0x28,0x23,0x29,0x75,0x61,0x72,0x74,0x2e,
- 0x68,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x33,0x2e,0x31,
- 0x20,0x20,0x34,0x2f,0x36,0x2f,0x39,0x34,0x00,0x40,0x28,0x23,
- 0x29,0x75,0x74,0x69,0x6c,0x2e,0x73,0x20,0x20,0x20,0x20,0x20,
- 0x20,0x20,0x20,0x33,0x2e,0x33,0x20,0x20,0x37,0x2f,0x31,0x2f,
- 0x39,0x34,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
-};
-
-static unsigned pcem_nbios = sizeof(pcem_bios);
-
diff --git a/sys/gnu/i386/isa/dgmfep.h b/sys/gnu/i386/isa/dgmfep.h
deleted file mode 100644
index 7921fa3..0000000
--- a/sys/gnu/i386/isa/dgmfep.h
+++ /dev/null
@@ -1,1954 +0,0 @@
-/*
- * $FreeBSD$
- *
- * This file is an ascii copy of the file sxbios.bin included in the
- * Digiboard PC/Xem driver for Linux. It is copyright 1992, DIGI
- * International. All Rights Reserved.
- */
-
-static unsigned char pcem_cook[] = {
- 0x4f,0x53,0x5b,0x12,0x65,0x00,0x00,0x10,0xc5,0x00,0x1e,0x24,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x4b,0x3d,0xb2,0x87,0x00,0x00,0x00,0x00,0x40,0x28,0x23,0x29,
- 0x73,0x78,0x66,0x65,0x70,0x2e,0x62,0x69,0x6e,0x20,0x20,0x20,
- 0x20,0x20,0x32,0x2e,0x31,0x20,0x30,0x38,0x2f,0x31,0x37,0x2f,
- 0x39,0x34,0x00,0x40,0x28,0x23,0x29,0x43,0x6f,0x70,0x79,0x72,
- 0x69,0x67,0x68,0x74,0x20,0x28,0x43,0x29,0x20,0x31,0x39,0x39,
- 0x32,0x2c,0x20,0x44,0x49,0x47,0x49,0x20,0x49,0x6e,0x74,0x65,
- 0x72,0x6e,0x61,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x2e,0x20,0x41,
- 0x6c,0x6c,0x20,0x52,0x69,0x67,0x68,0x74,0x73,0x20,0x52,0x65,
- 0x73,0x65,0x72,0x76,0x65,0x64,0x2e,0x00,0x00,0xa3,0x01,0x3c,
- 0x28,0x02,0x22,0xac,0x00,0xa3,0x02,0x3c,0x20,0x02,0x42,0x24,
- 0x0c,0x00,0x43,0xac,0x00,0x60,0x03,0x40,0x00,0x60,0x80,0x40,
- 0x00,0x00,0x43,0xac,0x00,0x68,0x03,0x40,0x00,0x00,0x00,0x00,
- 0x24,0x00,0x49,0xac,0x20,0x00,0x48,0xac,0x00,0xa3,0x09,0x3c,
- 0x04,0x00,0x43,0xac,0x10,0x00,0x44,0xac,0x14,0x00,0x45,0xac,
- 0x18,0x00,0x46,0xac,0x1c,0x00,0x47,0xac,0x28,0x00,0x4a,0xac,
- 0x2c,0x00,0x4b,0xac,0x30,0x00,0x4c,0xac,0x34,0x00,0x4d,0xac,
- 0x38,0x00,0x4e,0xac,0x3c,0x00,0x4f,0xac,0x40,0x00,0x50,0xac,
- 0x44,0x00,0x51,0xac,0x48,0x00,0x52,0xac,0x4c,0x00,0x53,0xac,
- 0x50,0x00,0x54,0xac,0x54,0x00,0x55,0xac,0x58,0x00,0x56,0xac,
- 0x5c,0x00,0x57,0xac,0x60,0x00,0x58,0xac,0x64,0x00,0x59,0xac,
- 0x68,0x00,0x5a,0xac,0x6c,0x00,0x5b,0xac,0x70,0x00,0x5c,0xac,
- 0x74,0x00,0x5d,0xac,0x78,0x00,0x5e,0xac,0x7c,0x00,0x5f,0xac,
- 0x10,0x00,0x08,0x24,0x00,0x02,0x29,0x25,0x00,0x00,0x8a,0x80,
- 0x00,0x00,0x00,0x00,0x02,0x00,0x40,0x11,0x00,0x00,0x2a,0xa1,
- 0x01,0x00,0x84,0x24,0xff,0xff,0x08,0x25,0xf9,0xff,0x00,0x1d,
- 0x01,0x00,0x29,0x25,0x00,0xa3,0x01,0x3c,0x10,0x02,0x25,0xac,
- 0x00,0xa3,0x01,0x3c,0x14,0x02,0x3f,0xac,0x00,0xa3,0x01,0x3c,
- 0x18,0x02,0x3d,0xac,0x02,0x00,0x08,0x24,0x00,0xa3,0x01,0x3c,
- 0x00,0xa3,0x1d,0x3c,0x10,0x0c,0x28,0xac,0x00,0x04,0xbd,0x27,
- 0x64,0x17,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0xa3,0x08,0x3c,
- 0x10,0x0c,0x08,0x8d,0x01,0x00,0x01,0x24,0x23,0x00,0x01,0x11,
- 0x00,0x00,0x00,0x00,0xf8,0xff,0x00,0x10,0x00,0x00,0x00,0x00,
- 0xc5,0x00,0x1e,0x24,0x00,0x83,0x01,0x3c,0x10,0x00,0x3e,0xac,
- 0x00,0x00,0x1e,0x24,0x00,0x10,0x08,0x3c,0x00,0x60,0x88,0x40,
- 0xce,0x00,0x1e,0x24,0x00,0x83,0x01,0x3c,0x01,0x80,0x1c,0x3c,
- 0x10,0x00,0x3e,0xac,0xb0,0xfb,0x9c,0x27,0x00,0x00,0x1e,0x24,
- 0x01,0x00,0x11,0x04,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x3c,
- 0xe9,0x00,0x1e,0x24,0x00,0x83,0x01,0x3c,0x01,0x80,0x06,0x3c,
- 0xd0,0x31,0x84,0x24,0x10,0x00,0x3e,0xac,0x00,0x80,0x05,0x3c,
- 0x50,0x86,0xc6,0x24,0x23,0x20,0xe4,0x03,0x00,0x00,0x1e,0x24,
- 0x00,0x30,0xa5,0x24,0x21,0x20,0x86,0x00,0xfc,0xff,0x88,0x8c,
- 0xfc,0xff,0xc6,0x24,0x2b,0x08,0xa6,0x00,0xfc,0xff,0x84,0x24,
- 0xfb,0xff,0x20,0x14,0x00,0x00,0xc8,0xac,0x00,0x60,0x08,0x40,
- 0x00,0x00,0x00,0x00,0xff,0xff,0x01,0x3c,0xfe,0x00,0x21,0x34,
- 0x24,0x40,0x01,0x01,0x00,0x60,0x88,0x40,0x09,0x01,0x1e,0x24,
- 0x00,0x83,0x01,0x3c,0x10,0x00,0x3e,0xac,0x00,0x80,0x04,0x3c,
- 0x90,0x44,0x84,0x24,0x00,0xa0,0x01,0x3c,0x00,0x80,0x1f,0x3c,
- 0x25,0x20,0x81,0x00,0x00,0x00,0x1e,0x24,0x08,0x00,0x80,0x00,
- 0x5c,0x32,0xff,0x27,0x13,0x01,0x1e,0x24,0x00,0x83,0x01,0x3c,
- 0x10,0x00,0x3e,0xac,0x00,0xa3,0x01,0x3c,0x00,0x00,0x1e,0x24,
- 0x80,0x92,0x9d,0x27,0x9e,0x15,0x00,0x0c,0x10,0x0c,0x20,0xac,
- 0x66,0x0c,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x94,0xff,0xbd,0x27,
- 0x10,0x00,0xa1,0xaf,0x14,0x00,0xa2,0xaf,0x18,0x00,0xa3,0xaf,
- 0x1c,0x00,0xa4,0xaf,0x20,0x00,0xa5,0xaf,0x24,0x00,0xa6,0xaf,
- 0x28,0x00,0xa7,0xaf,0x2c,0x00,0xa8,0xaf,0x30,0x00,0xa9,0xaf,
- 0x34,0x00,0xaa,0xaf,0x38,0x00,0xab,0xaf,0x3c,0x00,0xac,0xaf,
- 0x40,0x00,0xad,0xaf,0x44,0x00,0xae,0xaf,0x48,0x00,0xaf,0xaf,
- 0x4c,0x00,0xb8,0xaf,0x50,0x00,0xb9,0xaf,0x58,0x00,0xbe,0xaf,
- 0x5c,0x00,0xbf,0xaf,0x00,0x70,0x08,0x40,0x12,0x48,0x00,0x00,
- 0x10,0x50,0x00,0x00,0x54,0x00,0xa8,0xaf,0x60,0x00,0xa9,0xaf,
- 0x64,0x00,0xaa,0xaf,0x00,0x68,0x05,0x40,0x00,0x60,0x06,0x40,
- 0x7c,0x00,0xa4,0x30,0x55,0x00,0x80,0x14,0x00,0x00,0x00,0x00,
- 0x24,0x10,0xa6,0x00,0x68,0x00,0xa6,0xaf,0x00,0xff,0x42,0x30,
- 0x00,0x08,0x44,0x30,0x44,0x00,0x80,0x14,0x00,0x00,0x00,0x00,
- 0x00,0x04,0x48,0x30,0x37,0x00,0x00,0x15,0x00,0x00,0x00,0x00,
- 0x2a,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x68,0x00,0xa6,0x8f,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x86,0x40,
- 0x00,0x68,0x05,0x40,0x00,0x00,0x00,0x00,0x24,0x10,0xa6,0x00,
- 0x00,0xff,0x42,0x30,0xf0,0xff,0x40,0x14,0x00,0x08,0x44,0x30,
- 0x68,0x00,0xa8,0x8f,0x60,0x00,0xa9,0x8f,0x64,0x00,0xaa,0x8f,
- 0x00,0x00,0x00,0x00,0x00,0x60,0x88,0x40,0x13,0x00,0x20,0x01,
- 0x11,0x00,0x40,0x01,0x14,0x00,0xa2,0x8f,0x18,0x00,0xa3,0x8f,
- 0x1c,0x00,0xa4,0x8f,0x20,0x00,0xa5,0x8f,0x24,0x00,0xa6,0x8f,
- 0x28,0x00,0xa7,0x8f,0x2c,0x00,0xa8,0x8f,0x30,0x00,0xa9,0x8f,
- 0x34,0x00,0xaa,0x8f,0x38,0x00,0xab,0x8f,0x3c,0x00,0xac,0x8f,
- 0x40,0x00,0xad,0x8f,0x44,0x00,0xae,0x8f,0x48,0x00,0xaf,0x8f,
- 0x4c,0x00,0xb8,0x8f,0x50,0x00,0xb9,0x8f,0x58,0x00,0xbe,0x8f,
- 0x5c,0x00,0xbf,0x8f,0x00,0x00,0x00,0x00,0x54,0x00,0xba,0x8f,
- 0x10,0x00,0xa1,0x8f,0x6c,0x00,0xbd,0x27,0x08,0x00,0x40,0x03,
- 0x10,0x00,0x00,0x42,0x84,0x92,0x88,0x8f,0x00,0x00,0x09,0x24,
- 0x26,0x40,0x06,0x01,0x01,0xff,0x08,0x31,0x26,0x30,0xc8,0x00,
- 0x00,0x68,0x89,0x40,0x00,0x60,0x86,0x40,0x8c,0x15,0x00,0x0c,
- 0x00,0x00,0x00,0x00,0xce,0xff,0x00,0x10,0x68,0x00,0xa6,0x8f,
- 0x80,0x92,0x88,0x8f,0x00,0x00,0x00,0x00,0x26,0x40,0x06,0x01,
- 0x01,0xff,0x08,0x31,0x26,0x30,0xc8,0x00,0x00,0x60,0x86,0x40,
- 0x44,0x19,0x00,0x0c,0x00,0x00,0x00,0x00,0xc4,0xff,0x00,0x10,
- 0x68,0x00,0xa6,0x8f,0x01,0x80,0x08,0x3c,0x48,0x8e,0x08,0x8d,
- 0x00,0x00,0x00,0x00,0x26,0x40,0x06,0x01,0x01,0xff,0x08,0x31,
- 0x26,0x30,0xc8,0x00,0x00,0x60,0x86,0x40,0x95,0x15,0x00,0x0c,
- 0x00,0x00,0x00,0x00,0xb9,0xff,0x00,0x10,0x68,0x00,0xa6,0x8f,
- 0x00,0x80,0x04,0x3c,0xd0,0x7a,0x84,0x24,0x20,0x0c,0x00,0x0c,
- 0x74,0x01,0x05,0x24,0xbd,0xff,0x00,0x10,0x68,0x00,0xa8,0x8f,
- 0xec,0xff,0xbd,0x27,0x08,0x00,0xa1,0xaf,0x00,0x70,0x1a,0x40,
- 0x00,0x00,0x00,0x00,0x0c,0x00,0xba,0xaf,0x10,0x00,0xbf,0xaf,
- 0x00,0x80,0x04,0x3c,0xd0,0x7a,0x84,0x24,0x20,0x0c,0x00,0x0c,
- 0x96,0x01,0x05,0x24,0x10,0x00,0xbf,0x8f,0x0c,0x00,0xba,0x8f,
- 0x08,0x00,0xa1,0x8f,0x0c,0x00,0xbd,0x27,0x08,0x00,0x40,0x03,
- 0x10,0x00,0x00,0x42,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xdc,0xff,0xbd,0x27,0xa0,0x92,0x84,0x8f,
- 0x00,0x00,0xb0,0xaf,0x04,0x00,0xb1,0xaf,0x08,0x00,0xb2,0xaf,
- 0x0c,0x00,0xb3,0xaf,0x10,0x00,0xb4,0xaf,0x14,0x00,0xb5,0xaf,
- 0x18,0x00,0xb6,0xaf,0x1c,0x00,0xb7,0xaf,0x20,0x00,0xbf,0xaf,
- 0x04,0x00,0x88,0x8c,0x01,0x80,0x10,0x3c,0xcc,0x85,0x10,0x8e,
- 0x08,0x00,0x00,0x01,0x00,0x20,0x11,0x3c,0x00,0x93,0x88,0x8f,
- 0x21,0x80,0x10,0x02,0x04,0x00,0x08,0x31,0x21,0x08,0x1c,0x01,
- 0xa4,0x92,0x24,0x8c,0x00,0x00,0x00,0x00,0x04,0x00,0x8a,0x8c,
- 0x00,0x00,0x00,0x00,0x08,0x00,0x40,0x01,0x00,0x00,0x00,0x00,
- 0x00,0x93,0x88,0x8f,0x21,0x80,0x10,0x02,0x21,0x08,0x1c,0x01,
- 0xac,0x92,0x24,0x8c,0x04,0x00,0x0a,0x25,0x04,0x00,0x89,0x8c,
- 0x0c,0x00,0x4a,0x31,0x08,0x00,0x20,0x01,0x00,0x93,0x8a,0xaf,
- 0xbc,0x92,0x84,0x8f,0x9c,0x92,0x90,0x8f,0x00,0x00,0x00,0x00,
- 0x34,0x00,0x88,0x8c,0xff,0xff,0x10,0x26,0x09,0xf8,0x00,0x01,
- 0x00,0x00,0x00,0x00,0x30,0x00,0x84,0x8c,0xfa,0xff,0x00,0x16,
- 0x00,0x00,0x00,0x00,0x20,0x00,0xbf,0x8f,0x00,0x00,0xb0,0x8f,
- 0x04,0x00,0xb1,0x8f,0x08,0x00,0xb2,0x8f,0x0c,0x00,0xb3,0x8f,
- 0x10,0x00,0xb4,0x8f,0x14,0x00,0xb5,0x8f,0x18,0x00,0xb6,0x8f,
- 0x1c,0x00,0xb7,0x8f,0xbc,0x92,0x84,0xaf,0x08,0x00,0xe0,0x03,
- 0x24,0x00,0xbd,0x27,0x50,0x00,0x87,0x94,0x24,0x00,0x86,0x8c,
- 0x82,0x48,0x07,0x00,0x0c,0x00,0x29,0x31,0x21,0x08,0x3c,0x01,
- 0x10,0x80,0x29,0x8c,0x25,0x28,0x91,0x00,0x08,0x00,0x20,0x01,
- 0x00,0x00,0x00,0x00,0x08,0x00,0xc2,0x90,0x00,0x00,0x00,0x00,
- 0xc0,0x47,0x02,0x00,0xab,0x00,0x11,0x05,0x00,0x00,0x00,0x00,
- 0x44,0x00,0x92,0x8c,0x02,0x49,0x07,0x00,0x23,0x90,0x50,0x02,
- 0x9e,0x00,0x41,0x06,0x7c,0x00,0x29,0x31,0x21,0x08,0x3c,0x01,
- 0x30,0x80,0x29,0x8c,0x40,0x00,0x93,0x8c,0x08,0x00,0x20,0x01,
- 0x00,0x00,0x00,0x00,0x2c,0x00,0x89,0x94,0x00,0x00,0x00,0x00,
- 0x00,0x08,0x29,0x31,0x0d,0x01,0x20,0x15,0x00,0x00,0x00,0x00,
- 0x02,0x49,0x07,0x00,0x0c,0x00,0x29,0x31,0x21,0x08,0x3c,0x01,
- 0x20,0x80,0x29,0x8c,0x00,0x00,0x00,0x00,0x08,0x00,0x20,0x01,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x84,0x8c,0x00,0x00,0x00,0x00,
- 0x04,0x00,0x89,0x8c,0x00,0x00,0x00,0x00,0x08,0x00,0x20,0x01,
- 0x00,0x00,0x00,0x00,0x02,0x41,0x07,0x00,0x7c,0x00,0x08,0x31,
- 0x21,0x08,0x1c,0x01,0x30,0x80,0x28,0x8c,0x00,0x00,0x00,0x00,
- 0x08,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x54,0x00,0xa9,0x90,
- 0x58,0x00,0xaa,0x90,0x01,0x00,0xe8,0x30,0x09,0x00,0x00,0x11,
- 0x00,0x00,0x00,0x00,0x28,0x00,0x8c,0x94,0x00,0x00,0x00,0x00,
- 0x00,0x10,0x88,0x31,0x04,0x00,0x00,0x11,0x00,0x00,0x00,0x00,
- 0x5d,0x00,0x83,0x90,0x03,0x00,0x00,0x10,0x08,0x00,0x2b,0x35,
- 0x5c,0x00,0x83,0x90,0xf7,0xff,0x2b,0x31,0x26,0x48,0x2b,0x01,
- 0x25,0x50,0x49,0x01,0x54,0x00,0xab,0xa0,0x58,0x00,0xaa,0xa0,
- 0xff,0xfd,0xe7,0x30,0x50,0x00,0x87,0xa4,0x21,0x90,0x53,0x02,
- 0xe2,0xff,0x40,0x06,0x00,0x00,0xc3,0xa0,0x67,0x00,0x00,0x10,
- 0x00,0x00,0x88,0x8c,0x02,0x00,0x08,0x24,0x21,0x48,0x12,0x02,
- 0x5c,0x00,0x20,0x15,0x67,0x00,0x88,0xa0,0x0c,0x00,0xca,0x90,
- 0x00,0x04,0xe7,0x34,0x40,0x00,0x4a,0x35,0x0c,0x00,0xca,0xa0,
- 0x56,0x00,0x00,0x10,0x50,0x00,0x87,0xa4,0x6c,0x00,0x89,0x8c,
- 0x02,0x00,0x08,0x24,0xff,0xff,0x01,0x24,0x0b,0x00,0x21,0x11,
- 0x67,0x00,0x88,0xa0,0x23,0x48,0x30,0x01,0x07,0x00,0x20,0x1d,
- 0x00,0x00,0x00,0x00,0x0c,0x00,0xca,0x90,0xff,0xfa,0xe7,0x30,
- 0xbf,0xff,0x4a,0x31,0x0c,0x00,0xca,0xa0,0x00,0x00,0x09,0x24,
- 0x50,0x00,0x87,0xa4,0x6c,0x00,0x89,0xac,0x46,0x00,0x00,0x10,
- 0x00,0x00,0x88,0x8c,0x24,0x00,0x86,0x8c,0x25,0x28,0x91,0x00,
- 0x08,0x00,0xc2,0x90,0x00,0x00,0x00,0x00,0xc0,0x47,0x02,0x00,
- 0x4a,0x00,0x11,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x84,0x8c,
- 0x00,0x00,0x00,0x00,0x04,0x00,0x89,0x8c,0x00,0x00,0x00,0x00,
- 0x08,0x00,0x20,0x01,0x00,0x00,0x00,0x00,0x00,0x80,0x0a,0x3c,
- 0x88,0x37,0x4a,0x25,0x49,0x00,0x88,0x90,0x4a,0x00,0x89,0x90,
- 0x0e,0x00,0x00,0x10,0x04,0x00,0x8a,0xac,0x24,0x00,0x86,0x8c,
- 0x50,0x00,0x87,0x94,0x08,0x00,0xc2,0x90,0x25,0x28,0x91,0x00,
- 0xc0,0x47,0x02,0x00,0x3a,0x00,0x11,0x05,0x42,0x42,0x07,0x00,
- 0x44,0x00,0x92,0x8c,0x49,0x00,0x88,0x90,0x4a,0x00,0x89,0x90,
- 0x23,0x90,0x50,0x02,0x2b,0x00,0x41,0x06,0x00,0x00,0x00,0x00,
- 0x0a,0x00,0xb5,0x94,0x0c,0x00,0xb6,0x94,0x18,0x00,0xca,0x90,
- 0x17,0x00,0xb6,0x12,0x00,0x00,0x00,0x00,0x24,0x40,0x0a,0x01,
- 0x1d,0x00,0x09,0x15,0x00,0x00,0x00,0x00,0x3c,0x00,0x94,0x8c,
- 0x40,0x00,0x93,0x8c,0x0e,0x00,0x97,0x94,0x21,0x40,0x96,0x02,
- 0x00,0x00,0x03,0x91,0x01,0x00,0xd6,0x26,0x00,0x00,0xc3,0xa0,
- 0x21,0x90,0x53,0x02,0x04,0x00,0x41,0x06,0x24,0xb0,0xd7,0x02,
- 0xf9,0xff,0xb6,0x16,0x21,0x40,0x96,0x02,0x00,0x00,0x12,0x24,
- 0x00,0x00,0x88,0x8c,0x0c,0x00,0xb6,0xa4,0x04,0x00,0x09,0x8d,
- 0x44,0x00,0x92,0xac,0x08,0x00,0x20,0x01,0x21,0x20,0x00,0x01,
- 0x21,0x40,0x12,0x02,0x07,0x00,0x00,0x15,0x00,0x00,0x00,0x00,
- 0x00,0x80,0x08,0x3c,0xbf,0xff,0xe7,0x30,0x3c,0x37,0x08,0x25,
- 0x4b,0x00,0x80,0xa0,0x50,0x00,0x87,0xa4,0x04,0x00,0x88,0xac,
- 0x00,0x00,0x88,0x8c,0x00,0x00,0x00,0x00,0x04,0x00,0x09,0x8d,
- 0x44,0x00,0x80,0xac,0x08,0x00,0x20,0x01,0x21,0x20,0x00,0x01,
- 0x00,0x00,0x88,0x8c,0x44,0x00,0x92,0xac,0x04,0x00,0x09,0x8d,
- 0x21,0x20,0x00,0x01,0x08,0x00,0x20,0x01,0x00,0x00,0x00,0x00,
- 0x50,0x00,0x87,0x8c,0x00,0x00,0x00,0x00,0x42,0x42,0x07,0x00,
- 0x7c,0x00,0x08,0x31,0x21,0x08,0x1c,0x01,0x6a,0x00,0x92,0x94,
- 0xb0,0x88,0x33,0x8c,0x38,0x00,0x94,0x8c,0x12,0x00,0xb5,0x94,
- 0x14,0x00,0xb6,0x94,0x16,0x00,0x97,0x94,0x28,0x00,0x8c,0x94,
- 0x5c,0x00,0x8e,0x90,0x5d,0x00,0x8f,0x90,0x00,0x00,0x00,0x00,
- 0x14,0x00,0xc2,0x90,0x00,0x00,0xc3,0x90,0x00,0x42,0x02,0x00,
- 0x25,0x18,0x68,0x00,0x08,0x00,0x60,0x02,0x24,0x18,0x72,0x00,
- 0xff,0xf9,0x68,0x30,0x65,0x02,0x0e,0x11,0x21,0x48,0x95,0x02,
- 0x74,0x02,0x0f,0x11,0xff,0x00,0x61,0x2c,0x11,0x00,0x20,0x10,
- 0x00,0x00,0x23,0xa1,0x01,0x00,0xb5,0x26,0x24,0xa8,0xb7,0x02,
- 0x1e,0x00,0xb6,0x16,0x00,0x00,0x00,0x00,0xc4,0x02,0x00,0x10,
- 0xff,0xff,0xb5,0x26,0x21,0x48,0x95,0x02,0xff,0x00,0x61,0x2c,
- 0x07,0x00,0x20,0x10,0x00,0x00,0x23,0xa1,0x01,0x00,0xb5,0x26,
- 0x24,0xa8,0xb7,0x02,0x14,0x00,0xb6,0x16,0x00,0x00,0x00,0x00,
- 0xba,0x02,0x00,0x10,0xff,0xff,0xb5,0x26,0x00,0xff,0x68,0x30,
- 0x71,0x02,0x00,0x15,0xc2,0x51,0x03,0x00,0x01,0x00,0xb5,0x26,
- 0x24,0xa8,0xb7,0x02,0xb2,0x02,0xb6,0x12,0x00,0x00,0x00,0x00,
- 0x08,0x00,0x8a,0x31,0x08,0x00,0x40,0x11,0x00,0x00,0x00,0x00,
- 0x21,0x48,0x95,0x02,0x01,0x00,0xb5,0x26,0x24,0xa8,0xb7,0x02,
- 0x03,0x00,0xb6,0x16,0x00,0x00,0x23,0xa1,0xa7,0x02,0x00,0x10,
- 0xff,0xff,0xb5,0x26,0x08,0x00,0xc2,0x90,0x00,0x00,0x00,0x00,
- 0x01,0x00,0x48,0x30,0xce,0xff,0x00,0x11,0x00,0x00,0x00,0x00,
- 0x1c,0x00,0x88,0x94,0x23,0x48,0xb6,0x02,0x24,0x48,0x37,0x01,
- 0x2b,0x08,0x28,0x01,0x1a,0x00,0x20,0x14,0x12,0x00,0xb5,0xa4,
- 0x01,0x00,0xea,0x30,0x17,0x00,0x40,0x15,0x00,0x00,0x00,0x00,
- 0x00,0x10,0x88,0x31,0x06,0x00,0x00,0x11,0x01,0x00,0xe7,0x34,
- 0x00,0x80,0x13,0x3c,0x00,0x80,0x1f,0x3c,0x00,0x02,0xe7,0x38,
- 0xa4,0x35,0x73,0x26,0xdc,0x35,0xff,0x27,0x5f,0x00,0x88,0x90,
- 0x54,0x00,0xa9,0x90,0x03,0x00,0x08,0x31,0x26,0x48,0x28,0x01,
- 0x54,0x00,0xa9,0xa0,0x56,0x00,0xa9,0x90,0x58,0x00,0xaa,0x90,
- 0x24,0x48,0x28,0x01,0x25,0x50,0x49,0x01,0x58,0x00,0xaa,0xa0,
- 0x68,0x00,0x8b,0x90,0x27,0x40,0x00,0x01,0x24,0x58,0x68,0x01,
- 0x10,0x00,0xcb,0xa0,0x12,0x00,0xb5,0xa4,0x08,0x00,0xe0,0x03,
- 0x50,0x00,0x87,0xa4,0x24,0x00,0x86,0x8c,0x25,0x28,0x91,0x00,
- 0x54,0x00,0xa9,0x90,0x18,0x00,0xc8,0x90,0x58,0x00,0xaa,0x90,
- 0x26,0x40,0x09,0x01,0xf0,0x00,0x08,0x31,0x26,0x48,0x28,0x01,
- 0x54,0x00,0xa9,0xa0,0x56,0x00,0xa9,0x90,0x00,0x00,0x00,0x00,
- 0x24,0x48,0x28,0x01,0x25,0x50,0x49,0x01,0x08,0x00,0xe0,0x03,
- 0x58,0x00,0xaa,0xa0,0x00,0x80,0x0a,0x3c,0x58,0x3a,0x4a,0x25,
- 0x04,0x00,0x00,0x10,0x04,0x00,0x8a,0xac,0x24,0x00,0x86,0x8c,
- 0x50,0x00,0x87,0x94,0x25,0x28,0x91,0x00,0x38,0x00,0xc9,0x90,
- 0x00,0x00,0x00,0x00,0x14,0x00,0x20,0x11,0x00,0x00,0x00,0x00,
- 0x12,0x00,0xb5,0x94,0x38,0x00,0x94,0x8c,0x14,0x00,0xb6,0x94,
- 0x16,0x00,0x97,0x94,0x21,0x40,0x95,0x02,0x01,0x00,0xb5,0x26,
- 0x24,0xa8,0xb7,0x02,0x08,0x00,0xb6,0x12,0x00,0x00,0x00,0x00,
- 0x48,0x00,0xc3,0x90,0xff,0xff,0x29,0x25,0x00,0x00,0x03,0xa1,
- 0xf8,0xff,0x20,0x15,0x21,0x40,0x95,0x02,0x04,0x00,0x00,0x10,
- 0x12,0x00,0xb5,0xa4,0xff,0xff,0xb5,0x26,0x24,0xa8,0xb7,0x02,
- 0x12,0x00,0xb5,0xa4,0x00,0x00,0x88,0x8c,0x00,0x00,0x00,0x00,
- 0x04,0x00,0x09,0x8d,0x21,0x20,0x00,0x01,0x08,0x00,0x20,0x01,
- 0x00,0x00,0x00,0x00,0x00,0x80,0x0a,0x3c,0xe8,0x3a,0x4a,0x25,
- 0x04,0x00,0x00,0x10,0x04,0x00,0x8a,0xac,0x24,0x00,0x86,0x8c,
- 0x50,0x00,0x87,0x94,0x25,0x28,0x91,0x00,0x0a,0x00,0xb5,0x94,
- 0x0c,0x00,0xb6,0x94,0x00,0x00,0x00,0x00,0x72,0x00,0xb6,0x12,
- 0x00,0x00,0x00,0x00,0x38,0x00,0xc9,0x90,0x3c,0x00,0x94,0x8c,
- 0x80,0xff,0x29,0x21,0x0e,0x00,0x97,0x94,0x22,0x48,0x09,0x00,
- 0x21,0x40,0x96,0x02,0x08,0x00,0x20,0x19,0x00,0x00,0x00,0x00,
- 0xff,0xff,0x29,0x25,0x00,0x00,0x03,0x91,0x01,0x00,0xd6,0x26,
- 0x48,0x00,0xc3,0xa0,0x24,0xb0,0xd7,0x02,0xf8,0xff,0xb6,0x16,
- 0x21,0x40,0x96,0x02,0x00,0x00,0x88,0x8c,0x0c,0x00,0xb6,0xa4,
- 0x04,0x00,0x09,0x8d,0x21,0x20,0x00,0x01,0x08,0x00,0x20,0x01,
- 0x00,0x00,0x00,0x00,0x00,0x80,0x0a,0x3c,0x6c,0x3b,0x4a,0x25,
- 0x04,0x00,0x00,0x10,0x04,0x00,0x8a,0xac,0x24,0x00,0x86,0x8c,
- 0x50,0x00,0x87,0x94,0x25,0x28,0x91,0x00,0x0a,0x00,0xb5,0x94,
- 0x0c,0x00,0xb6,0x94,0x00,0x00,0x00,0x00,0x51,0x00,0xb6,0x12,
- 0x00,0x00,0x00,0x00,0x38,0x00,0xc9,0x90,0x3c,0x00,0x94,0x8c,
- 0x80,0xff,0x29,0x25,0x0e,0x00,0x97,0x94,0x2a,0x00,0x8c,0x94,
- 0x63,0x00,0x8e,0x90,0x22,0x48,0x09,0x00,0x14,0x00,0x20,0x19,
- 0x21,0x40,0x96,0x02,0x00,0x00,0x08,0x91,0xff,0xff,0x29,0x25,
- 0x21,0x18,0x00,0x01,0x80,0x40,0x08,0x00,0x21,0x08,0x1c,0x01,
- 0xb0,0x84,0x28,0x8c,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x01,
- 0x00,0x00,0x00,0x00,0x02,0x00,0x88,0x31,0x02,0x00,0x00,0x11,
- 0x00,0x00,0x00,0x00,0xe0,0xff,0x63,0x24,0x01,0x00,0xce,0x25,
- 0x48,0x00,0xc3,0xa0,0x01,0x00,0xd6,0x26,0x24,0xb0,0xd7,0x02,
- 0xec,0xff,0xb6,0x16,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x8c,
- 0x63,0x00,0x8e,0xa0,0x0c,0x00,0xb6,0xa4,0x04,0x00,0x09,0x8d,
- 0x21,0x20,0x00,0x01,0x08,0x00,0x20,0x01,0x00,0x00,0x00,0x00,
- 0xf3,0xff,0xc0,0x11,0x00,0x00,0x00,0x00,0xf1,0xff,0x00,0x10,
- 0xff,0xff,0xce,0x25,0x20,0x00,0x8a,0x31,0x03,0x00,0x40,0x11,
- 0x04,0x00,0x8a,0x31,0x00,0x00,0x0e,0x24,0x04,0x00,0x8a,0x31,
- 0xea,0xff,0x40,0x11,0x00,0x00,0x00,0x00,0xed,0xff,0x20,0x11,
- 0x00,0x00,0x0e,0x24,0x0d,0x00,0x0a,0x24,0xff,0xff,0x29,0x25,
- 0xe4,0xff,0x00,0x10,0x48,0x00,0xca,0xa0,0x21,0x40,0xc0,0x01,
- 0x08,0x00,0x8a,0x31,0x08,0x00,0x40,0x15,0x00,0x00,0x0e,0x24,
- 0x10,0x00,0x8a,0x31,0xdd,0xff,0x40,0x11,0x00,0x00,0x00,0x00,
- 0xdc,0xff,0x00,0x11,0x00,0x00,0x00,0x00,0xda,0xff,0x00,0x10,
- 0x48,0x00,0xc3,0xa0,0xd7,0xff,0x00,0x10,0x0a,0x00,0x03,0x24,
- 0x21,0x40,0xc0,0x01,0x07,0x00,0x08,0x31,0x07,0x00,0x08,0x39,
- 0x2b,0x08,0x28,0x01,0xd6,0xff,0x20,0x14,0x00,0x00,0x00,0x00,
- 0x08,0x00,0xce,0x25,0x23,0x48,0x28,0x01,0xf8,0xff,0xce,0x31,
- 0x20,0x00,0x03,0x24,0xff,0xff,0x08,0x25,0xfe,0xff,0x01,0x05,
- 0x48,0x00,0xc3,0xa0,0xca,0xff,0x00,0x10,0x01,0x00,0xd6,0x26,
- 0x00,0x80,0x08,0x3c,0xbf,0xff,0xe7,0x30,0x34,0x36,0x08,0x25,
- 0x4b,0x00,0x80,0xa0,0x50,0x00,0x87,0xa4,0x13,0x0e,0x00,0x08,
- 0x04,0x00,0x88,0xac,0x00,0x00,0x88,0x8c,0x74,0x00,0x9f,0xac,
- 0x63,0x00,0x8e,0xa0,0x0c,0x00,0xb6,0xa4,0x04,0x00,0x09,0x8d,
- 0x44,0x00,0x92,0xac,0x08,0x00,0x20,0x01,0x21,0x20,0x00,0x01,
- 0x00,0x80,0x0a,0x3c,0x20,0x3d,0x4a,0x25,0x49,0x00,0x88,0x90,
- 0x4a,0x00,0x89,0x90,0x0e,0x00,0x00,0x10,0x04,0x00,0x8a,0xac,
- 0x24,0x00,0x86,0x8c,0x50,0x00,0x87,0x94,0x08,0x00,0xc2,0x90,
- 0x25,0x28,0x91,0x00,0xc0,0x47,0x02,0x00,0xd4,0xfe,0x11,0x05,
- 0x42,0x42,0x07,0x00,0x44,0x00,0x92,0x8c,0x49,0x00,0x88,0x90,
- 0x4a,0x00,0x89,0x90,0x23,0x90,0x50,0x02,0xc5,0xfe,0x41,0x06,
- 0x00,0x00,0x00,0x00,0x18,0x00,0xca,0x90,0x0a,0x00,0xb5,0x94,
- 0x0c,0x00,0xb6,0x94,0x24,0x40,0x0a,0x01,0xb9,0xfe,0x09,0x15,
- 0x00,0x00,0x00,0x00,0x74,0x00,0x88,0x8c,0x40,0x00,0x93,0x8c,
- 0x3c,0x00,0x94,0x8c,0x0e,0x00,0x97,0x94,0x2a,0x00,0x8c,0x94,
- 0x62,0x00,0x8d,0x90,0x63,0x00,0x8e,0x90,0x09,0xf8,0x00,0x01,
- 0x00,0x00,0x00,0x00,0xa5,0xfe,0xb6,0x12,0x21,0x40,0x96,0x02,
- 0x00,0x00,0x03,0x91,0x01,0x00,0xd6,0x26,0x24,0x40,0x6d,0x00,
- 0x80,0x40,0x08,0x00,0x21,0x08,0x1c,0x01,0xb0,0x80,0x28,0x8c,
- 0x24,0xb0,0xd7,0x02,0x08,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
- 0x01,0x00,0xce,0x25,0x21,0x90,0x53,0x02,0xc8,0xff,0x41,0x06,
- 0x00,0x00,0xc3,0xa0,0xc6,0xff,0xb6,0x12,0x21,0x40,0x96,0x02,
- 0x00,0x00,0x03,0x91,0x01,0x00,0xd6,0x26,0x24,0x40,0x6d,0x00,
- 0x80,0x40,0x08,0x00,0x21,0x08,0x1c,0x01,0xb0,0x80,0x28,0x8c,
- 0x24,0xb0,0xd7,0x02,0x08,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
- 0x01,0x00,0x88,0x31,0xef,0xff,0x00,0x11,0x00,0x00,0x00,0x00,
- 0x18,0x00,0x00,0x10,0x27,0x00,0x03,0x24,0x01,0x00,0x88,0x31,
- 0xea,0xff,0x00,0x11,0x00,0x00,0x00,0x00,0x13,0x00,0x00,0x10,
- 0x28,0x00,0x03,0x24,0x01,0x00,0x88,0x31,0xe5,0xff,0x00,0x11,
- 0x00,0x00,0x00,0x00,0x0e,0x00,0x00,0x10,0x21,0x00,0x03,0x24,
- 0x01,0x00,0x88,0x31,0xe0,0xff,0x00,0x11,0x00,0x00,0x00,0x00,
- 0x09,0x00,0x00,0x10,0x29,0x00,0x03,0x24,0x01,0x00,0x88,0x31,
- 0xdb,0xff,0x00,0x11,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x10,
- 0x5e,0x00,0x03,0x24,0x01,0x00,0x88,0x31,0xd6,0xff,0x00,0x11,
- 0x00,0x00,0x00,0x00,0x5c,0x00,0x08,0x24,0x21,0x90,0x53,0x02,
- 0x00,0x00,0xc8,0xa0,0xd2,0xff,0x40,0x06,0x02,0x00,0xce,0x25,
- 0x3a,0x0f,0x00,0x0c,0x61,0x00,0x83,0xa0,0x61,0x00,0x83,0x90,
- 0xce,0xff,0x00,0x10,0x21,0x90,0x53,0x02,0x02,0x00,0x88,0x31,
- 0xc9,0xff,0x00,0x11,0x00,0x00,0x00,0x00,0xc7,0xff,0x00,0x10,
- 0xe0,0xff,0x63,0x24,0x02,0x00,0xc0,0x11,0x00,0x20,0x89,0x31,
- 0xff,0xff,0xce,0x25,0xc3,0xff,0x20,0x11,0x02,0x00,0x08,0x24,
- 0x53,0x00,0x00,0x10,0x21,0x90,0x53,0x02,0x42,0x4a,0x0c,0x00,
- 0x0c,0x00,0x29,0x31,0x21,0x08,0x3c,0x01,0x30,0x89,0x29,0x8c,
- 0x21,0x40,0xc0,0x01,0x08,0x00,0xce,0x25,0x08,0x00,0x20,0x01,
- 0xf8,0xff,0xce,0x31,0x23,0x40,0xc8,0x01,0x05,0x00,0x01,0x29,
- 0xb5,0xff,0x20,0x14,0x00,0x00,0x00,0x00,0x45,0x00,0x00,0x10,
- 0x21,0x90,0x53,0x02,0x42,0x00,0x00,0x10,0x02,0x00,0x08,0x24,
- 0x23,0x40,0xc8,0x01,0xff,0xff,0x08,0x25,0xad,0xff,0x00,0x19,
- 0x20,0x00,0x03,0x24,0x21,0x90,0x53,0x02,0xfb,0xff,0x40,0x06,
- 0x00,0x00,0xc3,0xa0,0x3a,0x0f,0x00,0x0c,0x61,0x00,0x88,0xa0,
- 0x61,0x00,0x88,0x90,0xf7,0xff,0x00,0x10,0xff,0xff,0x08,0x25,
- 0x00,0x40,0x89,0x31,0xa2,0xff,0x20,0x11,0x00,0x00,0x00,0x00,
- 0x31,0x00,0x00,0x10,0x7f,0x00,0x08,0x24,0x00,0x80,0x89,0x31,
- 0x9d,0xff,0x20,0x11,0x00,0x00,0x00,0x00,0x2c,0x00,0x00,0x10,
- 0x7f,0x00,0x08,0x24,0x20,0x00,0x8a,0x31,0x21,0x40,0xc0,0x01,
- 0x18,0x00,0x40,0x15,0x04,0x00,0x89,0x31,0x08,0x00,0x20,0x11,
- 0x0d,0x00,0x0a,0x24,0x21,0x90,0x53,0x02,0x00,0x00,0x0e,0x24,
- 0x04,0x00,0x40,0x06,0x00,0x00,0xca,0xa0,0x3a,0x0f,0x00,0x0c,
- 0x00,0x00,0x00,0x00,0x0a,0x00,0x03,0x24,0x00,0x01,0x88,0x31,
- 0x8b,0xff,0x00,0x11,0x00,0x00,0x00,0x00,0x1a,0x00,0x00,0x10,
- 0x05,0x00,0x08,0x24,0x21,0x40,0xc0,0x01,0x08,0x00,0x89,0x31,
- 0x0d,0x00,0x20,0x15,0x00,0x00,0x0e,0x24,0x10,0x00,0x8a,0x31,
- 0x03,0x00,0x40,0x11,0x00,0x00,0x00,0x00,0x83,0xff,0x00,0x11,
- 0x00,0x00,0x00,0x00,0xc2,0x49,0x0c,0x00,0x0c,0x00,0x29,0x31,
- 0x21,0x08,0x3c,0x01,0x40,0x89,0x29,0x8c,0x00,0x00,0x0e,0x24,
- 0x08,0x00,0x20,0x01,0x00,0x00,0x00,0x00,0xea,0xff,0x00,0x10,
- 0x0a,0x00,0x03,0x24,0x02,0x41,0x08,0x00,0x05,0x00,0x00,0x10,
- 0x03,0x00,0x08,0x25,0x03,0x00,0x00,0x10,0x05,0x00,0x08,0x24,
- 0x01,0x00,0x00,0x10,0x09,0x00,0x08,0x24,0x21,0x90,0x53,0x02,
- 0x05,0x00,0x40,0x06,0x00,0x00,0xc3,0xa0,0x3a,0x0f,0x00,0x0c,
- 0x61,0x00,0x88,0xa0,0x61,0x00,0x88,0x90,0x00,0x00,0x00,0x00,
- 0x40,0x00,0x89,0x31,0x0f,0x00,0x20,0x11,0x20,0x00,0x01,0x29,
- 0x0d,0x00,0x20,0x10,0x00,0x00,0x00,0x00,0x60,0x00,0x83,0x90,
- 0x04,0x00,0x01,0x29,0x60,0xff,0x20,0x14,0x00,0x00,0x00,0x00,
- 0x21,0x90,0x53,0x02,0x5d,0xff,0x40,0x06,0x00,0x00,0xc3,0xa0,
- 0x3a,0x0f,0x00,0x0c,0x00,0x00,0x00,0x00,0x60,0x00,0x83,0x90,
- 0x59,0xff,0x00,0x10,0x21,0x90,0x53,0x02,0x06,0x00,0x08,0x25,
- 0x00,0x1e,0x09,0x24,0x19,0x00,0x09,0x01,0x12,0x40,0x00,0x00,
- 0x21,0x90,0x48,0x02,0x1c,0xff,0x00,0x10,0x00,0x00,0x88,0x8c,
- 0xff,0xe7,0xe7,0x30,0x42,0x42,0x07,0x00,0x7c,0x00,0x08,0x31,
- 0x21,0x08,0x1c,0x01,0xb0,0x88,0x33,0x8c,0x01,0x00,0x00,0x8c,
- 0x08,0x00,0x60,0x02,0x00,0x00,0x00,0x00,0x00,0x80,0x13,0x3c,
- 0x5a,0x00,0xb8,0x90,0x5b,0x00,0xb9,0x90,0x5e,0x00,0x8d,0x90,
- 0xb4,0x40,0x73,0x26,0xff,0xfd,0x68,0x30,0x0a,0x00,0x0d,0x15,
- 0xff,0xf9,0x68,0x30,0x00,0x80,0x13,0x3c,0x30,0x42,0x73,0x26,
- 0x0e,0xfe,0x00,0x10,0x00,0x08,0xe7,0x34,0x00,0x80,0x13,0x3c,
- 0x5a,0x00,0xb8,0x90,0x5b,0x00,0xb9,0x90,0xe0,0x40,0x73,0x26,
- 0xff,0xf9,0x68,0x30,0x05,0x00,0x18,0x11,0x00,0x00,0x00,0x00,
- 0xf9,0xfd,0x19,0x15,0x00,0x00,0x00,0x00,0x13,0x00,0x00,0x10,
- 0x4a,0x00,0x88,0x90,0x4a,0x00,0x88,0x90,0x00,0x00,0x00,0x00,
- 0x08,0x00,0x09,0x31,0x0b,0x00,0x20,0x11,0x00,0x00,0x00,0x00,
- 0xf7,0xff,0x08,0x31,0x4a,0x00,0x88,0xa0,0x54,0x00,0xa9,0x90,
- 0x58,0x00,0xaa,0x90,0xfb,0xff,0x2b,0x31,0x26,0x48,0x2b,0x01,
- 0x25,0x50,0x49,0x01,0x54,0x00,0xab,0xa0,0x0f,0xfe,0x00,0x10,
- 0x58,0x00,0xaa,0xa0,0x0d,0xfe,0x19,0x17,0x00,0x00,0x00,0x00,
- 0x4a,0x00,0x88,0x90,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x35,
- 0x4a,0x00,0x88,0xa0,0x54,0x00,0xa9,0x90,0x58,0x00,0xaa,0x90,
- 0x04,0x00,0x2b,0x35,0x26,0x48,0x2b,0x01,0x25,0x50,0x49,0x01,
- 0x00,0x08,0x89,0x31,0x54,0x00,0xab,0xa0,0x00,0xfe,0x20,0x11,
- 0x58,0x00,0xaa,0xa0,0x00,0x80,0x13,0x3c,0x00,0x10,0xe7,0x34,
- 0xfc,0xfd,0x00,0x10,0x84,0x41,0x73,0x26,0x4a,0x00,0x88,0x90,
- 0xff,0xef,0xe7,0x30,0xf3,0xff,0x08,0x31,0x4a,0x00,0x88,0xa0,
- 0x54,0x00,0xa9,0x90,0x58,0x00,0xaa,0x90,0xfb,0xff,0x2b,0x31,
- 0x26,0x48,0x2b,0x01,0x25,0x50,0x49,0x01,0x42,0x4a,0x07,0x00,
- 0x7c,0x00,0x29,0x31,0x54,0x00,0xab,0xa0,0x58,0x00,0xaa,0xa0,
- 0x21,0x08,0x3c,0x01,0xb0,0x88,0x33,0x8c,0x40,0x00,0x88,0x31,
- 0xea,0xfd,0x00,0x15,0x00,0x00,0x00,0x00,0xff,0xfd,0x68,0x30,
- 0xe7,0xfd,0x0e,0x11,0x00,0x00,0x00,0x00,0xe5,0xfd,0x0f,0x11,
- 0x00,0x00,0x00,0x00,0x00,0x20,0x89,0x31,0x07,0x00,0x20,0x11,
- 0x00,0x00,0x00,0x00,0x5a,0x00,0xaa,0x90,0x5b,0x00,0xab,0x90,
- 0xde,0xfd,0x0a,0x11,0x00,0x00,0x00,0x00,0xdc,0xfd,0x0b,0x11,
- 0x00,0x00,0x00,0x00,0x00,0x20,0x89,0x31,0xbf,0xfd,0x20,0x11,
- 0x21,0x48,0x95,0x02,0x5e,0x00,0x8d,0x90,0x00,0x00,0x00,0x00,
- 0xbb,0xfd,0x0d,0x15,0x21,0x48,0x95,0x02,0x00,0x80,0x13,0x3c,
- 0x00,0x08,0xe7,0x34,0xb6,0xfd,0x00,0x10,0x30,0x42,0x73,0x26,
- 0xff,0xf7,0xe7,0x30,0x42,0x4a,0x07,0x00,0x7c,0x00,0x29,0x31,
- 0x21,0x08,0x3c,0x01,0xb0,0x88,0x33,0x8c,0xb0,0xfd,0x00,0x10,
- 0x21,0x48,0x95,0x02,0x5e,0x00,0x8d,0x90,0xff,0xfd,0x68,0x30,
- 0x9f,0xfd,0x0d,0x15,0x00,0x00,0x00,0x00,0x00,0x80,0x13,0x3c,
- 0x00,0x08,0xe7,0x34,0xa7,0xfd,0x00,0x10,0x30,0x42,0x73,0x26,
- 0x4a,0x00,0x88,0x90,0x00,0x00,0x00,0x00,0x04,0x00,0x09,0x31,
- 0x0b,0x00,0x20,0x11,0x00,0x00,0x00,0x00,0xfb,0xff,0x08,0x31,
- 0x4a,0x00,0x88,0xa0,0x54,0x00,0xa9,0x90,0x58,0x00,0xaa,0x90,
- 0xfb,0xff,0x2b,0x31,0x26,0x48,0x2b,0x01,0x25,0x50,0x49,0x01,
- 0x54,0x00,0xab,0xa0,0xb3,0xfd,0x00,0x10,0x58,0x00,0xaa,0xa0,
- 0xb1,0xfd,0xcf,0x15,0x00,0x00,0x00,0x00,0x4a,0x00,0x88,0x90,
- 0x00,0x00,0x00,0x00,0x04,0x00,0x08,0x35,0x4a,0x00,0x88,0xa0,
- 0x54,0x00,0xa9,0x90,0x58,0x00,0xaa,0x90,0x04,0x00,0x2b,0x35,
- 0x26,0x48,0x2b,0x01,0x25,0x50,0x49,0x01,0x00,0x08,0x89,0x31,
- 0x54,0x00,0xab,0xa0,0xa4,0xfd,0x20,0x11,0x58,0x00,0xaa,0xa0,
- 0x00,0x80,0x13,0x3c,0x00,0x10,0xe7,0x34,0xa0,0xfd,0x00,0x10,
- 0x84,0x41,0x73,0x26,0xc2,0x51,0x03,0x00,0x3c,0x00,0x4a,0x31,
- 0x21,0x08,0x5c,0x01,0xc0,0x92,0x28,0x8c,0x21,0x08,0x5c,0x01,
- 0x00,0x10,0x6a,0x30,0x01,0x00,0x08,0x25,0x0e,0x00,0x40,0x11,
- 0xc0,0x92,0x28,0xac,0x01,0x00,0x8b,0x31,0x94,0xfd,0x60,0x15,
- 0x00,0x00,0x00,0x00,0x02,0x00,0x8a,0x31,0x03,0x00,0x40,0x15,
- 0x00,0x00,0x00,0x00,0x15,0x00,0x00,0x10,0x00,0x10,0x03,0x24,
- 0x4f,0x00,0xa8,0x90,0x00,0x00,0x00,0x00,0x01,0x00,0x08,0x35,
- 0x8a,0xfd,0x00,0x10,0x4f,0x00,0xa8,0xa0,0x04,0x00,0x88,0x31,
- 0x87,0xfd,0x00,0x15,0x00,0x00,0x00,0x00,0x00,0x02,0x6a,0x30,
- 0x0b,0x00,0x40,0x11,0x08,0x00,0x88,0x31,0x4f,0x00,0xa8,0x90,
- 0xff,0xfd,0x63,0x30,0xff,0x00,0x0b,0x24,0x2a,0x08,0x6b,0x00,
- 0x80,0x00,0x08,0x35,0x66,0xfd,0x20,0x14,0x4f,0x00,0xa8,0xa0,
- 0x6d,0xfd,0x6b,0x10,0x00,0x00,0x00,0x00,0x08,0x00,0x88,0x31,
- 0x07,0x00,0x00,0x15,0x00,0x00,0x00,0x00,0x01,0x00,0xb5,0x26,
- 0x24,0xa8,0xb7,0x02,0x74,0xfd,0xb6,0x16,0x00,0x00,0x20,0xa1,
- 0x1a,0x00,0x00,0x10,0xff,0xff,0xb5,0x26,0x01,0x00,0xb5,0x26,
- 0xff,0x00,0x08,0x24,0x24,0xa8,0xb7,0x02,0x14,0x00,0xb6,0x12,
- 0x00,0x00,0x28,0xa1,0x00,0x80,0x89,0x31,0x02,0x00,0x20,0x11,
- 0x00,0x00,0x08,0x24,0x02,0x42,0x03,0x00,0x21,0x48,0x95,0x02,
- 0x01,0x00,0xb5,0x26,0x24,0xa8,0xb7,0x02,0x09,0x00,0xb6,0x12,
- 0x00,0x00,0x28,0xa1,0x21,0x48,0x95,0x02,0x01,0x00,0xb5,0x26,
- 0x24,0xa8,0xb7,0x02,0x5f,0xfd,0xb6,0x16,0x00,0x00,0x23,0xa1,
- 0x02,0x00,0x00,0x10,0xff,0xff,0xb5,0x26,0xff,0xff,0xb5,0x26,
- 0xff,0xff,0xb5,0x26,0x24,0xb0,0xb7,0x02,0xff,0xff,0xb5,0x26,
- 0x4f,0x00,0xa8,0x90,0x24,0xa8,0xb7,0x02,0x40,0x00,0x08,0x35,
- 0x4f,0x00,0xa8,0xa0,0x24,0x00,0x86,0x8c,0x25,0x28,0x91,0x00,
- 0x78,0x00,0xc8,0x90,0x58,0x00,0xaa,0x90,0x21,0x48,0x00,0x01,
- 0x20,0x00,0x29,0x31,0x80,0x48,0x09,0x00,0x50,0x00,0x08,0x31,
- 0x25,0x40,0x09,0x01,0x70,0x00,0xc9,0x90,0x00,0x00,0x00,0x00,
- 0x42,0x48,0x09,0x00,0x20,0x00,0x29,0x31,0x20,0x00,0x29,0x39,
- 0x25,0x40,0x09,0x01,0x54,0x00,0xa9,0x90,0x00,0x00,0x00,0x00,
- 0x26,0x40,0x09,0x01,0xf0,0x00,0x08,0x31,0x26,0x48,0x28,0x01,
- 0x54,0x00,0xa9,0xa0,0x56,0x00,0xa9,0x90,0x00,0x00,0x00,0x00,
- 0x24,0x48,0x28,0x01,0x25,0x50,0x49,0x01,0x08,0x00,0xe0,0x03,
- 0x58,0x00,0xaa,0xa0,0x00,0x00,0x00,0x00,0x00,0x80,0x08,0x3c,
- 0xa8,0x44,0x08,0x25,0x00,0xa0,0x01,0x3c,0x25,0x40,0x01,0x01,
- 0x08,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x60,0x04,0x40,
- 0x00,0x00,0x00,0x00,0x01,0x00,0x05,0x3c,0x00,0x60,0x85,0x40,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x09,0x3c,
- 0x01,0x00,0x01,0x3c,0x23,0x40,0x21,0x01,0x03,0x00,0x00,0xa1,
- 0x04,0x00,0x08,0x25,0xfd,0xff,0x09,0x15,0x00,0x00,0x00,0x00,
- 0x03,0x00,0x05,0x3c,0x00,0x60,0x85,0x40,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xa0,0x09,0x3c,0x01,0x00,0x01,0x3c,
- 0x23,0x40,0x21,0x01,0x03,0x00,0x00,0xa1,0x04,0x00,0x08,0x25,
- 0xfd,0xff,0x09,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x60,0x84,0x40,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x10,0x04,0x40,0xff,0xff,0x08,0x3c,
- 0xff,0x3f,0x08,0x35,0x24,0x20,0x88,0x00,0x00,0x10,0x84,0x40,
- 0x01,0x80,0x08,0x3c,0xfc,0xff,0x01,0x24,0x01,0x80,0x09,0x3c,
- 0x50,0x86,0x08,0x25,0x80,0x95,0x29,0x25,0x24,0x40,0x01,0x01,
- 0x24,0x48,0x21,0x01,0x04,0x00,0x08,0x25,0xfe,0xff,0x09,0x15,
- 0xfc,0xff,0x00,0xad,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,
- 0x00,0x60,0x02,0x40,0xff,0xff,0x01,0x3c,0xfe,0x00,0x21,0x34,
- 0x25,0x20,0x81,0x00,0x24,0x40,0x44,0x00,0x00,0x60,0x88,0x40,
- 0x08,0x00,0xe0,0x03,0x01,0xff,0x42,0x30,0x00,0x60,0x02,0x40,
- 0x00,0x00,0x00,0x00,0x26,0x40,0x44,0x00,0x01,0xff,0x08,0x31,
- 0x26,0x40,0x02,0x01,0x00,0x60,0x88,0x40,0x08,0x00,0xe0,0x03,
- 0x00,0x00,0x00,0x00,0x00,0x60,0x08,0x40,0x00,0x00,0x00,0x00,
- 0xfe,0xff,0x01,0x24,0x24,0x48,0x01,0x01,0x00,0x60,0x89,0x40,
- 0x00,0x68,0x02,0x40,0x00,0x03,0x84,0x30,0x25,0x18,0x44,0x00,
- 0x00,0x68,0x83,0x40,0x00,0x60,0x88,0x40,0x08,0x00,0xe0,0x03,
- 0x24,0x10,0x44,0x00,0x00,0x60,0x08,0x40,0x00,0x03,0x84,0x30,
- 0xfe,0xff,0x01,0x24,0x24,0x48,0x01,0x01,0x00,0x60,0x89,0x40,
- 0x00,0x68,0x02,0x40,0x27,0x18,0x80,0x00,0x24,0x18,0x62,0x00,
- 0x00,0x68,0x83,0x40,0x00,0x60,0x88,0x40,0x08,0x00,0xe0,0x03,
- 0x24,0x10,0x44,0x00,0x40,0x10,0x08,0x3c,0x00,0x60,0x88,0x40,
- 0xc0,0xbf,0x08,0x3c,0x08,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
- 0x00,0x60,0x08,0x40,0x00,0x00,0x00,0x00,0xff,0xff,0x09,0x3c,
- 0xfe,0x00,0x29,0x35,0x00,0x00,0x00,0x00,0x24,0x40,0x09,0x01,
- 0x00,0x00,0x00,0x00,0x25,0x40,0x04,0x01,0x00,0x00,0x00,0x00,
- 0x00,0x60,0x88,0x40,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x21,0x18,0xa0,0x00,0xe0,0xff,0xbd,0x27,0x17,0x00,0x61,0x2c,
- 0x14,0x00,0xbf,0xaf,0xb1,0x00,0x20,0x10,0x21,0x38,0x80,0x00,
- 0x80,0x70,0x03,0x00,0x00,0x80,0x01,0x3c,0x21,0x08,0x2e,0x00,
- 0xe0,0x7a,0x2e,0x8c,0x00,0x00,0x00,0x00,0x08,0x00,0xc0,0x01,
- 0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x3c,0x1a,0x00,0xe6,0xa4,
- 0x25,0x18,0xe1,0x00,0x12,0x00,0x6f,0x94,0x14,0x00,0x78,0x94,
- 0x16,0x00,0xe8,0x94,0x23,0xc8,0xf8,0x01,0x24,0x48,0x28,0x03,
- 0x2b,0x08,0x26,0x01,0xa2,0x00,0x20,0x10,0x01,0x00,0x02,0x24,
- 0x6c,0x1a,0x00,0x0c,0x21,0x20,0xe0,0x00,0x9e,0x00,0x00,0x10,
- 0x01,0x00,0x02,0x24,0x00,0x20,0x01,0x3c,0x1c,0x00,0xe6,0xa4,
- 0x25,0x18,0xe1,0x00,0x12,0x00,0x6a,0x94,0x14,0x00,0x6b,0x94,
- 0x16,0x00,0xed,0x94,0x23,0x60,0x4b,0x01,0x24,0x70,0x8d,0x01,
- 0x2b,0x08,0xce,0x00,0x93,0x00,0x20,0x10,0x01,0x00,0x02,0x24,
- 0x36,0x1a,0x00,0x0c,0x21,0x20,0xe0,0x00,0x8f,0x00,0x00,0x10,
- 0x01,0x00,0x02,0x24,0x80,0x92,0x84,0x8f,0x58,0x11,0x00,0x0c,
- 0x20,0x00,0xa7,0xaf,0x20,0x00,0xa7,0x8f,0x00,0x20,0x01,0x3c,
- 0x25,0x18,0xe1,0x00,0x0a,0x00,0x6f,0x94,0x21,0x20,0x40,0x00,
- 0x60,0x11,0x00,0x0c,0x0c,0x00,0x6f,0xa4,0x83,0x00,0x00,0x10,
- 0x01,0x00,0x02,0x24,0x80,0x92,0x84,0x8f,0x58,0x11,0x00,0x0c,
- 0x20,0x00,0xa7,0xaf,0x20,0x00,0xa7,0x8f,0x21,0x20,0x40,0x00,
- 0x4a,0x00,0xf8,0x90,0x00,0x00,0x00,0x00,0x04,0x00,0x19,0x37,
- 0x60,0x11,0x00,0x0c,0x4a,0x00,0xf9,0xa0,0x77,0x00,0x00,0x10,
- 0x01,0x00,0x02,0x24,0x80,0x92,0x84,0x8f,0x58,0x11,0x00,0x0c,
- 0x20,0x00,0xa7,0xaf,0x20,0x00,0xa7,0x8f,0x21,0x20,0x40,0x00,
- 0x4a,0x00,0xe8,0x90,0x00,0x00,0x00,0x00,0xf3,0x00,0x09,0x31,
- 0x60,0x11,0x00,0x0c,0x4a,0x00,0xe9,0xa0,0x6b,0x00,0x00,0x10,
- 0x01,0x00,0x02,0x24,0x00,0x20,0x01,0x3c,0x25,0x18,0xe1,0x00,
- 0x5a,0x00,0x66,0xa0,0x02,0x52,0x06,0x00,0x64,0x00,0x00,0x10,
- 0x5b,0x00,0x6a,0xa0,0x04,0x00,0xc0,0x10,0x19,0x00,0x03,0x24,
- 0x02,0x00,0x00,0x10,0x21,0x18,0xc0,0x00,0x19,0x00,0x03,0x24,
- 0x21,0x20,0xe0,0x00,0x66,0x1b,0x00,0x0c,0x21,0x28,0x60,0x00,
- 0x5b,0x00,0x00,0x10,0x01,0x00,0x02,0x24,0x68,0x00,0xeb,0x90,
- 0x02,0x62,0x06,0x00,0x27,0x68,0x80,0x01,0xff,0x00,0xcf,0x30,
- 0x24,0x70,0x6d,0x01,0x25,0x30,0xcf,0x01,0x21,0x28,0xc0,0x00,
- 0x93,0x1b,0x00,0x0c,0x21,0x20,0xe0,0x00,0x50,0x00,0x00,0x10,
- 0x01,0x00,0x02,0x24,0x21,0x20,0xe0,0x00,0xfe,0x1a,0x00,0x0c,
- 0x21,0x28,0xc0,0x00,0x4b,0x00,0x00,0x10,0x01,0x00,0x02,0x24,
- 0x02,0xc2,0x06,0x00,0x5c,0x00,0xe6,0xa0,0x46,0x00,0x00,0x10,
- 0x5d,0x00,0xf8,0xa0,0x44,0x00,0x00,0x10,0x18,0x00,0xe6,0xa4,
- 0x36,0x1a,0x00,0x0c,0x21,0x20,0xe0,0x00,0x41,0x00,0x00,0x10,
- 0x01,0x00,0x02,0x24,0x6c,0x1a,0x00,0x0c,0x21,0x20,0xe0,0x00,
- 0x3d,0x00,0x00,0x10,0x01,0x00,0x02,0x24,0x80,0x92,0x84,0x8f,
- 0x58,0x11,0x00,0x0c,0x20,0x00,0xa7,0xaf,0x20,0x00,0xa7,0x8f,
- 0x21,0x18,0x40,0x00,0x1c,0x00,0xa3,0xaf,0x01,0x1c,0x00,0x0c,
- 0x21,0x20,0xe0,0x00,0x1c,0x00,0xa3,0x8f,0x60,0x11,0x00,0x0c,
- 0x21,0x20,0x60,0x00,0x30,0x00,0x00,0x10,0x01,0x00,0x02,0x24,
- 0x21,0x20,0xe0,0x00,0x3c,0x1b,0x00,0x0c,0x21,0x28,0xc0,0x00,
- 0x2b,0x00,0x00,0x10,0x01,0x00,0x02,0x24,0x5f,0x00,0xf9,0x90,
- 0x02,0x42,0x06,0x00,0x27,0x48,0x00,0x01,0xff,0x00,0xcc,0x30,
- 0x24,0x50,0x29,0x03,0x25,0x30,0x4c,0x01,0x21,0x28,0xc0,0x00,
- 0xca,0x1b,0x00,0x0c,0x21,0x20,0xe0,0x00,0x20,0x00,0x00,0x10,
- 0x01,0x00,0x02,0x24,0x21,0x20,0xe0,0x00,0xa1,0x1a,0x00,0x0c,
- 0x21,0x28,0xc0,0x00,0x1b,0x00,0x00,0x10,0x01,0x00,0x02,0x24,
- 0x80,0x92,0x84,0x8f,0x28,0x00,0xa6,0xaf,0x58,0x11,0x00,0x0c,
- 0x20,0x00,0xa7,0xaf,0x28,0x00,0xa6,0x8f,0x20,0x00,0xa7,0x8f,
- 0xff,0x00,0xcb,0x30,0x21,0x18,0x40,0x00,0x06,0x00,0x60,0x11,
- 0x5e,0x00,0xe6,0xa0,0x50,0x00,0xed,0x94,0x00,0x00,0x00,0x00,
- 0x00,0x20,0xae,0x35,0x05,0x00,0x00,0x10,0x50,0x00,0xee,0xa4,
- 0x50,0x00,0xef,0x94,0x00,0x00,0x00,0x00,0xff,0xd7,0xf8,0x31,
- 0x50,0x00,0xf8,0xa4,0x60,0x11,0x00,0x0c,0x21,0x20,0x60,0x00,
- 0x04,0x00,0x00,0x10,0x01,0x00,0x02,0x24,0x02,0x00,0x00,0x10,
- 0x21,0x10,0x00,0x00,0x01,0x00,0x02,0x24,0x14,0x00,0xbf,0x8f,
- 0x20,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,
- 0xe0,0xff,0xbd,0x27,0x14,0x00,0xbf,0xaf,0x21,0x38,0x80,0x00,
- 0x48,0x00,0xe2,0x90,0x21,0x18,0xa0,0x00,0x08,0x00,0x41,0x2c,
- 0x07,0x00,0x20,0x10,0x08,0x00,0x01,0x24,0x21,0x20,0xe0,0x00,
- 0x94,0x11,0x00,0x0c,0x21,0x28,0x60,0x00,0xc9,0x00,0x00,0x10,
- 0x14,0x00,0xbf,0x8f,0x08,0x00,0x01,0x24,0x0d,0x00,0x41,0x14,
- 0x00,0x00,0x00,0x00,0x65,0x00,0xee,0x90,0x00,0x00,0x00,0x00,
- 0x80,0x78,0x0e,0x00,0x23,0x78,0xee,0x01,0x80,0x78,0x0f,0x00,
- 0x23,0x78,0xee,0x01,0x80,0x78,0x0f,0x00,0x21,0x08,0xfc,0x01,
- 0x38,0x94,0x38,0x8c,0x04,0x00,0x01,0x24,0x04,0x00,0x01,0x13,
- 0x21,0x28,0x60,0x00,0xb7,0x00,0x00,0x10,0x01,0x00,0x02,0x24,
- 0x21,0x28,0x60,0x00,0x17,0x00,0xa1,0x2c,0xb0,0x00,0x20,0x10,
- 0x00,0x00,0x00,0x00,0x80,0xc8,0x05,0x00,0x00,0x80,0x01,0x3c,
- 0x21,0x08,0x39,0x00,0x3c,0x7b,0x39,0x8c,0x00,0x00,0x00,0x00,
- 0x08,0x00,0x20,0x03,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x3c,
- 0x1a,0x00,0xe6,0xa4,0x25,0x18,0xe1,0x00,0x12,0x00,0x68,0x94,
- 0x14,0x00,0x69,0x94,0x16,0x00,0xeb,0x94,0x23,0x50,0x09,0x01,
- 0x24,0x60,0x4b,0x01,0x2b,0x08,0x86,0x01,0xa1,0x00,0x20,0x10,
- 0x01,0x00,0x02,0x24,0xb3,0x1c,0x00,0x0c,0x21,0x20,0xe0,0x00,
- 0x9d,0x00,0x00,0x10,0x01,0x00,0x02,0x24,0x00,0x20,0x01,0x3c,
- 0x1c,0x00,0xe6,0xa4,0x25,0x18,0xe1,0x00,0x12,0x00,0x6d,0x94,
- 0x14,0x00,0x6e,0x94,0x16,0x00,0xf8,0x94,0x23,0x78,0xae,0x01,
- 0x24,0xc8,0xf8,0x01,0x2b,0x08,0xd9,0x00,0x92,0x00,0x20,0x10,
- 0x01,0x00,0x02,0x24,0x8a,0x1c,0x00,0x0c,0x21,0x20,0xe0,0x00,
- 0x8e,0x00,0x00,0x10,0x01,0x00,0x02,0x24,0x80,0x92,0x84,0x8f,
- 0x58,0x11,0x00,0x0c,0x20,0x00,0xa7,0xaf,0x20,0x00,0xa7,0x8f,
- 0x00,0x20,0x01,0x3c,0x25,0x18,0xe1,0x00,0x0a,0x00,0x68,0x94,
- 0x21,0x20,0x40,0x00,0x60,0x11,0x00,0x0c,0x0c,0x00,0x68,0xa4,
- 0x82,0x00,0x00,0x10,0x01,0x00,0x02,0x24,0x80,0x92,0x84,0x8f,
- 0x58,0x11,0x00,0x0c,0x20,0x00,0xa7,0xaf,0x20,0x00,0xa7,0x8f,
- 0x21,0x20,0x40,0x00,0x4a,0x00,0xe9,0x90,0x00,0x00,0x00,0x00,
- 0x04,0x00,0x2a,0x35,0x60,0x11,0x00,0x0c,0x4a,0x00,0xea,0xa0,
- 0x76,0x00,0x00,0x10,0x01,0x00,0x02,0x24,0x80,0x92,0x84,0x8f,
- 0x58,0x11,0x00,0x0c,0x20,0x00,0xa7,0xaf,0x20,0x00,0xa7,0x8f,
- 0x21,0x20,0x40,0x00,0x4a,0x00,0xeb,0x90,0x00,0x00,0x00,0x00,
- 0xf3,0x00,0x6c,0x31,0x60,0x11,0x00,0x0c,0x4a,0x00,0xec,0xa0,
- 0x6a,0x00,0x00,0x10,0x01,0x00,0x02,0x24,0x00,0x20,0x01,0x3c,
- 0x25,0x18,0xe1,0x00,0x5a,0x00,0x66,0xa0,0x02,0x6a,0x06,0x00,
- 0x63,0x00,0x00,0x10,0x5b,0x00,0x6d,0xa0,0x04,0x00,0xc0,0x10,
- 0x19,0x00,0x05,0x24,0x02,0x00,0x00,0x10,0x21,0x28,0xc0,0x00,
- 0x19,0x00,0x05,0x24,0x88,0x1c,0x00,0x0c,0x21,0x20,0xe0,0x00,
- 0x5b,0x00,0x00,0x10,0x01,0x00,0x02,0x24,0x68,0x00,0xee,0x90,
- 0x02,0x7a,0x06,0x00,0x27,0xc0,0xe0,0x01,0xff,0x00,0xc8,0x30,
- 0x24,0xc8,0xd8,0x01,0x25,0x30,0x28,0x03,0x21,0x28,0xc0,0x00,
- 0xcc,0x1d,0x00,0x0c,0x21,0x20,0xe0,0x00,0x50,0x00,0x00,0x10,
- 0x01,0x00,0x02,0x24,0x21,0x20,0xe0,0x00,0x63,0x1d,0x00,0x0c,
- 0x21,0x28,0xc0,0x00,0x4b,0x00,0x00,0x10,0x01,0x00,0x02,0x24,
- 0x02,0x4a,0x06,0x00,0x5c,0x00,0xe6,0xa0,0x46,0x00,0x00,0x10,
- 0x5d,0x00,0xe9,0xa0,0x44,0x00,0x00,0x10,0x18,0x00,0xe6,0xa4,
- 0x8a,0x1c,0x00,0x0c,0x21,0x20,0xe0,0x00,0x41,0x00,0x00,0x10,
- 0x01,0x00,0x02,0x24,0xb3,0x1c,0x00,0x0c,0x21,0x20,0xe0,0x00,
- 0x3d,0x00,0x00,0x10,0x01,0x00,0x02,0x24,0x80,0x92,0x84,0x8f,
- 0x58,0x11,0x00,0x0c,0x20,0x00,0xa7,0xaf,0x20,0x00,0xa7,0x8f,
- 0x21,0x18,0x40,0x00,0x1c,0x00,0xa3,0xaf,0xdb,0x1d,0x00,0x0c,
- 0x21,0x20,0xe0,0x00,0x1c,0x00,0xa3,0x8f,0x60,0x11,0x00,0x0c,
- 0x21,0x20,0x60,0x00,0x30,0x00,0x00,0x10,0x01,0x00,0x02,0x24,
- 0x21,0x20,0xe0,0x00,0x98,0x1d,0x00,0x0c,0x21,0x28,0xc0,0x00,
- 0x2b,0x00,0x00,0x10,0x01,0x00,0x02,0x24,0x5f,0x00,0xea,0x90,
- 0x02,0x5a,0x06,0x00,0x27,0x60,0x60,0x01,0xff,0x00,0xcf,0x30,
- 0x24,0x68,0x4c,0x01,0x25,0x30,0xaf,0x01,0x21,0x28,0xc0,0x00,
- 0xdb,0x1c,0x00,0x0c,0x21,0x20,0xe0,0x00,0x20,0x00,0x00,0x10,
- 0x01,0x00,0x02,0x24,0x21,0x20,0xe0,0x00,0x72,0x1d,0x00,0x0c,
- 0x21,0x28,0xc0,0x00,0x1b,0x00,0x00,0x10,0x01,0x00,0x02,0x24,
- 0x80,0x92,0x84,0x8f,0x28,0x00,0xa6,0xaf,0x58,0x11,0x00,0x0c,
- 0x20,0x00,0xa7,0xaf,0x28,0x00,0xa6,0x8f,0x20,0x00,0xa7,0x8f,
- 0xff,0x00,0xce,0x30,0x21,0x18,0x40,0x00,0x06,0x00,0xc0,0x11,
- 0x5e,0x00,0xe6,0xa0,0x50,0x00,0xf8,0x94,0x00,0x00,0x00,0x00,
- 0x00,0x20,0x19,0x37,0x05,0x00,0x00,0x10,0x50,0x00,0xf9,0xa4,
- 0x50,0x00,0xe8,0x94,0x00,0x00,0x00,0x00,0xff,0xd7,0x09,0x31,
- 0x50,0x00,0xe9,0xa4,0x60,0x11,0x00,0x0c,0x21,0x20,0x60,0x00,
- 0x04,0x00,0x00,0x10,0x01,0x00,0x02,0x24,0x02,0x00,0x00,0x10,
- 0x21,0x10,0x00,0x00,0x01,0x00,0x02,0x24,0x14,0x00,0xbf,0x8f,
- 0x20,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,
- 0xa0,0xff,0xbd,0x27,0x1c,0x00,0xbf,0xaf,0x18,0x00,0xb1,0xaf,
- 0x00,0xa3,0x0e,0x3c,0x10,0x0d,0xc7,0x95,0x00,0xa3,0x0f,0x3c,
- 0x12,0x0d,0xf1,0x95,0xfc,0x03,0xe7,0x30,0xfc,0x03,0x31,0x32,
- 0x51,0x00,0xf1,0x10,0x1c,0x00,0xbf,0x8f,0x3c,0x00,0xb2,0xaf,
- 0x34,0x00,0xb4,0xaf,0x30,0x00,0xb5,0xaf,0x28,0x00,0xb7,0xaf,
- 0x24,0x00,0xbe,0xaf,0x00,0xa3,0x1e,0x3c,0x00,0xa3,0x17,0x3c,
- 0x00,0x83,0x15,0x3c,0x00,0xa3,0x14,0x3c,0x00,0xa3,0x12,0x3c,
- 0x38,0x00,0xb3,0xaf,0x2c,0x00,0xb6,0xaf,0x10,0x94,0x96,0x27,
- 0x54,0x00,0xb3,0x27,0x18,0x0d,0x52,0x36,0x00,0x04,0x94,0x36,
- 0x00,0x10,0xb5,0x36,0x1a,0x0d,0xf7,0x36,0x00,0x08,0xde,0x37,
- 0x40,0x00,0xb0,0xaf,0x83,0xc0,0x11,0x00,0x80,0xc8,0x18,0x00,
- 0x21,0x80,0x99,0x02,0x03,0x00,0x01,0x8a,0x00,0x00,0x01,0x9a,
- 0x00,0x00,0x00,0x00,0x03,0x00,0x61,0xaa,0x00,0x00,0x61,0xba,
- 0x55,0x00,0xa9,0x93,0x08,0x94,0x8b,0x8f,0xc0,0x51,0x09,0x00,
- 0x2b,0x08,0x2b,0x01,0x11,0x00,0x20,0x10,0x21,0x20,0xaa,0x02,
- 0x5c,0x00,0xa7,0xaf,0x65,0x00,0x8c,0x90,0x54,0x00,0xa5,0x93,
- 0x80,0x68,0x0c,0x00,0x23,0x68,0xac,0x01,0x80,0x68,0x0d,0x00,
- 0x23,0x68,0xac,0x01,0x80,0x68,0x0d,0x00,0x21,0x70,0xcd,0x02,
- 0x10,0x00,0xcf,0x8d,0x56,0x00,0xa6,0x97,0x09,0xf8,0xe0,0x01,
- 0x1f,0x00,0xa5,0x30,0x5c,0x00,0xa7,0x8f,0x10,0x00,0x40,0x14,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x42,0x96,0x03,0x00,0x01,0x8a,
- 0xfc,0x03,0x42,0x30,0x83,0xc0,0x02,0x00,0x00,0x00,0xe3,0x96,
- 0x00,0x00,0x01,0x9a,0x80,0xc8,0x18,0x00,0x21,0x40,0xd9,0x03,
- 0x04,0x00,0x42,0x24,0xfc,0x03,0x42,0x30,0xfc,0x03,0x63,0x30,
- 0x03,0x00,0x01,0xa9,0x02,0x00,0x43,0x10,0x00,0x00,0x01,0xb9,
- 0x00,0x00,0x42,0xa6,0x04,0x00,0x31,0x26,0xfc,0x03,0x31,0x32,
- 0x00,0xa3,0x09,0x3c,0xcf,0xff,0xf1,0x14,0x12,0x0d,0x31,0xa5,
- 0x40,0x00,0xb0,0x8f,0x3c,0x00,0xb2,0x8f,0x38,0x00,0xb3,0x8f,
- 0x34,0x00,0xb4,0x8f,0x30,0x00,0xb5,0x8f,0x2c,0x00,0xb6,0x8f,
- 0x28,0x00,0xb7,0x8f,0x24,0x00,0xbe,0x8f,0x00,0x00,0x00,0x00,
- 0x1c,0x00,0xbf,0x8f,0x18,0x00,0xb1,0x8f,0x08,0x00,0xe0,0x03,
- 0x60,0x00,0xbd,0x27,0x78,0xff,0xbd,0x27,0x2c,0x00,0xbf,0xaf,
- 0xc0,0x94,0x84,0x8f,0x28,0x00,0xb7,0xaf,0x24,0x00,0xb5,0xaf,
- 0x60,0x11,0x00,0x0c,0x20,0x00,0xb0,0xaf,0x00,0xa3,0x0e,0x3c,
- 0x30,0x0c,0xcf,0x91,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x11,
- 0x00,0x00,0x00,0x00,0x00,0xa3,0x18,0x3c,0x32,0x0c,0x19,0x93,
- 0x00,0x00,0x00,0x00,0x03,0x00,0x20,0x17,0x00,0x00,0x00,0x00,
- 0x64,0x17,0x00,0x0c,0x00,0x00,0x00,0x00,0x90,0x92,0x88,0x8f,
- 0x08,0x94,0x8a,0x8f,0x00,0xa3,0x09,0x3c,0x6c,0x00,0xa8,0xaf,
- 0x12,0x0d,0x35,0x95,0x00,0x83,0x17,0x3c,0x00,0x10,0xf7,0x36,
- 0xd7,0x00,0x40,0x19,0x78,0x00,0xa0,0xaf,0x34,0x00,0xbe,0xaf,
- 0x00,0xa3,0x1e,0x3c,0xe8,0x94,0x8b,0x27,0x4c,0x00,0xab,0xaf,
- 0x10,0x0d,0xde,0x37,0x48,0x00,0xb1,0xaf,0x44,0x00,0xb2,0xaf,
- 0x40,0x00,0xb3,0xaf,0x3c,0x00,0xb4,0xaf,0x38,0x00,0xb6,0xaf,
- 0x00,0x20,0x01,0x3c,0x25,0x90,0xe1,0x02,0x0a,0x00,0x53,0x96,
- 0x0c,0x00,0x54,0x96,0x4f,0x00,0x4c,0x92,0x70,0x00,0x4d,0x96,
- 0x78,0x00,0xaf,0x8f,0x54,0x89,0x98,0x8f,0x2f,0x00,0xae,0x35,
- 0x2a,0x08,0xf8,0x01,0x0a,0x00,0x20,0x10,0x24,0xb0,0x8e,0x01,
- 0x50,0x89,0x99,0x8f,0x00,0x00,0x00,0x00,0x2a,0x08,0xf9,0x01,
- 0x05,0x00,0x20,0x14,0x00,0x00,0x00,0x00,0x0e,0x00,0xe9,0x96,
- 0xff,0xff,0x88,0x26,0x24,0x98,0x09,0x01,0x0a,0x00,0x53,0xa6,
- 0x12,0x00,0x74,0x12,0x00,0x00,0x00,0x00,0x50,0x00,0xea,0x96,
- 0x00,0x00,0x00,0x00,0x40,0x00,0x4b,0x31,0x0d,0x00,0x60,0x15,
- 0x00,0x00,0x00,0x00,0x80,0x92,0x84,0x8f,0x00,0x80,0x10,0x3c,
- 0x58,0x11,0x00,0x0c,0xa4,0x35,0x10,0x26,0x50,0x00,0xec,0x96,
- 0x01,0x00,0x0d,0x24,0x40,0x00,0x8e,0x35,0x4b,0x00,0xed,0xa2,
- 0x50,0x00,0xee,0xa6,0x04,0x00,0xf0,0xae,0x60,0x11,0x00,0x0c,
- 0x21,0x20,0x40,0x00,0x4c,0x00,0x58,0x92,0x00,0x00,0x00,0x00,
- 0x05,0x00,0x00,0x13,0x00,0x00,0x00,0x00,0x03,0x00,0x74,0x16,
- 0x00,0x00,0x00,0x00,0x04,0x00,0xd6,0x36,0x4c,0x00,0x40,0xa2,
- 0x4d,0x00,0x4f,0x92,0x00,0x00,0x00,0x00,0x0a,0x00,0xe0,0x11,
- 0x00,0x00,0x00,0x00,0x0e,0x00,0xe8,0x96,0x18,0x00,0xea,0x96,
- 0x23,0xc8,0x74,0x02,0x24,0x48,0x28,0x03,0x2b,0x08,0x49,0x01,
- 0x03,0x00,0x20,0x14,0x00,0x00,0x00,0x00,0x02,0x00,0xd6,0x36,
- 0x4d,0x00,0x40,0xa2,0x50,0x00,0xeb,0x96,0x12,0x00,0x53,0x96,
- 0x14,0x00,0x54,0x96,0x01,0x00,0x6d,0x31,0x0a,0x00,0xa0,0x11,
- 0x00,0x00,0x00,0x00,0x16,0x00,0xee,0x96,0x1a,0x00,0xef,0x96,
- 0x23,0x60,0x74,0x02,0x24,0xc0,0x8e,0x01,0x2b,0x08,0x0f,0x03,
- 0x03,0x00,0x20,0x10,0x00,0x00,0x00,0x00,0x6c,0x1a,0x00,0x0c,
- 0x21,0x20,0xe0,0x02,0x4e,0x00,0x59,0x92,0x00,0x00,0x00,0x00,
- 0x1d,0x00,0x20,0x13,0x4c,0x00,0xa9,0x8f,0x1b,0x00,0x74,0x12,
- 0x4c,0x00,0xa9,0x8f,0x16,0x00,0xe2,0x96,0x23,0x40,0x74,0x02,
- 0x24,0x48,0x02,0x01,0x42,0x50,0x02,0x00,0x2b,0x08,0x49,0x01,
- 0x0f,0x00,0x20,0x14,0x00,0x00,0x00,0x00,0x6c,0x00,0xab,0x8f,
- 0x20,0x00,0x4d,0x96,0x22,0x00,0x58,0x96,0x23,0x60,0x6d,0x01,
- 0xff,0xff,0x8e,0x31,0x2b,0x08,0xd8,0x01,0x07,0x00,0x20,0x10,
- 0x00,0x00,0x00,0x00,0x4c,0x00,0xaf,0x8f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xf9,0x95,0x00,0x00,0x00,0x00,0x06,0x00,0x79,0x16,
- 0x4c,0x00,0xa9,0x8f,0x4e,0x00,0x40,0xa2,0x6c,0x00,0xa8,0x8f,
- 0x08,0x00,0xd6,0x36,0x20,0x00,0x48,0xa6,0x4c,0x00,0xa9,0x8f,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x33,0xa5,0x54,0x00,0x4a,0x92,
- 0x57,0x00,0x4b,0x92,0x56,0x00,0x4c,0x92,0x58,0x00,0x58,0x92,
- 0x26,0x68,0x4b,0x01,0x24,0x70,0xac,0x01,0x25,0x78,0xd8,0x01,
- 0x02,0x00,0xe0,0x11,0x00,0x00,0x00,0x00,0x20,0x00,0xd6,0x36,
- 0x33,0x00,0xc0,0x12,0x00,0x00,0x00,0x00,0x00,0xa3,0x19,0x3c,
- 0x18,0x0d,0x33,0x97,0x00,0xa3,0x08,0x3c,0xfc,0x03,0x73,0x32,
- 0x1a,0x0d,0x14,0x95,0x83,0x88,0x13,0x00,0x00,0xa3,0x01,0x3c,
- 0x04,0x00,0x73,0x26,0x00,0x08,0x21,0x34,0x80,0x88,0x11,0x00,
- 0xfc,0x03,0x73,0x32,0xfc,0x03,0x94,0x32,0x0c,0x00,0x74,0x16,
- 0x21,0x88,0x21,0x02,0x80,0x92,0x84,0x8f,0x58,0x11,0x00,0x0c,
- 0x00,0x00,0x00,0x00,0x4f,0x00,0x49,0x92,0xff,0x00,0xca,0x32,
- 0x25,0x58,0x2a,0x01,0x4f,0x00,0x4b,0xa2,0x60,0x11,0x00,0x0c,
- 0x21,0x20,0x40,0x00,0x1e,0x00,0x00,0x10,0x00,0x00,0xc9,0x97,
- 0x78,0x00,0xad,0x8f,0x00,0x00,0x00,0x00,0x00,0x00,0x2d,0xa2,
- 0x01,0x00,0x36,0xa2,0x57,0x00,0x50,0x92,0x00,0x00,0x00,0x00,
- 0x03,0x00,0x30,0xa2,0x80,0x92,0x84,0x8f,0x58,0x11,0x00,0x0c,
- 0x00,0x00,0x00,0x00,0x54,0x00,0x4c,0x92,0x58,0x00,0x58,0x92,
- 0x26,0x70,0x90,0x01,0x58,0x00,0x40,0xa2,0x25,0x78,0xd8,0x01,
- 0x26,0x80,0x0f,0x02,0x4f,0x00,0x40,0xa2,0x60,0x11,0x00,0x0c,
- 0x21,0x20,0x40,0x00,0xff,0x00,0x02,0x32,0x02,0x00,0x22,0xa2,
- 0x57,0x00,0x42,0xa2,0x00,0xa3,0x19,0x3c,0x04,0x00,0x00,0x10,
- 0x18,0x0d,0x33,0xa7,0x54,0x00,0x48,0x92,0x00,0x00,0x00,0x00,
- 0x57,0x00,0x48,0xa2,0x00,0x00,0xc9,0x97,0x00,0x00,0x00,0x00,
- 0x0a,0x00,0xa9,0x12,0x78,0x00,0xad,0x8f,0x29,0x13,0x00,0x0c,
- 0x00,0x00,0x00,0x00,0x00,0xa3,0x0a,0x3c,0x12,0x0d,0x55,0x95,
- 0x00,0x00,0xcb,0x97,0x00,0x00,0x00,0x00,0xf9,0xff,0xab,0x16,
- 0x00,0x00,0x00,0x00,0x78,0x00,0xad,0x8f,0x4c,0x00,0xae,0x8f,
- 0x08,0x94,0x8f,0x8f,0x01,0x00,0xac,0x25,0x02,0x00,0xd8,0x25,
- 0x2a,0x08,0x8f,0x01,0x4c,0x00,0xb8,0xaf,0x78,0x00,0xac,0xaf,
- 0x3c,0xff,0x20,0x14,0x80,0x00,0xf7,0x26,0x48,0x00,0xb1,0x8f,
- 0x44,0x00,0xb2,0x8f,0x40,0x00,0xb3,0x8f,0x3c,0x00,0xb4,0x8f,
- 0x38,0x00,0xb6,0x8f,0x34,0x00,0xbe,0x8f,0x00,0x00,0x00,0x00,
- 0x00,0xa3,0x10,0x3c,0x04,0x0e,0x10,0x36,0x00,0x00,0x19,0x96,
- 0x00,0x00,0x00,0x00,0x22,0x00,0x20,0x13,0x00,0x00,0x00,0x00,
- 0xc8,0x94,0x82,0x8f,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0x24,
- 0x1d,0x00,0x40,0x1c,0xc8,0x94,0x82,0xaf,0x00,0xa3,0x08,0x3c,
- 0x1a,0x0d,0x09,0x95,0x00,0xa3,0x0a,0x3c,0x18,0x0d,0x4b,0x95,
- 0x00,0x00,0x00,0x00,0x13,0x00,0x2b,0x11,0x00,0x00,0x00,0x00,
- 0x80,0x92,0x84,0x8f,0x58,0x11,0x00,0x0c,0x00,0x00,0x00,0x00,
- 0xc4,0x94,0x82,0x8f,0x00,0xa1,0x03,0x3c,0x00,0x80,0x63,0x34,
- 0x00,0xa3,0x05,0x3c,0x01,0x00,0x4d,0x34,0x06,0x0e,0xa5,0x34,
- 0x00,0x00,0x6d,0xa4,0x00,0x00,0xae,0x94,0x00,0x00,0x00,0x00,
- 0x01,0x00,0xd8,0x25,0x00,0x00,0xb8,0xa4,0x00,0x00,0x62,0xa4,
- 0xc0,0x94,0x84,0x8f,0x60,0x11,0x00,0x0c,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x02,0x96,0x00,0x00,0x00,0x00,0xc8,0x94,0x82,0xaf,
- 0x33,0x18,0x00,0x0c,0x0a,0x00,0x04,0x24,0x2c,0x00,0xbf,0x8f,
- 0x20,0x00,0xb0,0x8f,0x24,0x00,0xb5,0x8f,0x28,0x00,0xb7,0x8f,
- 0x08,0x00,0xe0,0x03,0x88,0x00,0xbd,0x27,0xc0,0xff,0xbd,0x27,
- 0x18,0x00,0xb0,0xaf,0x00,0x83,0x10,0x3c,0x00,0x10,0x10,0x36,
- 0x3c,0x00,0xbf,0xaf,0x00,0x83,0x05,0x3c,0x38,0x00,0xbe,0xaf,
- 0x30,0x00,0xb6,0xaf,0x34,0x00,0xb7,0xaf,0x28,0x00,0xb4,0xaf,
- 0x2c,0x00,0xb5,0xaf,0x20,0x00,0xb2,0xaf,0x24,0x00,0xb3,0xaf,
- 0x1c,0x00,0xb1,0xaf,0x00,0x30,0xa5,0x34,0xe8,0x15,0x00,0x0c,
- 0x21,0x20,0x00,0x02,0x21,0xa0,0x00,0x02,0x10,0x94,0x92,0x27,
- 0x21,0xa8,0x00,0x00,0x01,0xa1,0x16,0x3c,0x07,0x00,0x17,0x24,
- 0x04,0x00,0x1e,0x24,0x21,0x98,0xc0,0x02,0xff,0x00,0x0e,0x24,
- 0x00,0x00,0x6e,0xa2,0xf3,0x01,0x02,0x24,0x21,0x18,0x40,0x00,
- 0xfe,0xff,0x60,0x14,0xff,0xff,0x42,0x24,0x00,0x00,0x70,0x92,
- 0x00,0x00,0x00,0x00,0x82,0x80,0x10,0x00,0x21,0x18,0x00,0x02,
- 0xff,0xff,0x6f,0x24,0x08,0x00,0xe1,0x2d,0x6c,0x00,0x20,0x10,
- 0x00,0x00,0x00,0x00,0x80,0x78,0x0f,0x00,0x00,0x80,0x01,0x3c,
- 0x21,0x08,0x2f,0x00,0x98,0x7b,0x2f,0x8c,0x00,0x00,0x00,0x00,
- 0x08,0x00,0xe0,0x01,0x00,0x00,0x00,0x00,0x00,0x80,0x02,0x3c,
- 0x50,0x5c,0x42,0x24,0x00,0x80,0x19,0x3c,0x00,0x80,0x08,0x3c,
- 0x00,0x80,0x09,0x3c,0x10,0x00,0x18,0x24,0x50,0x46,0x39,0x27,
- 0x04,0x70,0x08,0x25,0x90,0x71,0x29,0x25,0x00,0x00,0x54,0xae,
- 0x24,0x00,0x58,0xae,0x04,0x00,0x53,0xae,0x08,0x00,0x42,0xae,
- 0x0c,0x00,0x42,0xae,0x10,0x00,0x59,0xae,0x14,0x00,0x42,0xae,
- 0x18,0x00,0x48,0xae,0x1c,0x00,0x49,0xae,0x28,0x00,0x50,0xae,
- 0x02,0x00,0x0a,0x24,0x0c,0x00,0x6a,0xa2,0x31,0x00,0x00,0x10,
- 0x21,0x88,0x00,0x00,0x80,0x58,0x15,0x00,0x23,0x58,0x75,0x01,
- 0xc0,0x58,0x0b,0x00,0xa8,0x93,0x8c,0x27,0x00,0x80,0x06,0x3c,
- 0x00,0x77,0xc6,0x24,0x21,0x20,0x6c,0x01,0x01,0x00,0x05,0x24,
- 0xd3,0x17,0x00,0x0c,0x00,0x04,0x87,0x26,0x08,0x00,0x01,0x24,
- 0x03,0x00,0x01,0x12,0x00,0x00,0x00,0x00,0x03,0x00,0x17,0x16,
- 0x00,0x00,0x00,0x00,0x3d,0x00,0xa0,0x1e,0x00,0x00,0x00,0x00,
- 0x00,0x80,0x02,0x3c,0x00,0x80,0x04,0x3c,0x00,0x80,0x05,0x3c,
- 0x00,0x80,0x06,0x3c,0x00,0x00,0x54,0xae,0xd8,0x79,0xc6,0x24,
- 0x6c,0x77,0xa5,0x24,0x44,0x49,0x84,0x24,0x50,0x5c,0x42,0x24,
- 0x04,0x00,0x1e,0x16,0x21,0x88,0x00,0x00,0x09,0x00,0x0d,0x24,
- 0x07,0x00,0x00,0x10,0x24,0x00,0x4d,0xae,0x04,0x00,0x17,0x16,
- 0x08,0x00,0x03,0x24,0x02,0x00,0x00,0x10,0x21,0x18,0xc0,0x03,
- 0x08,0x00,0x03,0x24,0x24,0x00,0x43,0xae,0x04,0x00,0x53,0xae,
- 0x08,0x00,0x42,0xae,0x0c,0x00,0x42,0xae,0x10,0x00,0x44,0xae,
- 0x14,0x00,0x42,0xae,0x18,0x00,0x45,0xae,0x1c,0x00,0x46,0xae,
- 0x28,0x00,0x50,0xae,0x02,0x00,0x0e,0x24,0x01,0x00,0x00,0x10,
- 0x0c,0x00,0x6e,0xa2,0x24,0x00,0x42,0x8e,0x08,0x94,0x98,0x8f,
- 0xc0,0x79,0x02,0x00,0x21,0xc8,0x02,0x03,0x41,0x00,0x21,0x2b,
- 0x21,0xa0,0x8f,0x02,0x04,0x00,0x20,0x14,0x08,0x94,0x99,0xaf,
- 0x58,0x89,0x84,0x27,0x20,0x0c,0x00,0x0c,0x3b,0x03,0x05,0x24,
- 0x24,0x00,0x48,0x8e,0x00,0x00,0x50,0x8e,0x0b,0x00,0x00,0x11,
- 0x00,0x00,0x00,0x00,0x1c,0x00,0x49,0x8e,0x21,0x20,0x00,0x02,
- 0x21,0x28,0x40,0x02,0x09,0xf8,0x20,0x01,0x21,0x30,0x20,0x02,
- 0x24,0x00,0x4a,0x8e,0x01,0x00,0x31,0x26,0x2b,0x08,0x2a,0x02,
- 0xf7,0xff,0x20,0x14,0x80,0x00,0x10,0x26,0x0c,0x94,0x8b,0x8f,
- 0x2c,0x00,0x52,0x26,0x01,0x00,0x6c,0x25,0x0c,0x94,0x8c,0xaf,
- 0x01,0x00,0xb5,0x26,0x84,0xff,0xbe,0x16,0x00,0x40,0xd6,0x26,
- 0x08,0x94,0x8d,0x8f,0x00,0xa3,0x12,0x3c,0x1f,0x00,0xae,0x25,
- 0x42,0x79,0x0e,0x00,0x90,0x01,0x52,0x36,0x9c,0x92,0x8f,0xaf,
- 0x00,0x00,0x45,0x8e,0x01,0x80,0x04,0x3c,0x00,0xa0,0x01,0x3c,
- 0x80,0x95,0x84,0x24,0xf1,0x15,0x00,0x0c,0x21,0x28,0xa1,0x00,
- 0xd0,0x94,0x90,0x27,0x00,0x80,0x06,0x3c,0x21,0x88,0x40,0x00,
- 0x1c,0x4e,0xc6,0x24,0x21,0x20,0x00,0x02,0x01,0x00,0x05,0x24,
- 0xd3,0x17,0x00,0x0c,0x21,0x38,0x00,0x00,0xed,0x17,0x00,0x0c,
- 0x21,0x20,0x00,0x02,0x08,0x94,0x98,0x8f,0x00,0xa3,0x19,0x3c,
- 0x00,0xa3,0x08,0x3c,0x02,0x0c,0x38,0xa7,0x04,0x0c,0x00,0xa5,
- 0x00,0xa3,0x09,0x3c,0x06,0x0c,0x31,0xa5,0x00,0x00,0x4a,0x8e,
- 0x00,0xa3,0x0c,0x3c,0x82,0x5a,0x0a,0x00,0x08,0x0c,0x8b,0xa5,
- 0x00,0xa3,0x0d,0x3c,0x10,0x0d,0xa0,0xa5,0x00,0xa3,0x0e,0x3c,
- 0x12,0x0d,0xc0,0xa5,0x00,0xa3,0x18,0x3c,0x00,0x04,0x0f,0x24,
- 0xfc,0x03,0x02,0x24,0x14,0x0d,0x0f,0xa7,0x00,0xa3,0x19,0x3c,
- 0x16,0x0d,0x22,0xa7,0x00,0xa3,0x08,0x3c,0x18,0x0d,0x00,0xa5,
- 0x00,0xa3,0x09,0x3c,0x1a,0x0d,0x20,0xa5,0x00,0xa3,0x0b,0x3c,
- 0x00,0x08,0x0a,0x24,0x1c,0x0d,0x6a,0xa5,0x00,0xa3,0x0c,0x3c,
- 0x1e,0x0d,0x82,0xa5,0x3c,0x00,0xbf,0x8f,0x38,0x00,0xbe,0x8f,
- 0x34,0x00,0xb7,0x8f,0x30,0x00,0xb6,0x8f,0x2c,0x00,0xb5,0x8f,
- 0x28,0x00,0xb4,0x8f,0x24,0x00,0xb3,0x8f,0x20,0x00,0xb2,0x8f,
- 0x1c,0x00,0xb1,0x8f,0x18,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03,
- 0x40,0x00,0xbd,0x27,0x70,0x95,0x82,0x8f,0x6c,0x95,0x98,0x8f,
- 0x01,0x08,0x42,0x34,0x00,0x04,0x43,0x34,0x25,0x20,0x78,0x00,
- 0x01,0x00,0x0e,0x24,0x01,0x08,0x0f,0x24,0x00,0x03,0x99,0x34,
- 0x98,0x92,0x8e,0xaf,0x8c,0x92,0x8f,0xaf,0xc0,0x94,0x99,0xaf,
- 0x68,0x95,0x84,0xaf,0x84,0x92,0x84,0xaf,0x88,0x92,0x83,0xaf,
- 0x08,0x00,0xe0,0x03,0x80,0x92,0x82,0xaf,0xe8,0xff,0xbd,0x27,
- 0x14,0x00,0xbf,0xaf,0x70,0x89,0x84,0x27,0x20,0x0c,0x00,0x0c,
- 0x4d,0x00,0x05,0x24,0x14,0x00,0xbf,0x8f,0x18,0x00,0xbd,0x27,
- 0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0xe8,0xff,0xbd,0x27,
- 0x14,0x00,0xbf,0xaf,0x80,0x89,0x84,0x27,0x20,0x0c,0x00,0x0c,
- 0x58,0x00,0x05,0x24,0x14,0x00,0xbf,0x8f,0x18,0x00,0xbd,0x27,
- 0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x00,0x80,0x0e,0x3c,
- 0xff,0x03,0x02,0x3c,0x74,0x34,0xce,0x25,0xff,0xff,0x42,0x34,
- 0x82,0x78,0x0e,0x00,0x00,0x80,0x0a,0x3c,0xe8,0xff,0xbd,0x27,
- 0x00,0x08,0x03,0x3c,0x24,0xc0,0xe2,0x01,0x90,0x32,0x4a,0x25,
- 0x14,0x00,0xbf,0xaf,0x25,0xc8,0x03,0x03,0x00,0x80,0x08,0x3c,
- 0x82,0x58,0x0a,0x00,0x00,0x00,0x19,0xad,0x00,0x80,0x09,0x3c,
- 0x24,0x60,0x62,0x01,0x04,0x00,0x20,0xad,0x25,0x68,0x83,0x01,
- 0x00,0x80,0x0e,0x3c,0x80,0x00,0xcd,0xad,0x00,0x80,0x0f,0x3c,
- 0xf8,0x18,0x00,0x0c,0x84,0x00,0xe0,0xad,0x00,0xa1,0x05,0x3c,
- 0x00,0x80,0xa5,0x34,0x80,0x00,0x18,0x24,0x00,0x00,0xb8,0xa4,
- 0x21,0x10,0x00,0x00,0x64,0x00,0x03,0x24,0x04,0x00,0x42,0x24,
- 0xff,0xff,0x43,0x14,0x04,0x00,0x42,0x24,0x82,0x00,0x19,0x24,
- 0xc4,0x94,0x99,0xaf,0x82,0x00,0x08,0x24,0x00,0x00,0xa8,0xa4,
- 0x00,0xa3,0x09,0x3c,0x30,0x0c,0x20,0xa1,0x74,0x11,0x00,0x0c,
- 0x00,0x03,0x04,0x24,0x7c,0x15,0x00,0x0c,0x00,0x00,0x00,0x00,
- 0xac,0x17,0x00,0x0c,0x00,0x00,0x00,0x00,0x4b,0x17,0x00,0x0c,
- 0x00,0x00,0x00,0x00,0xa8,0x14,0x00,0x0c,0x00,0x00,0x00,0x00,
- 0x7c,0x15,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x80,0x06,0x3c,
- 0xc8,0x5b,0xc6,0x24,0x78,0x95,0x84,0x27,0x21,0x28,0x00,0x00,
- 0xd3,0x17,0x00,0x0c,0x21,0x38,0x00,0x00,0xed,0x17,0x00,0x0c,
- 0x78,0x95,0x84,0x27,0x4f,0x00,0x02,0x24,0x00,0xa3,0x0a,0x3c,
- 0x20,0x0d,0x42,0xa1,0x00,0xa3,0x0b,0x3c,0x53,0x00,0x03,0x24,
- 0x00,0x0c,0x62,0xa1,0x00,0xa3,0x0c,0x3c,0x21,0x0d,0x83,0xa1,
- 0x00,0xa3,0x0d,0x3c,0x61,0x18,0x00,0x0c,0x01,0x0c,0xa3,0xa1,
- 0x14,0x00,0xbf,0x8f,0x18,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,
- 0x21,0x10,0x00,0x00,0x2b,0x08,0x85,0x00,0x05,0x00,0x20,0x10,
- 0x00,0x00,0x00,0x00,0x04,0x00,0x84,0x24,0x2b,0x08,0x85,0x00,
- 0xfd,0xff,0x20,0x14,0xfc,0xff,0x80,0xac,0x08,0x00,0xe0,0x03,
- 0x00,0x00,0x00,0x00,0xa8,0xff,0xbd,0x27,0x40,0x00,0xbe,0xaf,
- 0xff,0x1f,0x02,0x3c,0x00,0xff,0x42,0x34,0x21,0xf0,0x80,0x00,
- 0x3c,0x00,0xb7,0xaf,0x21,0xb8,0xa0,0x00,0x00,0xa0,0x03,0x3c,
- 0xff,0x00,0xce,0x27,0x24,0x78,0xc2,0x01,0x24,0xc0,0xe2,0x02,
- 0x44,0x00,0xbf,0xaf,0x25,0xf0,0xe3,0x01,0x25,0xb8,0x03,0x03,
- 0x38,0x00,0xb6,0xaf,0x30,0x00,0xb4,0xaf,0x34,0x00,0xb5,0xaf,
- 0x28,0x00,0xb2,0xaf,0x2c,0x00,0xb3,0xaf,0x20,0x00,0xb0,0xaf,
- 0x24,0x00,0xb1,0xaf,0x21,0x28,0xe0,0x02,0xe8,0x15,0x00,0x0c,
- 0x21,0x20,0xc0,0x03,0x01,0x80,0x16,0x3c,0x01,0x80,0x07,0x3c,
- 0x48,0x00,0xa0,0xaf,0x4c,0x00,0xa0,0xaf,0x70,0x90,0xe7,0x24,
- 0xc0,0x8f,0xd6,0x26,0x04,0x00,0x06,0x24,0x28,0x00,0xc2,0x8e,
- 0x08,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x48,0x00,0xb9,0x8f,
- 0x4c,0x00,0xa9,0x8f,0x01,0x00,0x28,0x27,0x08,0x00,0x2a,0x25,
- 0x48,0x00,0xa8,0xaf,0x08,0x00,0x00,0x10,0x4c,0x00,0xaa,0xaf,
- 0xf9,0xff,0x46,0x10,0x48,0x00,0xb9,0x8f,0x4c,0x00,0xab,0x8f,
- 0x24,0x00,0xcc,0x8e,0x00,0x00,0x00,0x00,0x21,0x68,0x6c,0x01,
- 0x4c,0x00,0xad,0xaf,0x2c,0x00,0xd6,0x26,0xed,0xff,0xc7,0x16,
- 0x00,0x00,0x00,0x00,0x10,0x00,0x15,0x24,0x48,0x00,0xae,0x8f,
- 0x00,0x00,0x00,0x00,0x05,0x00,0xc0,0x19,0x00,0x10,0xa1,0x2a,
- 0x03,0x00,0x20,0x10,0x00,0xe0,0x01,0x24,0x05,0x00,0x00,0x10,
- 0x24,0x88,0xe1,0x02,0x21,0x78,0xb5,0x02,0xff,0xff,0xf8,0x25,
- 0x27,0xc8,0x00,0x03,0x24,0x88,0xf9,0x02,0x00,0x10,0xa1,0x2a,
- 0x04,0x00,0x20,0x10,0x21,0x90,0xa0,0x02,0x02,0x00,0x00,0x10,
- 0x00,0x10,0x12,0x24,0x21,0x90,0xa0,0x02,0x4c,0x00,0xa9,0x8f,
- 0x40,0x18,0x15,0x00,0x19,0x00,0x69,0x00,0x48,0x00,0xac,0x8f,
- 0x23,0x40,0x3e,0x02,0x12,0x50,0x00,0x00,0x23,0x58,0x0a,0x01,
- 0x00,0x00,0x00,0x00,0x19,0x00,0x4c,0x02,0x12,0x68,0x00,0x00,
- 0x23,0x10,0x6d,0x01,0x2a,0x08,0x55,0x00,0x09,0x00,0x20,0x10,
- 0x21,0x98,0x40,0x00,0x22,0x00,0x61,0x28,0x9e,0x00,0x20,0x10,
- 0x23,0x10,0xfe,0x02,0x90,0x89,0x84,0x27,0x20,0x0c,0x00,0x0c,
- 0xb2,0x00,0x05,0x24,0x99,0x00,0x00,0x10,0x23,0x10,0xfe,0x02,
- 0x01,0x80,0x16,0x3c,0xc0,0x8f,0xd6,0x26,0x28,0x00,0xce,0x8e,
- 0x00,0x00,0x00,0x00,0x27,0x00,0xce,0x14,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xd0,0x8e,0xff,0xff,0x4f,0x26,0x2a,0x08,0x72,0x02,
- 0x00,0x04,0x10,0x26,0x06,0x00,0x20,0x14,0x0e,0x00,0x0f,0xa6,
- 0x0e,0x00,0x18,0x96,0xff,0xff,0x59,0x32,0x21,0x48,0x19,0x03,
- 0x0e,0x00,0x09,0xa6,0x23,0x98,0x72,0x02,0x0e,0x00,0x02,0x96,
- 0x00,0x00,0x00,0x00,0x23,0x88,0x22,0x02,0xff,0xff,0x31,0x26,
- 0x02,0x41,0x11,0x00,0x2b,0x08,0x3e,0x02,0x08,0x00,0x08,0xa6,
- 0x07,0x00,0x20,0x14,0x3c,0x00,0x11,0xae,0x3c,0x00,0x03,0x8e,
- 0x00,0x00,0x00,0x00,0x21,0x50,0x62,0x00,0x2b,0x08,0x57,0x01,
- 0x09,0x00,0x20,0x14,0x00,0x00,0x00,0x00,0x9c,0x89,0x84,0x27,
- 0x20,0x0c,0x00,0x0c,0xce,0x00,0x05,0x24,0x01,0x80,0x07,0x3c,
- 0x0e,0x00,0x02,0x96,0x3c,0x00,0x03,0x8e,0x70,0x90,0xe7,0x24,
- 0x04,0x00,0x06,0x24,0x08,0x00,0x0c,0x96,0x16,0x00,0x02,0xa6,
- 0x38,0x00,0x03,0xae,0x10,0x00,0x0c,0xa6,0x2c,0x00,0xd6,0x26,
- 0xd4,0xff,0xc7,0x16,0x00,0x00,0x00,0x00,0x01,0x80,0x16,0x3c,
- 0xc0,0x8f,0xd6,0x26,0x28,0x00,0xc2,0x8e,0x03,0x00,0x00,0x10,
- 0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x10,0x08,0x00,0x12,0x24,
- 0xfd,0xff,0x46,0x10,0x00,0x00,0x00,0x00,0x24,0x00,0xd2,0x8e,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x8e,0x22,0x00,0x40,0x12,
- 0x00,0x00,0x00,0x00,0xff,0xff,0xb4,0x26,0x2a,0x08,0x75,0x02,
- 0x06,0x00,0x20,0x14,0x16,0x00,0x14,0xa6,0x16,0x00,0x0b,0x96,
- 0xff,0xff,0xad,0x32,0x21,0x70,0x6d,0x01,0x16,0x00,0x0e,0xa6,
- 0x23,0x98,0x75,0x02,0x16,0x00,0x02,0x96,0x00,0x00,0x00,0x00,
- 0x23,0x88,0x22,0x02,0xff,0xff,0x31,0x26,0x02,0x79,0x11,0x00,
- 0x2b,0x08,0x3e,0x02,0x38,0x00,0x11,0xae,0x07,0x00,0x20,0x14,
- 0x10,0x00,0x0f,0xa6,0x38,0x00,0x18,0x8e,0x00,0x00,0x00,0x00,
- 0x21,0xc8,0x02,0x03,0x2b,0x08,0x37,0x03,0x04,0x00,0x20,0x14,
- 0x00,0x00,0x00,0x00,0xa8,0x89,0x84,0x27,0x20,0x0c,0x00,0x0c,
- 0x00,0x01,0x05,0x24,0xff,0xff,0x52,0x26,0xe4,0xff,0x40,0x16,
- 0x80,0x00,0x10,0x26,0x01,0x80,0x07,0x3c,0x70,0x90,0xe7,0x24,
- 0x04,0x00,0x06,0x24,0x2c,0x00,0xd6,0x26,0xd1,0xff,0xc7,0x16,
- 0x00,0x00,0x00,0x00,0x01,0x80,0x16,0x3c,0xc0,0x8f,0xd6,0x26,
- 0x28,0x00,0xc2,0x8e,0x03,0x00,0x00,0x10,0x00,0x00,0x00,0x00,
- 0x05,0x00,0x00,0x10,0x08,0x00,0x12,0x24,0xfd,0xff,0x46,0x10,
- 0x00,0x00,0x00,0x00,0x24,0x00,0xd2,0x8e,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xd0,0x8e,0x22,0x00,0x40,0x12,0x00,0x00,0x00,0x00,
- 0xff,0xff,0xb4,0x26,0x2a,0x08,0x75,0x02,0x06,0x00,0x20,0x14,
- 0x0e,0x00,0x14,0xa6,0x0e,0x00,0x09,0x96,0xff,0xff,0xa8,0x32,
- 0x21,0x50,0x28,0x01,0x0e,0x00,0x0a,0xa6,0x23,0x98,0x75,0x02,
- 0x0e,0x00,0x02,0x96,0x00,0x00,0x00,0x00,0x23,0x88,0x22,0x02,
- 0xff,0xff,0x31,0x26,0x02,0x61,0x11,0x00,0x2b,0x08,0x3e,0x02,
- 0x08,0x00,0x0c,0xa6,0x07,0x00,0x20,0x14,0x3c,0x00,0x11,0xae,
- 0x3c,0x00,0x0b,0x8e,0x00,0x00,0x00,0x00,0x21,0x68,0x62,0x01,
- 0x2b,0x08,0xb7,0x01,0x04,0x00,0x20,0x14,0x00,0x00,0x00,0x00,
- 0xb4,0x89,0x84,0x27,0x20,0x0c,0x00,0x0c,0x27,0x01,0x05,0x24,
- 0xff,0xff,0x52,0x26,0xe4,0xff,0x40,0x16,0x80,0x00,0x10,0x26,
- 0x01,0x80,0x07,0x3c,0x70,0x90,0xe7,0x24,0x04,0x00,0x06,0x24,
- 0x2c,0x00,0xd6,0x26,0xd1,0xff,0xc7,0x16,0x00,0x00,0x00,0x00,
- 0x40,0xa8,0x15,0x00,0x01,0x40,0xa1,0x2a,0x43,0xff,0x20,0x14,
- 0x48,0x00,0xae,0x8f,0x23,0x10,0xfe,0x02,0x44,0x00,0xbf,0x8f,
- 0x40,0x00,0xbe,0x8f,0x3c,0x00,0xb7,0x8f,0x20,0x00,0xb0,0x8f,
- 0x24,0x00,0xb1,0x8f,0x28,0x00,0xb2,0x8f,0x2c,0x00,0xb3,0x8f,
- 0x30,0x00,0xb4,0x8f,0x34,0x00,0xb5,0x8f,0x38,0x00,0xb6,0x8f,
- 0x58,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,0x82,0x12,0x02,0x00,
- 0xe8,0xff,0xbd,0x27,0x14,0x00,0xbf,0xaf,0xc0,0x94,0x84,0x8f,
- 0x60,0x11,0x00,0x0c,0x00,0x00,0x00,0x00,0x33,0x18,0x00,0x0c,
- 0x32,0x00,0x04,0x24,0x90,0x95,0x82,0x8f,0x94,0x95,0x83,0x8f,
- 0x98,0x95,0x82,0xaf,0x2b,0x08,0x62,0x00,0x03,0x00,0x20,0x10,
- 0x82,0x70,0x02,0x00,0x21,0x18,0x40,0x00,0x82,0x70,0x02,0x00,
- 0x23,0x10,0x4e,0x00,0x03,0x00,0x60,0x14,0x90,0x95,0x82,0xaf,
- 0x0b,0x00,0x00,0x10,0x94,0x95,0x83,0xaf,0x98,0x95,0x8f,0x8f,
- 0x00,0xa3,0x08,0x3c,0x00,0xc3,0x0f,0x00,0x1b,0x00,0x03,0x03,
- 0x12,0xc8,0x00,0x00,0x08,0x00,0x19,0xa5,0x94,0x95,0x83,0xaf,
- 0x02,0x00,0x60,0x14,0x00,0x00,0x00,0x00,0x0d,0x00,0x07,0x00,
- 0x14,0x00,0xbf,0x8f,0x18,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,
- 0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00,
- 0x00,0x83,0x08,0x3c,0x21,0x38,0x80,0x00,0x00,0x10,0x08,0x35,
- 0x21,0x10,0x00,0x00,0xa0,0x92,0x86,0x27,0x00,0x00,0xc4,0x8c,
- 0x21,0x18,0xc0,0x00,0x2b,0x08,0x88,0x00,0x0b,0x00,0x20,0x14,
- 0x2b,0x08,0x87,0x00,0x09,0x00,0x20,0x10,0x00,0x00,0x00,0x00,
- 0x21,0x18,0x80,0x00,0x00,0x00,0x84,0x8c,0x00,0x00,0x00,0x00,
- 0x2b,0x08,0x88,0x00,0x03,0x00,0x20,0x14,0x2b,0x08,0x87,0x00,
- 0xf9,0xff,0x20,0x14,0x00,0x00,0x00,0x00,0x06,0x00,0x87,0x14,
- 0x00,0x00,0x00,0x00,0x1c,0x00,0xa2,0x10,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xee,0x8c,0x05,0x00,0x00,0x10,0x00,0x00,0x6e,0xac,
- 0x01,0x00,0x42,0x24,0x07,0x00,0x41,0x28,0xe7,0xff,0x20,0x14,
- 0x04,0x00,0xc6,0x24,0x80,0x78,0x05,0x00,0xa0,0x92,0x98,0x27,
- 0x21,0x10,0xf8,0x01,0x00,0x00,0x44,0x8c,0x21,0x18,0x40,0x00,
- 0x2b,0x08,0x88,0x00,0x0b,0x00,0x20,0x14,0x2b,0x08,0x87,0x00,
- 0x09,0x00,0x20,0x10,0x00,0x00,0x00,0x00,0x21,0x18,0x80,0x00,
- 0x00,0x00,0x84,0x8c,0x00,0x00,0x00,0x00,0x2b,0x08,0x88,0x00,
- 0x03,0x00,0x20,0x14,0x2b,0x08,0x87,0x00,0xf9,0xff,0x20,0x14,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xe4,0xac,0x00,0x00,0x67,0xac,
- 0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0xb0,0x95,0x83,0x27,
- 0x00,0x80,0x0e,0x3c,0x00,0x80,0x0f,0x3c,0x00,0x80,0x18,0x3c,
- 0xa8,0x95,0x82,0x27,0x00,0x35,0xce,0x25,0x28,0x35,0xef,0x25,
- 0x4c,0x35,0x18,0x27,0xa0,0x95,0x99,0x27,0xa0,0x95,0x80,0xaf,
- 0xa4,0x95,0x8e,0xaf,0xa8,0x95,0x80,0xaf,0xac,0x95,0x8f,0xaf,
- 0xb0,0x95,0x80,0xaf,0xb4,0x95,0x98,0xaf,0xa0,0x92,0x99,0xaf,
- 0xa8,0x92,0x82,0xaf,0xa4,0x92,0x82,0xaf,0xb8,0x92,0x83,0xaf,
- 0xb4,0x92,0x83,0xaf,0xb0,0x92,0x83,0xaf,0x08,0x00,0xe0,0x03,
- 0xac,0x92,0x83,0xaf,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xe8,0xff,0xbd,0x27,0x00,0xa3,0x07,0x3c,0x30,0x0c,0xe7,0x34,
- 0x14,0x00,0xbf,0xaf,0x00,0x00,0xee,0x90,0x00,0x00,0x00,0x00,
- 0x3c,0x00,0xc0,0x11,0x14,0x00,0xbf,0x8f,0x00,0xa3,0x0f,0x3c,
- 0x32,0x0c,0xf8,0x91,0x00,0x00,0x00,0x00,0x37,0x00,0x00,0x17,
- 0x14,0x00,0xbf,0x8f,0x00,0xa3,0x03,0x3c,0x34,0x0c,0x63,0x34,
- 0x00,0x00,0x65,0x8c,0xff,0x3f,0x01,0x3c,0x00,0xa3,0x06,0x3c,
- 0xff,0xff,0x21,0x34,0x38,0x0c,0xc6,0x34,0x24,0x28,0xa1,0x00,
- 0x00,0x00,0xd9,0x94,0x00,0x80,0x01,0x3c,0x25,0x28,0xa1,0x00,
- 0x81,0x00,0x21,0x2f,0x03,0x00,0x20,0x14,0x00,0x00,0x00,0x00,
- 0x80,0x00,0x08,0x24,0x00,0x00,0xc8,0xa4,0x00,0x00,0xe2,0x90,
- 0x1d,0x00,0x00,0x10,0x01,0x00,0x01,0x24,0x00,0xa3,0x04,0x3c,
- 0x00,0x00,0xc2,0x94,0x21,0x18,0xa0,0x00,0x05,0x00,0x00,0x10,
- 0x3a,0x0c,0x84,0x34,0x00,0xa3,0x03,0x3c,0x00,0x00,0xc2,0x94,
- 0x3a,0x0c,0x63,0x34,0x21,0x20,0xa0,0x00,0xff,0xff,0x42,0x24,
- 0x07,0x00,0x40,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x69,0x90,
- 0xff,0xff,0x42,0x24,0x01,0x00,0x63,0x24,0x01,0x00,0x84,0x24,
- 0xfb,0xff,0x41,0x04,0xff,0xff,0x89,0xa0,0x0f,0x00,0x00,0x10,
- 0x00,0x00,0xe0,0xa0,0x00,0x00,0xe0,0xa0,0x00,0x00,0x6a,0x8c,
- 0x00,0x00,0x00,0x00,0x09,0xf8,0x40,0x01,0x00,0x00,0x00,0x00,
- 0x09,0x00,0x00,0x10,0x14,0x00,0xbf,0x8f,0x01,0x00,0x01,0x24,
- 0xe3,0xff,0x41,0x10,0x02,0x00,0x01,0x24,0xe6,0xff,0x41,0x10,
- 0x03,0x00,0x01,0x24,0xf3,0xff,0x41,0x10,0x00,0x00,0x00,0x00,
- 0x14,0x00,0xbf,0x8f,0x18,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x90,0x92,0x8e,0x8f,0x21,0x10,0x00,0x00,0xff,0xff,0xcf,0x25,
- 0xbc,0x95,0x8f,0xaf,0x88,0x93,0x83,0x27,0x04,0x00,0x04,0x24,
- 0x00,0x00,0x63,0xac,0x04,0x00,0x63,0xac,0x08,0x00,0x63,0x24,
- 0x00,0x00,0x63,0xac,0x04,0x00,0x63,0xac,0x08,0x00,0x63,0x24,
- 0x00,0x00,0x63,0xac,0x04,0x00,0x63,0xac,0x08,0x00,0x63,0x24,
- 0x00,0x00,0x63,0xac,0x04,0x00,0x63,0xac,0x04,0x00,0x42,0x24,
- 0xf3,0xff,0x44,0x14,0x08,0x00,0x63,0x24,0x21,0x10,0x00,0x00,
- 0x08,0x93,0x83,0x27,0x10,0x00,0x04,0x24,0x00,0x00,0x63,0xac,
- 0x04,0x00,0x63,0xac,0x08,0x00,0x63,0x24,0x00,0x00,0x63,0xac,
- 0x04,0x00,0x63,0xac,0x08,0x00,0x63,0x24,0x00,0x00,0x63,0xac,
- 0x04,0x00,0x63,0xac,0x08,0x00,0x63,0x24,0x00,0x00,0x63,0xac,
- 0x04,0x00,0x63,0xac,0x04,0x00,0x42,0x24,0xf3,0xff,0x44,0x14,
- 0x08,0x00,0x63,0x24,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,
- 0xd8,0xff,0xbd,0x27,0x21,0x18,0x80,0x00,0x24,0x00,0xbf,0xaf,
- 0x68,0x95,0x84,0x8f,0x2c,0x00,0xa5,0xaf,0x30,0x00,0xa6,0xaf,
- 0x34,0x00,0xa7,0xaf,0x58,0x11,0x00,0x0c,0x28,0x00,0xa3,0xaf,
- 0x28,0x00,0xa3,0x8f,0x21,0x20,0x40,0x00,0x00,0x00,0x63,0xac,
- 0x04,0x00,0x63,0xac,0x2c,0x00,0xae,0x8f,0x00,0x00,0x00,0x00,
- 0x10,0x00,0x6e,0xac,0x30,0x00,0xaf,0x8f,0x00,0x00,0x00,0x00,
- 0x08,0x00,0x6f,0xac,0x34,0x00,0xb8,0x8f,0x60,0x11,0x00,0x0c,
- 0x0c,0x00,0x78,0xac,0x24,0x00,0xbf,0x8f,0x28,0x00,0xbd,0x27,
- 0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0xe8,0xff,0xbd,0x27,
- 0x21,0x18,0x80,0x00,0x14,0x00,0xbf,0xaf,0x68,0x95,0x84,0x8f,
- 0x58,0x11,0x00,0x0c,0x18,0x00,0xa3,0xaf,0x18,0x00,0xa3,0x8f,
- 0x90,0x92,0x8e,0x8f,0x04,0x00,0x66,0x8c,0x00,0x00,0x67,0x8c,
- 0x14,0x00,0x6e,0xac,0x00,0x00,0xc7,0xac,0x04,0x00,0xe6,0xac,
- 0x10,0x00,0x6f,0x8c,0x88,0x93,0x99,0x27,0xc0,0xc0,0x0f,0x00,
- 0x21,0x28,0x19,0x03,0x04,0x00,0xa8,0x8c,0x21,0x20,0x40,0x00,
- 0x00,0x00,0x03,0xad,0x00,0x00,0x65,0xac,0x04,0x00,0x68,0xac,
- 0x60,0x11,0x00,0x0c,0x04,0x00,0xa3,0xac,0x14,0x00,0xbf,0x8f,
- 0x18,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,
- 0xe8,0xff,0xbd,0x27,0x21,0x30,0x80,0x00,0x14,0x00,0xbf,0xaf,
- 0x68,0x95,0x84,0x8f,0x18,0x00,0xa6,0xaf,0x58,0x11,0x00,0x0c,
- 0x1c,0x00,0xa5,0xaf,0x18,0x00,0xa6,0x8f,0x1c,0x00,0xa5,0x8f,
- 0x04,0x00,0xc3,0x8c,0x00,0x00,0xc4,0x8c,0x00,0x40,0x01,0x3c,
- 0x00,0x00,0x64,0xac,0x04,0x00,0x83,0xac,0x90,0x92,0x8e,0x8f,
- 0x21,0x38,0x40,0x00,0x23,0x78,0xc5,0x01,0x2b,0x08,0xe1,0x01,
- 0x08,0x00,0x20,0x10,0x0f,0x00,0xa9,0x30,0x10,0x00,0xd8,0x8c,
- 0x88,0x93,0x88,0x27,0xc0,0xc8,0x18,0x00,0x14,0x00,0xce,0xac,
- 0x06,0x00,0x00,0x10,0x21,0x18,0x28,0x03,0x0f,0x00,0xa9,0x30,
- 0xc0,0x50,0x09,0x00,0x08,0x93,0x8b,0x27,0x14,0x00,0xc5,0xac,
- 0x21,0x18,0x4b,0x01,0x04,0x00,0x62,0x8c,0x21,0x20,0xe0,0x00,
- 0x00,0x00,0x46,0xac,0x00,0x00,0xc3,0xac,0x04,0x00,0xc2,0xac,
- 0x60,0x11,0x00,0x0c,0x04,0x00,0x66,0xac,0x14,0x00,0xbf,0x8f,
- 0x18,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,
- 0xb8,0x95,0x8e,0x8f,0xe0,0xff,0xbd,0x27,0x14,0x00,0xbf,0xaf,
- 0x14,0x00,0xcf,0x8d,0x21,0x18,0x80,0x00,0x21,0xc0,0xe3,0x01,
- 0x14,0x00,0xd8,0xad,0x68,0x95,0x84,0x8f,0x21,0x28,0xc0,0x01,
- 0x58,0x11,0x00,0x0c,0x1c,0x00,0xa5,0xaf,0x1c,0x00,0xa5,0x8f,
- 0x00,0x40,0x01,0x3c,0x04,0x00,0xa3,0x8c,0x00,0x00,0xa4,0x8c,
- 0x21,0x38,0x40,0x00,0x00,0x00,0x64,0xac,0x04,0x00,0x83,0xac,
- 0x90,0x92,0x99,0x8f,0x14,0x00,0xa6,0x8c,0x00,0x00,0x00,0x00,
- 0x23,0x40,0x26,0x03,0x2b,0x08,0x01,0x01,0x08,0x00,0x20,0x10,
- 0x0f,0x00,0xcc,0x30,0x10,0x00,0xa9,0x8c,0x88,0x93,0x8b,0x27,
- 0xc0,0x50,0x09,0x00,0x14,0x00,0xb9,0xac,0x05,0x00,0x00,0x10,
- 0x21,0x18,0x4b,0x01,0x0f,0x00,0xcc,0x30,0xc0,0x68,0x0c,0x00,
- 0x08,0x93,0x8f,0x27,0x21,0x18,0xaf,0x01,0x04,0x00,0x62,0x8c,
- 0x21,0x20,0xe0,0x00,0x00,0x00,0x45,0xac,0x00,0x00,0xa3,0xac,
- 0x04,0x00,0xa2,0xac,0x60,0x11,0x00,0x0c,0x04,0x00,0x65,0xac,
- 0x14,0x00,0xbf,0x8f,0x20,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,
- 0x00,0x00,0x00,0x00,0xa8,0xff,0xbd,0x27,0x14,0x00,0xbf,0xaf,
- 0xc0,0x94,0x84,0x8f,0x60,0x11,0x00,0x0c,0x00,0x00,0x00,0x00,
- 0x28,0x00,0xb3,0xaf,0x24,0x00,0xb4,0xaf,0x00,0xa3,0x14,0x3c,
- 0x00,0xa3,0x13,0x3c,0x34,0x00,0xb0,0xaf,0x30,0x00,0xb1,0xaf,
- 0x20,0x00,0xb5,0xaf,0x1c,0x00,0xb6,0xaf,0x18,0x00,0xb7,0xaf,
- 0xc0,0x95,0x97,0x27,0x90,0x93,0x96,0x27,0x08,0x93,0x95,0x27,
- 0x00,0x80,0x11,0x3c,0x88,0x93,0x90,0x27,0x12,0x0d,0x73,0x36,
- 0x10,0x0d,0x94,0x36,0x2c,0x00,0xb2,0xaf,0x00,0x00,0x6e,0x96,
- 0x00,0x00,0x8f,0x96,0x00,0x00,0x00,0x00,0x08,0x00,0xcf,0x11,
- 0x00,0x00,0x00,0x00,0x29,0x13,0x00,0x0c,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x78,0x96,0x00,0x00,0x99,0x96,0x00,0x00,0x00,0x00,
- 0xfa,0xff,0x19,0x17,0x00,0x00,0x00,0x00,0x68,0x95,0x84,0x8f,
- 0x58,0x11,0x00,0x0c,0x00,0x00,0x00,0x00,0xbc,0x95,0x88,0x8f,
- 0x90,0x92,0x89,0x8f,0x00,0x00,0x00,0x00,0x2d,0x00,0x09,0x11,
- 0x00,0x00,0x00,0x00,0xbc,0x95,0x8a,0x8f,0x00,0x00,0x00,0x00,
- 0x01,0x00,0x4b,0x25,0x0f,0x00,0x6c,0x31,0xc0,0x68,0x0c,0x00,
- 0xbc,0x95,0x8b,0xaf,0x21,0x10,0xad,0x02,0x00,0x00,0x45,0x8c,
- 0x21,0x38,0x40,0x00,0x1d,0x00,0xa2,0x10,0x21,0x20,0x40,0x00,
- 0x21,0x18,0xa0,0x00,0x14,0x00,0x6f,0x8c,0xbc,0x95,0x8e,0x8f,
- 0x00,0x00,0x00,0x00,0x23,0xc0,0xcf,0x01,0x2b,0x08,0x11,0x03,
- 0x10,0x00,0x20,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0xa2,0x8c,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x82,0xac,0x04,0x00,0x44,0xac,
- 0x10,0x00,0x79,0x8c,0x00,0x00,0x00,0x00,0xc0,0x40,0x19,0x00,
- 0x21,0x30,0x08,0x02,0x04,0x00,0xc2,0x8c,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x45,0xac,0x00,0x00,0xa6,0xac,0x04,0x00,0xa2,0xac,
- 0x02,0x00,0x00,0x10,0x04,0x00,0xc5,0xac,0x21,0x20,0xa0,0x00,
- 0x00,0x00,0x85,0x8c,0x00,0x00,0x00,0x00,0xe6,0xff,0xa7,0x14,
- 0x21,0x18,0xa0,0x00,0xbc,0x95,0x89,0x8f,0x90,0x92,0x8a,0x8f,
- 0x00,0x00,0x00,0x00,0xd5,0xff,0x2a,0x15,0x00,0x00,0x00,0x00,
- 0x88,0x93,0x8b,0x8f,0x21,0x30,0x00,0x02,0x16,0x00,0x0b,0x16,
- 0x00,0x00,0x00,0x00,0x21,0x30,0xc0,0x02,0x00,0x00,0xcc,0x8c,
- 0x00,0x00,0x00,0x00,0x11,0x00,0xcc,0x14,0x00,0x00,0x00,0x00,
- 0x08,0x00,0xcd,0x8c,0x08,0x00,0xc6,0x24,0x0d,0x00,0xcd,0x14,
- 0x00,0x00,0x00,0x00,0x08,0x00,0xce,0x8c,0x08,0x00,0xc6,0x24,
- 0x09,0x00,0xce,0x14,0x00,0x00,0x00,0x00,0xc0,0x94,0x84,0x8f,
- 0x60,0x11,0x00,0x0c,0x00,0x00,0x00,0x00,0x90,0x95,0x8f,0x8f,
- 0x00,0x00,0x00,0x00,0x01,0x00,0xf8,0x25,0xa8,0xff,0x00,0x10,
- 0x90,0x95,0x98,0xaf,0x00,0x00,0xc5,0x8c,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xa2,0x8c,0x00,0x00,0x00,0x00,0x00,0x00,0xc2,0xac,
- 0x04,0x00,0x46,0xac,0x00,0x00,0xa5,0xac,0x04,0x00,0xa5,0xac,
- 0xb8,0x95,0x85,0xaf,0xb8,0x95,0x99,0x8f,0x90,0x92,0x92,0x8f,
- 0x08,0x00,0x28,0x8f,0x0c,0x00,0x24,0x8f,0x09,0xf8,0x00,0x01,
- 0x00,0x00,0x00,0x00,0xc0,0x94,0x84,0x8f,0x60,0x11,0x00,0x0c,
- 0x00,0x00,0x00,0x00,0x90,0x92,0x89,0x8f,0xb8,0x95,0x80,0xaf,
- 0x23,0x90,0x32,0x01,0x32,0x00,0x41,0x2e,0x04,0x00,0x20,0x10,
- 0x31,0x00,0x03,0x24,0x02,0x00,0x00,0x10,0x21,0x18,0x40,0x02,
- 0x31,0x00,0x03,0x24,0x80,0x50,0x03,0x00,0x21,0x10,0xea,0x02,
- 0x00,0x00,0x4b,0x8c,0x00,0x00,0x00,0x00,0x01,0x00,0x6c,0x25,
- 0x86,0xff,0x00,0x10,0x00,0x00,0x4c,0xac,0x14,0x00,0xbf,0x8f,
- 0x58,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0xff,0xbd,0x27,
- 0x30,0x00,0xb6,0xaf,0x28,0x00,0xb4,0xaf,0x2c,0x00,0xb5,0xaf,
- 0x24,0x00,0xb3,0xaf,0x18,0x00,0xb0,0xaf,0x1c,0x00,0xb1,0xaf,
- 0x34,0x00,0xbf,0xaf,0x20,0x00,0xb2,0xaf,0x04,0x00,0x11,0x24,
- 0x00,0xa1,0x10,0x3c,0xc0,0x89,0x93,0x27,0x21,0xa8,0x00,0x00,
- 0xfc,0x89,0x94,0x27,0x0f,0x00,0x16,0x24,0x21,0x90,0x00,0x00,
- 0x88,0x96,0x80,0xaf,0x21,0x18,0x00,0x00,0x21,0x10,0x60,0x02,
- 0x00,0x00,0x4f,0x94,0x02,0x00,0x4e,0x94,0x21,0xc0,0xf0,0x01,
- 0x00,0x00,0x0e,0xa3,0x88,0x96,0x80,0xaf,0x04,0x00,0x48,0x94,
- 0x06,0x00,0x59,0x94,0x21,0x48,0x10,0x01,0x00,0x00,0x39,0xa1,
- 0x88,0x96,0x80,0xaf,0x08,0x00,0x4b,0x94,0x0a,0x00,0x4a,0x94,
- 0x21,0x60,0x70,0x01,0x00,0x00,0x8a,0xa1,0x88,0x96,0x80,0xaf,
- 0x0c,0x00,0x4f,0x94,0x0e,0x00,0x4d,0x94,0x04,0x00,0x42,0x24,
- 0x04,0x00,0x42,0x24,0x21,0x70,0xf0,0x01,0x04,0x00,0x42,0x24,
- 0x04,0x00,0x63,0x24,0x00,0x00,0xcd,0xa1,0x88,0x96,0x80,0xaf,
- 0xe7,0xff,0x71,0x14,0x04,0x00,0x42,0x24,0x00,0x00,0x58,0x94,
- 0x00,0x00,0x00,0x00,0x21,0x40,0x18,0x02,0x00,0x00,0x19,0x91,
- 0x00,0x00,0x00,0x00,0x40,0x00,0x29,0x33,0x08,0x00,0x20,0x11,
- 0x64,0x00,0x41,0x2a,0x04,0x00,0x20,0x14,0x00,0x00,0x00,0x00,
- 0x21,0x20,0x80,0x02,0x20,0x0c,0x00,0x0c,0x47,0x00,0x05,0x24,
- 0xd5,0xff,0x00,0x10,0x01,0x00,0x52,0x26,0x05,0x00,0xb5,0x26,
- 0xd1,0xff,0xb6,0x16,0x14,0x00,0x73,0x26,0x34,0x00,0xbf,0x8f,
- 0x18,0x00,0xb0,0x8f,0x1c,0x00,0xb1,0x8f,0x20,0x00,0xb2,0x8f,
- 0x24,0x00,0xb3,0x8f,0x28,0x00,0xb4,0x8f,0x2c,0x00,0xb5,0x8f,
- 0x30,0x00,0xb6,0x8f,0x08,0x00,0xe0,0x03,0x38,0x00,0xbd,0x27,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xd0,0xff,0xbd,0x27,0x14,0x00,0xbf,0xaf,0x00,0xa1,0x0e,0x3c,
- 0x00,0x40,0xc0,0xa5,0x9c,0x96,0x98,0x8f,0xa0,0x96,0x8f,0x8f,
- 0x40,0xc9,0x18,0x00,0x23,0xc8,0x38,0x03,0x80,0xc8,0x19,0x00,
- 0x21,0xc8,0x38,0x03,0x70,0x00,0x04,0x3c,0xc0,0xc8,0x19,0x00,
- 0x00,0x80,0x84,0x34,0x21,0x30,0xf9,0x01,0x2b,0x08,0xc4,0x00,
- 0x0a,0x00,0x20,0x14,0x00,0xa0,0x02,0x3c,0x8f,0xff,0x03,0x3c,
- 0x90,0x92,0x82,0x8f,0x00,0x80,0x63,0x34,0x21,0x30,0xc3,0x00,
- 0x2b,0x08,0xc4,0x00,0xfd,0xff,0x20,0x10,0x01,0x00,0x42,0x24,
- 0x90,0x92,0x82,0xaf,0x00,0xa0,0x02,0x3c,0x14,0x00,0x42,0x34,
- 0xa0,0x96,0x86,0xaf,0x00,0xa1,0x03,0x3c,0x80,0x00,0x05,0x24,
- 0x0c,0x00,0x65,0xa0,0x88,0x96,0x80,0xaf,0x08,0x00,0x67,0x90,
- 0x08,0x00,0x6b,0x90,0x88,0x96,0x80,0xaf,0x0c,0x00,0x65,0xa0,
- 0x88,0x96,0x80,0xaf,0x08,0x00,0x66,0x90,0x08,0x00,0x6d,0x90,
- 0x00,0x62,0x0b,0x00,0x00,0x72,0x0d,0x00,0x25,0x38,0xec,0x00,
- 0x25,0x30,0xce,0x00,0x23,0x30,0xe6,0x00,0xff,0xff,0xc6,0x30,
- 0x80,0x00,0xc1,0x2c,0x07,0x00,0x20,0x14,0x42,0xc8,0x06,0x00,
- 0x00,0x00,0x58,0x8c,0x00,0x00,0x00,0x00,0x01,0x00,0x0f,0x27,
- 0xea,0xff,0x00,0x10,0x00,0x00,0x4f,0xac,0x42,0xc8,0x06,0x00,
- 0x21,0x38,0xf9,0x00,0x30,0x0d,0x00,0x0c,0x24,0x00,0xa7,0xaf,
- 0x00,0xa0,0x04,0x3c,0x24,0x00,0xa7,0x8f,0x18,0x00,0x84,0x34,
- 0x00,0xa1,0x03,0x3c,0x80,0x00,0x05,0x24,0x0c,0x00,0x65,0xa0,
- 0x88,0x96,0x80,0xaf,0x08,0x00,0x62,0x90,0x08,0x00,0x6b,0x90,
- 0x88,0x96,0x80,0xaf,0x0c,0x00,0x65,0xa0,0x88,0x96,0x80,0xaf,
- 0x08,0x00,0x66,0x90,0x08,0x00,0x6d,0x90,0x00,0x62,0x0b,0x00,
- 0x00,0x72,0x0d,0x00,0x25,0x10,0x4c,0x00,0x25,0x30,0xce,0x00,
- 0x23,0x30,0x46,0x00,0xff,0xff,0xc6,0x30,0x80,0x00,0xc1,0x2c,
- 0x07,0x00,0x20,0x14,0x42,0xc8,0x06,0x00,0x00,0x00,0x98,0x8c,
- 0x00,0x00,0x00,0x00,0x01,0x00,0x0f,0x27,0xea,0xff,0x00,0x10,
- 0x00,0x00,0x8f,0xac,0x42,0xc8,0x06,0x00,0x21,0x10,0x59,0x00,
- 0x8c,0x96,0x88,0x8f,0x23,0x50,0xe2,0x00,0x90,0x96,0x89,0x8f,
- 0xff,0xff,0x4a,0x31,0x10,0x8a,0x8c,0x8f,0x21,0x58,0x0a,0x01,
- 0x23,0x40,0x69,0x01,0x19,0x00,0x88,0x01,0x14,0x8a,0x8d,0x8f,
- 0x1c,0x8a,0x85,0x8f,0x18,0x8a,0x8f,0x8f,0x00,0x29,0x05,0x00,
- 0x01,0x00,0xa5,0x24,0x8c,0x96,0x88,0xaf,0x12,0x48,0x00,0x00,
- 0x82,0x49,0x09,0x00,0x90,0x96,0x89,0xaf,0x19,0x00,0xa9,0x01,
- 0x12,0x70,0x00,0x00,0x02,0xc1,0x0e,0x00,0x21,0x20,0x0f,0x03,
- 0x2b,0x08,0x85,0x00,0x21,0x30,0x80,0x00,0x02,0x00,0x20,0x10,
- 0x94,0x96,0x84,0xaf,0x21,0x30,0xa0,0x00,0x9c,0x96,0x99,0x8f,
- 0x00,0x00,0x00,0x00,0x05,0x00,0x26,0x13,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x66,0xa0,0x9c,0x96,0x86,0xaf,0x02,0x5a,0x06,0x00,
- 0x00,0x00,0x6b,0xa0,0x20,0x8a,0x8c,0x8f,0x00,0x00,0x00,0x00,
- 0x4b,0x00,0x80,0x11,0x00,0xa3,0x18,0x3c,0x98,0x96,0x84,0x8f,
- 0x00,0x00,0x00,0x00,0x30,0x00,0x80,0x10,0x80,0x10,0x0a,0x00,
- 0x38,0x98,0x83,0x8f,0x23,0x10,0x87,0x00,0x01,0x00,0x63,0x24,
- 0xff,0xff,0x42,0x30,0xe8,0x03,0x61,0x28,0x21,0x30,0x40,0x00,
- 0x11,0x00,0x20,0x14,0x38,0x98,0x83,0xaf,0x24,0x8a,0x8d,0x8f,
- 0x00,0x00,0x00,0x00,0x2b,0x08,0xa2,0x01,0x0d,0x00,0x20,0x10,
- 0x21,0x08,0xc0,0x00,0x28,0x8a,0x84,0x27,0x40,0x01,0x05,0x24,
- 0x28,0x00,0xa6,0xaf,0x24,0x00,0xa7,0xaf,0x20,0x0c,0x00,0x0c,
- 0x18,0x00,0xaa,0xaf,0x21,0x18,0x00,0x00,0x28,0x00,0xa6,0x8f,
- 0x24,0x00,0xa7,0x8f,0x18,0x00,0xaa,0x8f,0x38,0x98,0x83,0xaf,
- 0x21,0x08,0xc0,0x00,0x80,0x30,0x01,0x00,0x23,0x30,0xc1,0x00,
- 0x80,0x30,0x06,0x00,0x23,0x30,0xc1,0x00,0xc0,0x30,0x06,0x00,
- 0x21,0x30,0xc1,0x00,0xc0,0x30,0x06,0x00,0x23,0x30,0xc1,0x00,
- 0xc0,0x30,0x06,0x00,0x02,0x35,0x06,0x00,0x64,0x00,0xc1,0x2c,
- 0x03,0x00,0x20,0x14,0x80,0x70,0x06,0x00,0x63,0x00,0x06,0x24,
- 0x80,0x70,0x06,0x00,0xa8,0x96,0x98,0x27,0x21,0x10,0xd8,0x01,
- 0x00,0x00,0x4f,0x8c,0x00,0x00,0x00,0x00,0x01,0x00,0xf9,0x25,
- 0x00,0x00,0x59,0xac,0x80,0x10,0x0a,0x00,0x23,0x10,0x4a,0x00,
- 0x80,0x10,0x02,0x00,0x23,0x10,0x4a,0x00,0xc0,0x10,0x02,0x00,
- 0x21,0x10,0x4a,0x00,0xc0,0x10,0x02,0x00,0x23,0x10,0x4a,0x00,
- 0xc0,0x10,0x02,0x00,0x02,0x15,0x02,0x00,0x21,0x20,0xe0,0x00,
- 0x64,0x00,0x41,0x2c,0x21,0x30,0x40,0x00,0x02,0x00,0x20,0x14,
- 0x98,0x96,0x84,0xaf,0x63,0x00,0x06,0x24,0x80,0x58,0x06,0x00,
- 0x40,0x98,0x8c,0x27,0x21,0x10,0x6c,0x01,0x00,0x00,0x4d,0x8c,
- 0x00,0x00,0x00,0x00,0x01,0x00,0xae,0x25,0x00,0x00,0x4e,0xac,
- 0x00,0xa3,0x18,0x3c,0x10,0x0c,0x02,0x97,0x00,0x00,0x00,0x00,
- 0x0c,0x00,0x40,0x10,0x01,0x00,0x01,0x24,0x05,0x00,0x41,0x14,
- 0x00,0x00,0x00,0x00,0x86,0x0c,0x00,0x0c,0x00,0x00,0x00,0x00,
- 0x07,0x00,0x00,0x10,0x14,0x00,0xbf,0x8f,0x38,0x8a,0x84,0x27,
- 0x20,0x0c,0x00,0x0c,0xbf,0x01,0x05,0x24,0x00,0xa3,0x0f,0x3c,
- 0x10,0x0c,0xe0,0xa5,0x14,0x00,0xbf,0x8f,0x30,0x00,0xbd,0x27,
- 0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x40,0x00,0x82,0x8c,0x00,0x00,0x00,0x00,
- 0x1e,0x00,0x41,0x28,0x04,0x00,0x20,0x10,0x3c,0x00,0x41,0x28,
- 0x0e,0x00,0x00,0x10,0x21,0x18,0x00,0x00,0x3c,0x00,0x41,0x28,
- 0x06,0x00,0x20,0x10,0x00,0x00,0x00,0x00,0x48,0x00,0x82,0x90,
- 0x00,0x00,0x00,0x00,0x01,0x00,0x42,0x30,0x05,0x00,0x00,0x10,
- 0x01,0x00,0x42,0x24,0x48,0x00,0x82,0x90,0x00,0x00,0x00,0x00,
- 0x03,0x00,0x42,0x30,0x03,0x00,0x42,0x24,0x21,0x18,0x40,0x00,
- 0x08,0x00,0xe0,0x03,0x21,0x10,0x60,0x00,0xd8,0xff,0xbd,0x27,
- 0x1c,0x00,0xbf,0xaf,0x21,0x28,0x80,0x00,0x24,0x00,0xae,0x8c,
- 0x80,0x92,0x84,0x8f,0x28,0x00,0xa5,0xaf,0x58,0x11,0x00,0x0c,
- 0x24,0x00,0xae,0xaf,0x28,0x00,0xa5,0x8f,0x21,0x30,0x40,0x00,
- 0x50,0x00,0xa3,0x94,0x00,0x00,0x00,0x00,0x01,0x00,0x6f,0x30,
- 0x22,0x00,0xe0,0x15,0x00,0x00,0x00,0x00,0x28,0x00,0xb9,0x94,
- 0x01,0x00,0x78,0x34,0x00,0x10,0x28,0x33,0x07,0x00,0x00,0x11,
- 0x50,0x00,0xb8,0xa4,0x50,0x00,0xa9,0x94,0x00,0x80,0x0b,0x3c,
- 0xa4,0x35,0x6b,0x25,0x00,0x02,0x2a,0x39,0x50,0x00,0xaa,0xa4,
- 0x04,0x00,0xab,0xac,0x5f,0x00,0xad,0x90,0x68,0x00,0xac,0x90,
- 0x03,0x00,0xae,0x31,0x24,0x00,0xb8,0x8f,0x27,0x78,0xc0,0x01,
- 0x00,0x20,0x01,0x3c,0x24,0x18,0x8f,0x01,0x25,0x10,0xa1,0x00,
- 0x10,0x00,0x03,0xa3,0x54,0x00,0x59,0x90,0x54,0x00,0x48,0x90,
- 0x26,0x20,0x23,0x03,0x03,0x00,0x84,0x30,0xff,0x00,0x89,0x30,
- 0x26,0x50,0x09,0x01,0x54,0x00,0x4a,0xa0,0x58,0x00,0x4b,0x90,
- 0x56,0x00,0x4d,0x90,0x00,0x00,0x00,0x00,0x24,0x70,0x8d,0x00,
- 0x25,0x60,0x6e,0x01,0x58,0x00,0x4c,0xa0,0x60,0x11,0x00,0x0c,
- 0x21,0x20,0xc0,0x00,0x1c,0x00,0xbf,0x8f,0x28,0x00,0xbd,0x27,
- 0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0xd8,0xff,0xbd,0x27,
- 0x1c,0x00,0xbf,0xaf,0x21,0x28,0x80,0x00,0x24,0x00,0xae,0x8c,
- 0x80,0x92,0x84,0x8f,0x28,0x00,0xa5,0xaf,0x58,0x11,0x00,0x0c,
- 0x24,0x00,0xae,0xaf,0x28,0x00,0xa5,0x8f,0x21,0x30,0x40,0x00,
- 0x50,0x00,0xa3,0x94,0x00,0x00,0x00,0x00,0x01,0x00,0x6f,0x30,
- 0x21,0x00,0xe0,0x11,0x00,0x00,0x00,0x00,0x28,0x00,0xb9,0x94,
- 0xfe,0xff,0x78,0x30,0x00,0x10,0x28,0x33,0x07,0x00,0x00,0x11,
- 0x50,0x00,0xb8,0xa4,0x50,0x00,0xa9,0x94,0x00,0x80,0x0b,0x3c,
- 0xa4,0x35,0x6b,0x25,0x00,0x02,0x2a,0x39,0x50,0x00,0xaa,0xa4,
- 0x04,0x00,0xab,0xac,0x5f,0x00,0xad,0x90,0x68,0x00,0xac,0x90,
- 0x24,0x00,0xaf,0x8f,0x03,0x00,0xae,0x31,0x00,0x20,0x01,0x3c,
- 0x25,0x18,0x8e,0x01,0x25,0x10,0xa1,0x00,0x10,0x00,0xe3,0xa1,
- 0x54,0x00,0x58,0x90,0x54,0x00,0x59,0x90,0x26,0x20,0x03,0x03,
- 0x03,0x00,0x84,0x30,0xff,0x00,0x88,0x30,0x26,0x48,0x28,0x03,
- 0x54,0x00,0x49,0xa0,0x58,0x00,0x4a,0x90,0x56,0x00,0x4b,0x90,
- 0x00,0x00,0x00,0x00,0x24,0x68,0x8b,0x00,0x25,0x60,0x4d,0x01,
- 0x58,0x00,0x4c,0xa0,0x60,0x11,0x00,0x0c,0x21,0x20,0xc0,0x00,
- 0x1c,0x00,0xbf,0x8f,0x28,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,
- 0x00,0x00,0x00,0x00,0xd8,0xff,0xbd,0x27,0x18,0x00,0xb0,0xaf,
- 0x21,0x80,0x80,0x00,0x1c,0x00,0xbf,0xaf,0x24,0x00,0x06,0x8e,
- 0x21,0x38,0xa0,0x00,0x80,0x92,0x84,0x8f,0x2c,0x00,0xa7,0xaf,
- 0x58,0x11,0x00,0x0c,0x24,0x00,0xa6,0xaf,0x2c,0x00,0xa7,0x8f,
- 0x28,0x00,0x0f,0x96,0x30,0x00,0xe9,0x30,0x02,0x49,0x09,0x00,
- 0x05,0x00,0x29,0x25,0x01,0x00,0x0e,0x24,0x04,0x18,0x2e,0x01,
- 0x24,0x00,0xa6,0x8f,0xff,0xff,0x63,0x24,0x20,0x00,0xf8,0x31,
- 0x21,0x50,0x40,0x00,0x02,0x00,0x08,0x24,0x21,0x20,0x60,0x00,
- 0x02,0x00,0x00,0x13,0x62,0x00,0x03,0xa2,0x7f,0x00,0x64,0x30,
- 0x6a,0x00,0x19,0x96,0x00,0x01,0xed,0x30,0x00,0xff,0x2b,0x33,
- 0x25,0x60,0x64,0x01,0x6a,0x00,0x0c,0xa6,0x06,0x00,0xa0,0x11,
- 0xfb,0xff,0x25,0x25,0x00,0x02,0xee,0x30,0x02,0x00,0xc0,0x15,
- 0x08,0x00,0xa5,0x34,0x10,0x00,0xa5,0x34,0x03,0x00,0x08,0x24,
- 0x40,0x00,0xef,0x30,0x04,0x00,0xe0,0x11,0x00,0x04,0xf8,0x30,
- 0x04,0x00,0xa5,0x34,0x01,0x00,0x08,0x25,0x00,0x04,0xf8,0x30,
- 0x0f,0x00,0x00,0x13,0x00,0x00,0x00,0x00,0x65,0x00,0x19,0x92,
- 0x00,0x00,0x00,0x00,0x80,0x58,0x19,0x00,0x23,0x58,0x79,0x01,
- 0x80,0x58,0x0b,0x00,0x23,0x58,0x79,0x01,0x80,0x58,0x0b,0x00,
- 0x21,0x08,0x7c,0x01,0x38,0x94,0x2c,0x8c,0x03,0x00,0x01,0x24,
- 0x03,0x00,0x81,0x11,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x10,
- 0x70,0x8a,0x83,0x27,0x50,0x8a,0x83,0x27,0x0f,0x00,0xed,0x30,
- 0x0c,0x00,0xd8,0x90,0x40,0x70,0x0d,0x00,0x21,0x78,0x6e,0x00,
- 0x00,0x00,0xe2,0x95,0x80,0x00,0x19,0x37,0x21,0xc0,0x28,0x01,
- 0x19,0x00,0x58,0x00,0x0c,0x00,0xd9,0xa0,0x7f,0x00,0x0b,0x24,
- 0x04,0x00,0xcb,0xa0,0x00,0x00,0xc2,0xa0,0x03,0x62,0x02,0x00,
- 0x04,0x00,0xcc,0xa0,0x0c,0x00,0xcd,0x90,0x21,0x20,0x40,0x01,
- 0x40,0x00,0xae,0x31,0x21,0x78,0xc5,0x01,0x0c,0x00,0xcf,0xa0,
- 0x12,0xc8,0x00,0x00,0x40,0x00,0x19,0xae,0x60,0x11,0x00,0x0c,
- 0x2c,0x00,0x07,0xa6,0x20,0x1a,0x00,0x0c,0x21,0x20,0x00,0x02,
- 0x21,0x20,0x00,0x02,0x16,0x17,0x00,0x0c,0x21,0x28,0x40,0x00,
- 0x1c,0x00,0xbf,0x8f,0x18,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03,
- 0x28,0x00,0xbd,0x27,0xe8,0xff,0xbd,0x27,0x21,0x30,0x80,0x00,
- 0x14,0x00,0xbf,0xaf,0x80,0x92,0x84,0x8f,0x18,0x00,0xa6,0xaf,
- 0x58,0x11,0x00,0x0c,0x1c,0x00,0xa5,0xaf,0x18,0x00,0xa6,0x8f,
- 0x1c,0x00,0xa5,0x8f,0x28,0x00,0xce,0x94,0x21,0x20,0x40,0x00,
- 0x26,0x78,0xae,0x00,0x00,0x10,0xf8,0x31,0x0b,0x00,0x00,0x13,
- 0x00,0x00,0x00,0x00,0x50,0x00,0xc3,0x94,0x00,0x00,0x00,0x00,
- 0x01,0x00,0x79,0x30,0x06,0x00,0x20,0x13,0x00,0x00,0x00,0x00,
- 0x00,0x80,0x09,0x3c,0x00,0x02,0x68,0x34,0xa4,0x35,0x29,0x25,
- 0x50,0x00,0xc8,0xa4,0x04,0x00,0xc9,0xac,0x62,0x00,0xc2,0x90,
- 0x50,0x00,0xc3,0x94,0x20,0x00,0xaa,0x30,0x03,0x00,0x40,0x11,
- 0x10,0x00,0xab,0x30,0x7f,0x00,0x42,0x30,0x10,0x00,0xab,0x30,
- 0x02,0x00,0x60,0x11,0x00,0x1a,0x42,0x34,0x00,0x04,0x42,0x34,
- 0xff,0xff,0x01,0x3c,0x6a,0x00,0xc2,0xa4,0xfb,0x3f,0x21,0x34,
- 0x00,0x04,0xac,0x30,0x0d,0x00,0x80,0x11,0x24,0x10,0x61,0x00,
- 0x00,0x20,0xad,0x30,0x02,0x00,0xa0,0x11,0x00,0x80,0x42,0x34,
- 0x00,0x40,0x42,0x34,0x00,0x08,0xae,0x30,0x04,0x00,0xc0,0x11,
- 0xff,0xef,0x01,0x24,0x06,0x00,0x00,0x10,0x04,0x00,0x42,0x34,
- 0xff,0xef,0x01,0x24,0x03,0x00,0x00,0x10,0x24,0x10,0x41,0x00,
- 0xff,0xe7,0x01,0x24,0x24,0x10,0x41,0x00,0x50,0x00,0xc2,0xa4,
- 0x60,0x11,0x00,0x0c,0x28,0x00,0xc5,0xa4,0x14,0x00,0xbf,0x8f,
- 0x18,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,
- 0xe8,0xff,0xbd,0x27,0x21,0x18,0x80,0x00,0x14,0x00,0xbf,0xaf,
- 0x80,0x92,0x84,0x8f,0x18,0x00,0xa3,0xaf,0x58,0x11,0x00,0x0c,
- 0x1c,0x00,0xa5,0xaf,0x1c,0x00,0xa5,0x8f,0x7f,0xff,0x01,0x24,
- 0x18,0x00,0xa3,0x8f,0x24,0x70,0xa1,0x00,0x0b,0x00,0xc0,0x11,
- 0x21,0x20,0x40,0x00,0x50,0x00,0x62,0x94,0x00,0x00,0x00,0x00,
- 0x80,0x00,0x4f,0x30,0x04,0x00,0xe0,0x15,0x80,0x00,0x58,0x34,
- 0x50,0x00,0x62,0x94,0x63,0x00,0x60,0xa0,0x80,0x00,0x58,0x34,
- 0x05,0x00,0x00,0x10,0x50,0x00,0x78,0xa4,0x50,0x00,0x79,0x94,
- 0x00,0x00,0x00,0x00,0x7f,0xff,0x28,0x33,0x50,0x00,0x68,0xa4,
- 0x00,0x80,0x09,0x3c,0xa4,0x35,0x29,0x25,0x80,0x00,0xaa,0x30,
- 0x04,0x00,0x40,0x11,0x04,0x00,0x69,0xac,0x7f,0x00,0x0b,0x24,
- 0x02,0x00,0x00,0x10,0x60,0x00,0x6b,0xa0,0x60,0x00,0x60,0xa0,
- 0x60,0x11,0x00,0x0c,0x2a,0x00,0x65,0xa4,0x14,0x00,0xbf,0x8f,
- 0x18,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,
- 0xe8,0xff,0xbd,0x27,0x21,0x18,0x80,0x00,0x14,0x00,0xbf,0xaf,
- 0x80,0x92,0x84,0x8f,0x18,0x00,0xa3,0xaf,0x58,0x11,0x00,0x0c,
- 0x1c,0x00,0xa5,0xaf,0x18,0x00,0xa3,0x8f,0x1c,0x00,0xa5,0x8f,
- 0x6c,0x00,0x6e,0x8c,0xff,0xff,0x06,0x24,0x09,0x00,0xce,0x14,
- 0x21,0x20,0x40,0x00,0xff,0xff,0x01,0x34,0x06,0x00,0xa1,0x10,
- 0x00,0x00,0x00,0x00,0x50,0x00,0x6f,0x94,0x6c,0x00,0x60,0xac,
- 0xff,0xfe,0xf8,0x31,0x13,0x00,0x00,0x10,0x50,0x00,0x78,0xa4,
- 0x50,0x00,0x68,0x94,0x00,0x80,0x0a,0x3c,0x01,0x00,0x19,0x24,
- 0xa4,0x35,0x4a,0x25,0xff,0xff,0x01,0x34,0x00,0x01,0x09,0x35,
- 0x4b,0x00,0x79,0xa0,0x50,0x00,0x69,0xa4,0x03,0x00,0xa1,0x14,
- 0x04,0x00,0x6a,0xac,0x07,0x00,0x00,0x10,0x6c,0x00,0x66,0xac,
- 0xc0,0x60,0x05,0x00,0x6c,0x00,0x6b,0x8c,0x21,0x60,0x85,0x01,
- 0x40,0x62,0x0c,0x00,0x21,0x10,0x6c,0x01,0x6c,0x00,0x62,0xac,
- 0x60,0x11,0x00,0x0c,0x00,0x00,0x00,0x00,0x14,0x00,0xbf,0x8f,
- 0x18,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,
- 0xe0,0xff,0xbd,0x27,0x14,0x00,0xbf,0xaf,0x21,0x30,0x80,0x00,
- 0x24,0x00,0xc7,0x8c,0x10,0x00,0xae,0x30,0x03,0x00,0xc0,0x11,
- 0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x10,0x1f,0x00,0xa5,0x30,
- 0x03,0x00,0xa5,0x30,0x08,0x00,0xa5,0x34,0x80,0x92,0x84,0x8f,
- 0x24,0x00,0xa5,0xaf,0x20,0x00,0xa6,0xaf,0x58,0x11,0x00,0x0c,
- 0x1c,0x00,0xa7,0xaf,0x20,0x00,0xa6,0x8f,0x24,0x00,0xa5,0x8f,
- 0x50,0x00,0xcf,0x94,0x1c,0x00,0xa7,0x8f,0x01,0x00,0xf8,0x31,
- 0x21,0x20,0x40,0x00,0x07,0x00,0x00,0x13,0x68,0x00,0xc5,0xa0,
- 0x5f,0x00,0xd9,0x90,0x00,0x00,0x00,0x00,0x03,0x00,0x28,0x33,
- 0x27,0x48,0x00,0x01,0x05,0x00,0x00,0x10,0x24,0x28,0xa9,0x00,
- 0x5f,0x00,0xca,0x90,0x00,0x00,0x00,0x00,0x03,0x00,0x4b,0x31,
- 0x25,0x28,0xab,0x00,0x00,0x20,0x01,0x3c,0x10,0x00,0xe5,0xa0,
- 0x25,0x10,0xc1,0x00,0x54,0x00,0x4c,0x90,0x54,0x00,0x4d,0x90,
- 0x26,0x18,0x85,0x01,0x03,0x00,0x63,0x30,0xff,0x00,0x6e,0x30,
- 0x26,0x78,0xae,0x01,0x54,0x00,0x4f,0xa0,0x58,0x00,0x58,0x90,
- 0x56,0x00,0x59,0x90,0x00,0x00,0x00,0x00,0x24,0x40,0x79,0x00,
- 0x25,0x48,0x08,0x03,0x60,0x11,0x00,0x0c,0x58,0x00,0x49,0xa0,
- 0x14,0x00,0xbf,0x8f,0x20,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,
- 0x00,0x00,0x00,0x00,0xd8,0xff,0xbd,0x27,0x1c,0x00,0xbf,0xaf,
- 0x21,0x30,0x80,0x00,0x24,0x00,0xce,0x8c,0xf3,0x00,0xa5,0x30,
- 0x80,0x92,0x84,0x8f,0x2c,0x00,0xa5,0xaf,0x28,0x00,0xa6,0xaf,
- 0x58,0x11,0x00,0x0c,0x24,0x00,0xae,0xaf,0x28,0x00,0xa6,0x8f,
- 0x2c,0x00,0xa5,0x8f,0x4a,0x00,0xd8,0x90,0xf0,0x00,0xaf,0x30,
- 0x49,0x00,0xcf,0xa0,0x49,0x00,0xc8,0x90,0x50,0x00,0xca,0x94,
- 0x0f,0xff,0x01,0x24,0x24,0xc8,0x01,0x03,0x5f,0x00,0xc5,0xa0,
- 0x25,0x48,0x28,0x03,0x01,0x00,0x4b,0x31,0x21,0x20,0x40,0x00,
- 0x4a,0x00,0xc9,0xa0,0x05,0x00,0x60,0x11,0x03,0x00,0xa5,0x30,
- 0x68,0x00,0xcd,0x90,0x27,0x60,0xa0,0x00,0x04,0x00,0x00,0x10,
- 0x24,0x28,0x8d,0x01,0x68,0x00,0xce,0x90,0x00,0x00,0x00,0x00,
- 0x25,0x28,0xae,0x00,0x24,0x00,0xaf,0x8f,0x00,0x20,0x01,0x3c,
- 0x25,0x10,0xc1,0x00,0x10,0x00,0xe5,0xa1,0x54,0x00,0x58,0x90,
- 0x54,0x00,0x59,0x90,0x26,0x18,0x05,0x03,0x03,0x00,0x63,0x30,
- 0xff,0x00,0x68,0x30,0x26,0x48,0x28,0x03,0x54,0x00,0x49,0xa0,
- 0x58,0x00,0x4a,0x90,0x56,0x00,0x4b,0x90,0x00,0x00,0x00,0x00,
- 0x24,0x60,0x6b,0x00,0x25,0x68,0x4c,0x01,0x60,0x11,0x00,0x0c,
- 0x58,0x00,0x4d,0xa0,0x1c,0x00,0xbf,0x8f,0x28,0x00,0xbd,0x27,
- 0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0xd8,0xff,0xbd,0x27,
- 0x18,0x00,0xb0,0xaf,0x21,0x80,0x80,0x00,0x1c,0x00,0xbf,0xaf,
- 0x24,0x00,0x05,0x8e,0x80,0x92,0x84,0x8f,0x58,0x11,0x00,0x0c,
- 0x20,0x00,0xa5,0xaf,0x20,0x00,0xa5,0x8f,0x00,0x20,0x01,0x3c,
- 0x25,0x18,0x01,0x02,0x0a,0x00,0x60,0xa4,0x0c,0x00,0x60,0xa4,
- 0x12,0x00,0x60,0xa4,0x14,0x00,0x60,0xa4,0xff,0xff,0x0e,0x34,
- 0x3f,0x00,0x0f,0x24,0x78,0x00,0x18,0x24,0x01,0x00,0x06,0x24,
- 0x18,0x00,0x00,0xa6,0x1a,0x00,0x00,0xa6,0x1c,0x00,0x0e,0xa6,
- 0x28,0x00,0x00,0xa6,0x2a,0x00,0x00,0xa6,0x2c,0x00,0x0f,0xa6,
- 0x40,0x00,0x18,0xae,0x44,0x00,0x00,0xae,0x4b,0x00,0x00,0xa2,
- 0x4c,0x00,0x66,0xa0,0x4d,0x00,0x66,0xa0,0x4e,0x00,0x66,0xa0,
- 0xff,0x00,0x07,0x24,0x4f,0x00,0x60,0xa0,0x56,0x00,0x67,0xa0,
- 0x10,0x00,0x19,0x24,0x50,0x00,0x19,0xa6,0x49,0x00,0x00,0xa2,
- 0x4a,0x00,0x00,0xa2,0x54,0x00,0x60,0xa0,0x57,0x00,0x60,0xa0,
- 0x58,0x00,0x60,0xa0,0x59,0x00,0x60,0xa0,0x5a,0x00,0x60,0xa0,
- 0x5b,0x00,0x60,0xa0,0x00,0x80,0x0b,0x3c,0x00,0x80,0x0c,0x3c,
- 0x00,0x80,0x0d,0x3c,0x11,0x00,0x08,0x24,0x13,0x00,0x09,0x24,
- 0xff,0x0a,0x0a,0x24,0xa4,0x35,0x6b,0x25,0x90,0x3d,0x8c,0x25,
- 0x0c,0x3a,0xad,0x25,0x5c,0x00,0x08,0xa2,0x5d,0x00,0x09,0xa2,
- 0x5e,0x00,0x00,0xa2,0x5f,0x00,0x00,0xa2,0x60,0x00,0x00,0xa2,
- 0x61,0x00,0x00,0xa2,0x62,0x00,0x07,0xa2,0x63,0x00,0x00,0xa2,
- 0x64,0x00,0x00,0xa2,0x66,0x00,0x00,0xa2,0x67,0x00,0x00,0xa2,
- 0x68,0x00,0x00,0xa2,0x69,0x00,0x00,0xa2,0x6a,0x00,0x0a,0xa6,
- 0x6c,0x00,0x00,0xae,0x04,0x00,0x0b,0xae,0x74,0x00,0x0c,0xae,
- 0x34,0x00,0x0d,0xae,0x80,0x00,0x0e,0x24,0x0c,0x00,0x0f,0x24,
- 0x0c,0x00,0xae,0xa0,0x00,0x00,0xaf,0xa0,0x03,0x00,0x18,0x24,
- 0x04,0x00,0xa0,0xa0,0x0c,0x00,0xb8,0xa0,0x0f,0x00,0x19,0x24,
- 0x08,0x00,0xa6,0xa0,0x08,0x00,0xb9,0xa0,0x08,0x00,0x08,0x24,
- 0x04,0x00,0xa6,0xa0,0x10,0x00,0xa8,0xa0,0x08,0x00,0xa0,0x90,
- 0x00,0x00,0xa0,0x90,0x14,0x00,0xa0,0x90,0x18,0x00,0xa0,0x90,
- 0x60,0x11,0x00,0x0c,0x21,0x20,0x40,0x00,0x20,0x1a,0x00,0x0c,
- 0x21,0x20,0x00,0x02,0x21,0x20,0x00,0x02,0x16,0x17,0x00,0x0c,
- 0x21,0x28,0x40,0x00,0x1c,0x00,0xbf,0x8f,0x18,0x00,0xb0,0x8f,
- 0x08,0x00,0xe0,0x03,0x28,0x00,0xbd,0x27,0x10,0x94,0x8e,0x27,
- 0x23,0x78,0xae,0x00,0x2c,0x00,0x01,0x24,0x1a,0x00,0xe1,0x01,
- 0xe8,0xff,0xbd,0x27,0x14,0x00,0xbf,0xaf,0x48,0x00,0x86,0xa0,
- 0x40,0x41,0x06,0x00,0x12,0xc0,0x00,0x00,0x65,0x00,0x98,0xa0,
- 0x04,0x00,0xb9,0x8c,0x00,0x00,0x00,0x00,0x21,0x48,0x28,0x03,
- 0x00,0x01,0x2a,0x25,0x24,0x00,0x8a,0xac,0x01,0x1c,0x00,0x0c,
- 0x18,0x00,0xa4,0xaf,0xbc,0x92,0x8b,0x8f,0x18,0x00,0xa4,0x8f,
- 0x03,0x00,0x60,0x15,0x00,0x00,0x00,0x00,0x09,0x00,0x00,0x10,
- 0x30,0x00,0x84,0xac,0xbc,0x92,0x8c,0x8f,0x00,0x00,0x00,0x00,
- 0x30,0x00,0x8d,0x8d,0x00,0x00,0x00,0x00,0x30,0x00,0x8d,0xac,
- 0xbc,0x92,0x8e,0x8f,0x00,0x00,0x00,0x00,0x30,0x00,0xc4,0xad,
- 0x14,0x00,0xbf,0x8f,0xbc,0x92,0x84,0xaf,0x08,0x00,0xe0,0x03,
- 0x18,0x00,0xbd,0x27,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,
- 0x00,0x00,0x00,0x00,0xe8,0xff,0xbd,0x27,0x21,0x28,0x80,0x00,
- 0x14,0x00,0xbf,0xaf,0x80,0x92,0x84,0x8f,0x58,0x11,0x00,0x0c,
- 0x18,0x00,0xa5,0xaf,0x18,0x00,0xa5,0x8f,0x21,0x38,0x40,0x00,
- 0x50,0x00,0xa6,0x94,0x00,0x00,0x00,0x00,0x01,0x00,0xce,0x30,
- 0x17,0x00,0xc0,0x15,0x00,0x00,0x00,0x00,0x5f,0x00,0xb9,0x90,
- 0x01,0x00,0xcf,0x34,0x00,0x20,0x01,0x3c,0x68,0x00,0xb8,0x90,
- 0x50,0x00,0xaf,0xa4,0x25,0x10,0xa1,0x00,0x03,0x00,0x28,0x33,
- 0x54,0x00,0x4a,0x90,0x27,0x48,0x00,0x01,0x24,0x20,0x09,0x03,
- 0x26,0x18,0x44,0x01,0x54,0x00,0x4b,0x90,0x03,0x00,0x63,0x30,
- 0xff,0x00,0x6c,0x30,0x26,0x68,0x6c,0x01,0x54,0x00,0x4d,0xa0,
- 0x58,0x00,0x4e,0x90,0x56,0x00,0x4f,0x90,0x00,0x00,0x00,0x00,
- 0x24,0xc8,0x6f,0x00,0x25,0x40,0xd9,0x01,0x58,0x00,0x48,0xa0,
- 0x60,0x11,0x00,0x0c,0x21,0x20,0xe0,0x00,0x14,0x00,0xbf,0x8f,
- 0x18,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,
- 0xe8,0xff,0xbd,0x27,0x21,0x28,0x80,0x00,0x14,0x00,0xbf,0xaf,
- 0x80,0x92,0x84,0x8f,0x58,0x11,0x00,0x0c,0x18,0x00,0xa5,0xaf,
- 0x18,0x00,0xa5,0x8f,0x21,0x38,0x40,0x00,0x50,0x00,0xa6,0x94,
- 0x00,0x00,0x00,0x00,0x01,0x00,0xce,0x30,0x16,0x00,0xc0,0x11,
- 0x00,0x00,0x00,0x00,0x5f,0x00,0xb9,0x90,0xfe,0xff,0xcf,0x30,
- 0x00,0x20,0x01,0x3c,0x68,0x00,0xb8,0x90,0x50,0x00,0xaf,0xa4,
- 0x25,0x10,0xa1,0x00,0x54,0x00,0x49,0x90,0x03,0x00,0x28,0x33,
- 0x25,0x20,0x08,0x03,0x26,0x18,0x24,0x01,0x54,0x00,0x4a,0x90,
- 0x03,0x00,0x63,0x30,0xff,0x00,0x6b,0x30,0x26,0x60,0x4b,0x01,
- 0x54,0x00,0x4c,0xa0,0x58,0x00,0x4d,0x90,0x56,0x00,0x4e,0x90,
- 0x00,0x00,0x00,0x00,0x24,0x78,0x6e,0x00,0x25,0xc8,0xaf,0x01,
- 0x58,0x00,0x59,0xa0,0x60,0x11,0x00,0x0c,0x21,0x20,0xe0,0x00,
- 0x14,0x00,0xbf,0x8f,0x18,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,
- 0x00,0x00,0x00,0x00,0xd0,0xff,0xbd,0x27,0x14,0x00,0xbf,0xaf,
- 0x21,0x38,0x80,0x00,0x24,0x00,0xe6,0x8c,0xf3,0x00,0xa5,0x30,
- 0x80,0x92,0x84,0x8f,0x34,0x00,0xa5,0xaf,0x30,0x00,0xa7,0xaf,
- 0x58,0x11,0x00,0x0c,0x2c,0x00,0xa6,0xaf,0x30,0x00,0xa7,0x8f,
- 0x34,0x00,0xa5,0x8f,0x2c,0x00,0xa6,0x8f,0xf0,0x00,0xae,0x30,
- 0x4a,0x00,0xef,0x90,0x49,0x00,0xee,0xa0,0x49,0x00,0xf9,0x90,
- 0x50,0x00,0xe9,0x94,0x0f,0xff,0x01,0x24,0x24,0xc0,0xe1,0x01,
- 0x5f,0x00,0xe5,0xa0,0x25,0x40,0x19,0x03,0x01,0x00,0x2a,0x31,
- 0x21,0x20,0x40,0x00,0x4a,0x00,0xe8,0xa0,0x05,0x00,0x40,0x11,
- 0x03,0x00,0xa5,0x30,0x68,0x00,0xec,0x90,0x27,0x58,0xa0,0x00,
- 0x04,0x00,0x00,0x10,0x24,0x28,0x6c,0x01,0x68,0x00,0xed,0x90,
- 0x00,0x00,0x00,0x00,0x25,0x28,0xad,0x00,0x4a,0x00,0xe3,0x90,
- 0x00,0x00,0x00,0x00,0x20,0x00,0x63,0x30,0x04,0x00,0x60,0x10,
- 0x21,0x10,0x00,0x00,0x02,0x00,0x00,0x10,0x04,0x00,0x02,0x24,
- 0x21,0x10,0x00,0x00,0x28,0x00,0xce,0x90,0x00,0x00,0x00,0x00,
- 0x04,0x00,0xcf,0x31,0x47,0x00,0x4f,0x10,0x00,0x20,0x01,0x3c,
- 0x04,0x00,0x60,0x10,0x00,0x00,0x00,0x00,0x04,0x00,0x18,0x24,
- 0x02,0x00,0x00,0x10,0x28,0x00,0xd8,0xa0,0x28,0x00,0xc0,0xa0,
- 0x10,0x27,0x19,0x24,0x1c,0x00,0xb9,0xaf,0x1c,0x00,0xa2,0x8f,
- 0x1c,0x00,0xa8,0x8f,0x00,0x00,0x00,0x00,0xff,0xff,0x09,0x25,
- 0x0f,0x00,0x40,0x10,0x1c,0x00,0xa9,0xaf,0x2c,0x00,0xca,0x90,
- 0x00,0x00,0x00,0x00,0x0c,0x00,0x40,0x11,0x80,0x00,0x0e,0x24,
- 0x1c,0x00,0xa2,0x8f,0x1c,0x00,0xab,0x8f,0x00,0x00,0x00,0x00,
- 0xff,0xff,0x6c,0x25,0x05,0x00,0x40,0x10,0x1c,0x00,0xac,0xaf,
- 0x2c,0x00,0xcd,0x90,0x00,0x00,0x00,0x00,0xf8,0xff,0xa0,0x15,
- 0x1c,0x00,0xa2,0x8f,0x80,0x00,0x0e,0x24,0x2c,0x00,0xce,0xa0,
- 0x10,0x27,0x0f,0x24,0x18,0x00,0xaf,0xaf,0x18,0x00,0xa2,0x8f,
- 0x18,0x00,0xb8,0x8f,0x00,0x00,0x00,0x00,0xff,0xff,0x19,0x27,
- 0x0f,0x00,0x40,0x10,0x18,0x00,0xb9,0xaf,0x2c,0x00,0xc8,0x90,
- 0x00,0x00,0x00,0x00,0x0c,0x00,0x00,0x11,0x41,0x00,0x0c,0x24,
- 0x18,0x00,0xa2,0x8f,0x18,0x00,0xa9,0x8f,0x00,0x00,0x00,0x00,
- 0xff,0xff,0x2a,0x25,0x05,0x00,0x40,0x10,0x18,0x00,0xaa,0xaf,
- 0x2c,0x00,0xcb,0x90,0x00,0x00,0x00,0x00,0xf8,0xff,0x60,0x15,
- 0x18,0x00,0xa2,0x8f,0x41,0x00,0x0c,0x24,0x2c,0x00,0xcc,0xa0,
- 0x2c,0x00,0xe2,0x94,0x00,0x00,0x00,0x00,0x0f,0x00,0x43,0x30,
- 0x04,0x00,0x61,0x28,0x06,0x00,0x20,0x10,0x21,0x08,0x7c,0x00,
- 0x00,0x04,0x4d,0x30,0x03,0x00,0xa0,0x11,0x21,0x08,0x7c,0x00,
- 0x21,0x18,0x00,0x00,0x21,0x08,0x7c,0x00,0x90,0x8a,0x22,0x90,
- 0x00,0x00,0x00,0x00,0x08,0x00,0xc2,0xa0,0x0c,0x00,0xc2,0xa0,
- 0x00,0x20,0x01,0x3c,0x25,0x10,0xe1,0x00,0x54,0x00,0x4e,0x90,
- 0x54,0x00,0x4f,0x90,0x26,0x18,0xc5,0x01,0x03,0x00,0x63,0x30,
- 0xff,0x00,0x78,0x30,0x26,0xc8,0xf8,0x01,0x54,0x00,0x59,0xa0,
- 0x58,0x00,0x48,0x90,0x56,0x00,0x49,0x90,0x00,0x00,0x00,0x00,
- 0x24,0x50,0x69,0x00,0x25,0x58,0x0a,0x01,0x60,0x11,0x00,0x0c,
- 0x58,0x00,0x4b,0xa0,0x14,0x00,0xbf,0x8f,0x30,0x00,0xbd,0x27,
- 0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0xe0,0xff,0xbd,0x27,
- 0x20,0x00,0xa4,0xaf,0x1c,0x00,0xbf,0xaf,0x80,0x92,0x84,0x8f,
- 0x58,0x11,0x00,0x0c,0x24,0x00,0xa5,0xaf,0x24,0x00,0xae,0x8f,
- 0x20,0x00,0xaf,0x8f,0x21,0x20,0x40,0x00,0x60,0x11,0x00,0x0c,
- 0x28,0x00,0xee,0xa5,0x1c,0x00,0xbf,0x8f,0x20,0x00,0xbd,0x27,
- 0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0xe0,0xff,0xbd,0x27,
- 0x14,0x00,0xbf,0xaf,0x21,0x30,0x80,0x00,0x24,0x00,0xc7,0x8c,
- 0x80,0x92,0x84,0x8f,0x20,0x00,0xa6,0xaf,0x24,0x00,0xa5,0xaf,
- 0x58,0x11,0x00,0x0c,0x1c,0x00,0xa7,0xaf,0x24,0x00,0xa5,0x8f,
- 0x20,0x00,0xa6,0x8f,0x1c,0x00,0xa7,0x8f,0x2c,0x00,0xc5,0xa4,
- 0x2c,0x00,0xc3,0x94,0x21,0x20,0x40,0x00,0x0f,0x00,0x65,0x30,
- 0x04,0x00,0xa1,0x2c,0x06,0x00,0x20,0x10,0x21,0x08,0xbc,0x00,
- 0x00,0x04,0x6e,0x30,0x03,0x00,0xc0,0x11,0x21,0x08,0xbc,0x00,
- 0x21,0x28,0x00,0x00,0x21,0x08,0xbc,0x00,0x90,0x8a,0x22,0x90,
- 0x00,0x00,0x00,0x00,0x08,0x00,0xe2,0xa0,0x0c,0x00,0xe2,0xa0,
- 0x60,0x11,0x00,0x0c,0x20,0x00,0xa6,0xaf,0x20,0x00,0xa6,0x8f,
- 0x21,0x28,0x00,0x00,0x16,0x17,0x00,0x0c,0x21,0x20,0xc0,0x00,
- 0x14,0x00,0xbf,0x8f,0x20,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,
- 0x00,0x00,0x00,0x00,0xe8,0xff,0xbd,0x27,0x21,0x18,0x80,0x00,
- 0x14,0x00,0xbf,0xaf,0x80,0x92,0x84,0x8f,0x1c,0x00,0xa5,0xaf,
- 0x58,0x11,0x00,0x0c,0x18,0x00,0xa3,0xaf,0x1c,0x00,0xa5,0x8f,
- 0x7f,0xff,0x01,0x24,0x18,0x00,0xa3,0x8f,0x24,0x70,0xa1,0x00,
- 0x0b,0x00,0xc0,0x11,0x21,0x20,0x40,0x00,0x50,0x00,0x62,0x94,
- 0x00,0x00,0x00,0x00,0x80,0x00,0x4f,0x30,0x04,0x00,0xe0,0x15,
- 0x80,0x00,0x58,0x34,0x50,0x00,0x62,0x94,0x63,0x00,0x60,0xa0,
- 0x80,0x00,0x58,0x34,0x05,0x00,0x00,0x10,0x50,0x00,0x78,0xa4,
- 0x50,0x00,0x79,0x94,0x00,0x00,0x00,0x00,0x7f,0xff,0x28,0x33,
- 0x50,0x00,0x68,0xa4,0x00,0x80,0x09,0x3c,0x00,0x80,0x0a,0x3c,
- 0xa4,0x35,0x29,0x25,0x20,0x44,0x4a,0x25,0x04,0x00,0x69,0xac,
- 0x74,0x00,0x60,0xac,0x34,0x00,0x6a,0xac,0x60,0x11,0x00,0x0c,
- 0x2a,0x00,0x65,0xa4,0x14,0x00,0xbf,0x8f,0x18,0x00,0xbd,0x27,
- 0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0xe8,0xff,0xbd,0x27,
- 0x18,0x00,0xa4,0xaf,0x14,0x00,0xbf,0xaf,0x80,0x92,0x84,0x8f,
- 0x58,0x11,0x00,0x0c,0x00,0x00,0x00,0x00,0x60,0x11,0x00,0x0c,
- 0x21,0x20,0x40,0x00,0x14,0x00,0xbf,0x8f,0x18,0x00,0xbd,0x27,
- 0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0xe0,0xff,0xbd,0x27,
- 0x20,0x00,0xa4,0xaf,0x1c,0x00,0xbf,0xaf,0x80,0x92,0x84,0x8f,
- 0x58,0x11,0x00,0x0c,0x24,0x00,0xa5,0xaf,0x24,0x00,0xae,0x8f,
- 0x20,0x00,0xaf,0x8f,0x21,0x20,0x40,0x00,0x60,0x11,0x00,0x0c,
- 0x68,0x00,0xee,0xa1,0x1c,0x00,0xbf,0x8f,0x20,0x00,0xbd,0x27,
- 0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0xd0,0xff,0xbd,0x27,
- 0x14,0x00,0xbf,0xaf,0x21,0x30,0x80,0x00,0x48,0x00,0xc2,0x90,
- 0x00,0x00,0x00,0x00,0x08,0x00,0x41,0x2c,0x06,0x00,0x20,0x10,
- 0x08,0x00,0x01,0x24,0x01,0x1c,0x00,0x0c,0x21,0x20,0xc0,0x00,
- 0x8d,0x00,0x00,0x10,0x14,0x00,0xbf,0x8f,0x08,0x00,0x01,0x24,
- 0x8a,0x00,0x41,0x14,0x14,0x00,0xbf,0x8f,0x65,0x00,0xce,0x90,
- 0x00,0x00,0x00,0x00,0x80,0x78,0x0e,0x00,0x23,0x78,0xee,0x01,
- 0x80,0x78,0x0f,0x00,0x23,0x78,0xee,0x01,0x80,0x78,0x0f,0x00,
- 0x21,0x08,0xfc,0x01,0x38,0x94,0x38,0x8c,0x06,0x00,0x01,0x24,
- 0x7e,0x00,0x01,0x13,0x14,0x00,0xbf,0x8f,0x24,0x00,0xc5,0x8c,
- 0x80,0x92,0x84,0x8f,0x30,0x00,0xa6,0xaf,0x58,0x11,0x00,0x0c,
- 0x28,0x00,0xa5,0xaf,0x30,0x00,0xa6,0x8f,0x28,0x00,0xa5,0x8f,
- 0x00,0x20,0x01,0x3c,0x25,0x18,0xc1,0x00,0x0a,0x00,0x60,0xa4,
- 0x0c,0x00,0x60,0xa4,0x12,0x00,0x60,0xa4,0x14,0x00,0x60,0xa4,
- 0xff,0xff,0x19,0x34,0x01,0x00,0x04,0x24,0x18,0x00,0xc0,0xa4,
- 0x1a,0x00,0xc0,0xa4,0x1c,0x00,0xd9,0xa4,0x28,0x00,0xc0,0xa4,
- 0x2a,0x00,0xc0,0xa4,0x2c,0x00,0xc0,0xa4,0x40,0x00,0xc0,0xac,
- 0x44,0x00,0xc0,0xac,0x4b,0x00,0xc0,0xa0,0x4c,0x00,0x64,0xa0,
- 0x4d,0x00,0x64,0xa0,0x4e,0x00,0x64,0xa0,0x4f,0x00,0x60,0xa0,
- 0x56,0x00,0x60,0xa0,0x20,0x00,0x08,0x24,0x50,0x00,0xc8,0xa4,
- 0x49,0x00,0xc0,0xa0,0x4a,0x00,0xc0,0xa0,0x54,0x00,0x60,0xa0,
- 0x57,0x00,0x60,0xa0,0x58,0x00,0x60,0xa0,0x59,0x00,0x60,0xa0,
- 0x5a,0x00,0x60,0xa0,0x5b,0x00,0x60,0xa0,0x00,0x80,0x09,0x3c,
- 0x00,0x80,0x0a,0x3c,0xa4,0x35,0x29,0x25,0x20,0x44,0x4a,0x25,
- 0x5c,0x00,0xc0,0xa0,0x5d,0x00,0xc0,0xa0,0x5e,0x00,0xc0,0xa0,
- 0x5f,0x00,0xc0,0xa0,0x60,0x00,0xc0,0xa0,0x61,0x00,0xc0,0xa0,
- 0x62,0x00,0xc0,0xa0,0x63,0x00,0xc0,0xa0,0x64,0x00,0xc0,0xa0,
- 0x66,0x00,0xc0,0xa0,0x67,0x00,0xc0,0xa0,0x68,0x00,0xc0,0xa0,
- 0x69,0x00,0xc0,0xa0,0x6a,0x00,0xc0,0xa4,0x6c,0x00,0xc0,0xac,
- 0x04,0x00,0xc9,0xac,0x74,0x00,0xc0,0xac,0x34,0x00,0xca,0xac,
- 0x10,0x27,0x0b,0x24,0x28,0x00,0xa0,0xa0,0x21,0x38,0x40,0x00,
- 0x20,0x00,0xab,0xaf,0x20,0x00,0xa2,0x8f,0x20,0x00,0xac,0x8f,
- 0x00,0x00,0x00,0x00,0xff,0xff,0x8d,0x25,0x0f,0x00,0x40,0x10,
- 0x20,0x00,0xad,0xaf,0x2c,0x00,0xae,0x90,0x00,0x00,0x00,0x00,
- 0x0c,0x00,0xc0,0x11,0x80,0x00,0x08,0x24,0x20,0x00,0xa2,0x8f,
- 0x20,0x00,0xaf,0x8f,0x00,0x00,0x00,0x00,0xff,0xff,0xf8,0x25,
- 0x05,0x00,0x40,0x10,0x20,0x00,0xb8,0xaf,0x2c,0x00,0xb9,0x90,
- 0x00,0x00,0x00,0x00,0xf8,0xff,0x20,0x17,0x20,0x00,0xa2,0x8f,
- 0x80,0x00,0x08,0x24,0x2c,0x00,0xa8,0xa0,0x10,0x27,0x09,0x24,
- 0x18,0x00,0xa9,0xaf,0x18,0x00,0xa2,0x8f,0x18,0x00,0xaa,0x8f,
- 0x00,0x00,0x00,0x00,0xff,0xff,0x4b,0x25,0x0f,0x00,0x40,0x10,
- 0x18,0x00,0xab,0xaf,0x2c,0x00,0xac,0x90,0x00,0x00,0x00,0x00,
- 0x0c,0x00,0x80,0x11,0x41,0x00,0x18,0x24,0x18,0x00,0xa2,0x8f,
- 0x18,0x00,0xad,0x8f,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x25,
- 0x05,0x00,0x40,0x10,0x18,0x00,0xae,0xaf,0x2c,0x00,0xaf,0x90,
- 0x00,0x00,0x00,0x00,0xf8,0xff,0xe0,0x15,0x18,0x00,0xa2,0x8f,
- 0x41,0x00,0x18,0x24,0x2c,0x00,0xb8,0xa0,0x09,0x00,0x19,0x24,
- 0x78,0x00,0xb9,0xa0,0x90,0x8a,0x88,0x93,0x21,0x20,0xe0,0x00,
- 0x21,0x10,0x00,0x01,0x08,0x00,0xa8,0xa0,0x0c,0x00,0xa2,0xa0,
- 0x60,0x11,0x00,0x0c,0x30,0x00,0xa6,0xaf,0x30,0x00,0xa6,0x8f,
- 0x21,0x28,0x00,0x00,0x16,0x17,0x00,0x0c,0x21,0x20,0xc0,0x00,
- 0x14,0x00,0xbf,0x8f,0x30,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,
- 0x00,0x00,0x00,0x00,0x10,0x94,0x8e,0x27,0x23,0x78,0xae,0x00,
- 0x2c,0x00,0x01,0x24,0x1a,0x00,0xe1,0x01,0xe8,0xff,0xbd,0x27,
- 0x14,0x00,0xbf,0xaf,0x08,0x00,0xc1,0x28,0x48,0x00,0x86,0xa0,
- 0x12,0xc0,0x00,0x00,0x65,0x00,0x98,0xa0,0x08,0x00,0x20,0x10,
- 0x08,0x00,0x01,0x24,0x04,0x00,0xb9,0x8c,0x40,0x41,0x06,0x00,
- 0x21,0x48,0x28,0x03,0x00,0x01,0x2a,0x25,0x0c,0x00,0x00,0x10,
- 0x24,0x00,0x8a,0xac,0x08,0x00,0x01,0x24,0x25,0x00,0xc1,0x14,
- 0x14,0x00,0xbf,0x8f,0x28,0x00,0xab,0x8c,0x06,0x00,0x01,0x24,
- 0x21,0x00,0x61,0x11,0x14,0x00,0xbf,0x8f,0x04,0x00,0xac,0x8c,
- 0x00,0x00,0x00,0x00,0x00,0x08,0x8d,0x25,0x24,0x00,0x8d,0xac,
- 0x08,0x00,0xc1,0x28,0x06,0x00,0x20,0x10,0x00,0x00,0x00,0x00,
- 0x01,0x1c,0x00,0x0c,0x18,0x00,0xa4,0xaf,0x18,0x00,0xa4,0x8f,
- 0x05,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0xdb,0x1d,0x00,0x0c,
- 0x18,0x00,0xa4,0xaf,0x18,0x00,0xa4,0x8f,0x00,0x00,0x00,0x00,
- 0xbc,0x92,0x8e,0x8f,0x00,0x00,0x00,0x00,0x03,0x00,0xc0,0x15,
- 0x00,0x00,0x00,0x00,0x09,0x00,0x00,0x10,0x30,0x00,0x84,0xac,
- 0xbc,0x92,0x8f,0x8f,0x00,0x00,0x00,0x00,0x30,0x00,0xf8,0x8d,
- 0x00,0x00,0x00,0x00,0x30,0x00,0x98,0xac,0xbc,0x92,0x99,0x8f,
- 0x00,0x00,0x00,0x00,0x30,0x00,0x24,0xaf,0xbc,0x92,0x84,0xaf,
- 0x14,0x00,0xbf,0x8f,0x18,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x2e,0x2e,0x2f,0x65,0x78,0x63,0x65,0x70,0x74,0x69,0x6f,0x6e,
- 0x2e,0x73,0x00,0x00,0x84,0x46,0x00,0x80,0xc0,0x46,0x00,0x80,
- 0xfc,0x46,0x00,0x80,0x2c,0x47,0x00,0x80,0x5c,0x47,0x00,0x80,
- 0x28,0x49,0x00,0x80,0x8c,0x47,0x00,0x80,0x28,0x49,0x00,0x80,
- 0xa4,0x47,0x00,0x80,0xcc,0x47,0x00,0x80,0xf8,0x47,0x00,0x80,
- 0x0c,0x48,0x00,0x80,0x1c,0x48,0x00,0x80,0x28,0x49,0x00,0x80,
- 0x24,0x48,0x00,0x80,0x34,0x48,0x00,0x80,0x44,0x48,0x00,0x80,
- 0x28,0x49,0x00,0x80,0x28,0x49,0x00,0x80,0x78,0x48,0x00,0x80,
- 0x8c,0x48,0x00,0x80,0xb8,0x48,0x00,0x80,0xcc,0x48,0x00,0x80,
- 0xe8,0x49,0x00,0x80,0x24,0x4a,0x00,0x80,0x60,0x4a,0x00,0x80,
- 0x90,0x4a,0x00,0x80,0xc0,0x4a,0x00,0x80,0x88,0x4c,0x00,0x80,
- 0xf0,0x4a,0x00,0x80,0x88,0x4c,0x00,0x80,0x08,0x4b,0x00,0x80,
- 0x2c,0x4b,0x00,0x80,0x58,0x4b,0x00,0x80,0x6c,0x4b,0x00,0x80,
- 0x7c,0x4b,0x00,0x80,0x88,0x4c,0x00,0x80,0x84,0x4b,0x00,0x80,
- 0x94,0x4b,0x00,0x80,0xa4,0x4b,0x00,0x80,0x88,0x4c,0x00,0x80,
- 0x88,0x4c,0x00,0x80,0xd8,0x4b,0x00,0x80,0xec,0x4b,0x00,0x80,
- 0x18,0x4c,0x00,0x80,0x2c,0x4c,0x00,0x80,0x54,0x53,0x00,0x80,
- 0xe4,0x54,0x00,0x80,0x54,0x53,0x00,0x80,0xb0,0x53,0x00,0x80,
- 0xe4,0x54,0x00,0x80,0xd8,0x53,0x00,0x80,0xd8,0x53,0x00,0x80,
- 0xd8,0x53,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x34,0x36,0x00,0x80,0xc8,0x35,0x00,0x80,0x04,0x36,0x00,0x80,
- 0x34,0x36,0x00,0x80,0xcc,0x3c,0x00,0x80,0xd8,0x3a,0x00,0x80,
- 0xcc,0x3c,0x00,0x80,0x5c,0x3b,0x00,0x80,0x28,0x38,0x00,0x80,
- 0x70,0x37,0x00,0x80,0x28,0x38,0x00,0x80,0x08,0x3d,0x00,0x80,
- 0xd0,0x36,0x00,0x80,0xd0,0x36,0x00,0x80,0xd0,0x36,0x00,0x80,
- 0xd0,0x36,0x00,0x80,0x68,0x36,0x00,0x80,0x68,0x36,0x00,0x80,
- 0x68,0x36,0x00,0x80,0x68,0x36,0x00,0x80,0x68,0x36,0x00,0x80,
- 0x68,0x36,0x00,0x80,0x68,0x36,0x00,0x80,0x68,0x36,0x00,0x80,
- 0xf8,0x36,0x00,0x80,0xf8,0x36,0x00,0x80,0xf8,0x36,0x00,0x80,
- 0xf8,0x36,0x00,0x80,0xf8,0x36,0x00,0x80,0xf8,0x36,0x00,0x80,
- 0xf8,0x36,0x00,0x80,0xf8,0x36,0x00,0x80,0xf8,0x36,0x00,0x80,
- 0xf8,0x36,0x00,0x80,0xf8,0x36,0x00,0x80,0xf8,0x36,0x00,0x80,
- 0xf8,0x36,0x00,0x80,0xf8,0x36,0x00,0x80,0xf8,0x36,0x00,0x80,
- 0xf8,0x36,0x00,0x80,0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,
- 0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,
- 0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,
- 0xa4,0x3e,0x00,0x80,0xc0,0x3e,0x00,0x80,0x58,0x3f,0x00,0x80,
- 0x30,0x3f,0x00,0x80,0x44,0x3f,0x00,0x80,0xa0,0x3f,0x00,0x80,
- 0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,
- 0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,
- 0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,
- 0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,
- 0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,
- 0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0x5c,0x3e,0x00,0x80,0x5c,0x3e,0x00,0x80,0x5c,0x3e,0x00,0x80,
- 0x5c,0x3e,0x00,0x80,0x5c,0x3e,0x00,0x80,0x5c,0x3e,0x00,0x80,
- 0x5c,0x3e,0x00,0x80,0x5c,0x3e,0x00,0x80,0x5c,0x3e,0x00,0x80,
- 0x5c,0x3e,0x00,0x80,0x5c,0x3e,0x00,0x80,0x5c,0x3e,0x00,0x80,
- 0x5c,0x3e,0x00,0x80,0x5c,0x3e,0x00,0x80,0x5c,0x3e,0x00,0x80,
- 0x5c,0x3e,0x00,0x80,0x5c,0x3e,0x00,0x80,0x5c,0x3e,0x00,0x80,
- 0x5c,0x3e,0x00,0x80,0x5c,0x3e,0x00,0x80,0x5c,0x3e,0x00,0x80,
- 0x5c,0x3e,0x00,0x80,0x5c,0x3e,0x00,0x80,0x5c,0x3e,0x00,0x80,
- 0x5c,0x3e,0x00,0x80,0x5c,0x3e,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xf8,0x3d,0x00,0x80,0x90,0x3e,0x00,0x80,
- 0x90,0x3e,0x00,0x80,0x90,0x3e,0x00,0x80,0x90,0x3e,0x00,0x80,
- 0x90,0x3e,0x00,0x80,0x90,0x3e,0x00,0x80,0x90,0x3e,0x00,0x80,
- 0x90,0x3e,0x00,0x80,0x90,0x3e,0x00,0x80,0x90,0x3e,0x00,0x80,
- 0x90,0x3e,0x00,0x80,0x90,0x3e,0x00,0x80,0x90,0x3e,0x00,0x80,
- 0x90,0x3e,0x00,0x80,0x90,0x3e,0x00,0x80,0x90,0x3e,0x00,0x80,
- 0x90,0x3e,0x00,0x80,0x90,0x3e,0x00,0x80,0x90,0x3e,0x00,0x80,
- 0x90,0x3e,0x00,0x80,0x90,0x3e,0x00,0x80,0x90,0x3e,0x00,0x80,
- 0x90,0x3e,0x00,0x80,0x90,0x3e,0x00,0x80,0x90,0x3e,0x00,0x80,
- 0x90,0x3e,0x00,0x80,0x0c,0x3e,0x00,0x80,0x20,0x3e,0x00,0x80,
- 0x34,0x3e,0x00,0x80,0x48,0x3e,0x00,0x80,0xc0,0x3d,0x00,0x80,
- 0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,
- 0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,
- 0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,
- 0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,
- 0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,
- 0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,
- 0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,
- 0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,
- 0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,
- 0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,
- 0xc0,0x3d,0x00,0x80,0xc0,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,
- 0xbc,0x3d,0x00,0x80,0xbc,0x3d,0x00,0x80,0xe8,0x3b,0x00,0x80,
- 0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,
- 0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,
- 0xe8,0x3b,0x00,0x80,0x18,0x3c,0x00,0x80,0x90,0x3c,0x00,0x80,
- 0x28,0x3c,0x00,0x80,0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,
- 0x5c,0x3c,0x00,0x80,0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,
- 0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,
- 0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,
- 0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,
- 0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,
- 0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,
- 0xe8,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xd4,0x3b,0x00,0x80,0xd4,0x3b,0x00,0x80,0xd4,0x3b,0x00,0x80,
- 0xd4,0x3b,0x00,0x80,0xd4,0x3b,0x00,0x80,0xd4,0x3b,0x00,0x80,
- 0xd4,0x3b,0x00,0x80,0xd4,0x3b,0x00,0x80,0xd4,0x3b,0x00,0x80,
- 0xd4,0x3b,0x00,0x80,0xd4,0x3b,0x00,0x80,0xd4,0x3b,0x00,0x80,
- 0xd4,0x3b,0x00,0x80,0xd4,0x3b,0x00,0x80,0xd4,0x3b,0x00,0x80,
- 0xd4,0x3b,0x00,0x80,0xd4,0x3b,0x00,0x80,0xd4,0x3b,0x00,0x80,
- 0xd4,0x3b,0x00,0x80,0xd4,0x3b,0x00,0x80,0xd4,0x3b,0x00,0x80,
- 0xd4,0x3b,0x00,0x80,0xd4,0x3b,0x00,0x80,0xd4,0x3b,0x00,0x80,
- 0xd4,0x3b,0x00,0x80,0xd4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,
- 0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,
- 0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,
- 0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,
- 0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,
- 0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,
- 0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,
- 0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,
- 0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,
- 0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,
- 0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,0xe8,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,0xe4,0x3b,0x00,0x80,
- 0x04,0x39,0x00,0x80,0x30,0x42,0x00,0x80,0x84,0x41,0x00,0x80,
- 0x84,0x41,0x00,0x80,0x04,0x39,0x00,0x80,0x30,0x42,0x00,0x80,
- 0x84,0x41,0x00,0x80,0x84,0x41,0x00,0x80,0x04,0x39,0x00,0x80,
- 0x30,0x42,0x00,0x80,0x84,0x41,0x00,0x80,0x84,0x41,0x00,0x80,
- 0x04,0x39,0x00,0x80,0x30,0x42,0x00,0x80,0x84,0x41,0x00,0x80,
- 0x84,0x41,0x00,0x80,0xd0,0x38,0x00,0x80,0x30,0x42,0x00,0x80,
- 0x84,0x41,0x00,0x80,0x84,0x41,0x00,0x80,0x4c,0x42,0x00,0x80,
- 0x30,0x42,0x00,0x80,0x84,0x41,0x00,0x80,0x84,0x41,0x00,0x80,
- 0xd0,0x40,0x00,0x80,0x30,0x42,0x00,0x80,0x84,0x41,0x00,0x80,
- 0x84,0x41,0x00,0x80,0xa0,0x40,0x00,0x80,0x30,0x42,0x00,0x80,
- 0x84,0x41,0x00,0x80,0x84,0x41,0x00,0x80,0xc0,0x3d,0x00,0x80,
- 0xe0,0x3e,0x00,0x80,0xf8,0x3e,0x00,0x80,0x00,0x3f,0x00,0x80,
- 0xc0,0x3d,0x00,0x80,0xe8,0x3f,0x00,0x80,0xf4,0x3f,0x00,0x80,
- 0xfc,0x3f,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x2e,0x2e,0x2f,0x73,0x6d,0x61,0x72,0x74,0x66,0x65,0x70,0x2e,
- 0x63,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x2e,0x2e,0x2f,0x73,0x6d,0x61,0x72,0x74,0x6d,0x61,0x69,0x6e,
- 0x2e,0x63,0x00,0x00,0x2e,0x2e,0x2f,0x73,0x6d,0x61,0x72,0x74,
- 0x6d,0x61,0x69,0x6e,0x2e,0x63,0x00,0x00,0x2e,0x2e,0x2f,0x63,
- 0x6f,0x6d,0x6d,0x6f,0x6e,0x2e,0x63,0x00,0x2e,0x2e,0x2f,0x63,
- 0x6f,0x6d,0x6d,0x6f,0x6e,0x2e,0x63,0x00,0x2e,0x2e,0x2f,0x63,
- 0x6f,0x6d,0x6d,0x6f,0x6e,0x2e,0x63,0x00,0x2e,0x2e,0x2f,0x63,
- 0x6f,0x6d,0x6d,0x6f,0x6e,0x2e,0x63,0x00,0x0c,0x00,0x34,0x00,
- 0x00,0x00,0x41,0x0b,0x00,0x00,0x0b,0x00,0x0c,0x00,0xe2,0x00,
- 0x00,0x00,0x40,0x00,0x0c,0x00,0x74,0x00,0x04,0x00,0x6e,0x00,
- 0x04,0x00,0x00,0x00,0x0c,0x00,0xe4,0x00,0x04,0x00,0x40,0x00,
- 0x0c,0x00,0xb4,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
- 0x0c,0x00,0xe8,0x00,0x08,0x00,0x40,0x00,0x2e,0x2e,0x2f,0x74,
- 0x69,0x6d,0x65,0x72,0x2e,0x63,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x12,0x00,0x00,0x00,
- 0x93,0x00,0x00,0x00,0xb4,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x01,0x00,0x2e,0x2e,0x2f,0x74,0x69,0x6d,0x65,0x72,
- 0x69,0x6e,0x74,0x2e,0x63,0x00,0x00,0x00,0x2e,0x2e,0x2f,0x74,
- 0x69,0x6d,0x65,0x72,0x69,0x6e,0x74,0x2e,0x63,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x24,
- 0x00,0x18,0x5d,0x10,0x6f,0x0d,0x00,0x0c,0x00,0x09,0x00,0x06,
- 0x00,0x03,0x80,0x01,0x00,0x01,0xc0,0x00,0x60,0x00,0x30,0x00,
- 0x18,0x00,0x0c,0x00,0x30,0x00,0x08,0x00,0x06,0x00,0x04,0x00,
- 0x20,0x00,0x08,0x00,0x02,0x00,0x06,0x00,0x04,0x00,0x02,0x00,
- 0x10,0x00,0xc0,0x00,0x60,0x00,0x30,0x00,0x18,0x00,0x0c,0x00,
- 0x04,0xfa,0xc8,0x96,0x64,0x32,0x19,0x14,0x0f,0x0a,0x08,0x06,
- 0x05,0x04,0x04,0x04,0x40,0x28,0x23,0x29,0x63,0x68,0x61,0x6e,
- 0x6e,0x65,0x6c,0x2e,0x68,0x20,0x20,0x20,0x20,0x20,0x33,0x2e,
- 0x37,0x20,0x20,0x39,0x2f,0x32,0x30,0x2f,0x39,0x33,0x00,0x40,
- 0x28,0x23,0x29,0x63,0x6f,0x6d,0x6d,0x6f,0x6e,0x2e,0x63,0x20,
- 0x20,0x20,0x20,0x20,0x20,0x33,0x2e,0x38,0x20,0x20,0x34,0x2f,
- 0x31,0x38,0x2f,0x39,0x34,0x00,0x40,0x28,0x23,0x29,0x63,0x6f,
- 0x6d,0x6d,0x6f,0x6e,0x2e,0x6d,0x6b,0x20,0x20,0x20,0x20,0x20,
- 0x33,0x2e,0x31,0x30,0x20,0x20,0x31,0x2f,0x36,0x2f,0x39,0x34,
- 0x00,0x40,0x28,0x23,0x29,0x63,0x6f,0x6e,0x63,0x62,0x69,0x6f,
- 0x73,0x2e,0x68,0x20,0x20,0x20,0x20,0x32,0x2e,0x38,0x20,0x20,
- 0x36,0x2f,0x33,0x30,0x2f,0x39,0x32,0x00,0x40,0x28,0x23,0x29,
- 0x64,0x65,0x66,0x73,0x2e,0x68,0x20,0x20,0x20,0x20,0x20,0x20,
- 0x20,0x20,0x33,0x2e,0x32,0x20,0x20,0x34,0x2f,0x36,0x2f,0x39,
- 0x34,0x00,0x40,0x28,0x23,0x29,0x64,0x65,0x76,0x69,0x63,0x65,
- 0x2e,0x68,0x20,0x20,0x20,0x20,0x20,0x20,0x33,0x2e,0x38,0x20,
- 0x20,0x34,0x2f,0x31,0x34,0x2f,0x39,0x34,0x00,0x40,0x28,0x23,
- 0x29,0x65,0x78,0x63,0x65,0x70,0x74,0x69,0x6f,0x6e,0x2e,0x73,
- 0x20,0x20,0x20,0x33,0x2e,0x32,0x20,0x20,0x38,0x2f,0x32,0x30,
- 0x2f,0x39,0x33,0x00,0x40,0x28,0x23,0x29,0x68,0x6f,0x73,0x74,
- 0x63,0x6f,0x6d,0x6d,0x2e,0x68,0x20,0x20,0x20,0x20,0x33,0x2e,
- 0x33,0x20,0x20,0x33,0x2f,0x32,0x32,0x2f,0x39,0x33,0x00,0x40,
- 0x28,0x23,0x29,0x68,0x6f,0x73,0x74,0x69,0x6e,0x69,0x74,0x2e,
- 0x73,0x20,0x20,0x20,0x20,0x33,0x2e,0x33,0x20,0x20,0x38,0x2f,
- 0x32,0x30,0x2f,0x39,0x33,0x00,0x40,0x28,0x23,0x29,0x6d,0x69,
- 0x64,0x2e,0x68,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
- 0x33,0x2e,0x33,0x20,0x20,0x34,0x2f,0x36,0x2f,0x39,0x34,0x00,
- 0x40,0x28,0x23,0x29,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x2e,0x63,
- 0x20,0x20,0x20,0x20,0x20,0x20,0x32,0x2e,0x31,0x20,0x20,0x33,
- 0x2f,0x31,0x2f,0x39,0x32,0x00,0x40,0x28,0x23,0x29,0x6d,0x6f,
- 0x64,0x75,0x6c,0x65,0x2e,0x68,0x20,0x20,0x20,0x20,0x20,0x20,
- 0x33,0x2e,0x31,0x20,0x20,0x38,0x2f,0x32,0x30,0x2f,0x39,0x33,
- 0x00,0x40,0x28,0x23,0x29,0x70,0x61,0x72,0x61,0x6c,0x6c,0x65,
- 0x6c,0x2e,0x63,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
- 0x31,0x2e,0x38,0x20,0x20,0x34,0x2f,0x31,0x38,0x2f,0x39,0x34,
- 0x00,0x40,0x28,0x23,0x29,0x70,0x61,0x72,0x61,0x2e,0x68,0x20,
- 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x31,0x2e,0x31,0x20,0x20,
- 0x37,0x2f,0x37,0x2f,0x39,0x33,0x00,0x40,0x28,0x23,0x29,0x70,
- 0x62,0x75,0x73,0x2e,0x68,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
- 0x20,0x33,0x2e,0x32,0x20,0x20,0x34,0x2f,0x36,0x2f,0x39,0x34,
- 0x00,0x40,0x28,0x23,0x29,0x70,0x6f,0x6c,0x6c,0x2e,0x73,0x20,
- 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x33,0x2e,0x31,0x33,0x20,
- 0x20,0x35,0x2f,0x32,0x34,0x2f,0x39,0x34,0x00,0x40,0x28,0x23,
- 0x29,0x70,0x72,0x6f,0x74,0x6f,0x63,0x6f,0x6c,0x2e,0x68,0x20,
- 0x20,0x20,0x20,0x33,0x2e,0x31,0x20,0x20,0x34,0x2f,0x31,0x39,
- 0x2f,0x39,0x33,0x00,0x40,0x28,0x23,0x29,0x72,0x65,0x67,0x2e,
- 0x68,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x33,0x2e,
- 0x32,0x20,0x20,0x38,0x2f,0x32,0x35,0x2f,0x39,0x33,0x00,0x40,
- 0x28,0x23,0x29,0x72,0x65,0x6c,0x65,0x61,0x73,0x65,0x2e,0x68,
- 0x20,0x20,0x20,0x20,0x20,0x33,0x2e,0x39,0x20,0x20,0x38,0x2f,
- 0x31,0x37,0x2f,0x39,0x34,0x00,0x40,0x28,0x23,0x29,0x72,0x77,
- 0x2e,0x63,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
- 0x33,0x2e,0x31,0x20,0x20,0x31,0x31,0x2f,0x35,0x2f,0x39,0x32,
- 0x00,0x40,0x28,0x23,0x29,0x72,0x77,0x2e,0x68,0x20,0x20,0x20,
- 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x32,0x2e,0x31,0x20,0x20,
- 0x33,0x2f,0x31,0x2f,0x39,0x32,0x00,0x40,0x28,0x23,0x29,0x73,
- 0x63,0x68,0x65,0x64,0x2e,0x63,0x20,0x20,0x20,0x20,0x20,0x20,
- 0x20,0x33,0x2e,0x32,0x20,0x20,0x38,0x2f,0x32,0x30,0x2f,0x39,
- 0x33,0x00,0x40,0x28,0x23,0x29,0x73,0x63,0x68,0x65,0x64,0x2e,
- 0x68,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x33,0x2e,0x31,0x20,
- 0x20,0x38,0x2f,0x32,0x30,0x2f,0x39,0x33,0x00,0x40,0x28,0x23,
- 0x29,0x73,0x6d,0x61,0x72,0x74,0x62,0x69,0x6f,0x73,0x2e,0x68,
- 0x20,0x20,0x20,0x33,0x2e,0x31,0x20,0x20,0x38,0x2f,0x32,0x30,
- 0x2f,0x39,0x33,0x00,0x40,0x28,0x23,0x29,0x73,0x6d,0x61,0x72,
- 0x74,0x66,0x65,0x70,0x2e,0x63,0x20,0x20,0x20,0x20,0x33,0x2e,
- 0x31,0x31,0x20,0x20,0x34,0x2f,0x31,0x38,0x2f,0x39,0x34,0x00,
- 0x40,0x28,0x23,0x29,0x73,0x6d,0x61,0x72,0x74,0x6d,0x61,0x69,
- 0x6e,0x2e,0x63,0x20,0x20,0x20,0x33,0x2e,0x31,0x20,0x20,0x38,
- 0x2f,0x32,0x30,0x2f,0x39,0x33,0x00,0x40,0x28,0x23,0x29,0x73,
- 0x78,0x66,0x65,0x70,0x2e,0x6d,0x6b,0x20,0x20,0x20,0x20,0x20,
- 0x20,0x33,0x2e,0x32,0x20,0x20,0x38,0x2f,0x32,0x30,0x2f,0x39,
- 0x33,0x00,0x40,0x28,0x23,0x29,0x74,0x69,0x6d,0x65,0x72,0x2e,
- 0x63,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x33,0x2e,0x33,0x20,
- 0x20,0x37,0x2f,0x37,0x2f,0x39,0x33,0x00,0x40,0x28,0x23,0x29,
- 0x74,0x69,0x6d,0x65,0x72,0x2e,0x68,0x20,0x20,0x20,0x20,0x20,
- 0x20,0x20,0x33,0x2e,0x33,0x20,0x20,0x34,0x2f,0x36,0x2f,0x39,
- 0x34,0x00,0x40,0x28,0x23,0x29,0x74,0x69,0x6d,0x65,0x72,0x69,
- 0x6e,0x74,0x2e,0x63,0x20,0x20,0x20,0x20,0x33,0x2e,0x31,0x20,
- 0x20,0x38,0x2f,0x32,0x30,0x2f,0x39,0x33,0x00,0x40,0x28,0x23,
- 0x29,0x75,0x61,0x72,0x74,0x2e,0x63,0x20,0x20,0x20,0x20,0x20,
- 0x20,0x20,0x20,0x33,0x2e,0x38,0x20,0x20,0x35,0x2f,0x32,0x34,
- 0x2f,0x39,0x34,0x00,0x40,0x28,0x23,0x29,0x75,0x61,0x72,0x74,
- 0x2e,0x68,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x33,0x2e,
- 0x31,0x20,0x20,0x34,0x2f,0x36,0x2f,0x39,0x34,0x00,0x40,0x28,
- 0x23,0x29,0x75,0x74,0x69,0x6c,0x2e,0x73,0x20,0x20,0x20,0x20,
- 0x20,0x20,0x20,0x20,0x33,0x2e,0x33,0x20,0x20,0x37,0x2f,0x31,
- 0x2f,0x39,0x34,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00
-};
-
-static unsigned pcem_ncook=sizeof(pcem_cook);
diff --git a/sys/gnu/i386/isa/dgmreg.h b/sys/gnu/i386/isa/dgmreg.h
deleted file mode 100644
index 2f052b5..0000000
--- a/sys/gnu/i386/isa/dgmreg.h
+++ /dev/null
@@ -1,422 +0,0 @@
-/*-
- * dgmreg.h $FreeBSD$
- *
- * Digiboard driver.
- *
- * Stage 1. "Better than nothing".
- *
- * Based on sio driver by Bruce Evans and on Linux driver by Troy
- * De Jongh <troyd@digibd.com> or <troyd@skypoint.com>
- * which is under GNU General Public License version 2 so this driver
- * is forced to be under GPL 2 too.
- *
- * Written by Serge Babkin,
- * Joint Stock Commercial Bank "Chelindbank"
- * (Chelyabinsk, Russia)
- * babkin@hq.icb.chel.su
- */
-
-#define MAX_DGM_PORTS 64
-
-/* digi.h */
-/* Definitions for DigiBoard ditty(1) command. */
-
-#if !defined(TIOCMODG)
-#define TIOCMODG ('d'<<8) | 250 /* get modem ctrl state */
-#define TIOCMODS ('d'<<8) | 251 /* set modem ctrl state */
-#endif
-
-#if !defined(TIOCMSET)
-#define TIOCMSET ('d'<<8) | 252 /* set modem ctrl state */
-#define TIOCMGET ('d'<<8) | 253 /* set modem ctrl state */
-#endif
-
-#if !defined(TIOCMBIC)
-#define TIOCMBIC ('d'<<8) | 254 /* set modem ctrl state */
-#define TIOCMBIS ('d'<<8) | 255 /* set modem ctrl state */
-#endif
-
-#if !defined(TIOCSDTR)
-#define TIOCSDTR ('e'<<8) | 0 /* set DTR */
-#define TIOCCDTR ('e'<<8) | 1 /* clear DTR */
-#endif
-
-/************************************************************************
- * Ioctl command arguments for DIGI parameters.
- ************************************************************************/
-#define DIGI_GETA ('e'<<8) | 94 /* Read params */
-
-#define DIGI_SETA ('e'<<8) | 95 /* Set params */
-#define DIGI_SETAW ('e'<<8) | 96 /* Drain & set params */
-#define DIGI_SETAF ('e'<<8) | 97 /* Drain, flush & set params */
-
-#define DIGI_GETFLOW ('e'<<8) | 99 /* Get startc/stopc flow */
- /* control characters */
-#define DIGI_SETFLOW ('e'<<8) | 100 /* Set startc/stopc flow */
- /* control characters */
-#define DIGI_GETAFLOW ('e'<<8) | 101 /* Get Aux. startc/stopc */
- /* flow control chars */
-#define DIGI_SETAFLOW ('e'<<8) | 102 /* Set Aux. startc/stopc */
- /* flow control chars */
-
-struct digiflow_struct {
- unsigned char startc; /* flow cntl start char */
- unsigned char stopc; /* flow cntl stop char */
-};
-
-typedef struct digiflow_struct digiflow_t;
-
-
-/************************************************************************
- * Values for digi_flags
- ************************************************************************/
-#define DIGI_IXON 0x0001 /* Handle IXON in the FEP */
-#define DIGI_FAST 0x0002 /* Fast baud rates */
-#define RTSPACE 0x0004 /* RTS input flow control */
-#define CTSPACE 0x0008 /* CTS output flow control */
-#define DSRPACE 0x0010 /* DSR output flow control */
-#define DCDPACE 0x0020 /* DCD output flow control */
-#define DTRPACE 0x0040 /* DTR input flow control */
-#define DIGI_FORCEDCD 0x0100 /* Force carrier */
-#define DIGI_ALTPIN 0x0200 /* Alternate RJ-45 pin config */
-#define DIGI_AIXON 0x0400 /* Aux flow control in fep */
-
-
-/************************************************************************
- * Structure used with ioctl commands for DIGI parameters.
- ************************************************************************/
-struct digi_struct {
- unsigned short digi_flags; /* Flags (see above) */
-};
-
-typedef struct digi_struct digi_t;
-
-/* fep.h */
-
-#define FEP_CSTART 0x400L
-#define FEP_CMAX 0x800L
-#define FEP_ISTART 0x800L
-#define FEP_IMAX 0xC00L
-#define FEP_CIN 0xD10L
-#define FEP_GLOBAL 0xD10L
-#define FEP_EIN 0xD18L
-#define FEPSTAT 0xD20L
-#define CHANSTRUCT 0x1000L
-#define RXTXBUF 0x4000L
-
-
-struct global_data {
- volatile ushort cin;
- volatile ushort cout;
- volatile ushort cstart;
- volatile ushort cmax;
- volatile ushort ein;
- volatile ushort eout;
- volatile ushort istart;
- volatile ushort imax;
-};
-
-
-struct board_chan {
- int filler1;
- int filler2;
- volatile ushort tseg;
- volatile ushort tin;
- volatile ushort tout;
- volatile ushort tmax;
-
- volatile ushort rseg;
- volatile ushort rin;
- volatile ushort rout;
- volatile ushort rmax;
-
- volatile ushort tlow;
- volatile ushort rlow;
- volatile ushort rhigh;
- volatile ushort incr;
-
- volatile ushort etime;
- volatile ushort edelay;
- volatile u_char *dev;
-
- volatile ushort iflag;
- volatile ushort oflag;
- volatile ushort cflag;
- volatile ushort gmask;
-
- volatile ushort col;
- volatile ushort delay;
- volatile ushort imask;
- volatile ushort tflush;
-
- int filler3;
- int filler4;
- int filler5;
- int filler6;
-
- volatile u_char num;
- volatile u_char ract;
- volatile u_char bstat;
- volatile u_char tbusy;
- volatile u_char iempty;
- volatile u_char ilow;
- volatile u_char idata;
- volatile u_char eflag;
-
- volatile u_char tflag;
- volatile u_char rflag;
- volatile u_char xmask;
- volatile u_char xval;
- volatile u_char mstat;
- volatile u_char mchange;
- volatile u_char mint;
- volatile u_char lstat;
-
- volatile u_char mtran;
- volatile u_char orun;
- volatile u_char startca;
- volatile u_char stopca;
- volatile u_char startc;
- volatile u_char stopc;
- volatile u_char vnext;
- volatile u_char hflow;
-
- volatile u_char fillc;
- volatile u_char ochar;
- volatile u_char omask;
-
- u_char filler7;
- u_char filler8[28];
-};
-
-
-#define SRXLWATER 0xE0
-#define SRXHWATER 0xE1
-#define STOUT 0xE2
-#define PAUSETX 0xE3
-#define RESUMETX 0xE4
-#define SAUXONOFFC 0xE6
-#define SENDBREAK 0xE8
-#define SETMODEM 0xE9
-#define SETIFLAGS 0xEA
-#define SONOFFC 0xEB
-#define STXLWATER 0xEC
-#define PAUSERX 0xEE
-#define RESUMERX 0xEF
-#define SETBUFFER 0xF2
-#define SETCOOKED 0xF3
-#define SETHFLOW 0xF4
-#define SETCTRLFLAGS 0xF5
-#define SETVNEXT 0xF6
-
-
-
-#define BREAK_IND 0x01
-#define LOWTX_IND 0x02
-#define EMPTYTX_IND 0x04
-#define DATA_IND 0x08
-#define MODEMCHG_IND 0x20
-
-#define ALL_IND (BREAK_IND|LOWTX_IND|EMPTYTX_IND|DATA_IND|MODEMCHG_IND)
-
-#define CD 0x80
-#define DSR 0x20
-#define CTS 0x10
-#define DTR 0x01
-#define RTS 0x02
-#define RI 0x40
-
-#define FEPCODESEG 0x0200L
-#define FEPCODE 0x2000L
-#define BIOSCODE 0xf800L
-#define BIOSOFFSET 0x1000L
-
-#define MISCGLOBAL 0x0C00L
-#define NPORT 0x0C02L
-#define MBOX 0x0C40L
-#define BOTWIN 0x100L
-#define TOPWIN 0xFF00L
-
-#define FEPCLR 0x00
-#define FEPMEM 0x02
-#define FEPRST 0x04
-#define FEPINT 0x08
-#define FEPMASK 0x0e
-#define FEPWIN 0x80
-
-#define PCXI 0
-#define PCXE 1
-#define PCXEVE 2
-#define PCXEM 3
-
-static char * const board_desc[] = {
- "PC/Xi (64K)",
- "PC/Xe (64K)",
- "PC/Xe (8K) ",
- "PC/Xem ",
-};
-
-#define STARTC 021
-#define STOPC 023
-#define IAIXON 0x2000
-
-
-struct board_info {
- u_char status;
- u_char type;
- u_char altpin;
- ushort numports;
- ushort port;
- u_long membase;
-};
-
-
-#define TXSTOPPED 0x1
-#define LOWWAIT 0x2
-#define EMPTYWAIT 0x4
-
-#define DISABLED 0
-#define ENABLED 1
-#define OFF 0
-#define ON 1
-
-#define FEPTIMEOUT 200000
-#define SERIAL_TYPE_NORMAL 1
-#define SERIAL_TYPE_CALLOUT 2
-#define PCXE_EVENT_HANGUP 1
-
-struct channel {
- u_char unit; /* board unit number */
- u_char omodem; /* FEP output modem status */
- u_char imodem; /* FEP input modem status */
- u_char modemfake; /* Modem values to be forced */
- u_char modem; /* Force values */
- u_char hflow;
- u_char dsr;
- u_char dcd;
- u_char stopc;
- u_char startc;
- u_char stopca;
- u_char startca;
- u_char fepstopc;
- u_char fepstartc;
- u_char fepstopca;
- u_char fepstartca;
- u_char txwin;
- u_char rxwin;
- ushort fepiflag;
- ushort fepcflag;
- ushort fepoflag;
- ushort txbufhead;
- ushort txbufsize;
- ushort rxbufhead;
- ushort rxbufsize;
- int close_delay;
- int count;
- int blocked_open;
- int event;
- int asyncflags;
- uint dev;
- long session;
- long pgrp;
- u_long statusflags;
- u_long c_iflag;
- u_long c_cflag;
- u_long c_lflag;
- u_long c_oflag;
- u_char *txptr;
- u_char *rxptr;
- struct board_info *board;
- struct board_chan *brdchan;
- struct digi_struct digiext;
- struct tty *tty;
- struct termios normal_termios;
- struct termios callout_termios;
- volatile struct global_data *mailbox;
-};
-
-/* flags for configuring */
-
-#define DGBFLAG_ALTPIN 0x0001 /* chande DCD and DCD */
-#define DGBFLAG_NOWIN 0x0002 /* use windowed PC/Xe as non-windowed */
-
-#define DB_RD 0x0001
-#define DB_WR 0x0002
-#define DB_WIN 0x0004
-#define DB_INFO 0x0008
-#define DB_EXCEPT 0x0010
-#define DB_OPEN 0x0100
-#define DB_CLOSE 0x0200
-#define DB_DATA 0x0400
-#define DB_RXDATA 0x0401
-#define DB_TXDATA 0x0402
-#define DB_EVENT 0x0800
-#define DB_MODEM 0x1000
-#define DB_BREAK 0x2000
-#define DB_PARAM 0x4000
-#define DB_FEP 0x8000
-
-/* debugging printout */
-
-#ifdef DEBUG
-#define DPRINT1(l,a1) (dgmdebug&l ? printf(a1) : 0)
-#define DPRINT2(l,a1,a2) (dgmdebug&l ? printf(a1,a2) : 0)
-#define DPRINT3(l,a1,a2,a3) (dgmdebug&l ? printf(a1,a2,a3) : 0)
-#define DPRINT4(l,a1,a2,a3,a4) (dgmdebug&l ? printf(a1,a2,a3,a4) : 0)
-#define DPRINT5(l,a1,a2,a3,a4,a5) (dgmdebug&l ? printf(a1,a2,a3,a4,a5) : 0)
-#define DPRINT6(l,a1,a2,a3,a4,a5,a6) (dgmdebug&l ? printf(a1,a2,a3,a4,a5,a6) : 0)
-#define DPRINT7(l,a1,a2,a3,a4,a5,a6,a7) (dgmdebug&l ? printf(a1,a2,a3,a4,a5,a6,a7) : 0)
-#else
-#define DPRINT1(l,a1)
-#define DPRINT2(l,a1,a2)
-#define DPRINT3(l,a1,a2,a3)
-#define DPRINT4(l,a1,a2,a3,a4)
-#define DPRINT5(l,a1,a2,a3,a4,a5)
-#define DPRINT6(l,a1,a2,a3,a4,a5,a6)
-#define DPRINT7(l,a1,a2,a3,a4,a5,a6,a7)
-#endif
-
-
- /* These are termios bits as the FEP understands them */
-
-/* c_cflag bits */
-#define FEP_CBAUD 0x00000f
-#define FEP_B0 0x000000 /* hang up */
-#define FEP_B50 0x000001
-#define FEP_B75 0x000002
-#define FEP_B110 0x000003
-#define FEP_B134 0x000004
-#define FEP_B150 0x000005
-#define FEP_B200 0x000006
-#define FEP_B300 0x000007
-#define FEP_B600 0x000008
-#define FEP_B1200 0x000009
-#define FEP_B1800 0x00000a
-#define FEP_B2400 0x00000b
-#define FEP_B4800 0x00000c
-#define FEP_B9600 0x00000d
-#define FEP_B19200 0x00000e
-#define FEP_B38400 0x00000f
-#define FEP_EXTA FEP_B19200
-#define FEP_EXTB FEP_B38400
-#define FEP_CSIZE 0x000030
-#define FEP_CS5 0x000000
-#define FEP_CS6 0x000010
-#define FEP_CS7 0x000020
-#define FEP_CS8 0x000030
-#define FEP_CSTOPB 0x000040
-#define FEP_CREAD 0x000080
-#define FEP_PARENB 0x000100
-#define FEP_PARODD 0x000200
-#define FEP_CLOCAL 0x000800
-#define FEP_FASTBAUD 0x000400
-/* c_iflag bits */
-#define FEP_IGNBRK 0000001
-#define FEP_BRKINT 0000002
-#define FEP_IGNPAR 0000004
-#define FEP_PARMRK 0000010
-#define FEP_INPCK 0000020
-#define FEP_ISTRIP 0000040
-#define FEP_IXON 0002000
-#define FEP_IXANY 0004000
-#define FEP_IXOFF 0010000
diff --git a/sys/gnu/i386/isa/dgreg.h b/sys/gnu/i386/isa/dgreg.h
deleted file mode 100644
index 73c2962..0000000
--- a/sys/gnu/i386/isa/dgreg.h
+++ /dev/null
@@ -1,424 +0,0 @@
-/*-
- * dgreg.h $FreeBSD$
- *
- * Digiboard driver.
- *
- * Stage 1. "Better than nothing".
- *
- * Based on sio driver by Bruce Evans and on Linux driver by Troy
- * De Jongh <troyd@digibd.com> or <troyd@skypoint.com>
- * which is under GNU General Public License version 2 so this driver
- * is forced to be under GPL 2 too.
- *
- * Written by Serge Babkin,
- * Joint Stock Commercial Bank "Chelindbank"
- * (Chelyabinsk, Russia)
- * babkin@hq.icb.chel.su
- */
-
-#define MAX_DGB_PORTS 32
-
-/* digi.h */
-/* Definitions for DigiBoard ditty(1) command. */
-
-#if !defined(TIOCMODG)
-#define TIOCMODG ('d'<<8) | 250 /* get modem ctrl state */
-#define TIOCMODS ('d'<<8) | 251 /* set modem ctrl state */
-#endif
-
-#if !defined(TIOCMSET)
-#define TIOCMSET ('d'<<8) | 252 /* set modem ctrl state */
-#define TIOCMGET ('d'<<8) | 253 /* set modem ctrl state */
-#endif
-
-#if !defined(TIOCMBIC)
-#define TIOCMBIC ('d'<<8) | 254 /* set modem ctrl state */
-#define TIOCMBIS ('d'<<8) | 255 /* set modem ctrl state */
-#endif
-
-#if !defined(TIOCSDTR)
-#define TIOCSDTR ('e'<<8) | 0 /* set DTR */
-#define TIOCCDTR ('e'<<8) | 1 /* clear DTR */
-#endif
-
-/************************************************************************
- * Ioctl command arguments for DIGI parameters.
- ************************************************************************/
-#define DIGI_GETA ('e'<<8) | 94 /* Read params */
-
-#define DIGI_SETA ('e'<<8) | 95 /* Set params */
-#define DIGI_SETAW ('e'<<8) | 96 /* Drain & set params */
-#define DIGI_SETAF ('e'<<8) | 97 /* Drain, flush & set params */
-
-#define DIGI_GETFLOW ('e'<<8) | 99 /* Get startc/stopc flow */
- /* control characters */
-#define DIGI_SETFLOW ('e'<<8) | 100 /* Set startc/stopc flow */
- /* control characters */
-#define DIGI_GETAFLOW ('e'<<8) | 101 /* Get Aux. startc/stopc */
- /* flow control chars */
-#define DIGI_SETAFLOW ('e'<<8) | 102 /* Set Aux. startc/stopc */
- /* flow control chars */
-
-struct digiflow_struct {
- unsigned char startc; /* flow cntl start char */
- unsigned char stopc; /* flow cntl stop char */
-};
-
-typedef struct digiflow_struct digiflow_t;
-
-
-/************************************************************************
- * Values for digi_flags
- ************************************************************************/
-#define DIGI_IXON 0x0001 /* Handle IXON in the FEP */
-#define DIGI_FAST 0x0002 /* Fast baud rates */
-#define RTSPACE 0x0004 /* RTS input flow control */
-#define CTSPACE 0x0008 /* CTS output flow control */
-#define DSRPACE 0x0010 /* DSR output flow control */
-#define DCDPACE 0x0020 /* DCD output flow control */
-#define DTRPACE 0x0040 /* DTR input flow control */
-#define DIGI_FORCEDCD 0x0100 /* Force carrier */
-#define DIGI_ALTPIN 0x0200 /* Alternate RJ-45 pin config */
-#define DIGI_AIXON 0x0400 /* Aux flow control in fep */
-
-
-/************************************************************************
- * Structure used with ioctl commands for DIGI parameters.
- ************************************************************************/
-struct digi_struct {
- unsigned short digi_flags; /* Flags (see above) */
-};
-
-typedef struct digi_struct digi_t;
-
-/* fep.h */
-
-#define FEP_CSTART 0x400L
-#define FEP_CMAX 0x800L
-#define FEP_ISTART 0x800L
-#define FEP_IMAX 0xC00L
-#define FEP_CIN 0xD10L
-#define FEP_GLOBAL 0xD10L
-#define FEP_EIN 0xD18L
-#define FEPSTAT 0xD20L
-#define CHANSTRUCT 0x1000L
-#define RXTXBUF 0x4000L
-
-
-struct global_data {
- volatile ushort cin;
- volatile ushort cout;
- volatile ushort cstart;
- volatile ushort cmax;
- volatile ushort ein;
- volatile ushort eout;
- volatile ushort istart;
- volatile ushort imax;
-};
-
-
-struct board_chan {
- int filler1;
- int filler2;
- volatile ushort tseg;
- volatile ushort tin;
- volatile ushort tout;
- volatile ushort tmax;
-
- volatile ushort rseg;
- volatile ushort rin;
- volatile ushort rout;
- volatile ushort rmax;
-
- volatile ushort tlow;
- volatile ushort rlow;
- volatile ushort rhigh;
- volatile ushort incr;
-
- volatile ushort etime;
- volatile ushort edelay;
- volatile u_char *dev;
-
- volatile ushort iflag;
- volatile ushort oflag;
- volatile ushort cflag;
- volatile ushort gmask;
-
- volatile ushort col;
- volatile ushort delay;
- volatile ushort imask;
- volatile ushort tflush;
-
- int filler3;
- int filler4;
- int filler5;
- int filler6;
-
- volatile u_char num;
- volatile u_char ract;
- volatile u_char bstat;
- volatile u_char tbusy;
- volatile u_char iempty;
- volatile u_char ilow;
- volatile u_char idata;
- volatile u_char eflag;
-
- volatile u_char tflag;
- volatile u_char rflag;
- volatile u_char xmask;
- volatile u_char xval;
- volatile u_char mstat;
- volatile u_char mchange;
- volatile u_char mint;
- volatile u_char lstat;
-
- volatile u_char mtran;
- volatile u_char orun;
- volatile u_char startca;
- volatile u_char stopca;
- volatile u_char startc;
- volatile u_char stopc;
- volatile u_char vnext;
- volatile u_char hflow;
-
- volatile u_char fillc;
- volatile u_char ochar;
- volatile u_char omask;
-
- u_char filler7;
- u_char filler8[28];
-};
-
-
-#define SRXLWATER 0xE0
-#define SRXHWATER 0xE1
-#define STOUT 0xE2
-#define PAUSETX 0xE3
-#define RESUMETX 0xE4
-#define SAUXONOFFC 0xE6
-#define SENDBREAK 0xE8
-#define SETMODEM 0xE9
-#define SETIFLAGS 0xEA
-#define SONOFFC 0xEB
-#define STXLWATER 0xEC
-#define PAUSERX 0xEE
-#define RESUMERX 0xEF
-#define SETBUFFER 0xF2
-#define SETCOOKED 0xF3
-#define SETHFLOW 0xF4
-#define SETCTRLFLAGS 0xF5
-#define SETVNEXT 0xF6
-
-
-
-#define BREAK_IND 0x01
-#define LOWTX_IND 0x02
-#define EMPTYTX_IND 0x04
-#define DATA_IND 0x08
-#define MODEMCHG_IND 0x20
-
-#define ALL_IND (BREAK_IND|LOWTX_IND|EMPTYTX_IND|DATA_IND|MODEMCHG_IND)
-
-
-#define RTS 0x02
-#define CD 0x08
-#define DSR 0x10
-#define CTS 0x20
-#define RI 0x40
-#define DTR 0x80
-
-/* pcxx.h */
-
-#define FEPCODESEG 0x0200L
-#define FEPCODE 0x2000L
-#define BIOSCODE 0xf800L
-
-#define MISCGLOBAL 0x0C00L
-#define NPORT 0x0C22L
-#define MBOX 0x0C40L
-#define PORTBASE 0x0C90L
-#define BOTWIN 0x100L
-#define TOPWIN 0xFF00L
-
-#define FEPCLR 0x00
-#define FEPMEM 0x02
-#define FEPRST 0x04
-#define FEPINT 0x08
-#define FEPMASK 0x0e
-#define FEPWIN 0x80
-
-#define PCXI 0
-#define PCXE 1
-#define PCXEVE 2
-
-static char * const board_desc[] = {
- "PC/Xi (64K)",
- "PC/Xe (64K)",
- "PC/Xe (8K) ",
-};
-
-#define STARTC 021
-#define STOPC 023
-#define IAIXON 0x2000
-
-
-struct board_info {
- u_char status;
- u_char type;
- u_char altpin;
- ushort numports;
- ushort port;
- u_long membase;
-};
-
-
-#define TXSTOPPED 0x1
-#define LOWWAIT 0x2
-#define EMPTYWAIT 0x4
-
-#define DISABLED 0
-#define ENABLED 1
-#define OFF 0
-#define ON 1
-
-#define FEPTIMEOUT 200000
-#define SERIAL_TYPE_NORMAL 1
-#define SERIAL_TYPE_CALLOUT 2
-#define PCXE_EVENT_HANGUP 1
-
-struct channel {
- u_char unit; /* board unit number */
- u_char omodem; /* FEP output modem status */
- u_char imodem; /* FEP input modem status */
- u_char modemfake; /* Modem values to be forced */
- u_char modem; /* Force values */
- u_char hflow;
- u_char dsr;
- u_char dcd;
- u_char stopc;
- u_char startc;
- u_char stopca;
- u_char startca;
- u_char fepstopc;
- u_char fepstartc;
- u_char fepstopca;
- u_char fepstartca;
- u_char txwin;
- u_char rxwin;
- ushort fepiflag;
- ushort fepcflag;
- ushort fepoflag;
- ushort txbufhead;
- ushort txbufsize;
- ushort rxbufhead;
- ushort rxbufsize;
- int close_delay;
- int count;
- int blocked_open;
- int event;
- int asyncflags;
- uint dev;
- long session;
- long pgrp;
- u_long statusflags;
- u_long c_iflag;
- u_long c_cflag;
- u_long c_lflag;
- u_long c_oflag;
- u_char *txptr;
- u_char *rxptr;
- struct board_info *board;
- struct board_chan *brdchan;
- struct digi_struct digiext;
- struct tty *tty;
- struct termios normal_termios;
- struct termios callout_termios;
- volatile struct global_data *mailbox;
-};
-
-/* flags for configuring */
-
-#define DGBFLAG_ALTPIN 0x0001 /* chande DCD and DCD */
-#define DGBFLAG_NOWIN 0x0002 /* use windowed PC/Xe as non-windowed */
-
-#define DB_RD 0x0001
-#define DB_WR 0x0002
-#define DB_WIN 0x0004
-#define DB_INFO 0x0008
-#define DB_EXCEPT 0x0010
-#define DB_OPEN 0x0100
-#define DB_CLOSE 0x0200
-#define DB_DATA 0x0400
-#define DB_RXDATA 0x0401
-#define DB_TXDATA 0x0402
-#define DB_EVENT 0x0800
-#define DB_MODEM 0x1000
-#define DB_BREAK 0x2000
-#define DB_PARAM 0x4000
-#define DB_FEP 0x8000
-
-/* debugging printout */
-
-#ifdef DGB_DEBUG
-#define DPRINT1(l,a1) (dgbdebug&l ? printf(a1) : 0)
-#define DPRINT2(l,a1,a2) (dgbdebug&l ? printf(a1,a2) : 0)
-#define DPRINT3(l,a1,a2,a3) (dgbdebug&l ? printf(a1,a2,a3) : 0)
-#define DPRINT4(l,a1,a2,a3,a4) (dgbdebug&l ? printf(a1,a2,a3,a4) : 0)
-#define DPRINT5(l,a1,a2,a3,a4,a5) (dgbdebug&l ? printf(a1,a2,a3,a4,a5) : 0)
-#define DPRINT6(l,a1,a2,a3,a4,a5,a6) (dgbdebug&l ? printf(a1,a2,a3,a4,a5,a6) : 0)
-#define DPRINT7(l,a1,a2,a3,a4,a5,a6,a7) (dgbdebug&l ? printf(a1,a2,a3,a4,a5,a6,a7) : 0)
-#else
-#define DPRINT1(l,a1)
-#define DPRINT2(l,a1,a2)
-#define DPRINT3(l,a1,a2,a3)
-#define DPRINT4(l,a1,a2,a3,a4)
-#define DPRINT5(l,a1,a2,a3,a4,a5)
-#define DPRINT6(l,a1,a2,a3,a4,a5,a6)
-#define DPRINT7(l,a1,a2,a3,a4,a5,a6,a7)
-#endif
-
-
- /* These are termios bits as the FEP understands them */
-
-/* c_cflag bits */
-#define FEP_CBAUD 0x00000f
-#define FEP_B0 0x000000 /* hang up */
-#define FEP_B50 0x000001
-#define FEP_B75 0x000002
-#define FEP_B110 0x000003
-#define FEP_B134 0x000004
-#define FEP_B150 0x000005
-#define FEP_B200 0x000006
-#define FEP_B300 0x000007
-#define FEP_B600 0x000008
-#define FEP_B1200 0x000009
-#define FEP_B1800 0x00000a
-#define FEP_B2400 0x00000b
-#define FEP_B4800 0x00000c
-#define FEP_B9600 0x00000d
-#define FEP_B19200 0x00000e
-#define FEP_B38400 0x00000f
-#define FEP_EXTA FEP_B19200
-#define FEP_EXTB FEP_B38400
-#define FEP_CSIZE 0x000030
-#define FEP_CS5 0x000000
-#define FEP_CS6 0x000010
-#define FEP_CS7 0x000020
-#define FEP_CS8 0x000030
-#define FEP_CSTOPB 0x000040
-#define FEP_CREAD 0x000080
-#define FEP_PARENB 0x000100
-#define FEP_PARODD 0x000200
-#define FEP_CLOCAL 0x000800
-#define FEP_FASTBAUD 0x000400
-/* c_iflag bits */
-#define FEP_IGNBRK 0000001
-#define FEP_BRKINT 0000002
-#define FEP_IGNPAR 0000004
-#define FEP_PARMRK 0000010
-#define FEP_INPCK 0000020
-#define FEP_ISTRIP 0000040
-#define FEP_IXON 0002000
-#define FEP_IXANY 0004000
-#define FEP_IXOFF 0010000
-
diff --git a/sys/gnu/i386/isa/sound/awe_compat.h b/sys/gnu/i386/isa/sound/awe_compat.h
deleted file mode 100644
index c2b0ee5..0000000
--- a/sys/gnu/i386/isa/sound/awe_compat.h
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * sound/awe_compat.h
- *
- * Compat defines for the AWE32/Sound Blaster 32 wave table synth. driver
- * version 0.4.2c; Oct. 7, 1997
- *
- * Copyright (C) 1996,1997 Takashi Iwai
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-/*----------------------------------------------------------------
- * compatibility macros for AWE32 driver
- *----------------------------------------------------------------*/
-
-/* redefine following macros */
-#undef IOCTL_IN
-#undef IOCTL_OUT
-#undef OUTW
-#undef COPY_FROM_USER
-#undef COPY_TO_USER
-#undef GET_BYTE_FROM_USER
-#undef GET_SHORT_FROM_USER
-#undef IOCTL_TO_USER
-
-#ifdef linux
-
-/*================================================================
- * Linux macros
- *================================================================*/
-
-/* use inline prefix */
-#define INLINE inline
-
-/*----------------------------------------------------------------
- * memory management for linux
- *----------------------------------------------------------------*/
-
-#ifdef AWE_OBSOLETE_VOXWARE
-/* old type linux system */
-
-/* i/o requests; nothing */
-#define awe_check_port() 0 /* always false */
-#define awe_request_region() /* nothing */
-#define awe_release_region() /* nothing */
-
-static int _mem_start; /* memory pointer for permanent buffers */
-
-#define my_malloc_init(memptr) _mem_start = (memptr)
-#define my_malloc_memptr() _mem_start
-#define my_free(ptr) /* do nothing */
-#define my_realloc(buf,oldsize,size) NULL /* no realloc */
-
-static void *my_malloc(int size)
-{
- char *ptr;
- PERMANENT_MALLOC(ptr, char*, size, _mem_start);
- return (void*)ptr;
-}
-
-/* allocate buffer only once */
-#define INIT_TABLE(buffer,index,nums,type) {\
-buffer = my_malloc(sizeof(type) * (nums)); index = (nums);\
-}
-
-#else
-
-#define AWE_DYNAMIC_BUFFER
-
-#define my_malloc_init(ptr) /* nothing */
-#define my_malloc_memptr() 0
-#define my_malloc(size) vmalloc(size)
-#define my_free(ptr) if (ptr) {vfree(ptr);}
-
-static void *my_realloc(void *buf, int oldsize, int size)
-{
- void *ptr;
- if ((ptr = vmalloc(size)) == NULL)
- return NULL;
- memcpy(ptr, buf, ((oldsize < size) ? oldsize : size) );
- vfree(buf);
- return ptr;
-}
-
-/* do not allocate buffer at beginning */
-#define INIT_TABLE(buffer,index,nums,type) {buffer=NULL; index=0;}
-
-/* old type macro */
-#define RET_ERROR(err) -err
-
-#endif
-
-/*----------------------------------------------------------------
- * i/o interfaces for linux
- *----------------------------------------------------------------*/
-
-#define OUTW(data,addr) outw(data, addr)
-
-#ifdef AWE_NEW_KERNEL_INTERFACE
-#define COPY_FROM_USER(target,source,offs,count) \
- copy_from_user(target, (source)+(offs), count)
-#define GET_BYTE_FROM_USER(target,addr,offs) \
- get_user(target, (unsigned char*)&((addr)[offs]))
-#define GET_SHORT_FROM_USER(target,addr,offs) \
- get_user(target, (unsigned short*)&((addr)[offs]))
-#ifdef AWE_OSS38
-#define IOCTL_TO_USER(target,offs,source,count) \
- memcpy(target, (source)+(offs), count)
-#define IO_WRITE_CHECK(cmd) (_SIOC_DIR(cmd) & _IOC_WRITE)
-#else
-#define IOCTL_TO_USER(target,offs,source,count) \
- copy_to_user(target, (source)+(offs), count)
-#define IO_WRITE_CHECK(cmd) (_IOC_DIR(cmd) & _IOC_WRITE)
-#endif /* AWE_OSS38 */
-#define COPY_TO_USER IOCTL_TO_USER
-#define IOCTL_IN(arg) (*(int*)(arg))
-#define IOCTL_OUT(arg,val) (*(int*)(arg) = (val))
-
-#else /* old type i/o */
-#define COPY_FROM_USER(target,source,offs,count) \
- memcpy_fromfs(target, (source)+(offs), (count))
-#define GET_BYTE_FROM_USER(target,addr,offs) \
- *((char *)&(target)) = get_fs_byte((addr)+(offs))
-#define GET_SHORT_FROM_USER(target,addr,offs) \
- *((short *)&(target)) = get_fs_word((addr)+(offs))
-#define IOCTL_TO_USER(target,offs,source,count) \
- memcpy_tofs(target, (source)+(offs), (count))
-#define COPY_TO_USER IOCTL_TO_USER
-#define IO_WRITE_CHECK(cmd) (cmd & IOC_IN)
-#define IOCTL_IN(arg) get_fs_long((long *)(arg))
-#define IOCTL_OUT(arg,ret) snd_ioctl_return((int *)arg, ret)
-
-#endif /* AWE_NEW_KERNEL_INTERFACE */
-
-#define BZERO(target,len) memset(target, 0, len)
-#define MEMCPY(dst,src,len) memcpy(dst, src, len)
-
-
-#elif defined(__FreeBSD__)
-
-/*================================================================
- * FreeBSD macros
- *================================================================*/
-
-/* inline is not checked yet.. maybe it'll work */
-#define INLINE /*inline*/
-
-/*----------------------------------------------------------------
- * memory management for freebsd
- *----------------------------------------------------------------*/
-
-/* i/o requests; nothing */
-#define awe_check_port() 0 /* always false */
-#define awe_request_region() /* nothing */
-#define awe_release_region() /* nothing */
-
-#define AWE_DYNAMIC_BUFFER
-
-#define my_malloc_init(ptr) /* nothing */
-#define my_malloc_memptr() 0
-#define my_malloc(size) malloc(size, M_TEMP, M_WAITOK)
-#define my_free(ptr) if (ptr) {free(ptr, M_TEMP);}
-
-#define INIT_TABLE(buffer,index,nums,type) {buffer=NULL; index=0;}
-
-/* it should be realloc? */
-static void *my_realloc(void *buf, int oldsize, int size)
-{
- void *ptr;
- if ((ptr = my_malloc(size)) == NULL)
- return NULL;
- memcpy(ptr, buf, ((oldsize < size) ? oldsize : size) );
- my_free(buf);
- return ptr;
-}
-
-/*----------------------------------------------------------------
- * i/o interfaces for freebsd
- *----------------------------------------------------------------*/
-
-/* according to linux rule; the arguments are swapped */
-#define OUTW(data,addr) outw(addr, data)
-
-#define COPY_FROM_USER(target,source,offs,count) \
- uiomove(((caddr_t)(target)),(count),((struct uio *)(source)))
-#define COPY_TO_USER(target,source,offs,count) \
- uiomove(((caddr_t)(source)),(count),((struct uio *)(target)))
-#define GET_BYTE_FROM_USER(target,addr,offs) \
- uiomove(((char*)&(target)), 1, ((struct uio *)(addr)))
-#define GET_SHORT_FROM_USER(target,addr,offs) \
- uiomove(((char*)&(target)), 2, ((struct uio *)(addr)))
-#define IOCTL_TO_USER(target,offs,source,count) \
- memcpy(&((target)[offs]), (source), (count))
-#define IO_WRITE_CHECK(cmd) (cmd & IOC_IN)
-#define IOCTL_IN(arg) (*(int*)(arg))
-#define IOCTL_OUT(arg,val) (*(int*)(arg) = (val))
-#define BZERO(target,len) bzero((caddr_t)target, len)
-#define MEMCPY(dst,src,len) bcopy((caddr_t)src, (caddr_t)dst, len)
-
-#ifndef AWE_OBSOLETE_VOXWARE
-# define printk printf
-# define RET_ERROR(err) -err
-#endif
-
-#endif
-
diff --git a/sys/gnu/i386/isa/sound/awe_config.h b/sys/gnu/i386/isa/sound/awe_config.h
deleted file mode 100644
index 70efaac..0000000
--- a/sys/gnu/i386/isa/sound/awe_config.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * sound/awe_config.h
- *
- * Configuration of AWE32 sound driver
- * version 0.4.2; Sep. 15, 1997
- *
- * Copyright (C) 1996 Takashi Iwai
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef AWE_CONFIG_H_DEF
-#define AWE_CONFIG_H_DEF
-
-/*----------------------------------------------------------------
- * system configuration
- *----------------------------------------------------------------*/
-
-/* if you're using obsolete VoxWare 3.0.x on Linux 1.2.x (or pre-Voxware 3.5
- * versions of FreeBSD), define the following line.
- */
-#undef AWE_OBSOLETE_VOXWARE
-
-/* if you're using OSS-Lite on Linux 2.1.6 or later, define the
- * following line.
- */
-#undef AWE_NEW_KERNEL_INTERFACE
-
-/* if you have lowlevel.h in the lowlevel directory (OSS-Lite), define
- * the following line.
- */
-#undef HAS_LOWLEVEL_H
-
-/* if your system doesn't support patch manager (OSS 3.7 or newer),
- * define the following line.
- */
-#undef AWE_NO_PATCHMGR
-
-/* if your system has an additional parameter (OSS 3.8b5 or newer),
- * define this.
- */
-#undef AWE_OSS38
-
-/*----------------------------------------------------------------
- * AWE32 card configuration:
- * uncomment the following lines only when auto detection doesn't
- * work properly on your machine.
- *----------------------------------------------------------------*/
-
-/*#define AWE_DEFAULT_BASE_ADDR 0x620*/ /* base port address */
-/*#define AWE_DEFAULT_MEM_SIZE 512*/ /* kbytes */
-
-
-/*----------------------------------------------------------------
- * maximum size of soundfont list table:
- * you usually don't need to touch this value.
- *----------------------------------------------------------------*/
-
-#define AWE_MAX_SF_LISTS 16
-
-
-/*----------------------------------------------------------------
- * chunk size of sample and voice tables:
- * you usually don't need to touch these values.
- *----------------------------------------------------------------*/
-
-#define AWE_MAX_SAMPLES 400
-#define AWE_MAX_INFOS 800
-
-
-/*----------------------------------------------------------------
- * chorus & reverb effects send for FM chip: from 0 to 0xff
- * larger numbers often cause weird sounds.
- *----------------------------------------------------------------*/
-
-#define DEF_FM_CHORUS_DEPTH 0x10
-#define DEF_FM_REVERB_DEPTH 0x10
-
-
-/*----------------------------------------------------------------*
- * other compile conditions
- *----------------------------------------------------------------*/
-
-/* initialize FM passthrough even without extended RAM */
-#undef AWE_ALWAYS_INIT_FM
-
-/* debug on */
-#define AWE_DEBUG_ON
-
-/* GUS compatible mode */
-#define AWE_HAS_GUS_COMPATIBILITY
-
-/* accept all notes/sounds off controls */
-#define AWE_ACCEPT_ALL_SOUNDS_CONTROL
-
-/* add mixer control of emu8000 equalizer */
-#define CONFIG_AWE32_MIXER
-
-/* look up voices according to MIDI channel priority */
-#define AWE_LOOKUP_MIDI_PRIORITY
-
-/*----------------------------------------------------------------*/
-
-/* reading configuration of sound driver */
-
-#ifdef AWE_OBSOLETE_VOXWARE
-
-#ifdef __FreeBSD__
-# include <i386/isa/sound/sound_config.h>
-#else
-# include "sound_config.h"
-#endif
-
-#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_AWE32)
-#define CONFIG_AWE32_SYNTH
-#endif
-
-#else /* AWE_OBSOLETE_VOXWARE */
-
-#ifdef HAS_LOWLEVEL_H
-#include "lowlevel.h"
-#endif
-
-#ifdef __FreeBSD__
-# include <i386/isa/sound/sound_config.h>
-# if defined(CONFIGURE_SOUNDCARD) && defined(CONFIG_AWE32)
-# define CONFIG_AWE32_SYNTH
-# endif
-#else
-# include "../sound_config.h"
-#endif
-
-
-#endif /* AWE_OBSOLETE_VOXWARE */
-
-
-#endif /* AWE_CONFIG_H_DEF */
diff --git a/sys/gnu/i386/isa/sound/awe_hw.h b/sys/gnu/i386/isa/sound/awe_hw.h
deleted file mode 100644
index 7d0d88e..0000000
--- a/sys/gnu/i386/isa/sound/awe_hw.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * sound/awe_hw.h
- *
- * Access routines and definitions for the low level driver for the
- * AWE32/Sound Blaster 32 wave table synth.
- * version 0.4.2; Sep. 15, 1997
- *
- * Copyright (C) 1996,1997 Takashi Iwai
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef AWE_HW_H_DEF
-#define AWE_HW_H_DEF
-
-/*
- * Emu-8000 control registers
- * name(channel) reg, port
- */
-
-#define awe_cmd_idx(reg,ch) (((reg)<< 5) | (ch))
-
-#define Data0 0x620 /* doubleword r/w */
-#define Data1 0xA20 /* doubleword r/w */
-#define Data2 0xA22 /* word r/w */
-#define Data3 0xE20 /* word r/w */
-#define Pointer 0xE22 /* register pointer r/w */
-
-#define AWE_CPF(ch) awe_cmd_idx(0,ch), Data0 /* DW: current pitch and fractional address */
-#define AWE_PTRX(ch) awe_cmd_idx(1,ch), Data0 /* DW: pitch target and reverb send */
-#define AWE_CVCF(ch) awe_cmd_idx(2,ch), Data0 /* DW: current volume and filter cutoff */
-#define AWE_VTFT(ch) awe_cmd_idx(3,ch), Data0 /* DW: volume and filter cutoff targets */
-#define AWE_PSST(ch) awe_cmd_idx(6,ch), Data0 /* DW: pan send and loop start address */
-#define AWE_CSL(ch) awe_cmd_idx(7,ch), Data0 /* DW: chorus send and loop end address */
-#define AWE_CCCA(ch) awe_cmd_idx(0,ch), Data1 /* DW: Q, control bits, and current address */
-#define AWE_HWCF4 awe_cmd_idx(1,9), Data1 /* DW: config dw 4 */
-#define AWE_HWCF5 awe_cmd_idx(1,10), Data1 /* DW: config dw 5 */
-#define AWE_HWCF6 awe_cmd_idx(1,13), Data1 /* DW: config dw 6 */
-#define AWE_HWCF7 awe_cmd_idx(1,14), Data1 /* DW: config dw 7? (not documented) */
-#define AWE_SMALR awe_cmd_idx(1,20), Data1 /* DW: sound memory address for left read */
-#define AWE_SMARR awe_cmd_idx(1,21), Data1 /* DW: for right read */
-#define AWE_SMALW awe_cmd_idx(1,22), Data1 /* DW: sound memory address for left write */
-#define AWE_SMARW awe_cmd_idx(1,23), Data1 /* DW: for right write */
-#define AWE_SMLD awe_cmd_idx(1,26), Data1 /* W: sound memory left data */
-#define AWE_SMRD awe_cmd_idx(1,26), Data2 /* W: right data */
-#define AWE_WC awe_cmd_idx(1,27), Data2 /* W: sample counter */
-#define AWE_WC_Cmd awe_cmd_idx(1,27)
-#define AWE_WC_Port Data2
-#define AWE_HWCF1 awe_cmd_idx(1,29), Data1 /* W: config w 1 */
-#define AWE_HWCF2 awe_cmd_idx(1,30), Data1 /* W: config w 2 */
-#define AWE_HWCF3 awe_cmd_idx(1,31), Data1 /* W: config w 3 */
-#define AWE_INIT1(ch) awe_cmd_idx(2,ch), Data1 /* W: init array 1 */
-#define AWE_INIT2(ch) awe_cmd_idx(2,ch), Data2 /* W: init array 2 */
-#define AWE_INIT3(ch) awe_cmd_idx(3,ch), Data1 /* W: init array 3 */
-#define AWE_INIT4(ch) awe_cmd_idx(3,ch), Data2 /* W: init array 4 */
-#define AWE_ENVVOL(ch) awe_cmd_idx(4,ch), Data1 /* W: volume envelope delay */
-#define AWE_DCYSUSV(ch) awe_cmd_idx(5,ch), Data1 /* W: volume envelope sustain and decay */
-#define AWE_ENVVAL(ch) awe_cmd_idx(6,ch), Data1 /* W: modulation envelope delay */
-#define AWE_DCYSUS(ch) awe_cmd_idx(7,ch), Data1 /* W: modulation envelope sustain and decay */
-#define AWE_ATKHLDV(ch) awe_cmd_idx(4,ch), Data2 /* W: volume envelope attack and hold */
-#define AWE_LFO1VAL(ch) awe_cmd_idx(5,ch), Data2 /* W: LFO#1 Delay */
-#define AWE_ATKHLD(ch) awe_cmd_idx(6,ch), Data2 /* W: modulation envelope attack and hold */
-#define AWE_LFO2VAL(ch) awe_cmd_idx(7,ch), Data2 /* W: LFO#2 Delay */
-#define AWE_IP(ch) awe_cmd_idx(0,ch), Data3 /* W: initial pitch */
-#define AWE_IFATN(ch) awe_cmd_idx(1,ch), Data3 /* W: initial filter cutoff and attenuation */
-#define AWE_PEFE(ch) awe_cmd_idx(2,ch), Data3 /* W: pitch and filter envelope heights */
-#define AWE_FMMOD(ch) awe_cmd_idx(3,ch), Data3 /* W: vibrato and filter modulation freq */
-#define AWE_TREMFRQ(ch) awe_cmd_idx(4,ch), Data3 /* W: LFO#1 tremolo amount and freq */
-#define AWE_FM2FRQ2(ch) awe_cmd_idx(5,ch), Data3 /* W: LFO#2 vibrato amount and freq */
-
-/* used during detection (returns ROM version?; not documented in ADIP) */
-#define AWE_U1 0xE0, Data3 /* (R)(W) used in initialization */
-#define AWE_U2(ch) 0xC0+(ch), Data3 /* (W)(W) used in init envelope */
-
-
-#define AWE_MAX_VOICES 32
-#define AWE_NORMAL_VOICES 30 /*30&31 are reserved for DRAM refresh*/
-
-#define AWE_MAX_CHANNELS 32 /* max midi channels (must >= voices) */
-#define AWE_MAX_LAYERS AWE_MAX_VOICES /* maximum number of multiple layers */
-
-#define AWE_DRAM_OFFSET 0x200000
-#define AWE_MAX_DRAM_SIZE (28 * 1024) /* 28 MB is max onboard memory */
-
-#define AWE_DEFAULT_ATTENUATION 32 /* 12dB below */
-#define AWE_DEFAULT_MOD_SENSE 18
-
-#endif
diff --git a/sys/gnu/i386/isa/sound/awe_version.h b/sys/gnu/i386/isa/sound/awe_version.h
deleted file mode 100644
index 42013bb..0000000
--- a/sys/gnu/i386/isa/sound/awe_version.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * sound/awe_version.h
- *
- * Version defines for the AWE32/Sound Blaster 32 wave table synth driver.
- * version 0.4.2c; Oct. 7, 1997
- *
- * Copyright (C) 1996,1997 Takashi Iwai
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-/* AWE32 driver version number */
-
-#ifndef AWE_VERSION_H_DEF
-#define AWE_VERSION_H_DEF
-
-#define AWE_VERSION_NUMBER 0x00040203
-#define AWEDRV_VERSION "0.4.2c"
-#define AWE_MAJOR_VERSION(id) (((id) >> 16) & 0xff)
-#define AWE_MINOR_VERSION(id) (((id) >> 8) & 0xff)
-#define AWE_TINY_VERSION(id) ((id) & 0xff)
-
-#endif
diff --git a/sys/gnu/i386/isa/sound/awe_voice.h b/sys/gnu/i386/isa/sound/awe_voice.h
deleted file mode 100644
index aa13131..0000000
--- a/sys/gnu/i386/isa/sound/awe_voice.h
+++ /dev/null
@@ -1,490 +0,0 @@
-/*
- * sound/awe_voice.h
- *
- * Voice information definitions for the low level driver for the
- * AWE32/Sound Blaster 32 wave table synth.
- * version 0.4.2c; Oct. 7, 1997
- *
- * Copyright (C) 1996,1997 Takashi Iwai
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef AWE_VOICE_H
-#define AWE_VOICE_H
-
-#ifndef SAMPLE_TYPE_AWE32
-#define SAMPLE_TYPE_AWE32 0x20
-#endif
-
-#ifndef _PATCHKEY
-#define _PATCHKEY(id) ((id<<8)|0xfd)
-#endif
-
-/*----------------------------------------------------------------
- * patch information record
- *----------------------------------------------------------------*/
-
-/* patch interface header: 16 bytes */
-typedef struct awe_patch_info {
- short key; /* use AWE_PATCH here */
-#define AWE_PATCH _PATCHKEY(0x07)
-
- short device_no; /* synthesizer number */
- unsigned short sf_id; /* file id (should be zero) */
- short optarg; /* optional argument */
- int len; /* data length (without this header) */
-
- short type; /* patch operation type */
-#define AWE_LOAD_INFO 0 /* awe_voice_rec */
-#define AWE_LOAD_DATA 1 /* awe_sample_info */
-#define AWE_OPEN_PATCH 2 /* awe_open_parm */
-#define AWE_CLOSE_PATCH 3 /* none */
-#define AWE_UNLOAD_PATCH 4 /* none */
-#define AWE_REPLACE_DATA 5 /* awe_sample_info (optarg=#channels)*/
-#define AWE_MAP_PRESET 6 /* awe_voice_map */
-#define AWE_LOAD_CHORUS_FX 0x10 /* awe_chorus_fx_rec (optarg=mode) */
-#define AWE_LOAD_REVERB_FX 0x11 /* awe_reverb_fx_rec (optarg=mode) */
-
- short reserved; /* word alignment data */
-
- /* the actual patch data begins after this */
-#if defined(AWE_COMPAT_030) && AWE_COMPAT_030
- char data[0];
-#endif
-} awe_patch_info;
-
-/*#define AWE_PATCH_INFO_SIZE 16*/
-#define AWE_PATCH_INFO_SIZE sizeof(awe_patch_info)
-
-
-/*----------------------------------------------------------------
- * open patch
- *----------------------------------------------------------------*/
-
-#define AWE_PATCH_NAME_LEN 32
-
-typedef struct _awe_open_parm {
- unsigned short type; /* sample type */
-#define AWE_PAT_TYPE_MISC 0
-#define AWE_PAT_TYPE_GM 1
-#define AWE_PAT_TYPE_GS 2
-#define AWE_PAT_TYPE_MT32 3
-#define AWE_PAT_TYPE_XG 4
-#define AWE_PAT_TYPE_SFX 5
-#define AWE_PAT_TYPE_GUS 6
-#define AWE_PAT_TYPE_MAP 7
-
-#define AWE_PAT_LOCKED 0x100 /* lock the samples */
-
- short reserved;
- char name[AWE_PATCH_NAME_LEN];
-} awe_open_parm;
-
-/*#define AWE_OPEN_PARM_SIZE 28*/
-#define AWE_OPEN_PARM_SIZE sizeof(awe_open_parm)
-
-
-/*----------------------------------------------------------------
- * raw voice information record
- *----------------------------------------------------------------*/
-
-/* wave table envelope & effect parameters to control EMU8000 */
-typedef struct _awe_voice_parm {
- unsigned short moddelay; /* modulation delay (0x8000) */
- unsigned short modatkhld; /* modulation attack & hold time (0x7f7f) */
- unsigned short moddcysus; /* modulation decay & sustain (0x7f7f) */
- unsigned short modrelease; /* modulation release time (0x807f) */
- short modkeyhold, modkeydecay; /* envelope change per key (not used) */
- unsigned short voldelay; /* volume delay (0x8000) */
- unsigned short volatkhld; /* volume attack & hold time (0x7f7f) */
- unsigned short voldcysus; /* volume decay & sustain (0x7f7f) */
- unsigned short volrelease; /* volume release time (0x807f) */
- short volkeyhold, volkeydecay; /* envelope change per key (not used) */
- unsigned short lfo1delay; /* LFO1 delay (0x8000) */
- unsigned short lfo2delay; /* LFO2 delay (0x8000) */
- unsigned short pefe; /* modulation pitch & cutoff (0x0000) */
- unsigned short fmmod; /* LFO1 pitch & cutoff (0x0000) */
- unsigned short tremfrq; /* LFO1 volume & freq (0x0000) */
- unsigned short fm2frq2; /* LFO2 pitch & freq (0x0000) */
- unsigned char cutoff; /* initial cutoff (0xff) */
- unsigned char filterQ; /* initial filter Q [0-15] (0x0) */
- unsigned char chorus; /* chorus send (0x00) */
- unsigned char reverb; /* reverb send (0x00) */
- unsigned short reserved[4]; /* not used */
-} awe_voice_parm;
-
-#define AWE_VOICE_PARM_SIZE 48
-
-
-/* wave table parameters: 92 bytes */
-typedef struct _awe_voice_info {
- unsigned short sf_id; /* file id (should be zero) */
- unsigned short sample; /* sample id */
- int start, end; /* sample offset correction */
- int loopstart, loopend; /* loop offset correction */
- short rate_offset; /* sample rate pitch offset */
- unsigned short mode; /* sample mode */
-#define AWE_MODE_ROMSOUND 0x8000
-#define AWE_MODE_STEREO 1
-#define AWE_MODE_LOOPING 2
-#define AWE_MODE_NORELEASE 4 /* obsolete */
-#define AWE_MODE_INIT_PARM 8
-
- short root; /* midi root key */
- short tune; /* pitch tuning (in cents) */
- char low, high; /* key note range */
- char vellow, velhigh; /* velocity range */
- char fixkey, fixvel; /* fixed key, velocity */
- char pan, fixpan; /* panning, fixed panning */
- short exclusiveClass; /* exclusive class (0 = none) */
- unsigned char amplitude; /* sample volume (127 max) */
- unsigned char attenuation; /* attenuation (0.375dB) */
- short scaleTuning; /* pitch scale tuning(%), normally 100 */
- awe_voice_parm parm; /* voice envelope parameters */
- short index; /* internal index (set by driver) */
-} awe_voice_info;
-
-/*#define AWE_VOICE_INFO_SIZE 92*/
-#define AWE_VOICE_INFO_SIZE sizeof(awe_voice_info)
-
-/*----------------------------------------------------------------*/
-
-/* The info entry of awe_voice_rec is changed from 0 to 1
- * for some compilers refusing zero size array.
- * Due to this change, sizeof(awe_voice_rec) becomes different
- * from older versions.
- * Use AWE_VOICE_REC_SIZE instead.
- */
-
-/* instrument info header: 4 bytes */
-typedef struct _awe_voice_rec_hdr {
- unsigned char bank; /* midi bank number */
- unsigned char instr; /* midi preset number */
- char nvoices; /* number of voices */
- char write_mode; /* write mode; normally 0 */
-#define AWE_WR_APPEND 0 /* append anyway */
-#define AWE_WR_EXCLUSIVE 1 /* skip if already exists */
-#define AWE_WR_REPLACE 2 /* replace if already exists */
-} awe_voice_rec_hdr;
-
-/*#define AWE_VOICE_REC_SIZE 4*/
-#define AWE_VOICE_REC_SIZE sizeof(awe_voice_rec_hdr)
-
-/* the standard patch structure for one sample */
-typedef struct _awe_voice_rec_patch {
- awe_patch_info patch;
- awe_voice_rec_hdr hdr;
- awe_voice_info info;
-} awe_voice_rec_patch;
-
-
-/* obsolete data type */
-#if defined(AWE_COMPAT_030) && AWE_COMPAT_030
-#define AWE_INFOARRAY_SIZE 0
-#else
-#define AWE_INFOARRAY_SIZE 1
-#endif
-
-typedef struct _awe_voice_rec {
- unsigned char bank; /* midi bank number */
- unsigned char instr; /* midi preset number */
- short nvoices; /* number of voices */
- /* voice information follows here */
- awe_voice_info info[AWE_INFOARRAY_SIZE];
-} awe_voice_rec;
-
-
-/*----------------------------------------------------------------
- * sample wave information
- *----------------------------------------------------------------*/
-
-/* wave table sample header: 32 bytes */
-typedef struct awe_sample_info {
- unsigned short sf_id; /* file id (should be zero) */
- unsigned short sample; /* sample id */
- int start, end; /* start & end offset */
- int loopstart, loopend; /* loop start & end offset */
- int size; /* size (0 = ROM) */
- short checksum_flag; /* use check sum = 1 */
- unsigned short mode_flags; /* mode flags */
-#define AWE_SAMPLE_8BITS 1 /* wave data is 8bits */
-#define AWE_SAMPLE_UNSIGNED 2 /* wave data is unsigned */
-#define AWE_SAMPLE_NO_BLANK 4 /* no blank loop is attached */
-#define AWE_SAMPLE_SINGLESHOT 8 /* single-shot w/o loop */
-#define AWE_SAMPLE_BIDIR_LOOP 16 /* bidirectional looping */
-#define AWE_SAMPLE_STEREO_LEFT 32 /* stereo left sound */
-#define AWE_SAMPLE_STEREO_RIGHT 64 /* stereo right sound */
-#define AWE_SAMPLE_REVERSE_LOOP 128 /* reverse looping */
- unsigned int checksum; /* check sum */
-#if defined(AWE_COMPAT_030) && AWE_COMPAT_030
- unsigned short data[0]; /* sample data follows here */
-#endif
-} awe_sample_info;
-
-/*#define AWE_SAMPLE_INFO_SIZE 32*/
-#define AWE_SAMPLE_INFO_SIZE sizeof(awe_sample_info)
-
-
-/*----------------------------------------------------------------
- * voice preset mapping
- *----------------------------------------------------------------*/
-
-typedef struct awe_voice_map {
- int map_bank, map_instr, map_key; /* key = -1 means all keys */
- int src_bank, src_instr, src_key;
-} awe_voice_map;
-
-#define AWE_VOICE_MAP_SIZE sizeof(awe_voice_map)
-
-
-/*----------------------------------------------------------------
- * awe hardware controls
- *----------------------------------------------------------------*/
-
-#define _AWE_DEBUG_MODE 0x00
-#define _AWE_REVERB_MODE 0x01
-#define _AWE_CHORUS_MODE 0x02
-#define _AWE_REMOVE_LAST_SAMPLES 0x03
-#define _AWE_INITIALIZE_CHIP 0x04
-#define _AWE_SEND_EFFECT 0x05
-#define _AWE_TERMINATE_CHANNEL 0x06
-#define _AWE_TERMINATE_ALL 0x07
-#define _AWE_INITIAL_VOLUME 0x08
-#define _AWE_INITIAL_ATTEN _AWE_INITIAL_VOLUME
-#define _AWE_RESET_CHANNEL 0x09
-#define _AWE_CHANNEL_MODE 0x0a
-#define _AWE_DRUM_CHANNELS 0x0b
-#define _AWE_MISC_MODE 0x0c
-#define _AWE_RELEASE_ALL 0x0d
-#define _AWE_NOTEOFF_ALL 0x0e
-#define _AWE_CHN_PRESSURE 0x0f
-/*#define _AWE_GET_CURRENT_MODE 0x10*/
-#define _AWE_EQUALIZER 0x11
-/*#define _AWE_GET_MISC_MODE 0x12*/
-/*#define _AWE_GET_FONTINFO 0x13*/
-
-#define _AWE_MODE_FLAG 0x80
-#define _AWE_COOKED_FLAG 0x40 /* not supported */
-#define _AWE_MODE_VALUE_MASK 0x3F
-
-/*----------------------------------------------------------------*/
-
-#define _AWE_SET_CMD(p,dev,voice,cmd,p1,p2) \
-{((char*)(p))[0] = SEQ_PRIVATE;\
- ((char*)(p))[1] = dev;\
- ((char*)(p))[2] = _AWE_MODE_FLAG|(cmd);\
- ((char*)(p))[3] = voice;\
- ((unsigned short*)(p))[2] = p1;\
- ((unsigned short*)(p))[3] = p2;}
-
-/* buffered access */
-#define _AWE_CMD(dev, voice, cmd, p1, p2) \
-{_SEQ_NEEDBUF(8);\
- _AWE_SET_CMD(_seqbuf + _seqbufptr, dev, voice, cmd, p1, p2);\
- _SEQ_ADVBUF(8);}
-
-/* direct access */
-#define _AWE_CMD_NOW(seqfd,dev,voice,cmd,p1,p2) \
-{struct seq_event_rec tmp;\
- _AWE_SET_CMD(&tmp, dev, voice, cmd, p1, p2);\
- ioctl(seqfd, SNDCTL_SEQ_OUTOFBAND, &tmp);}
-
-/*----------------------------------------------------------------*/
-
-/* set debugging mode */
-#define AWE_DEBUG_MODE(dev,p1) _AWE_CMD(dev, 0, _AWE_DEBUG_MODE, p1, 0)
-/* set reverb mode; from 0 to 7 */
-#define AWE_REVERB_MODE(dev,p1) _AWE_CMD(dev, 0, _AWE_REVERB_MODE, p1, 0)
-/* set chorus mode; from 0 to 7 */
-#define AWE_CHORUS_MODE(dev,p1) _AWE_CMD(dev, 0, _AWE_CHORUS_MODE, p1, 0)
-
-/* reset channel */
-#define AWE_RESET_CHANNEL(dev,ch) _AWE_CMD(dev, ch, _AWE_RESET_CHANNEL, 0, 0)
-#define AWE_RESET_CONTROL(dev,ch) _AWE_CMD(dev, ch, _AWE_RESET_CHANNEL, 1, 0)
-
-/* send an effect to all layers */
-#define AWE_SEND_EFFECT(dev,voice,type,value) _AWE_CMD(dev,voice,_AWE_SEND_EFFECT,type,value)
-#define AWE_ADD_EFFECT(dev,voice,type,value) _AWE_CMD(dev,voice,_AWE_SEND_EFFECT,((type)|0x80),value)
-#define AWE_UNSET_EFFECT(dev,voice,type) _AWE_CMD(dev,voice,_AWE_SEND_EFFECT,((type)|0x40),0)
-/* send an effect to a layer */
-#define AWE_SEND_LAYER_EFFECT(dev,voice,layer,type,value) _AWE_CMD(dev,voice,_AWE_SEND_EFFECT,((layer+1)<<8|(type)),value)
-#define AWE_ADD_LAYER_EFFECT(dev,voice,layer,type,value) _AWE_CMD(dev,voice,_AWE_SEND_EFFECT,((layer+1)<<8|(type)|0x80),value)
-#define AWE_UNSET_LAYER_EFFECT(dev,voice,layer,type) _AWE_CMD(dev,voice,_AWE_SEND_EFFECT,((layer+1)<<8|(type)|0x40),0)
-
-/* terminate sound on the channel/voice */
-#define AWE_TERMINATE_CHANNEL(dev,voice) _AWE_CMD(dev,voice,_AWE_TERMINATE_CHANNEL,0,0)
-/* terminate all sounds */
-#define AWE_TERMINATE_ALL(dev) _AWE_CMD(dev, 0, _AWE_TERMINATE_ALL, 0, 0)
-/* release all sounds (w/o sustain effect) */
-#define AWE_RELEASE_ALL(dev) _AWE_CMD(dev, 0, _AWE_RELEASE_ALL, 0, 0)
-/* note off all sounds (w sustain effect) */
-#define AWE_NOTEOFF_ALL(dev) _AWE_CMD(dev, 0, _AWE_NOTEOFF_ALL, 0, 0)
-
-/* set initial attenuation */
-#define AWE_INITIAL_VOLUME(dev,atten) _AWE_CMD(dev, 0, _AWE_INITIAL_VOLUME, atten, 0)
-#define AWE_INITIAL_ATTEN AWE_INITIAL_VOLUME
-/* relative attenuation */
-#define AWE_SET_ATTEN(dev,atten) _AWE_CMD(dev, 0, _AWE_INITIAL_VOLUME, atten, 1)
-
-/* set channel playing mode; mode=0/1/2 */
-#define AWE_SET_CHANNEL_MODE(dev,mode) _AWE_CMD(dev, 0, _AWE_CHANNEL_MODE, mode, 0)
-#define AWE_PLAY_INDIRECT 0 /* indirect voice mode (default) */
-#define AWE_PLAY_MULTI 1 /* multi note voice mode */
-#define AWE_PLAY_DIRECT 2 /* direct single voice mode */
-#define AWE_PLAY_MULTI2 3 /* sequencer2 mode; used internally */
-
-/* set drum channel mask; channels is 32bit long value */
-#define AWE_DRUM_CHANNELS(dev,channels) _AWE_CMD(dev, 0, _AWE_DRUM_CHANNELS, ((channels) & 0xffff), ((channels) >> 16))
-
-/* set bass and treble control; values are from 0 to 11 */
-#define AWE_EQUALIZER(dev,bass,treble) _AWE_CMD(dev, 0, _AWE_EQUALIZER, bass, treble)
-
-/* remove last loaded samples */
-#define AWE_REMOVE_LAST_SAMPLES(seqfd,dev) _AWE_CMD_NOW(seqfd, dev, 0, _AWE_REMOVE_LAST_SAMPLES, 0, 0)
-/* initialize emu8000 chip */
-#define AWE_INITIALIZE_CHIP(seqfd,dev) _AWE_CMD_NOW(seqfd, dev, 0, _AWE_INITIALIZE_CHIP, 0, 0)
-
-/* set miscellaneous modes; meta command */
-#define AWE_MISC_MODE(dev,mode,value) _AWE_CMD(dev, 0, _AWE_MISC_MODE, mode, value)
-/* exclusive sound off; 1=off */
-#define AWE_EXCLUSIVE_SOUND(dev,mode) AWE_MISC_MODE(dev,AWE_MD_EXCLUSIVE_SOUND,mode)
-/* default GUS bank number */
-#define AWE_SET_GUS_BANK(dev,bank) AWE_MISC_MODE(dev,AWE_MD_GUS_BANK,bank)
-/* change panning position in realtime; 0=don't 1=do */
-#define AWE_REALTIME_PAN(dev,mode) AWE_MISC_MODE(dev,AWE_MD_REALTIME_PAN,mode)
-
-/* extended pressure controls; not portable with other sound drivers */
-#define AWE_KEY_PRESSURE(dev,ch,note,vel) SEQ_START_NOTE(dev,ch,(note)+128,vel)
-#define AWE_CHN_PRESSURE(dev,ch,vel) _AWE_CMD(dev,ch,_AWE_CHN_PRESSURE,vel,0)
-
-/*----------------------------------------------------------------*/
-
-/* reverb mode parameters */
-#define AWE_REVERB_ROOM1 0
-#define AWE_REVERB_ROOM2 1
-#define AWE_REVERB_ROOM3 2
-#define AWE_REVERB_HALL1 3
-#define AWE_REVERB_HALL2 4
-#define AWE_REVERB_PLATE 5
-#define AWE_REVERB_DELAY 6
-#define AWE_REVERB_PANNINGDELAY 7
-#define AWE_REVERB_PREDEFINED 8
-/* user can define reverb modes up to 32 */
-#define AWE_REVERB_NUMBERS 32
-
-typedef struct awe_reverb_fx_rec {
- unsigned short parms[28];
-} awe_reverb_fx_rec;
-
-/*----------------------------------------------------------------*/
-
-/* chorus mode parameters */
-#define AWE_CHORUS_1 0
-#define AWE_CHORUS_2 1
-#define AWE_CHORUS_3 2
-#define AWE_CHORUS_4 3
-#define AWE_CHORUS_FEEDBACK 4
-#define AWE_CHORUS_FLANGER 5
-#define AWE_CHORUS_SHORTDELAY 6
-#define AWE_CHORUS_SHORTDELAY2 7
-#define AWE_CHORUS_PREDEFINED 8
-/* user can define chorus modes up to 32 */
-#define AWE_CHORUS_NUMBERS 32
-
-typedef struct awe_chorus_fx_rec {
- unsigned short feedback; /* feedback level (0xE600-0xE6FF) */
- unsigned short delay_offset; /* delay (0-0x0DA3) [1/44100 sec] */
- unsigned short lfo_depth; /* LFO depth (0xBC00-0xBCFF) */
- unsigned int delay; /* right delay (0-0xFFFFFFFF) [1/256/44100 sec] */
- unsigned int lfo_freq; /* LFO freq LFO freq (0-0xFFFFFFFF) */
-} awe_chorus_fx_rec;
-
-/*----------------------------------------------------------------*/
-
-/* misc mode types */
-enum {
-/* 0*/ AWE_MD_EXCLUSIVE_OFF, /* obsolete */
-/* 1*/ AWE_MD_EXCLUSIVE_ON, /* obsolete */
-/* 2*/ AWE_MD_VERSION, /* read only */
-/* 3*/ AWE_MD_EXCLUSIVE_SOUND, /* ignored */
-/* 4*/ AWE_MD_REALTIME_PAN, /* 0/1: do realtime pan change (default=1) */
-/* 5*/ AWE_MD_GUS_BANK, /* bank number for GUS patches (default=0) */
-/* 6*/ AWE_MD_KEEP_EFFECT, /* 0/1: keep effect values, (default=0) */
-/* 7*/ AWE_MD_ZERO_ATTEN, /* attenuation of max volume (default=32) */
-/* 8*/ AWE_MD_CHN_PRIOR, /* 0/1: set MIDI channel priority mode (default=1) */
-/* 9*/ AWE_MD_MOD_SENSE, /* integer: modwheel sensitivity (def=18) */
-/*10*/ AWE_MD_DEF_PRESET, /* integer: default preset number (def=0) */
-/*11*/ AWE_MD_DEF_BANK, /* integer: default bank number (def=0) */
-/*12*/ AWE_MD_DEF_DRUM, /* integer: default drumset number (def=0) */
-/*13*/ AWE_MD_TOGGLE_DRUM_BANK, /* 0/1: toggle drum flag with bank# (def=0) */
- AWE_MD_END,
-};
-
-/*----------------------------------------------------------------*/
-
-/* effect parameters */
-enum {
-
-/* modulation envelope parameters */
-/* 0*/ AWE_FX_ENV1_DELAY, /* WORD: ENVVAL */
-/* 1*/ AWE_FX_ENV1_ATTACK, /* BYTE: up ATKHLD */
-/* 2*/ AWE_FX_ENV1_HOLD, /* BYTE: lw ATKHLD */
-/* 3*/ AWE_FX_ENV1_DECAY, /* BYTE: lw DCYSUS */
-/* 4*/ AWE_FX_ENV1_RELEASE, /* BYTE: lw DCYSUS */
-/* 5*/ AWE_FX_ENV1_SUSTAIN, /* BYTE: up DCYSUS */
-/* 6*/ AWE_FX_ENV1_PITCH, /* BYTE: up PEFE */
-/* 7*/ AWE_FX_ENV1_CUTOFF, /* BYTE: lw PEFE */
-
-/* volume envelope parameters */
-/* 8*/ AWE_FX_ENV2_DELAY, /* WORD: ENVVOL */
-/* 9*/ AWE_FX_ENV2_ATTACK, /* BYTE: up ATKHLDV */
-/*10*/ AWE_FX_ENV2_HOLD, /* BYTE: lw ATKHLDV */
-/*11*/ AWE_FX_ENV2_DECAY, /* BYTE: lw DCYSUSV */
-/*12*/ AWE_FX_ENV2_RELEASE, /* BYTE: lw DCYSUSV */
-/*13*/ AWE_FX_ENV2_SUSTAIN, /* BYTE: up DCYSUSV */
-
-/* LFO1 (tremolo & vibrato) parameters */
-/*14*/ AWE_FX_LFO1_DELAY, /* WORD: LFO1VAL */
-/*15*/ AWE_FX_LFO1_FREQ, /* BYTE: lo TREMFRQ */
-/*16*/ AWE_FX_LFO1_VOLUME, /* BYTE: up TREMFRQ */
-/*17*/ AWE_FX_LFO1_PITCH, /* BYTE: up FMMOD */
-/*18*/ AWE_FX_LFO1_CUTOFF, /* BYTE: lo FMMOD */
-
-/* LFO2 (vibrato) parameters */
-/*19*/ AWE_FX_LFO2_DELAY, /* WORD: LFO2VAL */
-/*20*/ AWE_FX_LFO2_FREQ, /* BYTE: lo FM2FRQ2 */
-/*21*/ AWE_FX_LFO2_PITCH, /* BYTE: up FM2FRQ2 */
-
-/* Other overall effect parameters */
-/*22*/ AWE_FX_INIT_PITCH, /* SHORT: pitch offset */
-/*23*/ AWE_FX_CHORUS, /* BYTE: chorus effects send (0-255) */
-/*24*/ AWE_FX_REVERB, /* BYTE: reverb effects send (0-255) */
-/*25*/ AWE_FX_CUTOFF, /* BYTE: up IFATN */
-/*26*/ AWE_FX_FILTERQ, /* BYTE: up CCCA */
-
-/* Sample / loop offset changes */
-/*27*/ AWE_FX_SAMPLE_START, /* SHORT: offset */
-/*28*/ AWE_FX_LOOP_START, /* SHORT: offset */
-/*29*/ AWE_FX_LOOP_END, /* SHORT: offset */
-/*30*/ AWE_FX_COARSE_SAMPLE_START, /* SHORT: upper word offset */
-/*31*/ AWE_FX_COARSE_LOOP_START, /* SHORT: upper word offset */
-/*32*/ AWE_FX_COARSE_LOOP_END, /* SHORT: upper word offset */
-/*33*/ AWE_FX_ATTEN, /* BYTE: lo IFATN */
-
- AWE_FX_END,
-};
-
-#endif /* AWE_VOICE_H */
diff --git a/sys/gnu/i386/isa/sound/awe_wave.c b/sys/gnu/i386/isa/sound/awe_wave.c
deleted file mode 100644
index 1bffbf5..0000000
--- a/sys/gnu/i386/isa/sound/awe_wave.c
+++ /dev/null
@@ -1,4574 +0,0 @@
-/*
- * sound/awe_wave.c
- *
- * The low level driver for the AWE32/Sound Blaster 32 wave table synth.
- * version 0.4.2c; Oct. 7, 1997
- *
- * Copyright (C) 1996,1997 Takashi Iwai
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <stddef.h>
-
-#ifdef __FreeBSD__
-# include <gnu/i386/isa/sound/awe_config.h>
-#else
-# include "awe_config.h"
-#endif
-
-/*----------------------------------------------------------------*/
-
-#ifdef CONFIG_AWE32_SYNTH
-
-#ifdef __FreeBSD__
-# include <gnu/i386/isa/sound/awe_hw.h>
-# include <gnu/i386/isa/sound/awe_version.h>
-# include <gnu/i386/isa/sound/awe_voice.h>
-#else
-# include "awe_hw.h"
-# include "awe_version.h"
-# include <linux/awe_voice.h>
-#endif
-
-#ifdef AWE_HAS_GUS_COMPATIBILITY
-/* include finetune table */
-
-#ifdef __FreeBSD__
-# ifdef AWE_OBSOLETE_VOXWARE
-# define SEQUENCER_C
-# endif
-# include <i386/isa/sound/tuning.h>
-#else
-# ifdef AWE_OBSOLETE_VOXWARE
-# include "tuning.h"
-# else
-# include "../tuning.h"
-# endif
-#endif
-
-#ifdef linux
-# include <linux/ultrasound.h>
-#elif defined(__FreeBSD__)
-# include <machine/ultrasound.h>
-#endif
-
-#endif /* AWE_HAS_GUS_COMPATIBILITY */
-
-
-/*----------------------------------------------------------------
- * debug message
- *----------------------------------------------------------------*/
-
-static int debug_mode = 0;
-#ifdef AWE_DEBUG_ON
-#define AWE_DEBUG(LVL,XXX) {if (debug_mode > LVL) { XXX; }}
-#define ERRMSG(XXX) {if (debug_mode) { XXX; }}
-#define FATALERR(XXX) XXX
-#else
-#define AWE_DEBUG(LVL,XXX) /**/
-#define ERRMSG(XXX) XXX
-#define FATALERR(XXX) XXX
-#endif
-
-/*----------------------------------------------------------------
- * bank and voice record
- *----------------------------------------------------------------*/
-
-/* soundfont record */
-typedef struct _sf_list {
- unsigned short sf_id;
- unsigned short type;
- int num_info; /* current info table index */
- int num_sample; /* current sample table index */
- int mem_ptr; /* current word byte pointer */
- int infos;
- int samples;
- /*char name[AWE_PATCH_NAME_LEN];*/
-} sf_list;
-
-/* bank record */
-typedef struct _awe_voice_list {
- int next; /* linked list with same sf_id */
- unsigned char bank, instr; /* preset number information */
- char type, disabled; /* type=normal/mapped, disabled=boolean */
- awe_voice_info v; /* voice information */
- int next_instr; /* preset table list */
- int next_bank; /* preset table list */
-} awe_voice_list;
-
-/* voice list type */
-#define V_ST_NORMAL 0
-#define V_ST_MAPPED 1
-
-typedef struct _awe_sample_list {
- int next; /* linked list with same sf_id */
- awe_sample_info v; /* sample information */
-} awe_sample_list;
-
-/* sample and information table */
-static int current_sf_id = 0;
-static int locked_sf_id = 0;
-static int max_sfs;
-static sf_list *sflists = NULL;
-
-#define awe_free_mem_ptr() (current_sf_id <= 0 ? 0 : sflists[current_sf_id-1].mem_ptr)
-#define awe_free_info() (current_sf_id <= 0 ? 0 : sflists[current_sf_id-1].num_info)
-#define awe_free_sample() (current_sf_id <= 0 ? 0 : sflists[current_sf_id-1].num_sample)
-
-static int max_samples;
-static awe_sample_list *samples = NULL;
-
-static int max_infos;
-static awe_voice_list *infos = NULL;
-
-
-#define AWE_MAX_PRESETS 256
-#define AWE_DEFAULT_PRESET 0
-#define AWE_DEFAULT_BANK 0
-#define AWE_DEFAULT_DRUM 0
-#define AWE_DRUM_BANK 128
-
-#define MAX_LAYERS AWE_MAX_VOICES
-
-/* preset table index */
-static int preset_table[AWE_MAX_PRESETS];
-
-/*----------------------------------------------------------------
- * voice table
- *----------------------------------------------------------------*/
-
-/* effects table */
-typedef struct FX_Rec { /* channel effects */
- unsigned char flags[AWE_FX_END];
- short val[AWE_FX_END];
-} FX_Rec;
-
-
-/* channel parameters */
-typedef struct _awe_chan_info {
- int channel; /* channel number */
- int bank; /* current tone bank */
- int instr; /* current program */
- int bender; /* midi pitchbend (-8192 - 8192) */
- int bender_range; /* midi bender range (x100) */
- int panning; /* panning (0-127) */
- int main_vol; /* channel volume (0-127) */
- int expression_vol; /* midi expression (0-127) */
- int chan_press; /* channel pressure */
- int vrec; /* instrument list */
- int def_vrec; /* default instrument list */
- int sustained; /* sustain status in MIDI */
- FX_Rec fx; /* effects */
- FX_Rec fx_layer[MAX_LAYERS]; /* layer effects */
-} awe_chan_info;
-
-/* voice parameters */
-typedef struct _voice_info {
- int state;
-#define AWE_ST_OFF (1<<0) /* no sound */
-#define AWE_ST_ON (1<<1) /* playing */
-#define AWE_ST_STANDBY (1<<2) /* stand by for playing */
-#define AWE_ST_SUSTAINED (1<<3) /* sustained */
-#define AWE_ST_MARK (1<<4) /* marked for allocation */
-#define AWE_ST_DRAM (1<<5) /* DRAM read/write */
-#define AWE_ST_FM (1<<6) /* reserved for FM */
-#define AWE_ST_RELEASED (1<<7) /* released */
-
- int ch; /* midi channel */
- int key; /* internal key for search */
- int layer; /* layer number (for channel mode only) */
- int time; /* allocated time */
- awe_chan_info *cinfo; /* channel info */
-
- int note; /* midi key (0-127) */
- int velocity; /* midi velocity (0-127) */
- int sostenuto; /* sostenuto on/off */
- awe_voice_info *sample; /* assigned voice */
-
- /* EMU8000 parameters */
- int apitch; /* pitch parameter */
- int avol; /* volume parameter */
- int apan; /* panning parameter */
-} voice_info;
-
-/* voice information */
-static voice_info *voices;
-
-#define IS_NO_SOUND(v) (voices[v].state & (AWE_ST_OFF|AWE_ST_RELEASED|AWE_ST_STANDBY|AWE_ST_SUSTAINED))
-#define IS_NO_EFFECT(v) (voices[v].state != AWE_ST_ON)
-#define IS_PLAYING(v) (voices[v].state & (AWE_ST_ON|AWE_ST_SUSTAINED|AWE_ST_RELEASED))
-#define IS_EMPTY(v) (voices[v].state & (AWE_ST_OFF|AWE_ST_MARK|AWE_ST_DRAM|AWE_ST_FM))
-
-
-/* MIDI channel effects information (for hw control) */
-static awe_chan_info *channels;
-
-
-/*----------------------------------------------------------------
- * global variables
- *----------------------------------------------------------------*/
-
-#ifndef AWE_DEFAULT_BASE_ADDR
-#define AWE_DEFAULT_BASE_ADDR 0 /* autodetect */
-#endif
-
-#ifndef AWE_DEFAULT_MEM_SIZE
-#define AWE_DEFAULT_MEM_SIZE 0 /* autodetect */
-#endif
-
-/* awe32 base address (overwritten at initialization) */
-static int awe_base = AWE_DEFAULT_BASE_ADDR;
-/* memory byte size */
-static int awe_mem_size = AWE_DEFAULT_MEM_SIZE;
-/* DRAM start offset */
-static int awe_mem_start = AWE_DRAM_OFFSET;
-
-/* maximum channels for playing */
-static int awe_max_voices = AWE_MAX_VOICES;
-
-static int patch_opened = 0; /* sample already loaded? */
-
-static int reverb_mode = 4; /* reverb mode */
-static int chorus_mode = 2; /* chorus mode */
-static short init_atten = AWE_DEFAULT_ATTENUATION; /* 12dB below */
-
-static int awe_present = FALSE; /* awe device present? */
-static int awe_busy = FALSE; /* awe device opened? */
-
-#define DEFAULT_DRUM_FLAGS ((1 << 9) | (1 << 25))
-#define IS_DRUM_CHANNEL(c) (drum_flags & (1 << (c)))
-#define DRUM_CHANNEL_ON(c) (drum_flags |= (1 << (c)))
-#define DRUM_CHANNEL_OFF(c) (drum_flags &= ~(1 << (c)))
-static unsigned int drum_flags = DEFAULT_DRUM_FLAGS; /* channel flags */
-
-static int playing_mode = AWE_PLAY_INDIRECT;
-#define SINGLE_LAYER_MODE() (playing_mode == AWE_PLAY_INDIRECT || playing_mode == AWE_PLAY_DIRECT)
-#define MULTI_LAYER_MODE() (playing_mode == AWE_PLAY_MULTI || playing_mode == AWE_PLAY_MULTI2)
-
-static int current_alloc_time = 0; /* voice allocation index for channel mode */
-
-static struct MiscModeDef {
- int value;
- int init_each_time;
-} misc_modes_default[AWE_MD_END] = {
- {0,0}, {0,0}, /* <-- not used */
- {AWE_VERSION_NUMBER, FALSE},
- {TRUE, TRUE}, /* exclusive */
- {TRUE, TRUE}, /* realpan */
- {AWE_DEFAULT_BANK, TRUE}, /* gusbank */
- {FALSE, TRUE}, /* keep effect */
- {AWE_DEFAULT_ATTENUATION, FALSE}, /* zero_atten */
- {FALSE, TRUE}, /* chn_prior */
- {AWE_DEFAULT_MOD_SENSE, TRUE}, /* modwheel sense */
- {AWE_DEFAULT_PRESET, TRUE}, /* def_preset */
- {AWE_DEFAULT_BANK, TRUE}, /* def_bank */
- {AWE_DEFAULT_DRUM, TRUE}, /* def_drum */
- {FALSE, TRUE}, /* toggle_drum_bank */
-};
-
-static int misc_modes[AWE_MD_END];
-
-static int awe_bass_level = 5;
-static int awe_treble_level = 9;
-
-
-static struct synth_info awe_info = {
- "AWE32 Synth", /* name */
- 0, /* device */
- SYNTH_TYPE_SAMPLE, /* synth_type */
- SAMPLE_TYPE_AWE32, /* synth_subtype */
- 0, /* perc_mode (obsolete) */
- AWE_MAX_VOICES, /* nr_voices */
- 0, /* nr_drums (obsolete) */
- AWE_MAX_INFOS /* instr_bank_size */
-};
-
-
-static struct voice_alloc_info *voice_alloc; /* set at initialization */
-
-
-/*----------------------------------------------------------------
- * function prototypes
- *----------------------------------------------------------------*/
-
-#if defined(linux) && !defined(AWE_OBSOLETE_VOXWARE)
-static int awe_check_port(void);
-static void awe_request_region(void);
-static void awe_release_region(void);
-#endif
-
-static void awe_reset_samples(void);
-/* emu8000 chip i/o access */
-static void awe_poke(unsigned short cmd, unsigned short port, unsigned short data);
-static void awe_poke_dw(unsigned short cmd, unsigned short port, unsigned int data);
-static unsigned short awe_peek(unsigned short cmd, unsigned short port);
-static unsigned int awe_peek_dw(unsigned short cmd, unsigned short port);
-static void awe_wait(unsigned short delay);
-
-/* initialize emu8000 chip */
-static void awe_initialize(void);
-
-/* set voice parameters */
-static void awe_init_misc_modes(int init_all);
-static void awe_init_voice_info(awe_voice_info *vp);
-static void awe_init_voice_parm(awe_voice_parm *pp);
-#ifdef AWE_HAS_GUS_COMPATIBILITY
-static int freq_to_note(int freq);
-static int calc_rate_offset(int Hz);
-/*static int calc_parm_delay(int msec);*/
-static int calc_parm_hold(int msec);
-static int calc_parm_attack(int msec);
-static int calc_parm_decay(int msec);
-static int calc_parm_search(int msec, short *table);
-#endif
-
-/* turn on/off note */
-static void awe_note_on(int voice);
-static void awe_note_off(int voice);
-static void awe_terminate(int voice);
-static void awe_exclusive_off(int voice);
-static void awe_note_off_all(int do_sustain);
-
-/* calculate voice parameters */
-typedef void (*fx_affect_func)(int voice, int forced);
-static void awe_set_pitch(int voice, int forced);
-static void awe_set_voice_pitch(int voice, int forced);
-static void awe_set_volume(int voice, int forced);
-static void awe_set_voice_vol(int voice, int forced);
-static void awe_set_pan(int voice, int forced);
-static void awe_fx_fmmod(int voice, int forced);
-static void awe_fx_tremfrq(int voice, int forced);
-static void awe_fx_fm2frq2(int voice, int forced);
-static void awe_fx_filterQ(int voice, int forced);
-static void awe_calc_pitch(int voice);
-#ifdef AWE_HAS_GUS_COMPATIBILITY
-static void awe_calc_pitch_from_freq(int voice, int freq);
-#endif
-static void awe_calc_volume(int voice);
-static void awe_voice_init(int voice, int init_all);
-static void awe_channel_init(int ch, int init_all);
-static void awe_fx_init(int ch);
-
-/* sequencer interface */
-static int awe_open(int dev, int mode);
-static void awe_close(int dev);
-static int awe_ioctl(int dev, unsigned int cmd, caddr_t arg);
-static int awe_kill_note(int dev, int voice, int note, int velocity);
-static int awe_start_note(int dev, int v, int note_num, int volume);
-static int awe_set_instr(int dev, int voice, int instr_no);
-static int awe_set_instr_2(int dev, int voice, int instr_no);
-static void awe_reset(int dev);
-static void awe_hw_control(int dev, unsigned char *event);
-static int awe_load_patch(int dev, int format, const char *addr,
- int offs, int count, int pmgr_flag);
-static void awe_aftertouch(int dev, int voice, int pressure);
-static void awe_controller(int dev, int voice, int ctrl_num, int value);
-static void awe_panning(int dev, int voice, int value);
-static void awe_volume_method(int dev, int mode);
-#ifndef AWE_NO_PATCHMGR
-static int awe_patchmgr(int dev, struct patmgr_info *rec);
-#endif
-static void awe_bender(int dev, int voice, int value);
-static int awe_alloc(int dev, int chn, int note, struct voice_alloc_info *alloc);
-static void awe_setup_voice(int dev, int voice, int chn);
-
-/* hardware controls */
-#ifdef AWE_HAS_GUS_COMPATIBILITY
-static void awe_hw_gus_control(int dev, int cmd, unsigned char *event);
-#endif
-static void awe_hw_awe_control(int dev, int cmd, unsigned char *event);
-static void awe_voice_change(int voice, fx_affect_func func);
-static void awe_sostenuto_on(int voice, int forced);
-static void awe_sustain_off(int voice, int forced);
-static void awe_terminate_and_init(int voice, int forced);
-
-/* voice search */
-static int awe_search_instr(int bank, int preset);
-static int awe_search_multi_voices(int rec, int note, int velocity, awe_voice_info **vlist);
-static void awe_alloc_multi_voices(int ch, int note, int velocity, int key);
-static void awe_alloc_one_voice(int voice, int note, int velocity);
-static int awe_clear_voice(void);
-
-/* load / remove patches */
-static int awe_open_patch(awe_patch_info *patch, const char *addr, int count);
-static int awe_close_patch(awe_patch_info *patch, const char *addr, int count);
-static int awe_unload_patch(awe_patch_info *patch, const char *addr, int count);
-static int awe_load_info(awe_patch_info *patch, const char *addr, int count);
-static int awe_load_data(awe_patch_info *patch, const char *addr, int count);
-static int awe_replace_data(awe_patch_info *patch, const char *addr, int count);
-static int awe_load_map(awe_patch_info *patch, const char *addr, int count);
-#ifdef AWE_HAS_GUS_COMPATIBILITY
-static int awe_load_guspatch(const char *addr, int offs, int size, int pmgr_flag);
-#endif
-static int check_patch_opened(int type, char *name);
-static int awe_write_wave_data(const char *addr, int offset, awe_sample_info *sp, int channels);
-static void add_sf_info(int rec);
-static void add_sf_sample(int rec);
-static void purge_old_list(int rec, int next);
-static void add_info_list(int rec);
-static void awe_remove_samples(int sf_id);
-static void rebuild_preset_list(void);
-static short awe_set_sample(awe_voice_info *vp);
-
-/* lowlevel functions */
-static void awe_init_audio(void);
-static void awe_init_dma(void);
-static void awe_init_array(void);
-static void awe_send_array(unsigned short *data);
-static void awe_tweak_voice(int voice);
-static void awe_tweak(void);
-static void awe_init_fm(void);
-static int awe_open_dram_for_write(int offset, int channels);
-static void awe_open_dram_for_check(void);
-static void awe_close_dram(void);
-static void awe_write_dram(unsigned short c);
-static int awe_detect_base(int addr);
-static int awe_detect(void);
-static int awe_check_dram(void);
-static int awe_load_chorus_fx(awe_patch_info *patch, const char *addr, int count);
-static void awe_set_chorus_mode(int mode);
-static int awe_load_reverb_fx(awe_patch_info *patch, const char *addr, int count);
-static void awe_set_reverb_mode(int mode);
-static void awe_equalizer(int bass, int treble);
-#ifdef CONFIG_AWE32_MIXER
-static int awe_mixer_ioctl(int dev, unsigned int cmd, caddr_t arg);
-#endif
-
-/* define macros for compatibility */
-#ifdef __FreeBSD__
-# include <gnu/i386/isa/sound/awe_compat.h>
-#else
-# include "awe_compat.h"
-#endif
-
-/*----------------------------------------------------------------
- * synth operation table
- *----------------------------------------------------------------*/
-
-static struct synth_operations awe_operations =
-{
-#ifdef AWE_OSS38
- "EMU8K",
-#endif
- &awe_info,
- 0,
- SYNTH_TYPE_SAMPLE,
- SAMPLE_TYPE_AWE32,
- awe_open,
- awe_close,
- awe_ioctl,
- awe_kill_note,
- awe_start_note,
- awe_set_instr_2,
- awe_reset,
- awe_hw_control,
- awe_load_patch,
- awe_aftertouch,
- awe_controller,
- awe_panning,
- awe_volume_method,
-#ifndef AWE_NO_PATCHMGR
- awe_patchmgr,
-#endif
- awe_bender,
- awe_alloc,
- awe_setup_voice
-};
-
-#ifdef CONFIG_AWE32_MIXER
-static struct mixer_operations awe_mixer_operations = {
-#ifndef __FreeBSD__
- "AWE32",
-#endif
- "AWE32 Equalizer",
- awe_mixer_ioctl,
-};
-#endif
-
-
-/*================================================================
- * attach / unload interface
- *================================================================*/
-
-#ifdef AWE_OBSOLETE_VOXWARE
-#define ATTACH_DECL static
-#else
-#define ATTACH_DECL /**/
-#endif
-
-#if defined(__FreeBSD__) && !defined(AWE_OBSOLETE_VOXWARE)
-# define ATTACH_RET
-void attach_awe(struct address_info *hw_config)
-#else
-# define ATTACH_RET ret
-ATTACH_DECL
-int attach_awe(void)
-#endif
-{
- int ret = 0;
-
- /* check presence of AWE32 card */
- if (! awe_detect()) {
- printk("AWE32: not detected\n");
- return ATTACH_RET;
- }
-
- /* check AWE32 ports are available */
- if (awe_check_port()) {
- printk("AWE32: I/O area already used.\n");
- return ATTACH_RET;
- }
-
- /* set buffers to NULL */
- voices = NULL;
- channels = NULL;
- sflists = NULL;
- samples = NULL;
- infos = NULL;
-
- /* voice & channel info */
- voices = (voice_info*)my_malloc(AWE_MAX_VOICES * sizeof(voice_info));
- channels = (awe_chan_info*)my_malloc(AWE_MAX_CHANNELS * sizeof(awe_chan_info));
-
- if (voices == NULL || channels == NULL) {
- my_free(voices);
- my_free(channels);
- printk("AWE32: can't allocate sample tables\n");
- return ATTACH_RET;
- }
-
- /* allocate sample tables */
- INIT_TABLE(sflists, max_sfs, AWE_MAX_SF_LISTS, sf_list);
- INIT_TABLE(samples, max_samples, AWE_MAX_SAMPLES, awe_sample_list);
- INIT_TABLE(infos, max_infos, AWE_MAX_INFOS, awe_voice_list);
-
- if (num_synths >= MAX_SYNTH_DEV)
- printk("AWE32 Error: too many synthesizers\n");
- else {
- voice_alloc = &awe_operations.alloc;
- voice_alloc->max_voice = awe_max_voices;
- synth_devs[num_synths++] = &awe_operations;
- }
-
-#ifdef CONFIG_AWE32_MIXER
- if (num_mixers < MAX_MIXER_DEV) {
- mixer_devs[num_mixers++] = &awe_mixer_operations;
- }
-#endif
-
- /* reserve I/O ports for awedrv */
- awe_request_region();
-
- /* clear all samples */
- awe_reset_samples();
-
- /* intialize AWE32 hardware */
- awe_initialize();
-
- snprintf(awe_info.name, sizeof(awe_info.name), "AWE32-%s (RAM%dk)",
- AWEDRV_VERSION, awe_mem_size/1024);
-#ifdef __FreeBSD__
- printk("awe0: <SoundBlaster EMU8000 MIDI (RAM%dk)>", awe_mem_size/1024);
-#elif defined(AWE_DEBUG_ON)
- printk("%s\n", awe_info.name);
-#endif
-
- /* set default values */
- awe_init_misc_modes(TRUE);
-
- /* set reverb & chorus modes */
- awe_set_reverb_mode(reverb_mode);
- awe_set_chorus_mode(chorus_mode);
-
- awe_present = TRUE;
-
- ret = 1;
- return ATTACH_RET;
-}
-
-
-#ifdef AWE_DYNAMIC_BUFFER
-static void free_tables(void)
-{
- my_free(sflists);
- sflists = NULL; max_sfs = 0;
- my_free(samples);
- samples = NULL; max_samples = 0;
- my_free(infos);
- infos = NULL; max_infos = 0;
-}
-#else
-#define free_buffers() /**/
-#endif
-
-
-#ifdef linux
-ATTACH_DECL
-void unload_awe(void)
-{
- if (awe_present) {
- awe_reset_samples();
- awe_release_region();
- my_free(voices);
- my_free(channels);
- free_tables();
- awe_present = FALSE;
- }
-}
-#endif
-
-
-/*----------------------------------------------------------------
- * old type interface
- *----------------------------------------------------------------*/
-
-#ifdef AWE_OBSOLETE_VOXWARE
-
-#ifdef __FreeBSD__
-long attach_awe_obsolete(long mem_start, struct address_info *hw_config)
-#else
-int attach_awe_obsolete(int mem_start, struct address_info *hw_config)
-#endif
-{
- my_malloc_init(mem_start);
- if (! attach_awe())
- return 0;
- return my_malloc_memptr();
-}
-
-int probe_awe_obsolete(struct address_info *hw_config)
-{
- return 1;
- /*return awe_detect();*/
-}
-
-#else
-#if defined(__FreeBSD__ )
-int probe_awe(struct address_info *hw_config)
-{
- return 1;
-}
-#endif
-#endif /* AWE_OBSOLETE_VOXWARE */
-
-
-/*================================================================
- * clear sample tables
- *================================================================*/
-
-static void
-awe_reset_samples(void)
-{
- int i;
-
- /* free all bank tables */
- for (i = 0; i < AWE_MAX_PRESETS; i++)
- preset_table[i] = -1;
-
- free_tables();
-
- current_sf_id = 0;
- locked_sf_id = 0;
- patch_opened = 0;
-}
-
-
-/*================================================================
- * EMU register access
- *================================================================*/
-
-/* select a given AWE32 pointer */
-static int awe_cur_cmd = -1;
-#define awe_set_cmd(cmd) \
-if (awe_cur_cmd != cmd) { OUTW(cmd, awe_base + 0x802); awe_cur_cmd = cmd; }
-#define awe_port(port) (awe_base - 0x620 + port)
-
-/* write 16bit data */
-INLINE static void
-awe_poke(unsigned short cmd, unsigned short port, unsigned short data)
-{
- awe_set_cmd(cmd);
- OUTW(data, awe_port(port));
-}
-
-/* write 32bit data */
-INLINE static void
-awe_poke_dw(unsigned short cmd, unsigned short port, unsigned int data)
-{
- awe_set_cmd(cmd);
- OUTW(data, awe_port(port)); /* write lower 16 bits */
- OUTW(data >> 16, awe_port(port)+2); /* write higher 16 bits */
-}
-
-/* read 16bit data */
-INLINE static unsigned short
-awe_peek(unsigned short cmd, unsigned short port)
-{
- unsigned short k;
- awe_set_cmd(cmd);
- k = inw(awe_port(port));
- return k;
-}
-
-/* read 32bit data */
-INLINE static unsigned int
-awe_peek_dw(unsigned short cmd, unsigned short port)
-{
- unsigned int k1, k2;
- awe_set_cmd(cmd);
- k1 = inw(awe_port(port));
- k2 = inw(awe_port(port)+2);
- k1 |= k2 << 16;
- return k1;
-}
-
-/* wait delay number of AWE32 44100Hz clocks */
-static void
-awe_wait(unsigned short delay)
-{
- unsigned short clock, target;
- unsigned short port = awe_port(AWE_WC_Port);
- int counter;
-
- /* sample counter */
- awe_set_cmd(AWE_WC_Cmd);
- clock = (unsigned short)inw(port);
- target = clock + delay;
- counter = 0;
- if (target < clock) {
- for (; (unsigned short)inw(port) > target; counter++)
- if (counter > 65536)
- break;
- }
- for (; (unsigned short)inw(port) < target; counter++)
- if (counter > 65536)
- break;
-}
-
-/* write a word data */
-INLINE static void
-awe_write_dram(unsigned short c)
-{
- awe_poke(AWE_SMLD, c);
-}
-
-
-#if defined(linux) && !defined(AWE_OBSOLETE_VOXWARE)
-
-/*================================================================
- * port check / request
- * 0x620-622, 0xA20-A22, 0xE20-E22
- *================================================================*/
-
-static int
-awe_check_port(void)
-{
- return (check_region(awe_port(Data0), 4) ||
- check_region(awe_port(Data1), 4) ||
- check_region(awe_port(Data3), 4));
-}
-
-static void
-awe_request_region(void)
-{
- request_region(awe_port(Data0), 4, "sound driver (AWE32)");
- request_region(awe_port(Data1), 4, "sound driver (AWE32)");
- request_region(awe_port(Data3), 4, "sound driver (AWE32)");
-}
-
-static void
-awe_release_region(void)
-{
- release_region(awe_port(Data0), 4);
- release_region(awe_port(Data1), 4);
- release_region(awe_port(Data3), 4);
-}
-
-#endif /* !AWE_OBSOLETE_VOXWARE */
-
-
-/*================================================================
- * AWE32 initialization
- *================================================================*/
-static void
-awe_initialize(void)
-{
- AWE_DEBUG(0,printk("AWE32: initializing..\n"));
-
- /* initialize hardware configuration */
- awe_poke(AWE_HWCF1, 0x0059);
- awe_poke(AWE_HWCF2, 0x0020);
-
- /* disable audio; this seems to reduce a clicking noise a bit.. */
- awe_poke(AWE_HWCF3, 0);
-
- /* initialize audio channels */
- awe_init_audio();
-
- /* initialize DMA */
- awe_init_dma();
-
- /* initialize init array */
- awe_init_array();
-
- /* check DRAM memory size */
- awe_mem_size = awe_check_dram();
-
- /* initialize the FM section of the AWE32 */
- awe_init_fm();
-
- /* set up voice envelopes */
- awe_tweak();
-
- /* enable audio */
- awe_poke(AWE_HWCF3, 0x0004);
-
- /* set equalizer */
- awe_equalizer(5, 9);
-}
-
-
-/*================================================================
- * AWE32 voice parameters
- *================================================================*/
-
-/* initialize voice_info record */
-static void
-awe_init_voice_info(awe_voice_info *vp)
-{
- vp->sf_id = 0; /* normal mode */
- vp->sample = 0;
- vp->rate_offset = 0;
-
- vp->start = 0;
- vp->end = 0;
- vp->loopstart = 0;
- vp->loopend = 0;
- vp->mode = 0;
- vp->root = 60;
- vp->tune = 0;
- vp->low = 0;
- vp->high = 127;
- vp->vellow = 0;
- vp->velhigh = 127;
-
- vp->fixkey = -1;
- vp->fixvel = -1;
- vp->fixpan = -1;
- vp->pan = -1;
-
- vp->exclusiveClass = 0;
- vp->amplitude = 127;
- vp->attenuation = 0;
- vp->scaleTuning = 100;
-
- awe_init_voice_parm(&vp->parm);
-}
-
-/* initialize voice_parm record:
- * Env1/2: delay=0, attack=0, hold=0, sustain=0, decay=0, release=0.
- * Vibrato and Tremolo effects are zero.
- * Cutoff is maximum.
- * Chorus and Reverb effects are zero.
- */
-static void
-awe_init_voice_parm(awe_voice_parm *pp)
-{
- pp->moddelay = 0x8000;
- pp->modatkhld = 0x7f7f;
- pp->moddcysus = 0x7f7f;
- pp->modrelease = 0x807f;
- pp->modkeyhold = 0;
- pp->modkeydecay = 0;
-
- pp->voldelay = 0x8000;
- pp->volatkhld = 0x7f7f;
- pp->voldcysus = 0x7f7f;
- pp->volrelease = 0x807f;
- pp->volkeyhold = 0;
- pp->volkeydecay = 0;
-
- pp->lfo1delay = 0x8000;
- pp->lfo2delay = 0x8000;
- pp->pefe = 0;
-
- pp->fmmod = 0;
- pp->tremfrq = 0;
- pp->fm2frq2 = 0;
-
- pp->cutoff = 0xff;
- pp->filterQ = 0;
-
- pp->chorus = 0;
- pp->reverb = 0;
-}
-
-
-#ifdef AWE_HAS_GUS_COMPATIBILITY
-
-/* convert frequency mHz to abstract cents (= midi key * 100) */
-static int
-freq_to_note(int mHz)
-{
- /* abscents = log(mHz/8176) / log(2) * 1200 */
- unsigned int max_val = (unsigned int)0xffffffff / 10000;
- int i, times;
- unsigned int base;
- unsigned int freq;
- int note, tune;
-
- if (mHz == 0)
- return 0;
- if (mHz < 0)
- return 12799; /* maximum */
-
- freq = mHz;
- note = 0;
- for (base = 8176 * 2; freq >= base; base *= 2) {
- note += 12;
- if (note >= 128) /* over maximum */
- return 12799;
- }
- base /= 2;
-
- /* to avoid overflow... */
- times = 10000;
- while (freq > max_val) {
- max_val *= 10;
- times /= 10;
- base /= 10;
- }
-
- freq = freq * times / base;
- for (i = 0; i < 12; i++) {
- if (freq < semitone_tuning[i+1])
- break;
- note++;
- }
-
- tune = 0;
- freq = freq * 10000 / semitone_tuning[i];
- for (i = 0; i < 100; i++) {
- if (freq < cent_tuning[i+1])
- break;
- tune++;
- }
-
- return note * 100 + tune;
-}
-
-
-/* convert Hz to AWE32 rate offset:
- * sample pitch offset for the specified sample rate
- * rate=44100 is no offset, each 4096 is 1 octave (twice).
- * eg, when rate is 22050, this offset becomes -4096.
- */
-static int
-calc_rate_offset(int Hz)
-{
- /* offset = log(Hz / 44100) / log(2) * 4096 */
- int freq, base, i;
-
- /* maybe smaller than max (44100Hz) */
- if (Hz <= 0 || Hz >= 44100) return 0;
-
- base = 0;
- for (freq = Hz * 2; freq < 44100; freq *= 2)
- base++;
- base *= 1200;
-
- freq = 44100 * 10000 / (freq/2);
- for (i = 0; i < 12; i++) {
- if (freq < semitone_tuning[i+1])
- break;
- base += 100;
- }
- freq = freq * 10000 / semitone_tuning[i];
- for (i = 0; i < 100; i++) {
- if (freq < cent_tuning[i+1])
- break;
- base++;
- }
- return -base * 4096 / 1200;
-}
-
-
-/*----------------------------------------------------------------
- * convert envelope time parameter to AWE32 raw parameter
- *----------------------------------------------------------------*/
-
-/* attack & decay/release time table (msec) */
-static short attack_time_tbl[128] = {
-32767, 11878, 5939, 3959, 2969, 2375, 1979, 1696, 1484, 1319, 1187, 1079, 989, 913, 848, 791, 742,
- 698, 659, 625, 593, 565, 539, 516, 494, 475, 456, 439, 424, 409, 395, 383, 371,
- 359, 344, 330, 316, 302, 290, 277, 266, 255, 244, 233, 224, 214, 205, 196, 188,
- 180, 173, 165, 158, 152, 145, 139, 133, 127, 122, 117, 112, 107, 103, 98, 94,
- 90, 86, 83, 79, 76, 73, 69, 67, 64, 61, 58, 56, 54, 51, 49, 47,
- 45, 43, 41, 39, 38, 36, 35, 33, 32, 30, 29, 28, 27, 25, 24, 23,
- 22, 21, 20, 20, 19, 18, 17, 16, 16, 15, 14, 14, 13, 13, 12, 11,
- 11, 10, 10, 10, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 0,
-};
-
-static short decay_time_tbl[128] = {
-32767, 32766, 4589, 4400, 4219, 4045, 3879, 3719, 3566, 3419, 3279, 3144, 3014, 2890, 2771, 2657,
- 2548, 2443, 2343, 2246, 2154, 2065, 1980, 1899, 1820, 1746, 1674, 1605, 1539, 1475, 1415, 1356,
- 1301, 1247, 1196, 1146, 1099, 1054, 1011, 969, 929, 891, 854, 819, 785, 753, 722, 692,
- 664, 636, 610, 585, 561, 538, 516, 494, 474, 455, 436, 418, 401, 384, 368, 353,
- 339, 325, 311, 298, 286, 274, 263, 252, 242, 232, 222, 213, 204, 196, 188, 180,
- 173, 166, 159, 152, 146, 140, 134, 129, 123, 118, 113, 109, 104, 100, 96, 92,
- 88, 84, 81, 77, 74, 71, 68, 65, 63, 60, 58, 55, 53, 51, 49, 47,
- 45, 43, 41, 39, 38, 36, 35, 33, 32, 30, 29, 28, 27, 26, 25, 24,
-};
-
-/*
-static int
-calc_parm_delay(int msec)
-{
- return (0x8000 - msec * 1000 / 725);
-}
-*/
-
-/* delay time = 0x8000 - msec/92 */
-static int
-calc_parm_hold(int msec)
-{
- int val = (0x7f * 92 - msec) / 92;
- if (val < 1) val = 1;
- if (val > 127) val = 127;
- return val;
-}
-
-/* attack time: search from time table */
-static int
-calc_parm_attack(int msec)
-{
- return calc_parm_search(msec, attack_time_tbl);
-}
-
-/* decay/release time: search from time table */
-static int
-calc_parm_decay(int msec)
-{
- return calc_parm_search(msec, decay_time_tbl);
-}
-
-/* search an index for specified time from given time table */
-static int
-calc_parm_search(int msec, short *table)
-{
- int left = 1, right = 127, mid;
- while (left < right) {
- mid = (left + right) / 2;
- if (msec < (int)table[mid])
- left = mid + 1;
- else
- right = mid;
- }
- return left;
-}
-#endif /* AWE_HAS_GUS_COMPATIBILITY */
-
-
-/*================================================================
- * effects table
- *================================================================*/
-
-/* set an effect value */
-#define FX_FLAG_OFF 0
-#define FX_FLAG_SET 1
-#define FX_FLAG_ADD 2
-
-#define FX_SET(rec,type,value) \
- ((rec)->flags[type] = FX_FLAG_SET, (rec)->val[type] = (value))
-#define FX_ADD(rec,type,value) \
- ((rec)->flags[type] = FX_FLAG_ADD, (rec)->val[type] = (value))
-#define FX_UNSET(rec,type) \
- ((rec)->flags[type] = FX_FLAG_OFF, (rec)->val[type] = 0)
-
-/* check the effect value is set */
-#define FX_ON(rec,type) ((rec)->flags[type])
-
-#define PARM_BYTE 0
-#define PARM_WORD 1
-
-static struct PARM_DEFS {
- int type; /* byte or word */
- int low, high; /* value range */
- fx_affect_func realtime; /* realtime paramater change */
-} parm_defs[] = {
- {PARM_WORD, 0, 0x8000, NULL}, /* env1 delay */
- {PARM_BYTE, 1, 0x7f, NULL}, /* env1 attack */
- {PARM_BYTE, 0, 0x7e, NULL}, /* env1 hold */
- {PARM_BYTE, 1, 0x7f, NULL}, /* env1 decay */
- {PARM_BYTE, 1, 0x7f, NULL}, /* env1 release */
- {PARM_BYTE, 0, 0x7f, NULL}, /* env1 sustain */
- {PARM_BYTE, 0, 0xff, NULL}, /* env1 pitch */
- {PARM_BYTE, 0, 0xff, NULL}, /* env1 cutoff */
-
- {PARM_WORD, 0, 0x8000, NULL}, /* env2 delay */
- {PARM_BYTE, 1, 0x7f, NULL}, /* env2 attack */
- {PARM_BYTE, 0, 0x7e, NULL}, /* env2 hold */
- {PARM_BYTE, 1, 0x7f, NULL}, /* env2 decay */
- {PARM_BYTE, 1, 0x7f, NULL}, /* env2 release */
- {PARM_BYTE, 0, 0x7f, NULL}, /* env2 sustain */
-
- {PARM_WORD, 0, 0x8000, NULL}, /* lfo1 delay */
- {PARM_BYTE, 0, 0xff, awe_fx_tremfrq}, /* lfo1 freq */
- {PARM_BYTE, 0, 0x7f, awe_fx_tremfrq}, /* lfo1 volume (positive only)*/
- {PARM_BYTE, 0, 0x7f, awe_fx_fmmod}, /* lfo1 pitch (positive only)*/
- {PARM_BYTE, 0, 0xff, awe_fx_fmmod}, /* lfo1 cutoff (positive only)*/
-
- {PARM_WORD, 0, 0x8000, NULL}, /* lfo2 delay */
- {PARM_BYTE, 0, 0xff, awe_fx_fm2frq2}, /* lfo2 freq */
- {PARM_BYTE, 0, 0x7f, awe_fx_fm2frq2}, /* lfo2 pitch (positive only)*/
-
- {PARM_WORD, 0, 0xffff, awe_set_voice_pitch}, /* initial pitch */
- {PARM_BYTE, 0, 0xff, NULL}, /* chorus */
- {PARM_BYTE, 0, 0xff, NULL}, /* reverb */
- {PARM_BYTE, 0, 0xff, awe_set_volume}, /* initial cutoff */
- {PARM_BYTE, 0, 15, awe_fx_filterQ}, /* initial resonance */
-
- {PARM_WORD, 0, 0xffff, NULL}, /* sample start */
- {PARM_WORD, 0, 0xffff, NULL}, /* loop start */
- {PARM_WORD, 0, 0xffff, NULL}, /* loop end */
- {PARM_WORD, 0, 0xffff, NULL}, /* coarse sample start */
- {PARM_WORD, 0, 0xffff, NULL}, /* coarse loop start */
- {PARM_WORD, 0, 0xffff, NULL}, /* coarse loop end */
- {PARM_BYTE, 0, 0xff, awe_set_volume}, /* initial attenuation */
-};
-
-
-static unsigned char
-FX_BYTE(FX_Rec *rec, FX_Rec *lay, int type, unsigned char value)
-{
- int effect = 0;
- int on = 0;
- if (lay && (on = FX_ON(lay, type)) != 0)
- effect = lay->val[type];
- if (!on && (on = FX_ON(rec, type)) != 0)
- effect = rec->val[type];
- if (on == FX_FLAG_ADD)
- effect += (int)value;
- if (on) {
- if (effect < parm_defs[type].low)
- effect = parm_defs[type].low;
- else if (effect > parm_defs[type].high)
- effect = parm_defs[type].high;
- return (unsigned char)effect;
- }
- return value;
-}
-
-/* get word effect value */
-static unsigned short
-FX_WORD(FX_Rec *rec, FX_Rec *lay, int type, unsigned short value)
-{
- int effect = 0;
- int on = 0;
- if (lay && (on = FX_ON(lay, type)) != 0)
- effect = lay->val[type];
- if (!on && (on = FX_ON(rec, type)) != 0)
- effect = rec->val[type];
- if (on == FX_FLAG_ADD)
- effect += (int)value;
- if (on) {
- if (effect < parm_defs[type].low)
- effect = parm_defs[type].low;
- else if (effect > parm_defs[type].high)
- effect = parm_defs[type].high;
- return (unsigned short)effect;
- }
- return value;
-}
-
-/* get word (upper=type1/lower=type2) effect value */
-static unsigned short
-FX_COMB(FX_Rec *rec, FX_Rec *lay, int type1, int type2, unsigned short value)
-{
- unsigned short tmp;
- tmp = FX_BYTE(rec, lay, type1, (unsigned char)(value >> 8));
- tmp <<= 8;
- tmp |= FX_BYTE(rec, lay, type2, (unsigned char)(value & 0xff));
- return tmp;
-}
-
-/* address offset */
-static int
-FX_OFFSET(FX_Rec *rec, FX_Rec *lay, int lo, int hi, int mode)
-{
- int addr = 0;
- if (lay && FX_ON(lay, hi))
- addr = (short)lay->val[hi];
- else if (FX_ON(rec, hi))
- addr = (short)rec->val[hi];
- addr = addr << 15;
- if (lay && FX_ON(lay, lo))
- addr += (short)lay->val[lo];
- else if (FX_ON(rec, lo))
- addr += (short)rec->val[lo];
- if (!(mode & AWE_SAMPLE_8BITS))
- addr /= 2;
- return addr;
-}
-
-
-/*================================================================
- * turn on/off sample
- *================================================================*/
-
-static void
-awe_note_on(int voice)
-{
- unsigned int temp;
- int addr;
- awe_voice_info *vp;
- FX_Rec *fx = &voices[voice].cinfo->fx;
- FX_Rec *fx_lay = NULL;
- if (voices[voice].layer < MAX_LAYERS)
- fx_lay = &voices[voice].cinfo->fx_layer[voices[voice].layer];
-
- /* A voice sample must assigned before calling */
- if ((vp = voices[voice].sample) == NULL || vp->index < 0)
- return;
-
- /* channel to be silent and idle */
- awe_poke(AWE_DCYSUSV(voice), 0x0080);
- awe_poke(AWE_VTFT(voice), 0);
- awe_poke(AWE_CVCF(voice), 0);
- awe_poke(AWE_PTRX(voice), 0);
- awe_poke(AWE_CPF(voice), 0);
-
- /* modulation & volume envelope */
- awe_poke(AWE_ENVVAL(voice),
- FX_WORD(fx, fx_lay, AWE_FX_ENV1_DELAY, vp->parm.moddelay));
- awe_poke(AWE_ATKHLD(voice),
- FX_COMB(fx, fx_lay, AWE_FX_ENV1_HOLD, AWE_FX_ENV1_ATTACK,
- vp->parm.modatkhld));
- awe_poke(AWE_DCYSUS(voice),
- FX_COMB(fx, fx_lay, AWE_FX_ENV1_SUSTAIN, AWE_FX_ENV1_DECAY,
- vp->parm.moddcysus));
- awe_poke(AWE_ENVVOL(voice),
- FX_WORD(fx, fx_lay, AWE_FX_ENV2_DELAY, vp->parm.voldelay));
- awe_poke(AWE_ATKHLDV(voice),
- FX_COMB(fx, fx_lay, AWE_FX_ENV2_HOLD, AWE_FX_ENV2_ATTACK,
- vp->parm.volatkhld));
- /* decay/sustain parameter for volume envelope must be set at last */
-
- /* pitch offset */
- awe_set_pitch(voice, TRUE);
-
- /* cutoff and volume */
- awe_set_volume(voice, TRUE);
-
- /* modulation envelope heights */
- awe_poke(AWE_PEFE(voice),
- FX_COMB(fx, fx_lay, AWE_FX_ENV1_PITCH, AWE_FX_ENV1_CUTOFF,
- vp->parm.pefe));
-
- /* lfo1/2 delay */
- awe_poke(AWE_LFO1VAL(voice),
- FX_WORD(fx, fx_lay, AWE_FX_LFO1_DELAY, vp->parm.lfo1delay));
- awe_poke(AWE_LFO2VAL(voice),
- FX_WORD(fx, fx_lay, AWE_FX_LFO2_DELAY, vp->parm.lfo2delay));
-
- /* lfo1 pitch & cutoff shift */
- awe_fx_fmmod(voice, TRUE);
- /* lfo1 volume & freq */
- awe_fx_tremfrq(voice, TRUE);
- /* lfo2 pitch & freq */
- awe_fx_fm2frq2(voice, TRUE);
- /* pan & loop start */
- awe_set_pan(voice, TRUE);
-
- /* chorus & loop end (chorus 8bit, MSB) */
- addr = vp->loopend - 1;
- addr += FX_OFFSET(fx, fx_lay, AWE_FX_LOOP_END,
- AWE_FX_COARSE_LOOP_END, vp->mode);
- temp = FX_BYTE(fx, fx_lay, AWE_FX_CHORUS, vp->parm.chorus);
- temp = (temp <<24) | (unsigned int)addr;
- awe_poke_dw(AWE_CSL(voice), temp);
- AWE_DEBUG(4,printk("AWE32: [-- loopend=%x/%x]\n", vp->loopend, addr));
-
- /* Q & current address (Q 4bit value, MSB) */
- addr = vp->start - 1;
- addr += FX_OFFSET(fx, fx_lay, AWE_FX_SAMPLE_START,
- AWE_FX_COARSE_SAMPLE_START, vp->mode);
- temp = FX_BYTE(fx, fx_lay, AWE_FX_FILTERQ, vp->parm.filterQ);
- temp = (temp<<28) | (unsigned int)addr;
- awe_poke_dw(AWE_CCCA(voice), temp);
- AWE_DEBUG(4,printk("AWE32: [-- startaddr=%x/%x]\n", vp->start, addr));
-
- /* reset volume */
- awe_poke_dw(AWE_VTFT(voice), 0x0000FFFF);
- awe_poke_dw(AWE_CVCF(voice), 0x0000FFFF);
-
- /* turn on envelope */
- awe_poke(AWE_DCYSUSV(voice),
- FX_COMB(fx, fx_lay, AWE_FX_ENV2_SUSTAIN, AWE_FX_ENV2_DECAY,
- vp->parm.voldcysus));
- /* set reverb */
- temp = FX_BYTE(fx, fx_lay, AWE_FX_REVERB, vp->parm.reverb);
- temp = (awe_peek_dw(AWE_PTRX(voice)) & 0xffff0000) | (temp<<8);
- awe_poke_dw(AWE_PTRX(voice), temp);
- awe_poke_dw(AWE_CPF(voice), 0x40000000);
-
- voices[voice].state = AWE_ST_ON;
-
- /* clear voice position for the next note on this channel */
- if (SINGLE_LAYER_MODE()) {
- FX_UNSET(fx, AWE_FX_SAMPLE_START);
- FX_UNSET(fx, AWE_FX_COARSE_SAMPLE_START);
- }
-}
-
-
-/* turn off the voice */
-static void
-awe_note_off(int voice)
-{
- awe_voice_info *vp;
- unsigned short tmp;
- FX_Rec *fx = &voices[voice].cinfo->fx;
- FX_Rec *fx_lay = NULL;
- if (voices[voice].layer < MAX_LAYERS)
- fx_lay = &voices[voice].cinfo->fx_layer[voices[voice].layer];
-
- if ((vp = voices[voice].sample) == NULL) {
- voices[voice].state = AWE_ST_OFF;
- return;
- }
-
- tmp = 0x8000 | FX_BYTE(fx, fx_lay, AWE_FX_ENV1_RELEASE,
- (unsigned char)vp->parm.modrelease);
- awe_poke(AWE_DCYSUS(voice), tmp);
- tmp = 0x8000 | FX_BYTE(fx, fx_lay, AWE_FX_ENV2_RELEASE,
- (unsigned char)vp->parm.volrelease);
- awe_poke(AWE_DCYSUSV(voice), tmp);
- voices[voice].state = AWE_ST_RELEASED;
-}
-
-/* force to terminate the voice (no releasing echo) */
-static void
-awe_terminate(int voice)
-{
- awe_poke(AWE_DCYSUSV(voice), 0x807F);
- awe_tweak_voice(voice);
- voices[voice].state = AWE_ST_OFF;
-}
-
-/* turn off other voices with the same exclusive class (for drums) */
-static void
-awe_exclusive_off(int voice)
-{
- int i, exclass;
-
- if (voices[voice].sample == NULL)
- return;
- if ((exclass = voices[voice].sample->exclusiveClass) == 0)
- return; /* not exclusive */
-
- /* turn off voices with the same class */
- for (i = 0; i < awe_max_voices; i++) {
- if (i != voice && IS_PLAYING(i) &&
- voices[i].sample && voices[i].ch == voices[voice].ch &&
- voices[i].sample->exclusiveClass == exclass) {
- AWE_DEBUG(4,printk("AWE32: [exoff(%d)]\n", i));
- awe_terminate(i);
- awe_voice_init(i, TRUE);
- }
- }
-}
-
-
-/*================================================================
- * change the parameters of an audible voice
- *================================================================*/
-
-/* change pitch */
-static void
-awe_set_pitch(int voice, int forced)
-{
- if (IS_NO_EFFECT(voice) && !forced) return;
- awe_poke(AWE_IP(voice), voices[voice].apitch);
- AWE_DEBUG(3,printk("AWE32: [-- pitch=%x]\n", voices[voice].apitch));
-}
-
-/* calculate & change pitch */
-static void
-awe_set_voice_pitch(int voice, int forced)
-{
- awe_calc_pitch(voice);
- awe_set_pitch(voice, forced);
-}
-
-/* change volume & cutoff */
-static void
-awe_set_volume(int voice, int forced)
-{
- awe_voice_info *vp;
- unsigned short tmp2;
- FX_Rec *fx = &voices[voice].cinfo->fx;
- FX_Rec *fx_lay = NULL;
- if (voices[voice].layer < MAX_LAYERS)
- fx_lay = &voices[voice].cinfo->fx_layer[voices[voice].layer];
-
- if (!IS_PLAYING(voice) && !forced) return;
- if ((vp = voices[voice].sample) == NULL || vp->index < 0)
- return;
-
- tmp2 = FX_BYTE(fx, fx_lay, AWE_FX_CUTOFF, vp->parm.cutoff);
- tmp2 = (tmp2 << 8);
- tmp2 |= FX_BYTE(fx, fx_lay, AWE_FX_ATTEN,
- (unsigned char)voices[voice].avol);
- awe_poke(AWE_IFATN(voice), tmp2);
-}
-
-/* calculate & change volume */
-static void
-awe_set_voice_vol(int voice, int forced)
-{
- if (IS_EMPTY(voice))
- return;
- awe_calc_volume(voice);
- awe_set_volume(voice, forced);
-}
-
-
-/* change pan; this could make a click noise.. */
-static void
-awe_set_pan(int voice, int forced)
-{
- unsigned int temp;
- int addr;
- awe_voice_info *vp;
- FX_Rec *fx = &voices[voice].cinfo->fx;
- FX_Rec *fx_lay = NULL;
- if (voices[voice].layer < MAX_LAYERS)
- fx_lay = &voices[voice].cinfo->fx_layer[voices[voice].layer];
-
- if (IS_NO_EFFECT(voice) && !forced) return;
- if ((vp = voices[voice].sample) == NULL || vp->index < 0)
- return;
-
- /* pan & loop start (pan 8bit, MSB, 0:right, 0xff:left) */
- if (vp->fixpan > 0) /* 0-127 */
- temp = 255 - (int)vp->fixpan * 2;
- else {
- int pos = 0;
- if (vp->pan >= 0) /* 0-127 */
- pos = (int)vp->pan * 2 - 128;
- pos += voices[voice].cinfo->panning; /* -128 - 127 */
- pos = 127 - pos;
- if (pos < 0)
- temp = 0;
- else if (pos > 255)
- temp = 255;
- else
- temp = pos;
- }
- if (forced || temp != voices[voice].apan) {
- addr = vp->loopstart - 1;
- addr += FX_OFFSET(fx, fx_lay, AWE_FX_LOOP_START,
- AWE_FX_COARSE_LOOP_START, vp->mode);
- temp = (temp<<24) | (unsigned int)addr;
- awe_poke_dw(AWE_PSST(voice), temp);
- voices[voice].apan = temp;
- AWE_DEBUG(4,printk("AWE32: [-- loopstart=%x/%x]\n", vp->loopstart, addr));
- }
-}
-
-/* effects change during playing */
-static void
-awe_fx_fmmod(int voice, int forced)
-{
- awe_voice_info *vp;
- FX_Rec *fx = &voices[voice].cinfo->fx;
- FX_Rec *fx_lay = NULL;
- if (voices[voice].layer < MAX_LAYERS)
- fx_lay = &voices[voice].cinfo->fx_layer[voices[voice].layer];
-
- if (IS_NO_EFFECT(voice) && !forced) return;
- if ((vp = voices[voice].sample) == NULL || vp->index < 0)
- return;
- awe_poke(AWE_FMMOD(voice),
- FX_COMB(fx, fx_lay, AWE_FX_LFO1_PITCH, AWE_FX_LFO1_CUTOFF,
- vp->parm.fmmod));
-}
-
-/* set tremolo (lfo1) volume & frequency */
-static void
-awe_fx_tremfrq(int voice, int forced)
-{
- awe_voice_info *vp;
- FX_Rec *fx = &voices[voice].cinfo->fx;
- FX_Rec *fx_lay = NULL;
- if (voices[voice].layer < MAX_LAYERS)
- fx_lay = &voices[voice].cinfo->fx_layer[voices[voice].layer];
-
- if (IS_NO_EFFECT(voice) && !forced) return;
- if ((vp = voices[voice].sample) == NULL || vp->index < 0)
- return;
- awe_poke(AWE_TREMFRQ(voice),
- FX_COMB(fx, fx_lay, AWE_FX_LFO1_VOLUME, AWE_FX_LFO1_FREQ,
- vp->parm.tremfrq));
-}
-
-/* set lfo2 pitch & frequency */
-static void
-awe_fx_fm2frq2(int voice, int forced)
-{
- awe_voice_info *vp;
- FX_Rec *fx = &voices[voice].cinfo->fx;
- FX_Rec *fx_lay = NULL;
- if (voices[voice].layer < MAX_LAYERS)
- fx_lay = &voices[voice].cinfo->fx_layer[voices[voice].layer];
-
- if (IS_NO_EFFECT(voice) && !forced) return;
- if ((vp = voices[voice].sample) == NULL || vp->index < 0)
- return;
- awe_poke(AWE_FM2FRQ2(voice),
- FX_COMB(fx, fx_lay, AWE_FX_LFO2_PITCH, AWE_FX_LFO2_FREQ,
- vp->parm.fm2frq2));
-}
-
-
-/* Q & current address (Q 4bit value, MSB) */
-static void
-awe_fx_filterQ(int voice, int forced)
-{
- unsigned int addr;
- awe_voice_info *vp;
- FX_Rec *fx = &voices[voice].cinfo->fx;
- FX_Rec *fx_lay = NULL;
- if (voices[voice].layer < MAX_LAYERS)
- fx_lay = &voices[voice].cinfo->fx_layer[voices[voice].layer];
-
- if (IS_NO_EFFECT(voice) && !forced) return;
- if ((vp = voices[voice].sample) == NULL || vp->index < 0)
- return;
-
- addr = awe_peek_dw(AWE_CCCA(voice)) & 0xffffff;
- addr |= (FX_BYTE(fx, fx_lay, AWE_FX_FILTERQ, vp->parm.filterQ) << 28);
- awe_poke_dw(AWE_CCCA(voice), addr);
-}
-
-/*================================================================
- * calculate pitch offset
- *----------------------------------------------------------------
- * 0xE000 is no pitch offset at 44100Hz sample.
- * Every 4096 is one octave.
- *================================================================*/
-
-static void
-awe_calc_pitch(int voice)
-{
- voice_info *vp = &voices[voice];
- awe_voice_info *ap;
- awe_chan_info *cp = voices[voice].cinfo;
- int offset;
-
- /* search voice information */
- if ((ap = vp->sample) == NULL)
- return;
- if (ap->index < 0) {
- AWE_DEBUG(3,printk("AWE32: set sample (%d)\n", ap->sample));
- if (awe_set_sample(ap) < 0)
- return;
- }
-
- /* calculate offset */
- if (ap->fixkey >= 0) {
- AWE_DEBUG(3,printk("AWE32: p-> fixkey(%d) tune(%d)\n", ap->fixkey, ap->tune));
- offset = (ap->fixkey - ap->root) * 4096 / 12;
- } else {
- AWE_DEBUG(3,printk("AWE32: p(%d)-> root(%d) tune(%d)\n", vp->note, ap->root, ap->tune));
- offset = (vp->note - ap->root) * 4096 / 12;
- AWE_DEBUG(4,printk("AWE32: p-> ofs=%d\n", offset));
- }
- offset = (offset * ap->scaleTuning) / 100;
- AWE_DEBUG(4,printk("AWE32: p-> scale* ofs=%d\n", offset));
- offset += ap->tune * 4096 / 1200;
- AWE_DEBUG(4,printk("AWE32: p-> tune+ ofs=%d\n", offset));
- if (cp->bender != 0) {
- AWE_DEBUG(3,printk("AWE32: p-> bend(%d) %d\n", voice, cp->bender));
- /* (819200: 1 semitone) ==> (4096: 12 semitones) */
- offset += cp->bender * cp->bender_range / 2400;
- }
-
- /* add initial pitch correction */
- if (FX_ON(&cp->fx_layer[vp->layer], AWE_FX_INIT_PITCH))
- offset += cp->fx_layer[vp->layer].val[AWE_FX_INIT_PITCH];
- else if (FX_ON(&cp->fx, AWE_FX_INIT_PITCH))
- offset += cp->fx.val[AWE_FX_INIT_PITCH];
-
- /* 0xe000: root pitch */
- vp->apitch = 0xe000 + ap->rate_offset + offset;
- AWE_DEBUG(4,printk("AWE32: p-> sum aofs=%x, rate_ofs=%d\n", vp->apitch, ap->rate_offset));
- if (vp->apitch > 0xffff)
- vp->apitch = 0xffff;
- if (vp->apitch < 0)
- vp->apitch = 0;
-}
-
-
-#ifdef AWE_HAS_GUS_COMPATIBILITY
-/* calculate MIDI key and semitone from the specified frequency */
-static void
-awe_calc_pitch_from_freq(int voice, int freq)
-{
- voice_info *vp = &voices[voice];
- awe_voice_info *ap;
- FX_Rec *fx = &voices[voice].cinfo->fx;
- FX_Rec *fx_lay = NULL;
- int offset;
- int note;
-
- if (voices[voice].layer < MAX_LAYERS)
- fx_lay = &voices[voice].cinfo->fx_layer[voices[voice].layer];
-
- /* search voice information */
- if ((ap = vp->sample) == NULL)
- return;
- if (ap->index < 0) {
- AWE_DEBUG(3,printk("AWE32: set sample (%d)\n", ap->sample));
- if (awe_set_sample(ap) < 0)
- return;
- }
- note = freq_to_note(freq);
- offset = (note - ap->root * 100 + ap->tune) * 4096 / 1200;
- offset = (offset * ap->scaleTuning) / 100;
- if (fx_lay && FX_ON(fx_lay, AWE_FX_INIT_PITCH))
- offset += fx_lay->val[AWE_FX_INIT_PITCH];
- else if (FX_ON(fx, AWE_FX_INIT_PITCH))
- offset += fx->val[AWE_FX_INIT_PITCH];
- vp->apitch = 0xe000 + ap->rate_offset + offset;
- if (vp->apitch > 0xffff)
- vp->apitch = 0xffff;
- if (vp->apitch < 0)
- vp->apitch = 0;
-}
-#endif /* AWE_HAS_GUS_COMPATIBILITY */
-
-
-/*================================================================
- * calculate volume attenuation
- *----------------------------------------------------------------
- * Voice volume is controlled by volume attenuation parameter.
- * So volume becomes maximum when avol is 0 (no attenuation), and
- * minimum when 255 (-96dB or silence).
- *================================================================*/
-
-static int vol_table[128] = {
- 255,111,95,86,79,74,70,66,63,61,58,56,54,52,50,49,
- 47,46,45,43,42,41,40,39,38,37,36,35,34,34,33,32,
- 31,31,30,29,29,28,27,27,26,26,25,24,24,23,23,22,
- 22,21,21,21,20,20,19,19,18,18,18,17,17,16,16,16,
- 15,15,15,14,14,14,13,13,13,12,12,12,11,11,11,10,
- 10,10,10,9,9,9,8,8,8,8,7,7,7,7,6,6,
- 6,6,5,5,5,5,5,4,4,4,4,3,3,3,3,3,
- 2,2,2,2,2,1,1,1,1,1,0,0,0,0,0,0,
-};
-
-static void
-awe_calc_volume(int voice)
-{
- voice_info *vp = &voices[voice];
- awe_voice_info *ap;
- awe_chan_info *cp = voices[voice].cinfo;
- int vol;
-
- /* search voice information */
- if ((ap = vp->sample) == NULL)
- return;
-
- ap = vp->sample;
- if (ap->index < 0) {
- AWE_DEBUG(3,printk("AWE32: set sample (%d)\n", ap->sample));
- if (awe_set_sample(ap) < 0)
- return;
- }
-
- /* 0 - 127 */
- vol = (vp->velocity * cp->main_vol * cp->expression_vol) / (127*127);
- vol = vol * ap->amplitude / 127;
-
- if (vol < 0) vol = 0;
- if (vol > 127) vol = 127;
-
- /* calc to attenuation */
- vol = vol_table[vol];
- vol = vol + (int)ap->attenuation + init_atten;
- if (vol > 255) vol = 255;
-
- vp->avol = vol;
- AWE_DEBUG(3,printk("AWE32: [-- voice(%d) vol=%x]\n", voice, vol));
-}
-
-
-/* set sostenuto on */
-static void awe_sostenuto_on(int voice, int forced)
-{
- if (IS_NO_EFFECT(voice) && !forced) return;
- voices[voice].sostenuto = 127;
-}
-
-
-/* drop sustain */
-static void awe_sustain_off(int voice, int forced)
-{
- if (voices[voice].state == AWE_ST_SUSTAINED) {
- awe_note_off(voice);
- awe_fx_init(voices[voice].ch);
- awe_voice_init(voice, FALSE);
- }
-}
-
-
-/* terminate and initialize voice */
-static void awe_terminate_and_init(int voice, int forced)
-{
- awe_terminate(voice);
- awe_fx_init(voices[voice].ch);
- awe_voice_init(voice, TRUE);
-}
-
-
-/*================================================================
- * synth operation routines
- *================================================================*/
-
-#define AWE_VOICE_KEY(v) (0x8000 | (v))
-#define AWE_CHAN_KEY(c,n) (((c) << 8) | ((n) + 1))
-#define KEY_CHAN_MATCH(key,c) (((key) >> 8) == (c))
-
-/* initialize the voice */
-static void
-awe_voice_init(int voice, int init_all)
-{
- voice_info *vp = &voices[voice];
-
- /* reset voice search key */
- if (playing_mode == AWE_PLAY_DIRECT)
- vp->key = AWE_VOICE_KEY(voice);
- else
- vp->key = 0;
-
- /* clear voice mapping */
- voice_alloc->map[voice] = 0;
-
- /* touch the timing flag */
- vp->time = current_alloc_time;
-
- /* initialize other parameters if necessary */
- if (init_all) {
- vp->note = -1;
- vp->velocity = 0;
- vp->sostenuto = 0;
-
- vp->sample = NULL;
- vp->cinfo = &channels[voice];
- vp->ch = voice;
- vp->state = AWE_ST_OFF;
-
- /* emu8000 parameters */
- vp->apitch = 0;
- vp->avol = 255;
- vp->apan = -1;
- }
-}
-
-/* clear effects */
-static void awe_fx_init(int ch)
-{
- if (SINGLE_LAYER_MODE() && !misc_modes[AWE_MD_KEEP_EFFECT]) {
- BZERO(&channels[ch].fx, sizeof(channels[ch].fx));
- BZERO(&channels[ch].fx_layer, sizeof(&channels[ch].fx_layer));
- }
-}
-
-/* initialize channel info */
-static void awe_channel_init(int ch, int init_all)
-{
- awe_chan_info *cp = &channels[ch];
- cp->channel = ch;
- if (init_all) {
- cp->panning = 0; /* zero center */
- cp->bender_range = 200; /* sense * 100 */
- cp->main_vol = 127;
- if (MULTI_LAYER_MODE() && IS_DRUM_CHANNEL(ch)) {
- cp->instr = misc_modes[AWE_MD_DEF_DRUM];
- cp->bank = AWE_DRUM_BANK;
- } else {
- cp->instr = misc_modes[AWE_MD_DEF_PRESET];
- cp->bank = misc_modes[AWE_MD_DEF_BANK];
- }
- cp->vrec = -1;
- cp->def_vrec = -1;
- }
-
- cp->bender = 0; /* zero tune skew */
- cp->expression_vol = 127;
- cp->chan_press = 0;
- cp->sustained = 0;
-
- if (! misc_modes[AWE_MD_KEEP_EFFECT]) {
- BZERO(&cp->fx, sizeof(cp->fx));
- BZERO(&cp->fx_layer, sizeof(cp->fx_layer));
- }
-}
-
-
-/* change the voice parameters; voice = channel */
-static void awe_voice_change(int voice, fx_affect_func func)
-{
- int i;
- switch (playing_mode) {
- case AWE_PLAY_DIRECT:
- func(voice, FALSE);
- break;
- case AWE_PLAY_INDIRECT:
- for (i = 0; i < awe_max_voices; i++)
- if (voices[i].key == AWE_VOICE_KEY(voice))
- func(i, FALSE);
- break;
- default:
- for (i = 0; i < awe_max_voices; i++)
- if (KEY_CHAN_MATCH(voices[i].key, voice))
- func(i, FALSE);
- break;
- }
-}
-
-
-/*----------------------------------------------------------------
- * device open / close
- *----------------------------------------------------------------*/
-
-/* open device:
- * reset status of all voices, and clear sample position flag
- */
-static int
-awe_open(int dev, int mode)
-{
- if (awe_busy)
- return RET_ERROR(EBUSY);
-
- awe_busy = TRUE;
-
- /* set default mode */
- awe_init_misc_modes(FALSE);
- init_atten = misc_modes[AWE_MD_ZERO_ATTEN];
- drum_flags = DEFAULT_DRUM_FLAGS;
- playing_mode = AWE_PLAY_INDIRECT;
-
- /* reset voices & channels */
- awe_reset(dev);
-
- patch_opened = 0;
-
- return 0;
-}
-
-
-/* close device:
- * reset all voices again (terminate sounds)
- */
-static void
-awe_close(int dev)
-{
- awe_reset(dev);
- awe_busy = FALSE;
-}
-
-
-/* set miscellaneous mode parameters
- */
-static void
-awe_init_misc_modes(int init_all)
-{
- int i;
- for (i = 0; i < AWE_MD_END; i++) {
- if (init_all || misc_modes_default[i].init_each_time)
- misc_modes[i] = misc_modes_default[i].value;
- }
-}
-
-
-/* sequencer I/O control:
- */
-static int
-awe_ioctl(int dev, unsigned int cmd, caddr_t arg)
-{
- switch (cmd) {
- case SNDCTL_SYNTH_INFO:
- if (playing_mode == AWE_PLAY_DIRECT)
- awe_info.nr_voices = awe_max_voices;
- else
- awe_info.nr_voices = AWE_MAX_CHANNELS;
- IOCTL_TO_USER((char*)arg, 0, &awe_info, sizeof(awe_info));
- return 0;
- break;
-
- case SNDCTL_SEQ_RESETSAMPLES:
- awe_reset_samples();
- awe_reset(dev);
- return 0;
- break;
-
- case SNDCTL_SEQ_PERCMODE:
- /* what's this? */
- return 0;
- break;
-
- case SNDCTL_SYNTH_MEMAVL:
- return awe_mem_size - awe_free_mem_ptr() * 2;
-
- default:
- printk("AWE32: unsupported ioctl %d\n", cmd);
- return RET_ERROR(EINVAL);
- }
-}
-
-
-static int voice_in_range(int voice)
-{
- if (playing_mode == AWE_PLAY_DIRECT) {
- if (voice < 0 || voice >= awe_max_voices)
- return FALSE;
- } else {
- if (voice < 0 || voice >= AWE_MAX_CHANNELS)
- return FALSE;
- }
- return TRUE;
-}
-
-static void release_voice(int voice, int do_sustain)
-{
- if (IS_NO_SOUND(voice))
- return;
- if (do_sustain && (voices[voice].cinfo->sustained == 127 ||
- voices[voice].sostenuto == 127))
- voices[voice].state = AWE_ST_SUSTAINED;
- else {
- awe_note_off(voice);
- awe_fx_init(voices[voice].ch);
- awe_voice_init(voice, FALSE);
- }
-}
-
-/* release all notes */
-static void awe_note_off_all(int do_sustain)
-{
- int i;
- for (i = 0; i < awe_max_voices; i++)
- release_voice(i, do_sustain);
-}
-
-/* kill a voice:
- * not terminate, just release the voice.
- */
-static int
-awe_kill_note(int dev, int voice, int note, int velocity)
-{
- int i, v2, key;
-
- AWE_DEBUG(2,printk("AWE32: [off(%d) nt=%d vl=%d]\n", voice, note, velocity));
- if (! voice_in_range(voice))
- return RET_ERROR(EINVAL);
-
- switch (playing_mode) {
- case AWE_PLAY_DIRECT:
- case AWE_PLAY_INDIRECT:
- key = AWE_VOICE_KEY(voice);
- break;
-
- case AWE_PLAY_MULTI2:
- v2 = voice_alloc->map[voice] >> 8;
- voice_alloc->map[voice] = 0;
- voice = v2;
- if (voice < 0 || voice >= AWE_MAX_CHANNELS)
- return RET_ERROR(EINVAL);
- /* continue to below */
- default:
- key = AWE_CHAN_KEY(voice, note);
- break;
- }
-
- for (i = 0; i < awe_max_voices; i++) {
- if (voices[i].key == key)
- release_voice(i, TRUE);
- }
- return 0;
-}
-
-
-static void start_or_volume_change(int voice, int velocity)
-{
- voices[voice].velocity = velocity;
- awe_calc_volume(voice);
- if (voices[voice].state == AWE_ST_STANDBY)
- awe_note_on(voice);
- else if (voices[voice].state == AWE_ST_ON)
- awe_set_volume(voice, FALSE);
-}
-
-static void set_and_start_voice(int voice, int state)
-{
- /* calculate pitch & volume parameters */
- voices[voice].state = state;
- awe_calc_pitch(voice);
- awe_calc_volume(voice);
- if (state == AWE_ST_ON)
- awe_note_on(voice);
-}
-
-/* start a voice:
- * if note is 255, identical with aftertouch function.
- * Otherwise, start a voice with specified not and volume.
- */
-static int
-awe_start_note(int dev, int voice, int note, int velocity)
-{
- int i, key, state, volonly;
-
- AWE_DEBUG(2,printk("AWE32: [on(%d) nt=%d vl=%d]\n", voice, note, velocity));
- if (! voice_in_range(voice))
- return RET_ERROR(EINVAL);
-
- if (velocity == 0)
- state = AWE_ST_STANDBY; /* stand by for playing */
- else
- state = AWE_ST_ON; /* really play */
- volonly = FALSE;
-
- switch (playing_mode) {
- case AWE_PLAY_DIRECT:
- case AWE_PLAY_INDIRECT:
- key = AWE_VOICE_KEY(voice);
- if (note == 255)
- volonly = TRUE;
- break;
-
- case AWE_PLAY_MULTI2:
- voice = voice_alloc->map[voice] >> 8;
- if (voice < 0 || voice >= AWE_MAX_CHANNELS)
- return RET_ERROR(EINVAL);
- /* continue to below */
- default:
- if (note >= 128) { /* key volume mode */
- note -= 128;
- volonly = TRUE;
- }
- key = AWE_CHAN_KEY(voice, note);
- break;
- }
-
- /* dynamic volume change */
- if (volonly) {
- for (i = 0; i < awe_max_voices; i++) {
- if (voices[i].key == key)
- start_or_volume_change(i, velocity);
- }
- return 0;
- }
-
- /* if the same note still playing, stop it */
- for (i = 0; i < awe_max_voices; i++)
- if (voices[i].key == key) {
- if (voices[i].state == AWE_ST_ON) {
- awe_note_off(i);
- awe_voice_init(i, FALSE);
- } else if (voices[i].state == AWE_ST_STANDBY)
- awe_voice_init(i, TRUE);
- }
-
- /* allocate voices */
- if (playing_mode == AWE_PLAY_DIRECT)
- awe_alloc_one_voice(voice, note, velocity);
- else
- awe_alloc_multi_voices(voice, note, velocity, key);
-
- /* turn off other voices exlusively (for drums) */
- for (i = 0; i < awe_max_voices; i++)
- if (voices[i].key == key)
- awe_exclusive_off(i);
-
- /* set up pitch and volume parameters */
- for (i = 0; i < awe_max_voices; i++) {
- if (voices[i].key == key && voices[i].state == AWE_ST_OFF)
- set_and_start_voice(i, state);
- }
-
- return 0;
-}
-
-
-/* search instrument from preset table with the specified bank */
-static int
-awe_search_instr(int bank, int preset)
-{
- int i;
-
- for (i = preset_table[preset]; i >= 0; i = infos[i].next_bank) {
- if (infos[i].bank == bank)
- return i;
- }
- return -1;
-}
-
-
-/* assign the instrument to a voice */
-static int
-awe_set_instr_2(int dev, int voice, int instr_no)
-{
- if (playing_mode == AWE_PLAY_MULTI2) {
- voice = voice_alloc->map[voice] >> 8;
- if (voice < 0 || voice >= AWE_MAX_CHANNELS)
- return RET_ERROR(EINVAL);
- }
- return awe_set_instr(dev, voice, instr_no);
-}
-
-/* assign the instrument to a channel; voice is the channel number */
-static int
-awe_set_instr(int dev, int voice, int instr_no)
-{
- awe_chan_info *cinfo;
- int def_bank;
-
- if (! voice_in_range(voice))
- return RET_ERROR(EINVAL);
-
- if (instr_no < 0 || instr_no >= AWE_MAX_PRESETS)
- return RET_ERROR(EINVAL);
-
- cinfo = &channels[voice];
-
- if (MULTI_LAYER_MODE() && IS_DRUM_CHANNEL(voice))
- def_bank = AWE_DRUM_BANK; /* always search drumset */
- else
- def_bank = cinfo->bank;
-
- cinfo->vrec = -1;
- cinfo->def_vrec = -1;
- cinfo->vrec = awe_search_instr(def_bank, instr_no);
- if (def_bank == AWE_DRUM_BANK) /* search default drumset */
- cinfo->def_vrec = awe_search_instr(def_bank, misc_modes[AWE_MD_DEF_DRUM]);
- else /* search default preset */
- cinfo->def_vrec = awe_search_instr(misc_modes[AWE_MD_DEF_BANK], instr_no);
-
- if (cinfo->vrec < 0 && cinfo->def_vrec < 0) {
- AWE_DEBUG(1,printk("AWE32 Warning: can't find instrument %d\n", instr_no));
- }
-
- cinfo->instr = instr_no;
-
- return 0;
-}
-
-
-/* reset all voices; terminate sounds and initialize parameters */
-static void
-awe_reset(int dev)
-{
- int i;
- current_alloc_time = 0;
- /* don't turn off voice 31 and 32. they are used also for FM voices */
- for (i = 0; i < awe_max_voices; i++) {
- awe_terminate(i);
- awe_voice_init(i, TRUE);
- }
- for (i = 0; i < AWE_MAX_CHANNELS; i++)
- awe_channel_init(i, TRUE);
- for (i = 0; i < 16; i++) {
- awe_operations.chn_info[i].controllers[CTL_MAIN_VOLUME] = 127;
- awe_operations.chn_info[i].controllers[CTL_EXPRESSION] = 127;
- }
- awe_init_fm();
- awe_tweak();
-}
-
-
-/* hardware specific control:
- * GUS specific and AWE32 specific controls are available.
- */
-static void
-awe_hw_control(int dev, unsigned char *event)
-{
- int cmd = event[2];
- if (cmd & _AWE_MODE_FLAG)
- awe_hw_awe_control(dev, cmd & _AWE_MODE_VALUE_MASK, event);
-#ifdef AWE_HAS_GUS_COMPATIBILITY
- else
- awe_hw_gus_control(dev, cmd & _AWE_MODE_VALUE_MASK, event);
-#endif
-}
-
-
-#ifdef AWE_HAS_GUS_COMPATIBILITY
-
-/* GUS compatible controls */
-static void
-awe_hw_gus_control(int dev, int cmd, unsigned char *event)
-{
- int voice, i, key;
- unsigned short p1;
- short p2;
- int plong;
-
- if (MULTI_LAYER_MODE())
- return;
- if (cmd == _GUS_NUMVOICES)
- return;
-
- voice = event[3];
- if (! voice_in_range(voice))
- return;
-
- p1 = *(unsigned short *) &event[4];
- p2 = *(short *) &event[6];
- plong = *(int*) &event[4];
-
- switch (cmd) {
- case _GUS_VOICESAMPLE:
- awe_set_instr(dev, voice, p1);
- return;
-
- case _GUS_VOICEBALA:
- /* 0 to 15 --> -128 to 127 */
- awe_panning(dev, voice, ((int)p1 << 4) - 128);
- return;
-
- case _GUS_VOICEVOL:
- case _GUS_VOICEVOL2:
- /* not supported yet */
- return;
-
- case _GUS_RAMPRANGE:
- case _GUS_RAMPRATE:
- case _GUS_RAMPMODE:
- case _GUS_RAMPON:
- case _GUS_RAMPOFF:
- /* volume ramping not supported */
- return;
-
- case _GUS_VOLUME_SCALE:
- return;
-
- case _GUS_VOICE_POS:
- FX_SET(&channels[voice].fx, AWE_FX_SAMPLE_START,
- (short)(plong & 0x7fff));
- FX_SET(&channels[voice].fx, AWE_FX_COARSE_SAMPLE_START,
- (plong >> 15) & 0xffff);
- return;
- }
-
- key = AWE_VOICE_KEY(voice);
- for (i = 0; i < awe_max_voices; i++) {
- if (voices[i].key == key) {
- switch (cmd) {
- case _GUS_VOICEON:
- awe_note_on(i);
- break;
-
- case _GUS_VOICEOFF:
- awe_terminate(i);
- awe_fx_init(voices[i].ch);
- awe_voice_init(i, TRUE);
- break;
-
- case _GUS_VOICEFADE:
- awe_note_off(i);
- awe_fx_init(voices[i].ch);
- awe_voice_init(i, FALSE);
- break;
-
- case _GUS_VOICEFREQ:
- awe_calc_pitch_from_freq(i, plong);
- break;
- }
- }
- }
-}
-
-#endif
-
-
-/* AWE32 specific controls */
-static void
-awe_hw_awe_control(int dev, int cmd, unsigned char *event)
-{
- int voice;
- unsigned short p1;
- short p2;
- awe_chan_info *cinfo;
- FX_Rec *fx;
- int i;
-
- voice = event[3];
- if (! voice_in_range(voice))
- return;
-
- if (playing_mode == AWE_PLAY_MULTI2) {
- voice = voice_alloc->map[voice] >> 8;
- if (voice < 0 || voice >= AWE_MAX_CHANNELS)
- return;
- }
-
- p1 = *(unsigned short *) &event[4];
- p2 = *(short *) &event[6];
- cinfo = &channels[voice];
-
- switch (cmd) {
- case _AWE_DEBUG_MODE:
- debug_mode = p1;
- printk("AWE32: debug mode = %d\n", debug_mode);
- break;
- case _AWE_REVERB_MODE:
- awe_set_reverb_mode(p1);
- break;
-
- case _AWE_CHORUS_MODE:
- awe_set_chorus_mode(p1);
- break;
-
- case _AWE_REMOVE_LAST_SAMPLES:
- AWE_DEBUG(0,printk("AWE32: remove last samples\n"));
- if (locked_sf_id > 0)
- awe_remove_samples(locked_sf_id);
- break;
-
- case _AWE_INITIALIZE_CHIP:
- awe_initialize();
- break;
-
- case _AWE_SEND_EFFECT:
- fx = &cinfo->fx;
- i = FX_FLAG_SET;
- if (p1 >= 0x100) {
- int layer = (p1 >> 8);
- if (layer >= 0 && layer < MAX_LAYERS)
- fx = &cinfo->fx_layer[layer];
- p1 &= 0xff;
- }
- if (p1 & 0x40) i = FX_FLAG_OFF;
- if (p1 & 0x80) i = FX_FLAG_ADD;
- p1 &= 0x3f;
- if (p1 < AWE_FX_END) {
- AWE_DEBUG(0,printk("AWE32: effects (%d) %d %d\n", voice, p1, p2));
- if (i == FX_FLAG_SET)
- FX_SET(fx, p1, p2);
- else if (i == FX_FLAG_ADD)
- FX_ADD(fx, p1, p2);
- else
- FX_UNSET(fx, p1);
- if (i != FX_FLAG_OFF && parm_defs[p1].realtime) {
- AWE_DEBUG(0,printk("AWE32: fx_realtime (%d)\n", voice));
- awe_voice_change(voice, parm_defs[p1].realtime);
- }
- }
- break;
-
- case _AWE_RESET_CHANNEL:
- awe_channel_init(voice, !p1);
- break;
-
- case _AWE_TERMINATE_ALL:
- awe_reset(0);
- break;
-
- case _AWE_TERMINATE_CHANNEL:
- awe_voice_change(voice, awe_terminate_and_init);
- break;
-
- case _AWE_RELEASE_ALL:
- awe_note_off_all(FALSE);
- break;
- case _AWE_NOTEOFF_ALL:
- awe_note_off_all(TRUE);
- break;
-
- case _AWE_INITIAL_VOLUME:
- AWE_DEBUG(0,printk("AWE32: init attenuation %d\n", p1));
- if (p2 == 0) /* absolute value */
- init_atten = (short)p1;
- else /* relative value */
- init_atten = misc_modes[AWE_MD_ZERO_ATTEN] + (short)p1;
- if (init_atten < 0) init_atten = 0;
- for (i = 0; i < awe_max_voices; i++)
- awe_set_voice_vol(i, TRUE);
- break;
-
- case _AWE_CHN_PRESSURE:
- cinfo->chan_press = p1;
- p1 = p1 * misc_modes[AWE_MD_MOD_SENSE] / 1200;
- FX_ADD(&cinfo->fx, AWE_FX_LFO1_PITCH, p1);
- awe_voice_change(voice, awe_fx_fmmod);
- FX_ADD(&cinfo->fx, AWE_FX_LFO2_PITCH, p1);
- awe_voice_change(voice, awe_fx_fm2frq2);
- break;
-
- case _AWE_CHANNEL_MODE:
- AWE_DEBUG(0,printk("AWE32: channel mode = %d\n", p1));
- playing_mode = p1;
- awe_reset(0);
- break;
-
- case _AWE_DRUM_CHANNELS:
- AWE_DEBUG(0,printk("AWE32: drum flags = %x\n", p1));
- drum_flags = *(unsigned int*)&event[4];
- break;
-
- case _AWE_MISC_MODE:
- AWE_DEBUG(0,printk("AWE32: misc mode = %d %d\n", p1, p2));
- if (p1 > AWE_MD_VERSION && p1 < AWE_MD_END)
- misc_modes[p1] = p2;
- break;
-
- case _AWE_EQUALIZER:
- awe_equalizer((int)p1, (int)p2);
- break;
-
- default:
- AWE_DEBUG(0,printk("AWE32: hw control cmd=%d voice=%d\n", cmd, voice));
- break;
- }
-}
-
-
-/* voice pressure change */
-static void
-awe_aftertouch(int dev, int voice, int pressure)
-{
- int note;
-
- AWE_DEBUG(2,printk("AWE32: [after(%d) %d]\n", voice, pressure));
- if (! voice_in_range(voice))
- return;
-
- switch (playing_mode) {
- case AWE_PLAY_DIRECT:
- case AWE_PLAY_INDIRECT:
- awe_start_note(dev, voice, 255, pressure);
- break;
- case AWE_PLAY_MULTI2:
- note = (voice_alloc->map[voice] & 0xff) - 1;
- awe_start_note(dev, voice, note + 0x80, pressure);
- break;
- }
-}
-
-
-/* voice control change */
-static void
-awe_controller(int dev, int voice, int ctrl_num, int value)
-{
- int i;
- awe_chan_info *cinfo;
-
- if (! voice_in_range(voice))
- return;
-
- if (playing_mode == AWE_PLAY_MULTI2) {
- voice = voice_alloc->map[voice] >> 8;
- if (voice < 0 || voice >= AWE_MAX_CHANNELS)
- return;
- }
-
- cinfo = &channels[voice];
-
- switch (ctrl_num) {
- case CTL_BANK_SELECT: /* MIDI control #0 */
- AWE_DEBUG(2,printk("AWE32: [bank(%d) %d]\n", voice, value));
- if (MULTI_LAYER_MODE() && IS_DRUM_CHANNEL(voice) &&
- !misc_modes[AWE_MD_TOGGLE_DRUM_BANK])
- break;
- cinfo->bank = value;
- if (cinfo->bank == AWE_DRUM_BANK)
- DRUM_CHANNEL_ON(cinfo->channel);
- else
- DRUM_CHANNEL_OFF(cinfo->channel);
- awe_set_instr(dev, voice, cinfo->instr);
- break;
-
- case CTL_MODWHEEL: /* MIDI control #1 */
- AWE_DEBUG(2,printk("AWE32: [modwheel(%d) %d]\n", voice, value));
- i = value * misc_modes[AWE_MD_MOD_SENSE] / 1200;
- FX_ADD(&cinfo->fx, AWE_FX_LFO1_PITCH, i);
- awe_voice_change(voice, awe_fx_fmmod);
- FX_ADD(&cinfo->fx, AWE_FX_LFO2_PITCH, i);
- awe_voice_change(voice, awe_fx_fm2frq2);
- break;
-
- case CTRL_PITCH_BENDER: /* SEQ1 V2 contorl */
- AWE_DEBUG(2,printk("AWE32: [bend(%d) %d]\n", voice, value));
- /* zero centered */
- cinfo->bender = value;
- awe_voice_change(voice, awe_set_voice_pitch);
- break;
-
- case CTRL_PITCH_BENDER_RANGE: /* SEQ1 V2 control */
- AWE_DEBUG(2,printk("AWE32: [range(%d) %d]\n", voice, value));
- /* value = sense x 100 */
- cinfo->bender_range = value;
- /* no audible pitch change yet.. */
- break;
-
- case CTL_EXPRESSION: /* MIDI control #11 */
- if (SINGLE_LAYER_MODE())
- value /= 128;
- case CTRL_EXPRESSION: /* SEQ1 V2 control */
- AWE_DEBUG(2,printk("AWE32: [expr(%d) %d]\n", voice, value));
- /* 0 - 127 */
- cinfo->expression_vol = value;
- awe_voice_change(voice, awe_set_voice_vol);
- break;
-
- case CTL_PAN: /* MIDI control #10 */
- AWE_DEBUG(2,printk("AWE32: [pan(%d) %d]\n", voice, value));
- /* (0-127) -> signed 8bit */
- cinfo->panning = value * 2 - 128;
- if (misc_modes[AWE_MD_REALTIME_PAN])
- awe_voice_change(voice, awe_set_pan);
- break;
-
- case CTL_MAIN_VOLUME: /* MIDI control #7 */
- if (SINGLE_LAYER_MODE())
- value = (value * 100) / 16383;
- case CTRL_MAIN_VOLUME: /* SEQ1 V2 control */
- AWE_DEBUG(2,printk("AWE32: [mainvol(%d) %d]\n", voice, value));
- /* 0 - 127 */
- cinfo->main_vol = value;
- awe_voice_change(voice, awe_set_voice_vol);
- break;
-
- case CTL_EXT_EFF_DEPTH: /* reverb effects: 0-127 */
- AWE_DEBUG(2,printk("AWE32: [reverb(%d) %d]\n", voice, value));
- FX_SET(&cinfo->fx, AWE_FX_REVERB, value * 2);
- break;
-
- case CTL_CHORUS_DEPTH: /* chorus effects: 0-127 */
- AWE_DEBUG(2,printk("AWE32: [chorus(%d) %d]\n", voice, value));
- FX_SET(&cinfo->fx, AWE_FX_CHORUS, value * 2);
- break;
-
-#ifdef AWE_ACCEPT_ALL_SOUNDS_CONTROLL
- case 120: /* all sounds off */
- awe_note_off_all(FALSE);
- break;
- case 123: /* all notes off */
- awe_note_off_all(TRUE);
- break;
-#endif
-
- case CTL_SUSTAIN: /* MIDI control #64 */
- cinfo->sustained = value;
- if (value != 127)
- awe_voice_change(voice, awe_sustain_off);
- break;
-
- case CTL_SOSTENUTO: /* MIDI control #66 */
- if (value == 127)
- awe_voice_change(voice, awe_sostenuto_on);
- else
- awe_voice_change(voice, awe_sustain_off);
- break;
-
- default:
- AWE_DEBUG(0,printk("AWE32: [control(%d) ctrl=%d val=%d]\n",
- voice, ctrl_num, value));
- break;
- }
-}
-
-
-/* voice pan change (value = -128 - 127) */
-static void
-awe_panning(int dev, int voice, int value)
-{
- awe_chan_info *cinfo;
-
- if (! voice_in_range(voice))
- return;
-
- if (playing_mode == AWE_PLAY_MULTI2) {
- voice = voice_alloc->map[voice] >> 8;
- if (voice < 0 || voice >= AWE_MAX_CHANNELS)
- return;
- }
-
- cinfo = &channels[voice];
- cinfo->panning = value;
- AWE_DEBUG(2,printk("AWE32: [pan(%d) %d]\n", voice, cinfo->panning));
- if (misc_modes[AWE_MD_REALTIME_PAN])
- awe_voice_change(voice, awe_set_pan);
-}
-
-
-/* volume mode change */
-static void
-awe_volume_method(int dev, int mode)
-{
- /* not impremented */
- AWE_DEBUG(0,printk("AWE32: [volmethod mode=%d]\n", mode));
-}
-
-
-#ifndef AWE_NO_PATCHMGR
-/* patch manager */
-static int
-awe_patchmgr(int dev, struct patmgr_info *rec)
-{
- printk("AWE32 Warning: patch manager control not supported\n");
- return 0;
-}
-#endif
-
-
-/* pitch wheel change: 0-16384 */
-static void
-awe_bender(int dev, int voice, int value)
-{
- awe_chan_info *cinfo;
-
- if (! voice_in_range(voice))
- return;
-
- if (playing_mode == AWE_PLAY_MULTI2) {
- voice = voice_alloc->map[voice] >> 8;
- if (voice < 0 || voice >= AWE_MAX_CHANNELS)
- return;
- }
-
- /* convert to zero centered value */
- cinfo = &channels[voice];
- cinfo->bender = value - 8192;
- AWE_DEBUG(2,printk("AWE32: [bend(%d) %d]\n", voice, cinfo->bender));
- awe_voice_change(voice, awe_set_voice_pitch);
-}
-
-
-/*----------------------------------------------------------------
- * load a sound patch:
- * three types of patches are accepted: AWE, GUS, and SYSEX.
- *----------------------------------------------------------------*/
-
-static int
-awe_load_patch(int dev, int format, const char *addr,
- int offs, int count, int pmgr_flag)
-{
- awe_patch_info patch;
- int rc = 0;
-
-#ifdef AWE_HAS_GUS_COMPATIBILITY
- if (format == GUS_PATCH) {
- return awe_load_guspatch(addr, offs, count, pmgr_flag);
- } else
-#endif
- if (format == SYSEX_PATCH) {
- /* no system exclusive message supported yet */
- return 0;
- } else if (format != AWE_PATCH) {
- printk("AWE32 Error: Invalid patch format (key) 0x%x\n", format);
- return RET_ERROR(EINVAL);
- }
-
- if (count < AWE_PATCH_INFO_SIZE) {
- printk("AWE32 Error: Patch header too short\n");
- return RET_ERROR(EINVAL);
- }
- COPY_FROM_USER(((char*)&patch) + offs, addr, offs,
- AWE_PATCH_INFO_SIZE - offs);
-
- count -= AWE_PATCH_INFO_SIZE;
- if (count < patch.len) {
- printk("AWE32: sample: Patch record too short (%d<%d)\n",
- count, patch.len);
- return RET_ERROR(EINVAL);
- }
-
- switch (patch.type) {
- case AWE_LOAD_INFO:
- rc = awe_load_info(&patch, addr, count);
- break;
- case AWE_LOAD_DATA:
- rc = awe_load_data(&patch, addr, count);
- break;
- case AWE_OPEN_PATCH:
- rc = awe_open_patch(&patch, addr, count);
- break;
- case AWE_CLOSE_PATCH:
- rc = awe_close_patch(&patch, addr, count);
- break;
- case AWE_UNLOAD_PATCH:
- rc = awe_unload_patch(&patch, addr, count);
- break;
- case AWE_REPLACE_DATA:
- rc = awe_replace_data(&patch, addr, count);
- break;
- case AWE_MAP_PRESET:
- rc = awe_load_map(&patch, addr, count);
- break;
- case AWE_LOAD_CHORUS_FX:
- rc = awe_load_chorus_fx(&patch, addr, count);
- break;
- case AWE_LOAD_REVERB_FX:
- rc = awe_load_reverb_fx(&patch, addr, count);
- break;
-
- default:
- printk("AWE32 Error: unknown patch format type %d\n",
- patch.type);
- rc = RET_ERROR(EINVAL);
- }
-
- return rc;
-}
-
-
-/* create an sflist record */
-static int
-awe_create_sf(int type, char *name)
-{
- sf_list *rec;
-
- /* terminate sounds */
- awe_reset(0);
- if (current_sf_id >= max_sfs) {
- int newsize = max_sfs + AWE_MAX_SF_LISTS;
- sf_list *newlist = my_realloc(sflists, sizeof(sf_list)*max_sfs,
- sizeof(sf_list)*newsize);
- if (newlist == NULL)
- return 1;
- sflists = newlist;
- max_sfs = newsize;
- }
- rec = &sflists[current_sf_id];
- rec->sf_id = current_sf_id + 1;
- rec->type = type;
- if (current_sf_id == 0 || (type & AWE_PAT_LOCKED) != 0)
- locked_sf_id = current_sf_id + 1;
- /*
- if (name)
- MEMCPY(rec->name, name, AWE_PATCH_NAME_LEN);
- else
- BZERO(rec->name, AWE_PATCH_NAME_LEN);
- */
- rec->num_info = awe_free_info();
- rec->num_sample = awe_free_sample();
- rec->mem_ptr = awe_free_mem_ptr();
- rec->infos = -1;
- rec->samples = -1;
-
- current_sf_id++;
- return 0;
-}
-
-
-/* open patch; create sf list and set opened flag */
-static int
-awe_open_patch(awe_patch_info *patch, const char *addr, int count)
-{
- awe_open_parm parm;
- COPY_FROM_USER(&parm, addr, AWE_PATCH_INFO_SIZE, sizeof(parm));
- if (awe_create_sf(parm.type, parm.name)) {
- printk("AWE32: can't open: failed to alloc new list\n");
- return RET_ERROR(ENOSPC);
- }
- patch_opened = TRUE;
- return current_sf_id;
-}
-
-/* check if the patch is already opened */
-static int
-check_patch_opened(int type, char *name)
-{
- if (! patch_opened) {
- if (awe_create_sf(type, name)) {
- printk("AWE32: failed to alloc new list\n");
- return RET_ERROR(ENOSPC);
- }
- patch_opened = TRUE;
- return current_sf_id;
- }
- return current_sf_id;
-}
-
-/* close the patch; if no voice is loaded, remove the patch */
-static int
-awe_close_patch(awe_patch_info *patch, const char *addr, int count)
-{
- if (patch_opened && current_sf_id > 0) {
- /* if no voice is loaded, release the current patch */
- if (sflists[current_sf_id-1].infos == -1)
- awe_remove_samples(current_sf_id - 1);
- }
- patch_opened = 0;
- return 0;
-}
-
-
-/* remove the latest patch */
-static int
-awe_unload_patch(awe_patch_info *patch, const char *addr, int count)
-{
- if (current_sf_id > 0)
- awe_remove_samples(current_sf_id - 1);
- return 0;
-}
-
-/* allocate voice info list records */
-static int alloc_new_info(int nvoices)
-{
- int newsize, free_info;
- awe_voice_list *newlist;
- free_info = awe_free_info();
- if (free_info + nvoices >= max_infos) {
- do {
- newsize = max_infos + AWE_MAX_INFOS;
- } while (free_info + nvoices >= newsize);
- newlist = my_realloc(infos, sizeof(awe_voice_list)*max_infos,
- sizeof(awe_voice_list)*newsize);
- if (newlist == NULL) {
- printk("AWE32: can't alloc info table\n");
- return RET_ERROR(ENOSPC);
- }
- infos = newlist;
- max_infos = newsize;
- }
- return 0;
-}
-
-/* allocate sample info list records */
-static int alloc_new_sample(void)
-{
- int newsize, free_sample;
- awe_sample_list *newlist;
- free_sample = awe_free_sample();
- if (free_sample >= max_samples) {
- newsize = max_samples + AWE_MAX_SAMPLES;
- newlist = my_realloc(samples,
- sizeof(awe_sample_list)*max_samples,
- sizeof(awe_sample_list)*newsize);
- if (newlist == NULL) {
- printk("AWE32: can't alloc sample table\n");
- return RET_ERROR(ENOSPC);
- }
- samples = newlist;
- max_samples = newsize;
- }
- return 0;
-}
-
-/* load voice map */
-static int
-awe_load_map(awe_patch_info *patch, const char *addr, int count)
-{
- awe_voice_map map;
- awe_voice_list *rec;
- int free_info;
-
- if (check_patch_opened(AWE_PAT_TYPE_MAP, NULL) < 0)
- return RET_ERROR(ENOSPC);
- if (alloc_new_info(1) < 0)
- return RET_ERROR(ENOSPC);
-
- COPY_FROM_USER(&map, addr, AWE_PATCH_INFO_SIZE, sizeof(map));
-
- free_info = awe_free_info();
- rec = &infos[free_info];
- rec->bank = map.map_bank;
- rec->instr = map.map_instr;
- rec->type = V_ST_MAPPED;
- rec->disabled = FALSE;
- awe_init_voice_info(&rec->v);
- if (map.map_key >= 0) {
- rec->v.low = map.map_key;
- rec->v.high = map.map_key;
- }
- rec->v.start = map.src_instr;
- rec->v.end = map.src_bank;
- rec->v.fixkey = map.src_key;
- rec->v.sf_id = current_sf_id;
- add_info_list(free_info);
- add_sf_info(free_info);
-
- return 0;
-}
-
-/* load voice information data */
-static int
-awe_load_info(awe_patch_info *patch, const char *addr, int count)
-{
- int offset;
- awe_voice_rec_hdr hdr;
- int i;
- int total_size;
-
- if (count < AWE_VOICE_REC_SIZE) {
- printk("AWE32 Error: invalid patch info length\n");
- return RET_ERROR(EINVAL);
- }
-
- offset = AWE_PATCH_INFO_SIZE;
- COPY_FROM_USER((char*)&hdr, addr, offset, AWE_VOICE_REC_SIZE);
- offset += AWE_VOICE_REC_SIZE;
-
- if (hdr.nvoices <= 0 || hdr.nvoices >= 100) {
- printk("AWE32 Error: Illegal voice number %d\n", hdr.nvoices);
- return RET_ERROR(EINVAL);
- }
- total_size = AWE_VOICE_REC_SIZE + AWE_VOICE_INFO_SIZE * hdr.nvoices;
- if (count < total_size) {
- printk("AWE32 Error: patch length(%d) is smaller than nvoices(%d)\n",
- count, hdr.nvoices);
- return RET_ERROR(EINVAL);
- }
-
- if (check_patch_opened(AWE_PAT_TYPE_MISC, NULL) < 0)
- return RET_ERROR(ENOSPC);
-
-#if 0 /* it looks like not so useful.. */
- /* check if the same preset already exists in the info list */
- for (i = sflists[current_sf_id-1].infos; i >= 0; i = infos[i].next) {
- if (infos[i].disabled) continue;
- if (infos[i].bank == hdr.bank && infos[i].instr == hdr.instr) {
- /* in exclusive mode, do skip loading this */
- if (hdr.write_mode == AWE_WR_EXCLUSIVE)
- return 0;
- /* in replace mode, disable the old data */
- else if (hdr.write_mode == AWE_WR_REPLACE)
- infos[i].disabled = TRUE;
- }
- }
- if (hdr.write_mode == AWE_WR_REPLACE)
- rebuild_preset_list();
-#endif
-
- if (alloc_new_info(hdr.nvoices) < 0)
- return RET_ERROR(ENOSPC);
-
- for (i = 0; i < hdr.nvoices; i++) {
- int rec = awe_free_info();
-
- infos[rec].bank = hdr.bank;
- infos[rec].instr = hdr.instr;
- infos[rec].type = V_ST_NORMAL;
- infos[rec].disabled = FALSE;
-
- /* copy awe_voice_info parameters */
- COPY_FROM_USER(&infos[rec].v, addr, offset, AWE_VOICE_INFO_SIZE);
- offset += AWE_VOICE_INFO_SIZE;
- infos[rec].v.sf_id = current_sf_id;
- if (infos[rec].v.mode & AWE_MODE_INIT_PARM)
- awe_init_voice_parm(&infos[rec].v.parm);
- awe_set_sample(&infos[rec].v);
- add_info_list(rec);
- add_sf_info(rec);
- }
-
- return 0;
-}
-
-/* load wave sample data */
-static int
-awe_load_data(awe_patch_info *patch, const char *addr, int count)
-{
- int offset, size;
- int rc, free_sample;
- awe_sample_info *rec;
-
- if (check_patch_opened(AWE_PAT_TYPE_MISC, NULL) < 0)
- return RET_ERROR(ENOSPC);
-
- if (alloc_new_sample() < 0)
- return RET_ERROR(ENOSPC);
-
- free_sample = awe_free_sample();
- rec = &samples[free_sample].v;
-
- size = (count - AWE_SAMPLE_INFO_SIZE) / 2;
- offset = AWE_PATCH_INFO_SIZE;
- COPY_FROM_USER(rec, addr, offset, AWE_SAMPLE_INFO_SIZE);
- offset += AWE_SAMPLE_INFO_SIZE;
- if (size != rec->size) {
- printk("AWE32: load: sample size differed (%d != %d)\n",
- rec->size, size);
- return RET_ERROR(EINVAL);
- }
- if (rec->size > 0)
- if ((rc = awe_write_wave_data(addr, offset, rec, -1)) != 0)
- return rc;
-
- rec->sf_id = current_sf_id;
-
- add_sf_sample(free_sample);
-
- return 0;
-}
-
-
-/* replace wave sample data */
-static int
-awe_replace_data(awe_patch_info *patch, const char *addr, int count)
-{
- int offset;
- int size;
- int rc, i;
- int channels;
- awe_sample_info cursmp;
- int save_mem_ptr;
-
- if (! patch_opened) {
- printk("AWE32: replace: patch not opened\n");
- return RET_ERROR(EINVAL);
- }
-
- size = (count - AWE_SAMPLE_INFO_SIZE) / 2;
- offset = AWE_PATCH_INFO_SIZE;
- COPY_FROM_USER(&cursmp, addr, offset, AWE_SAMPLE_INFO_SIZE);
- offset += AWE_SAMPLE_INFO_SIZE;
- if (cursmp.size == 0 || size != cursmp.size) {
- printk("AWE32: replace: illegal sample size (%d!=%d)\n",
- cursmp.size, size);
- return RET_ERROR(EINVAL);
- }
- channels = patch->optarg;
- if (channels <= 0 || channels > AWE_NORMAL_VOICES) {
- printk("AWE32: replace: illegal channels %d\n", channels);
- return RET_ERROR(EINVAL);
- }
-
- for (i = sflists[current_sf_id-1].samples;
- i >= 0; i = samples[i].next) {
- if (samples[i].v.sample == cursmp.sample)
- break;
- }
- if (i < 0) {
- printk("AWE32: replace: cannot find existing sample data %d\n",
- cursmp.sample);
- return RET_ERROR(EINVAL);
- }
-
- if (samples[i].v.size != cursmp.size) {
- printk("AWE32: replace: exiting size differed (%d!=%d)\n",
- samples[i].v.size, cursmp.size);
- return RET_ERROR(EINVAL);
- }
-
- save_mem_ptr = awe_free_mem_ptr();
- sflists[current_sf_id-1].mem_ptr = samples[i].v.start - awe_mem_start;
- MEMCPY(&samples[i].v, &cursmp, sizeof(cursmp));
- if ((rc = awe_write_wave_data(addr, offset, &samples[i].v, channels)) != 0)
- return rc;
- sflists[current_sf_id-1].mem_ptr = save_mem_ptr;
- samples[i].v.sf_id = current_sf_id;
-
- return 0;
-}
-
-
-/*----------------------------------------------------------------*/
-
-static const char *readbuf_addr;
-static int readbuf_offs;
-static int readbuf_flags;
-#ifdef __FreeBSD__
-static unsigned short *readbuf_loop;
-static int readbuf_loopstart, readbuf_loopend;
-#endif
-
-/* initialize read buffer */
-static int
-readbuf_init(const char *addr, int offset, awe_sample_info *sp)
-{
-#ifdef __FreeBSD__
- readbuf_loop = NULL;
- readbuf_loopstart = sp->loopstart;
- readbuf_loopend = sp->loopend;
- if (sp->mode_flags & (AWE_SAMPLE_BIDIR_LOOP|AWE_SAMPLE_REVERSE_LOOP)) {
- int looplen = sp->loopend - sp->loopstart;
- readbuf_loop = my_malloc(looplen * 2);
- if (readbuf_loop == NULL) {
- printk("AWE32: can't malloc temp buffer\n");
- return RET_ERROR(ENOSPC);
- }
- }
-#endif
- readbuf_addr = addr;
- readbuf_offs = offset;
- readbuf_flags = sp->mode_flags;
- return 0;
-}
-
-/* read directly from user buffer */
-static unsigned short
-readbuf_word(int pos)
-{
- unsigned short c;
- /* read from user buffer */
- if (readbuf_flags & AWE_SAMPLE_8BITS) {
- unsigned char cc;
- GET_BYTE_FROM_USER(cc, readbuf_addr, readbuf_offs + pos);
- c = cc << 8; /* convert 8bit -> 16bit */
- } else {
- GET_SHORT_FROM_USER(c, readbuf_addr, readbuf_offs + pos * 2);
- }
- if (readbuf_flags & AWE_SAMPLE_UNSIGNED)
- c ^= 0x8000; /* unsigned -> signed */
-#ifdef __FreeBSD__
- /* write on cache for reverse loop */
- if (readbuf_flags & (AWE_SAMPLE_BIDIR_LOOP|AWE_SAMPLE_REVERSE_LOOP)) {
- if (pos >= readbuf_loopstart && pos < readbuf_loopend)
- readbuf_loop[pos - readbuf_loopstart] = c;
- }
-#endif
- return c;
-}
-
-#ifdef __FreeBSD__
-/* read from cache */
-static unsigned short
-readbuf_word_cache(int pos)
-{
- if (pos >= readbuf_loopstart && pos < readbuf_loopend)
- return readbuf_loop[pos - readbuf_loopstart];
- return 0;
-}
-
-static void
-readbuf_end(void)
-{
- if (readbuf_loop) {
- my_free(readbuf_loop);
- }
- readbuf_loop = NULL;
-}
-
-#else
-
-#define readbuf_word_cache readbuf_word
-#define readbuf_end() /**/
-
-#endif
-
-/*----------------------------------------------------------------*/
-
-#define BLANK_LOOP_START 8
-#define BLANK_LOOP_END 40
-#define BLANK_LOOP_SIZE 48
-
-/* loading onto memory */
-static int
-awe_write_wave_data(const char *addr, int offset, awe_sample_info *sp, int channels)
-{
- int i, truesize, dram_offset;
- int rc;
-
- /* be sure loop points start < end */
- if (sp->loopstart > sp->loopend) {
- int tmp = sp->loopstart;
- sp->loopstart = sp->loopend;
- sp->loopend = tmp;
- }
-
- /* compute true data size to be loaded */
- truesize = sp->size;
- if (sp->mode_flags & AWE_SAMPLE_BIDIR_LOOP)
- truesize += sp->loopend - sp->loopstart;
- if (sp->mode_flags & AWE_SAMPLE_NO_BLANK)
- truesize += BLANK_LOOP_SIZE;
- if (awe_free_mem_ptr() + truesize >= awe_mem_size/2) {
- printk("AWE32 Error: Sample memory full\n");
- return RET_ERROR(ENOSPC);
- }
-
- /* recalculate address offset */
- sp->end -= sp->start;
- sp->loopstart -= sp->start;
- sp->loopend -= sp->start;
-
- dram_offset = awe_free_mem_ptr() + awe_mem_start;
- sp->start = dram_offset;
- sp->end += dram_offset;
- sp->loopstart += dram_offset;
- sp->loopend += dram_offset;
-
- /* set the total size (store onto obsolete checksum value) */
- if (sp->size == 0)
- sp->checksum = 0;
- else
- sp->checksum = truesize;
-
- if ((rc = awe_open_dram_for_write(dram_offset, channels)) != 0)
- return rc;
-
- if (readbuf_init(addr, offset, sp) < 0)
- return RET_ERROR(ENOSPC);
-
- for (i = 0; i < sp->size; i++) {
- unsigned short c;
- c = readbuf_word(i);
- awe_write_dram(c);
- if (i == sp->loopend &&
- (sp->mode_flags & (AWE_SAMPLE_BIDIR_LOOP|AWE_SAMPLE_REVERSE_LOOP))) {
- int looplen = sp->loopend - sp->loopstart;
- /* copy reverse loop */
- int k;
- for (k = 1; k <= looplen; k++) {
- c = readbuf_word_cache(i - k);
- awe_write_dram(c);
- }
- if (sp->mode_flags & AWE_SAMPLE_BIDIR_LOOP) {
- sp->end += looplen;
- } else {
- sp->start += looplen;
- sp->end += looplen;
- }
- }
- }
- readbuf_end();
-
- /* if no blank loop is attached in the sample, add it */
- if (sp->mode_flags & AWE_SAMPLE_NO_BLANK) {
- for (i = 0; i < BLANK_LOOP_SIZE; i++)
- awe_write_dram(0);
- if (sp->mode_flags & AWE_SAMPLE_SINGLESHOT) {
- sp->loopstart = sp->end + BLANK_LOOP_START;
- sp->loopend = sp->end + BLANK_LOOP_END;
- }
- }
-
- sflists[current_sf_id-1].mem_ptr += truesize;
- awe_close_dram();
-
- /* initialize FM */
- awe_init_fm();
-
- return 0;
-}
-
-
-/*----------------------------------------------------------------*/
-
-#ifdef AWE_HAS_GUS_COMPATIBILITY
-
-/* calculate GUS envelope time:
- * is this correct? i have no idea..
- */
-static int
-calc_gus_envelope_time(int rate, int start, int end)
-{
- int r, p, t;
- r = (3 - ((rate >> 6) & 3)) * 3;
- p = rate & 0x3f;
- t = end - start;
- if (t < 0) t = -t;
- if (13 > r)
- t = t << (13 - r);
- else
- t = t >> (r - 13);
- return (t * 10) / (p * 441);
-}
-
-#define calc_gus_sustain(val) (0x7f - vol_table[(val)/2])
-#define calc_gus_attenuation(val) vol_table[(val)/2]
-
-/* load GUS patch */
-static int
-awe_load_guspatch(const char *addr, int offs, int size, int pmgr_flag)
-{
- struct patch_info patch;
- awe_voice_info *rec;
- awe_sample_info *smp;
- int sizeof_patch;
- int note, free_sample, free_info;
- int rc;
-
- sizeof_patch = offsetof(struct patch_info, data); /* header size */
- if (size < sizeof_patch) {
- printk("AWE32 Error: Patch header too short\n");
- return RET_ERROR(EINVAL);
- }
- COPY_FROM_USER(((char*)&patch) + offs, addr, offs, sizeof_patch - offs);
- size -= sizeof_patch;
- if (size < patch.len) {
- printk("AWE32 Warning: Patch record too short (%d<%ld)\n",
- size, patch.len);
- return RET_ERROR(EINVAL);
- }
- if (check_patch_opened(AWE_PAT_TYPE_GUS, NULL) < 0)
- return RET_ERROR(ENOSPC);
- if (alloc_new_sample() < 0)
- return RET_ERROR(ENOSPC);
- if (alloc_new_info(1))
- return RET_ERROR(ENOSPC);
-
- free_sample = awe_free_sample();
- smp = &samples[free_sample].v;
-
- smp->sample = free_sample;
- smp->start = 0;
- smp->end = patch.len;
- smp->loopstart = patch.loop_start;
- smp->loopend = patch.loop_end;
- smp->size = patch.len;
-
- /* set up mode flags */
- smp->mode_flags = 0;
- if (!(patch.mode & WAVE_16_BITS))
- smp->mode_flags |= AWE_SAMPLE_8BITS;
- if (patch.mode & WAVE_UNSIGNED)
- smp->mode_flags |= AWE_SAMPLE_UNSIGNED;
- smp->mode_flags |= AWE_SAMPLE_NO_BLANK;
- if (!(patch.mode & (WAVE_LOOPING|WAVE_BIDIR_LOOP|WAVE_LOOP_BACK)))
- smp->mode_flags |= AWE_SAMPLE_SINGLESHOT;
- if (patch.mode & WAVE_BIDIR_LOOP)
- smp->mode_flags |= AWE_SAMPLE_BIDIR_LOOP;
- if (patch.mode & WAVE_LOOP_BACK)
- smp->mode_flags |= AWE_SAMPLE_REVERSE_LOOP;
-
- AWE_DEBUG(0,printk("AWE32: [sample %d mode %x]\n", patch.instr_no, smp->mode_flags));
- if (patch.mode & WAVE_16_BITS) {
- /* convert to word offsets */
- smp->size /= 2;
- smp->end /= 2;
- smp->loopstart /= 2;
- smp->loopend /= 2;
- }
- smp->checksum_flag = 0;
- smp->checksum = 0;
-
- if ((rc = awe_write_wave_data(addr, sizeof_patch, smp, -1)) != 0)
- return rc;
-
- smp->sf_id = current_sf_id;
- add_sf_sample(free_sample);
-
- /* set up voice info */
- free_info = awe_free_info();
- rec = &infos[free_info].v;
- awe_init_voice_info(rec);
- rec->sample = free_sample; /* the last sample */
- rec->rate_offset = calc_rate_offset(patch.base_freq);
- note = freq_to_note(patch.base_note);
- rec->root = note / 100;
- rec->tune = -(note % 100);
- rec->low = freq_to_note(patch.low_note) / 100;
- rec->high = freq_to_note(patch.high_note) / 100;
- AWE_DEBUG(1,printk("AWE32: [gus base offset=%d, note=%d, range=%d-%d(%lu-%lu)]\n",
- rec->rate_offset, note,
- rec->low, rec->high,
- patch.low_note, patch.high_note));
- /* panning position; -128 - 127 => 0-127 */
- rec->pan = (patch.panning + 128) / 2;
-
- /* detuning is ignored */
- /* 6points volume envelope */
- if (patch.mode & WAVE_ENVELOPES) {
- int attack, hold, decay, release;
- attack = calc_gus_envelope_time
- (patch.env_rate[0], 0, patch.env_offset[0]);
- hold = calc_gus_envelope_time
- (patch.env_rate[1], patch.env_offset[0],
- patch.env_offset[1]);
- decay = calc_gus_envelope_time
- (patch.env_rate[2], patch.env_offset[1],
- patch.env_offset[2]);
- release = calc_gus_envelope_time
- (patch.env_rate[3], patch.env_offset[1],
- patch.env_offset[4]);
- release += calc_gus_envelope_time
- (patch.env_rate[4], patch.env_offset[3],
- patch.env_offset[4]);
- release += calc_gus_envelope_time
- (patch.env_rate[5], patch.env_offset[4],
- patch.env_offset[5]);
- rec->parm.volatkhld = (calc_parm_attack(attack) << 8) |
- calc_parm_hold(hold);
- rec->parm.voldcysus = (calc_gus_sustain(patch.env_offset[2]) << 8) |
- calc_parm_decay(decay);
- rec->parm.volrelease = 0x8000 | calc_parm_decay(release);
- AWE_DEBUG(2,printk("AWE32: [gusenv atk=%d, hld=%d, dcy=%d, rel=%d]\n", attack, hold, decay, release));
- rec->attenuation = calc_gus_attenuation(patch.env_offset[0]);
- }
-
- /* tremolo effect */
- if (patch.mode & WAVE_TREMOLO) {
- int rate = (patch.tremolo_rate * 1000 / 38) / 42;
- rec->parm.tremfrq = ((patch.tremolo_depth / 2) << 8) | rate;
- AWE_DEBUG(2,printk("AWE32: [gusenv tremolo rate=%d, dep=%d, tremfrq=%x]\n",
- patch.tremolo_rate, patch.tremolo_depth,
- rec->parm.tremfrq));
- }
- /* vibrato effect */
- if (patch.mode & WAVE_VIBRATO) {
- int rate = (patch.vibrato_rate * 1000 / 38) / 42;
- rec->parm.fm2frq2 = ((patch.vibrato_depth / 6) << 8) | rate;
- AWE_DEBUG(2,printk("AWE32: [gusenv vibrato rate=%d, dep=%d, tremfrq=%x]\n",
- patch.tremolo_rate, patch.tremolo_depth,
- rec->parm.tremfrq));
- }
-
- /* scale_freq, scale_factor, volume, and fractions not implemented */
-
- /* append to the tail of the list */
- infos[free_info].bank = misc_modes[AWE_MD_GUS_BANK];
- infos[free_info].instr = patch.instr_no;
- infos[free_info].disabled = FALSE;
- infos[free_info].type = V_ST_NORMAL;
- infos[free_info].v.sf_id = current_sf_id;
-
- add_info_list(free_info);
- add_sf_info(free_info);
-
- /* set the voice index */
- awe_set_sample(rec);
-
- return 0;
-}
-
-#endif /* AWE_HAS_GUS_COMPATIBILITY */
-
-/*----------------------------------------------------------------
- * sample and voice list handlers
- *----------------------------------------------------------------*/
-
-/* append this to the sf list */
-static void add_sf_info(int rec)
-{
- int sf_id = infos[rec].v.sf_id;
- if (sf_id == 0) return;
- sf_id--;
- if (sflists[sf_id].infos < 0)
- sflists[sf_id].infos = rec;
- else {
- int i, prev;
- prev = sflists[sf_id].infos;
- while ((i = infos[prev].next) >= 0)
- prev = i;
- infos[prev].next = rec;
- }
- infos[rec].next = -1;
- sflists[sf_id].num_info++;
-}
-
-/* prepend this sample to sf list */
-static void add_sf_sample(int rec)
-{
- int sf_id = samples[rec].v.sf_id;
- if (sf_id == 0) return;
- sf_id--;
- samples[rec].next = sflists[sf_id].samples;
- sflists[sf_id].samples = rec;
- sflists[sf_id].num_sample++;
-}
-
-/* purge the old records which don't belong with the same file id */
-static void purge_old_list(int rec, int next)
-{
- infos[rec].next_instr = next;
- if (infos[rec].bank == AWE_DRUM_BANK) {
- /* remove samples with the same note range */
- int cur, *prevp = &infos[rec].next_instr;
- int low = infos[rec].v.low;
- int high = infos[rec].v.high;
- for (cur = next; cur >= 0; cur = infos[cur].next_instr) {
- if (infos[cur].v.low == low &&
- infos[cur].v.high == high &&
- infos[cur].v.sf_id != infos[rec].v.sf_id)
- *prevp = infos[cur].next_instr;
- prevp = &infos[cur].next_instr;
- }
- } else {
- if (infos[next].v.sf_id != infos[rec].v.sf_id)
- infos[rec].next_instr = -1;
- }
-}
-
-/* prepend to top of the preset table */
-static void add_info_list(int rec)
-{
- int *prevp, cur;
- int instr = infos[rec].instr;
- int bank = infos[rec].bank;
-
- if (infos[rec].disabled)
- return;
-
- prevp = &preset_table[instr];
- cur = *prevp;
- while (cur >= 0) {
- /* search the first record with the same bank number */
- if (infos[cur].bank == bank) {
- /* replace the list with the new record */
- infos[rec].next_bank = infos[cur].next_bank;
- *prevp = rec;
- purge_old_list(rec, cur);
- return;
- }
- prevp = &infos[cur].next_bank;
- cur = infos[cur].next_bank;
- }
-
- /* this is the first bank record.. just add this */
- infos[rec].next_instr = -1;
- infos[rec].next_bank = preset_table[instr];
- preset_table[instr] = rec;
-}
-
-/* remove samples later than the specified sf_id */
-static void
-awe_remove_samples(int sf_id)
-{
- if (sf_id <= 0) {
- awe_reset_samples();
- return;
- }
- /* already removed? */
- if (current_sf_id <= sf_id)
- return;
-
- current_sf_id = sf_id;
- if (locked_sf_id > sf_id)
- locked_sf_id = sf_id;
-
- rebuild_preset_list();
-}
-
-/* rebuild preset search list */
-static void rebuild_preset_list(void)
-{
- int i, j;
-
- for (i = 0; i < AWE_MAX_PRESETS; i++)
- preset_table[i] = -1;
-
- for (i = 0; i < current_sf_id; i++) {
- for (j = sflists[i].infos; j >= 0; j = infos[j].next)
- add_info_list(j);
- }
-}
-
-/* search the specified sample */
-static short
-awe_set_sample(awe_voice_info *vp)
-{
- int i;
- vp->index = -1;
- for (i = sflists[vp->sf_id-1].samples; i >= 0; i = samples[i].next) {
- if (samples[i].v.sample == vp->sample) {
- /* set the actual sample offsets */
- vp->start += samples[i].v.start;
- vp->end += samples[i].v.end;
- vp->loopstart += samples[i].v.loopstart;
- vp->loopend += samples[i].v.loopend;
- /* copy mode flags */
- vp->mode = samples[i].v.mode_flags;
- /* set index */
- vp->index = i;
- return i;
- }
- }
- return -1;
-}
-
-
-/*----------------------------------------------------------------
- * voice allocation
- *----------------------------------------------------------------*/
-
-/* look for all voices associated with the specified note & velocity */
-static int
-awe_search_multi_voices(int rec, int note, int velocity, awe_voice_info **vlist)
-{
- int nvoices;
-
- nvoices = 0;
- for (; rec >= 0; rec = infos[rec].next_instr) {
- if (note >= infos[rec].v.low &&
- note <= infos[rec].v.high &&
- velocity >= infos[rec].v.vellow &&
- velocity <= infos[rec].v.velhigh) {
- vlist[nvoices] = &infos[rec].v;
- if (infos[rec].type == V_ST_MAPPED) /* mapper */
- return -1;
- nvoices++;
- if (nvoices >= AWE_MAX_VOICES)
- break;
- }
- }
- return nvoices;
-}
-
-/* store the voice list from the specified note and velocity.
- if the preset is mapped, seek for the destination preset, and rewrite
- the note number if necessary.
- */
-static int
-really_alloc_voices(int vrec, int def_vrec, int *note, int velocity, awe_voice_info **vlist, int level)
-{
- int nvoices;
-
- nvoices = awe_search_multi_voices(vrec, *note, velocity, vlist);
- if (nvoices == 0)
- nvoices = awe_search_multi_voices(def_vrec, *note, velocity, vlist);
- if (nvoices < 0) { /* mapping */
- int preset = vlist[0]->start;
- int bank = vlist[0]->end;
- int key = vlist[0]->fixkey;
- if (level > 5) {
- printk("AWE32: too deep mapping level\n");
- return 0;
- }
- vrec = awe_search_instr(bank, preset);
- if (bank == AWE_DRUM_BANK)
- def_vrec = awe_search_instr(bank, 0);
- else
- def_vrec = awe_search_instr(0, preset);
- if (key >= 0)
- *note = key;
- return really_alloc_voices(vrec, def_vrec, note, velocity, vlist, level+1);
- }
-
- return nvoices;
-}
-
-/* allocate voices corresponding note and velocity; supports multiple insts. */
-static void
-awe_alloc_multi_voices(int ch, int note, int velocity, int key)
-{
- int i, v, nvoices;
- awe_voice_info *vlist[AWE_MAX_VOICES];
-
- if (channels[ch].vrec < 0 && channels[ch].def_vrec < 0)
- awe_set_instr(0, ch, channels[ch].instr);
-
- /* check the possible voices; note may be changeable if mapped */
- nvoices = really_alloc_voices(channels[ch].vrec, channels[ch].def_vrec,
- &note, velocity, vlist, 0);
-
- /* set the voices */
- current_alloc_time++;
- for (i = 0; i < nvoices; i++) {
- v = awe_clear_voice();
- voices[v].key = key;
- voices[v].ch = ch;
- voices[v].note = note;
- voices[v].velocity = velocity;
- voices[v].time = current_alloc_time;
- voices[v].cinfo = &channels[ch];
- voices[v].sample = vlist[i];
- voices[v].state = AWE_ST_MARK;
- voices[v].layer = nvoices - i - 1; /* in reverse order */
- }
-
- /* clear the mark in allocated voices */
- for (i = 0; i < awe_max_voices; i++) {
- if (voices[i].state == AWE_ST_MARK)
- voices[i].state = AWE_ST_OFF;
-
- }
-}
-
-
-/* search the best voice from the specified status condition */
-static int
-search_best_voice(int condition)
-{
- int i, time, best;
- best = -1;
- time = current_alloc_time + 1;
- for (i = 0; i < awe_max_voices; i++) {
- if ((voices[i].state & condition) &&
- (best < 0 || voices[i].time < time)) {
- best = i;
- time = voices[i].time;
- }
- }
- /* clear voice */
- if (best >= 0) {
- if (voices[best].state != AWE_ST_OFF)
- awe_terminate(best);
- awe_voice_init(best, TRUE);
- }
-
- return best;
-}
-
-/* search an empty voice.
- if no empty voice is found, at least terminate a voice
- */
-static int
-awe_clear_voice(void)
-{
- int best;
-
- /* looking for the oldest empty voice */
- if ((best = search_best_voice(AWE_ST_OFF)) >= 0)
- return best;
- if ((best = search_best_voice(AWE_ST_RELEASED)) >= 0)
- return best;
- /* looking for the oldest sustained voice */
- if ((best = search_best_voice(AWE_ST_SUSTAINED)) >= 0)
- return best;
-
-#ifdef AWE_LOOKUP_MIDI_PRIORITY
- if (MULTI_LAYER_MODE() && misc_modes[AWE_MD_CHN_PRIOR]) {
- int ch = -1;
- int time = current_alloc_time + 1;
- int i;
- /* looking for the voices from high channel (except drum ch) */
- for (i = 0; i < awe_max_voices; i++) {
- if (IS_DRUM_CHANNEL(voices[i].ch)) continue;
- if (voices[i].ch < ch) continue;
- if (voices[i].state != AWE_ST_MARK &&
- (voices[i].ch > ch || voices[i].time < time)) {
- best = i;
- time = voices[i].time;
- ch = voices[i].ch;
- }
- }
- }
-#endif
- if (best < 0)
- best = search_best_voice(~AWE_ST_MARK);
-
- if (best >= 0)
- return best;
-
- return 0;
-}
-
-
-/* search sample for the specified note & velocity and set it on the voice;
- * note that voice is the voice index (not channel index)
- */
-static void
-awe_alloc_one_voice(int voice, int note, int velocity)
-{
- int ch, nvoices;
- awe_voice_info *vlist[AWE_MAX_VOICES];
-
- ch = voices[voice].ch;
- if (channels[ch].vrec < 0 && channels[ch].def_vrec < 0)
- awe_set_instr(0, ch, channels[ch].instr);
-
- nvoices = really_alloc_voices(voices[voice].cinfo->vrec,
- voices[voice].cinfo->def_vrec,
- &note, velocity, vlist, 0);
- if (nvoices > 0) {
- voices[voice].time = ++current_alloc_time;
- voices[voice].sample = vlist[0]; /* use the first one */
- voices[voice].layer = 0;
- voices[voice].note = note;
- voices[voice].velocity = velocity;
- }
-}
-
-
-/*----------------------------------------------------------------
- * sequencer2 functions
- *----------------------------------------------------------------*/
-
-/* search an empty voice; used by sequencer2 */
-static int
-awe_alloc(int dev, int chn, int note, struct voice_alloc_info *alloc)
-{
- playing_mode = AWE_PLAY_MULTI2;
- awe_info.nr_voices = AWE_MAX_CHANNELS;
- return awe_clear_voice();
-}
-
-
-/* set up voice; used by sequencer2 */
-static void
-awe_setup_voice(int dev, int voice, int chn)
-{
- struct channel_info *info;
- if (synth_devs[dev] == NULL ||
- (info = &synth_devs[dev]->chn_info[chn]) == NULL)
- return;
-
- if (voice < 0 || voice >= awe_max_voices)
- return;
-
- AWE_DEBUG(2,printk("AWE32: [setup(%d) ch=%d]\n", voice, chn));
- channels[chn].expression_vol = info->controllers[CTL_EXPRESSION];
- channels[chn].main_vol = info->controllers[CTL_MAIN_VOLUME];
- channels[chn].panning =
- info->controllers[CTL_PAN] * 2 - 128; /* signed 8bit */
- channels[chn].bender = info->bender_value; /* zero center */
- channels[chn].bank = info->controllers[CTL_BANK_SELECT];
- channels[chn].sustained = info->controllers[CTL_SUSTAIN];
- if (info->controllers[CTL_EXT_EFF_DEPTH]) {
- FX_SET(&channels[chn].fx, AWE_FX_REVERB,
- info->controllers[CTL_EXT_EFF_DEPTH] * 2);
- }
- if (info->controllers[CTL_CHORUS_DEPTH]) {
- FX_SET(&channels[chn].fx, AWE_FX_CHORUS,
- info->controllers[CTL_CHORUS_DEPTH] * 2);
- }
- awe_set_instr(dev, chn, info->pgm_num);
-}
-
-
-#ifdef CONFIG_AWE32_MIXER
-/*================================================================
- * AWE32 mixer device control
- *================================================================*/
-
-static int
-awe_mixer_ioctl(int dev, unsigned int cmd, caddr_t arg)
-{
- int i, level;
-
- if (((cmd >> 8) & 0xff) != 'M')
- return RET_ERROR(EINVAL);
-
- level = (int)IOCTL_IN(arg);
- level = ((level & 0xff) + (level >> 8)) / 2;
- AWE_DEBUG(0,printk("AWEMix: cmd=%x val=%d\n", cmd & 0xff, level));
-
- if (IO_WRITE_CHECK(cmd)) {
- switch (cmd & 0xff) {
- case SOUND_MIXER_BASS:
- awe_bass_level = level * 12 / 100;
- if (awe_bass_level >= 12)
- awe_bass_level = 11;
- awe_equalizer(awe_bass_level, awe_treble_level);
- break;
- case SOUND_MIXER_TREBLE:
- awe_treble_level = level * 12 / 100;
- if (awe_treble_level >= 12)
- awe_treble_level = 11;
- awe_equalizer(awe_bass_level, awe_treble_level);
- break;
- case SOUND_MIXER_VOLUME:
- level = level * 127 / 100;
- if (level >= 128) level = 127;
- init_atten = vol_table[level];
- for (i = 0; i < awe_max_voices; i++)
- awe_set_voice_vol(i, TRUE);
- break;
- }
- }
- switch (cmd & 0xff) {
- case SOUND_MIXER_BASS:
- level = awe_bass_level * 100 / 24;
- level = (level << 8) | level;
- break;
- case SOUND_MIXER_TREBLE:
- level = awe_treble_level * 100 / 24;
- level = (level << 8) | level;
- break;
- case SOUND_MIXER_VOLUME:
- for (i = 127; i > 0; i--) {
- if (init_atten <= vol_table[i])
- break;
- }
- level = i * 100 / 127;
- level = (level << 8) | level;
- break;
- case SOUND_MIXER_DEVMASK:
- level = SOUND_MASK_BASS|SOUND_MASK_TREBLE|SOUND_MASK_VOLUME;
- break;
- default:
- level = 0;
- break;
- }
- return IOCTL_OUT(arg, level);
-}
-#endif /* CONFIG_AWE32_MIXER */
-
-
-/*================================================================
- * initialization of AWE32
- *================================================================*/
-
-/* intiailize audio channels */
-static void
-awe_init_audio(void)
-{
- int ch;
-
- /* turn off envelope engines */
- for (ch = 0; ch < AWE_MAX_VOICES; ch++) {
- awe_poke(AWE_DCYSUSV(ch), 0x80);
- }
-
- /* reset all other parameters to zero */
- for (ch = 0; ch < AWE_MAX_VOICES; ch++) {
- awe_poke(AWE_ENVVOL(ch), 0);
- awe_poke(AWE_ENVVAL(ch), 0);
- awe_poke(AWE_DCYSUS(ch), 0);
- awe_poke(AWE_ATKHLDV(ch), 0);
- awe_poke(AWE_LFO1VAL(ch), 0);
- awe_poke(AWE_ATKHLD(ch), 0);
- awe_poke(AWE_LFO2VAL(ch), 0);
- awe_poke(AWE_IP(ch), 0);
- awe_poke(AWE_IFATN(ch), 0);
- awe_poke(AWE_PEFE(ch), 0);
- awe_poke(AWE_FMMOD(ch), 0);
- awe_poke(AWE_TREMFRQ(ch), 0);
- awe_poke(AWE_FM2FRQ2(ch), 0);
- awe_poke_dw(AWE_PTRX(ch), 0);
- awe_poke_dw(AWE_VTFT(ch), 0);
- awe_poke_dw(AWE_PSST(ch), 0);
- awe_poke_dw(AWE_CSL(ch), 0);
- awe_poke_dw(AWE_CCCA(ch), 0);
- }
-
- for (ch = 0; ch < AWE_MAX_VOICES; ch++) {
- awe_poke_dw(AWE_CPF(ch), 0);
- awe_poke_dw(AWE_CVCF(ch), 0);
- }
-}
-
-
-/* initialize DMA address */
-static void
-awe_init_dma(void)
-{
- awe_poke_dw(AWE_SMALR, 0);
- awe_poke_dw(AWE_SMARR, 0);
- awe_poke_dw(AWE_SMALW, 0);
- awe_poke_dw(AWE_SMARW, 0);
-}
-
-
-/* initialization arrays; from ADIP */
-
-static unsigned short init1[128] = {
- 0x03ff, 0x0030, 0x07ff, 0x0130, 0x0bff, 0x0230, 0x0fff, 0x0330,
- 0x13ff, 0x0430, 0x17ff, 0x0530, 0x1bff, 0x0630, 0x1fff, 0x0730,
- 0x23ff, 0x0830, 0x27ff, 0x0930, 0x2bff, 0x0a30, 0x2fff, 0x0b30,
- 0x33ff, 0x0c30, 0x37ff, 0x0d30, 0x3bff, 0x0e30, 0x3fff, 0x0f30,
-
- 0x43ff, 0x0030, 0x47ff, 0x0130, 0x4bff, 0x0230, 0x4fff, 0x0330,
- 0x53ff, 0x0430, 0x57ff, 0x0530, 0x5bff, 0x0630, 0x5fff, 0x0730,
- 0x63ff, 0x0830, 0x67ff, 0x0930, 0x6bff, 0x0a30, 0x6fff, 0x0b30,
- 0x73ff, 0x0c30, 0x77ff, 0x0d30, 0x7bff, 0x0e30, 0x7fff, 0x0f30,
-
- 0x83ff, 0x0030, 0x87ff, 0x0130, 0x8bff, 0x0230, 0x8fff, 0x0330,
- 0x93ff, 0x0430, 0x97ff, 0x0530, 0x9bff, 0x0630, 0x9fff, 0x0730,
- 0xa3ff, 0x0830, 0xa7ff, 0x0930, 0xabff, 0x0a30, 0xafff, 0x0b30,
- 0xb3ff, 0x0c30, 0xb7ff, 0x0d30, 0xbbff, 0x0e30, 0xbfff, 0x0f30,
-
- 0xc3ff, 0x0030, 0xc7ff, 0x0130, 0xcbff, 0x0230, 0xcfff, 0x0330,
- 0xd3ff, 0x0430, 0xd7ff, 0x0530, 0xdbff, 0x0630, 0xdfff, 0x0730,
- 0xe3ff, 0x0830, 0xe7ff, 0x0930, 0xebff, 0x0a30, 0xefff, 0x0b30,
- 0xf3ff, 0x0c30, 0xf7ff, 0x0d30, 0xfbff, 0x0e30, 0xffff, 0x0f30,
-};
-
-static unsigned short init2[128] = {
- 0x03ff, 0x8030, 0x07ff, 0x8130, 0x0bff, 0x8230, 0x0fff, 0x8330,
- 0x13ff, 0x8430, 0x17ff, 0x8530, 0x1bff, 0x8630, 0x1fff, 0x8730,
- 0x23ff, 0x8830, 0x27ff, 0x8930, 0x2bff, 0x8a30, 0x2fff, 0x8b30,
- 0x33ff, 0x8c30, 0x37ff, 0x8d30, 0x3bff, 0x8e30, 0x3fff, 0x8f30,
-
- 0x43ff, 0x8030, 0x47ff, 0x8130, 0x4bff, 0x8230, 0x4fff, 0x8330,
- 0x53ff, 0x8430, 0x57ff, 0x8530, 0x5bff, 0x8630, 0x5fff, 0x8730,
- 0x63ff, 0x8830, 0x67ff, 0x8930, 0x6bff, 0x8a30, 0x6fff, 0x8b30,
- 0x73ff, 0x8c30, 0x77ff, 0x8d30, 0x7bff, 0x8e30, 0x7fff, 0x8f30,
-
- 0x83ff, 0x8030, 0x87ff, 0x8130, 0x8bff, 0x8230, 0x8fff, 0x8330,
- 0x93ff, 0x8430, 0x97ff, 0x8530, 0x9bff, 0x8630, 0x9fff, 0x8730,
- 0xa3ff, 0x8830, 0xa7ff, 0x8930, 0xabff, 0x8a30, 0xafff, 0x8b30,
- 0xb3ff, 0x8c30, 0xb7ff, 0x8d30, 0xbbff, 0x8e30, 0xbfff, 0x8f30,
-
- 0xc3ff, 0x8030, 0xc7ff, 0x8130, 0xcbff, 0x8230, 0xcfff, 0x8330,
- 0xd3ff, 0x8430, 0xd7ff, 0x8530, 0xdbff, 0x8630, 0xdfff, 0x8730,
- 0xe3ff, 0x8830, 0xe7ff, 0x8930, 0xebff, 0x8a30, 0xefff, 0x8b30,
- 0xf3ff, 0x8c30, 0xf7ff, 0x8d30, 0xfbff, 0x8e30, 0xffff, 0x8f30,
-};
-
-static unsigned short init3[128] = {
- 0x0C10, 0x8470, 0x14FE, 0xB488, 0x167F, 0xA470, 0x18E7, 0x84B5,
- 0x1B6E, 0x842A, 0x1F1D, 0x852A, 0x0DA3, 0x8F7C, 0x167E, 0xF254,
- 0x0000, 0x842A, 0x0001, 0x852A, 0x18E6, 0x8BAA, 0x1B6D, 0xF234,
- 0x229F, 0x8429, 0x2746, 0x8529, 0x1F1C, 0x86E7, 0x229E, 0xF224,
-
- 0x0DA4, 0x8429, 0x2C29, 0x8529, 0x2745, 0x87F6, 0x2C28, 0xF254,
- 0x383B, 0x8428, 0x320F, 0x8528, 0x320E, 0x8F02, 0x1341, 0xF264,
- 0x3EB6, 0x8428, 0x3EB9, 0x8528, 0x383A, 0x8FA9, 0x3EB5, 0xF294,
- 0x3EB7, 0x8474, 0x3EBA, 0x8575, 0x3EB8, 0xC4C3, 0x3EBB, 0xC5C3,
-
- 0x0000, 0xA404, 0x0001, 0xA504, 0x141F, 0x8671, 0x14FD, 0x8287,
- 0x3EBC, 0xE610, 0x3EC8, 0x8C7B, 0x031A, 0x87E6, 0x3EC8, 0x86F7,
- 0x3EC0, 0x821E, 0x3EBE, 0xD208, 0x3EBD, 0x821F, 0x3ECA, 0x8386,
- 0x3EC1, 0x8C03, 0x3EC9, 0x831E, 0x3ECA, 0x8C4C, 0x3EBF, 0x8C55,
-
- 0x3EC9, 0xC208, 0x3EC4, 0xBC84, 0x3EC8, 0x8EAD, 0x3EC8, 0xD308,
- 0x3EC2, 0x8F7E, 0x3ECB, 0x8219, 0x3ECB, 0xD26E, 0x3EC5, 0x831F,
- 0x3EC6, 0xC308, 0x3EC3, 0xB2FF, 0x3EC9, 0x8265, 0x3EC9, 0x8319,
- 0x1342, 0xD36E, 0x3EC7, 0xB3FF, 0x0000, 0x8365, 0x1420, 0x9570,
-};
-
-static unsigned short init4[128] = {
- 0x0C10, 0x8470, 0x14FE, 0xB488, 0x167F, 0xA470, 0x18E7, 0x84B5,
- 0x1B6E, 0x842A, 0x1F1D, 0x852A, 0x0DA3, 0x0F7C, 0x167E, 0x7254,
- 0x0000, 0x842A, 0x0001, 0x852A, 0x18E6, 0x0BAA, 0x1B6D, 0x7234,
- 0x229F, 0x8429, 0x2746, 0x8529, 0x1F1C, 0x06E7, 0x229E, 0x7224,
-
- 0x0DA4, 0x8429, 0x2C29, 0x8529, 0x2745, 0x07F6, 0x2C28, 0x7254,
- 0x383B, 0x8428, 0x320F, 0x8528, 0x320E, 0x0F02, 0x1341, 0x7264,
- 0x3EB6, 0x8428, 0x3EB9, 0x8528, 0x383A, 0x0FA9, 0x3EB5, 0x7294,
- 0x3EB7, 0x8474, 0x3EBA, 0x8575, 0x3EB8, 0x44C3, 0x3EBB, 0x45C3,
-
- 0x0000, 0xA404, 0x0001, 0xA504, 0x141F, 0x0671, 0x14FD, 0x0287,
- 0x3EBC, 0xE610, 0x3EC8, 0x0C7B, 0x031A, 0x07E6, 0x3EC8, 0x86F7,
- 0x3EC0, 0x821E, 0x3EBE, 0xD208, 0x3EBD, 0x021F, 0x3ECA, 0x0386,
- 0x3EC1, 0x0C03, 0x3EC9, 0x031E, 0x3ECA, 0x8C4C, 0x3EBF, 0x0C55,
-
- 0x3EC9, 0xC208, 0x3EC4, 0xBC84, 0x3EC8, 0x0EAD, 0x3EC8, 0xD308,
- 0x3EC2, 0x8F7E, 0x3ECB, 0x0219, 0x3ECB, 0xD26E, 0x3EC5, 0x031F,
- 0x3EC6, 0xC308, 0x3EC3, 0x32FF, 0x3EC9, 0x0265, 0x3EC9, 0x8319,
- 0x1342, 0xD36E, 0x3EC7, 0x33FF, 0x0000, 0x8365, 0x1420, 0x9570,
-};
-
-
-/* send initialization arrays to start up */
-static void
-awe_init_array(void)
-{
- awe_send_array(init1);
- awe_wait(1024);
- awe_send_array(init2);
- awe_send_array(init3);
- awe_poke_dw(AWE_HWCF4, 0);
- awe_poke_dw(AWE_HWCF5, 0x83);
- awe_poke_dw(AWE_HWCF6, 0x8000);
- awe_send_array(init4);
-}
-
-/* send an initialization array */
-static void
-awe_send_array(unsigned short *data)
-{
- int i;
- unsigned short *p;
-
- p = data;
- for (i = 0; i < AWE_MAX_VOICES; i++, p++)
- awe_poke(AWE_INIT1(i), *p);
- for (i = 0; i < AWE_MAX_VOICES; i++, p++)
- awe_poke(AWE_INIT2(i), *p);
- for (i = 0; i < AWE_MAX_VOICES; i++, p++)
- awe_poke(AWE_INIT3(i), *p);
- for (i = 0; i < AWE_MAX_VOICES; i++, p++)
- awe_poke(AWE_INIT4(i), *p);
-}
-
-
-/*
- * set up awe32 channels to some known state.
- */
-
-/* set the envelope & LFO parameters to the default values; see ADIP */
-static void
-awe_tweak_voice(int i)
-{
- /* set all mod/vol envelope shape to minimum */
- awe_poke(AWE_ENVVOL(i), 0x8000);
- awe_poke(AWE_ENVVAL(i), 0x8000);
- awe_poke(AWE_DCYSUS(i), 0x7F7F);
- awe_poke(AWE_ATKHLDV(i), 0x7F7F);
- awe_poke(AWE_ATKHLD(i), 0x7F7F);
- awe_poke(AWE_PEFE(i), 0); /* mod envelope height to zero */
- awe_poke(AWE_LFO1VAL(i), 0x8000); /* no delay for LFO1 */
- awe_poke(AWE_LFO2VAL(i), 0x8000);
- awe_poke(AWE_IP(i), 0xE000); /* no pitch shift */
- awe_poke(AWE_IFATN(i), 0xFF00); /* volume to minimum */
- awe_poke(AWE_FMMOD(i), 0);
- awe_poke(AWE_TREMFRQ(i), 0);
- awe_poke(AWE_FM2FRQ2(i), 0);
-}
-
-static void
-awe_tweak(void)
-{
- int i;
- /* reset all channels */
- for (i = 0; i < awe_max_voices; i++)
- awe_tweak_voice(i);
-}
-
-
-/*
- * initializes the FM section of AWE32;
- * see Vince Vu's unofficial AWE32 programming guide
- */
-
-static void
-awe_init_fm(void)
-{
-#ifndef AWE_ALWAYS_INIT_FM
- /* if no extended memory is on board.. */
- if (awe_mem_size <= 0)
- return;
-#endif
- AWE_DEBUG(3,printk("AWE32: initializing FM\n"));
-
- /* Initialize the last two channels for DRAM refresh and producing
- the reverb and chorus effects for Yamaha OPL-3 synthesizer */
-
- /* 31: FM left channel, 0xffffe0-0xffffe8 */
- awe_poke(AWE_DCYSUSV(30), 0x80);
- awe_poke_dw(AWE_PSST(30), 0xFFFFFFE0); /* full left */
- awe_poke_dw(AWE_CSL(30), 0x00FFFFE8 |
- (DEF_FM_CHORUS_DEPTH << 24));
- awe_poke_dw(AWE_PTRX(30), (DEF_FM_REVERB_DEPTH << 8));
- awe_poke_dw(AWE_CPF(30), 0);
- awe_poke_dw(AWE_CCCA(30), 0x00FFFFE3);
-
- /* 32: FM right channel, 0xfffff0-0xfffff8 */
- awe_poke(AWE_DCYSUSV(31), 0x80);
- awe_poke_dw(AWE_PSST(31), 0x00FFFFF0); /* full right */
- awe_poke_dw(AWE_CSL(31), 0x00FFFFF8 |
- (DEF_FM_CHORUS_DEPTH << 24));
- awe_poke_dw(AWE_PTRX(31), (DEF_FM_REVERB_DEPTH << 8));
- awe_poke_dw(AWE_CPF(31), 0x8000);
- awe_poke_dw(AWE_CCCA(31), 0x00FFFFF3);
-
- /* skew volume & cutoff */
- awe_poke_dw(AWE_VTFT(30), 0x8000FFFF);
- awe_poke_dw(AWE_VTFT(31), 0x8000FFFF);
-
- voices[30].state = AWE_ST_FM;
- voices[31].state = AWE_ST_FM;
-
- /* change maximum channels to 30 */
- awe_max_voices = AWE_NORMAL_VOICES;
- if (playing_mode == AWE_PLAY_DIRECT)
- awe_info.nr_voices = awe_max_voices;
- else
- awe_info.nr_voices = AWE_MAX_CHANNELS;
- voice_alloc->max_voice = awe_max_voices;
-}
-
-/*
- * AWE32 DRAM access routines
- */
-
-/* open DRAM write accessing mode */
-static int
-awe_open_dram_for_write(int offset, int channels)
-{
- int vidx[AWE_NORMAL_VOICES];
- int i;
-
- if (channels < 0 || channels >= AWE_NORMAL_VOICES) {
- channels = AWE_NORMAL_VOICES;
- for (i = 0; i < AWE_NORMAL_VOICES; i++)
- vidx[i] = i;
- } else {
- for (i = 0; i < channels; i++)
- vidx[i] = awe_clear_voice();
- }
-
- /* use all channels for DMA transfer */
- for (i = 0; i < channels; i++) {
- if (vidx[i] < 0) continue;
- awe_poke(AWE_DCYSUSV(vidx[i]), 0x80);
- awe_poke_dw(AWE_VTFT(vidx[i]), 0);
- awe_poke_dw(AWE_CVCF(vidx[i]), 0);
- awe_poke_dw(AWE_PTRX(vidx[i]), 0x40000000);
- awe_poke_dw(AWE_CPF(vidx[i]), 0x40000000);
- awe_poke_dw(AWE_PSST(vidx[i]), 0);
- awe_poke_dw(AWE_CSL(vidx[i]), 0);
- awe_poke_dw(AWE_CCCA(vidx[i]), 0x06000000);
- voices[vidx[i]].state = AWE_ST_DRAM;
- }
- /* point channels 31 & 32 to ROM samples for DRAM refresh */
- awe_poke_dw(AWE_VTFT(30), 0);
- awe_poke_dw(AWE_PSST(30), 0x1d8);
- awe_poke_dw(AWE_CSL(30), 0x1e0);
- awe_poke_dw(AWE_CCCA(30), 0x1d8);
- awe_poke_dw(AWE_VTFT(31), 0);
- awe_poke_dw(AWE_PSST(31), 0x1d8);
- awe_poke_dw(AWE_CSL(31), 0x1e0);
- awe_poke_dw(AWE_CCCA(31), 0x1d8);
- voices[30].state = AWE_ST_FM;
- voices[31].state = AWE_ST_FM;
-
- /* if full bit is on, not ready to write on */
- if (awe_peek_dw(AWE_SMALW) & 0x80000000) {
- for (i = 0; i < channels; i++) {
- awe_poke_dw(AWE_CCCA(vidx[i]), 0);
- voices[i].state = AWE_ST_OFF;
- }
- return RET_ERROR(ENOSPC);
- }
-
- /* set address to write */
- awe_poke_dw(AWE_SMALW, offset);
-
- return 0;
-}
-
-/* open DRAM for RAM size detection */
-static void
-awe_open_dram_for_check(void)
-{
- int i;
- for (i = 0; i < AWE_NORMAL_VOICES; i++) {
- awe_poke(AWE_DCYSUSV(i), 0x80);
- awe_poke_dw(AWE_VTFT(i), 0);
- awe_poke_dw(AWE_CVCF(i), 0);
- awe_poke_dw(AWE_PTRX(i), 0x40000000);
- awe_poke_dw(AWE_CPF(i), 0x40000000);
- awe_poke_dw(AWE_PSST(i), 0);
- awe_poke_dw(AWE_CSL(i), 0);
- if (i & 1) /* DMA write */
- awe_poke_dw(AWE_CCCA(i), 0x06000000);
- else /* DMA read */
- awe_poke_dw(AWE_CCCA(i), 0x04000000);
- voices[i].state = AWE_ST_DRAM;
- }
-}
-
-
-/* close dram access */
-static void
-awe_close_dram(void)
-{
- int i;
- /* wait until FULL bit in SMAxW register be false */
- for (i = 0; i < 10000; i++) {
- if (!(awe_peek_dw(AWE_SMALW) & 0x80000000))
- break;
- awe_wait(10);
- }
-
- for (i = 0; i < AWE_NORMAL_VOICES; i++) {
- if (voices[i].state == AWE_ST_DRAM) {
- awe_poke_dw(AWE_CCCA(i), 0);
- awe_poke(AWE_DCYSUSV(i), 0x807F);
- voices[i].state = AWE_ST_OFF;
- }
- }
-}
-
-
-/*================================================================
- * detect presence of AWE32 and check memory size
- *================================================================*/
-
-/* detect emu8000 chip on the specified address; from VV's guide */
-
-static int
-awe_detect_base(int addr)
-{
- awe_base = addr;
- if ((awe_peek(AWE_U1) & 0x000F) != 0x000C)
- return 0;
- if ((awe_peek(AWE_HWCF1) & 0x007E) != 0x0058)
- return 0;
- if ((awe_peek(AWE_HWCF2) & 0x0003) != 0x0003)
- return 0;
- AWE_DEBUG(0,printk("AWE32 found at %x\n", awe_base));
- return 1;
-}
-
-static int
-awe_detect(void)
-{
- int base;
- if (awe_base == 0) {
- for (base = 0x620; base <= 0x680; base += 0x20)
- if (awe_detect_base(base))
- return 1;
- AWE_DEBUG(0,printk("AWE32 not found\n"));
- return 0;
- }
- return 1;
-}
-
-
-/*================================================================
- * check dram size on AWE board
- *================================================================*/
-
-/* any three numbers you like */
-#define UNIQUE_ID1 0x1234
-#define UNIQUE_ID2 0x4321
-#define UNIQUE_ID3 0xFFFF
-
-static int
-awe_check_dram(void)
-{
- if (awe_mem_size > 0) {
- awe_mem_size *= 1024; /* convert to Kbytes */
- return awe_mem_size;
- }
-
- awe_open_dram_for_check();
-
- awe_mem_size = 0;
-
- /* set up unique two id numbers */
- awe_poke_dw(AWE_SMALW, AWE_DRAM_OFFSET);
- awe_poke(AWE_SMLD, UNIQUE_ID1);
- awe_poke(AWE_SMLD, UNIQUE_ID2);
-
- while (awe_mem_size < AWE_MAX_DRAM_SIZE) {
- awe_wait(2);
- /* read a data on the DRAM start address */
- awe_poke_dw(AWE_SMALR, AWE_DRAM_OFFSET);
- awe_peek(AWE_SMLD); /* discard stale data */
- if (awe_peek(AWE_SMLD) != UNIQUE_ID1)
- break;
- if (awe_peek(AWE_SMLD) != UNIQUE_ID2)
- break;
- awe_mem_size += 32; /* increment 32 Kbytes */
- /* Write a unique data on the test address;
- * if the address is out of range, the data is written on
- * 0x200000(=AWE_DRAM_OFFSET). Then the two id words are
- * broken by this data.
- */
- awe_poke_dw(AWE_SMALW, AWE_DRAM_OFFSET + awe_mem_size*512L);
- awe_poke(AWE_SMLD, UNIQUE_ID3);
- awe_wait(2);
- /* read a data on the just written DRAM address */
- awe_poke_dw(AWE_SMALR, AWE_DRAM_OFFSET + awe_mem_size*512L);
- awe_peek(AWE_SMLD); /* discard stale data */
- if (awe_peek(AWE_SMLD) != UNIQUE_ID3)
- break;
- }
- awe_close_dram();
-
- AWE_DEBUG(0,printk("AWE32: %d Kbytes memory detected\n", awe_mem_size));
-
- /* convert to Kbytes */
- awe_mem_size *= 1024;
- return awe_mem_size;
-}
-
-
-/*================================================================
- * chorus and reverb controls; from VV's guide
- *================================================================*/
-
-/* 5 parameters for each chorus mode; 3 x 16bit, 2 x 32bit */
-static char chorus_defined[AWE_CHORUS_NUMBERS];
-static awe_chorus_fx_rec chorus_parm[AWE_CHORUS_NUMBERS] = {
- {0xE600, 0x03F6, 0xBC2C ,0x00000000, 0x0000006D}, /* chorus 1 */
- {0xE608, 0x031A, 0xBC6E, 0x00000000, 0x0000017C}, /* chorus 2 */
- {0xE610, 0x031A, 0xBC84, 0x00000000, 0x00000083}, /* chorus 3 */
- {0xE620, 0x0269, 0xBC6E, 0x00000000, 0x0000017C}, /* chorus 4 */
- {0xE680, 0x04D3, 0xBCA6, 0x00000000, 0x0000005B}, /* feedback */
- {0xE6E0, 0x044E, 0xBC37, 0x00000000, 0x00000026}, /* flanger */
- {0xE600, 0x0B06, 0xBC00, 0x0000E000, 0x00000083}, /* short delay */
- {0xE6C0, 0x0B06, 0xBC00, 0x0000E000, 0x00000083}, /* short delay + feedback */
-};
-
-static int
-awe_load_chorus_fx(awe_patch_info *patch, const char *addr, int count)
-{
- if (patch->optarg < AWE_CHORUS_PREDEFINED || patch->optarg >= AWE_CHORUS_NUMBERS) {
- printk("AWE32 Error: illegal chorus mode %d for uploading\n", patch->optarg);
- return RET_ERROR(EINVAL);
- }
- if (count < sizeof(awe_chorus_fx_rec)) {
- printk("AWE32 Error: too short chorus fx parameters\n");
- return RET_ERROR(EINVAL);
- }
- COPY_FROM_USER(&chorus_parm[patch->optarg], addr, AWE_PATCH_INFO_SIZE,
- sizeof(awe_chorus_fx_rec));
- chorus_defined[patch->optarg] = TRUE;
- return 0;
-}
-
-static void
-awe_set_chorus_mode(int effect)
-{
- if (effect < 0 || effect >= AWE_CHORUS_NUMBERS ||
- (effect >= AWE_CHORUS_PREDEFINED && !chorus_defined[effect]))
- return;
- awe_poke(AWE_INIT3(9), chorus_parm[effect].feedback);
- awe_poke(AWE_INIT3(12), chorus_parm[effect].delay_offset);
- awe_poke(AWE_INIT4(3), chorus_parm[effect].lfo_depth);
- awe_poke_dw(AWE_HWCF4, chorus_parm[effect].delay);
- awe_poke_dw(AWE_HWCF5, chorus_parm[effect].lfo_freq);
- awe_poke_dw(AWE_HWCF6, 0x8000);
- awe_poke_dw(AWE_HWCF7, 0x0000);
- chorus_mode = effect;
-}
-
-/*----------------------------------------------------------------*/
-
-/* reverb mode settings; write the following 28 data of 16 bit length
- * on the corresponding ports in the reverb_cmds array
- */
-static char reverb_defined[AWE_CHORUS_NUMBERS];
-static awe_reverb_fx_rec reverb_parm[AWE_REVERB_NUMBERS] = {
-{{ /* room 1 */
- 0xB488, 0xA450, 0x9550, 0x84B5, 0x383A, 0x3EB5, 0x72F4,
- 0x72A4, 0x7254, 0x7204, 0x7204, 0x7204, 0x4416, 0x4516,
- 0xA490, 0xA590, 0x842A, 0x852A, 0x842A, 0x852A, 0x8429,
- 0x8529, 0x8429, 0x8529, 0x8428, 0x8528, 0x8428, 0x8528,
-}},
-{{ /* room 2 */
- 0xB488, 0xA458, 0x9558, 0x84B5, 0x383A, 0x3EB5, 0x7284,
- 0x7254, 0x7224, 0x7224, 0x7254, 0x7284, 0x4448, 0x4548,
- 0xA440, 0xA540, 0x842A, 0x852A, 0x842A, 0x852A, 0x8429,
- 0x8529, 0x8429, 0x8529, 0x8428, 0x8528, 0x8428, 0x8528,
-}},
-{{ /* room 3 */
- 0xB488, 0xA460, 0x9560, 0x84B5, 0x383A, 0x3EB5, 0x7284,
- 0x7254, 0x7224, 0x7224, 0x7254, 0x7284, 0x4416, 0x4516,
- 0xA490, 0xA590, 0x842C, 0x852C, 0x842C, 0x852C, 0x842B,
- 0x852B, 0x842B, 0x852B, 0x842A, 0x852A, 0x842A, 0x852A,
-}},
-{{ /* hall 1 */
- 0xB488, 0xA470, 0x9570, 0x84B5, 0x383A, 0x3EB5, 0x7284,
- 0x7254, 0x7224, 0x7224, 0x7254, 0x7284, 0x4448, 0x4548,
- 0xA440, 0xA540, 0x842B, 0x852B, 0x842B, 0x852B, 0x842A,
- 0x852A, 0x842A, 0x852A, 0x8429, 0x8529, 0x8429, 0x8529,
-}},
-{{ /* hall 2 */
- 0xB488, 0xA470, 0x9570, 0x84B5, 0x383A, 0x3EB5, 0x7254,
- 0x7234, 0x7224, 0x7254, 0x7264, 0x7294, 0x44C3, 0x45C3,
- 0xA404, 0xA504, 0x842A, 0x852A, 0x842A, 0x852A, 0x8429,
- 0x8529, 0x8429, 0x8529, 0x8428, 0x8528, 0x8428, 0x8528,
-}},
-{{ /* plate */
- 0xB4FF, 0xA470, 0x9570, 0x84B5, 0x383A, 0x3EB5, 0x7234,
- 0x7234, 0x7234, 0x7234, 0x7234, 0x7234, 0x4448, 0x4548,
- 0xA440, 0xA540, 0x842A, 0x852A, 0x842A, 0x852A, 0x8429,
- 0x8529, 0x8429, 0x8529, 0x8428, 0x8528, 0x8428, 0x8528,
-}},
-{{ /* delay */
- 0xB4FF, 0xA470, 0x9500, 0x84B5, 0x333A, 0x39B5, 0x7204,
- 0x7204, 0x7204, 0x7204, 0x7204, 0x72F4, 0x4400, 0x4500,
- 0xA4FF, 0xA5FF, 0x8420, 0x8520, 0x8420, 0x8520, 0x8420,
- 0x8520, 0x8420, 0x8520, 0x8420, 0x8520, 0x8420, 0x8520,
-}},
-{{ /* panning delay */
- 0xB4FF, 0xA490, 0x9590, 0x8474, 0x333A, 0x39B5, 0x7204,
- 0x7204, 0x7204, 0x7204, 0x7204, 0x72F4, 0x4400, 0x4500,
- 0xA4FF, 0xA5FF, 0x8420, 0x8520, 0x8420, 0x8520, 0x8420,
- 0x8520, 0x8420, 0x8520, 0x8420, 0x8520, 0x8420, 0x8520,
-}},
-};
-
-static struct ReverbCmdPair {
- unsigned short cmd, port;
-} reverb_cmds[28] = {
- {AWE_INIT1(0x03)}, {AWE_INIT1(0x05)}, {AWE_INIT4(0x1F)}, {AWE_INIT1(0x07)},
- {AWE_INIT2(0x14)}, {AWE_INIT2(0x16)}, {AWE_INIT1(0x0F)}, {AWE_INIT1(0x17)},
- {AWE_INIT1(0x1F)}, {AWE_INIT2(0x07)}, {AWE_INIT2(0x0F)}, {AWE_INIT2(0x17)},
- {AWE_INIT2(0x1D)}, {AWE_INIT2(0x1F)}, {AWE_INIT3(0x01)}, {AWE_INIT3(0x03)},
- {AWE_INIT1(0x09)}, {AWE_INIT1(0x0B)}, {AWE_INIT1(0x11)}, {AWE_INIT1(0x13)},
- {AWE_INIT1(0x19)}, {AWE_INIT1(0x1B)}, {AWE_INIT2(0x01)}, {AWE_INIT2(0x03)},
- {AWE_INIT2(0x09)}, {AWE_INIT2(0x0B)}, {AWE_INIT2(0x11)}, {AWE_INIT2(0x13)},
-};
-
-static int
-awe_load_reverb_fx(awe_patch_info *patch, const char *addr, int count)
-{
- if (patch->optarg < AWE_REVERB_PREDEFINED || patch->optarg >= AWE_REVERB_NUMBERS) {
- printk("AWE32 Error: illegal reverb mode %d for uploading\n", patch->optarg);
- return RET_ERROR(EINVAL);
- }
- if (count < sizeof(awe_reverb_fx_rec)) {
- printk("AWE32 Error: too short reverb fx parameters\n");
- return RET_ERROR(EINVAL);
- }
- COPY_FROM_USER(&reverb_parm[patch->optarg], addr, AWE_PATCH_INFO_SIZE,
- sizeof(awe_reverb_fx_rec));
- reverb_defined[patch->optarg] = TRUE;
- return 0;
-}
-
-static void
-awe_set_reverb_mode(int effect)
-{
- int i;
- if (effect < 0 || effect >= AWE_REVERB_NUMBERS ||
- (effect >= AWE_REVERB_PREDEFINED && !reverb_defined[effect]))
- return;
- for (i = 0; i < 28; i++)
- awe_poke(reverb_cmds[i].cmd, reverb_cmds[i].port,
- reverb_parm[effect].parms[i]);
- reverb_mode = effect;
-}
-
-/*================================================================
- * treble/bass equalizer control
- *================================================================*/
-
-static unsigned short bass_parm[12][3] = {
- {0xD26A, 0xD36A, 0x0000}, /* -12 dB */
- {0xD25B, 0xD35B, 0x0000}, /* -8 */
- {0xD24C, 0xD34C, 0x0000}, /* -6 */
- {0xD23D, 0xD33D, 0x0000}, /* -4 */
- {0xD21F, 0xD31F, 0x0000}, /* -2 */
- {0xC208, 0xC308, 0x0001}, /* 0 (HW default) */
- {0xC219, 0xC319, 0x0001}, /* +2 */
- {0xC22A, 0xC32A, 0x0001}, /* +4 */
- {0xC24C, 0xC34C, 0x0001}, /* +6 */
- {0xC26E, 0xC36E, 0x0001}, /* +8 */
- {0xC248, 0xC348, 0x0002}, /* +10 */
- {0xC26A, 0xC36A, 0x0002}, /* +12 dB */
-};
-
-static unsigned short treble_parm[12][9] = {
- {0x821E, 0xC26A, 0x031E, 0xC36A, 0x021E, 0xD208, 0x831E, 0xD308, 0x0001}, /* -12 dB */
- {0x821E, 0xC25B, 0x031E, 0xC35B, 0x021E, 0xD208, 0x831E, 0xD308, 0x0001},
- {0x821E, 0xC24C, 0x031E, 0xC34C, 0x021E, 0xD208, 0x831E, 0xD308, 0x0001},
- {0x821E, 0xC23D, 0x031E, 0xC33D, 0x021E, 0xD208, 0x831E, 0xD308, 0x0001},
- {0x821E, 0xC21F, 0x031E, 0xC31F, 0x021E, 0xD208, 0x831E, 0xD308, 0x0001},
- {0x821E, 0xD208, 0x031E, 0xD308, 0x021E, 0xD208, 0x831E, 0xD308, 0x0002},
- {0x821E, 0xD208, 0x031E, 0xD308, 0x021D, 0xD219, 0x831D, 0xD319, 0x0002},
- {0x821E, 0xD208, 0x031E, 0xD308, 0x021C, 0xD22A, 0x831C, 0xD32A, 0x0002},
- {0x821E, 0xD208, 0x031E, 0xD308, 0x021A, 0xD24C, 0x831A, 0xD34C, 0x0002},
- {0x821E, 0xD208, 0x031E, 0xD308, 0x0219, 0xD26E, 0x8319, 0xD36E, 0x0002}, /* +8 (HW default) */
- {0x821D, 0xD219, 0x031D, 0xD319, 0x0219, 0xD26E, 0x8319, 0xD36E, 0x0002},
- {0x821C, 0xD22A, 0x031C, 0xD32A, 0x0219, 0xD26E, 0x8319, 0xD36E, 0x0002}, /* +12 dB */
-};
-
-
-/*
- * set Emu8000 digital equalizer; from 0 to 11 [-12dB - 12dB]
- */
-static void
-awe_equalizer(int bass, int treble)
-{
- unsigned short w;
-
- if (bass < 0 || bass > 11 || treble < 0 || treble > 11)
- return;
- awe_bass_level = bass;
- awe_treble_level = treble;
- awe_poke(AWE_INIT4(0x01), bass_parm[bass][0]);
- awe_poke(AWE_INIT4(0x11), bass_parm[bass][1]);
- awe_poke(AWE_INIT3(0x11), treble_parm[treble][0]);
- awe_poke(AWE_INIT3(0x13), treble_parm[treble][1]);
- awe_poke(AWE_INIT3(0x1B), treble_parm[treble][2]);
- awe_poke(AWE_INIT4(0x07), treble_parm[treble][3]);
- awe_poke(AWE_INIT4(0x0B), treble_parm[treble][4]);
- awe_poke(AWE_INIT4(0x0D), treble_parm[treble][5]);
- awe_poke(AWE_INIT4(0x17), treble_parm[treble][6]);
- awe_poke(AWE_INIT4(0x19), treble_parm[treble][7]);
- w = bass_parm[bass][2] + treble_parm[treble][8];
- awe_poke(AWE_INIT4(0x15), (unsigned short)(w + 0x0262));
- awe_poke(AWE_INIT4(0x1D), (unsigned short)(w + 0x8362));
-}
-
-
-#endif /* CONFIG_AWE32_SYNTH */
OpenPOWER on IntegriCloud